Decompiled source of RoomArchitectTool v3.0.6

Room Architect Tool_Data/Managed/Accessibility.dll

Decompiled 3 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;

[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("Accessibility.dll")]
[assembly: AssemblyDescription("Accessibility.dll")]
[assembly: AssemblyDefaultAlias("Accessibility.dll")]
[assembly: AssemblyCompany("Mono development team")]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright("(c) Various Mono authors")]
[assembly: SatelliteContractVersion("4.0.0.0")]
[assembly: AssemblyInformationalVersion("4.6.57.0")]
[assembly: CLSCompliant(true)]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: ComVisible(true)]
[assembly: Guid("1ea4dbf0-3c3b-11cf-810c-00aa00389b71")]
[assembly: AllowPartiallyTrustedCallers]
[assembly: AssemblyDelaySign(true)]
[assembly: ImportedFromTypeLib("Accessibility")]
[assembly: AssemblyFileVersion("4.6.57.0")]
[assembly: TypeLibVersion(1, 1)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: CompilationRelaxations(CompilationRelaxations.NoStringInterning)]
[assembly: AssemblyVersion("4.0.0.0")]
internal static class Consts
{
	public const string MonoVersion = "5.11.0.0";

	public const string MonoCompany = "Mono development team";

	public const string MonoProduct = "Mono Common Language Infrastructure";

	public const string MonoCopyright = "(c) Various Mono authors";

	public const int MonoCorlibVersion = 1051100001;

	public const string FxVersion = "4.0.0.0";

	public const string FxFileVersion = "4.6.57.0";

	public const string EnvironmentVersion = "4.0.30319.42000";

	public const string VsVersion = "0.0.0.0";

	public const string VsFileVersion = "11.0.0.0";

	private const string PublicKeyToken = "b77a5c561934e089";

	public const string AssemblyI18N = "I18N, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMicrosoft_JScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMono_Http = "Mono.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Posix = "Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Security = "Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Messaging_RabbitMQ = "Mono.Messaging.RabbitMQ, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyCorlib = "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Data = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Design = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing_Design = "System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Messaging = "System.Messaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Security = "System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Web = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Core = "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string WindowsBase_3_0 = "WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
internal interface IAccessibleHandler
{
}
namespace Accessibility;

public interface IAccessible
{
	int accChildCount { get; }

	object accFocus { get; }

	object accParent { get; }

	object accSelection { get; }

	void accDoDefaultAction(object childID);

	object accHitTest(int xLeft, int yTop);

	void accLocation(out int pxLeft, out int pyTop, out int pcxWidth, out int pcyHeight, object childID);

	object accNavigate(int navDir, object childID);

	void accSelect(int flagsSelect, object childID);

	object get_accChild(object childID);

	string get_accDefaultAction(object childID);

	string get_accDescription(object childID);

	string get_accHelp(object childID);

	int get_accHelpTopic(out string pszHelpFile, object childID);

	string get_accKeyboardShortcut(object childID);

	string get_accName(object childID);

	object get_accRole(object childID);

	object get_accState(object childID);

	string get_accValue(object childID);

	void set_accName(object childID, string newName);

	void set_accValue(object childID, string newValue);
}

Room Architect Tool_Data/Managed/Assembly-CSharp.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Text.RegularExpressions;
using AnotherFileBrowser.Windows;
using Assets.Scripts.Assembly_CSharp;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.Networking;
using UnityEngine.SceneManagement;
using UnityEngine.Scripting.APIUpdating;
using UnityEngine.Tilemaps;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyVersion("0.0.0.0")]
public class BoarderHandler : TilemapHandler
{
	public static bool toggled;

	public static BoarderHandler Instance;

	public TileBase gridTile;

	protected override void Awake()
	{
		base.Awake();
		Instance = this;
	}

	protected override void Start()
	{
		base.Start();
		((Component)this).gameObject.SetActive(toggled);
		ResetAppearance();
	}

	public void Toggle()
	{
		Debug.Log((object)$"is on {!((Component)this).gameObject.activeSelf}");
		toggled = !((Component)this).gameObject.activeSelf;
		((Component)this).gameObject.SetActive(toggled);
		if (toggled)
		{
			ResetAppearance();
		}
	}

	public void ResetAppearance()
	{
		map.ClearAllTiles();
		ResizeBounds();
		BoxFill();
	}

	public void BoxFill()
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_0021: 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_0030: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: 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)
		//IL_0044: Unknown result type (might be due to invalid IL or missing references)
		//IL_004e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0053: Unknown result type (might be due to invalid IL or missing references)
		//IL_007d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0097: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
		Vector3Int zero = Vector3Int.zero;
		Vector3Int origin = map.origin;
		((Vector3Int)(ref zero)).z = ((Vector3Int)(ref origin)).z;
		BoundsInt bounds = TilemapHandler.Bounds;
		int xMin = ((BoundsInt)(ref bounds)).xMin;
		bounds = TilemapHandler.Bounds;
		int yMin = ((BoundsInt)(ref bounds)).yMin;
		bounds = TilemapHandler.Bounds;
		int xMax = ((BoundsInt)(ref bounds)).xMax;
		bounds = TilemapHandler.Bounds;
		int yMax = ((BoundsInt)(ref bounds)).yMax;
		for (int i = xMin; i < xMax; i++)
		{
			((Vector3Int)(ref zero)).x = i;
			((Vector3Int)(ref zero)).y = yMax - 1;
			map.SetTile(zero, gridTile);
			((Vector3Int)(ref zero)).y = yMin;
			map.SetTile(zero, gridTile);
		}
		for (int j = yMin; j < yMax; j++)
		{
			((Vector3Int)(ref zero)).y = j;
			((Vector3Int)(ref zero)).x = xMax - 1;
			map.SetTile(zero, gridTile);
			((Vector3Int)(ref zero)).x = xMin;
			map.SetTile(zero, gridTile);
		}
	}

	public override TileDatabase InitializeDatabase()
	{
		return null;
	}
}
public class CustomObjectDatabase : MonoBehaviour
{
	public enum Type
	{
		Enemy,
		Placeable
	}

	[Serializable]
	public class CustomDataEntry
	{
		public string guid;

		public string name;

		public CustomDataEntry(string name, string guid)
		{
			this.name = name;
			this.guid = guid;
		}
	}

	public static string dataFileName = "CustomAssetDatabase.json";

	public static string dataFilePath;

	public List<CustomDataEntry> customEnemies = new List<CustomDataEntry>();

	public List<CustomDataEntry> customPlaceables = new List<CustomDataEntry>();

	private static CustomObjectDatabase _instance;

	public static CustomObjectDatabase Instance
	{
		get
		{
			if (!Object.op_Implicit((Object)(object)_instance))
			{
				_instance = Object.FindObjectOfType<CustomObjectDatabase>();
			}
			return _instance;
		}
		set
		{
			_instance = value;
		}
	}

	public void Start()
	{
		dataFilePath = Path.Combine(Application.persistentDataPath, dataFileName);
		LoadDataFile();
	}

	public void LoadDataFile()
	{
		if (!File.Exists(dataFilePath))
		{
			File.Create(dataFilePath).Close();
			File.WriteAllText(dataFilePath, JsonUtility.ToJson((object)this, true));
		}
		JsonUtility.FromJsonOverwrite(File.ReadAllText(dataFilePath), (object)Instance);
	}

	public void SaveDataFile()
	{
		if (!File.Exists(dataFilePath))
		{
			File.Create(dataFilePath).Close();
		}
		File.WriteAllText(dataFilePath, JsonUtility.ToJson((object)this, true));
	}

	public void AddEntry(string name, string guid, Type type)
	{
		((type == Type.Enemy) ? customEnemies : customPlaceables).Add(new CustomDataEntry(name, guid));
		SaveDataFile();
	}

	public CustomDataEntry GetEntryByName(string name, Type type)
	{
		CustomDataEntry customDataEntry = ((type == Type.Enemy) ? customEnemies : customPlaceables).Find((CustomDataEntry x) => x.name == name);
		if (customDataEntry != null && ((type == Type.Enemy) ? customEnemies : customPlaceables).Contains(customDataEntry))
		{
			return customDataEntry;
		}
		return null;
	}

	public CustomDataEntry GetEntryByGUID(string guid, Type type)
	{
		CustomDataEntry customDataEntry = ((type == Type.Enemy) ? customEnemies : customPlaceables).Find((CustomDataEntry x) => x.guid == guid);
		if (customDataEntry != null && ((type == Type.Enemy) ? customEnemies : customPlaceables).Contains(customDataEntry))
		{
			return customDataEntry;
		}
		return null;
	}

	public void RemoveEntryByName(string name, Type type)
	{
		((type == Type.Enemy) ? customEnemies : customPlaceables).Remove(GetEntryByName(name, type));
		SaveDataFile();
	}

	public void RemoveEntryByGUID(string guid, Type type)
	{
		((type == Type.Enemy) ? customEnemies : customPlaceables).Remove(GetEntryByGUID(guid, type));
		SaveDataFile();
	}
}
public class AC
{
	public string longName;

	public string shortName;

	public object defaultValue;

	public object[] possibleValues;

	public AC(string _longName, string _shortName, object _defaultValue, params object[] _possibleValues)
	{
		longName = _longName;
		shortName = _shortName;
		defaultValue = _defaultValue;
		possibleValues = _possibleValues;
	}
}
public static class AttributeDatabase
{
	public delegate bool ValidAttribute(string name);

	public class SpecialDefaultValue
	{
		public string validAttribute;

		public string objectName;

		public object SpecialDefault;

		public SpecialDefaultValue(string attribute, string ObjectName, object newDefaultValue)
		{
			validAttribute = attribute;
			objectName = ObjectName;
			SpecialDefault = newDefaultValue;
		}

		public bool MatchingValue(string attribute, string ObjectName)
		{
			if (validAttribute == attribute)
			{
				return objectName == ObjectName;
			}
			return false;
		}
	}

	public static Dictionary<string, AC> allAttributes = new Dictionary<string, AC>
	{
		{
			"j",
			new AC("jammed", "j", false)
		},
		{
			"pls",
			new AC("prevent loot spawns", "pls", false)
		},
		{
			"fP",
			new AC("followsPlayer", "fP", false)
		},
		{
			"pOOC",
			new AC("persistOutOfCombat", "pOOC", true)
		},
		{
			"fL",
			new AC("facesLeft", "fL", false)
		},
		{
			"lG",
			new AC("leaveGoop", "lG", true)
		},
		{
			"fB",
			new AC("fireBullets", "fB", true)
		},
		{
			"gT",
			new AC("goopType", "gT", "fire", "fire", "water", "poison", "oil", "blobulon", "web", "greenfire", "charm", "cheese")
		},
		{
			"iD",
			new AC("initialDelay", "iD", 1f)
		},
		{
			"minD",
			new AC("minDelay", "minD", 1f)
		},
		{
			"maxD",
			new AC("maxDelay", "maxD", 1f)
		},
		{
			"dI",
			new AC("overrideLootItem", "dI", "")
		},
		{
			"jI",
			new AC("overrideJunkItem", "jI", "")
		},
		{
			"mC",
			new AC("mimicChance", "mC", 0f)
		},
		{
			"cL",
			new AC("locked", "cL", true)
		},
		{
			"pV",
			new AC("forceNoFuse", "pV", false)
		},
		{
			"isGlitched",
			new AC("Is Glitched", "isGlitched", false)
		},
		{
			"bB",
			new AC("barrelSprite", "bB", "water_drum", "water_drum", "red_explosive", "metal_explosive", "oil_drum", "poison_drum")
		},
		{
			"rS",
			new AC("rollSpeed", "rS", 3f)
		},
		{
			"tG",
			new AC("leavesGoopTrail", "tG", true)
		},
		{
			"tGT",
			new AC("goopTrailType", "tGT", "fire", "fire", "water", "poison", "oil", "blobulon", "web", "greenfire", "charm", "cheese")
		},
		{
			"tGW",
			new AC("goopTrailSize", "tGW", 1f)
		},
		{
			"pG",
			new AC("leavesGoopPuddle", "pG", true)
		},
		{
			"pGT",
			new AC("goopPuddleType", "pGT", "fire", "fire", "water", "poison", "oil", "blobulon", "web", "greenfire", "charm", "cheese")
		},
		{
			"pGW",
			new AC("goopPuddleSize", "pGW", 3f)
		},
		{
			"dBPR",
			new AC("destroyedByPlayerRoll", "dBPR", false)
		},
		{
			"tSP",
			new AC("assignedPath", "tSP", "0", "0")
		},
		{
			"nSP_O",
			new AC("Start At Node:", "nSP_O", 0)
		},
		{
			"mS",
			new AC("Max Speed", "mS", 9f)
		},
		{
			"tTMS",
			new AC("timeToMaxSpeed", "tTMS", 1.5f)
		},
		{
			"storedenemyBodyMC",
			new AC("Nearet Enemy Will Ride", "storedenemyBodyMC", false)
		},
		{
			"nodPos",
			new AC("Node Order", "nodPos", "0", "0")
		},
		{
			"nodType",
			new AC("Node Type", "nodType", "Center", "Center", "North", "NorthEast", "East", "SouthEast", "South", "SouthWest", "West", "NorthWest")
		},
		{
			"lightRad",
			new AC("Light Radius", "lightRad", 2f)
		},
		{
			"lightInt",
			new AC("Light Intensity", "lightInt", 2f)
		},
		{
			"lightColorR",
			new AC("[Red]", "lightColorR", 1f)
		},
		{
			"lightColorG",
			new AC("[Green]", "lightColorG", 1f)
		},
		{
			"lightColorB",
			new AC("[Blue]", "lightColorB", 1f)
		},
		{
			"bossPdstlItmID",
			new AC("Item ID", "bossPdstlItmID", -1)
		},
		{
			"bossPdstlItmStringID",
			new AC("Item Tag", "bossPdstlItmStringID", "None.")
		},
		{
			"bossPdstOverrideLootType",
			new AC("Loot Type", "bossPdstOverrideLootType", "N/A", "N/A", "Fully Random", "Random Gun", "Random Item", "Set ID / Tag", "Crest")
		},
		{
			"TrapTriggerMethod",
			new AC("Trap Trigger", "TrapTriggerMethod", "Timer", "Timer", "Stepped On", "Collisions", "Script")
		},
		{
			"TrapTriggerDelay",
			new AC("Cooldown", "TrapTriggerDelay", 1f)
		},
		{
			"InitialtrapDelay",
			new AC("Initial Delay", "InitialtrapDelay", 1f)
		},
		{
			"attackDelatTrap",
			new AC("Attack Delay", "attackDelatTrap", 0.5f)
		},
		{
			"trapTriggerOnBlank",
			new AC("Attacks On Blank", "trapTriggerOnBlank", false, false, true)
		},
		{
			"WinchesterBounceCount",
			new AC("Amount Of Bounces", "WinchesterBounceCount", 1)
		},
		{
			"WinCameraZoomOut",
			new AC("Zoom Scale", "WinCameraZoomOut", 0.75f)
		},
		{
			"WinchestMoveXTele",
			new AC("Movement X:", "WinchestMoveXTele", 0f)
		},
		{
			"WinchestMoveYTele",
			new AC("Movement Y:", "WinchestMoveYTele", 0f)
		},
		{
			"WinchestGoneTime",
			new AC("Gone Time:", "WinchestGoneTime", 1f)
		},
		{
			"WinchestTargetSpeed",
			new AC("Speed", "WinchestTargetSpeed", 6f)
		},
		{
			"TileSizeX_",
			new AC("Tile Size X", "TileSizeX_", 4)
		},
		{
			"TileSizeY_",
			new AC("Tile Size Y", "TileSizeY_", 4)
		},
		{
			"ConveyorHorizontalVelocity",
			new AC("Horizontal Velocity", "ConveyorHorizontalVelocity", 4f)
		},
		{
			"ConveyorVerticalVelocity",
			new AC("Vertical Velocity", "ConveyorVerticalVelocity", 4f)
		},
		{
			"ConveyorReversed",
			new AC("Reversed", "ConveyorReversed", false)
		},
		{
			"customNoteText",
			new AC("Custom Text", "customNoteText", "None.")
		},
		{
			"customNoteTextIsStringKey",
			new AC("Text Is String Key", "customNoteTextIsStringKey", false)
		},
		{
			"triggerEventValue",
			new AC("Trigger On Event:", "triggerEventValue", 0)
		},
		{
			"triggeredEventValue",
			new AC("Set To Event:", "triggeredEventValue", 0)
		},
		{
			"trapProjSpeed",
			new AC("Projectile Speed", "trapProjSpeed", 5f)
		},
		{
			"trapProjRange",
			new AC("Projectile Range", "trapProjRange", 1000f)
		},
		{
			"DirectionShoot",
			new AC("Shoot Direction", "DirectionShoot", "NORTH", "NORTH", "NORTHEAST", "EAST", "SOUTHEAST", "SOUTH", "SOUTHWEST", "WEST", "NORTHWEST")
		},
		{
			"projectileTypeTurret",
			new AC("Projectile Type", "projectileTypeTurret", "None.", "None.", "Bouncy.", "Explosive.", "Tank Shell.", "Bouncy Bullet Kin.", "Grenade.", "Molotov.", "Goblet.")
		},
		{
			"pewLength",
			new AC("Pew Length", "pewLength", 4)
		},
		{
			"logLength",
			new AC("Length", "logLength", 4)
		},
		{
			"logHeight",
			new AC("Height", "logHeight", 4)
		},
		{
			"lf_pipe",
			new AC("Lifetime", "lf_pipe", 10f)
		},
		{
			"mCSpawner_amount",
			new AC("Maximum Carts", "mCSpawner_amount", 1)
		},
		{
			"mCSpawner_cartDelay",
			new AC("Delay Between Carts", "mCSpawner_cartDelay", 3f)
		},
		{
			"mCSpawner_destroyDelay",
			new AC("Cart Destruction Cooldown", "mCSpawner_destroyDelay", 1f)
		},
		{
			"cartActive",
			new AC("Cart Moves Itself", "cartActive", false)
		},
		{
			"mCSpawner_cartType",
			new AC("Cart Type", "mCSpawner_cartType", "Explosive Barrel", "Explosive Barrel", "Default", "Turret")
		},
		{
			"mCSpawner_cartCopy",
			new AC("Copy Nearest Cart", "mCSpawner_cartCopy", false)
		},
		{
			"mCSpawner_cartDestroyCopy",
			new AC("Destroy Copied Cart", "mCSpawner_cartDestroyCopy", true)
		},
		{
			"gullleap_Missile",
			new AC("Jump To For Missile Attack", "gullleap_Missile", true)
		},
		{
			"gullleap_Repos",
			new AC("Jump To For Reposition", "gullleap_Repos", true)
		},
		{
			"glitchHpMult",
			new AC("Boss Damage Multiplier", "glitchHpMult", 1.4f)
		},
		{
			"glitchtimescaleMult",
			new AC("Boss Timescale Multiplier", "glitchtimescaleMult", 1f)
		},
		{
			"glitchspeedMult",
			new AC("Boss Speed Multiplier", "glitchspeedMult", 1f)
		},
		{
			"forceFly",
			new AC("Force Flight", "forceFly", false)
		},
		{
			"crushTrapDelay",
			new AC("Crush Delay", "crushTrapDelay", 0.25f)
		},
		{
			"crushTrapCloseTime",
			new AC("Close Time", "crushTrapCloseTime", 1f)
		},
		{
			"crushTrapEnemyDamage",
			new AC("Enemy Damage", "crushTrapEnemyDamage", 30f)
		},
		{
			"crushTrapPlayerKnockbackForce",
			new AC("Player Knockback Force", "crushTrapPlayerKnockbackForce", 50f)
		},
		{
			"crushTrapEnemyKnockbackForce",
			new AC("Enemy Knockback Force", "crushTrapEnemyKnockbackForce", 50f)
		},
		{
			"shopItemBase",
			new AC("Item Table", "shopItemBase", "Primary", "Primary", "Secondary")
		},
		{
			"UsedByShop",
			new AC("Used By Shop", "UsedByShop", "Any", "Any", "Bello", "Goopton", "Old Red", "Flynt", "Cursula", "Trorc", "Blacksmith", "Shortcut Rat", "Meta Shop")
		},
		{
			"shopItemBaseChance",
			new AC("Chance", "shopItemBaseChance", 1f)
		},
		{
			"overridePrice",
			new AC("Override Price", "overridePrice", -1)
		},
		{
			"priceMultiplier",
			new AC("Price Multiplier", "priceMultiplier", 1f)
		},
		{
			"omniDir",
			new AC("Omnidirectional?", "omniDir", true)
		},
		{
			"facingDirItem",
			new AC("Facing Direction", "facingDirItem", "NORTH", "NORTH", "SOUTH", "EAST", "WEST")
		},
		{
			"initDelay",
			new AC("Pause here for:", "initDelay", 0f)
		},
		{
			"addDelay",
			new AC("Pause upon reaching node for:", "addDelay", 0f)
		}
	};

	public static Dictionary<ValidAttribute, string[]> attributeListings = new Dictionary<ValidAttribute, string[]>
	{
		{
			(string name) => (name == "shopItemPosition") | (name == "glass_case_pedestal_whatever"),
			new string[9] { "shopItemBase", "UsedByShop", "shopItemBaseChance", "omniDir", "facingDirItem", "bossPdstlItmID", "bossPdstlItmStringID", "overridePrice", "priceMultiplier" }
		},
		{
			(string name) => name == "firebar_trap",
			new string[1] { "j" }
		},
		{
			(string name) => name == "flameburst_trap",
			new string[3] { "j", "trapProjRange", "projectileTypeTurret" }
		},
		{
			(string name) => (name == "vertical_crusher") | (name == "horizontal_crusher"),
			new string[6] { "crushTrapDelay", "crushTrapCloseTime", "TrapTriggerDelay", "crushTrapEnemyDamage", "crushTrapPlayerKnockbackForce", "crushTrapEnemyKnockbackForce" }
		},
		{
			(string name) => name == "glitch_floor_properties",
			new string[4] { "glitchHpMult", "glitchtimescaleMult", "glitchspeedMult", "forceFly" }
		},
		{
			(string name) => name == "gull_land_point",
			new string[2] { "gullleap_Repos", "gullleap_Missile" }
		},
		{
			(string name) => name == "minecart_spawner",
			new string[9] { "mCSpawner_amount", "tSP", "nSP_O", "mCSpawner_cartDelay", "mCSpawner_destroyDelay", "cartActive", "mCSpawner_cartType", "mCSpawner_cartCopy", "mCSpawner_cartDestroyCopy" }
		},
		{
			(string name) => (name == "sewer_platform_moving_001") | (name == "gungeon_platform_moving_001") | (name == "mines_platform_moving_001") | (name == "catacombs_platform_moving_001") | (name == "forge_platform_moving_001"),
			new string[6] { "tSP", "nSP_O", "mS", "TileSizeX_", "TileSizeY_", "addDelay" }
		},
		{
			(string name) => (name == "flame_pipe_north") | (name == "flame_pipe_west") | (name == "flame_pipe_east"),
			new string[1] { "lf_pipe" }
		},
		{
			(string name) => (name == "spinning_log_spike_vertical_001") | (name == "spinning_ice_log_spike_vertical_001"),
			new string[5] { "tSP", "nSP_O", "logLength", "mS", "addDelay" }
		},
		{
			(string name) => (name == "spinning_log_spike_horizontal_001") | (name == "spinning_ice_log_spike_horizontal_001001"),
			new string[5] { "tSP", "nSP_O", "logHeight", "mS", "addDelay" }
		},
		{
			(string name) => (name == "mouse_trap_west") | (name == "mouse_trap_east") | (name == "mouse_trap_north"),
			new string[1] { "trapTriggerOnBlank" }
		},
		{
			(string name) => name == "pew",
			new string[1] { "pewLength" }
		},
		{
			(string name) => (name == "forge_shoot_face_north") | (name == "forge_shoot_face_west") | (name == "forge_shoot_face_east") | (name == "mine_skull_face_left_004") | (name == "mine_skull_face_004") | (name == "mine_skull_face_right_004") | (name == "ice_skull_face_left_004") | (name == "ice_skull_face_004") | (name == "ice_skull_face_right_004"),
			new string[6] { "TrapTriggerDelay", "trapProjSpeed", "trapProjRange", "DirectionShoot", "projectileTypeTurret", "j" }
		},
		{
			(string name) => (name == "chandelier_trap") | (name == "tnt_drop"),
			new string[1] { "triggerEventValue" }
		},
		{
			(string name) => (name == "chandelier_switch") | (name == "tnt_plunger_idle_001"),
			new string[1] { "triggeredEventValue" }
		},
		{
			(string name) => (name == "floor_note") | (name == "shop_sign"),
			new string[2] { "customNoteText", "customNoteTextIsStringKey" }
		},
		{
			(string name) => name == "conveyor_belt_right",
			new string[5] { "TileSizeX_", "TileSizeY_", "ConveyorHorizontalVelocity", "ConveyorVerticalVelocity", "ConveyorReversed" }
		},
		{
			(string name) => name == "conveyor_belt_up",
			new string[5] { "TileSizeX_", "TileSizeY_", "ConveyorHorizontalVelocity", "ConveyorVerticalVelocity", "ConveyorReversed" }
		},
		{
			(string name) => name == "winchesterCameraPanPlacer",
			new string[2] { "TileSizeX_", "TileSizeY_" }
		},
		{
			(string name) => name == "artfull_dodger_talk_002",
			new string[3] { "WinchestMoveXTele", "WinchestMoveYTele", "WinchestGoneTime" }
		},
		{
			(string name) => name == "winchesterController",
			new string[1] { "WinchesterBounceCount" }
		},
		{
			(string name) => name == "winchesterCamera",
			new string[1] { "WinCameraZoomOut" }
		},
		{
			(string name) => name == "every_single_enemy_ever",
			new string[1] { "j" }
		},
		{
			(string name) => name == "dead_blow",
			new string[9] { "fP", "pOOC", "fL", "lG", "fB", "gT", "iD", "minD", "maxD" }
		},
		{
			(string name) => name == "all_nodes",
			new string[3] { "nodPos", "nodType", "initDelay" }
		},
		{
			(string name) => name.Contains("_chest") && !name.Contains("random"),
			new string[6] { "dI", "jI", "mC", "cL", "pV", "isGlitched" }
		},
		{
			(string name) => name == "lost_adventurer_idle_left_001",
			new string[4] { "tSP", "nSP_O", "mS", "addDelay" }
		},
		{
			(string name) => name == "winchester_target_001",
			new string[4] { "tSP", "nSP_O", "WinchestTargetSpeed", "addDelay" }
		},
		{
			(string name) => name == "winchestermovingBumper1x3",
			new string[4] { "tSP", "nSP_O", "WinchestTargetSpeed", "addDelay" }
		},
		{
			(string name) => name == "winchestermovingBumper2x2",
			new string[4] { "tSP", "nSP_O", "WinchestTargetSpeed", "addDelay" }
		},
		{
			(string name) => name == "sawblade",
			new string[4] { "tSP", "nSP_O", "mS", "addDelay" }
		},
		{
			(string name) => name == "minecart",
			new string[6] { "tSP", "nSP_O", "mS", "tTMS", "storedenemyBodyMC", "cartActive" }
		},
		{
			(string name) => name == "minecartturret",
			new string[11]
			{
				"tSP", "nSP_O", "mS", "tTMS", "projectileTypeTurret", "trapProjSpeed", "trapProjRange", "InitialtrapDelay", "TrapTriggerDelay", "cartActive",
				"j"
			}
		},
		{
			(string name) => name == "minecartboomer",
			new string[5] { "tSP", "nSP_O", "mS", "tTMS", "cartActive" }
		},
		{
			(string name) => name == "custom_barrel",
			new string[9] { "bB", "rS", "tG", "tGT", "tGW", "pG", "pGT", "pGW", "dBPR" }
		},
		{
			(string name) => name == "lightbulbThankYouNevernamed",
			new string[5] { "lightRad", "lightInt", "lightColorR", "lightColorG", "lightColorB" }
		},
		{
			(string name) => (name == "Boss_Pedestal") | (name == "pedestal_gold_001"),
			new string[3] { "bossPdstlItmID", "bossPdstlItmStringID", "bossPdstOverrideLootType" }
		},
		{
			(string name) => name == "floor_spikes",
			new string[5] { "TrapTriggerMethod", "TrapTriggerDelay", "InitialtrapDelay", "attackDelatTrap", "trapTriggerOnBlank" }
		},
		{
			(string name) => name == "flame_trap",
			new string[5] { "TrapTriggerMethod", "TrapTriggerDelay", "InitialtrapDelay", "attackDelatTrap", "trapTriggerOnBlank" }
		},
		{
			(string name) => name == "pitfall_trap",
			new string[5] { "TrapTriggerMethod", "TrapTriggerDelay", "InitialtrapDelay", "attackDelatTrap", "trapTriggerOnBlank" }
		},
		{
			(string name) => name == "gungon_lair_trap",
			new string[2] { "attackDelatTrap", "trapTriggerOnBlank" }
		}
	};

	public static List<SpecialDefaultValue> specialDefaultValueListings = new List<SpecialDefaultValue>
	{
		new SpecialDefaultValue("attackDelatTrap", "gungon_lair_trap", 3f),
		new SpecialDefaultValue("TrapTriggerMethod", "flame_trap", "Timer"),
		new SpecialDefaultValue("TrapTriggerMethod", "flame_trap", "Timer"),
		new SpecialDefaultValue("TrapTriggerMethod", "pitfall_trap", "Stepped On"),
		new SpecialDefaultValue("TrapTriggerMethod", "floor_spikes", "Stepped On"),
		new SpecialDefaultValue("TrapTriggerDelay", "flame_trap", 3f),
		new SpecialDefaultValue("TrapTriggerDelay", "pitfall_trap", 1f),
		new SpecialDefaultValue("TrapTriggerDelay", "floor_spikes", 1f),
		new SpecialDefaultValue("InitialtrapDelay", "flame_trap", 1f),
		new SpecialDefaultValue("InitialtrapDelay", "pitfall_trap", 1f),
		new SpecialDefaultValue("InitialtrapDelay", "floor_spikes", 1f),
		new SpecialDefaultValue("attackDelatTrap", "flame_trap", 1f),
		new SpecialDefaultValue("attackDelatTrap", "pitfall_trap", 0.5f),
		new SpecialDefaultValue("attackDelatTrap", "floor_spikes", 0.5f),
		new SpecialDefaultValue("TileSizeY_", "conveyor_belt_right", 3),
		new SpecialDefaultValue("TileSizeX_", "conveyor_belt_up", 3),
		new SpecialDefaultValue("ConveyorHorizontalVelocity", "conveyor_belt_up", 0f),
		new SpecialDefaultValue("ConveyorVerticalVelocity", "conveyor_belt_right", 0f),
		new SpecialDefaultValue("InitialtrapDelay", "forge_shoot_face_west", 1f),
		new SpecialDefaultValue("TrapTriggerDelay", "forge_shoot_face_west", 1),
		new SpecialDefaultValue("InitialtrapDelay", "forge_shoot_face_west", 1f),
		new SpecialDefaultValue("TrapTriggerDelay", "forge_shoot_face_west", 1f),
		new SpecialDefaultValue("DirectionShoot", "forge_shoot_face_north", "SOUTH"),
		new SpecialDefaultValue("TrapTriggerDelay", "forge_shoot_face_north", 1f),
		new SpecialDefaultValue("DirectionShoot", "mine_skull_face_004", "SOUTH"),
		new SpecialDefaultValue("TrapTriggerDelay", "mine_skull_face_004", 1f),
		new SpecialDefaultValue("DirectionShoot", "ice_skull_face_004", "SOUTH"),
		new SpecialDefaultValue("TrapTriggerDelay", "ice_skull_face_004", 1f),
		new SpecialDefaultValue("DirectionShoot", "forge_shoot_face_west", "EAST"),
		new SpecialDefaultValue("TrapTriggerDelay", "forge_shoot_face_west", 1f),
		new SpecialDefaultValue("DirectionShoot", "mine_skull_face_right_004", "EAST"),
		new SpecialDefaultValue("TrapTriggerDelay", "mine_skull_face_right_004", 1f),
		new SpecialDefaultValue("DirectionShoot", "ice_skull_face_right_004", "EAST"),
		new SpecialDefaultValue("TrapTriggerDelay", "ice_skull_face_right_004", 1f),
		new SpecialDefaultValue("DirectionShoot", "forge_shoot_face_east", "WEST"),
		new SpecialDefaultValue("TrapTriggerDelay", "forge_shoot_face_east", 1f),
		new SpecialDefaultValue("DirectionShoot", "mine_skull_face_left_004", "WEST"),
		new SpecialDefaultValue("TrapTriggerDelay", "mine_skull_face_left_004", 1f),
		new SpecialDefaultValue("DirectionShoot", "ice_skull_face_left_004", "WEST"),
		new SpecialDefaultValue("TrapTriggerDelay", "ice_skull_face_left_004", 1f),
		new SpecialDefaultValue("InitialtrapDelay", "minecartturret", 3f),
		new SpecialDefaultValue("TrapTriggerDelay", "minecartturret", 0.5f),
		new SpecialDefaultValue("trapTriggerOnBlank", "mouse_trap_west", true),
		new SpecialDefaultValue("trapTriggerOnBlank", "mouse_trap_east", true),
		new SpecialDefaultValue("trapTriggerOnBlank", "mouse_trap_north", true),
		new SpecialDefaultValue("mS", "lost_adventurer_idle_left_001", 0.1f),
		new SpecialDefaultValue("addDelay", "lost_adventurer_idle_left_001", 1f),
		new SpecialDefaultValue("mS", "spinning_log_spike_horizontal_001", 3f),
		new SpecialDefaultValue("mS", "spinning_ice_log_spike_horizontal_001", 3f),
		new SpecialDefaultValue("mS", "spinning_log_spike_vertical_001", 3f),
		new SpecialDefaultValue("mS", "spinning_ice_log_spike_vertical_001", 3f),
		new SpecialDefaultValue("addDelay", "spinning_log_spike_horizontal_001", 0.5f),
		new SpecialDefaultValue("addDelay", "spinning_ice_log_spike_horizontal_001", 0.5f),
		new SpecialDefaultValue("addDelay", "spinning_log_spike_vertical_001", 0.5f),
		new SpecialDefaultValue("addDelay", "spinning_ice_log_spike_vertical_001", 0.5f),
		new SpecialDefaultValue("TileSizeX_", "sewer_platform_moving_001", 3),
		new SpecialDefaultValue("TileSizeY_", "sewer_platform_moving_001", 3),
		new SpecialDefaultValue("mS", "sewer_platform_moving_001", 3f),
		new SpecialDefaultValue("addDelay", "sewer_platform_moving_001", 1f),
		new SpecialDefaultValue("TileSizeX_", "gungeon_platform_moving_001", 3),
		new SpecialDefaultValue("TileSizeY_", "gungeon_platform_moving_001", 3),
		new SpecialDefaultValue("mS", "gungeon_platform_moving_001", 3f),
		new SpecialDefaultValue("addDelay", "gungeon_platform_moving_001", 1f),
		new SpecialDefaultValue("TileSizeX_", "mines_platform_moving_001", 3),
		new SpecialDefaultValue("TileSizeY_", "mines_platform_moving_001", 3),
		new SpecialDefaultValue("mS", "mines_platform_moving_001", 3f),
		new SpecialDefaultValue("addDelay", "mines_platform_moving_001", 1f),
		new SpecialDefaultValue("TileSizeX_", "catacombs_platform_moving_001", 3),
		new SpecialDefaultValue("TileSizeY_", "catacombs_platform_moving_001", 3),
		new SpecialDefaultValue("mS", "catacombs_platform_moving_001", 3f),
		new SpecialDefaultValue("addDelay", "catacombs_platform_moving_001", 1f),
		new SpecialDefaultValue("TileSizeX_", "forge_platform_moving_001", 3),
		new SpecialDefaultValue("TileSizeY_", "forge_platform_moving_001", 3),
		new SpecialDefaultValue("mS", "forge_platform_moving_001", 3f),
		new SpecialDefaultValue("addDelay", "forge_platform_moving_001", 1f),
		new SpecialDefaultValue("cartActive", "minecart_spawner", true),
		new SpecialDefaultValue("trapProjSpeed", "minecartturret", -1f),
		new SpecialDefaultValue("TrapTriggerDelay", "horizontal_crusher", 3f),
		new SpecialDefaultValue("TrapTriggerDelay", "vertical_crusher", 3f)
	};

	public static bool TryGetListing(string name, out List<AC> listing)
	{
		listing = new List<AC>();
		foreach (KeyValuePair<ValidAttribute, string[]> attributeListing in attributeListings)
		{
			if (attributeListing.Key(name))
			{
				string[] value = attributeListing.Value;
				foreach (string key in value)
				{
					listing.Add(allAttributes[key]);
				}
				return true;
			}
		}
		return false;
	}

	public static object TryGetSpecialDefaults(string name, string longName)
	{
		foreach (SpecialDefaultValue specialDefaultValueListing in specialDefaultValueListings)
		{
			if (specialDefaultValueListing.MatchingValue(longName, name))
			{
				return specialDefaultValueListing.SpecialDefault;
			}
		}
		return null;
	}

	public static string LongToShortName(string longName)
	{
		return allAttributes.Where(delegate(KeyValuePair<string, AC> kvp)
		{
			KeyValuePair<string, AC> keyValuePair = kvp;
			return keyValuePair.Value.longName == longName;
		}).First().Key;
	}

	public static JObject ToLongNamed(JObject jObject)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0006: Expected O, but got Unknown
		JObject val = new JObject();
		foreach (KeyValuePair<string, JToken> item in jObject)
		{
			val.Add(allAttributes[item.Key].longName, item.Value);
		}
		return val;
	}

	public static JObject ToShortNamed(JObject jObject)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0006: Expected O, but got Unknown
		JObject val = new JObject();
		foreach (KeyValuePair<string, JToken> item in jObject)
		{
			val.Add(LongToShortName(item.Key), item.Value);
		}
		return val;
	}
}
public abstract class AttributeItem : MonoBehaviour
{
	public Text text;

	public string propertyName;

	public abstract object Value { get; set; }

	public void ValueChanged()
	{
		Tile selectedTile = InputHandler.Instance.selectedTile;
		DataTile dataTile;
		if (!Object.op_Implicit((Object)(object)selectedTile) || !((Object)(object)(dataTile = selectedTile as DataTile) != (Object)null))
		{
			return;
		}
		string s = ((object)JToken.FromObject((object)dataTile.data[propertyName])).ToString();
		if (propertyName == "Start At Node:")
		{
			JToken val = dataTile.data["assignedPath"];
			if (val == null)
			{
				return;
			}
			NodeMap map = NodePathLayerHandler.Instance.GetMap(int.Parse(((object)JToken.FromObject((object)val)).ToString()));
			if (Object.op_Implicit((Object)(object)map))
			{
				Debug.LogError((object)(map.fuckYou.Count - 1));
				Debug.LogError((object)("b: " + Value.ToString()));
				if (map.fuckYou.Count - 1 < int.Parse(Value.ToString()))
				{
					dataTile.data[propertyName] = JToken.op_Implicit((int)JToken.FromObject((object)(map.fuckYou.Count - 1)));
					NotificationHandler.Instance.Notify("Value was Out Of Bounds, reverting back to: " + (map.fuckYou.Count - 1));
				}
				else if (int.Parse(Value.ToString()) < 0)
				{
					dataTile.data[propertyName] = JToken.op_Implicit((int)JToken.FromObject((object)0));
					NotificationHandler.Instance.Notify("Value was Out Of Bounds, reverting back to: 0");
				}
				else
				{
					dataTile.data[propertyName] = JToken.op_Implicit((int)JToken.FromObject(Value));
				}
			}
		}
		else if (dataTile.isNode && propertyName == "Node Order")
		{
			int index = int.Parse(s);
			int num = int.Parse(((object)JToken.FromObject(Value)).ToString());
			for (int i = 0; i < NodePathLayerHandler.Instance.LayerCount; i++)
			{
				NodeMap map2 = NodePathLayerHandler.Instance.GetMap(i);
				if (!map2.fuckYou.Contains(dataTile))
				{
					continue;
				}
				for (int num2 = map2.fuckYou.Count - 1; num2 > -1; num2--)
				{
					DataTile dataTile2 = map2.fuckYou[num2];
					if (dataTile2.PositionInNodeMap(map2) == num)
					{
						DataTile value = map2.fuckYou[num];
						map2.fuckYou[num] = map2.fuckYou[index];
						map2.fuckYou[index] = value;
						dataTile2.data[propertyName] = JToken.FromObject((object)index.ToString());
						map2.UpdateAtrributeList();
						InputHandler.Instance.UpdateNodeLines();
					}
				}
			}
		}
		else if (propertyName == "Node Type" && dataTile.isNode)
		{
			dataTile.data[propertyName] = JToken.FromObject(Value);
			((Object)dataTile).name = ((object)JToken.FromObject(Value)).ToString();
			for (int j = 0; j < NodePathLayerHandler.Instance.LayerCount; j++)
			{
				NodePathLayerHandler.Instance.GetMap(j).spriteSwitch.TryGetValue(Value.ToString(), out var value2);
				Debug.Log((object)((object)JToken.FromObject(Value)).ToString());
				if (Object.op_Implicit((Object)(object)value2))
				{
					((Tile)dataTile).sprite = value2;
					Tilemap[] array = Object.FindObjectsOfType<Tilemap>();
					for (int k = 0; k < array.Length; k++)
					{
						array[k].RefreshAllTiles();
					}
					break;
				}
			}
		}
		else
		{
			dataTile.data[propertyName] = JToken.FromObject(Value);
		}
	}
}
public class AttributeListing
{
	public string tileName;

	public AC[] attributes;

	public AttributeListing(string _tileName, params AC[] _attributes)
	{
		tileName = _tileName;
		attributes = _attributes;
	}
}
public class AttributesHandler : MonoBehaviour
{
	public GameObject boolAttributePrefab;

	public GameObject stringAttributePrefab;

	public GameObject intAttributePrefab;

	public GameObject floatAttributePrefab;

	public GameObject floatBarAttributePrefab;

	public GameObject dropdownStringAttributePrefab;

	public GameObject nothingSelectedPrefab;

	public Text propertiesText;

	public RectTransform content;

	public List<AttributeItem> attributes;

	public float margin = 5f;

	private Scrollbar m_scrollbar;

	private float totalHeight = 60f;

	private GameObject nothingSelectObject;

	public bool Populated { get; set; }

	public void Show()
	{
		Repopulate();
	}

	public void Hide()
	{
		ClearAllAttributes();
		Populated = false;
	}

	public void ClearAllAttributes()
	{
		foreach (AttributeItem attribute in attributes)
		{
			Object.Destroy((Object)(object)((Component)attribute).gameObject);
		}
		attributes.Clear();
	}

	private void Awake()
	{
		content = ((Component)((Component)this).transform.Find("Viewport").Find("Content")).GetComponent<RectTransform>();
		attributes = new List<AttributeItem>();
		m_scrollbar = ((Component)this).GetComponentInChildren<Scrollbar>();
	}

	private void Start()
	{
		Repopulate();
	}

	public void Populate()
	{
		//IL_0160: Unknown result type (might be due to invalid IL or missing references)
		//IL_011d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0122: Unknown result type (might be due to invalid IL or missing references)
		DataTile dataTile;
		if (Populated || !Object.op_Implicit((Object)(object)InputHandler.Instance.selectedTile) || (Object)(object)(dataTile = InputHandler.Instance.selectedTile as DataTile) == (Object)null)
		{
			return;
		}
		if (Object.op_Implicit((Object)(object)nothingSelectObject))
		{
			Object.Destroy((Object)(object)nothingSelectObject);
			nothingSelectObject = null;
		}
		propertiesText.text = new CultureInfo("en-US", useUserOverride: false).TextInfo.ToTitleCase(((Object)dataTile).name.Replace('_', ' ')) + " Properties";
		ClearAllAttributes();
		foreach (KeyValuePair<string, JToken> datum in dataTile.data)
		{
			AddTileAttribute(datum.Key, datum.Value);
		}
		if (attributes.Count == 0 && !dataTile.isNode)
		{
			RectTransform component = Object.Instantiate<GameObject>(nothingSelectedPrefab, ((Component)content).transform).GetComponent<RectTransform>();
			((Transform)component).localPosition = Vector2.op_Implicit(new Vector2(11f, 0f - totalHeight));
			((Component)component).GetComponent<Text>().text = "\nSelected object has no properties.";
			nothingSelectObject = ((Component)component).gameObject;
		}
		content.sizeDelta = new Vector2(530f, totalHeight + margin);
		Populated = true;
	}

	public void Repopulate()
	{
		//IL_007a: Unknown result type (might be due to invalid IL or missing references)
		//IL_007f: Unknown result type (might be due to invalid IL or missing references)
		Populated = false;
		ClearAllAttributes();
		propertiesText.text = "Properties";
		totalHeight = 60f;
		Populate();
		if (!Populated)
		{
			if (Object.op_Implicit((Object)(object)nothingSelectObject))
			{
				Object.Destroy((Object)(object)nothingSelectObject);
			}
			RectTransform component = Object.Instantiate<GameObject>(nothingSelectedPrefab, ((Component)content).transform).GetComponent<RectTransform>();
			((Transform)component).localPosition = Vector2.op_Implicit(new Vector2(11f, 0f - totalHeight));
			nothingSelectObject = ((Component)component).gameObject;
		}
	}

	public void AddTileAttribute(string attributeName, JToken attribute)
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		//IL_0021: Unknown result type (might be due to invalid IL or missing references)
		//IL_0023: Unknown result type (might be due to invalid IL or missing references)
		//IL_0039: Expected I4, but got Unknown
		Debug.LogError((object)("Att Type: " + attribute.Type));
		JTokenType type = attribute.Type;
		GameObject val;
		switch (type - 6)
		{
		default:
			return;
		case 0:
			val = intAttributePrefab;
			break;
		case 1:
			val = ((!(attributeName == "Start At Node:")) ? ((AttributeDatabase.allAttributes[AttributeDatabase.LongToShortName(attributeName)].possibleValues.Length == 2) ? floatBarAttributePrefab : floatAttributePrefab) : intAttributePrefab);
			break;
		case 2:
			val = ((AttributeDatabase.allAttributes[AttributeDatabase.LongToShortName(attributeName)].possibleValues.Length != 0) ? dropdownStringAttributePrefab : stringAttributePrefab);
			break;
		case 3:
			val = boolAttributePrefab;
			break;
		}
		AttributeItem component = Object.Instantiate<GameObject>(val, ((Component)content).transform).GetComponent<AttributeItem>();
		component.propertyName = attributeName;
		component.text.text = attributeName.SplitCamelCase().UppercaseFirst();
		component.Value = attribute.ToObject<object>();
		attributes.Add(component);
		PositionAttribute(attributes.Count - 1);
	}

	public void AddTileAttribute(string attributeName, DataTile tile)
	{
		AttributeItem component = Object.Instantiate<GameObject>(intAttributePrefab, ((Component)content).transform).GetComponent<AttributeItem>();
		component.propertyName = attributeName;
		component.text.text = attributeName.SplitCamelCase().UppercaseFirst();
		component.Value = tile.TryGetPositionInNodeMap();
		attributes.Add(component);
		PositionAttribute(attributes.Count - 1);
	}

	public void PositionAttribute(int index)
	{
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_002c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0031: Unknown result type (might be due to invalid IL or missing references)
		RectTransform component = ((Component)attributes[index]).GetComponent<RectTransform>();
		Rect rect = component.rect;
		float height = ((Rect)(ref rect)).height;
		((Transform)component).localPosition = Vector2.op_Implicit(new Vector2(11f, 0f - totalHeight));
		totalHeight += height + margin;
	}
}
public class BooleanAttributeItem : AttributeItem
{
	public Toggle toggle;

	public override object Value
	{
		get
		{
			return toggle.isOn;
		}
		set
		{
			toggle.isOn = bool.Parse(value.ToString());
		}
	}
}
public class BrushButton : MonoBehaviour
{
	public enum BrushType
	{
		PENCIL,
		BRUSH,
		ERASER,
		BUCKET,
		LINE,
		RECTANGLE,
		ELLIPSE,
		SELECT,
		COPY
	}

	public List<TilemapHandler.MapType> disabledOnMapType = new List<TilemapHandler.MapType>();

	public BrushType type;

	public List<Sprite> sprites = new List<Sprite>(1);

	private int currentMode;

	public void Awake()
	{
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Expected O, but got Unknown
		((Graphic)((Component)this).GetComponent<Image>()).material = new Material(((Graphic)((Component)this).GetComponent<Image>()).material);
		currentMode = 0;
	}

	public void OnClick()
	{
		if (!disabledOnMapType.Contains(InputHandler.Instance.activeTilemap))
		{
			if (InputHandler.Instance.BrushType == type)
			{
				currentMode = (currentMode + 1) % sprites.Count;
			}
			InputHandler.Instance.brushMode = currentMode;
			InputHandler.Instance.BrushType = type;
			UpdateAppearances();
		}
	}

	public static void UpdateAppearances()
	{
		//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00af: Unknown result type (might be due to invalid IL or missing references)
		BrushButton[] array = Object.FindObjectsOfType<BrushButton>();
		foreach (BrushButton brushButton in array)
		{
			((Component)brushButton).GetComponent<Image>().overrideSprite = brushButton.sprites[brushButton.currentMode];
			((Graphic)((Component)brushButton).GetComponent<Image>()).material.SetFloat("_InvertColors", (float)((brushButton.type == InputHandler.Instance.BrushType) ? 1 : 0));
			if (brushButton.type == BrushType.SELECT && brushButton.type != InputHandler.Instance.BrushType)
			{
				InputHandler.Instance.DeselectTile();
			}
			if (brushButton.disabledOnMapType.Contains(InputHandler.Instance.activeTilemap))
			{
				((Graphic)((Component)brushButton).GetComponent<Image>()).color = new Color(1f, 1f, 1f, 0.1f);
			}
			else
			{
				((Graphic)((Component)brushButton).GetComponent<Image>()).color = new Color(1f, 1f, 1f, 1f);
			}
		}
	}
}
public class BrushSizeButton : MonoBehaviour
{
	public enum ChangeType
	{
		ADD,
		SUBTRACT
	}

	public List<TilemapHandler.MapType> disabledOnMapType = new List<TilemapHandler.MapType>();

	[SerializeField]
	public Text textBox;

	public ChangeType type;

	public void Awake()
	{
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Expected O, but got Unknown
		((Graphic)((Component)this).GetComponent<Image>()).material = new Material(((Graphic)((Component)this).GetComponent<Image>()).material);
	}

	public void OnClick()
	{
		if (disabledOnMapType.Contains(InputHandler.Instance.activeTilemap))
		{
			return;
		}
		if (type == ChangeType.ADD)
		{
			if (InputHandler.Instance.brushSize < 10)
			{
				InputHandler.Instance.brushSize++;
			}
		}
		else if (type == ChangeType.SUBTRACT && InputHandler.Instance.brushSize > 1)
		{
			InputHandler.Instance.brushSize--;
		}
		textBox.text = "Brush Size: " + InputHandler.Instance.brushSize;
		UpdateAppearances();
	}

	public static void UpdateAppearances()
	{
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0082: Unknown result type (might be due to invalid IL or missing references)
		BrushSizeButton[] array = Object.FindObjectsOfType<BrushSizeButton>();
		foreach (BrushSizeButton brushSizeButton in array)
		{
			if (brushSizeButton.disabledOnMapType.Contains(InputHandler.Instance.activeTilemap))
			{
				((Graphic)((Component)brushSizeButton).GetComponent<Image>()).color = new Color(1f, 1f, 1f, 0.1f);
			}
			else if (InputHandler.Instance.brushSize == ((brushSizeButton.type == ChangeType.SUBTRACT) ? 1 : 10))
			{
				((Graphic)((Component)brushSizeButton).GetComponent<Image>()).color = new Color(1f, 1f, 1f, 0.1f);
			}
			else
			{
				((Graphic)((Component)brushSizeButton).GetComponent<Image>()).color = new Color(1f, 1f, 1f, 1f);
			}
		}
	}
}
public class CanvasHandler : MonoBehaviour
{
	public static CanvasHandler Instance;

	private void Start()
	{
		Instance = this;
	}

	public void Trim()
	{
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0056: Unknown result type (might be due to invalid IL or missing references)
		//IL_005b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0069: Unknown result type (might be due to invalid IL or missing references)
		//IL_006e: Unknown result type (might be due to invalid IL or missing references)
		//IL_007d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0082: Unknown result type (might be due to invalid IL or missing references)
		//IL_008d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0092: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
		//IL_01da: Unknown result type (might be due to invalid IL or missing references)
		//IL_01fc: Unknown result type (might be due to invalid IL or missing references)
		//IL_0115: Unknown result type (might be due to invalid IL or missing references)
		//IL_018d: Unknown result type (might be due to invalid IL or missing references)
		Tilemap map = Manager.Instance.GetTilemap(TilemapHandler.MapType.Environment).map;
		BoundsInt cellBounds = map.cellBounds;
		BoundsInt trimmedBounds = GetTrimmedBounds(map);
		Debug.Log((object)trimmedBounds);
		((BoundsInt)(ref cellBounds)).x = ((BoundsInt)(ref cellBounds)).x - ((BoundsInt)(ref trimmedBounds)).x;
		((BoundsInt)(ref cellBounds)).y = ((BoundsInt)(ref cellBounds)).y - ((BoundsInt)(ref trimmedBounds)).y;
		Vector3Int size = ((BoundsInt)(ref trimmedBounds)).size;
		int num = -((Vector3Int)(ref size)).x / 2;
		size = ((BoundsInt)(ref trimmedBounds)).size;
		int num2 = -((Vector3Int)(ref size)).y / 2;
		size = ((BoundsInt)(ref trimmedBounds)).size;
		int x = ((Vector3Int)(ref size)).x;
		size = ((BoundsInt)(ref trimmedBounds)).size;
		BoundsInt val = default(BoundsInt);
		((BoundsInt)(ref val))..ctor(num, num2, 0, x, ((Vector3Int)(ref size)).y, 1);
		size = ((BoundsInt)(ref val)).size;
		((Vector2Int)(ref Manager.roomSize)).x = ((Vector3Int)(ref size)).x;
		size = ((BoundsInt)(ref val)).size;
		((Vector2Int)(ref Manager.roomSize)).y = ((Vector3Int)(ref size)).y;
		TilemapHandler.Bounds = val;
		TilemapHandler[] array = Object.FindObjectsOfType<TilemapHandler>();
		foreach (TilemapHandler tilemapHandler in array)
		{
			if (tilemapHandler is NodeMap nodeMap)
			{
				int count = nodeMap.fuckYou.Count;
				TileBase[] tilesBlock = nodeMap.map.GetTilesBlock(trimmedBounds);
				Dictionary<int, DataTile> dictionary = new Dictionary<int, DataTile>();
				TileBase[] array2 = tilesBlock;
				foreach (TileBase val2 in array2)
				{
					if (val2 is DataTile)
					{
						dictionary.Add((val2 as DataTile).PositionInNodeMap(nodeMap), val2 as DataTile);
					}
				}
				tilemapHandler.map.ClearAllTiles();
				nodeMap.fuckYou.Clear();
				tilemapHandler.ResizeBounds();
				tilemapHandler.map.SetTilesBlock(val, tilesBlock);
				for (int k = 0; k < count; k++)
				{
					dictionary.TryGetValue(k, out var value);
					if ((Object)(object)value != (Object)null)
					{
						nodeMap.fuckYou.Add(value);
					}
				}
				nodeMap.UpdateAtrributeList();
			}
			else
			{
				TileBase[] tilesBlock2 = tilemapHandler.map.GetTilesBlock(trimmedBounds);
				tilemapHandler.map.ClearAllTiles();
				tilemapHandler.ResizeBounds();
				tilemapHandler.map.SetTilesBlock(val, tilesBlock2);
			}
		}
		GridMap gridMap = Object.FindObjectOfType<GridMap>();
		if ((Object)(object)gridMap != (Object)null)
		{
			gridMap.ResetAppearance();
		}
		InputHandler.Instance.ClearUndoRedo();
		BoarderHandler.Instance.ResetAppearance();
	}

	public void Resize(int t, int b, int r, int l)
	{
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: 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_0032: 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)
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0051: 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_0064: Unknown result type (might be due to invalid IL or missing references)
		//IL_0071: Unknown result type (might be due to invalid IL or missing references)
		//IL_0076: Unknown result type (might be due to invalid IL or missing references)
		//IL_0084: Unknown result type (might be due to invalid IL or missing references)
		//IL_0089: Unknown result type (might be due to invalid IL or missing references)
		//IL_0093: Unknown result type (might be due to invalid IL or missing references)
		//IL_0098: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
		//IL_01dd: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ff: Unknown result type (might be due to invalid IL or missing references)
		//IL_0118: Unknown result type (might be due to invalid IL or missing references)
		//IL_0190: Unknown result type (might be due to invalid IL or missing references)
		BoundsInt cellBounds = Manager.Instance.GetTilemap(TilemapHandler.MapType.Environment).map.cellBounds;
		Debug.Log((object)cellBounds);
		((BoundsInt)(ref cellBounds)).position = ((BoundsInt)(ref cellBounds)).position - new Vector3Int(l, b, 0);
		((BoundsInt)(ref cellBounds)).max = ((BoundsInt)(ref cellBounds)).max + new Vector3Int(r + l, t + b, 0);
		Vector3Int size = ((BoundsInt)(ref cellBounds)).size;
		int num = -((Vector3Int)(ref size)).x / 2;
		size = ((BoundsInt)(ref cellBounds)).size;
		int num2 = -((Vector3Int)(ref size)).y / 2;
		size = ((BoundsInt)(ref cellBounds)).size;
		int x = ((Vector3Int)(ref size)).x;
		size = ((BoundsInt)(ref cellBounds)).size;
		BoundsInt val = default(BoundsInt);
		((BoundsInt)(ref val))..ctor(num, num2, 0, x, ((Vector3Int)(ref size)).y, 1);
		size = ((BoundsInt)(ref val)).size;
		((Vector2Int)(ref Manager.roomSize)).x = ((Vector3Int)(ref size)).x;
		size = ((BoundsInt)(ref val)).size;
		((Vector2Int)(ref Manager.roomSize)).y = ((Vector3Int)(ref size)).y;
		TilemapHandler.Bounds = val;
		TilemapHandler[] array = Object.FindObjectsOfType<TilemapHandler>();
		foreach (TilemapHandler tilemapHandler in array)
		{
			if (tilemapHandler is NodeMap nodeMap)
			{
				int count = nodeMap.fuckYou.Count;
				TileBase[] tilesBlock = nodeMap.map.GetTilesBlock(cellBounds);
				Dictionary<int, DataTile> dictionary = new Dictionary<int, DataTile>();
				TileBase[] array2 = tilesBlock;
				foreach (TileBase val2 in array2)
				{
					if (val2 is DataTile)
					{
						dictionary.Add((val2 as DataTile).PositionInNodeMap(nodeMap), val2 as DataTile);
					}
				}
				tilemapHandler.map.ClearAllTiles();
				nodeMap.fuckYou.Clear();
				tilemapHandler.ResizeBounds();
				tilemapHandler.map.SetTilesBlock(val, tilesBlock);
				for (int k = 0; k < count; k++)
				{
					dictionary.TryGetValue(k, out var value);
					if ((Object)(object)value != (Object)null)
					{
						nodeMap.fuckYou.Add(value);
					}
				}
				nodeMap.UpdateAtrributeList();
			}
			else
			{
				TileBase[] tilesBlock2 = tilemapHandler.map.GetTilesBlock(cellBounds);
				tilemapHandler.map.ClearAllTiles();
				tilemapHandler.ResizeBounds();
				tilemapHandler.map.SetTilesBlock(val, tilesBlock2);
			}
		}
		GridMap gridMap = Object.FindObjectOfType<GridMap>();
		if ((Object)(object)gridMap != (Object)null)
		{
			gridMap.ResetAppearance();
		}
		InputHandler.Instance.ClearUndoRedo();
		BoarderHandler.Instance.ResetAppearance();
	}

	public Vector3Int? GetCellInWorld(TileBase myTile, TilemapHandler tilemap, BoundsInt bounds)
	{
		//IL_0032: Unknown result type (might be due to invalid IL or missing references)
		Tile[,] array = tilemap.AllTiles();
		for (int i = 0; i < array.GetLength(0); i++)
		{
			for (int j = 0; j < array.GetLength(1); j++)
			{
				if (!((Object)(object)array[i, j] == (Object)null) && (Object)(object)array[i, j] == (Object)(object)myTile)
				{
					return new Vector3Int(i, j, 0);
				}
			}
		}
		return null;
	}

	public static BoundsInt GetTrimmedBounds(Tilemap map)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		map.CompressBounds();
		BoundsInt cellBounds = map.cellBounds;
		map.ResizeBounds();
		return cellBounds;
	}
}
public class CategoryDropdownOption : MonoBehaviour
{
	public Enums.CategoryType categoryType;

	public Enums.RoomCategory category;

	public Enums.RoomNormalSubCategory normalSubCategory;

	public Enums.RoomBossSubCategory bossSubCategory;

	public Enums.RoomSpecialSubCategory specialSubCategory;

	public Enums.SuperSpecialRooms superSpecialRooms;
}
public class ChamberButton : ToggleButton
{
	public Enums.ValidTilesets tileset;
}
public class DataTile : Tile
{
	public JObject data = new JObject();

	public bool isNode;

	public Vector2 position;

	public GameObject controllerDummy;

	public int StoreOrder = -1;

	public int SavedPosition = -1;

	public Vector3Int worldIntPosition;

	public int PositionInTileMap;

	public Vector3Int positionFromZeroZero;

	public override bool StartUp(Vector3Int position, ITilemap tilemap, GameObject go)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		worldIntPosition = position;
		return ((TileBase)this).StartUp(position, tilemap, go);
	}

	public override void RefreshTile(Vector3Int position, ITilemap tilemap)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		worldIntPosition = position;
		((TileBase)this).RefreshTile(position, tilemap);
	}

	public void SavePositionInList(NodeMap map)
	{
		SavedPosition = PositionInNodeMap(map);
	}

	public void ReleasePosition()
	{
		SavedPosition = -1;
	}

	public int TryGetPositionInNodeMap()
	{
		TilemapHandler[] array = Object.FindObjectsOfType<TilemapHandler>();
		for (int i = 0; i < array.Length; i++)
		{
			if (array[i] is NodeMap nodeMap && nodeMap.fuckYou.Contains(this))
			{
				return nodeMap.fuckYou.FindIndex((DataTile map1) => (Object)(object)map1 == (Object)(object)this);
			}
		}
		return -1;
	}

	public int PositionInNodeMap(NodeMap map)
	{
		return map.fuckYou.FindIndex((DataTile map2) => (Object)(object)map2 == (Object)(object)this);
	}
}
public class DropdownContentButton : MonoBehaviour
{
	public bool hideParentOnClick = true;

	public virtual void OnClick()
	{
		if (hideParentOnClick)
		{
			((Component)((Component)this).transform.parent).gameObject.SetActive(false);
		}
	}
}
public class DropdownStringAttributeItem : AttributeItem
{
	public Dropdown dropdown;

	public override object Value
	{
		get
		{
			return dropdown.options[dropdown.value].text;
		}
		set
		{
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Expected O, but got Unknown
			AC aC = AttributeDatabase.allAttributes[AttributeDatabase.LongToShortName(propertyName)];
			dropdown.options.Clear();
			object[] possibleValues = aC.possibleValues;
			foreach (object obj in possibleValues)
			{
				dropdown.options.Add(new OptionData(obj.ToString()));
			}
			string val = aC.defaultValue.ToString();
			if (aC.possibleValues.Contains(value))
			{
				val = value.ToString();
			}
			dropdown.value = dropdown.options.FindIndex((OptionData od) => od.text == val);
		}
	}
}
public class EnemyDatabase : TileDatabase
{
	public override Dictionary<string, Dictionary<string, string>> SubEntries { get; set; } = new Dictionary<string, Dictionary<string, string>>();


	public override Dictionary<string, string> Entries { get; set; } = new Dictionary<string, string>
	{
		{
			"Bullet Kin",
			Manager.paletteDividerGuid
		},
		{ "bullet_kin", "01972dee89fc4404a5c408d50007dad5" },
		{ "ak47_bullet_kin", "db35531e66ce41cbb81d507a34366dfe" },
		{ "bandana_bullet_kin", "88b6b6a93d4b4234a67844ef4728382c" },
		{ "veteran_bullet_kin", "70216cae6c1346309d86d4a0b4603045" },
		{ "treadnaughts_bullet_kin", "df7fb62405dc4697b7721862c7b6b3cd" },
		{ "minelet", "3cadf10c489b461f9fb8814abc1a09c1" },
		{ "cardinal", "8bb5578fba374e8aae8e10b754e61d62" },
		{ "shroomer", "e5cffcfabfae489da61062ea20539887" },
		{ "ashen_bullet_kin", "1a78cfb776f54641b832e92c44021cf2" },
		{ "mutant_bullet_kin", "d4a9836f8ab14f3fadd0f597438b1f1f" },
		{ "fallen_bullet_kin", "5f3abc2d561b4b9c9e72b879c6f10c7e" },
		{ "hooded_bullet", "844657ad68894a4facb1b8e1aef1abf9" },
		{ "red_caped_bullet_kin", "fa6a7ac20a0e4083a4c2ee0d86f8bbf7" },
		{ "office_bullet_kin", "906d71ccc1934c02a6f4ff2e9c07c9ec" },
		{ "office_bullette_kin", "9eba44a0ea6c4ea386ff02286dd0e6bd" },
		{ "brollet", "05cb719e0178478685dc610f8b3e8bfc" },
		{ "western_bullet_kin", "5861e5a077244905a8c25c2b7b4d6ebb" },
		{ "pirate_bullet_kin", "6f818f482a5c47fd8f38cce101f6566c" },
		{ "armored_bullet_kin", "39e6f47a16ab4c86bec4b12984aece4c" },
		{ "key_bullet_kin", "699cd24270af4cd183d671090d8323a1" },
		{ "chance_bullet_kin", "a446c626b56d4166915a4e29869737fd" },
		{ "tutorial_bullet_kin", "b08ec82bef6940328c7ecd9ffc6bd16c" },
		{
			"Undead Bullet Kin",
			Manager.paletteDividerGuid
		},
		{ "hollowpoint", "4db03291a12144d69fe940d5a01de376" },
		{ "spectre", "56f5a0f2c1fc4bc78875aea617ee31ac" },
		{ "skullet", "336190e29e8a4f75ab7486595b700d4a" },
		{ "skullmet", "95ec774b5a75467a9ab05fa230c0c143" },
		{ "gummy", "5288e86d20184fa69c91ceb642d31474" },
		{ "spent", "249db525a9464e5282d02162c88e0357" },
		{ "gummy_spent", "e21ac9492110493baef6df02a2682a0d" },
		{
			"Shotgun Kin",
			Manager.paletteDividerGuid
		},
		{ "red_shotgun_kin", "128db2f0781141bcb505d8f00f9e4d47" },
		{ "blue_shotgun_kin", "b54d89f9e802455cbb2b8a96a31e8259" },
		{ "veteran_shotgun_kin", "2752019b770f473193b08b4005dc781f" },
		{ "mutant_shotgun_kin", "7f665bd7151347e298e4d366f8818284" },
		{ "executioner", "b1770e0f1c744d9d887cc16122882b4f" },
		{ "ashen_shotgun_kin", "1bd8e49f93614e76b140077ff2e33f2b" },
		{ "shotgrub", "044a9f39712f456597b9762893fbc19c" },
		{ "creech", "37340393f97f41b2822bc02d14654172" },
		{ "western_shotgun_kin", "ddf12a4881eb43cfba04f36dd6377abb" },
		{ "pirate_shotgun_kin", "86dfc13486ee4f559189de53cfb84107" },
		{
			"Blobulonians",
			Manager.paletteDividerGuid
		},
		{ "blobulon", "0239c0680f9f467dbe5c4aab7dd1eca6" },
		{ "blobuloid", "042edb1dfb614dc385d5ad1b010f2ee3" },
		{ "blobulin", "42be66373a3d4d89b91a35c9ff8adfec" },
		{ "poisbulon", "e61cab252cfb435db9172adc96ded75f" },
		{ "poisbuloid", "fe3fe59d867347839824d5d9ae87f244" },
		{ "poisbulin", "b8103805af174924b578c98e95313074" },
		{ "blizzbulon", "022d7c822bc146b58fe3b0287568aaa2" },
		{ "leadbulon", "ccf6d241dad64d989cbcaca2a8477f01" },
		{ "bloodbulon", "062b9b64371e46e195de17b6f10e47c8" },
		{ "poopulon", "116d09c26e624bca8cca09fc69c714b3" },
		{ "cubulon", "864ea5a6a9324efc95a0dd2407f42810" },
		{ "cubulead", "0b547ac6b6fc4d68876a241a88f5ca6a" },
		{ "chancebulon", "1bc2a07ef87741be90c37096910843ab" },
		{
			"Skeletons",
			Manager.paletteDividerGuid
		},
		{ "skusket", "af84951206324e349e1f13f9b7b60c1a" },
		{ "black_skusket", "1cec0cdf383e42b19920787798353e46" },
		{ "skusket_head", "c2f902b7cbe745efb3db4399927eab34" },
		{ "shelleton", "21dd14e5ca2a4a388adab5b11b69a1e1" },
		{ "revolvenant", "d5a7b95774cd41f080e517bea07bf495" },
		{ "gunreaper", "88f037c3f93b4362a040a87b30770407" },
		{ "lord_of_the_jammed", "0d3f7c641557426fbac8596b61c9fb45" },
		{
			"Bullats",
			Manager.paletteDividerGuid
		},
		{ "bullat", "2feb50a6a40f4f50982e89fd276f6f15" },
		{ "shotgat", "2d4f8b5404614e7d8b235006acde427a" },
		{ "grenat", "b4666cb6ef4f4b038ba8924fd8adf38f" },
		{ "spirat", "7ec3e8146f634c559a7d58b19191cd43" },
		{ "king_bullat", "1a4872dafdb34fd29fe8ac90bd2cea67" },
		{ "gargoyle", "981d358ffc69419bac918ca1bdf0c7f7" },
		{
			"Gunjurers",
			Manager.paletteDividerGuid
		},
		{ "apprentice_gunjurer", "206405acad4d4c33aac6717d184dc8d4" },
		{ "gunjurer", "c4fba8def15e47b297865b18e36cbef8" },
		{ "high_gunjurer", "9b2cf2949a894599917d4d391a0b7394" },
		{ "lore_gunjurer", "56fb939a434140308b8f257f0f447829" },
		{
			"Bookllets",
			Manager.paletteDividerGuid
		},
		{ "bookllet", "c0ff3744760c4a2eb0bb52ac162056e6" },
		{ "blue_bookllet", "6f22935656c54ccfb89fca30ad663a64" },
		{ "green_bookllet", "a400523e535f41ac80a43ff6b06dc0bf" },
		{ "necronomicon", "216fd3dfb9da439d9bd7ba53e1c76462" },
		{ "tablet_bookllett", "78e0951b097b46d89356f004dda27c42" },
		{
			"Sliding Cubes",
			Manager.paletteDividerGuid
		},
		{ "mountain_cube", "f155fd2759764f4a9217db29dd21b7eb" },
		{ "lead_cube", "33b212b856b74ff09252bf4f2e8b8c57" },
		{ "flesh_cube", "3f2026dc3712490289c4658a2ba4a24b" },
		{ "metal_cube_guy", "ba928393c8ed47819c2c5f593100a5bc" },
		{
			"Mimics",
			Manager.paletteDividerGuid
		},
		{ "brown_chest_mimic", "2ebf8ef6728648089babb507dec4edb7" },
		{ "blue_chest_mimic", "d8d651e3484f471ba8a2daa4bf535ce6" },
		{ "green_chest_mimic", "abfb454340294a0992f4173d6e5898a8" },
		{ "red_chest_mimic", "d8fd592b184b4ac9a3be217bc70912a2" },
		{ "black_chest_mimic", "6450d20137994881aff0ddd13e3d40c8" },
		{ "rat_chest_mimic", "ac9d345575444c9a8d11b799e8719be0" },
		{ "pedestal_mimic", "796a7ed4ad804984859088fc91672c7f" },
		{ "wall_mimic", "479556d05c7c44f3b6abb3b2067fc778" },
		{
			"Gun Nuts",
			Manager.paletteDividerGuid
		},
		{ "gun_nut", "ec8ea75b557d4e7b8ceeaacdf6f8238c" },
		{ "chain_gunner", "463d16121f884984abe759de38418e48" },
		{ "spectral_gun_nut", "383175a55879441d90933b5c4e60cf6f" },
		{
			"Dets",
			Manager.paletteDividerGuid
		},
		{ "det", "ac986dabc5a24adab11d48a4bccf4cb1" },
		{ "x_det", "48d74b9c65f44b888a94f9e093554977" },
		{ "diagonal_x_det", "c5a0fd2774b64287bf11127ca59dd8b4" },
		{ "vertical_det", "b67ffe82c66742d1985e5888fd8e6a03" },
		{ "diagonal_det", "d9632631a18849539333a92332895ebd" },
		{ "horizontal_det", "1898f6fe1ee0408e886aaf05c23cc216" },
		{ "vertical_x_det", "abd816b0bcbf4035b95837ca931169df" },
		{ "horizontal_x_det", "07d06d2b23cc48fe9f95454c839cb361" },
		{
			"Support Enemies",
			Manager.paletteDividerGuid
		},
		{ "gunsinger", "cf2b7021eac44e3f95af07db9a7c442c" },
		{ "aged_gunsinger", "c50a862d19fc4d30baeba54795e8cb93" },
		{ "ammomancer", "b1540990a4f1480bbcb3bea70d67f60d" },
		{ "jammomancer", "8b4a938cdbc64e64822e841e482ba3d2" },
		{ "jamerlengo", "ba657723b2904aa79f9e51bce7d23872" },
		{
			"Humans",
			Manager.paletteDividerGuid
		},
		{ "gun_cultist", "57255ed50ee24794b7aac1ac3cfb8a95" },
		{ "robots_past_human_1", "1398aaccb26d42f3b998c367b7800b85" },
		{ "robots_past_human_2", "9044d8e4431f490196ba697927a4e3d4" },
		{ "robots_past_human_3", "40bf8b0d97794a26b8c440425ec8cac1" },
		{ "robots_past_human_4", "3590db6c4eac474a93299a908cb77ab2" },
		{ "dr_wolf", "ce2d2a0dced0444fb751b262ec6af08a" },
		{
			"Robots",
			Manager.paletteDividerGuid
		},
		{ "gat", "9b4fb8a2a60a457f90dcf285d34143ac" },
		{ "grey_cylinder", "d4f4405e0ff34ab483966fd177f2ece3" },
		{ "red_cylinder", "534f1159e7cf4f6aa00aeea92459065e" },
		{ "bullet_mech", "2b6854c0849b4b8fb98eb15519d7db1c" },
		{
			"Explosive Kin",
			Manager.paletteDividerGuid
		},
		{ "grenade_kin", "4d37ce3d666b4ddda8039929225b7ede" },
		{ "dynamite_kin", "c0260c286c8d4538a697c5bf24976ccf" },
		{ "bombshee", "19b420dec96d4e9ea4aebc3398c0ba7a" },
		{ "m80_kin", "5f15093e6f684f4fb09d3e7e697216b4" },
		{
			"Miscellaneous",
			Manager.paletteDividerGuid
		},
		{ "rubber_kin", "6b7ef9e5d05b4f96b04f05ef4a0d1b18" },
		{ "tazie", "98fdf153a4dd4d51bf0bafe43f3c77ff" },
		{ "sniper_shell", "31a3ea0c54a745e182e22ea54844a82d" },
		{ "professional", "c5b11bfc065d417b9c4d03a5e385fe2c" },
		{ "muzzle_wisp", "ffdc8680bdaa487f8f31995539f74265" },
		{ "muzzle_flare", "d8a445ea4d944cc1b55a40f22821ae69" },
		{ "wizbang", "43426a2e39584871b287ac31df04b544" },
		{ "coaler", "9d50684ce2c044e880878e86dbada919" },
		{ "fungun", "f905765488874846b7ff257ff81d6d0c" },
		{ "bullet_shark", "72d2f44431da43b8a3bae7d8a114a46d" },
		{ "arrow_head", "05891b158cd542b1a5f3df30fb67a7ff" },
		{ "pot_fairy", "c182a5cb704d460d9d099a47af49c913" },
		{ "musketball", "226fd90be3a64958a5b13cb0a4f43e97" },
		{ "western_cactus", "3b0bd258b4c9432db3339665cc61c356" },
		{ "candle_kin", "37de0df92697431baa47894a075ba7e9" },
		{
			"Miscellaneous Animals",
			Manager.paletteDividerGuid
		},
		{ "gigi", "ed37fa13e0fa4fcf8239643957c51293" },
		{ "misfire_beast", "45192ff6d6cb43ed8f1a874ab6bef316" },
		{ "phaser_spider", "98ca70157c364750a60f5e0084f9d3e2" },
		{ "gunzookie", "6e972cd3b11e4b429b888b488e308551" },
		{ "gunzockie", "8a9e9bedac014a829a48735da6daf3da" },
		{ "chameleon", "80ab6cd15bfc46668a8844b2975c6c26" },
		{ "bird_parrot", "4b21a913e8c54056bc05cafecf9da880" },
		{ "western_snake", "e861e59012954ab2b9b6977da85cb83c" },
		{
			"Miscellaneous Weird",
			Manager.paletteDividerGuid
		},
		{ "kalibullet", "ff4f54ce606e4604bf8d467c1279be3e" },
		{ "kbullet", "f020570a42164e2699dcf57cac8a495c" },
		{ "blue_fish_bullet_kin", "06f5623a351c4f28bc8c6cda56004b80" },
		{ "green_fish_bullet_kin", "143be8c9bbb84e3fb3ab98bcd4cf5e5b" },
		{
			"Miscellaneous Strong",
			Manager.paletteDividerGuid
		},
		{ "tarnisher", "475c20c1fd474dfbad54954e7cba29c1" },
		{ "agonizer", "3f6d6b0c4a7c4690807435c7b37c35a5" },
		{ "lead_maiden", "cd4a4b7f612a4ba9a720b9f97c52f38c" },
		{ "grip_master", "22fc2c2c45fb47cf9fb5f7b043a70122" },
		{ "shambling_round", "98ea2fe181ab4323ab6e9981955a9bca" },
		{ "great_bullet_shark", "b70cbd875fea498aa7fd14b970248920" },
		{ "killithid", "3e98ccecf7334ff2800188c417e67c15" },
		{ "spogre", "eed5addcc15148179f300cc0d9ee7f94" },
		{ "fridge_maiden", "9215d1a221904c7386b481a171e52859" },
		{ "titan_bullet_kin", "c4cf0620f71c4678bb8d77929fd4feff" },
		{ "titan_bullet_kin_boss", "1f290ea06a4c416cabc52d6b3cf47266" },
		{ "titaness_bullet_kin_boss", "df4e9fedb8764b5a876517431ca67b86" },
		{
			"Boss Minions",
			Manager.paletteDividerGuid
		},
		{ "beadie", "7b0b1b6d9ce7405b86b75ce648025dd6" },
		{ "tombstoner", "cf27dd464a504a428d87a8b2560ad40a" },
		{ "ammoconda_ball", "f38686671d524feda75261e469f30e0b" },
		{ "summoned_treadnaughts_bullet_kin", "47bdfec22e8e4568a619130a267eab5b" },
		{ "mine_flayers_bell", "78a8ee40dff2477e9c2134f6990ef297" },
		{ "mine_flayers_claymore", "566ecca5f3b04945ac6ce1f26dedbf4f" },
		{ "candle_guy", "eeb33c3a5a8e4eaaaaf39a743e8767bc" },
		{ "bullet_kings_toadie", "b5e699a0abb94666bda567ab23bd91c4" },
		{ "bullet_kings_toadie_revenge", "d4dd2b2bbda64cc9bcec534b4e920518" },
		{ "old_kings_toadie", "02a14dec58ab45fb8aacde7aacd25b01" },
		{ "fusebot", "4538456236f64ea79f483784370bc62f" },
		{ "mouser", "be0683affb0e41bbb699cb7125fdded6" },
		{ "draguns_knife", "78eca975263d4482a4bfa4c07b32e252" },
		{ "dragun_knife_advanced", "2e6223e42e574775b56c6349921f42cb" },
		{ "marines_past_imp", "a9cc6a4e9b3d46ea871e70a03c9f77d4" },
		{ "convicts_past_soldier", "556e9f2a10f9411cb9dbfd61e0e0f1e1" },
		{ "robots_past_terminator", "12a054b8a6e549dcac58a82b89e319e5" },
		{
			"Minibosses",
			Manager.paletteDividerGuid
		},
		{ "ser_manuel", "fc809bd43a4d41738a62d7565456622c" },
		{ "blockner", "bb73eeeb9e584fbeaf35877ec176de28" },
		{ "blockner_rematch", "edc61b105ddd4ce18302b82efdc47178" },
		{ "fuselier", "39de9bd6a863451a97906d949c103538" },
		{ "shadow_agunim", "db97e486ef02425280129e1e27c33118" },
		{
			"Bosses",
			Manager.paletteDividerGuid
		},
		{ "smiley", "ea40fcc863d34b0088f490f4e57f8913" },
		{ "shades", "c00390483f394a849c36143eb878998f" },
		{ "gatling_gull", "ec6b674e0acd4553b47ee94493d66422" },
		{ "bullet_king", "ffca09398635467da3b1f4a54bcfda80" },
		{ "blobulord", "1b5810fafbec445d89921a4efb4e42b7" },
		{ "beholster", "4b992de5b4274168a8878ef9bf7ea36b" },
		{ "gorgun", "c367f00240a64d5d9f3c26484dc35833" },
		{ "ammoconda", "da797878d215453abba824ff902e21b4" },
		{ "old_king", "5729c8b5ffa7415bb3d01205663a33ef" },
		{ "treadnaught", "fa76c8cfdf1c4a88b55173666b4bc7fb" },
		{ "mine_flayer", "8b0dd96e2fe74ec7bebc1bc689c0008a" },
		{ "cannonbalrog", "5e0af7f7d9de4755a68d2fd3bbc15df4" },
		{ "door_lord", "9189f46c47564ed588b9108965f975c9" },
		{ "resourceful_rat", "6868795625bd46f3ae3e4377adce288b" },
		{ "resourceful_rat_mech", "4d164ba3f62648809a4a82c90fc22cae" },
		{ "high_priest", "6c43fddfd401456c916089fdd1c99b1c" },
		{ "kill_pillars", "3f11bbbc439c4086a180eb0fb9990cb4" },
		{ "wallmonger", "f3b04a067a65492f8b279130323b41f0" },
		{ "helicopter_agunim", "41ee1c8538e8474a82a74c4aff99c712" },
		{ "dragun", "465da2bb086a4a88a803f79fe3a27677" },
		{ "dragun_advanced", "05b8afe0b6cc4fffa9dc6036fa24c8ec" },
		{ "lich", "cd88c3ce60c442e9aa5b3904d31652bc" },
		{ "megalich", "68a238ed6a82467ea85474c595c49c6e" },
		{ "infinilich", "7c5d5f09911e49b78ae644d2b50ff3bf" },
		{
			"Past Bosses",
			Manager.paletteDividerGuid
		},
		{ "dr_wolfs_monster", "8d441ad4e9924d91b6070d5b3438d066" },
		{ "black_stache", "8b913eea3d174184be1af362d441910d" },
		{ "hm_absolution", "b98b10fca77d469e80fb45f3c5badec5" },
		{ "interdimensional_horror", "dc3cd41623d447aeba77c77c99598426" },
		{ "last_human", "880bbe4ce1014740ba6b4e2ea521e49d" },
		{ "agunim", "2ccaa1b7ae10457396a1796decda9cf6" },
		{ "cannon", "39dca963ae2b4688b016089d926308ab" },
		{
			"Unused",
			Manager.paletteDividerGuid
		},
		{ "bunker", "8817ab9de885424d9ba83455ead5ffef" },
		{ "vampire_mantis", "575a37abca8d414d89c4e251dd606050" },
		{ "bishop", "5d045744405d4438b371eb5ed3e2cdb2" },
		{ "boss_template", "7ee0a3fbb3dc417db4c3073ba23e1be8" },
		{ "shopkeeper_boss", "70058857b0a641a888ac4389bd10f455" },
		{ "friendly_bullet_kin", "c1757107b9a44f0c823a707adeb4ae7e" },
		{ "bullet_kin_fakery", "b5503988e3684e8fa78274dd0dda0bf5" },
		{ "veteran_bullet_kin_fakery", "06a82532447247f9ada1940d079a31a7" },
		{ "unused_muzzle_flare", "98e52539e1964749a8bbce0fe6a85d6b" },
		{ "test_dummy", "5fa8c86a65234b538cd022f726af2aea" },
		{
			"Critters",
			Manager.paletteDividerGuid
		},
		{ "chicken", "76bc43539fc24648bff4568c75c686d1" },
		{ "poopulons_corn", "0ff278534abb4fbaaa65d3f638003648" },
		{ "snake", "1386da0f42fb4bcabc5be8feb16a7c38" },
		{ "tiny_blobulord", "d1c9781fdac54d9e8498ed89210a0238" },
		{ "robots_past_critter_1", "95ea1a31fc9e4415a5f271b9aedf9b15" },
		{ "robots_past_critter_2", "42432592685e47c9941e339879379d3a" },
		{ "robots_past_critter_3", "4254a93fc3c84c0dbe0a8f0dddf48a5a" },
		{ "rat", "6ad1cafc268f4214a101dca7af61bc91" },
		{ "rat_candle", "14ea47ff46b54bb4a98f91ffcffb656d" },
		{ "dragun_egg_slimeguy", "8b43a5c59b854eb780f9ab669ec26b7a" },
		{
			"Other",
			Manager.paletteDividerGuid
		},
		{ "tutorial_turret", "e667fdd01f1e43349c03a18e5b79e579" },
		{ "faster_tutorial_turret", "41ba74c517534f02a62f2e2028395c58" },
		{
			"Custom",
			Manager.paletteDividerGuid
		}
	};

}
public class EnemyLayerButton : MonoBehaviour
{
	private float m_lastClick;

	private bool m_selected;

	private GameObject selectedPanel;

	public TilemapHandler map;

	private Text textComponent;

	public Dropdown triggerDropdown;

	public List<Transform> triggerDropdowns;

	public Enums.RoomEventTriggerCondition triggerCondition;

	public bool Selected
	{
		get
		{
			return m_selected;
		}
		set
		{
			m_selected = value;
			selectedPanel.SetActive(value);
		}
	}

	private void Awake()
	{
		selectedPanel = ((Component)((Component)this).transform.Find("Selected Panel")).gameObject;
		textComponent = ((Component)((Component)this).transform.Find("Text")).GetComponent<Text>();
		SetupCategoryDropdowns();
	}

	private void SetupCategoryDropdowns()
	{
		triggerDropdowns = new List<Transform>();
		SetupDropdown<Enums.RoomEventTriggerCondition>(triggerDropdown);
		triggerDropdowns.Add(((Component)triggerDropdown).transform);
	}

	private void SetupDropdown<T>(Dropdown dropdown) where T : Enum
	{
		List<string> list = new List<string>();
		foreach (object value in Enum.GetValues(typeof(T)))
		{
			list.Add(value.ToString());
		}
		dropdown.AddOptions(list);
	}

	public void OnClick()
	{
		Selected = true;
		selectedPanel.SetActive(true);
		EnemyLayerHandler.Instance.SetSelectedLayer(this);
	}

	public void SetText(string text)
	{
		textComponent.text = text;
	}

	public void OnValueChanged()
	{
		triggerCondition = Enums.GetEnumValue<Enums.RoomEventTriggerCondition>(triggerDropdown.options[triggerDropdown.value].text);
		Debug.Log((object)triggerCondition);
		Debug.Log((object)"changed");
	}
}
public class EnemyLayerHandler : MonoBehaviour
{
	public static EnemyLayerHandler Instance;

	public Transform enemyTilemapContainer;

	public RectTransform buttonContainer;

	public GameObject enemyTilemapPrefab;

	public EnemyLayerButton layerButtonPrefab;

	public List<EnemyMap> enemyMaps;

	private List<EnemyLayerButton> buttons;

	private EnemyLayerButton selectedButton;

	private int m_enemyLayer;

	public int verticalMargin = 5;

	public Color outOfFocusColor = new Color(1f, 1f, 1f, 0.5f);

	public int scheduledLayers;

	public int EnemyMapIndex
	{
		get
		{
			return m_enemyLayer;
		}
		set
		{
			m_enemyLayer = Mathf.Clamp(value, 0, enemyMaps.Count - 1);
		}
	}

	public int LayerCount => enemyMaps.Count;

	public float ButtonHeight
	{
		get
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			Rect rect = ((Component)layerButtonPrefab).GetComponent<RectTransform>().rect;
			return ((Rect)(ref rect)).height;
		}
	}

	public void MoveLayerUp()
	{
	}

	public void MoveLayerDown()
	{
	}

	public EnemyMap GetMap(int index)
	{
		return enemyMaps[index];
	}

	public void CollectDataForExport(ref ImportExport.RoomData data)
	{
		int count = enemyMaps.Count;
		for (int i = 0; i < count; i++)
		{
			enemyMaps[i].CollectDataForExport(ref data, i, buttons[i].triggerCondition);
		}
	}

	public void CollectDataForExport(ref ImportExport.NewRoomData data)
	{
		int count = enemyMaps.Count;
		for (int i = 0; i < count; i++)
		{
			enemyMaps[i].CollectDataForExport(ref data, i, buttons[i].triggerCondition);
		}
	}

	private void Awake()
	{
		buttons = new List<EnemyLayerButton>();
		Instance = this;
		enemyMaps = new List<EnemyMap>();
	}

	private void Start()
	{
		AddLayer(Enums.RoomEventTriggerCondition.ON_ENTER_WITH_ENEMIES);
		for (int i = 1; i < scheduledLayers; i++)
		{
			AddLayer();
		}
	}

	public TilemapHandler GetActiveTilemap()
	{
		if (enemyMaps.Count == 0)
		{
			return null;
		}
		return enemyMaps[EnemyMapIndex];
	}

	public void SetSelectedLayer(EnemyLayerButton button)
	{
		//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
		int num = buttons.IndexOf(button);
		selectedButton = button;
		EnemyMapIndex = num;
		foreach (EnemyLayerButton button2 in buttons)
		{
			if ((Object)(object)button2 != (Object)(object)button)
			{
				button2.Selected = false;
			}
			else
			{
				button2.Selected = true;
			}
		}
		for (int i = 0; i < enemyMaps.Count; i++)
		{
			int num2 = Math.Min(Math.Abs(num - i), 10);
			((Component)enemyMaps[i]).GetComponent<Tilemap>().color = (Color)((i == num) ? Color.white : new Color(1f, 1f, 1f, 0.5f - (float)num2 / 3f));
		}
	}

	public void DoTransparency()
	{
		//IL_006a: 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)
		int enemyLayer = m_enemyLayer;
		for (int i = 0; i < enemyMaps.Count; i++)
		{
			int num = Math.Min(Math.Abs(enemyLayer - i - 1), 10);
			((Component)enemyMaps[i]).GetComponent<Tilemap>().color = ((i == enemyLayer) ? new Color(1f, 1f, 1f, -1.5f) : new Color(1f, 1f, 1f, 0.5f - (float)num / 4f));
		}
	}

	public void OnClickAddLayer()
	{
		AddLayer();
	}

	public EnemyMap AddLayer(Enums.RoomEventTriggerCondition triggerCondition = Enums.RoomEventTriggerCondition.ON_ENEMIES_CLEARED)
	{
		EnemyLayerButton component = Object.Instantiate<GameObject>(((Component)layerButtonPrefab).gameObject, (Transform)(object)buttonContainer).GetComponent<EnemyLayerButton>();
		component.SetText("Enemy Wave " + buttons.Count);
		component.triggerDropdown.value = (int)triggerCondition;
		component.triggerCondition = triggerCondition;
		component.OnValueChanged();
		buttons.Add(component);
		RepositionButtons();
		EnemyMap component2 = Object.Instantiate<GameObject>(enemyTilemapPrefab, enemyTilemapContainer).GetComponent<EnemyMap>();
		component.map = ((Component)component2).GetComponent<EnemyMap>();
		enemyMaps.Add(component2);
		SetSelectedLayer(component);
		return component2;
	}

	public void RepositionButtons()
	{
		//IL_006f: Unknown result type (might be due to invalid IL or missing references)
		//IL_008c: Unknown result type (might be due to invalid IL or missing references)
		//IL_009e: Unknown result type (might be due to invalid IL or missing references)
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0051: Unknown result type (might be due to invalid IL or missing references)
		int count = buttons.Count;
		for (int i = 0; i < count; i++)
		{
			if (Object.op_Implicit((Object)(object)buttons[i]))
			{
				((Component)buttons[i]).transform.localPosition = Vector2.op_Implicit(new Vector2(0f, (0f - (float)i) * ButtonHeight - (float)verticalMargin));
			}
		}
		buttonContainer.sizeDelta = new Vector2(buttonContainer.sizeDelta.x, 0f - ((Component)buttons[count - 1]).transform.localPosition.y + ButtonHeight);
	}

	public void RemoveLayer()
	{
		if (Object.op_Implicit((Object)(object)selectedButton))
		{
			int num = buttons.IndexOf(selectedButton);
			Object.Destroy((Object)(object)((Component)enemyMaps[num]).gameObject);
			enemyMaps.RemoveAt(num);
			Object.DestroyImmediate((Object)(object)((Component)selectedButton).gameObject);
			buttons.RemoveAt(num);
			if (enemyMaps.Count == 0)
			{
				PaletteDropdown.Instance.SetValue(TilemapHandler.MapType.Environment);
				return;
			}
			EnemyMapIndex = Mathf.Clamp(num, 0, enemyMaps.Count - 1);
			SetSelectedLayer(buttons[EnemyMapIndex]);
			RepositionButtons();
		}
	}

	public List<EnemyLayerButton> ReturnButtons()
	{
		return buttons;
	}
}
public class EnemyMap : TilemapHandler
{
	protected override void Awake()
	{
		base.Awake();
	}

	public void CollectDataForExport(ref ImportExport.NewRoomData data, int index, Enums.RoomEventTriggerCondition trigger)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		//IL_009d: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
		BoundsInt bounds = TilemapHandler.Bounds;
		Vector3Int position = ((BoundsInt)(ref bounds)).position;
		bounds = TilemapHandler.Bounds;
		new BoundsInt(position, ((BoundsInt)(ref bounds)).size);
		Tile[,] array = AllTiles();
		List<string> list = new List<string>();
		List<Vector2> list2 = new List<Vector2>();
		List<string> list3 = new List<string>();
		List<string> list4 = new List<string>();
		List<int> list5 = new List<int>();
		for (int i = 0; i < array.GetLength(0); i++)
		{
			for (int j = 0; j < array.GetLength(1); j++)
			{
				if (Object.op_Implicit((Object)(object)array[i, j]))
				{
					Tile val = array[i, j];
					list.Add(tileDatabase.AllEntries[((Object)val).name]);
					list2.Add(new Vector2((float)i, (float)j));
					list4.Add(trigger.ToString());
					DataTile dataTile;
					list3.Add(JsonConvert.SerializeObject((object)AttributeDatabase.ToShortNamed((JObject)(((Object)(object)(dataTile = val as DataTile) != (Object)null) ? ((object)dataTile.data) : ((object)new JObject()))), (Formatting)0));
					list5.Add(index);
				}
			}
		}
		data.enemyGUIDs = data.enemyGUIDs.Concat(list.ToArray()).ToArray();
		data.enemyPositions = data.enemyPositions.Concat(list2.ToArray()).ToArray();
		data.enemyReinforcementLayers = data.enemyReinforcementLayers.Concat(list5.ToArray()).ToArray();
		data.enemyAttributes = data.enemyAttributes.Concat(list3.ToArray()).ToArray();
		data.waveTriggers = data.waveTriggers.Concat(list4.ToArray()).ToArray();
	}

	public void CollectDataForExport(ref ImportExport.RoomData data, int index, Enums.RoomEventTriggerCondition trigger)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		//IL_009d: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
		BoundsInt bounds = TilemapHandler.Bounds;
		Vector3Int position = ((BoundsInt)(ref bounds)).position;
		bounds = TilemapHandler.Bounds;
		new BoundsInt(position, ((BoundsInt)(ref bounds)).size);
		Tile[,] array = AllTiles();
		List<string> list = new List<string>();
		List<Vector2> list2 = new List<Vector2>();
		List<string> list3 = new List<string>();
		List<string> list4 = new List<string>();
		List<int> list5 = new List<int>();
		for (int i = 0; i < array.GetLength(0); i++)
		{
			for (int j = 0; j < array.GetLength(1); j++)
			{
				if (Object.op_Implicit((Object)(object)array[i, j]))
				{
					Tile val = array[i, j];
					list.Add(tileDatabase.AllEntries[((Object)val).name]);
					list2.Add(new Vector2((float)i, (float)j));
					list4.Add(trigger.ToString());
					DataTile dataTile;
					list3.Add(JsonConvert.SerializeObject((object)AttributeDatabase.ToShortNamed((JObject)(((Object)(object)(dataTile = val as DataTile) != (Object)null) ? ((object)dataTile.data) : ((object)new JObject()))), (Formatting)0));
					list5.Add(index);
				}
			}
		}
		data.enemyGUIDs = data.enemyGUIDs.Concat(list.ToArray()).ToArray();
		data.enemyPositions = data.enemyPositions.Concat(list2.ToArray()).ToArray();
		data.enemyReinforcementLayers = data.enemyReinforcementLayers.Concat(list5.ToArray()).ToArray();
		data.enemyAttributes = data.enemyAttributes.Concat(list3.ToArray()).ToArray();
		data.waveTriggers = data.waveTriggers.Concat(list4.ToArray()).ToArray();
	}

	public override TileDatabase InitializeDatabase()
	{
		tileDatabase = new EnemyDatabase();
		tileDatabase.spriteDirectory = "sprites/enemies/";
		foreach (CustomObjectDatabase.CustomDataEntry customEnemy in CustomObjectDatabase.Instance.customEnemies)
		{
			tileDatabase.Entries.Add("customEnemyAsset-" + customEnemy.name, customEnemy.guid);
			Debug.Log((object)customEnemy.name);
		}
		return tileDatabase;
	}

	public void ReloadTiles()
	{
		InitializeTiles();
	}

	protected override void InitializeTiles()
	{
		base.InitializeTiles();
		foreach (Tile tile in tiles)
		{
			DataTile dataTile = tile as DataTile;
			AttributeDatabase.TryGetListing("every_single_enemy_ever", out var listing);
			foreach (AC item in listing)
			{
				if (!dataTile.data.ContainsKey(item.longName))
				{
					dataTile.data.Add(item.longName, JToken.FromObject(item.defaultValue));
				}
			}
		}
	}
}
public static class Enums
{
	[Serializable]
	public enum SerializedPathWrapMode
	{
		PINGPONG,
		LOOP,
		ONCE
	}

	[Serializable]
	public enum RoomEventTriggerCondition
	{
		ON_ENTER,
		ON_EXIT,
		ON_ENEMIES_CLEARED,
		ON_ENTER_WITH_ENEMIES,
		ON_ONE_QUARTER_ENEMY_HP_DEPLETED,
		ON_HALF_ENEMY_HP_DEPLETED,
		ON_THREE_QUARTERS_ENEMY_HP_DEPLETED,
		ON_NINETY_PERCENT_ENEMY_HP_DEPLETED,
		TIMER,
		SHRINE_WAVE_A,
		SHRINE_WAVE_B,
		SHRINE_WAVE_C,
		NPC_TRIGGER_A,
		NPC_TRIGGER_B,
		NPC_TRIGGER_C,
		ENEMY_BEHAVIOR,
		SEQUENTIAL_WAVE_TRIGGER
	}

	public enum DungeonMusicState
	{
		FLOOR_INTRO,
		ACTIVE_SIDE_A,
		ACTIVE_SIDE_B,
		ACTIVE_SIDE_C,
		ACTIVE_SIDE_D,
		CALM,
		SHOP,
		SECRET,
		ARCADE,
		FOYER_ELEVATOR,
		FOYER_SORCERESS
	}

	public enum RoomCategory
	{
		NORMAL,
		SPECIAL,
		REWARD,
		BOSS,
		CONNECTOR,
		HUB,
		SECRET,
		ENTRANCE,
		EXIT
	}

	public enum RoomNormalSubCategory
	{
		COMBAT,
		TRAP
	}

	public enum RoomBossSubCategory
	{
		FLOOR_BOSS,
		MINI_BOSS
	}

	public enum RoomSpecialSubCategory
	{
		UNSPECIFIED_SPECIAL,
		STANDARD_SHOP,
		WEIRD_SHOP,
		MAIN_STORY,
		NPC_STORY,
		CATACOMBS_BRIDGE_ROOM
	}

	public enum ValidTilesets
	{
		GUNGEON,
		CASTLEGEON,
		SEWERGEON,
		CATHEDRALGEON,
		MINEGEON,
		CATACOMBGEON,
		FORGEGEON,
		HELLGEON,
		SPACEGEON,
		PHOBOSGEON512,
		WESTGEON,
		OFFICEGEON,
		BELLYGEON,
		JUNGLEGEON,
		FINALGEON,
		RATGEON
	}

	public enum CategoryType
	{
		Normal,
		Special,
		Boss,
		Secret
	}

	public enum SuperSpecialRooms
	{
		None,
		Old_Red,
		Cursula,
		Flynt,
		Trorc,
		Goopton,
		Misc_Reward,
		Cleanse_Shrine,
		Glass_Shrine,
		Black_Market,
		Random_Shrine,
		Cursed_Mirror,
		Winchester,
		Fireplace,
		Sewer_Entrance,
		Crest_Room,
		Abbey_Entrance,
		Abbey_Extra_Secret,
		Hollow_Sell_Creep,
		Bullet_Hell_Secret,
		Blockner_Miniboss,
		Fuselier,
		Shadow_Magician,
		Glitched_Boss,
		Lost_Adventurer,
		Gunsling_King,
		Mendy_And_Patches,
		Synergrace,
		Vampire,
		Gun_Muncher,
		Black_Market_Entrance,
		Challenge_Shrine_Keep,
		Challenge_Shrine_Proper,
		Challenge_Shrine_Mines,
		Challenge_Shrine_Hollow,
		Challenge_Shrine_Forge,
		Gatling_Gull,
		Bullet_King,
		Trigger_Twins,
		Blobulord,
		Gorgun,
		Beholster,
		Ammoconda,
		Old_King,
		Cannonbalrog,
		Mine_Flayer,
		Treadnaught,
		High_Priest,
		Kill_Pillars,
		Wallmonger,
		Door_Lord
	}

	public static T GetEnumValue<T>(string val) where T : Enum
	{
		return (T)Enum.Parse(typeof(T), val.ToUpper());
	}

	public static T GetEnumValueBase<T>(string val) where T : Enum
	{
		return (T)Enum.Parse(typeof(T), val);
	}
}
public class EnvironmentMap : TilemapHandler
{
	public void DrawBorder()
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_0021: 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_0030: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: 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)
		//IL_0044: Unknown result type (might be due to invalid IL or missing references)
		//IL_004e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0053: Unknown result type (might be due to invalid IL or missing references)
		//IL_007d: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0104: Unknown result type (might be due to invalid IL or missing references)
		Vector3Int zero = Vector3Int.zero;
		Vector3Int origin = map.origin;
		((Vector3Int)(ref zero)).z = ((Vector3Int)(ref origin)).z;
		BoundsInt bounds = TilemapHandler.Bounds;
		int xMin = ((BoundsInt)(ref bounds)).xMin;
		bounds = TilemapHandler.Bounds;
		int yMin = ((BoundsInt)(ref bounds)).yMin;
		bounds = TilemapHandler.Bounds;
		int xMax = ((BoundsInt)(ref bounds)).xMax;
		bounds = TilemapHandler.Bounds;
		int yMax = ((BoundsInt)(ref bounds)).yMax;
		for (int i = xMin; i < xMax; i++)
		{
			((Vector3Int)(ref zero)).x = i;
			((Vector3Int)(ref zero)).y = yMax - 1;
			map.SetTile(zero, (TileBase)(object)palette["wall"]);
			((Vector3Int)(ref zero)).y = yMin;
			map.SetTile(zero, (TileBase)(object)palette["wall"]);
		}
		for (int j = yMin; j < yMax; j++)
		{
			((Vector3Int)(ref zero)).y = j;
			((Vector3Int)(ref zero)).x = xMax - 1;
			map.SetTile(zero, (TileBase)(object)palette["wall"]);
			((Vector3Int)(ref zero)).x = xMin;
			map.SetTile(zero, (TileBase)(object)palette["wall"]);
		}
	}

	public void CreatRodentRoom()
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_0029: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Unknown result type (might be due to invalid IL or missing references)
		//IL_0038: 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)
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		//IL_005d: Unknown result type (might be due to invalid IL or missing references)
		//IL_008a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0093: Unknown result type (might be due to invalid IL or missing references)
		//IL_0098: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
		//IL_0102: Unknown result type (might be due to invalid IL or missing references)
		//IL_010b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0110: Unknown result type (might be due to invalid IL or missing references)
		//IL_013f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0166: Unknown result type (might be due to invalid IL or missing references)
		//IL_018d: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
		//IL_01db: Unknown result type (might be due to invalid IL or missing references)
		//IL_0202: Unknown result type (might be due to invalid IL or missing references)
		//IL_0229: Unknown result type (might be due to invalid IL or missing references)
		//IL_0250: Unknown result type (might be due to invalid IL or missing references)
		//IL_0277: Unknown result type (might be due to invalid IL or missing references)
		//IL_027f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0284: Unknown result type (might be due to invalid IL or missing references)
		//IL_02b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_02ba: Unknown result type (might be due to invalid IL or missing references)
		//IL_02bf: Unknown result type (might be due to invalid IL or missing references)
		//IL_02ed: Unknown result type (might be due to invalid IL or missing references)
		//IL_02f5: Unknown result type (might be due to invalid IL or missing references)
		//IL_02fa: Unknown result type (might be due to invalid IL or missing references)
		//IL_0328: Unknown result type (might be due to invalid IL or missing references)
		//IL_0330: Unknown result type (might be due to invalid IL or missing references)
		//IL_0335: Unknown result type (might be due to invalid IL or missing references)
		//IL_0363: Unknown result type (might be due to invalid IL or missing references)
		//IL_036b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0370: Unknown result type (might be due to invalid IL or missing references)
		//IL_039e: Unknown result type (might be due to invalid IL or missing references)
		//IL_03a6: Unknown result type (might be due to invalid IL or missing references)
		//IL_03ab: Unknown result type (might be due to invalid IL or missing references)
		//IL_03d9: Unknown result type (might be due to invalid IL or missing references)
		//IL_03e1: Unknown result type (might be due to invalid IL or missing references)
		//IL_03e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_0414: Unknown result type (might be due to invalid IL or missing references)
		//IL_041c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0421: Unknown result type (might be due to invalid IL or missing references)
		//IL_044f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0483: Unknown result type (might be due to invalid IL or missing references)
		//IL_04ad: Unknown result type (might be due to invalid IL or missing references)
		//IL_04d5: Unknown result type (might be due to invalid IL or missing references)
		//IL_04ff: Unknown result type (might be due to invalid IL or missing references)
		_ = Vector2Int.zero;
		BoundsInt bounds = TilemapHandler.Bounds;
		int xMin = ((BoundsInt)(ref bounds)).xMin;
		bounds = TilemapHandler.Bounds;
		int yMin = ((BoundsInt)(ref bounds)).yMin;
		bounds = TilemapHandler.Bounds;
		int xMax = ((BoundsInt)(ref bounds)).xMax;
		bounds = TilemapHandler.Bounds;
		int yMax = ((BoundsInt)(ref bounds)).yMax;
		map.SetTilesBlock(new BoundsInt(new Vector3Int(xMin + 6, yMax - 1, 0), new Vector3Int(24, 1, 1)), CreateTileArrayOfLength(24, (TileBase)(object)palette["wall"]));
		map.SetTilesBlock(new BoundsInt(new Vector3Int(xMin + 6, yMin, 0), new Vector3Int(24, 1, 1)), CreateTileArrayOfLength(24, (TileBase)(object)palette["wall"]));
		map.SetTilesBlock(new BoundsInt(new Vector3Int(xMin, yMin + 6, 0), new Vector3Int(1, 15, 1)), CreateTileArrayOfLength(15, (TileBase)(object)palette["wall"]));
		map.SetTilesBlock(new BoundsInt(new Vector3Int(xMax - 1, yMin + 6, 0), new Vector3Int(1, 15, 1)), CreateTileArrayOfLength(15, (TileBase)(object)palette["wall"]));
		map.SetTile(new Vector3Int(xMin + 1, yMin + 6, 0), (TileBase)(object)palette["wall"]);
		map.SetTile(new Vector3Int(xMin + 1, yMax - 7, 0), (TileBase)(object)palette["wall"]);
		map.SetTile(new Vector3Int(xMax - 2, yMin + 6, 0), (TileBase)(object)palette["wall"]);
		map.SetTile(new Vector3Int(xMax - 2, yMax - 7, 0), (TileBase)(object)palette["wall"]);
		map.SetTile(new Vector3Int(xMin + 6, yMin + 1, 0), (TileBase)(object)palette["wall"]);
		map.SetTile(new Vector3Int(xMin + 6, yMax - 2, 0), (TileBase)(object)palette["wall"]);
		map.SetTile(new Vector3Int(xMax - 7, yMin + 1, 0), (TileBase)(object)palette["wall"]);
		map.SetTile(new Vector3Int(xMax - 7, yMax - 2, 0), (TileBase)(object)palette["wall"]);
		map.SetTilesBlock(new BoundsInt(new Vector3Int(xMax - 7, yMin + 2, 0), new Vector3Int(5, 1, 1)), CreateTileArrayOfLength(5, (TileBase)(object)palette["wall"]));
		map.SetTilesBlock(new BoundsInt(new Vector3Int(xMax - 7, yMax - 3, 0), new Vector3Int(5, 1, 1)), CreateTileArrayOfLength(5, (TileBase)(object)palette["wall"]));
		map.SetTilesBlock(new BoundsInt(new Vector3Int(xMin + 2, yMin + 2, 0), new Vector3Int(5, 1, 1)), CreateTileArrayOfLength(5, (TileBase)(object)palette["wall"]));
		map.SetTilesBlock(new BoundsInt(new Vector3Int(xMin + 2, yMax - 3, 0), new Vector3Int(5, 1, 1)), CreateTileArrayOfLength(5, (TileBase)(object)palette["wall"]));
		map.SetTilesBlock(new BoundsInt(new Vector3Int(xMin + 2, yMin + 2, 0), new Vector3Int(1, 5, 1)), CreateTileArrayOfLength(5, (TileBase)(object)palette["wall"]));
		map.SetTilesBlock(new BoundsInt(new Vector3Int(xMin + 2, yMax - 7, 0), new Vector3Int(1, 5, 1)), CreateTileArrayOfLength(5, (TileBase)(object)palette["wall"]));
		map.SetTilesBlock(new BoundsInt(new Vector3Int(xMax - 3, yMin + 2, 0), new Vector3Int(1, 5, 1)), CreateTileArrayOfLength(5, (TileBase)(object)palette["wall"]));
		map.SetTilesBlock(new BoundsInt(new Vector3Int(xMax - 3, yMax - 7, 0), new Vector3Int(1, 5, 1)), CreateTileArrayOfLength(5, (TileBase)(object)palette["wall"]));
		map.FloodFill(new Vector3Int(xMax - 5, yMax - 7, 0), (TileBase)(object)palette["floor"]);
		TilemapHandler tilemap = Manager.Instance.GetTilemap(MapType.Exits);
		tilemap.map.SetTile(new Vector3Int(xMin + 17, yMin, 0), (TileBase)(object)tilemap.palette["door_south"]);
		tilemap.map.SetTile(new Vector3Int(xMin + 17, yMax - 1, 0), (TileBase)(object)tilemap.palette["door_north"]);
		tilemap.map.SetTile(new Vector3Int(xMin, yMax - 15, 0), (TileBase)(object)tilemap.palette["door_west"]);
		tilemap.map.SetTile(new Vector3Int(xMax - 1, yMax - 15, 0), (TileBase)(object)tilemap.palette["door_east"]);
	}

	public TileBase[] CreateTileArrayOfLength(int length, TileBase tile)
	{
		TileBase[] array = (TileBase[])(object)new TileBase[length];
		for (int i = 0; i < array.Length; i++)
		{
			array[i] = tile;
		}
		return array;
	}

	public Texture2D CollectDataForExportLegecy()
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0030: Expected O, but got Unknown
		//IL_0030: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: Unknown result type (might be due to invalid IL or missing references)
		//IL_0038: Unknown result type (might be due to invalid IL or missing references)
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_0045: Unknown result type (might be due to invalid IL or missing references)
		//IL_004a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0081: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
		BoundsInt bounds = TilemapHandler.Bounds;
		Vector3Int size = ((BoundsInt)(ref bounds)).size;
		int x = ((Vector3Int)(ref size)).x;
		bounds = TilemapHandler.Bounds;
		size = ((BoundsInt)(ref bounds)).size;
		Texture2D val = new Texture2D(x, ((Vector3Int)(ref size)).y);
		bounds = TilemapHandler.Bounds;
		Vector3Int position = ((BoundsInt)(ref bounds)).position;
		bounds = TilemapHandler.Bounds;
		new BoundsInt(position, ((BoundsInt)(ref bounds)).size);
		Tile[,] array = AllTiles();
		for (int i = 0; i < array.GetLength(0); i++)
		{
			for (int j = 0; j < array.GetLength(1); j++)
			{
				Tile val2 = array[i, j];
				if (!Object.op_Implicit((Object)(object)val2))
				{
					val.SetPixel(i, j, Color.magen

Room Architect Tool_Data/Managed/Assembly-CSharp-firstpass.dll

Decompiled 3 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using Ookii.Dialogs;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyVersion("0.0.0.0")]
namespace AnotherFileBrowser.Windows;

public class FileBrowser
{
	[DllImport("user32.dll")]
	private static extern IntPtr GetActiveWindow();

	public void OpenFileBrowser(BrowserProperties browserProperties, Action<string> filepath)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0006: Expected O, but got Unknown
		//IL_0083: Unknown result type (might be due to invalid IL or missing references)
		//IL_0089: Invalid comparison between Unknown and I4
		VistaOpenFileDialog val = new VistaOpenFileDialog();
		val.Multiselect = false;
		((VistaFileDialog)val).Title = ((browserProperties.title == null) ? "Select a File" : browserProperties.title);
		((VistaFileDialog)val).InitialDirectory = ((browserProperties.initialDir == null) ? "C:\\" : browserProperties.initialDir);
		((VistaFileDialog)val).Filter = ((browserProperties.filter == null) ? "All files (*.*)|*.*" : browserProperties.filter);
		((VistaFileDialog)val).FilterIndex = browserProperties.filterIndex + 1;
		((VistaFileDialog)val).RestoreDirectory = browserProperties.restoreDirectory;
		if ((int)((CommonDialog)val).ShowDialog((IWin32Window)(object)new WindowWrapper(GetActiveWindow())) == 1)
		{
			filepath(((VistaFileDialog)val).FileName);
		}
	}

	public void OpenSaveFileBrowser(BrowserProperties browserProperties, Action<string> filepath)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0006: Expected O, but got Unknown
		//IL_007c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0082: Invalid comparison between Unknown and I4
		VistaSaveFileDialog val = new VistaSaveFileDialog();
		((VistaFileDialog)val).Title = ((browserProperties.title == null) ? "Select a File" : browserProperties.title);
		((VistaFileDialog)val).InitialDirectory = ((browserProperties.initialDir == null) ? "C:\\" : browserProperties.initialDir);
		((VistaFileDialog)val).Filter = ((browserProperties.filter == null) ? "All files (*.*)|*.*" : browserProperties.filter);
		((VistaFileDialog)val).FilterIndex = browserProperties.filterIndex + 1;
		((VistaFileDialog)val).RestoreDirectory = browserProperties.restoreDirectory;
		if ((int)((CommonDialog)val).ShowDialog((IWin32Window)(object)new WindowWrapper(GetActiveWindow())) == 1)
		{
			filepath(((VistaFileDialog)val).FileName);
		}
	}

	public void OpenFolderBrowser(FolderBrowserProperties browserProperties, Action<string> filepath)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0006: Expected O, but got Unknown
		//IL_0044: Unknown result type (might be due to invalid IL or missing references)
		//IL_004a: Invalid comparison between Unknown and I4
		VistaFolderBrowserDialog val = new VistaFolderBrowserDialog();
		val.Description = ((browserProperties.title == null) ? "Select a File" : browserProperties.title);
		val.ShowNewFolderButton = browserProperties.showNewFolderButton;
		val.RootFolder = browserProperties.rootFolder;
		if ((int)((CommonDialog)val).ShowDialog((IWin32Window)(object)new WindowWrapper(GetActiveWindow())) == 1)
		{
			filepath(val.SelectedPath);
		}
	}
}
public class FolderBrowserProperties
{
	public string title;

	public Environment.SpecialFolder rootFolder;

	public bool showNewFolderButton;

	public FolderBrowserProperties()
	{
	}

	public FolderBrowserProperties(string title)
	{
		this.title = title;
	}
}
public class BrowserProperties
{
	public string title;

	public string initialDir;

	public string filter;

	public int filterIndex;

	public bool restoreDirectory = true;

	public BrowserProperties()
	{
	}

	public BrowserProperties(string title)
	{
		this.title = title;
	}
}
public class WindowWrapper : IWin32Window
{
	private IntPtr _hwnd;

	public IntPtr Handle => _hwnd;

	public WindowWrapper(IntPtr handle)
	{
		_hwnd = handle;
	}
}

Room Architect Tool_Data/Managed/com.unity.multiplayer-hlapi.Runtime.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using UnityEngine.Networking.Match;
using UnityEngine.Networking.NetworkSystem;
using UnityEngine.Networking.Types;
using UnityEngine.SceneManagement;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("UnityEngine.Networking")]
[assembly: AssemblyDescription("Networking High Level API")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Unity Technologies")]
[assembly: AssemblyProduct("UnityEngine.Networking")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: InternalsVisibleTo("UnityEditor.Networking")]
[assembly: InternalsVisibleTo("com.unity.multiplayer-hlapi.Editor")]
[assembly: InternalsVisibleTo("com.unity.multiplayer-hlapi.EditorTests")]
[assembly: InternalsVisibleTo("com.unity.multiplayer-hlapi.Editor-testable")]
[assembly: ComVisible(false)]
[assembly: Guid("87035389-1bb3-40e2-b2a9-c8707e7419ba")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace UnityEngine.Networking
{
	internal class ChannelBuffer : IDisposable
	{
		private NetworkConnection m_Connection;

		private ChannelPacket m_CurrentPacket;

		private float m_LastFlushTime;

		private byte m_ChannelId;

		private int m_MaxPacketSize;

		private bool m_IsReliable;

		private bool m_AllowFragmentation;

		private bool m_IsBroken;

		private int m_MaxPendingPacketCount;

		private const int k_MaxFreePacketCount = 512;

		public const int MaxPendingPacketCount = 16;

		public const int MaxBufferedPackets = 512;

		private Queue<ChannelPacket> m_PendingPackets;

		private static List<ChannelPacket> s_FreePackets;

		internal static int pendingPacketCount;

		public float maxDelay = 0.01f;

		private float m_LastBufferedMessageCountTimer = Time.realtimeSinceStartup;

		private static NetworkWriter s_SendWriter = new NetworkWriter();

		private static NetworkWriter s_FragmentWriter = new NetworkWriter();

		private const int k_PacketHeaderReserveSize = 100;

		private bool m_Disposed;

		internal NetBuffer fragmentBuffer = new NetBuffer();

		private bool readingFragment;

		public int numMsgsOut { get; private set; }

		public int numBufferedMsgsOut { get; private set; }

		public int numBytesOut { get; private set; }

		public int numMsgsIn { get; private set; }

		public int numBytesIn { get; private set; }

		public int numBufferedPerSecond { get; private set; }

		public int lastBufferedPerSecond { get; private set; }

		public ChannelBuffer(NetworkConnection conn, int bufferSize, byte cid, bool isReliable, bool isSequenced)
		{
			m_Connection = conn;
			m_MaxPacketSize = bufferSize - 100;
			m_CurrentPacket = new ChannelPacket(m_MaxPacketSize, isReliable);
			m_ChannelId = cid;
			m_MaxPendingPacketCount = 16;
			m_IsReliable = isReliable;
			m_AllowFragmentation = isReliable && isSequenced;
			if (isReliable)
			{
				m_PendingPackets = new Queue<ChannelPacket>();
				if (s_FreePackets == null)
				{
					s_FreePackets = new List<ChannelPacket>();
				}
			}
		}

		public void Dispose()
		{
			Dispose(disposing: true);
			GC.SuppressFinalize(this);
		}

		protected virtual void Dispose(bool disposing)
		{
			if (!m_Disposed && disposing && m_PendingPackets != null)
			{
				while (m_PendingPackets.Count > 0)
				{
					pendingPacketCount--;
					ChannelPacket item = m_PendingPackets.Dequeue();
					if (s_FreePackets.Count < 512)
					{
						s_FreePackets.Add(item);
					}
				}
				m_PendingPackets.Clear();
			}
			m_Disposed = true;
		}

		public bool SetOption(ChannelOption option, int value)
		{
			switch (option)
			{
			case ChannelOption.MaxPendingBuffers:
				if (!m_IsReliable)
				{
					return false;
				}
				if (value < 0 || value >= 512)
				{
					if (LogFilter.logError)
					{
						Debug.LogError((object)("Invalid MaxPendingBuffers for channel " + m_ChannelId + ". Must be greater than zero and less than " + 512));
					}
					return false;
				}
				m_MaxPendingPacketCount = value;
				return true;
			case ChannelOption.AllowFragmentation:
				m_AllowFragmentation = value != 0;
				return true;
			case ChannelOption.MaxPacketSize:
				if (!m_CurrentPacket.IsEmpty() || m_PendingPackets.Count > 0)
				{
					if (LogFilter.logError)
					{
						Debug.LogError((object)"Cannot set MaxPacketSize after sending data.");
					}
					return false;
				}
				if (value <= 0)
				{
					if (LogFilter.logError)
					{
						Debug.LogError((object)"Cannot set MaxPacketSize less than one.");
					}
					return false;
				}
				if (value > m_MaxPacketSize)
				{
					if (LogFilter.logError)
					{
						Debug.LogError((object)("Cannot set MaxPacketSize to greater than the existing maximum (" + m_MaxPacketSize + ")."));
					}
					return false;
				}
				m_CurrentPacket = new ChannelPacket(value, m_IsReliable);
				m_MaxPacketSize = value;
				return true;
			default:
				return false;
			}
		}

		public void CheckInternalBuffer()
		{
			if (Time.realtimeSinceStartup - m_LastFlushTime > maxDelay && !m_CurrentPacket.IsEmpty())
			{
				SendInternalBuffer();
				m_LastFlushTime = Time.realtimeSinceStartup;
			}
			if (Time.realtimeSinceStartup - m_LastBufferedMessageCountTimer > 1f)
			{
				lastBufferedPerSecond = numBufferedPerSecond;
				numBufferedPerSecond = 0;
				m_LastBufferedMessageCountTimer = Time.realtimeSinceStartup;
			}
		}

		public bool SendWriter(NetworkWriter writer)
		{
			return SendBytes(writer.AsArraySegment().Array, writer.AsArraySegment().Count);
		}

		public bool Send(short msgType, MessageBase msg)
		{
			s_SendWriter.StartMessage(msgType);
			msg.Serialize(s_SendWriter);
			s_SendWriter.FinishMessage();
			numMsgsOut++;
			return SendWriter(s_SendWriter);
		}

		internal bool HandleFragment(NetworkReader reader)
		{
			if (reader.ReadByte() == 0)
			{
				if (!readingFragment)
				{
					fragmentBuffer.SeekZero();
					readingFragment = true;
				}
				byte[] array = reader.ReadBytesAndSize();
				fragmentBuffer.WriteBytes(array, (ushort)array.Length);
				return false;
			}
			readingFragment = false;
			return true;
		}

		internal bool SendFragmentBytes(byte[] bytes, int bytesToSend)
		{
			int num = 0;
			while (bytesToSend > 0)
			{
				int num2 = Math.Min(bytesToSend, m_MaxPacketSize - 32);
				byte[] array = new byte[num2];
				Array.Copy(bytes, num, array, 0, num2);
				s_FragmentWriter.StartMessage(17);
				s_FragmentWriter.Write((byte)0);
				s_FragmentWriter.WriteBytesFull(array);
				s_FragmentWriter.FinishMessage();
				SendWriter(s_FragmentWriter);
				num += num2;
				bytesToSend -= num2;
			}
			s_FragmentWriter.StartMessage(17);
			s_FragmentWriter.Write((byte)1);
			s_FragmentWriter.FinishMessage();
			SendWriter(s_FragmentWriter);
			return true;
		}

		internal bool SendBytes(byte[] bytes, int bytesToSend)
		{
			if (bytesToSend >= 65535)
			{
				if (LogFilter.logError)
				{
					Debug.LogError((object)("ChannelBuffer:SendBytes cannot send packet larger than " + ushort.MaxValue + " bytes"));
				}
				return false;
			}
			if (bytesToSend <= 0)
			{
				if (LogFilter.logError)
				{
					Debug.LogError((object)"ChannelBuffer:SendBytes cannot send zero bytes");
				}
				return false;
			}
			if (bytesToSend > m_MaxPacketSize)
			{
				if (m_AllowFragmentation)
				{
					return SendFragmentBytes(bytes, bytesToSend);
				}
				if (LogFilter.logError)
				{
					Debug.LogError((object)("Failed to send big message of " + bytesToSend + " bytes. The maximum is " + m_MaxPacketSize + " bytes on channel:" + m_ChannelId));
				}
				return false;
			}
			if (!m_CurrentPacket.HasSpace(bytesToSend))
			{
				if (m_IsReliable)
				{
					if (m_PendingPackets.Count == 0)
					{
						if (!m_CurrentPacket.SendToTransport(m_Connection, m_ChannelId))
						{
							QueuePacket();
						}
						m_CurrentPacket.Write(bytes, bytesToSend);
						return true;
					}
					if (m_PendingPackets.Count >= m_MaxPendingPacketCount)
					{
						if (!m_IsBroken && LogFilter.logError)
						{
							Debug.LogError((object)("ChannelBuffer buffer limit of " + m_PendingPackets.Count + " packets reached."));
						}
						m_IsBroken = true;
						return false;
					}
					QueuePacket();
					m_CurrentPacket.Write(bytes, bytesToSend);
					return true;
				}
				if (!m_CurrentPacket.SendToTransport(m_Connection, m_ChannelId))
				{
					if (LogFilter.logError)
					{
						Debug.Log((object)("ChannelBuffer SendBytes no space on unreliable channel " + m_ChannelId));
					}
					return false;
				}
				m_CurrentPacket.Write(bytes, bytesToSend);
				return true;
			}
			m_CurrentPacket.Write(bytes, bytesToSend);
			if (maxDelay == 0f)
			{
				return SendInternalBuffer();
			}
			return true;
		}

		private void QueuePacket()
		{
			pendingPacketCount++;
			m_PendingPackets.Enqueue(m_CurrentPacket);
			m_CurrentPacket = AllocPacket();
		}

		private ChannelPacket AllocPacket()
		{
			if (s_FreePackets.Count == 0)
			{
				return new ChannelPacket(m_MaxPacketSize, m_IsReliable);
			}
			ChannelPacket result = s_FreePackets[s_FreePackets.Count - 1];
			s_FreePackets.RemoveAt(s_FreePackets.Count - 1);
			result.Reset();
			return result;
		}

		private static void FreePacket(ChannelPacket packet)
		{
			if (s_FreePackets.Count < 512)
			{
				s_FreePackets.Add(packet);
			}
		}

		public bool SendInternalBuffer()
		{
			if (m_IsReliable && m_PendingPackets.Count > 0)
			{
				while (m_PendingPackets.Count > 0)
				{
					ChannelPacket channelPacket = m_PendingPackets.Dequeue();
					if (!channelPacket.SendToTransport(m_Connection, m_ChannelId))
					{
						m_PendingPackets.Enqueue(channelPacket);
						break;
					}
					pendingPacketCount--;
					FreePacket(channelPacket);
					if (m_IsBroken && m_PendingPackets.Count < m_MaxPendingPacketCount / 2)
					{
						if (LogFilter.logWarn)
						{
							Debug.LogWarning((object)"ChannelBuffer recovered from overflow but data was lost.");
						}
						m_IsBroken = false;
					}
				}
				return true;
			}
			return m_CurrentPacket.SendToTransport(m_Connection, m_ChannelId);
		}
	}
	internal struct ChannelPacket
	{
		private int m_Position;

		private byte[] m_Buffer;

		private bool m_IsReliable;

		public ChannelPacket(int packetSize, bool isReliable)
		{
			m_Position = 0;
			m_Buffer = new byte[packetSize];
			m_IsReliable = isReliable;
		}

		public void Reset()
		{
			m_Position = 0;
		}

		public bool IsEmpty()
		{
			return m_Position == 0;
		}

		public void Write(byte[] bytes, int numBytes)
		{
			Array.Copy(bytes, 0, m_Buffer, m_Position, numBytes);
			m_Position += numBytes;
		}

		public bool HasSpace(int numBytes)
		{
			return m_Position + numBytes <= m_Buffer.Length;
		}

		public bool SendToTransport(NetworkConnection conn, int channelId)
		{
			bool result = true;
			if (!conn.TransportSend(m_Buffer, (ushort)m_Position, channelId, out var error) && (!m_IsReliable || error != 4))
			{
				if (LogFilter.logError)
				{
					Debug.LogError((object)("Failed to send internal buffer channel:" + channelId + " bytesToSend:" + m_Position));
				}
				result = false;
			}
			if (error != 0)
			{
				if (m_IsReliable && error == 4)
				{
					return false;
				}
				if (LogFilter.logError)
				{
					Debug.LogError((object)string.Concat("Send Error: ", (object)(NetworkError)error, " channel:", channelId, " bytesToSend:", m_Position));
				}
				result = false;
			}
			m_Position = 0;
			return result;
		}
	}
	[Obsolete("The high level API classes are deprecated and will be removed in the future.")]
	public class ClientScene
	{
		private struct PendingOwner
		{
			public NetworkInstanceId netId;

			public short playerControllerId;
		}

		private static List<PlayerController> s_LocalPlayers = new List<PlayerController>();

		private static NetworkConnection s_ReadyConnection;

		private static Dictionary<NetworkSceneId, NetworkIdentity> s_SpawnableObjects;

		private static bool s_IsReady;

		private static bool s_IsSpawnFinished;

		private static NetworkScene s_NetworkScene = new NetworkScene();

		private static ObjectSpawnSceneMessage s_ObjectSpawnSceneMessage = new ObjectSpawnSceneMessage();

		private static ObjectSpawnFinishedMessage s_ObjectSpawnFinishedMessage = new ObjectSpawnFinishedMessage();

		private static ObjectDestroyMessage s_ObjectDestroyMessage = new ObjectDestroyMessage();

		private static ObjectSpawnMessage s_ObjectSpawnMessage = new ObjectSpawnMessage();

		private static OwnerMessage s_OwnerMessage = new OwnerMessage();

		private static ClientAuthorityMessage s_ClientAuthorityMessage = new ClientAuthorityMessage();

		public const int ReconnectIdInvalid = -1;

		public const int ReconnectIdHost = 0;

		private static int s_ReconnectId = -1;

		private static PeerInfoMessage[] s_Peers;

		private static List<PendingOwner> s_PendingOwnerIds = new List<PendingOwner>();

		public static List<PlayerController> localPlayers => s_LocalPlayers;

		public static bool ready => s_IsReady;

		public static NetworkConnection readyConnection => s_ReadyConnection;

		public static int reconnectId => s_ReconnectId;

		public static Dictionary<NetworkInstanceId, NetworkIdentity> objects => s_NetworkScene.localObjects;

		public static Dictionary<NetworkHash128, GameObject> prefabs => NetworkScene.guidToPrefab;

		public static Dictionary<NetworkSceneId, NetworkIdentity> spawnableObjects => s_SpawnableObjects;

		private static bool hasMigrationPending()
		{
			return s_ReconnectId != -1;
		}

		public static void SetReconnectId(int newReconnectId, PeerInfoMessage[] peers)
		{
			s_ReconnectId = newReconnectId;
			s_Peers = peers;
			if (LogFilter.logDebug)
			{
				Debug.Log((object)("ClientScene::SetReconnectId: " + newReconnectId));
			}
		}

		internal static void SetNotReady()
		{
			s_IsReady = false;
		}

		internal static void Shutdown()
		{
			s_NetworkScene.Shutdown();
			s_LocalPlayers = new List<PlayerController>();
			s_PendingOwnerIds = new List<PendingOwner>();
			s_SpawnableObjects = null;
			s_ReadyConnection = null;
			s_IsReady = false;
			s_IsSpawnFinished = false;
			s_ReconnectId = -1;
			NetworkManager.activeTransport.Shutdown();
			NetworkManager.activeTransport.Init();
		}

		internal static bool GetPlayerController(short playerControllerId, out PlayerController player)
		{
			player = null;
			if (playerControllerId >= localPlayers.Count)
			{
				if (LogFilter.logWarn)
				{
					Debug.Log((object)("ClientScene::GetPlayer: no local player found for: " + playerControllerId));
				}
				return false;
			}
			if (localPlayers[playerControllerId] == null)
			{
				if (LogFilter.logWarn)
				{
					Debug.LogWarning((object)("ClientScene::GetPlayer: local player is null for: " + playerControllerId));
				}
				return false;
			}
			player = localPlayers[playerControllerId];
			return (Object)(object)player.gameObject != (Object)null;
		}

		internal static void InternalAddPlayer(NetworkIdentity view, short playerControllerId)
		{
			if (LogFilter.logDebug)
			{
				Debug.LogWarning((object)("ClientScene::InternalAddPlayer: playerControllerId : " + playerControllerId));
			}
			if (playerControllerId >= s_LocalPlayers.Count)
			{
				if (LogFilter.logWarn)
				{
					Debug.LogWarning((object)("ClientScene::InternalAddPlayer: playerControllerId higher than expected: " + playerControllerId));
				}
				while (playerControllerId >= s_LocalPlayers.Count)
				{
					s_LocalPlayers.Add(new PlayerController());
				}
			}
			PlayerController playerController = new PlayerController
			{
				gameObject = ((Component)view).gameObject,
				playerControllerId = playerControllerId,
				unetView = view
			};
			s_LocalPlayers[playerControllerId] = playerController;
			if (s_ReadyConnection == null)
			{
				if (LogFilter.logWarn)
				{
					Debug.LogWarning((object)"No ready connection found for setting player controller during InternalAddPlayer");
				}
			}
			else
			{
				s_ReadyConnection.SetPlayerController(playerController);
			}
		}

		public static bool AddPlayer(short playerControllerId)
		{
			return AddPlayer(null, playerControllerId);
		}

		public static bool AddPlayer(NetworkConnection readyConn, short playerControllerId)
		{
			return AddPlayer(readyConn, playerControllerId, null);
		}

		public static bool AddPlayer(NetworkConnection readyConn, short playerControllerId, MessageBase extraMessage)
		{
			if (playerControllerId < 0)
			{
				if (LogFilter.logError)
				{
					Debug.LogError((object)("ClientScene::AddPlayer: playerControllerId of " + playerControllerId + " is negative"));
				}
				return false;
			}
			if (playerControllerId > 32)
			{
				if (LogFilter.logError)
				{
					Debug.LogError((object)("ClientScene::AddPlayer: playerControllerId of " + playerControllerId + " is too high, max is " + 32));
				}
				return false;
			}
			if (playerControllerId > 16 && LogFilter.logWarn)
			{
				Debug.LogWarning((object)("ClientScene::AddPlayer: playerControllerId of " + playerControllerId + " is unusually high"));
			}
			while (playerControllerId >= s_LocalPlayers.Count)
			{
				s_LocalPlayers.Add(new PlayerController());
			}
			if (readyConn == null)
			{
				if (!s_IsReady)
				{
					if (LogFilter.logError)
					{
						Debug.LogError((object)"Must call AddPlayer() with a connection the first time to become ready.");
					}
					return false;
				}
			}
			else
			{
				s_IsReady = true;
				s_ReadyConnection = readyConn;
			}
			if (s_ReadyConnection.GetPlayerController(playerControllerId, out var playerController) && playerController.IsValid && (Object)(object)playerController.gameObject != (Object)null)
			{
				if (LogFilter.logError)
				{
					Debug.LogError((object)("ClientScene::AddPlayer: playerControllerId of " + playerControllerId + " already in use."));
				}
				return false;
			}
			if (LogFilter.logDebug)
			{
				Debug.Log((object)string.Concat("ClientScene::AddPlayer() for ID ", playerControllerId, " called with connection [", s_ReadyConnection, "]"));
			}
			if (!hasMigrationPending())
			{
				AddPlayerMessage addPlayerMessage = new AddPlayerMessage();
				addPlayerMessage.playerControllerId = playerControllerId;
				if (extraMessage != null)
				{
					NetworkWriter networkWriter = new NetworkWriter();
					extraMessage.Serialize(networkWriter);
					addPlayerMessage.msgData = networkWriter.ToArray();
					addPlayerMessage.msgSize = networkWriter.Position;
				}
				s_ReadyConnection.Send(37, addPlayerMessage);
				return true;
			}
			return SendReconnectMessage(extraMessage);
		}

		public static bool SendReconnectMessage(MessageBase extraMessage)
		{
			if (!hasMigrationPending())
			{
				return false;
			}
			if (LogFilter.logDebug)
			{
				Debug.Log((object)("ClientScene::AddPlayer reconnect " + s_ReconnectId));
			}
			if (s_Peers == null)
			{
				SetReconnectId(-1, null);
				if (LogFilter.logError)
				{
					Debug.LogError((object)"ClientScene::AddPlayer: reconnecting, but no peers.");
				}
				return false;
			}
			for (int i = 0; i < s_Peers.Length; i++)
			{
				PeerInfoMessage peerInfoMessage = s_Peers[i];
				if (peerInfoMessage.playerIds == null || peerInfoMessage.connectionId != s_ReconnectId)
				{
					continue;
				}
				for (int j = 0; j < peerInfoMessage.playerIds.Length; j++)
				{
					ReconnectMessage reconnectMessage = new ReconnectMessage();
					reconnectMessage.oldConnectionId = s_ReconnectId;
					reconnectMessage.netId = peerInfoMessage.playerIds[j].netId;
					reconnectMessage.playerControllerId = peerInfoMessage.playerIds[j].playerControllerId;
					if (extraMessage != null)
					{
						NetworkWriter networkWriter = new NetworkWriter();
						extraMessage.Serialize(networkWriter);
						reconnectMessage.msgData = networkWriter.ToArray();
						reconnectMessage.msgSize = networkWriter.Position;
					}
					s_ReadyConnection.Send(47, reconnectMessage);
				}
			}
			SetReconnectId(-1, null);
			return true;
		}

		public static bool RemovePlayer(short playerControllerId)
		{
			if (LogFilter.logDebug)
			{
				Debug.Log((object)string.Concat("ClientScene::RemovePlayer() for ID ", playerControllerId, " called with connection [", s_ReadyConnection, "]"));
			}
			if (s_ReadyConnection.GetPlayerController(playerControllerId, out var playerController))
			{
				RemovePlayerMessage removePlayerMessage = new RemovePlayerMessage();
				removePlayerMessage.playerControllerId = playerControllerId;
				s_ReadyConnection.Send(38, removePlayerMessage);
				s_ReadyConnection.RemovePlayerController(playerControllerId);
				s_LocalPlayers[playerControllerId] = new PlayerController();
				Object.Destroy((Object)(object)playerController.gameObject);
				return true;
			}
			if (LogFilter.logError)
			{
				Debug.LogError((object)("Failed to find player ID " + playerControllerId));
			}
			return false;
		}

		public static bool Ready(NetworkConnection conn)
		{
			if (s_IsReady)
			{
				if (LogFilter.logError)
				{
					Debug.LogError((object)"A connection has already been set as ready. There can only be one.");
				}
				return false;
			}
			if (LogFilter.logDebug)
			{
				Debug.Log((object)string.Concat("ClientScene::Ready() called with connection [", conn, "]"));
			}
			if (conn != null)
			{
				ReadyMessage msg = new ReadyMessage();
				conn.Send(35, msg);
				s_IsReady = true;
				s_ReadyConnection = conn;
				s_ReadyConnection.isReady = true;
				return true;
			}
			if (LogFilter.logError)
			{
				Debug.LogError((object)"Ready() called with invalid connection object: conn=null");
			}
			return false;
		}

		public static NetworkClient ConnectLocalServer()
		{
			LocalClient localClient = new LocalClient();
			NetworkServer.instance.ActivateLocalClientScene();
			localClient.InternalConnectLocalServer(generateConnectMsg: true);
			return localClient;
		}

		internal static NetworkClient ReconnectLocalServer()
		{
			LocalClient localClient = new LocalClient();
			NetworkServer.instance.ActivateLocalClientScene();
			localClient.InternalConnectLocalServer(generateConnectMsg: false);
			return localClient;
		}

		internal static void ClearLocalPlayers()
		{
			s_LocalPlayers.Clear();
		}

		internal static void HandleClientDisconnect(NetworkConnection conn)
		{
			if (s_ReadyConnection == conn && s_IsReady)
			{
				s_IsReady = false;
				s_ReadyConnection = null;
			}
		}

		internal static void PrepareToSpawnSceneObjects()
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Invalid comparison between Unknown and I4
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Invalid comparison between Unknown and I4
			s_SpawnableObjects = new Dictionary<NetworkSceneId, NetworkIdentity>();
			NetworkIdentity[] array = Resources.FindObjectsOfTypeAll<NetworkIdentity>();
			foreach (NetworkIdentity networkIdentity in array)
			{
				if (!((Component)networkIdentity).gameObject.activeSelf && (int)((Object)((Component)networkIdentity).gameObject).hideFlags != 8 && (int)((Object)((Component)networkIdentity).gameObject).hideFlags != 61 && !networkIdentity.sceneId.IsEmpty())
				{
					s_SpawnableObjects[networkIdentity.sceneId] = networkIdentity;
					if (LogFilter.logDebug)
					{
						Debug.Log((object)("ClientScene::PrepareSpawnObjects sceneId:" + networkIdentity.sceneId));
					}
				}
			}
		}

		internal static NetworkIdentity SpawnSceneObject(NetworkSceneId sceneId)
		{
			if (s_SpawnableObjects.ContainsKey(sceneId))
			{
				NetworkIdentity result = s_SpawnableObjects[sceneId];
				s_SpawnableObjects.Remove(sceneId);
				return result;
			}
			return null;
		}

		internal static void RegisterSystemHandlers(NetworkClient client, bool localClient)
		{
			if (localClient)
			{
				client.RegisterHandlerSafe(1, OnLocalClientObjectDestroy);
				client.RegisterHandlerSafe(13, OnLocalClientObjectHide);
				client.RegisterHandlerSafe(3, OnLocalClientObjectSpawn);
				client.RegisterHandlerSafe(10, OnLocalClientObjectSpawnScene);
				client.RegisterHandlerSafe(15, OnClientAuthority);
			}
			else
			{
				client.RegisterHandlerSafe(3, OnObjectSpawn);
				client.RegisterHandlerSafe(10, OnObjectSpawnScene);
				client.RegisterHandlerSafe(12, OnObjectSpawnFinished);
				client.RegisterHandlerSafe(1, OnObjectDestroy);
				client.RegisterHandlerSafe(13, OnObjectDestroy);
				client.RegisterHandlerSafe(8, OnUpdateVarsMessage);
				client.RegisterHandlerSafe(4, OnOwnerMessage);
				client.RegisterHandlerSafe(9, OnSyncListMessage);
				client.RegisterHandlerSafe(40, NetworkAnimator.OnAnimationClientMessage);
				client.RegisterHandlerSafe(41, NetworkAnimator.OnAnimationParametersClientMessage);
				client.RegisterHandlerSafe(15, OnClientAuthority);
			}
			client.RegisterHandlerSafe(2, OnRPCMessage);
			client.RegisterHandlerSafe(7, OnSyncEventMessage);
			client.RegisterHandlerSafe(42, NetworkAnimator.OnAnimationTriggerClientMessage);
		}

		internal static string GetStringForAssetId(NetworkHash128 assetId)
		{
			if (NetworkScene.GetPrefab(assetId, out var prefab))
			{
				return ((Object)prefab).name;
			}
			if (NetworkScene.GetSpawnHandler(assetId, out var handler))
			{
				return handler.GetMethodName();
			}
			return "unknown";
		}

		public static void RegisterPrefab(GameObject prefab, NetworkHash128 newAssetId)
		{
			NetworkScene.RegisterPrefab(prefab, newAssetId);
		}

		public static void RegisterPrefab(GameObject prefab)
		{
			NetworkScene.RegisterPrefab(prefab);
		}

		public static void RegisterPrefab(GameObject prefab, SpawnDelegate spawnHandler, UnSpawnDelegate unspawnHandler)
		{
			NetworkScene.RegisterPrefab(prefab, spawnHandler, unspawnHandler);
		}

		public static void UnregisterPrefab(GameObject prefab)
		{
			NetworkScene.UnregisterPrefab(prefab);
		}

		public static void RegisterSpawnHandler(NetworkHash128 assetId, SpawnDelegate spawnHandler, UnSpawnDelegate unspawnHandler)
		{
			NetworkScene.RegisterSpawnHandler(assetId, spawnHandler, unspawnHandler);
		}

		public static void UnregisterSpawnHandler(NetworkHash128 assetId)
		{
			NetworkScene.UnregisterSpawnHandler(assetId);
		}

		public static void ClearSpawners()
		{
			NetworkScene.ClearSpawners();
		}

		public static void DestroyAllClientObjects()
		{
			s_NetworkScene.DestroyAllClientObjects();
		}

		public static void SetLocalObject(NetworkInstanceId netId, GameObject obj)
		{
			s_NetworkScene.SetLocalObject(netId, obj, s_IsSpawnFinished, isServer: false);
		}

		public static GameObject FindLocalObject(NetworkInstanceId netId)
		{
			return s_NetworkScene.FindLocalObject(netId);
		}

		private static void ApplySpawnPayload(NetworkIdentity uv, Vector3 position, byte[] payload, NetworkInstanceId netId, GameObject newGameObject, NetworkMessage netMsg)
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			if (!((Component)uv).gameObject.activeSelf)
			{
				((Component)uv).gameObject.SetActive(true);
			}
			((Component)uv).transform.position = position;
			if (payload != null && payload.Length != 0)
			{
				NetworkReader reader = new NetworkReader(payload);
				uv.OnUpdateVars(reader, initialState: true, netMsg);
			}
			if (!((Object)(object)newGameObject == (Object)null))
			{
				newGameObject.SetActive(true);
				uv.SetNetworkInstanceId(netId);
				SetLocalObject(netId, newGameObject);
				if (s_IsSpawnFinished)
				{
					uv.OnStartClient();
					CheckForOwner(uv);
				}
			}
		}

		private static void OnObjectSpawn(NetworkMessage netMsg)
		{
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Unknown result type (might be due to invalid IL or missing references)
			//IL_0233: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d6: Unknown result type (might be due to invalid IL or missing references)
			netMsg.ReadMessage(s_ObjectSpawnMessage);
			if (!s_ObjectSpawnMessage.assetId.IsValid())
			{
				if (LogFilter.logError)
				{
					Debug.LogError((object)string.Concat("OnObjSpawn netId: ", s_ObjectSpawnMessage.netId, " has invalid asset Id"));
				}
				return;
			}
			if (LogFilter.logDebug)
			{
				Debug.Log((object)string.Concat("Client spawn handler instantiating [netId:", s_ObjectSpawnMessage.netId, " asset ID:", s_ObjectSpawnMessage.assetId, " pos:", s_ObjectSpawnMessage.position, "]"));
			}
			GameObject prefab;
			SpawnDelegate handler;
			if (s_NetworkScene.GetNetworkIdentity(s_ObjectSpawnMessage.netId, out var uv))
			{
				ApplySpawnPayload(uv, s_ObjectSpawnMessage.position, s_ObjectSpawnMessage.payload, s_ObjectSpawnMessage.netId, null, netMsg);
			}
			else if (NetworkScene.GetPrefab(s_ObjectSpawnMessage.assetId, out prefab))
			{
				GameObject val = Object.Instantiate<GameObject>(prefab, s_ObjectSpawnMessage.position, s_ObjectSpawnMessage.rotation);
				if (LogFilter.logDebug)
				{
					Debug.Log((object)string.Concat("Client spawn handler instantiating [netId:", s_ObjectSpawnMessage.netId, " asset ID:", s_ObjectSpawnMessage.assetId, " pos:", s_ObjectSpawnMessage.position, " rotation: ", s_ObjectSpawnMessage.rotation, "]"));
				}
				uv = val.GetComponent<NetworkIdentity>();
				if ((Object)(object)uv == (Object)null)
				{
					if (LogFilter.logError)
					{
						Debug.LogError((object)string.Concat("Client object spawned for ", s_ObjectSpawnMessage.assetId, " does not have a NetworkIdentity"));
					}
				}
				else
				{
					uv.Reset();
					ApplySpawnPayload(uv, s_ObjectSpawnMessage.position, s_ObjectSpawnMessage.payload, s_ObjectSpawnMessage.netId, val, netMsg);
				}
			}
			else if (NetworkScene.GetSpawnHandler(s_ObjectSpawnMessage.assetId, out handler))
			{
				GameObject val2 = handler(s_ObjectSpawnMessage.position, s_ObjectSpawnMessage.assetId);
				if ((Object)(object)val2 == (Object)null)
				{
					if (LogFilter.logWarn)
					{
						Debug.LogWarning((object)string.Concat("Client spawn handler for ", s_ObjectSpawnMessage.assetId, " returned null"));
					}
					return;
				}
				uv = val2.GetComponent<NetworkIdentity>();
				if ((Object)(object)uv == (Object)null)
				{
					if (LogFilter.logError)
					{
						Debug.LogError((object)string.Concat("Client object spawned for ", s_ObjectSpawnMessage.assetId, " does not have a network identity"));
					}
				}
				else
				{
					uv.Reset();
					uv.SetDynamicAssetId(s_ObjectSpawnMessage.assetId);
					ApplySpawnPayload(uv, s_ObjectSpawnMessage.position, s_ObjectSpawnMessage.payload, s_ObjectSpawnMessage.netId, val2, netMsg);
				}
			}
			else if (LogFilter.logError)
			{
				Debug.LogError((object)string.Concat("Failed to spawn server object, did you forget to add it to the NetworkManager? assetId=", s_ObjectSpawnMessage.assetId, " netId=", s_ObjectSpawnMessage.netId));
			}
		}

		private static void OnObjectSpawnScene(NetworkMessage netMsg)
		{
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_015a: Unknown result type (might be due to invalid IL or missing references)
			netMsg.ReadMessage(s_ObjectSpawnSceneMessage);
			if (LogFilter.logDebug)
			{
				Debug.Log((object)string.Concat("Client spawn scene handler instantiating [netId:", s_ObjectSpawnSceneMessage.netId, " sceneId:", s_ObjectSpawnSceneMessage.sceneId, " pos:", s_ObjectSpawnSceneMessage.position));
			}
			if (s_NetworkScene.GetNetworkIdentity(s_ObjectSpawnSceneMessage.netId, out var uv))
			{
				ApplySpawnPayload(uv, s_ObjectSpawnSceneMessage.position, s_ObjectSpawnSceneMessage.payload, s_ObjectSpawnSceneMessage.netId, ((Component)uv).gameObject, netMsg);
				return;
			}
			NetworkIdentity networkIdentity = SpawnSceneObject(s_ObjectSpawnSceneMessage.sceneId);
			if ((Object)(object)networkIdentity == (Object)null)
			{
				if (LogFilter.logError)
				{
					Debug.LogError((object)("Spawn scene object not found for " + s_ObjectSpawnSceneMessage.sceneId));
				}
				return;
			}
			if (LogFilter.logDebug)
			{
				Debug.Log((object)string.Concat("Client spawn for [netId:", s_ObjectSpawnSceneMessage.netId, "] [sceneId:", s_ObjectSpawnSceneMessage.sceneId, "] obj:", ((Object)((Component)networkIdentity).gameObject).name));
			}
			ApplySpawnPayload(networkIdentity, s_ObjectSpawnSceneMessage.position, s_ObjectSpawnSceneMessage.payload, s_ObjectSpawnSceneMessage.netId, ((Component)networkIdentity).gameObject, netMsg);
		}

		private static void OnObjectSpawnFinished(NetworkMessage netMsg)
		{
			netMsg.ReadMessage(s_ObjectSpawnFinishedMessage);
			if (LogFilter.logDebug)
			{
				Debug.Log((object)("SpawnFinished:" + s_ObjectSpawnFinishedMessage.state));
			}
			if (s_ObjectSpawnFinishedMessage.state == 0)
			{
				PrepareToSpawnSceneObjects();
				s_IsSpawnFinished = false;
				return;
			}
			foreach (NetworkIdentity value in objects.Values)
			{
				if (!value.isClient)
				{
					value.OnStartClient();
					CheckForOwner(value);
				}
			}
			s_IsSpawnFinished = true;
		}

		private static void OnObjectDestroy(NetworkMessage netMsg)
		{
			netMsg.ReadMessage(s_ObjectDestroyMessage);
			if (LogFilter.logDebug)
			{
				Debug.Log((object)("ClientScene::OnObjDestroy netId:" + s_ObjectDestroyMessage.netId));
			}
			if (s_NetworkScene.GetNetworkIdentity(s_ObjectDestroyMessage.netId, out var uv))
			{
				uv.OnNetworkDestroy();
				if (!NetworkScene.InvokeUnSpawnHandler(uv.assetId, ((Component)uv).gameObject))
				{
					if (uv.sceneId.IsEmpty())
					{
						Object.Destroy((Object)(object)((Component)uv).gameObject);
					}
					else
					{
						((Component)uv).gameObject.SetActive(false);
						s_SpawnableObjects[uv.sceneId] = uv;
					}
				}
				s_NetworkScene.RemoveLocalObject(s_ObjectDestroyMessage.netId);
				uv.MarkForReset();
			}
			else if (LogFilter.logDebug)
			{
				Debug.LogWarning((object)("Did not find target for destroy message for " + s_ObjectDestroyMessage.netId));
			}
		}

		private static void OnLocalClientObjectDestroy(NetworkMessage netMsg)
		{
			netMsg.ReadMessage(s_ObjectDestroyMessage);
			if (LogFilter.logDebug)
			{
				Debug.Log((object)("ClientScene::OnLocalObjectObjDestroy netId:" + s_ObjectDestroyMessage.netId));
			}
			s_NetworkScene.RemoveLocalObject(s_ObjectDestroyMessage.netId);
		}

		private static void OnLocalClientObjectHide(NetworkMessage netMsg)
		{
			netMsg.ReadMessage(s_ObjectDestroyMessage);
			if (LogFilter.logDebug)
			{
				Debug.Log((object)("ClientScene::OnLocalObjectObjHide netId:" + s_ObjectDestroyMessage.netId));
			}
			if (s_NetworkScene.GetNetworkIdentity(s_ObjectDestroyMessage.netId, out var uv))
			{
				uv.OnSetLocalVisibility(vis: false);
			}
		}

		private static void OnLocalClientObjectSpawn(NetworkMessage netMsg)
		{
			netMsg.ReadMessage(s_ObjectSpawnMessage);
			if (s_NetworkScene.GetNetworkIdentity(s_ObjectSpawnMessage.netId, out var uv))
			{
				uv.OnSetLocalVisibility(vis: true);
			}
		}

		private static void OnLocalClientObjectSpawnScene(NetworkMessage netMsg)
		{
			netMsg.ReadMessage(s_ObjectSpawnSceneMessage);
			if (s_NetworkScene.GetNetworkIdentity(s_ObjectSpawnSceneMessage.netId, out var uv))
			{
				uv.OnSetLocalVisibility(vis: true);
			}
		}

		private static void OnUpdateVarsMessage(NetworkMessage netMsg)
		{
			NetworkInstanceId networkInstanceId = netMsg.reader.ReadNetworkId();
			if (LogFilter.logDev)
			{
				Debug.Log((object)string.Concat("ClientScene::OnUpdateVarsMessage ", networkInstanceId, " channel:", netMsg.channelId));
			}
			if (s_NetworkScene.GetNetworkIdentity(networkInstanceId, out var uv))
			{
				uv.OnUpdateVars(netMsg.reader, initialState: false, netMsg);
			}
			else if (LogFilter.logWarn)
			{
				Debug.LogWarning((object)("Did not find target for sync message for " + networkInstanceId));
			}
		}

		private static void OnRPCMessage(NetworkMessage netMsg)
		{
			int num = (int)netMsg.reader.ReadPackedUInt32();
			NetworkInstanceId networkInstanceId = netMsg.reader.ReadNetworkId();
			if (LogFilter.logDebug)
			{
				Debug.Log((object)("ClientScene::OnRPCMessage hash:" + num + " netId:" + networkInstanceId));
			}
			if (s_NetworkScene.GetNetworkIdentity(networkInstanceId, out var uv))
			{
				uv.HandleRPC(num, netMsg.reader);
			}
			else if (LogFilter.logWarn)
			{
				string cmdHashHandlerName = NetworkBehaviour.GetCmdHashHandlerName(num);
				Debug.LogWarningFormat("Could not find target object with netId:{0} for RPC call {1}", new object[2] { networkInstanceId, cmdHashHandlerName });
			}
		}

		private static void OnSyncEventMessage(NetworkMessage netMsg)
		{
			int cmdHash = (int)netMsg.reader.ReadPackedUInt32();
			NetworkInstanceId networkInstanceId = netMsg.reader.ReadNetworkId();
			if (LogFilter.logDebug)
			{
				Debug.Log((object)("ClientScene::OnSyncEventMessage " + networkInstanceId));
			}
			if (s_NetworkScene.GetNetworkIdentity(networkInstanceId, out var uv))
			{
				uv.HandleSyncEvent(cmdHash, netMsg.reader);
			}
			else if (LogFilter.logWarn)
			{
				Debug.LogWarning((object)("Did not find target for SyncEvent message for " + networkInstanceId));
			}
		}

		private static void OnSyncListMessage(NetworkMessage netMsg)
		{
			NetworkInstanceId networkInstanceId = netMsg.reader.ReadNetworkId();
			int cmdHash = (int)netMsg.reader.ReadPackedUInt32();
			if (LogFilter.logDebug)
			{
				Debug.Log((object)("ClientScene::OnSyncListMessage " + networkInstanceId));
			}
			if (s_NetworkScene.GetNetworkIdentity(networkInstanceId, out var uv))
			{
				uv.HandleSyncList(cmdHash, netMsg.reader);
			}
			else if (LogFilter.logWarn)
			{
				Debug.LogWarning((object)("Did not find target for SyncList message for " + networkInstanceId));
			}
		}

		private static void OnClientAuthority(NetworkMessage netMsg)
		{
			netMsg.ReadMessage(s_ClientAuthorityMessage);
			if (LogFilter.logDebug)
			{
				Debug.Log((object)("ClientScene::OnClientAuthority for  connectionId=" + netMsg.conn.connectionId + " netId: " + s_ClientAuthorityMessage.netId));
			}
			if (s_NetworkScene.GetNetworkIdentity(s_ClientAuthorityMessage.netId, out var uv))
			{
				uv.HandleClientAuthority(s_ClientAuthorityMessage.authority);
			}
		}

		private static void OnOwnerMessage(NetworkMessage netMsg)
		{
			netMsg.ReadMessage(s_OwnerMessage);
			if (LogFilter.logDebug)
			{
				Debug.Log((object)("ClientScene::OnOwnerMessage - connectionId=" + netMsg.conn.connectionId + " netId: " + s_OwnerMessage.netId));
			}
			if (netMsg.conn.GetPlayerController(s_OwnerMessage.playerControllerId, out var playerController))
			{
				playerController.unetView.SetNotLocalPlayer();
			}
			if (s_NetworkScene.GetNetworkIdentity(s_OwnerMessage.netId, out var uv))
			{
				uv.SetConnectionToServer(netMsg.conn);
				uv.SetLocalPlayer(s_OwnerMessage.playerControllerId);
				InternalAddPlayer(uv, s_OwnerMessage.playerControllerId);
			}
			else
			{
				PendingOwner pendingOwner = default(PendingOwner);
				pendingOwner.netId = s_OwnerMessage.netId;
				pendingOwner.playerControllerId = s_OwnerMessage.playerControllerId;
				PendingOwner item = pendingOwner;
				s_PendingOwnerIds.Add(item);
			}
		}

		private static void CheckForOwner(NetworkIdentity uv)
		{
			for (int i = 0; i < s_PendingOwnerIds.Count; i++)
			{
				PendingOwner pendingOwner = s_PendingOwnerIds[i];
				if (!(pendingOwner.netId == uv.netId))
				{
					continue;
				}
				uv.SetConnectionToServer(s_ReadyConnection);
				uv.SetLocalPlayer(pendingOwner.playerControllerId);
				if (LogFilter.logDev)
				{
					Debug.Log((object)("ClientScene::OnOwnerMessage - player=" + ((Object)((Component)uv).gameObject).name));
				}
				if (s_ReadyConnection.connectionId < 0)
				{
					if (LogFilter.logError)
					{
						Debug.LogError((object)"Owner message received on a local client.");
					}
				}
				else
				{
					InternalAddPlayer(uv, pendingOwner.playerControllerId);
					s_PendingOwnerIds.RemoveAt(i);
				}
				break;
			}
		}
	}
	internal class ConnectionArray
	{
		private List<NetworkConnection> m_LocalConnections;

		private List<NetworkConnection> m_Connections;

		internal List<NetworkConnection> localConnections => m_LocalConnections;

		internal List<NetworkConnection> connections => m_Connections;

		public int Count => m_Connections.Count;

		public int LocalIndex => -m_LocalConnections.Count;

		public ConnectionArray()
		{
			m_Connections = new List<NetworkConnection>();
			m_LocalConnections = new List<NetworkConnection>();
		}

		public int Add(int connId, NetworkConnection conn)
		{
			if (connId < 0)
			{
				if (LogFilter.logWarn)
				{
					Debug.LogWarning((object)("ConnectionArray Add bad id " + connId));
				}
				return -1;
			}
			if (connId < m_Connections.Count && m_Connections[connId] != null)
			{
				if (LogFilter.logWarn)
				{
					Debug.LogWarning((object)("ConnectionArray Add dupe at " + connId));
				}
				return -1;
			}
			while (connId > m_Connections.Count - 1)
			{
				m_Connections.Add(null);
			}
			m_Connections[connId] = conn;
			return connId;
		}

		public NetworkConnection Get(int connId)
		{
			if (connId < 0)
			{
				return m_LocalConnections[Mathf.Abs(connId) - 1];
			}
			if (connId > m_Connections.Count)
			{
				if (LogFilter.logWarn)
				{
					Debug.LogWarning((object)("ConnectionArray Get invalid index " + connId));
				}
				return null;
			}
			return m_Connections[connId];
		}

		public NetworkConnection GetUnsafe(int connId)
		{
			if (connId < 0 || connId > m_Connections.Count)
			{
				return null;
			}
			return m_Connections[connId];
		}

		public void Remove(int connId)
		{
			if (connId < 0)
			{
				m_LocalConnections[Mathf.Abs(connId) - 1] = null;
			}
			else if (connId > m_Connections.Count)
			{
				if (LogFilter.logWarn)
				{
					Debug.LogWarning((object)("ConnectionArray Remove invalid index " + connId));
				}
			}
			else
			{
				m_Connections[connId] = null;
			}
		}

		public int AddLocal(NetworkConnection conn)
		{
			m_LocalConnections.Add(conn);
			return conn.connectionId = -m_LocalConnections.Count;
		}

		public bool ContainsPlayer(GameObject player, out NetworkConnection conn)
		{
			conn = null;
			if ((Object)(object)player == (Object)null)
			{
				return false;
			}
			for (int i = LocalIndex; i < m_Connections.Count; i++)
			{
				conn = Get(i);
				if (conn == null)
				{
					continue;
				}
				for (int j = 0; j < conn.playerControllers.Count; j++)
				{
					if (conn.playerControllers[j].IsValid && (Object)(object)conn.playerControllers[j].gameObject == (Object)(object)player)
					{
						return true;
					}
				}
			}
			return false;
		}
	}
	[AttributeUsage(AttributeTargets.Class)]
	[Obsolete("The high level API classes are deprecated and will be removed in the future.")]
	public class NetworkSettingsAttribute : Attribute
	{
		public int channel;

		public float sendInterval = 0.1f;
	}
	[AttributeUsage(AttributeTargets.Field)]
	[Obsolete("The high level API classes are deprecated and will be removed in the future.")]
	public class SyncVarAttribute : Attribute
	{
		public string hook;
	}
	[AttributeUsage(AttributeTargets.Method)]
	[Obsolete("The high level API classes are deprecated and will be removed in the future.")]
	public class CommandAttribute : Attribute
	{
		public int channel;
	}
	[AttributeUsage(AttributeTargets.Method)]
	[Obsolete("The high level API classes are deprecated and will be removed in the future.")]
	public class ClientRpcAttribute : Attribute
	{
		public int channel;
	}
	[AttributeUsage(AttributeTargets.Method)]
	[Obsolete("The high level API classes are deprecated and will be removed in the future.")]
	public class TargetRpcAttribute : Attribute
	{
		public int channel;
	}
	[AttributeUsage(AttributeTargets.Event)]
	[Obsolete("The high level API classes are deprecated and will be removed in the future.")]
	public class SyncEventAttribute : Attribute
	{
		public int channel;
	}
	[AttributeUsage(AttributeTargets.Method)]
	[Obsolete("The high level API classes are deprecated and will be removed in the future.")]
	public class ServerAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Method)]
	[Obsolete("The high level API classes are deprecated and will be removed in the future.")]
	public class ServerCallbackAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Method)]
	[Obsolete("The high level API classes are deprecated and will be removed in the future.")]
	public class ClientAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Method)]
	[Obsolete("The high level API classes are deprecated and will be removed in the future.")]
	public class ClientCallbackAttribute : Attribute
	{
	}
	[Obsolete("The high level API classes are deprecated and will be removed in the future.")]
	internal class DefaultNetworkTransport : INetworkTransport
	{
		public bool IsStarted => NetworkTransport.IsStarted;

		public int AddHost(HostTopology topology, int port, string ip)
		{
			return NetworkTransport.AddHost(topology, port, ip);
		}

		public int AddHostWithSimulator(HostTopology topology, int minTimeout, int maxTimeout, int port)
		{
			return NetworkTransport.AddHostWithSimulator(topology, minTimeout, maxTimeout, port);
		}

		public int AddWebsocketHost(HostTopology topology, int port, string ip)
		{
			return NetworkTransport.AddWebsocketHost(topology, port, ip);
		}

		public int Connect(int hostId, string address, int port, int specialConnectionId, out byte error)
		{
			return NetworkTransport.Connect(hostId, address, port, specialConnectionId, ref error);
		}

		public void ConnectAsNetworkHost(int hostId, string address, int port, NetworkID network, SourceID source, NodeID node, out byte error)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			NetworkTransport.ConnectAsNetworkHost(hostId, address, port, network, source, node, ref error);
		}

		public int ConnectEndPoint(int hostId, EndPoint endPoint, int specialConnectionId, out byte error)
		{
			return NetworkTransport.ConnectEndPoint(hostId, endPoint, specialConnectionId, ref error);
		}

		public int ConnectToNetworkPeer(int hostId, string address, int port, int specialConnectionId, int relaySlotId, NetworkID network, SourceID source, NodeID node, out byte error)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			return NetworkTransport.ConnectToNetworkPeer(hostId, address, port, specialConnectionId, relaySlotId, network, source, node, ref error);
		}

		public int ConnectWithSimulator(int hostId, string address, int port, int specialConnectionId, out byte error, ConnectionSimulatorConfig conf)
		{
			return NetworkTransport.ConnectWithSimulator(hostId, address, port, specialConnectionId, ref error, conf);
		}

		public bool Disconnect(int hostId, int connectionId, out byte error)
		{
			return NetworkTransport.Disconnect(hostId, connectionId, ref error);
		}

		public bool DoesEndPointUsePlatformProtocols(EndPoint endPoint)
		{
			return NetworkTransport.DoesEndPointUsePlatformProtocols(endPoint);
		}

		public void GetBroadcastConnectionInfo(int hostId, out string address, out int port, out byte error)
		{
			NetworkTransport.GetBroadcastConnectionInfo(hostId, ref address, ref port, ref error);
		}

		public void GetBroadcastConnectionMessage(int hostId, byte[] buffer, int bufferSize, out int receivedSize, out byte error)
		{
			NetworkTransport.GetBroadcastConnectionMessage(hostId, buffer, bufferSize, ref receivedSize, ref error);
		}

		public void GetConnectionInfo(int hostId, int connectionId, out string address, out int port, out NetworkID network, out NodeID dstNode, out byte error)
		{
			NetworkTransport.GetConnectionInfo(hostId, connectionId, ref address, ref port, ref network, ref dstNode, ref error);
		}

		public int GetCurrentRTT(int hostId, int connectionId, out byte error)
		{
			return NetworkTransport.GetCurrentRTT(hostId, connectionId, ref error);
		}

		public void Init()
		{
			NetworkTransport.Init();
		}

		public void Init(GlobalConfig config)
		{
			NetworkTransport.Init(config);
		}

		public NetworkEventType Receive(out int hostId, out int connectionId, out int channelId, byte[] buffer, int bufferSize, out int receivedSize, out byte error)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			return NetworkTransport.Receive(ref hostId, ref connectionId, ref channelId, buffer, bufferSize, ref receivedSize, ref error);
		}

		public NetworkEventType ReceiveFromHost(int hostId, out int connectionId, out int channelId, byte[] buffer, int bufferSize, out int receivedSize, out byte error)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			return NetworkTransport.ReceiveFromHost(hostId, ref connectionId, ref channelId, buffer, bufferSize, ref receivedSize, ref error);
		}

		public NetworkEventType ReceiveRelayEventFromHost(int hostId, out byte error)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			return NetworkTransport.ReceiveRelayEventFromHost(hostId, ref error);
		}

		public bool RemoveHost(int hostId)
		{
			return NetworkTransport.RemoveHost(hostId);
		}

		public bool Send(int hostId, int connectionId, int channelId, byte[] buffer, int size, out byte error)
		{
			return NetworkTransport.Send(hostId, connectionId, channelId, buffer, size, ref error);
		}

		public void SetBroadcastCredentials(int hostId, int key, int version, int subversion, out byte error)
		{
			NetworkTransport.SetBroadcastCredentials(hostId, key, version, subversion, ref error);
		}

		public void SetPacketStat(int direction, int packetStatId, int numMsgs, int numBytes)
		{
			NetworkTransport.SetPacketStat(direction, packetStatId, numMsgs, numBytes);
		}

		public void Shutdown()
		{
			NetworkTransport.Shutdown();
		}

		public bool StartBroadcastDiscovery(int hostId, int broadcastPort, int key, int version, int subversion, byte[] buffer, int size, int timeout, out byte error)
		{
			return NetworkTransport.StartBroadcastDiscovery(hostId, broadcastPort, key, version, subversion, buffer, size, timeout, ref error);
		}

		public void StopBroadcastDiscovery()
		{
			NetworkTransport.StopBroadcastDiscovery();
		}
	}
	internal static class DotNetCompatibility
	{
		internal static string GetMethodName(this Delegate func)
		{
			return func.Method.Name;
		}

		internal static Type GetBaseType(this Type type)
		{
			return type.BaseType;
		}

		internal static string GetErrorCode(this SocketException e)
		{
			return e.ErrorCode.ToString();
		}
	}
	[Obsolete("The high level API classes are deprecated and will be removed in the future.")]
	public interface INetworkTransport
	{
		bool IsStarted { get; }

		void Init();

		void Init(GlobalConfig config);

		void Shutdown();

		int AddHost(HostTopology topology, int port, string ip);

		int AddWebsocketHost(HostTopology topology, int port, string ip);

		int ConnectWithSimulator(int hostId, string address, int port, int specialConnectionId, out byte error, ConnectionSimulatorConfig conf);

		int Connect(int hostId, string address, int port, int specialConnectionId, out byte error);

		void ConnectAsNetworkHost(int hostId, string address, int port, NetworkID network, SourceID source, NodeID node, out byte error);

		int ConnectToNetworkPeer(int hostId, string address, int port, int specialConnectionId, int relaySlotId, NetworkID network, SourceID source, NodeID node, out byte error);

		int ConnectEndPoint(int hostId, EndPoint endPoint, int specialConnectionId, out byte error);

		bool DoesEndPointUsePlatformProtocols(EndPoint endPoint);

		int AddHostWithSimulator(HostTopology topology, int minTimeout, int maxTimeout, int port);

		bool RemoveHost(int hostId);

		bool Send(int hostId, int connectionId, int channelId, byte[] buffer, int size, out byte error);

		NetworkEventType Receive(out int hostId, out int connectionId, out int channelId, byte[] buffer, int bufferSize, out int receivedSize, out byte error);

		NetworkEventType ReceiveFromHost(int hostId, out int connectionId, out int channelId, byte[] buffer, int bufferSize, out int receivedSize, out byte error);

		NetworkEventType ReceiveRelayEventFromHost(int hostId, out byte error);

		int GetCurrentRTT(int hostId, int connectionId, out byte error);

		void GetConnectionInfo(int hostId, int connectionId, out string address, out int port, out NetworkID network, out NodeID dstNode, out byte error);

		bool Disconnect(int hostId, int connectionId, out byte error);

		void SetBroadcastCredentials(int hostId, int key, int version, int subversion, out byte error);

		bool StartBroadcastDiscovery(int hostId, int broadcastPort, int key, int version, int subversion, byte[] buffer, int size, int timeout, out byte error);

		void GetBroadcastConnectionInfo(int hostId, out string address, out int port, out byte error);

		void GetBroadcastConnectionMessage(int hostId, byte[] buffer, int bufferSize, out int receivedSize, out byte error);

		void StopBroadcastDiscovery();

		void SetPacketStat(int direction, int packetStatId, int numMsgs, int numBytes);
	}
	internal sealed class LocalClient : NetworkClient
	{
		private struct InternalMsg
		{
			internal byte[] buffer;

			internal int channelId;
		}

		private const int k_InitialFreeMessagePoolSize = 64;

		private List<InternalMsg> m_InternalMsgs = new List<InternalMsg>();

		private List<InternalMsg> m_InternalMsgs2 = new List<InternalMsg>();

		private Stack<InternalMsg> m_FreeMessages;

		private NetworkServer m_LocalServer;

		private bool m_Connected;

		private NetworkMessage s_InternalMessage = new NetworkMessage();

		public override void Disconnect()
		{
			ClientScene.HandleClientDisconnect(m_Connection);
			if (m_Connected)
			{
				PostInternalMessage(33);
				m_Connected = false;
			}
			m_AsyncConnect = ConnectState.Disconnected;
			m_LocalServer.RemoveLocalClient(m_Connection);
		}

		internal void InternalConnectLocalServer(bool generateConnectMsg)
		{
			if (m_FreeMessages == null)
			{
				m_FreeMessages = new Stack<InternalMsg>();
				for (int i = 0; i < 64; i++)
				{
					m_FreeMessages.Push(default(InternalMsg));
				}
			}
			m_LocalServer = NetworkServer.instance;
			m_Connection = new ULocalConnectionToServer(m_LocalServer);
			SetHandlers(m_Connection);
			m_Connection.connectionId = m_LocalServer.AddLocalClient(this);
			m_AsyncConnect = ConnectState.Connected;
			NetworkClient.SetActive(state: true);
			RegisterSystemHandlers(localClient: true);
			if (generateConnectMsg)
			{
				PostInternalMessage(32);
			}
			m_Connected = true;
		}

		internal override void Update()
		{
			ProcessInternalMessages();
		}

		internal void AddLocalPlayer(PlayerController localPlayer)
		{
			if (LogFilter.logDev)
			{
				Debug.Log((object)("Local client AddLocalPlayer " + ((Object)localPlayer.gameObject).name + " conn=" + m_Connection.connectionId));
			}
			m_Connection.isReady = true;
			m_Connection.SetPlayerController(localPlayer);
			NetworkIdentity unetView = localPlayer.unetView;
			if ((Object)(object)unetView != (Object)null)
			{
				ClientScene.SetLocalObject(unetView.netId, localPlayer.gameObject);
				unetView.SetConnectionToServer(m_Connection);
			}
			ClientScene.InternalAddPlayer(unetView, localPlayer.playerControllerId);
		}

		private void PostInternalMessage(byte[] buffer, int channelId)
		{
			InternalMsg item = ((m_FreeMessages.Count != 0) ? m_FreeMessages.Pop() : default(InternalMsg));
			item.buffer = buffer;
			item.channelId = channelId;
			m_InternalMsgs.Add(item);
		}

		private void PostInternalMessage(short msgType)
		{
			NetworkWriter networkWriter = new NetworkWriter();
			networkWriter.StartMessage(msgType);
			networkWriter.FinishMessage();
			PostInternalMessage(networkWriter.AsArray(), 0);
		}

		private void ProcessInternalMessages()
		{
			if (m_InternalMsgs.Count == 0)
			{
				return;
			}
			List<InternalMsg> internalMsgs = m_InternalMsgs;
			m_InternalMsgs = m_InternalMsgs2;
			for (int i = 0; i < internalMsgs.Count; i++)
			{
				InternalMsg item = internalMsgs[i];
				if (s_InternalMessage.reader == null)
				{
					s_InternalMessage.reader = new NetworkReader(item.buffer);
				}
				else
				{
					s_InternalMessage.reader.Replace(item.buffer);
				}
				s_InternalMessage.reader.ReadInt16();
				s_InternalMessage.channelId = item.channelId;
				s_InternalMessage.conn = base.connection;
				s_InternalMessage.msgType = s_InternalMessage.reader.ReadInt16();
				m_Connection.InvokeHandler(s_InternalMessage);
				m_FreeMessages.Push(item);
				base.connection.lastMessageTime = Time.time;
			}
			m_InternalMsgs = internalMsgs;
			m_InternalMsgs.Clear();
			for (int j = 0; j < m_InternalMsgs2.Count; j++)
			{
				m_InternalMsgs.Add(m_InternalMsgs2[j]);
			}
			m_InternalMsgs2.Clear();
		}

		internal void InvokeHandlerOnClient(short msgType, MessageBase msg, int channelId)
		{
			NetworkWriter networkWriter = new NetworkWriter();
			networkWriter.StartMessage(msgType);
			msg.Serialize(networkWriter);
			networkWriter.FinishMessage();
			InvokeBytesOnClient(networkWriter.AsArray(), channelId);
		}

		internal void InvokeBytesOnClient(byte[] buffer, int channelId)
		{
			PostInternalMessage(buffer, channelId);
		}
	}
	internal class ULocalConnectionToClient : NetworkConnection
	{
		private LocalClient m_LocalClient;

		public LocalClient localClient => m_LocalClient;

		public ULocalConnectionToClient(LocalClient localClient)
		{
			address = "localClient";
			m_LocalClient = localClient;
		}

		public override bool Send(short msgType, MessageBase msg)
		{
			m_LocalClient.InvokeHandlerOnClient(msgType, msg, 0);
			return true;
		}

		public override bool SendUnreliable(short msgType, MessageBase msg)
		{
			m_LocalClient.InvokeHandlerOnClient(msgType, msg, 1);
			return true;
		}

		public override bool SendByChannel(short msgType, MessageBase msg, int channelId)
		{
			m_LocalClient.InvokeHandlerOnClient(msgType, msg, channelId);
			return true;
		}

		public override bool SendBytes(byte[] bytes, int numBytes, int channelId)
		{
			m_LocalClient.InvokeBytesOnClient(bytes, channelId);
			return true;
		}

		public override bool SendWriter(NetworkWriter writer, int channelId)
		{
			m_LocalClient.InvokeBytesOnClient(writer.AsArray(), channelId);
			return true;
		}

		public override void GetStatsOut(out int numMsgs, out int numBufferedMsgs, out int numBytes, out int lastBufferedPerSecond)
		{
			numMsgs = 0;
			numBufferedMsgs = 0;
			numBytes = 0;
			lastBufferedPerSecond = 0;
		}

		public override void GetStatsIn(out int numMsgs, out int numBytes)
		{
			numMsgs = 0;
			numBytes = 0;
		}
	}
	internal class ULocalConnectionToServer : NetworkConnection
	{
		private NetworkServer m_LocalServer;

		public ULocalConnectionToServer(NetworkServer localServer)
		{
			address = "localServer";
			m_LocalServer = localServer;
		}

		public override bool Send(short msgType, MessageBase msg)
		{
			return m_LocalServer.InvokeHandlerOnServer(this, msgType, msg, 0);
		}

		public override bool SendUnreliable(short msgType, MessageBase msg)
		{
			return m_LocalServer.InvokeHandlerOnServer(this, msgType, msg, 1);
		}

		public override bool SendByChannel(short msgType, MessageBase msg, int channelId)
		{
			return m_LocalServer.InvokeHandlerOnServer(this, msgType, msg, channelId);
		}

		public override bool SendBytes(byte[] bytes, int numBytes, int channelId)
		{
			if (numBytes <= 0)
			{
				if (LogFilter.logError)
				{
					Debug.LogError((object)"LocalConnection:SendBytes cannot send zero bytes");
				}
				return false;
			}
			return m_LocalServer.InvokeBytes(this, bytes, numBytes, channelId);
		}

		public override bool SendWriter(NetworkWriter writer, int channelId)
		{
			return m_LocalServer.InvokeBytes(this, writer.AsArray(), (short)writer.AsArray().Length, channelId);
		}

		public override void GetStatsOut(out int numMsgs, out int numBufferedMsgs, out int numBytes, out int lastBufferedPerSecond)
		{
			numMsgs = 0;
			numBufferedMsgs = 0;
			numBytes = 0;
			lastBufferedPerSecond = 0;
		}

		public override void GetStatsIn(out int numMsgs, out int numBytes)
		{
			numMsgs = 0;
			numBytes = 0;
		}
	}
	[Obsolete("The high level API classes are deprecated and will be removed in the future.")]
	public class LogFilter
	{
		public enum FilterLevel
		{
			Developer = 0,
			Debug = 1,
			Info = 2,
			Warn = 3,
			Error = 4,
			Fatal = 5,
			SetInScripting = -1
		}

		internal const int Developer = 0;

		internal const int SetInScripting = -1;

		public const int Debug = 1;

		public const int Info = 2;

		public const int Warn = 3;

		public const int Error = 4;

		public const int Fatal = 5;

		[Obsolete("Use LogFilter.currentLogLevel instead")]
		public static FilterLevel current = FilterLevel.Info;

		private static int s_CurrentLogLevel = 2;

		public static int currentLogLevel
		{
			get
			{
				return s_CurrentLogLevel;
			}
			set
			{
				s_CurrentLogLevel = value;
			}
		}

		internal static bool logDev => s_CurrentLogLevel <= 0;

		public static bool logDebug => s_CurrentLogLevel <= 1;

		public static bool logInfo => s_CurrentLogLevel <= 2;

		public static bool logWarn => s_CurrentLogLevel <= 3;

		public static bool logError => s_CurrentLogLevel <= 4;

		public static bool logFatal => s_CurrentLogLevel <= 5;
	}
	[Obsolete("The high level API classes are deprecated and will be removed in the future.")]
	public abstract class MessageBase
	{
		public virtual void Deserialize(NetworkReader reader)
		{
		}

		public virtual void Serialize(NetworkWriter writer)
		{
		}
	}
	[DisallowMultipleComponent]
	[AddComponentMenu("Network/NetworkAnimator")]
	[RequireComponent(typeof(NetworkIdentity))]
	[RequireComponent(typeof(Animator))]
	[Obsolete("The high level API classes are deprecated and will be removed in the future.")]
	public class NetworkAnimator : NetworkBehaviour
	{
		[SerializeField]
		private Animator m_Animator;

		[SerializeField]
		private uint m_ParameterSendBits;

		private static AnimationMessage s_AnimationMessage = new AnimationMessage();

		private static AnimationParametersMessage s_AnimationParametersMessage = new AnimationParametersMessage();

		private static AnimationTriggerMessage s_AnimationTriggerMessage = new AnimationTriggerMessage();

		private int m_AnimationHash;

		private int m_TransitionHash;

		private NetworkWriter m_ParameterWriter;

		private float m_SendTimer;

		public string param0;

		public string param1;

		public string param2;

		public string param3;

		public string param4;

		public string param5;

		public Animator animator
		{
			get
			{
				return m_Animator;
			}
			set
			{
				m_Animator = value;
				ResetParameterOptions();
			}
		}

		private bool sendMessagesAllowed
		{
			get
			{
				if (base.isServer)
				{
					if (!base.localPlayerAuthority)
					{
						return true;
					}
					if ((Object)(object)base.netIdentity != (Object)null && base.netIdentity.clientAuthorityOwner == null)
					{
						return true;
					}
				}
				if (base.hasAuthority)
				{
					return true;
				}
				return false;
			}
		}

		public void SetParameterAutoSend(int index, bool value)
		{
			if (value)
			{
				m_ParameterSendBits |= (uint)(1 << index);
			}
			else
			{
				m_ParameterSendBits &= (uint)(~(1 << index));
			}
		}

		public bool GetParameterAutoSend(int index)
		{
			return (m_ParameterSendBits & (uint)(1 << index)) != 0;
		}

		internal void ResetParameterOptions()
		{
			Debug.Log((object)"ResetParameterOptions");
			m_ParameterSendBits = 0u;
		}

		private void FixedUpdate()
		{
			if (sendMessagesAllowed)
			{
				if (m_ParameterWriter == null)
				{
					m_ParameterWriter = new NetworkWriter();
				}
				CheckSendRate();
				if (CheckAnimStateChanged(out var stateHash, out var normalizedTime))
				{
					AnimationMessage animationMessage = new AnimationMessage();
					animationMessage.netId = base.netId;
					animationMessage.stateHash = stateHash;
					animationMessage.normalizedTime = normalizedTime;
					m_ParameterWriter.SeekZero();
					WriteParameters(m_ParameterWriter, autoSend: false);
					animationMessage.parameters = m_ParameterWriter.ToArray();
					SendMessage(40, animationMessage);
				}
			}
		}

		private bool CheckAnimStateChanged(out int stateHash, out float normalizedTime)
		{
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			stateHash = 0;
			normalizedTime = 0f;
			if (m_Animator.IsInTransition(0))
			{
				AnimatorTransitionInfo animatorTransitionInfo = m_Animator.GetAnimatorTransitionInfo(0);
				if (((AnimatorTransitionInfo)(ref animatorTransitionInfo)).fullPathHash != m_TransitionHash)
				{
					m_TransitionHash = ((AnimatorTransitionInfo)(ref animatorTransitionInfo)).fullPathHash;
					m_AnimationHash = 0;
					return true;
				}
				return false;
			}
			AnimatorStateInfo currentAnimatorStateInfo = m_Animator.GetCurrentAnimatorStateInfo(0);
			if (((AnimatorStateInfo)(ref currentAnimatorStateInfo)).fullPathHash != m_AnimationHash)
			{
				if (m_AnimationHash != 0)
				{
					stateHash = ((AnimatorStateInfo)(ref currentAnimatorStateInfo)).fullPathHash;
					normalizedTime = ((AnimatorStateInfo)(ref currentAnimatorStateInfo)).normalizedTime;
				}
				m_TransitionHash = 0;
				m_AnimationHash = ((AnimatorStateInfo)(ref currentAnimatorStateInfo)).fullPathHash;
				return true;
			}
			return false;
		}

		private void CheckSendRate()
		{
			if (sendMessagesAllowed && GetNetworkSendInterval() != 0f && m_SendTimer < Time.time)
			{
				m_SendTimer = Time.time + GetNetworkSendInterval();
				AnimationParametersMessage animationParametersMessage = new AnimationParametersMessage();
				animationParametersMessage.netId = base.netId;
				m_ParameterWriter.SeekZero();
				WriteParameters(m_ParameterWriter, autoSend: true);
				animationParametersMessage.parameters = m_ParameterWriter.ToArray();
				SendMessage(41, animationParametersMessage);
			}
		}

		private void SendMessage(short type, MessageBase msg)
		{
			if (base.isServer)
			{
				NetworkServer.SendToReady(((Component)this).gameObject, type, msg);
			}
			else if (ClientScene.readyConnection != null)
			{
				ClientScene.readyConnection.Send(type, msg);
			}
		}

		private void SetSendTrackingParam(string p, int i)
		{
			p = "Sent Param: " + p;
			if (i == 0)
			{
				param0 = p;
			}
			if (i == 1)
			{
				param1 = p;
			}
			if (i == 2)
			{
				param2 = p;
			}
			if (i == 3)
			{
				param3 = p;
			}
			if (i == 4)
			{
				param4 = p;
			}
			if (i == 5)
			{
				param5 = p;
			}
		}

		private void SetRecvTrackingParam(string p, int i)
		{
			p = "Recv Param: " + p;
			if (i == 0)
			{
				param0 = p;
			}
			if (i == 1)
			{
				param1 = p;
			}
			if (i == 2)
			{
				param2 = p;
			}
			if (i == 3)
			{
				param3 = p;
			}
			if (i == 4)
			{
				param4 = p;
			}
			if (i == 5)
			{
				param5 = p;
			}
		}

		internal void HandleAnimMsg(AnimationMessage msg, NetworkReader reader)
		{
			if (!base.hasAuthority)
			{
				if (msg.stateHash != 0)
				{
					m_Animator.Play(msg.stateHash, 0, msg.normalizedTime);
				}
				ReadParameters(reader, autoSend: false);
			}
		}

		internal void HandleAnimParamsMsg(AnimationParametersMessage msg, NetworkReader reader)
		{
			if (!base.hasAuthority)
			{
				ReadParameters(reader, autoSend: true);
			}
		}

		internal void HandleAnimTriggerMsg(int hash)
		{
			m_Animator.SetTrigger(hash);
		}

		private void WriteParameters(NetworkWriter writer, bool autoSend)
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Invalid comparison between Unknown and I4
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Invalid comparison between Unknown and I4
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: Invalid comparison between Unknown and I4
			for (int i = 0; i < m_Animator.parameters.Length; i++)
			{
				if (!autoSend || GetParameterAutoSend(i))
				{
					AnimatorControllerParameter val = m_Animator.parameters[i];
					if ((int)val.type == 3)
					{
						writer.WritePackedUInt32((uint)m_Animator.GetInteger(val.nameHash));
						SetSendTrackingParam(val.name + ":" + m_Animator.GetInteger(val.nameHash), i);
					}
					if ((int)val.type == 1)
					{
						writer.Write(m_Animator.GetFloat(val.nameHash));
						SetSendTrackingParam(val.name + ":" + m_Animator.GetFloat(val.nameHash), i);
					}
					if ((int)val.type == 4)
					{
						writer.Write(m_Animator.GetBool(val.nameHash));
						SetSendTrackingParam(val.name + ":" + m_Animator.GetBool(val.nameHash), i);
					}
				}
			}
		}

		private void ReadParameters(NetworkReader reader, bool autoSend)
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Invalid comparison between Unknown and I4
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Invalid comparison between Unknown and I4
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Invalid comparison between Unknown and I4
			for (int i = 0; i < m_Animator.parameters.Length; i++)
			{
				if (!autoSend || GetParameterAutoSend(i))
				{
					AnimatorControllerParameter val = m_Animator.parameters[i];
					if ((int)val.type == 3)
					{
						int num = (int)reader.ReadPackedUInt32();
						m_Animator.SetInteger(val.nameHash, num);
						SetRecvTrackingParam(val.name + ":" + num, i);
					}
					if ((int)val.type == 1)
					{
						float num2 = reader.ReadSingle();
						m_Animator.SetFloat(val.nameHash, num2);
						SetRecvTrackingParam(val.name + ":" + num2, i);
					}
					if ((int)val.type == 4)
					{
						bool flag = reader.ReadBoolean();
						m_Animator.SetBool(val.nameHash, flag);
						SetRecvTrackingParam(val.name + ":" + flag, i);
					}
				}
			}
		}

		public override bool OnSerialize(NetworkWriter writer, bool forceAll)
		{
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: 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)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			if (forceAll)
			{
				if (m_Animator.IsInTransition(0))
				{
					AnimatorStateInfo nextAnimatorStateInfo = m_Animator.GetNextAnimatorStateInfo(0);
					writer.Write(((AnimatorStateInfo)(ref nextAnimatorStateInfo)).fullPathHash);
					writer.Write(((AnimatorStateInfo)(ref nextAnimatorStateInfo)).normalizedTime);
				}
				else
				{
					AnimatorStateInfo currentAnimatorStateInfo = m_Animator.GetCurrentAnimatorStateInfo(0);
					writer.Write(((AnimatorStateInfo)(ref currentAnimatorStateInfo)).fullPathHash);
					writer.Write(((AnimatorStateInfo)(ref currentAnimatorStateInfo)).normalizedTime);
				}
				WriteParameters(writer, autoSend: false);
				return true;
			}
			return false;
		}

		public override void OnDeserialize(NetworkReader reader, bool initialState)
		{
			if (initialState)
			{
				int num = reader.ReadInt32();
				float num2 = reader.ReadSingle();
				ReadParameters(reader, autoSend: false);
				m_Animator.Play(num, 0, num2);
			}
		}

		public void SetTrigger(string triggerName)
		{
			SetTrigger(Animator.StringToHash(triggerName));
		}

		public void SetTrigger(int hash)
		{
			AnimationTriggerMessage animationTriggerMessage = new AnimationTriggerMessage();
			animationTriggerMessage.netId = base.netId;
			animationTriggerMessage.hash = hash;
			if (base.hasAuthority && base.localPlayerAuthority)
			{
				if (NetworkClient.allClients.Count > 0)
				{
					ClientScene.readyConnection?.Send(42, animationTriggerMessage);
				}
			}
			else if (base.isServer && !base.localPlayerAuthority)
			{
				NetworkServer.SendToReady(((Component)this).gameObject, 42, animationTriggerMessage);
			}
		}

		internal static void OnAnimationServerMessage(NetworkMessage netMsg)
		{
			netMsg.ReadMessage(s_AnimationMessage);
			if (LogFilter.logDev)
			{
				Debug.Log((object)string.Concat("OnAnimationMessage for netId=", s_AnimationMessage.netId, " conn=", netMsg.conn));
			}
			GameObject val = NetworkServer.FindLocalObject(s_AnimationMessage.netId);
			if (!((Object)(object)val == (Object)null))
			{
				NetworkAnimator component = val.GetComponent<NetworkAnimator>();
				if ((Object)(object)component != (Object)null)
				{
					NetworkReader reader = new NetworkReader(s_AnimationMessage.parameters);
					component.HandleAnimMsg(s_AnimationMessage, reader);
					NetworkServer.SendToReady(val, 40, s_AnimationMessage);
				}
			}
		}

		internal static void OnAnimationParametersServerMessage(NetworkMessage netMsg)
		{
			netMsg.ReadMessage(s_AnimationParametersMessage);
			if (LogFilter.logDev)
			{
				Debug.Log((object)string.Concat("OnAnimationParametersMessage for netId=", s_AnimationParametersMessage.netId, " conn=", netMsg.conn));
			}
			GameObject val = NetworkServer.FindLocalObject(s_AnimationParametersMessage.netId);
			if (!((Object)(object)val == (Object)null))
			{
				NetworkAnimator component = val.GetComponent<NetworkAnimator>();
				if ((Object)(object)component != (Object)null)
				{
					NetworkReader reader = new NetworkReader(s_AnimationParametersMessage.parameters);
					component.HandleAnimParamsMsg(s_AnimationParametersMessage, reader);
					NetworkServer.SendToReady(val, 41, s_AnimationParametersMessage);
				}
			}
		}

		internal static void OnAnimationTriggerServerMessage(NetworkMessage netMsg)
		{
			netMsg.ReadMessage(s_AnimationTriggerMessage);
			if (LogFilter.logDev)
			{
				Debug.Log((object)string.Concat("OnAnimationTriggerMessage for netId=", s_AnimationTriggerMessage.netId, " conn=", netMsg.conn));
			}
			GameObject val = NetworkServer.FindLocalObject(s_AnimationTriggerMessage.netId);
			if (!((Object)(object)val == (Object)null))
			{
				NetworkAnimator component = val.GetComponent<NetworkAnimator>();
				if ((Object)(object)component != (Object)null)
				{
					component.HandleAnimTriggerMsg(s_AnimationTriggerMessage.hash);
					NetworkServer.SendToReady(val, 42, s_AnimationTriggerMessage);
				}
			}
		}

		internal static void OnAnimationClientMessage(NetworkMessage netMsg)
		{
			netMsg.ReadMessage(s_AnimationMessage);
			GameObject val = ClientScene.FindLocalObject(s_AnimationMessage.netId);
			if (!((Object)(object)val == (Object)null))
			{
				NetworkAnimator component = val.GetComponent<NetworkAnimator>();
				if ((Object)(object)component != (Object)null)
				{
					NetworkReader reader = new NetworkReader(s_AnimationMessage.parameters);
					component.HandleAnimMsg(s_AnimationMessage, reader);
				}
			}
		}

		internal static void OnAnimationParametersClientMessage(NetworkMessage netMsg)
		{
			netMsg.ReadMessage(s_AnimationParametersMessage);
			GameObject val = ClientScene.FindLocalObject(s_AnimationParametersMessage.netId);
			if (!((Object)(object)val == (Object)null))
			{
				NetworkAnimator component = val.GetComponent<NetworkAnimator>();
				if ((Object)(object)component != (Object)null)
				{
					NetworkReader reader = new NetworkReader(s_AnimationParametersMessage.parameters);
					component.HandleAnimParamsMsg(s_AnimationParametersMessage, reader);
				}
			}
		}

		internal static void OnAnimationTriggerClientMessage(NetworkMessage netMsg)
		{
			netMsg.ReadMessage(s_AnimationTriggerMessage);
			GameObject val = ClientScene.FindLocalObject(s_AnimationTriggerMessage.netId);
			if (!((Object)(object)val == (Object)null))
			{
				NetworkAnimator component = val.GetComponent<NetworkAnimator>();
				if ((Object)(object)component != (Object)null)
				{
					component.HandleAnimTriggerMsg(s_AnimationTriggerMessage.hash);
				}
			}
		}
	}
	[RequireComponent(typeof(NetworkIdentity))]
	[AddComponentMenu("")]
	[Obsolete("The high level API classes are deprecated and will be removed in the future.")]
	public class NetworkBehaviour : MonoBehaviour
	{
		public delegate void CmdDelegate(NetworkBehaviour obj, NetworkReader reader);

		protected delegate void EventDelegate(List<Delegate> targets, NetworkReader reader);

		protected enum UNetInvokeType
		{
			Command,
			ClientRpc,
			SyncEvent,
			SyncList
		}

		protected class Invoker
		{
			public UNetInvokeType invokeType;

			public Type invokeClass;

			public CmdDelegate invokeFunction;

			public string DebugString()
			{
				return string.Concat(invokeType, ":", invokeClass, ":", invokeFunction.GetMethodName());
			}
		}

		private uint m_SyncVarDirtyBits;

		private float m_LastSendTime;

		private bool m_SyncVarGuard;

		private const float k_DefaultSendInterval = 0.1f;

		private NetworkIdentity m_MyView;

		private static Dictionary<int, Invoker> s_CmdHandlerDelegates = new Dictionary<int, Invoker>();

		public bool localPlayerAuthority => myView.localPlayerAuthority;

		public bool isServer => myView.isServer;

		public bool isClient => myView.isClient;

		public bool isLocalPlayer => myView.isLocalPlayer;

		public bool hasAuthority => myView.hasAuthority;

		public NetworkInstanceId netId => myView.netId;

		public NetworkConnection connectionToServer => myView.connectionToServer;

		public NetworkConnection connectionToClient => myView.connectionToClient;

		public short playerControllerId => myView.playerControllerId;

		protected uint syncVarDirtyBits => m_SyncVarDirtyBits;

		protected bool syncVarHookGuard
		{
			get
			{
				return m_SyncVarGuard;
			}
			set
			{
				m_SyncVarGuard = value;
			}
		}

		internal NetworkIdentity netIdentity => myView;

		private NetworkIdentity myView
		{
			get
			{
				if ((Object)(object)m_MyView == (Object)null)
				{
					m_MyView = ((Component)this).GetComponent<NetworkIdentity>();
					if ((Object)(object)m_MyView == (Object)null && LogFilter.logError)
					{
						Debug.LogError((object)"There is no NetworkIdentity on this object. Please add one.");
					}
					return m_MyView;
				}
				return m_MyView;
			}
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		protected void SendCommandInternal(NetworkWriter writer, int channelId, string cmdName)
		{
			if (!isLocalPlayer && !hasAuthority)
			{
				if (LogFilter.logWarn)
				{
					Debug.LogWarning((object)"Trying to send command for object without authority.");
				}
			}
			else if (ClientScene.readyConnection == null)
			{
				if (LogFilter.logError)
				{
					Debug.LogError((object)string.Concat("Send command attempted with no client running [client=", connectionToServer, "]."));
				}
			}
			else
			{
				writer.FinishMessage();
				ClientScene.readyConnection.SendWriter(writer, channelId);
			}
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public virtual bool InvokeCommand(int cmdHash, NetworkReader reader)
		{
			if (InvokeCommandDelegate(cmdHash, reader))
			{
				return true;
			}
			return false;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		protected void SendRPCInternal(NetworkWriter writer, int channelId, string rpcName)
		{
			if (!isServer)
			{
				if (LogFilter.logWarn)
				{
					Debug.LogWarning((object)"ClientRpc call on un-spawned object");
				}
			}
			else
			{
				writer.FinishMessage();
				NetworkServer.SendWriterToReady(((Component)this).gameObject, writer, channelId);
			}
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		protected void SendTargetRPCInternal(NetworkConnection conn, NetworkWriter writer, int channelId, string rpcName)
		{
			if (!isServer)
			{
				if (LogFilter.logWarn)
				{
					Debug.LogWarning((object)"TargetRpc call on un-spawned object");
				}
			}
			else
			{
				writer.FinishMessage();
				conn.SendWriter(writer, channelId);
			}
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public virtual bool InvokeRPC(int cmdHash, NetworkReader reader)
		{
			if (InvokeRpcDelegate(cmdHash, reader))
			{
				return true;
			}
			return false;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		protected void SendEventInternal(NetworkWriter writer, int channelId, string eventName)
		{
			if (!NetworkServer.active)
			{
				if (LogFilter.logWarn)
				{
					Debug.LogWarning((object)"SendEvent no server?");
				}
			}
			else
			{
				writer.FinishMessage();
				NetworkServer.SendWriterToReady(((Component)this).gameObject, writer, channelId);
			}
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public virtual bool InvokeSyncEvent(int cmdHash, NetworkReader reader)
		{
			if (InvokeSyncEventDelegate(cmdHash, reader))
			{
				return true;
			}
			return false;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public virtual bool InvokeSyncList(int cmdHash, NetworkReader reader)
		{
			if (InvokeSyncListDelegate(cmdHash, reader))
			{
				return true;
			}
			return false;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		protected static void RegisterCommandDelegate(Type invokeClass, int cmdHash, CmdDelegate func)
		{
			if (!s_CmdHandlerDelegates.ContainsKey(cmdHash))
			{
				Invoker invoker = new Invoker();
				invoker.invokeType = UNetInvokeType.Command;
				invoker.invokeClass = invokeClass;
				invoker.invokeFunction = func;
				s_CmdHandlerDelegates[cmdHash] = invoker;
				if (LogFilter.logDev)
				{
					Debug.Log((object)("RegisterCommandDelegate hash:" + cmdHash + " " + func.GetMethodName()));
				}
			}
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		protected static void RegisterRpcDelegate(Type invokeClass, int cmdHash, CmdDelegate func)
		{
			if (!s_CmdHandlerDelegates.ContainsKey(cmdHash))
			{
				Invoker invoker = new Invoker();
				invoker.invokeType = UNetInvokeType.ClientRpc;
				invoker.invokeClass = invokeClass;
				invoker.invokeFunction = func;
				s_CmdHandlerDelegates[cmdHash] = invoker;
				if (LogFilter.logDev)
				{
					Debug.Log((object)("RegisterRpcDelegate hash:" + cmdHash + " " + func.GetMethodName()));
				}
			}
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		protected static void RegisterEventDelegate(Type invokeClass, int cmdHash, CmdDelegate func)
		{
			if (!s_CmdHandlerDelegates.ContainsKey(cmdHash))
			{
				Invoker invoker = new Invoker();
				invoker.invokeType = UNetInvokeType.SyncEvent;
				invoker.invokeClass = invokeClass;
				invoker.invokeFunction = func;
				s_CmdHandlerDelegates[cmdHash] = invoker;
				if (LogFilter.logDev)
				{
					Debug.Log((object)("RegisterEventDelegate hash:" + cmdHash + " " + func.GetMethodName()));
				}
			}
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		protected static void RegisterSyncListDelegate(Type invokeClass, int cmdHash, CmdDelegate func)
		{
			if (!s_CmdHandlerDelegates.ContainsKey(cmdHash))
			{
				Invoker invoker = new Invoker();
				invoker.invokeType = UNetInvokeType.SyncList;
				invoker.invokeClass = invokeClass;
				invoker.invokeFunction = func;
				s_CmdHandlerDelegates[cmdHash] = invoker;
				if (LogFilter.logDev)
				{
					Debug.Log((object)("RegisterSyncListDelegate hash:" + cmdHash + " " + func.GetMethodName()));
				}
			}
		}

		internal static string GetInvoker(int cmdHash)
		{
			if (!s_CmdHandlerDelegates.ContainsKey(cmdHash))
			{
				return null;
			}
			return s_CmdHandlerDelegates[cmdHash].DebugString();
		}

		internal static bool GetInvokerForHashCommand(int cmdHash, out Type invokeClass, out CmdDelegate invokeFunction)
		{
			return GetInvokerForHash(cmdHash, UNetInvokeType.Command, out invokeClass, out invokeFunction);
		}

		internal static bool GetInvokerForHashClientRpc(int cmdHash, out Type invokeClass, out CmdDelegate invokeFunction)
		{
			return GetInvokerForHash(cmdHash, UNetInvokeType.ClientRpc, out invokeClass, out invokeFunction);
		}

		internal static bool GetInvokerForHashSyncList(int cmdHash, out Type invokeClass, out CmdDelegate invokeFunction)
		{
			return GetInvokerForHash(cmdHash, UNetInvokeType.SyncList, out invokeClass, out invokeFunction);
		}

		internal static bool GetInvokerForHashSyncEvent(int cmdHash, out Type invokeClass, out CmdDelegate invokeFunction)
		{
			return GetInvokerForHash(cmdHash, UNetInvokeType.SyncEvent, out invokeClass, out invokeFunction);
		}

		private static bool GetInvokerForHash(int cmdHash, UNetInvokeType invokeType, out Type invokeClass, out CmdDelegate invokeFunction)
		{
			Invoker value = null;
			if (!s_CmdHandlerDelegates.TryGetValue(cmdHash, out value))
			{
				if (LogFilter.logDev)
				{
					Debug.Log((object)("GetInvokerForHash hash:" + cmdHash + " not found"));
				}
				invokeClass = null;
				invokeFunction = null;
				return false;
			}
			if (value == null)
			{
				if (LogFilter.logDev)
				{
					Debug.Log((object)("GetInvokerForHash hash:" + cmdHash + " invoker null"));
				}
				invokeClass = null;
				invokeFunction = null;
				return false;
			}
			if (value.invokeType != invokeType)
			{
				if (LogFilter.logError)
				{
					Debug.LogError((object)("GetInvokerForHash hash:" + cmdHash + " mismatched invokeType"));
				}
				invokeClass = null;
				invokeFunction = null;
				return false;
			}
			invokeClass = value.invokeClass;
			invokeFunction = value.invokeFunction;
			return true;
		}

		internal static void DumpInvokers()
		{
			Debug.Log((object)("DumpInvokers size:" + s_CmdHandlerDelegates.Count));
			foreach (KeyValuePair<int, Invoker> s_CmdHandlerDelegate in s_CmdHandlerDelegates)
			{
				Debug.Log((object)string.Concat("  Invoker:", s_CmdHandlerDelegate.Value.invokeClass, ":", s_CmdHandlerDelegate.Value.invokeFunction.GetMethodName(), " ", s_CmdHandlerDelegate.Value.invokeType, " ", s_CmdHandlerDelegate.Key));
			}
		}

		internal bool ContainsCommandDelegate(int cmdHash)
		{
			return s_CmdHandlerDelegates.ContainsKey(cmdHash);
		}

		internal bool InvokeCommandDelegate(int cmdHash, NetworkReader reader)
		{
			if (!s_CmdHandlerDelegates.ContainsKey(cmdHash))
			{
				return false;
			}
			Invoker invoker = s_CmdHandlerDelegates[cmdHash];
			if (invoker.invokeType != 0)
			{
				return false;
			}
			if (((object)this).GetType() != invoker.invokeClass && !((object)this).GetType().IsSubclassOf(invoker.invokeClass))
			{
				return false;
			}
			invoker.invokeFunction(this, reader);
			return true;
		}

		internal bool InvokeRpcDelegate(int cmdHash, NetworkReader reader)
		{
			if (!s_CmdHandlerDelegates.ContainsKey(cmdHash))
			{
				return false;
			}
			Invoker invoker = s_CmdHandlerDelegates[cmdHash];
			if (invoker.invokeType != UNetInvokeType.ClientRpc)
			{
				return false;
			}
			if (((object)this).GetType() != invoker.invokeClass && !((object)this).GetType().IsSubclassOf(invoker.invokeClass))
			{
				return false;
			}
			invoker.invokeFunction(this, reader);
			return true;
		}

		internal bool InvokeSyncEventDelegate(int cmdHash, NetworkReader reader)
		{
			if (!s_CmdHandlerDelegates.ContainsKey(cmdHash))
			{
				return false;
			}
			Invoker invoker = s_CmdHandlerDelegates[cmdHash];
			if (invoker.invokeType != UNetInvokeType.SyncEvent)
			{
				return false;
			}
			invoker.invokeFunction(this, reader);
			return true;
		}

		internal bool InvokeSyncListDelegate(int cmdHash, NetworkReader reader)
		{
			if (!s_CmdHandlerDelegates.ContainsKey(cmdHash))
			{
				return false;
			}
			Invoker invoker = s_CmdHandlerDelegates[cmdHash];
			if (invoker.invokeType != UNetInvokeType.SyncList)
			{
				return false;
			}
			if (((object)this).GetType() != invoker.invokeClass)
			{
				return false;
			}
			invoker.invokeFunction(this, reader);
			return true;
		}

		internal static string GetCmdHashHandlerName(int cmdHash)
		{
			if (!s_CmdHandlerDelegates.ContainsKey(cmdHash))
			{
				return cmdHash.ToString();
			}
			Invoker invoker = s_CmdHandlerDelegates[cmdHash];
			return string.Concat(invoker.invokeType, ":", invoker.invokeFunction.GetMethodName());
		}

		private static string GetCmdHashPrefixName(int cmdHash, string prefix)
		{
			if (!s_CmdHandlerDelegates.ContainsKey(cmdHash))
			{
				return cmdHash.ToString();
			}
			string text = s_CmdHandlerDelegates[cmdHash].invokeFunction.GetMethodName();
			if (text.IndexOf(prefix) > -1)
			{
				text = text.Substring(prefix.Length);
			}
			return text;
		}

		internal static string GetCmdHashCmdName(int cmdHash)
		{
			return GetCmdHashPrefixName(cmdHash, "InvokeCmd");
		}

		internal static string GetCmdHashRpcName(int cmdHash)
		{
			return GetCmdHashPrefixName(cmdHash, "InvokeRpc");
		}

		internal static string GetCmdHashEventName(int cmdHash)
		{
			return GetCmdHashPrefixName(cmdHash, "InvokeSyncEvent");
		}

		internal static string GetCmdHashListName(int cmdHash)
		{
			return GetCmdHashPrefixName(cmdHash, "InvokeSyncList");
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		protected void SetSyncVarGameObject(GameObject newGameObject, ref GameObject gameObjectField, uint dirtyBit, ref NetworkInstanceId netIdField)
		{
			if (m_SyncVarGuard)
			{
				return;
			}
			NetworkInstanceId networkInstanceId = default(NetworkInstanceId);
			if ((Object)(object)newGameObject != (Object)null)
			{
				NetworkIdentity component = newGameObject.GetComponent<NetworkIdentity>();
				if ((Object)(object)component != (Object)null)
				{
					networkInstanceId = component.netId;
					if (networkInstanceId.IsEmpty() && LogFilter.logWarn)
					{
						Debug.LogWarning((object)string.Concat("SetSyncVarGameObject GameObject ", newGameObject, " has a zero netId. Maybe it is not spawned yet?"));
					}
				}
			}
			NetworkInstanceId networkInstanceId2 = default(NetworkInstanceId);
			if ((Object)(object)gameObjectField != (Object)null)
			{
				networkInstanceId2 = gameObjectField.GetComponent<NetworkIdentity>().netId;
			}
			if (networkInstanceId != networkInstanceId2)
			{
				if (LogFilter.logDev)
				{
					Debug.Log((object)string.Concat("SetSyncVar GameObject ", ((object)this).GetType().Name, " bit [", dirtyBit, "] netfieldId:", networkInstanceId2, "->", networkInstanceId));
				}
				SetDirtyBit(dirtyBit);
				gameObjectField = newGameObject;
				netIdField = networkInstanceId;
			}
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		protected void SetSyncVar<T>(T value, ref T fieldValue, uint dirtyBit)
		{
			bool flag = false;
			if (value == null)
			{
				if (fieldValue != null)
				{
					flag = true;
				}
			}
			else
			{
				flag = !value.Equals(fieldValue);
			}
			if (flag)
			{
				if (LogFilter.logDev)
				{
					Debug.Log((object)string.Concat("SetSyncVar ", ((object)this).GetType().Name, " bit [", dirtyBit, "] ", fieldValue, "->", value));
				}
				SetDirtyBit(dirtyBit);
				fieldValue = value;
			}
		}

		public void SetDirtyBit(uint dirtyBit)
		{
			m_SyncVarDirtyBits |= dirtyBit;
		}

		public void ClearAllDirtyBits()
		{
			m_LastSendTime = Time.time;
			m_SyncVarDirtyBits = 0u;
		}

		internal int GetDirtyChannel()
		{
			if (Time.time - m_LastSendTime > GetNetworkSendInterval() && m_SyncVarDirtyBits != 0)
			{
				return GetNetworkChannel();
			}
			return -1;
		}

		public virtual bool OnSerialize(NetworkWriter writer, bool initialState)
		{
			if (!initialState)
			{
				writer.WritePackedUInt32(0u);
			}
			return false;
		}

		public virtual void OnDeserialize(NetworkReader reader, bool initialState)
		{
			if (!initialState)
			{
				reader.ReadPackedUInt32();
			}
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public virtual void PreStartClient()
		{
		}

		public virtual void OnNetworkDestroy()
		{
		}

		public virtual void OnStartServer()
		{
		}

		public virtual void OnStartClient()
		{
		}

		public virtual void OnStartLocalPlayer()
		{
		}

		public virtual void OnStartAuthority()
		{
		}

		public virtual void OnStopAuthority()
		{
		}

		public virtual bool OnRebuildObservers(HashSet<NetworkConnection> observers, bool initialize)
		{
			return false;
		}

		public virtual void OnSetLocalVisibility(bool vis)
		{
		}

		public virtual bool OnCheckObserver(NetworkConnection conn)
		{
			return true;
		}

		public virtual int GetNetworkChannel()
		{
			return 0;
		}

		public virtual float GetNetworkSendInterval()
		{
			return 0.1f;
		}
	}
	internal class NetBuffer
	{
		private byte[] m_Buffer;

		private uint m_Pos;

		private const int k_InitialSize = 64;

		private const float k_GrowthFactor = 1.5f;

		private const int k_BufferSizeWarning = 134217728;

		public uint Position => m_Pos;

		public int Length => m_Buffer.Length;

		public NetBuffer()
		{
			m_Buffer = new byte[64];
		}

		public NetBuffer(byte[] buffer)
		{
			m_Buffer = buffer;
		}

		public byte ReadByte()
		{
			if (m_Pos >= m_Buffer.Length)
			{
				throw new IndexOutOfRangeException("NetworkReader:ReadByte out of range:" + ToString());
			}
			return m_Buffer[m_Pos++];
		}

		public void ReadBytes(byte[] buffer, uint count)
		{
			if (m_Pos + count > m_Buffer.Length)
			{
				throw new IndexOutOfRangeException("NetworkReader:ReadBytes out of range: (" + count + ") " + ToString());
			}
			for (ushort num = 0; num < count; num++)
			{
				buffer[num] = m_Buffer[m_Pos + num];
			}
			m_Pos += count;
		}

		internal ArraySegment<byte> AsArraySegment()
		{
			return new ArraySegment<byte>(m_Buffer, 0, (int)m_Pos);
		}

		public void WriteByte(byte value)
		{
			WriteCheckForSpace(1);
			m_Buffer[m_Pos] = value;
			m_Pos++;
		}

		public void WriteByte2(byte value0, byte value1)
		{
			WriteCheckForSpace(2);
			m_Buffer[m_Pos] = value0;
			m_Buffer[m_Pos + 1] = value1;
			m_Pos += 2u;
		}

		public void WriteByte4(byte value0, byte value1, byte value2, byte value3)
		{
			WriteCheckForSpace(4);
			m_Buffer[m_Pos] = value0;
			m_Buffer[m_Pos + 1] = value1;
			m_Buffer[m_Pos + 2] = value2;
			m_Buffer[m_Pos + 3] = value3;
			m_Pos += 4u;
		}

		public void WriteByte8(byte value0, byte value1, byte value2, byte value3, byte value4, byte value5, byte value6, byte value7)
		{
			WriteCheckForSpace(8);
			m_Buffer[m_Pos] = value0;
			m_Buffer[m_Pos + 1] = value1;
			m_Buffer[m_Pos + 2] = value2;
			m_Buffer[m_Pos + 3] = value3;
			m_Buffer[m_Pos + 4] = value4;
			m_Buffer[m_Pos + 5] = value5;
			m_Buffer[m_Pos + 6] = value6;
			m_Buffer[m_Pos + 7] = value7;
			m_Pos += 8u;
		}

		public void WriteBytesAtOffset(byte[] buffer, ushort targetOffset, ushort count)
		{
			uint num = (uint)(count + targetOffset);
			WriteCheckForSpace((ushort)num);
			if (targetOffset == 0 && count == buffer.Length)
			{
				buffer.CopyTo(m_Buffer, (int)m_Pos);
			}
			else
			{
				for (int i = 0; i < count; i++)
				{
					m_Buffer[targetOffset + i] = buffer[i];
				}
			}
			if (num > m_Pos)
			{
				m_Pos = num;
			}
		}

		public void WriteBytes(byte[] buffer, ushort count)
		{
			WriteCheckForSpace(count);
			if (count == buffer.Length)
			{
				buffer.CopyTo(m_Buffer, (int)m_Pos);
			}
			else
			{
				for (int i = 0; i < count; i++)
				{
					m_Buffer[m_Pos + i] = buffer[i];
				}
			}
			m_Pos += count;
		}

		private void WriteCheckForSpace(ushort count)
		{
			if (m_Pos + count < m_Buffer.Length)
			{
				return;
			}
			int num = (int)Math.Ceiling((float)m_Buffer.Length * 1.5f);
			while (m_Pos + count >= num)
			{
				num = (int)Math.Ceiling((float)num * 1.5f);
				if (num > 134217728)
				{
					Debug.LogWarning((object)("NetworkBuffer size is " + num + " bytes!"));
				}
			}
			byte[] array = new byte[num];
			m_Buffer.CopyTo(array, 0);
			m_Buffer = array;
		}

		public void FinishMessage()
		{
			ushort num = (ushort)(m_Pos - 4);
			m_Buffer[0] = (byte)(num & 0xFFu);
			m_Buffer[1] = (byte)((uint)(num >> 8) & 0xFFu);
		}

		public void SeekZero()
		{
			m_Pos = 0u;
		}

		public void Replace(byte[] buffer)
		{
			m_Buffer = buffer;
			m_Pos = 0u;
		}

		public override string ToString()
		{
			return $"NetBuf sz:{m_Buffer.Length} pos:{m_Pos}";
		}
	}
	[StructLayout(LayoutKind.Explicit)]
	internal struct UIntFloat
	{
		[FieldOffset(0)]
		public float floatValue;

		[FieldOffset(0)]
		public uint intValue;

		[FieldOffset(0)]
		public double doubleValue;

		[FieldOffset(0)]
		public ulong longValue;
	}
	[StructLayout(LayoutKind.Explicit)]
	internal struct UIntDecimal
	{
		[FieldOffset(0)]
		public ulong longValue1;

		[FieldOffset(8)]
		public ulong longValue2;

		[FieldOffset(0)]
		public decimal decimalValue;
	}
	internal class FloatConversion
	{
		public static float ToSingle(uint value)
		{
			UIntFloat uIntFloat = default(UIntFloat);
			uIntFloat.intValue = value;
			return uIntFloat.floatValue;
		}

		public static double ToDouble(ulong value)
		{
			UIntFloat uIntFloat = default(UIntFloat);
			uIntFloat.longValue = value;
			return uIntFloat.doubleValue;
		}

		public static decimal ToDecimal(ulong value1, ulong value2)
		{
			UIntDecimal uIntDecimal = default(UIntDecimal);
			uIntDecimal.longValue1 = value1;
			uIntDecimal.longValue2 = value2;
			return uIntDecimal.decimalValue;
		}
	}
	public class NetworkCallbacks : MonoBehaviour
	{
		private void LateUpdate()
		{
			NetworkIdentity.UNetStaticUpdate();
		}
	}
	[Obsolete("The high level API classes are deprecated and will be removed in the future.")]
	public class NetworkClient
	{
		protected enum ConnectState
		{
			None,
			Resolving,
			Resolved,
			Connecting,
			Connected,
			Disconnected,
			Failed
		}

		private Type m_NetworkConnectionClass = typeof(NetworkConnection);

		private const int k_MaxEventsPerFrame = 500;

		private static List<NetworkClient> s_Clients = new List<NetworkClient>();

		private static bool s_IsActive;

		private HostTopology m_HostTopology;

		private int m_HostPort;

		private bool m_UseSimulator;

		private int m_SimulatedLatency;

		private float m_PacketLoss;

		private string m_ServerIp = "";

		private int m_ServerPort;

		private int m_ClientId = -1;

		private int m_ClientConnectionId = -1;

		private int m_StatResetTime;

		private EndPoint m_RemoteEndPoint;

		private static CRCMessage s_CRCMessage = new CRCMessage();

		private NetworkMessageHandlers m_MessageHandlers = new NetworkMessageHandlers();

		protected NetworkConnection m_Connection;

		private byte[] m_MsgBuffer;

		private NetworkReader m_MsgReader;

		protected ConnectState m_AsyncConnect;

		private string m_RequestedServerHost = "";

		public static List<NetworkClient> allClients => s_Clients;

		public static bool active => s_IsActive;

		public string serverIp => m_ServerIp;

		public int serverPort => m_ServerPort;

		public NetworkConnection connection => m_Connection;

		[Obsolete("Moved to NetworkMigrationManager.")]
		public PeerInfoMessage[] peers => null;

		internal int hostId => m_ClientId;

		public Dictionary<short, NetworkMessageDelegate> handlers => m_MessageHandlers.GetHandlers();

		public int numChannels => m_HostTopology.DefaultConfig.ChannelCount;

		public HostTopology hostTopology => m_HostTopology;

		public int hostPort
		{
			get
			{
				return m_HostPort;
			}
			set
			{
				if (value < 0)
				{
					throw new ArgumentException("Port must not be a negative number.");
				}
				if (value > 65535)
				{
					throw new ArgumentException("Port must not be greater than 65535.");
				}
				m_HostPort = value;
			}
		}

		public bool isConnected => m_AsyncConnect == ConnectState.Connected;

		public Type networkConnectionClass => m_NetworkConnectionClass;

		internal void SetHandlers(NetworkConnection conn)
		{
			conn.SetHandlers(m_MessageHandlers);
		}

		public void SetNetworkConnectionClass<T>() where T : NetworkConnection
		{
			m_NetworkConnectionClass = typeof(T);
		}

		public NetworkClient()
		{
			if (LogFilter.logDev)
			{
				Debug.Log((object)("Client created version " + Version.Current));
			}
			m_MsgBuffer = new byte[65535];
			m_MsgReader = new NetworkReader(m_MsgBuffer);
			AddClient(this);
		}

		public NetworkClient(NetworkConnection conn)
		{
			if (LogFilter.logDev)
			{
				Debug.Log((object)("Client created version " + Version.Current));
			}
			m_MsgBuffer = new byte[65535];
			m_MsgReader = new NetworkReader(m_MsgBuffer);
			AddClient(this);
			SetActive(state: true);
			m_Connection = conn;
			m_AsyncConnect = ConnectState.Connected;
			conn.SetHandlers(m_MessageHandlers);
			RegisterSystemHandlers(localClient: false);
		}

		public bool Configure(ConnectionConfig config, int maxConnections)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			HostTopology topology = new HostTopology(config, maxConnections);
			return Configure(topology);
		}

		public bool Configure(HostTopology topology)
		{
			m_HostTopology = topology;
			return true;
		}

		public void Connect(MatchInfo matchInfo)
		{
			PrepareForConnect();
			ConnectWithRelay(matchInfo);
		}

		public bool ReconnectToNewHost(string serverIp, int serverPort)
		{
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Invalid comparison between Unknown and I4
			if (!active)
			{
				if (LogFilter.logError)
				{
					Debug.LogError((object)"Reconnect - NetworkClient must be active");
				}
				return false;
			}
			if (m_Connection == null)

Room Architect Tool_Data/Managed/Mono.Data.Sqlite.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.Common;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Security;
using System.Security.Permissions;
using System.Text;
using System.Threading;
using System.Transactions;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("System.Data.SQLite")]
[assembly: AssemblyDescription("ADO.NET 2.0 Data Provider for SQLite")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("http://sqlite.phxsoftware.com")]
[assembly: AssemblyProduct("System.Data.SQLite")]
[assembly: AssemblyCopyright("Public Domain")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: CLSCompliant(true)]
[assembly: AllowPartiallyTrustedCallers]
[assembly: ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
[assembly: SecurityRules(SecurityRuleSet.Level1)]
[assembly: AssemblyFileVersion("1.0.61.0")]
[assembly: AssemblyDelaySign(true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("4.0.0.0")]
[module: UnverifiableCode]
internal static class Consts
{
	public const string MonoVersion = "5.11.0.0";

	public const string MonoCompany = "Mono development team";

	public const string MonoProduct = "Mono Common Language Infrastructure";

	public const string MonoCopyright = "(c) Various Mono authors";

	public const int MonoCorlibVersion = 1051100001;

	public const string FxVersion = "4.0.0.0";

	public const string FxFileVersion = "4.6.57.0";

	public const string EnvironmentVersion = "4.0.30319.42000";

	public const string VsVersion = "0.0.0.0";

	public const string VsFileVersion = "11.0.0.0";

	private const string PublicKeyToken = "b77a5c561934e089";

	public const string AssemblyI18N = "I18N, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMicrosoft_JScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMono_Http = "Mono.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Posix = "Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Security = "Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Messaging_RabbitMQ = "Mono.Messaging.RabbitMQ, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyCorlib = "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Data = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Design = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing_Design = "System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Messaging = "System.Messaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Security = "System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Web = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Core = "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string WindowsBase_3_0 = "WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
namespace Mono.Data.Sqlite
{
	public sealed class SqliteConnection : DbConnection, ICloneable
	{
		private const string _dataDirectory = "|DataDirectory|";

		private const string _masterdb = "sqlite_master";

		private const string _tempmasterdb = "sqlite_temp_master";

		private ConnectionState _connectionState;

		private string _connectionString;

		internal int _transactionLevel;

		private System.Data.IsolationLevel _defaultIsolation;

		internal SQLiteEnlistment _enlistment;

		internal SQLiteBase _sql;

		private string _dataSource;

		private byte[] _password;

		private int _defaultTimeout = 30;

		internal bool _binaryGuid;

		internal long _version;

		private SQLiteUpdateCallback _updateCallback;

		private SQLiteCommitCallback _commitCallback;

		private SQLiteRollbackCallback _rollbackCallback;

		protected override DbProviderFactory DbProviderFactory => SqliteFactory.Instance;

		[RefreshProperties(RefreshProperties.All)]
		[DefaultValue("")]
		[Editor("SQLite.Designer.SqliteConnectionStringEditor, SQLite.Designer, Version=1.0.36.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
		public override string ConnectionString
		{
			get
			{
				return _connectionString;
			}
			set
			{
				if (value == null)
				{
					throw new ArgumentNullException();
				}
				if (_connectionState != 0)
				{
					throw new InvalidOperationException();
				}
				_connectionString = value;
			}
		}

		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		public override string DataSource => _dataSource;

		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		public override string Database => "main";

		public int DefaultTimeout
		{
			get
			{
				return _defaultTimeout;
			}
			set
			{
				_defaultTimeout = value;
			}
		}

		[Browsable(false)]
		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		public override string ServerVersion
		{
			get
			{
				if (_connectionState != ConnectionState.Open)
				{
					throw new InvalidOperationException();
				}
				return _sql.Version;
			}
		}

		public static string SQLiteVersion => SQLite3.SQLiteVersion;

		[Browsable(false)]
		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		public override ConnectionState State => _connectionState;

		private event SQLiteUpdateEventHandler _updateHandler;

		private event SQLiteCommitHandler _commitHandler;

		private event EventHandler _rollbackHandler;

		public override event StateChangeEventHandler StateChange;

		public event SQLiteUpdateEventHandler Update
		{
			add
			{
				if (this._updateHandler == null)
				{
					_updateCallback = UpdateCallback;
					if (_sql != null)
					{
						_sql.SetUpdateHook(_updateCallback);
					}
				}
				_updateHandler += value;
			}
			remove
			{
				_updateHandler -= value;
				if (this._updateHandler == null)
				{
					if (_sql != null)
					{
						_sql.SetUpdateHook(null);
					}
					_updateCallback = null;
				}
			}
		}

		public event SQLiteCommitHandler Commit
		{
			add
			{
				if (this._commitHandler == null)
				{
					_commitCallback = CommitCallback;
					if (_sql != null)
					{
						_sql.SetCommitHook(_commitCallback);
					}
				}
				_commitHandler += value;
			}
			remove
			{
				_commitHandler -= value;
				if (this._commitHandler == null)
				{
					if (_sql != null)
					{
						_sql.SetCommitHook(null);
					}
					_commitCallback = null;
				}
			}
		}

		public event EventHandler RollBack
		{
			add
			{
				if (this._rollbackHandler == null)
				{
					_rollbackCallback = RollbackCallback;
					if (_sql != null)
					{
						_sql.SetRollbackHook(_rollbackCallback);
					}
				}
				_rollbackHandler += value;
			}
			remove
			{
				_rollbackHandler -= value;
				if (this._rollbackHandler == null)
				{
					if (_sql != null)
					{
						_sql.SetRollbackHook(null);
					}
					_rollbackCallback = null;
				}
			}
		}

		public SqliteConnection()
			: this("")
		{
		}

		public SqliteConnection(string connectionString)
		{
			_sql = null;
			_connectionState = ConnectionState.Closed;
			_connectionString = "";
			_transactionLevel = 0;
			_version = 0L;
			if (connectionString != null)
			{
				ConnectionString = connectionString;
			}
		}

		public SqliteConnection(SqliteConnection connection)
			: this(connection.ConnectionString)
		{
			if (connection.State != ConnectionState.Open)
			{
				return;
			}
			Open();
			using DataTable dataTable = connection.GetSchema("Catalogs");
			foreach (DataRow row in dataTable.Rows)
			{
				string strA = row[0].ToString();
				if (string.Compare(strA, "main", ignoreCase: true, CultureInfo.InvariantCulture) != 0 && string.Compare(strA, "temp", ignoreCase: true, CultureInfo.InvariantCulture) != 0)
				{
					using SqliteCommand sqliteCommand = CreateCommand();
					sqliteCommand.CommandText = string.Format(CultureInfo.InvariantCulture, "ATTACH DATABASE '{0}' AS [{1}]", row[1], row[0]);
					sqliteCommand.ExecuteNonQuery();
				}
			}
		}

		public object Clone()
		{
			return new SqliteConnection(this);
		}

		protected override void Dispose(bool disposing)
		{
			base.Dispose(disposing);
			if (_sql != null)
			{
				_sql.Dispose();
			}
			if (disposing)
			{
				Close();
			}
		}

		public static void CreateFile(string databaseFileName)
		{
			File.Create(databaseFileName).Close();
		}

		internal void OnStateChange(ConnectionState newState)
		{
			ConnectionState connectionState = _connectionState;
			_connectionState = newState;
			if (StateChange != null && connectionState != newState)
			{
				StateChangeEventArgs e = new StateChangeEventArgs(connectionState, newState);
				StateChange(this, e);
			}
		}

		[Obsolete("Use one of the standard BeginTransaction methods, this one will be removed soon")]
		public SqliteTransaction BeginTransaction(System.Data.IsolationLevel isolationLevel, bool deferredLock)
		{
			return (SqliteTransaction)BeginDbTransaction((!deferredLock) ? System.Data.IsolationLevel.Serializable : System.Data.IsolationLevel.ReadCommitted);
		}

		[Obsolete("Use one of the standard BeginTransaction methods, this one will be removed soon")]
		public SqliteTransaction BeginTransaction(bool deferredLock)
		{
			return (SqliteTransaction)BeginDbTransaction((!deferredLock) ? System.Data.IsolationLevel.Serializable : System.Data.IsolationLevel.ReadCommitted);
		}

		public new SqliteTransaction BeginTransaction(System.Data.IsolationLevel isolationLevel)
		{
			return (SqliteTransaction)BeginDbTransaction(isolationLevel);
		}

		public new SqliteTransaction BeginTransaction()
		{
			return (SqliteTransaction)BeginDbTransaction(_defaultIsolation);
		}

		protected override DbTransaction BeginDbTransaction(System.Data.IsolationLevel isolationLevel)
		{
			if (_connectionState != ConnectionState.Open)
			{
				throw new InvalidOperationException();
			}
			if (isolationLevel == System.Data.IsolationLevel.Unspecified)
			{
				isolationLevel = _defaultIsolation;
			}
			if (isolationLevel != System.Data.IsolationLevel.Serializable && isolationLevel != System.Data.IsolationLevel.ReadCommitted)
			{
				throw new ArgumentException("isolationLevel");
			}
			return new SqliteTransaction(this, isolationLevel != System.Data.IsolationLevel.Serializable);
		}

		public override void ChangeDatabase(string databaseName)
		{
			throw new NotImplementedException();
		}

		public override void Close()
		{
			if (_sql != null)
			{
				if (_enlistment != null)
				{
					SqliteConnection sqliteConnection = new SqliteConnection();
					sqliteConnection._sql = _sql;
					sqliteConnection._transactionLevel = _transactionLevel;
					sqliteConnection._enlistment = _enlistment;
					sqliteConnection._connectionState = _connectionState;
					sqliteConnection._version = _version;
					sqliteConnection._enlistment._transaction._cnn = sqliteConnection;
					sqliteConnection._enlistment._disposeConnection = true;
					_sql = null;
					_enlistment = null;
				}
				if (_sql != null)
				{
					_sql.Close();
				}
				_sql = null;
				_transactionLevel = 0;
			}
			OnStateChange(ConnectionState.Closed);
		}

		public static void ClearPool(SqliteConnection connection)
		{
			if (connection._sql != null)
			{
				connection._sql.ClearPool();
			}
		}

		public static void ClearAllPools()
		{
			SqliteConnectionPool.ClearAllPools();
		}

		public new SqliteCommand CreateCommand()
		{
			return new SqliteCommand(this);
		}

		protected override DbCommand CreateDbCommand()
		{
			return CreateCommand();
		}

		internal static void MapMonoKeyword(string[] arPiece, SortedList<string, string> ls)
		{
			string text = arPiece[0].ToLower(CultureInfo.InvariantCulture);
			string key;
			string value;
			if (text == "uri")
			{
				key = "Data Source";
				value = MapMonoUriPath(arPiece[1]);
			}
			else
			{
				key = arPiece[0];
				value = arPiece[1];
			}
			ls.Add(key, value);
		}

		internal static string MapMonoUriPath(string path)
		{
			if (path.StartsWith("file://"))
			{
				return path.Substring(7);
			}
			if (path.StartsWith("file:"))
			{
				return path.Substring(5);
			}
			if (path.StartsWith("/"))
			{
				return path;
			}
			throw new InvalidOperationException("Invalid connection string: invalid URI");
		}

		internal static string MapUriPath(string path)
		{
			if (path.StartsWith("file://"))
			{
				return path.Substring(7);
			}
			if (path.StartsWith("file:"))
			{
				return path.Substring(5);
			}
			if (path.StartsWith("/"))
			{
				return path;
			}
			throw new InvalidOperationException("Invalid connection string: invalid URI");
		}

		internal static SortedList<string, string> ParseConnectionString(string connectionString)
		{
			string source = connectionString.Replace(',', ';');
			SortedList<string, string> sortedList = new SortedList<string, string>(StringComparer.OrdinalIgnoreCase);
			string[] array = SqliteConvert.Split(source, ';');
			int num = array.Length;
			for (int i = 0; i < num; i++)
			{
				string[] array2 = SqliteConvert.Split(array[i], '=');
				if (array2.Length == 2)
				{
					MapMonoKeyword(array2, sortedList);
					continue;
				}
				throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid ConnectionString format for parameter \"{0}\"", (array2.Length != 0) ? array2[0] : "null"));
			}
			return sortedList;
		}

		public override void EnlistTransaction(Transaction transaction)
		{
			if (_transactionLevel > 0 && transaction != null)
			{
				throw new ArgumentException("Unable to enlist in transaction, a local transaction already exists");
			}
			if (_enlistment != null && transaction != _enlistment._scope)
			{
				throw new ArgumentException("Already enlisted in a transaction");
			}
			_enlistment = new SQLiteEnlistment(this, transaction);
		}

		internal static string FindKey(SortedList<string, string> items, string key, string defValue)
		{
			if (items.TryGetValue(key, out var value))
			{
				return value;
			}
			return defValue;
		}

		public override void Open()
		{
			if (_connectionState != 0)
			{
				throw new InvalidOperationException();
			}
			Close();
			SortedList<string, string> items = ParseConnectionString(_connectionString);
			if (Convert.ToInt32(FindKey(items, "Version", "3"), CultureInfo.InvariantCulture) != 3)
			{
				throw new NotSupportedException("Only SQLite Version 3 is supported at this time");
			}
			string text = FindKey(items, "Data Source", "");
			if (string.IsNullOrEmpty(text))
			{
				text = FindKey(items, "Uri", "");
				if (string.IsNullOrEmpty(text))
				{
					throw new ArgumentException("Data Source cannot be empty.  Use :memory: to open an in-memory database");
				}
				text = MapUriPath(text);
			}
			text = ((string.Compare(text, ":MEMORY:", ignoreCase: true, CultureInfo.InvariantCulture) != 0) ? ExpandFileName(text) : ":memory:");
			try
			{
				bool usePool = SqliteConvert.ToBoolean(FindKey(items, "Pooling", bool.FalseString));
				bool num = SqliteConvert.ToBoolean(FindKey(items, "UseUTF16Encoding", bool.FalseString));
				int maxPoolSize = Convert.ToInt32(FindKey(items, "Max Pool Size", "100"));
				_defaultTimeout = Convert.ToInt32(FindKey(items, "Default Timeout", "30"), CultureInfo.CurrentCulture);
				_defaultIsolation = (System.Data.IsolationLevel)Enum.Parse(typeof(System.Data.IsolationLevel), FindKey(items, "Default IsolationLevel", "Serializable"), ignoreCase: true);
				if (_defaultIsolation != System.Data.IsolationLevel.Serializable && _defaultIsolation != System.Data.IsolationLevel.ReadCommitted)
				{
					throw new NotSupportedException("Invalid Default IsolationLevel specified");
				}
				SQLiteDateFormats fmt = (SQLiteDateFormats)Enum.Parse(typeof(SQLiteDateFormats), FindKey(items, "DateTimeFormat", "ISO8601"), ignoreCase: true);
				if (num)
				{
					_sql = new SQLite3_UTF16(fmt);
				}
				else
				{
					_sql = new SQLite3(fmt);
				}
				SQLiteOpenFlagsEnum sQLiteOpenFlagsEnum = SQLiteOpenFlagsEnum.None;
				if (SqliteConvert.ToBoolean(FindKey(items, "Read Only", bool.FalseString)))
				{
					sQLiteOpenFlagsEnum |= SQLiteOpenFlagsEnum.ReadOnly;
				}
				else
				{
					sQLiteOpenFlagsEnum |= SQLiteOpenFlagsEnum.ReadWrite;
					if (!SqliteConvert.ToBoolean(FindKey(items, "FailIfMissing", bool.FalseString)))
					{
						sQLiteOpenFlagsEnum |= SQLiteOpenFlagsEnum.Create;
					}
				}
				if (SqliteConvert.ToBoolean(FindKey(items, "FileProtectionComplete", bool.FalseString)))
				{
					sQLiteOpenFlagsEnum |= SQLiteOpenFlagsEnum.FileProtectionComplete;
				}
				if (SqliteConvert.ToBoolean(FindKey(items, "FileProtectionCompleteUnlessOpen", bool.FalseString)))
				{
					sQLiteOpenFlagsEnum |= SQLiteOpenFlagsEnum.FileProtectionCompleteUnlessOpen;
				}
				if (SqliteConvert.ToBoolean(FindKey(items, "FileProtectionCompleteUntilFirstUserAuthentication", bool.FalseString)))
				{
					sQLiteOpenFlagsEnum |= SQLiteOpenFlagsEnum.FileProtectionCompleteUntilFirstUserAuthentication;
				}
				if (SqliteConvert.ToBoolean(FindKey(items, "FileProtectionNone", bool.FalseString)))
				{
					sQLiteOpenFlagsEnum |= SQLiteOpenFlagsEnum.FileProtectionNone;
				}
				_sql.Open(text, sQLiteOpenFlagsEnum, maxPoolSize, usePool);
				_binaryGuid = SqliteConvert.ToBoolean(FindKey(items, "BinaryGUID", bool.TrueString));
				string text2 = FindKey(items, "Password", null);
				if (!string.IsNullOrEmpty(text2))
				{
					_sql.SetPassword(Encoding.UTF8.GetBytes(text2));
				}
				else if (_password != null)
				{
					_sql.SetPassword(_password);
				}
				_password = null;
				_dataSource = Path.GetFileNameWithoutExtension(text);
				OnStateChange(ConnectionState.Open);
				_version++;
				using (SqliteCommand sqliteCommand = CreateCommand())
				{
					string text3;
					if (text != ":memory:")
					{
						text3 = FindKey(items, "Page Size", "1024");
						if (Convert.ToInt32(text3, CultureInfo.InvariantCulture) != 1024)
						{
							sqliteCommand.CommandText = string.Format(CultureInfo.InvariantCulture, "PRAGMA page_size={0}", text3);
							sqliteCommand.ExecuteNonQuery();
						}
					}
					text3 = FindKey(items, "Max Page Count", "0");
					if (Convert.ToInt32(text3, CultureInfo.InvariantCulture) != 0)
					{
						sqliteCommand.CommandText = string.Format(CultureInfo.InvariantCulture, "PRAGMA max_page_count={0}", text3);
						sqliteCommand.ExecuteNonQuery();
					}
					text3 = FindKey(items, "Legacy Format", bool.FalseString);
					sqliteCommand.CommandText = string.Format(CultureInfo.InvariantCulture, "PRAGMA legacy_file_format={0}", SqliteConvert.ToBoolean(text3) ? "ON" : "OFF");
					sqliteCommand.ExecuteNonQuery();
					text3 = FindKey(items, "Synchronous", "Normal");
					if (string.Compare(text3, "Full", StringComparison.OrdinalIgnoreCase) != 0)
					{
						sqliteCommand.CommandText = string.Format(CultureInfo.InvariantCulture, "PRAGMA synchronous={0}", text3);
						sqliteCommand.ExecuteNonQuery();
					}
					text3 = FindKey(items, "Cache Size", "2000");
					if (Convert.ToInt32(text3, CultureInfo.InvariantCulture) != 2000)
					{
						sqliteCommand.CommandText = string.Format(CultureInfo.InvariantCulture, "PRAGMA cache_size={0}", text3);
						sqliteCommand.ExecuteNonQuery();
					}
					text3 = FindKey(items, "Journal Mode", "Delete");
					if (string.Compare(text3, "Default", StringComparison.OrdinalIgnoreCase) != 0)
					{
						sqliteCommand.CommandText = string.Format(CultureInfo.InvariantCulture, "PRAGMA journal_mode={0}", text3);
						sqliteCommand.ExecuteNonQuery();
					}
				}
				if (this._commitHandler != null)
				{
					_sql.SetCommitHook(_commitCallback);
				}
				if (this._updateHandler != null)
				{
					_sql.SetUpdateHook(_updateCallback);
				}
				if (this._rollbackHandler != null)
				{
					_sql.SetRollbackHook(_rollbackCallback);
				}
				if (Transaction.Current != null && SqliteConvert.ToBoolean(FindKey(items, "Enlist", bool.TrueString)))
				{
					EnlistTransaction(Transaction.Current);
				}
			}
			catch (SqliteException)
			{
				Close();
				throw;
			}
		}

		public void ChangePassword(string newPassword)
		{
			ChangePassword(string.IsNullOrEmpty(newPassword) ? null : Encoding.UTF8.GetBytes(newPassword));
		}

		public void ChangePassword(byte[] newPassword)
		{
			if (_connectionState != ConnectionState.Open)
			{
				throw new InvalidOperationException("Database must be opened before changing the password.");
			}
			_sql.ChangePassword(newPassword);
		}

		public void SetPassword(string databasePassword)
		{
			SetPassword(string.IsNullOrEmpty(databasePassword) ? null : Encoding.UTF8.GetBytes(databasePassword));
		}

		public void SetPassword(byte[] databasePassword)
		{
			if (_connectionState != 0)
			{
				throw new InvalidOperationException("Password can only be set before the database is opened.");
			}
			if (databasePassword != null && databasePassword.Length == 0)
			{
				databasePassword = null;
			}
			_password = databasePassword;
		}

		private string ExpandFileName(string sourceFile)
		{
			if (string.IsNullOrEmpty(sourceFile))
			{
				return sourceFile;
			}
			if (sourceFile.StartsWith("|DataDirectory|", StringComparison.OrdinalIgnoreCase))
			{
				string text = AppDomain.CurrentDomain.GetData("DataDirectory") as string;
				if (string.IsNullOrEmpty(text))
				{
					text = AppDomain.CurrentDomain.BaseDirectory;
				}
				if (sourceFile.Length > "|DataDirectory|".Length && (sourceFile["|DataDirectory|".Length] == Path.DirectorySeparatorChar || sourceFile["|DataDirectory|".Length] == Path.AltDirectorySeparatorChar))
				{
					sourceFile = sourceFile.Remove("|DataDirectory|".Length, 1);
				}
				sourceFile = Path.Combine(text, sourceFile.Substring("|DataDirectory|".Length));
			}
			sourceFile = Path.GetFullPath(sourceFile);
			return sourceFile;
		}

		public override DataTable GetSchema()
		{
			return GetSchema("MetaDataCollections", null);
		}

		public override DataTable GetSchema(string collectionName)
		{
			return GetSchema(collectionName, new string[0]);
		}

		public override DataTable GetSchema(string collectionName, string[] restrictionValues)
		{
			if (_connectionState != ConnectionState.Open)
			{
				throw new InvalidOperationException();
			}
			string[] array = new string[5];
			if (restrictionValues == null)
			{
				restrictionValues = new string[0];
			}
			restrictionValues.CopyTo(array, 0);
			switch (collectionName.ToUpper(CultureInfo.InvariantCulture))
			{
			case "METADATACOLLECTIONS":
				return Schema_MetaDataCollections();
			case "DATASOURCEINFORMATION":
				return Schema_DataSourceInformation();
			case "DATATYPES":
				return Schema_DataTypes();
			case "COLUMNS":
			case "TABLECOLUMNS":
				return Schema_Columns(array[0], array[2], array[3]);
			case "INDEXES":
				return Schema_Indexes(array[0], array[2], array[3]);
			case "TRIGGERS":
				return Schema_Triggers(array[0], array[2], array[3]);
			case "INDEXCOLUMNS":
				return Schema_IndexColumns(array[0], array[2], array[3], array[4]);
			case "TABLES":
				return Schema_Tables(array[0], array[2], array[3]);
			case "VIEWS":
				return Schema_Views(array[0], array[2]);
			case "VIEWCOLUMNS":
				return Schema_ViewColumns(array[0], array[2], array[3]);
			case "FOREIGNKEYS":
				return Schema_ForeignKeys(array[0], array[2], array[3]);
			case "CATALOGS":
				return Schema_Catalogs(array[0]);
			case "RESERVEDWORDS":
				return Schema_ReservedWords();
			default:
				throw new NotSupportedException();
			}
		}

		private static DataTable Schema_ReservedWords()
		{
			DataTable dataTable = new DataTable("MetaDataCollections");
			dataTable.Locale = CultureInfo.InvariantCulture;
			dataTable.Columns.Add("ReservedWord", typeof(string));
			dataTable.Columns.Add("MaximumVersion", typeof(string));
			dataTable.Columns.Add("MinimumVersion", typeof(string));
			dataTable.BeginLoadData();
			string[] array = SR.Keywords.Split(new char[1] { ',' });
			foreach (string value in array)
			{
				DataRow dataRow = dataTable.NewRow();
				dataRow[0] = value;
				dataTable.Rows.Add(dataRow);
			}
			dataTable.AcceptChanges();
			dataTable.EndLoadData();
			return dataTable;
		}

		private static DataTable Schema_MetaDataCollections()
		{
			DataTable dataTable = new DataTable("MetaDataCollections");
			dataTable.Locale = CultureInfo.InvariantCulture;
			dataTable.Columns.Add("CollectionName", typeof(string));
			dataTable.Columns.Add("NumberOfRestrictions", typeof(int));
			dataTable.Columns.Add("NumberOfIdentifierParts", typeof(int));
			dataTable.BeginLoadData();
			StringReader stringReader = new StringReader(SR.MetaDataCollections);
			dataTable.ReadXml((TextReader?)stringReader);
			stringReader.Close();
			dataTable.AcceptChanges();
			dataTable.EndLoadData();
			return dataTable;
		}

		private DataTable Schema_DataSourceInformation()
		{
			DataTable dataTable = new DataTable("DataSourceInformation");
			dataTable.Locale = CultureInfo.InvariantCulture;
			dataTable.Columns.Add(DbMetaDataColumnNames.CompositeIdentifierSeparatorPattern, typeof(string));
			dataTable.Columns.Add(DbMetaDataColumnNames.DataSourceProductName, typeof(string));
			dataTable.Columns.Add(DbMetaDataColumnNames.DataSourceProductVersion, typeof(string));
			dataTable.Columns.Add(DbMetaDataColumnNames.DataSourceProductVersionNormalized, typeof(string));
			dataTable.Columns.Add(DbMetaDataColumnNames.GroupByBehavior, typeof(int));
			dataTable.Columns.Add(DbMetaDataColumnNames.IdentifierPattern, typeof(string));
			dataTable.Columns.Add(DbMetaDataColumnNames.IdentifierCase, typeof(int));
			dataTable.Columns.Add(DbMetaDataColumnNames.OrderByColumnsInSelect, typeof(bool));
			dataTable.Columns.Add(DbMetaDataColumnNames.ParameterMarkerFormat, typeof(string));
			dataTable.Columns.Add(DbMetaDataColumnNames.ParameterMarkerPattern, typeof(string));
			dataTable.Columns.Add(DbMetaDataColumnNames.ParameterNameMaxLength, typeof(int));
			dataTable.Columns.Add(DbMetaDataColumnNames.ParameterNamePattern, typeof(string));
			dataTable.Columns.Add(DbMetaDataColumnNames.QuotedIdentifierPattern, typeof(string));
			dataTable.Columns.Add(DbMetaDataColumnNames.QuotedIdentifierCase, typeof(int));
			dataTable.Columns.Add(DbMetaDataColumnNames.StatementSeparatorPattern, typeof(string));
			dataTable.Columns.Add(DbMetaDataColumnNames.StringLiteralPattern, typeof(string));
			dataTable.Columns.Add(DbMetaDataColumnNames.SupportedJoinOperators, typeof(int));
			dataTable.BeginLoadData();
			DataRow dataRow = dataTable.NewRow();
			dataRow.ItemArray = new object[17]
			{
				null, "SQLite", _sql.Version, _sql.Version, 3, "(^\\[\\p{Lo}\\p{Lu}\\p{Ll}_@#][\\p{Lo}\\p{Lu}\\p{Ll}\\p{Nd}@$#_]*$)|(^\\[[^\\]\\0]|\\]\\]+\\]$)|(^\\\"[^\\\"\\0]|\\\"\\\"+\\\"$)", 1, false, "{0}", "@[\\p{Lo}\\p{Lu}\\p{Ll}\\p{Lm}_@#][\\p{Lo}\\p{Lu}\\p{Ll}\\p{Lm}\\p{Nd}\\uff3f_@#\\$]*(?=\\s+|$)",
				255, "^[\\p{Lo}\\p{Lu}\\p{Ll}\\p{Lm}_@#][\\p{Lo}\\p{Lu}\\p{Ll}\\p{Lm}\\p{Nd}\\uff3f_@#\\$]*(?=\\s+|$)", "(([^\\[]|\\]\\])*)", 1, ";", "'(([^']|'')*)'", 15
			};
			dataTable.Rows.Add(dataRow);
			dataTable.AcceptChanges();
			dataTable.EndLoadData();
			return dataTable;
		}

		private DataTable Schema_Columns(string strCatalog, string strTable, string strColumn)
		{
			DataTable dataTable = new DataTable("Columns");
			dataTable.Locale = CultureInfo.InvariantCulture;
			dataTable.Columns.Add("TABLE_CATALOG", typeof(string));
			dataTable.Columns.Add("TABLE_SCHEMA", typeof(string));
			dataTable.Columns.Add("TABLE_NAME", typeof(string));
			dataTable.Columns.Add("COLUMN_NAME", typeof(string));
			dataTable.Columns.Add("COLUMN_GUID", typeof(Guid));
			dataTable.Columns.Add("COLUMN_PROPID", typeof(long));
			dataTable.Columns.Add("ORDINAL_POSITION", typeof(int));
			dataTable.Columns.Add("COLUMN_HASDEFAULT", typeof(bool));
			dataTable.Columns.Add("COLUMN_DEFAULT", typeof(string));
			dataTable.Columns.Add("COLUMN_FLAGS", typeof(long));
			dataTable.Columns.Add("IS_NULLABLE", typeof(bool));
			dataTable.Columns.Add("DATA_TYPE", typeof(string));
			dataTable.Columns.Add("TYPE_GUID", typeof(Guid));
			dataTable.Columns.Add("CHARACTER_MAXIMUM_LENGTH", typeof(int));
			dataTable.Columns.Add("CHARACTER_OCTET_LENGTH", typeof(int));
			dataTable.Columns.Add("NUMERIC_PRECISION", typeof(int));
			dataTable.Columns.Add("NUMERIC_SCALE", typeof(int));
			dataTable.Columns.Add("DATETIME_PRECISION", typeof(long));
			dataTable.Columns.Add("CHARACTER_SET_CATALOG", typeof(string));
			dataTable.Columns.Add("CHARACTER_SET_SCHEMA", typeof(string));
			dataTable.Columns.Add("CHARACTER_SET_NAME", typeof(string));
			dataTable.Columns.Add("COLLATION_CATALOG", typeof(string));
			dataTable.Columns.Add("COLLATION_SCHEMA", typeof(string));
			dataTable.Columns.Add("COLLATION_NAME", typeof(string));
			dataTable.Columns.Add("DOMAIN_CATALOG", typeof(string));
			dataTable.Columns.Add("DOMAIN_NAME", typeof(string));
			dataTable.Columns.Add("DESCRIPTION", typeof(string));
			dataTable.Columns.Add("PRIMARY_KEY", typeof(bool));
			dataTable.Columns.Add("EDM_TYPE", typeof(string));
			dataTable.Columns.Add("AUTOINCREMENT", typeof(bool));
			dataTable.Columns.Add("UNIQUE", typeof(bool));
			dataTable.BeginLoadData();
			if (string.IsNullOrEmpty(strCatalog))
			{
				strCatalog = "main";
			}
			string arg = ((string.Compare(strCatalog, "temp", ignoreCase: true, CultureInfo.InvariantCulture) == 0) ? "sqlite_temp_master" : "sqlite_master");
			using (SqliteCommand sqliteCommand = new SqliteCommand(string.Format(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[{1}] WHERE [type] LIKE 'table' OR [type] LIKE 'view'", strCatalog, arg), this))
			{
				using SqliteDataReader sqliteDataReader = sqliteCommand.ExecuteReader();
				while (sqliteDataReader.Read())
				{
					if (!string.IsNullOrEmpty(strTable) && string.Compare(strTable, sqliteDataReader.GetString(2), ignoreCase: true, CultureInfo.InvariantCulture) != 0)
					{
						continue;
					}
					try
					{
						using SqliteCommand sqliteCommand2 = new SqliteCommand(string.Format(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[{1}]", strCatalog, sqliteDataReader.GetString(2)), this);
						using SqliteDataReader sqliteDataReader2 = sqliteCommand2.ExecuteReader(CommandBehavior.SchemaOnly);
						using DataTable dataTable2 = sqliteDataReader2.GetSchemaTable(wantUniqueInfo: true, wantDefaultValue: true);
						foreach (DataRow row in dataTable2.Rows)
						{
							if (string.Compare(row[SchemaTableColumn.ColumnName].ToString(), strColumn, ignoreCase: true, CultureInfo.InvariantCulture) == 0 || strColumn == null)
							{
								DataRow dataRow2 = dataTable.NewRow();
								dataRow2["NUMERIC_PRECISION"] = row[SchemaTableColumn.NumericPrecision];
								dataRow2["NUMERIC_SCALE"] = row[SchemaTableColumn.NumericScale];
								dataRow2["TABLE_NAME"] = sqliteDataReader.GetString(2);
								dataRow2["COLUMN_NAME"] = row[SchemaTableColumn.ColumnName];
								dataRow2["TABLE_CATALOG"] = strCatalog;
								dataRow2["ORDINAL_POSITION"] = row[SchemaTableColumn.ColumnOrdinal];
								dataRow2["COLUMN_HASDEFAULT"] = row[SchemaTableOptionalColumn.DefaultValue] != DBNull.Value;
								dataRow2["COLUMN_DEFAULT"] = row[SchemaTableOptionalColumn.DefaultValue];
								dataRow2["IS_NULLABLE"] = row[SchemaTableColumn.AllowDBNull];
								dataRow2["DATA_TYPE"] = row["DataTypeName"].ToString().ToLower(CultureInfo.InvariantCulture);
								dataRow2["EDM_TYPE"] = SqliteConvert.DbTypeToTypeName((DbType)row[SchemaTableColumn.ProviderType]).ToString().ToLower(CultureInfo.InvariantCulture);
								dataRow2["CHARACTER_MAXIMUM_LENGTH"] = row[SchemaTableColumn.ColumnSize];
								dataRow2["TABLE_SCHEMA"] = row[SchemaTableColumn.BaseSchemaName];
								dataRow2["PRIMARY_KEY"] = row[SchemaTableColumn.IsKey];
								dataRow2["AUTOINCREMENT"] = row[SchemaTableOptionalColumn.IsAutoIncrement];
								dataRow2["COLLATION_NAME"] = row["CollationType"];
								dataRow2["UNIQUE"] = row[SchemaTableColumn.IsUnique];
								dataTable.Rows.Add(dataRow2);
							}
						}
					}
					catch (SqliteException)
					{
					}
				}
			}
			dataTable.AcceptChanges();
			dataTable.EndLoadData();
			return dataTable;
		}

		private DataTable Schema_Indexes(string strCatalog, string strTable, string strIndex)
		{
			DataTable dataTable = new DataTable("Indexes");
			List<int> list = new List<int>();
			dataTable.Locale = CultureInfo.InvariantCulture;
			dataTable.Columns.Add("TABLE_CATALOG", typeof(string));
			dataTable.Columns.Add("TABLE_SCHEMA", typeof(string));
			dataTable.Columns.Add("TABLE_NAME", typeof(string));
			dataTable.Columns.Add("INDEX_CATALOG", typeof(string));
			dataTable.Columns.Add("INDEX_SCHEMA", typeof(string));
			dataTable.Columns.Add("INDEX_NAME", typeof(string));
			dataTable.Columns.Add("PRIMARY_KEY", typeof(bool));
			dataTable.Columns.Add("UNIQUE", typeof(bool));
			dataTable.Columns.Add("CLUSTERED", typeof(bool));
			dataTable.Columns.Add("TYPE", typeof(int));
			dataTable.Columns.Add("FILL_FACTOR", typeof(int));
			dataTable.Columns.Add("INITIAL_SIZE", typeof(int));
			dataTable.Columns.Add("NULLS", typeof(int));
			dataTable.Columns.Add("SORT_BOOKMARKS", typeof(bool));
			dataTable.Columns.Add("AUTO_UPDATE", typeof(bool));
			dataTable.Columns.Add("NULL_COLLATION", typeof(int));
			dataTable.Columns.Add("ORDINAL_POSITION", typeof(int));
			dataTable.Columns.Add("COLUMN_NAME", typeof(string));
			dataTable.Columns.Add("COLUMN_GUID", typeof(Guid));
			dataTable.Columns.Add("COLUMN_PROPID", typeof(long));
			dataTable.Columns.Add("COLLATION", typeof(short));
			dataTable.Columns.Add("CARDINALITY", typeof(decimal));
			dataTable.Columns.Add("PAGES", typeof(int));
			dataTable.Columns.Add("FILTER_CONDITION", typeof(string));
			dataTable.Columns.Add("INTEGRATED", typeof(bool));
			dataTable.Columns.Add("INDEX_DEFINITION", typeof(string));
			dataTable.BeginLoadData();
			if (string.IsNullOrEmpty(strCatalog))
			{
				strCatalog = "main";
			}
			string text = ((string.Compare(strCatalog, "temp", ignoreCase: true, CultureInfo.InvariantCulture) == 0) ? "sqlite_temp_master" : "sqlite_master");
			using (SqliteCommand sqliteCommand = new SqliteCommand(string.Format(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[{1}] WHERE [type] LIKE 'table'", strCatalog, text), this))
			{
				using SqliteDataReader sqliteDataReader = sqliteCommand.ExecuteReader();
				while (sqliteDataReader.Read())
				{
					bool flag = false;
					list.Clear();
					if (!string.IsNullOrEmpty(strTable) && string.Compare(sqliteDataReader.GetString(2), strTable, ignoreCase: true, CultureInfo.InvariantCulture) != 0)
					{
						continue;
					}
					try
					{
						using SqliteCommand sqliteCommand2 = new SqliteCommand(string.Format(CultureInfo.InvariantCulture, "PRAGMA [{0}].table_info([{1}])", strCatalog, sqliteDataReader.GetString(2)), this);
						using SqliteDataReader sqliteDataReader2 = sqliteCommand2.ExecuteReader();
						while (sqliteDataReader2.Read())
						{
							if (sqliteDataReader2.GetInt32(5) == 1)
							{
								list.Add(sqliteDataReader2.GetInt32(0));
								if (string.Compare(sqliteDataReader2.GetString(2), "INTEGER", ignoreCase: true, CultureInfo.InvariantCulture) == 0)
								{
									flag = true;
								}
							}
						}
					}
					catch (SqliteException)
					{
					}
					if (list.Count == 1 && flag)
					{
						DataRow dataRow = dataTable.NewRow();
						dataRow["TABLE_CATALOG"] = strCatalog;
						dataRow["TABLE_NAME"] = sqliteDataReader.GetString(2);
						dataRow["INDEX_CATALOG"] = strCatalog;
						dataRow["PRIMARY_KEY"] = true;
						dataRow["INDEX_NAME"] = string.Format(CultureInfo.InvariantCulture, "{1}_PK_{0}", sqliteDataReader.GetString(2), text);
						dataRow["UNIQUE"] = true;
						if (string.Compare((string)dataRow["INDEX_NAME"], strIndex, ignoreCase: true, CultureInfo.InvariantCulture) == 0 || strIndex == null)
						{
							dataTable.Rows.Add(dataRow);
						}
						list.Clear();
					}
					try
					{
						using SqliteCommand sqliteCommand3 = new SqliteCommand(string.Format(CultureInfo.InvariantCulture, "PRAGMA [{0}].index_list([{1}])", strCatalog, sqliteDataReader.GetString(2)), this);
						using SqliteDataReader sqliteDataReader3 = sqliteCommand3.ExecuteReader();
						while (sqliteDataReader3.Read())
						{
							if (string.Compare(sqliteDataReader3.GetString(1), strIndex, ignoreCase: true, CultureInfo.InvariantCulture) != 0 && strIndex != null)
							{
								continue;
							}
							DataRow dataRow = dataTable.NewRow();
							dataRow["TABLE_CATALOG"] = strCatalog;
							dataRow["TABLE_NAME"] = sqliteDataReader.GetString(2);
							dataRow["INDEX_CATALOG"] = strCatalog;
							dataRow["INDEX_NAME"] = sqliteDataReader3.GetString(1);
							dataRow["UNIQUE"] = sqliteDataReader3.GetBoolean(2);
							dataRow["PRIMARY_KEY"] = false;
							using (SqliteCommand sqliteCommand4 = new SqliteCommand(string.Format(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[{2}] WHERE [type] LIKE 'index' AND [name] LIKE '{1}'", strCatalog, sqliteDataReader3.GetString(1).Replace("'", "''"), text), this))
							{
								using SqliteDataReader sqliteDataReader4 = sqliteCommand4.ExecuteReader();
								while (sqliteDataReader4.Read())
								{
									if (!sqliteDataReader4.IsDBNull(4))
									{
										dataRow["INDEX_DEFINITION"] = sqliteDataReader4.GetString(4);
										break;
									}
								}
							}
							if (list.Count > 0 && sqliteDataReader3.GetString(1).StartsWith("sqlite_autoindex_" + sqliteDataReader.GetString(2), StringComparison.InvariantCultureIgnoreCase))
							{
								using SqliteCommand sqliteCommand5 = new SqliteCommand(string.Format(CultureInfo.InvariantCulture, "PRAGMA [{0}].index_info([{1}])", strCatalog, sqliteDataReader3.GetString(1)), this);
								using SqliteDataReader sqliteDataReader5 = sqliteCommand5.ExecuteReader();
								int num = 0;
								while (sqliteDataReader5.Read())
								{
									if (!list.Contains(sqliteDataReader5.GetInt32(1)))
									{
										num = 0;
										break;
									}
									num++;
								}
								if (num == list.Count)
								{
									dataRow["PRIMARY_KEY"] = true;
									list.Clear();
								}
							}
							dataTable.Rows.Add(dataRow);
						}
					}
					catch (SqliteException)
					{
					}
				}
			}
			dataTable.AcceptChanges();
			dataTable.EndLoadData();
			return dataTable;
		}

		private DataTable Schema_Triggers(string catalog, string table, string triggerName)
		{
			DataTable dataTable = new DataTable("Triggers");
			dataTable.Locale = CultureInfo.InvariantCulture;
			dataTable.Columns.Add("TABLE_CATALOG", typeof(string));
			dataTable.Columns.Add("TABLE_SCHEMA", typeof(string));
			dataTable.Columns.Add("TABLE_NAME", typeof(string));
			dataTable.Columns.Add("TRIGGER_NAME", typeof(string));
			dataTable.Columns.Add("TRIGGER_DEFINITION", typeof(string));
			dataTable.BeginLoadData();
			if (string.IsNullOrEmpty(table))
			{
				table = null;
			}
			if (string.IsNullOrEmpty(catalog))
			{
				catalog = "main";
			}
			string arg = ((string.Compare(catalog, "temp", ignoreCase: true, CultureInfo.InvariantCulture) == 0) ? "sqlite_temp_master" : "sqlite_master");
			using (SqliteCommand sqliteCommand = new SqliteCommand(string.Format(CultureInfo.InvariantCulture, "SELECT [type], [name], [tbl_name], [rootpage], [sql], [rowid] FROM [{0}].[{1}] WHERE [type] LIKE 'trigger'", catalog, arg), this))
			{
				using SqliteDataReader sqliteDataReader = sqliteCommand.ExecuteReader();
				while (sqliteDataReader.Read())
				{
					if ((string.Compare(sqliteDataReader.GetString(1), triggerName, ignoreCase: true, CultureInfo.InvariantCulture) == 0 || triggerName == null) && (table == null || string.Compare(table, sqliteDataReader.GetString(2), ignoreCase: true, CultureInfo.InvariantCulture) == 0))
					{
						DataRow dataRow = dataTable.NewRow();
						dataRow["TABLE_CATALOG"] = catalog;
						dataRow["TABLE_NAME"] = sqliteDataReader.GetString(2);
						dataRow["TRIGGER_NAME"] = sqliteDataReader.GetString(1);
						dataRow["TRIGGER_DEFINITION"] = sqliteDataReader.GetString(4);
						dataTable.Rows.Add(dataRow);
					}
				}
			}
			dataTable.AcceptChanges();
			dataTable.EndLoadData();
			return dataTable;
		}

		private DataTable Schema_Tables(string strCatalog, string strTable, string strType)
		{
			DataTable dataTable = new DataTable("Tables");
			dataTable.Locale = CultureInfo.InvariantCulture;
			dataTable.Columns.Add("TABLE_CATALOG", typeof(string));
			dataTable.Columns.Add("TABLE_SCHEMA", typeof(string));
			dataTable.Columns.Add("TABLE_NAME", typeof(string));
			dataTable.Columns.Add("TABLE_TYPE", typeof(string));
			dataTable.Columns.Add("TABLE_ID", typeof(long));
			dataTable.Columns.Add("TABLE_ROOTPAGE", typeof(int));
			dataTable.Columns.Add("TABLE_DEFINITION", typeof(string));
			dataTable.BeginLoadData();
			if (string.IsNullOrEmpty(strCatalog))
			{
				strCatalog = "main";
			}
			string arg = ((string.Compare(strCatalog, "temp", ignoreCase: true, CultureInfo.InvariantCulture) == 0) ? "sqlite_temp_master" : "sqlite_master");
			using (SqliteCommand sqliteCommand = new SqliteCommand(string.Format(CultureInfo.InvariantCulture, "SELECT [type], [name], [tbl_name], [rootpage], [sql], [rowid] FROM [{0}].[{1}] WHERE [type] LIKE 'table'", strCatalog, arg), this))
			{
				using SqliteDataReader sqliteDataReader = sqliteCommand.ExecuteReader();
				while (sqliteDataReader.Read())
				{
					string text = sqliteDataReader.GetString(0);
					if (string.Compare(sqliteDataReader.GetString(2), 0, "SQLITE_", 0, 7, ignoreCase: true, CultureInfo.InvariantCulture) == 0)
					{
						text = "SYSTEM_TABLE";
					}
					if ((string.Compare(strType, text, ignoreCase: true, CultureInfo.InvariantCulture) == 0 || strType == null) && (string.Compare(sqliteDataReader.GetString(2), strTable, ignoreCase: true, CultureInfo.InvariantCulture) == 0 || strTable == null))
					{
						DataRow dataRow = dataTable.NewRow();
						dataRow["TABLE_CATALOG"] = strCatalog;
						dataRow["TABLE_NAME"] = sqliteDataReader.GetString(2);
						dataRow["TABLE_TYPE"] = text;
						dataRow["TABLE_ID"] = sqliteDataReader.GetInt64(5);
						dataRow["TABLE_ROOTPAGE"] = sqliteDataReader.GetInt32(3);
						dataRow["TABLE_DEFINITION"] = sqliteDataReader.GetString(4);
						dataTable.Rows.Add(dataRow);
					}
				}
			}
			dataTable.AcceptChanges();
			dataTable.EndLoadData();
			return dataTable;
		}

		private DataTable Schema_Views(string strCatalog, string strView)
		{
			DataTable dataTable = new DataTable("Views");
			dataTable.Locale = CultureInfo.InvariantCulture;
			dataTable.Columns.Add("TABLE_CATALOG", typeof(string));
			dataTable.Columns.Add("TABLE_SCHEMA", typeof(string));
			dataTable.Columns.Add("TABLE_NAME", typeof(string));
			dataTable.Columns.Add("VIEW_DEFINITION", typeof(string));
			dataTable.Columns.Add("CHECK_OPTION", typeof(bool));
			dataTable.Columns.Add("IS_UPDATABLE", typeof(bool));
			dataTable.Columns.Add("DESCRIPTION", typeof(string));
			dataTable.Columns.Add("DATE_CREATED", typeof(DateTime));
			dataTable.Columns.Add("DATE_MODIFIED", typeof(DateTime));
			dataTable.BeginLoadData();
			if (string.IsNullOrEmpty(strCatalog))
			{
				strCatalog = "main";
			}
			string arg = ((string.Compare(strCatalog, "temp", ignoreCase: true, CultureInfo.InvariantCulture) == 0) ? "sqlite_temp_master" : "sqlite_master");
			using (SqliteCommand sqliteCommand = new SqliteCommand(string.Format(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[{1}] WHERE [type] LIKE 'view'", strCatalog, arg), this))
			{
				using SqliteDataReader sqliteDataReader = sqliteCommand.ExecuteReader();
				while (sqliteDataReader.Read())
				{
					if (string.Compare(sqliteDataReader.GetString(1), strView, ignoreCase: true, CultureInfo.InvariantCulture) == 0 || string.IsNullOrEmpty(strView))
					{
						string text = sqliteDataReader.GetString(4).Replace('\r', ' ').Replace('\n', ' ')
							.Replace('\t', ' ');
						int num = CultureInfo.InvariantCulture.CompareInfo.IndexOf(text, " AS ", CompareOptions.IgnoreCase);
						if (num > -1)
						{
							text = text.Substring(num + 4).Trim();
							DataRow dataRow = dataTable.NewRow();
							dataRow["TABLE_CATALOG"] = strCatalog;
							dataRow["TABLE_NAME"] = sqliteDataReader.GetString(2);
							dataRow["IS_UPDATABLE"] = false;
							dataRow["VIEW_DEFINITION"] = text;
							dataTable.Rows.Add(dataRow);
						}
					}
				}
			}
			dataTable.AcceptChanges();
			dataTable.EndLoadData();
			return dataTable;
		}

		private DataTable Schema_Catalogs(string strCatalog)
		{
			DataTable dataTable = new DataTable("Catalogs");
			dataTable.Locale = CultureInfo.InvariantCulture;
			dataTable.Columns.Add("CATALOG_NAME", typeof(string));
			dataTable.Columns.Add("DESCRIPTION", typeof(string));
			dataTable.Columns.Add("ID", typeof(long));
			dataTable.BeginLoadData();
			using (SqliteCommand sqliteCommand = new SqliteCommand("PRAGMA database_list", this))
			{
				using SqliteDataReader sqliteDataReader = sqliteCommand.ExecuteReader();
				while (sqliteDataReader.Read())
				{
					if (string.Compare(sqliteDataReader.GetString(1), strCatalog, ignoreCase: true, CultureInfo.InvariantCulture) == 0 || strCatalog == null)
					{
						DataRow dataRow = dataTable.NewRow();
						dataRow["CATALOG_NAME"] = sqliteDataReader.GetString(1);
						dataRow["DESCRIPTION"] = sqliteDataReader.GetString(2);
						dataRow["ID"] = sqliteDataReader.GetInt64(0);
						dataTable.Rows.Add(dataRow);
					}
				}
			}
			dataTable.AcceptChanges();
			dataTable.EndLoadData();
			return dataTable;
		}

		private DataTable Schema_DataTypes()
		{
			DataTable dataTable = new DataTable("DataTypes");
			dataTable.Locale = CultureInfo.InvariantCulture;
			dataTable.Columns.Add("TypeName", typeof(string));
			dataTable.Columns.Add("ProviderDbType", typeof(int));
			dataTable.Columns.Add("ColumnSize", typeof(long));
			dataTable.Columns.Add("CreateFormat", typeof(string));
			dataTable.Columns.Add("CreateParameters", typeof(string));
			dataTable.Columns.Add("DataType", typeof(string));
			dataTable.Columns.Add("IsAutoIncrementable", typeof(bool));
			dataTable.Columns.Add("IsBestMatch", typeof(bool));
			dataTable.Columns.Add("IsCaseSensitive", typeof(bool));
			dataTable.Columns.Add("IsFixedLength", typeof(bool));
			dataTable.Columns.Add("IsFixedPrecisionScale", typeof(bool));
			dataTable.Columns.Add("IsLong", typeof(bool));
			dataTable.Columns.Add("IsNullable", typeof(bool));
			dataTable.Columns.Add("IsSearchable", typeof(bool));
			dataTable.Columns.Add("IsSearchableWithLike", typeof(bool));
			dataTable.Columns.Add("IsLiteralSupported", typeof(bool));
			dataTable.Columns.Add("LiteralPrefix", typeof(string));
			dataTable.Columns.Add("LiteralSuffix", typeof(string));
			dataTable.Columns.Add("IsUnsigned", typeof(bool));
			dataTable.Columns.Add("MaximumScale", typeof(short));
			dataTable.Columns.Add("MinimumScale", typeof(short));
			dataTable.Columns.Add("IsConcurrencyType", typeof(bool));
			dataTable.BeginLoadData();
			StringReader stringReader = new StringReader(SR.DataTypes);
			dataTable.ReadXml((TextReader?)stringReader);
			stringReader.Close();
			dataTable.AcceptChanges();
			dataTable.EndLoadData();
			return dataTable;
		}

		private DataTable Schema_IndexColumns(string strCatalog, string strTable, string strIndex, string strColumn)
		{
			DataTable dataTable = new DataTable("IndexColumns");
			List<KeyValuePair<int, string>> list = new List<KeyValuePair<int, string>>();
			dataTable.Locale = CultureInfo.InvariantCulture;
			dataTable.Columns.Add("CONSTRAINT_CATALOG", typeof(string));
			dataTable.Columns.Add("CONSTRAINT_SCHEMA", typeof(string));
			dataTable.Columns.Add("CONSTRAINT_NAME", typeof(string));
			dataTable.Columns.Add("TABLE_CATALOG", typeof(string));
			dataTable.Columns.Add("TABLE_SCHEMA", typeof(string));
			dataTable.Columns.Add("TABLE_NAME", typeof(string));
			dataTable.Columns.Add("COLUMN_NAME", typeof(string));
			dataTable.Columns.Add("ORDINAL_POSITION", typeof(int));
			dataTable.Columns.Add("INDEX_NAME", typeof(string));
			dataTable.Columns.Add("COLLATION_NAME", typeof(string));
			dataTable.Columns.Add("SORT_MODE", typeof(string));
			dataTable.Columns.Add("CONFLICT_OPTION", typeof(int));
			if (string.IsNullOrEmpty(strCatalog))
			{
				strCatalog = "main";
			}
			string text = ((string.Compare(strCatalog, "temp", ignoreCase: true, CultureInfo.InvariantCulture) == 0) ? "sqlite_temp_master" : "sqlite_master");
			dataTable.BeginLoadData();
			using (SqliteCommand sqliteCommand = new SqliteCommand(string.Format(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[{1}] WHERE [type] LIKE 'table'", strCatalog, text), this))
			{
				using SqliteDataReader sqliteDataReader = sqliteCommand.ExecuteReader();
				while (sqliteDataReader.Read())
				{
					bool flag = false;
					list.Clear();
					if (!string.IsNullOrEmpty(strTable) && string.Compare(sqliteDataReader.GetString(2), strTable, ignoreCase: true, CultureInfo.InvariantCulture) != 0)
					{
						continue;
					}
					try
					{
						using SqliteCommand sqliteCommand2 = new SqliteCommand(string.Format(CultureInfo.InvariantCulture, "PRAGMA [{0}].table_info([{1}])", strCatalog, sqliteDataReader.GetString(2)), this);
						using SqliteDataReader sqliteDataReader2 = sqliteCommand2.ExecuteReader();
						while (sqliteDataReader2.Read())
						{
							if (sqliteDataReader2.GetInt32(5) == 1)
							{
								list.Add(new KeyValuePair<int, string>(sqliteDataReader2.GetInt32(0), sqliteDataReader2.GetString(1)));
								if (string.Compare(sqliteDataReader2.GetString(2), "INTEGER", ignoreCase: true, CultureInfo.InvariantCulture) == 0)
								{
									flag = true;
								}
							}
						}
					}
					catch (SqliteException)
					{
					}
					if (list.Count == 1 && flag)
					{
						DataRow dataRow = dataTable.NewRow();
						dataRow["CONSTRAINT_CATALOG"] = strCatalog;
						dataRow["CONSTRAINT_NAME"] = string.Format(CultureInfo.InvariantCulture, "{1}_PK_{0}", sqliteDataReader.GetString(2), text);
						dataRow["TABLE_CATALOG"] = strCatalog;
						dataRow["TABLE_NAME"] = sqliteDataReader.GetString(2);
						dataRow["COLUMN_NAME"] = list[0].Value;
						dataRow["INDEX_NAME"] = dataRow["CONSTRAINT_NAME"];
						dataRow["ORDINAL_POSITION"] = 0;
						dataRow["COLLATION_NAME"] = "BINARY";
						dataRow["SORT_MODE"] = "ASC";
						dataRow["CONFLICT_OPTION"] = 2;
						if (string.IsNullOrEmpty(strIndex) || string.Compare(strIndex, (string)dataRow["INDEX_NAME"], ignoreCase: true, CultureInfo.InvariantCulture) == 0)
						{
							dataTable.Rows.Add(dataRow);
						}
					}
					using SqliteCommand sqliteCommand3 = new SqliteCommand(string.Format(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[{2}] WHERE [type] LIKE 'index' AND [tbl_name] LIKE '{1}'", strCatalog, sqliteDataReader.GetString(2).Replace("'", "''"), text), this);
					using SqliteDataReader sqliteDataReader3 = sqliteCommand3.ExecuteReader();
					while (sqliteDataReader3.Read())
					{
						int num = 0;
						if (!string.IsNullOrEmpty(strIndex) && string.Compare(strIndex, sqliteDataReader3.GetString(1), ignoreCase: true, CultureInfo.InvariantCulture) != 0)
						{
							continue;
						}
						try
						{
							using SqliteCommand sqliteCommand4 = new SqliteCommand(string.Format(CultureInfo.InvariantCulture, "PRAGMA [{0}].index_info([{1}])", strCatalog, sqliteDataReader3.GetString(1)), this);
							using SqliteDataReader sqliteDataReader4 = sqliteCommand4.ExecuteReader();
							while (sqliteDataReader4.Read())
							{
								DataRow dataRow = dataTable.NewRow();
								dataRow["CONSTRAINT_CATALOG"] = strCatalog;
								dataRow["CONSTRAINT_NAME"] = sqliteDataReader3.GetString(1);
								dataRow["TABLE_CATALOG"] = strCatalog;
								dataRow["TABLE_NAME"] = sqliteDataReader3.GetString(2);
								dataRow["COLUMN_NAME"] = sqliteDataReader4.GetString(2);
								dataRow["INDEX_NAME"] = sqliteDataReader3.GetString(1);
								dataRow["ORDINAL_POSITION"] = num;
								_sql.GetIndexColumnExtendedInfo(strCatalog, sqliteDataReader3.GetString(1), sqliteDataReader4.GetString(2), out var sortMode, out var onError, out var collationSequence);
								if (!string.IsNullOrEmpty(collationSequence))
								{
									dataRow["COLLATION_NAME"] = collationSequence;
								}
								dataRow["SORT_MODE"] = ((sortMode == 0) ? "ASC" : "DESC");
								dataRow["CONFLICT_OPTION"] = onError;
								num++;
								if (string.IsNullOrEmpty(strColumn) || string.Compare(strColumn, dataRow["COLUMN_NAME"].ToString(), ignoreCase: true, CultureInfo.InvariantCulture) == 0)
								{
									dataTable.Rows.Add(dataRow);
								}
							}
						}
						catch (SqliteException)
						{
						}
					}
				}
			}
			dataTable.EndLoadData();
			dataTable.AcceptChanges();
			return dataTable;
		}

		private DataTable Schema_ViewColumns(string strCatalog, string strView, string strColumn)
		{
			DataTable dataTable = new DataTable("ViewColumns");
			dataTable.Locale = CultureInfo.InvariantCulture;
			dataTable.Columns.Add("VIEW_CATALOG", typeof(string));
			dataTable.Columns.Add("VIEW_SCHEMA", typeof(string));
			dataTable.Columns.Add("VIEW_NAME", typeof(string));
			dataTable.Columns.Add("VIEW_COLUMN_NAME", typeof(string));
			dataTable.Columns.Add("TABLE_CATALOG", typeof(string));
			dataTable.Columns.Add("TABLE_SCHEMA", typeof(string));
			dataTable.Columns.Add("TABLE_NAME", typeof(string));
			dataTable.Columns.Add("COLUMN_NAME", typeof(string));
			dataTable.Columns.Add("ORDINAL_POSITION", typeof(int));
			dataTable.Columns.Add("COLUMN_HASDEFAULT", typeof(bool));
			dataTable.Columns.Add("COLUMN_DEFAULT", typeof(string));
			dataTable.Columns.Add("COLUMN_FLAGS", typeof(long));
			dataTable.Columns.Add("IS_NULLABLE", typeof(bool));
			dataTable.Columns.Add("DATA_TYPE", typeof(string));
			dataTable.Columns.Add("CHARACTER_MAXIMUM_LENGTH", typeof(int));
			dataTable.Columns.Add("NUMERIC_PRECISION", typeof(int));
			dataTable.Columns.Add("NUMERIC_SCALE", typeof(int));
			dataTable.Columns.Add("DATETIME_PRECISION", typeof(long));
			dataTable.Columns.Add("CHARACTER_SET_CATALOG", typeof(string));
			dataTable.Columns.Add("CHARACTER_SET_SCHEMA", typeof(string));
			dataTable.Columns.Add("CHARACTER_SET_NAME", typeof(string));
			dataTable.Columns.Add("COLLATION_CATALOG", typeof(string));
			dataTable.Columns.Add("COLLATION_SCHEMA", typeof(string));
			dataTable.Columns.Add("COLLATION_NAME", typeof(string));
			dataTable.Columns.Add("PRIMARY_KEY", typeof(bool));
			dataTable.Columns.Add("EDM_TYPE", typeof(string));
			dataTable.Columns.Add("AUTOINCREMENT", typeof(bool));
			dataTable.Columns.Add("UNIQUE", typeof(bool));
			if (string.IsNullOrEmpty(strCatalog))
			{
				strCatalog = "main";
			}
			string arg = ((string.Compare(strCatalog, "temp", ignoreCase: true, CultureInfo.InvariantCulture) == 0) ? "sqlite_temp_master" : "sqlite_master");
			dataTable.BeginLoadData();
			using (SqliteCommand sqliteCommand = new SqliteCommand(string.Format(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[{1}] WHERE [type] LIKE 'view'", strCatalog, arg), this))
			{
				using SqliteDataReader sqliteDataReader = sqliteCommand.ExecuteReader();
				while (sqliteDataReader.Read())
				{
					if (!string.IsNullOrEmpty(strView) && string.Compare(strView, sqliteDataReader.GetString(2), ignoreCase: true, CultureInfo.InvariantCulture) != 0)
					{
						continue;
					}
					using SqliteCommand sqliteCommand2 = new SqliteCommand(string.Format(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[{1}]", strCatalog, sqliteDataReader.GetString(2)), this);
					string text = sqliteDataReader.GetString(4).Replace('\r', ' ').Replace('\n', ' ')
						.Replace('\t', ' ');
					int num = CultureInfo.InvariantCulture.CompareInfo.IndexOf(text, " AS ", CompareOptions.IgnoreCase);
					if (num < 0)
					{
						continue;
					}
					text = text.Substring(num + 4);
					using SqliteCommand sqliteCommand3 = new SqliteCommand(text, this);
					using SqliteDataReader sqliteDataReader2 = sqliteCommand2.ExecuteReader(CommandBehavior.SchemaOnly);
					using SqliteDataReader sqliteDataReader3 = sqliteCommand3.ExecuteReader(CommandBehavior.SchemaOnly);
					using DataTable dataTable3 = sqliteDataReader2.GetSchemaTable(wantUniqueInfo: false, wantDefaultValue: false);
					using DataTable dataTable2 = sqliteDataReader3.GetSchemaTable(wantUniqueInfo: false, wantDefaultValue: false);
					for (num = 0; num < dataTable2.Rows.Count; num++)
					{
						DataRow dataRow = dataTable3.Rows[num];
						DataRow dataRow2 = dataTable2.Rows[num];
						if (string.Compare(dataRow[SchemaTableColumn.ColumnName].ToString(), strColumn, ignoreCase: true, CultureInfo.InvariantCulture) == 0 || strColumn == null)
						{
							DataRow dataRow3 = dataTable.NewRow();
							dataRow3["VIEW_CATALOG"] = strCatalog;
							dataRow3["VIEW_NAME"] = sqliteDataReader.GetString(2);
							dataRow3["TABLE_CATALOG"] = strCatalog;
							dataRow3["TABLE_SCHEMA"] = dataRow2[SchemaTableColumn.BaseSchemaName];
							dataRow3["TABLE_NAME"] = dataRow2[SchemaTableColumn.BaseTableName];
							dataRow3["COLUMN_NAME"] = dataRow2[SchemaTableColumn.BaseColumnName];
							dataRow3["VIEW_COLUMN_NAME"] = dataRow[SchemaTableColumn.ColumnName];
							dataRow3["COLUMN_HASDEFAULT"] = dataRow[SchemaTableOptionalColumn.DefaultValue] != DBNull.Value;
							dataRow3["COLUMN_DEFAULT"] = dataRow[SchemaTableOptionalColumn.DefaultValue];
							dataRow3["ORDINAL_POSITION"] = dataRow[SchemaTableColumn.ColumnOrdinal];
							dataRow3["IS_NULLABLE"] = dataRow[SchemaTableColumn.AllowDBNull];
							dataRow3["DATA_TYPE"] = dataRow["DataTypeName"];
							dataRow3["EDM_TYPE"] = SqliteConvert.DbTypeToTypeName((DbType)dataRow[SchemaTableColumn.ProviderType]).ToString().ToLower(CultureInfo.InvariantCulture);
							dataRow3["CHARACTER_MAXIMUM_LENGTH"] = dataRow[SchemaTableColumn.ColumnSize];
							dataRow3["TABLE_SCHEMA"] = dataRow[SchemaTableColumn.BaseSchemaName];
							dataRow3["PRIMARY_KEY"] = dataRow[SchemaTableColumn.IsKey];
							dataRow3["AUTOINCREMENT"] = dataRow[SchemaTableOptionalColumn.IsAutoIncrement];
							dataRow3["COLLATION_NAME"] = dataRow["CollationType"];
							dataRow3["UNIQUE"] = dataRow[SchemaTableColumn.IsUnique];
							dataTable.Rows.Add(dataRow3);
						}
					}
				}
			}
			dataTable.EndLoadData();
			dataTable.AcceptChanges();
			return dataTable;
		}

		private DataTable Schema_ForeignKeys(string strCatalog, string strTable, string strKeyName)
		{
			DataTable dataTable = new DataTable("ForeignKeys");
			dataTable.Locale = CultureInfo.InvariantCulture;
			dataTable.Columns.Add("CONSTRAINT_CATALOG", typeof(string));
			dataTable.Columns.Add("CONSTRAINT_SCHEMA", typeof(string));
			dataTable.Columns.Add("CONSTRAINT_NAME", typeof(string));
			dataTable.Columns.Add("TABLE_CATALOG", typeof(string));
			dataTable.Columns.Add("TABLE_SCHEMA", typeof(string));
			dataTable.Columns.Add("TABLE_NAME", typeof(string));
			dataTable.Columns.Add("CONSTRAINT_TYPE", typeof(string));
			dataTable.Columns.Add("IS_DEFERRABLE", typeof(bool));
			dataTable.Columns.Add("INITIALLY_DEFERRED", typeof(bool));
			dataTable.Columns.Add("FKEY_FROM_COLUMN", typeof(string));
			dataTable.Columns.Add("FKEY_FROM_ORDINAL_POSITION", typeof(int));
			dataTable.Columns.Add("FKEY_TO_CATALOG", typeof(string));
			dataTable.Columns.Add("FKEY_TO_SCHEMA", typeof(string));
			dataTable.Columns.Add("FKEY_TO_TABLE", typeof(string));
			dataTable.Columns.Add("FKEY_TO_COLUMN", typeof(string));
			if (string.IsNullOrEmpty(strCatalog))
			{
				strCatalog = "main";
			}
			string arg = ((string.Compare(strCatalog, "temp", ignoreCase: true, CultureInfo.InvariantCulture) == 0) ? "sqlite_temp_master" : "sqlite_master");
			dataTable.BeginLoadData();
			using (SqliteCommand sqliteCommand = new SqliteCommand(string.Format(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[{1}] WHERE [type] LIKE 'table'", strCatalog, arg), this))
			{
				using SqliteDataReader sqliteDataReader = sqliteCommand.ExecuteReader();
				while (sqliteDataReader.Read())
				{
					if (!string.IsNullOrEmpty(strTable) && string.Compare(strTable, sqliteDataReader.GetString(2), ignoreCase: true, CultureInfo.InvariantCulture) != 0)
					{
						continue;
					}
					try
					{
						using SqliteCommandBuilder sqliteCommandBuilder = new SqliteCommandBuilder();
						using SqliteCommand sqliteCommand2 = new SqliteCommand(string.Format(CultureInfo.InvariantCulture, "PRAGMA [{0}].foreign_key_list([{1}])", strCatalog, sqliteDataReader.GetString(2)), this);
						using SqliteDataReader sqliteDataReader2 = sqliteCommand2.ExecuteReader();
						while (sqliteDataReader2.Read())
						{
							DataRow dataRow = dataTable.NewRow();
							dataRow["CONSTRAINT_CATALOG"] = strCatalog;
							dataRow["CONSTRAINT_NAME"] = string.Format(CultureInfo.InvariantCulture, "FK_{0}_{1}", sqliteDataReader[2], sqliteDataReader2.GetInt32(0));
							dataRow["TABLE_CATALOG"] = strCatalog;
							dataRow["TABLE_NAME"] = sqliteCommandBuilder.UnquoteIdentifier(sqliteDataReader.GetString(2));
							dataRow["CONSTRAINT_TYPE"] = "FOREIGN KEY";
							dataRow["IS_DEFERRABLE"] = false;
							dataRow["INITIALLY_DEFERRED"] = false;
							dataRow["FKEY_FROM_COLUMN"] = sqliteCommandBuilder.UnquoteIdentifier(sqliteDataReader2[3].ToString());
							dataRow["FKEY_TO_CATALOG"] = strCatalog;
							dataRow["FKEY_TO_TABLE"] = sqliteCommandBuilder.UnquoteIdentifier(sqliteDataReader2[2].ToString());
							dataRow["FKEY_TO_COLUMN"] = sqliteCommandBuilder.UnquoteIdentifier(sqliteDataReader2[4].ToString());
							dataRow["FKEY_FROM_ORDINAL_POSITION"] = sqliteDataReader2[1];
							if (string.IsNullOrEmpty(strKeyName) || string.Compare(strKeyName, dataRow["CONSTRAINT_NAME"].ToString(), ignoreCase: true, CultureInfo.InvariantCulture) == 0)
							{
								dataTable.Rows.Add(dataRow);
							}
						}
					}
					catch (SqliteException)
					{
					}
				}
			}
			dataTable.EndLoadData();
			dataTable.AcceptChanges();
			return dataTable;
		}

		private void UpdateCallback(IntPtr puser, int type, IntPtr database, IntPtr table, long rowid)
		{
			this._updateHandler(this, new UpdateEventArgs(SqliteConvert.UTF8ToString(database, -1), SqliteConvert.UTF8ToString(table, -1), (UpdateEventType)type, rowid));
		}

		private int CommitCallback(IntPtr parg)
		{
			CommitEventArgs commitEventArgs = new CommitEventArgs();
			this._commitHandler(this, commitEventArgs);
			if (!commitEventArgs.AbortTransaction)
			{
				return 0;
			}
			return 1;
		}

		private void RollbackCallback(IntPtr parg)
		{
			this._rollbackHandler(this, EventArgs.Empty);
		}

		public static void SetConfig(SQLiteConfig config)
		{
			int num = UnsafeNativeMethods.sqlite3_config(config);
			if (num > 0)
			{
				throw new SqliteException(num, null);
			}
		}
	}
	public sealed class SqliteFactory : DbProviderFactory, IServiceProvider
	{
		private static Type _dbProviderServicesType;

		private static object _sqliteServices;

		public static readonly SqliteFactory Instance;

		static SqliteFactory()
		{
			Instance = new SqliteFactory();
			_dbProviderServicesType = Type.GetType("System.Data.Common.DbProviderServices, System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", throwOnError: false);
		}

		object IServiceProvider.GetService(Type serviceType)
		{
			if (serviceType == typeof(ISQLiteSchemaExtensions) || (_dbProviderServicesType != null && serviceType == _dbProviderServicesType))
			{
				return GetSQLiteProviderServicesInstance();
			}
			return null;
		}

		[ReflectionPermission(SecurityAction.Assert, MemberAccess = true)]
		private object GetSQLiteProviderServicesInstance()
		{
			if (_sqliteServices == null)
			{
				Type type = Type.GetType("Mono.Data.Sqlite.SQLiteProviderServices, Mono.Data.Sqlite.Linq, Version=2.0.38.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139", throwOnError: false);
				if (type != null)
				{
					_sqliteServices = type.GetField("Instance", BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic).GetValue(null);
				}
			}
			return _sqliteServices;
		}

		public override DbCommand CreateCommand()
		{
			return new SqliteCommand();
		}

		public override DbCommandBuilder CreateCommandBuilder()
		{
			return new SqliteCommandBuilder();
		}

		public override DbConnection CreateConnection()
		{
			return new SqliteConnection();
		}

		public override DbConnectionStringBuilder CreateConnectionStringBuilder()
		{
			return new SqliteConnectionStringBuilder();
		}

		public override DbDataAdapter CreateDataAdapter()
		{
			return new SqliteDataAdapter();
		}

		public override DbParameter CreateParameter()
		{
			return new SqliteParameter();
		}
	}
	internal class SQLite3 : SQLiteBase
	{
		protected SqliteConnectionHandle _sql;

		protected string _fileName;

		protected bool _usePool;

		protected int _poolVersion;

		private bool _buildingSchema;

		protected SqliteFunction[] _functionsArray;

		internal override string Version => SQLiteVersion;

		internal static string SQLiteVersion => SqliteConvert.UTF8ToString(UnsafeNativeMethods.sqlite3_libversion(), -1);

		internal override int Changes => UnsafeNativeMethods.sqlite3_changes(_sql);

		internal SQLite3(SQLiteDateFormats fmt)
			: base(fmt)
		{
		}

		protected override void Dispose(bool bDisposing)
		{
			if (bDisposing)
			{
				Close();
			}
		}

		internal override void Close()
		{
			if (_sql != null)
			{
				if (_usePool)
				{
					SQLiteBase.ResetConnection(_sql);
					SqliteConnectionPool.Add(_fileName, _sql, _poolVersion);
				}
				else
				{
					_sql.Dispose();
				}
			}
			_sql = null;
		}

		internal override void Cancel()
		{
			UnsafeNativeMethods.sqlite3_interrupt(_sql);
		}

		internal override void Open(string strFilename, SQLiteOpenFlagsEnum flags, int maxPoolSize, bool usePool)
		{
			if (_sql != null)
			{
				return;
			}
			_usePool = usePool;
			if (usePool)
			{
				_fileName = strFilename;
				_sql = SqliteConnectionPool.Remove(strFilename, maxPoolSize, out _poolVersion);
			}
			if (_sql == null)
			{
				int num;
				IntPtr db;
				if (UnsafeNativeMethods.use_sqlite3_open_v2)
				{
					num = UnsafeNativeMethods.sqlite3_open_v2(SqliteConvert.ToUTF8(strFilename), out db, (int)flags, IntPtr.Zero);
				}
				else
				{
					Console.WriteLine("Your sqlite3 version is old - please upgrade to at least v3.5.0!");
					num = UnsafeNativeMethods.sqlite3_open(SqliteConvert.ToUTF8(strFilename), out db);
				}
				if (num > 0)
				{
					throw new SqliteException(num, null);
				}
				_sql = db;
			}
			_functionsArray = SqliteFunction.BindFunctions(this);
			SetTimeout(0);
		}

		internal override void ClearPool()
		{
			SqliteConnectionPool.ClearPool(_fileName);
		}

		internal override void SetTimeout(int nTimeoutMS)
		{
			int num = UnsafeNativeMethods.sqlite3_busy_timeout(_sql, nTimeoutMS);
			if (num > 0)
			{
				throw new SqliteException(num, SQLiteLastError());
			}
		}

		internal override bool Step(SqliteStatement stmt)
		{
			Random random = null;
			uint tickCount = (uint)Environment.TickCount;
			uint num = (uint)(stmt._command._commandTimeout * 1000);
			while (true)
			{
				int num2 = UnsafeNativeMethods.sqlite3_step(stmt._sqlite_stmt);
				if (num2 == 100)
				{
					return true;
				}
				if (num2 == 101)
				{
					break;
				}
				if (num2 <= 0)
				{
					continue;
				}
				int num3 = Reset(stmt);
				switch (num3)
				{
				case 0:
					throw new SqliteException(num2, SQLiteLastError());
				case 5:
				case 6:
					if (stmt._command != null)
					{
						if (random == null)
						{
							random = new Random();
						}
						if ((uint)(Environment.TickCount - (int)tickCount) > num)
						{
							throw new SqliteException(num3, SQLiteLastError());
						}
						Thread.CurrentThread.Join(random.Next(1, 150));
					}
					break;
				}
			}
			return false;
		}

		internal override int Reset(SqliteStatement stmt)
		{
			int num = UnsafeNativeMethods.sqlite3_reset(stmt._sqlite_stmt);
			if (num == 17)
			{
				string strRemain;
				using (SqliteStatement sqliteStatement = Prepare(null, stmt._sqlStatement, null, (uint)(stmt._command._commandTimeout * 1000), out strRemain))
				{
					stmt._sqlite_stmt.Dispose();
					stmt._sqlite_stmt = sqliteStatement._sqlite_stmt;
					sqliteStatement._sqlite_stmt = null;
					stmt.BindParameters();
				}
				return -1;
			}
			if (num == 6 || num == 5)
			{
				return num;
			}
			if (num > 0)
			{
				throw new SqliteException(num, SQLiteLastError());
			}
			return 0;
		}

		internal override string SQLiteLastError()
		{
			return SQLiteBase.SQLiteLastError(_sql);
		}

		internal override SqliteStatement Prepare(SqliteConnection cnn, string strSql, SqliteStatement previous, uint timeoutMS, out string strRemain)
		{
			IntPtr stmt = IntPtr.Zero;
			IntPtr ptrRemain = IntPtr.Zero;
			int nativestringlen = 0;
			int num = 17;
			int num2 = 0;
			byte[] array = SqliteConvert.ToUTF8(strSql);
			string text = null;
			SqliteStatement sqliteStatement = null;
			Random random = null;
			uint tickCount = (uint)Environment.TickCount;
			GCHandle gCHandle = GCHandle.Alloc(array, GCHandleType.Pinned);
			IntPtr pSql = gCHandle.AddrOfPinnedObject();
			try
			{
				while ((num == 17 || num == 6 || num == 5) && num2 < 3)
				{
					num = UnsafeNativeMethods.sqlite3_prepare(_sql, pSql, array.Length - 1, out stmt, out ptrRemain);
					nativestringlen = -1;
					switch (num)
					{
					case 17:
						num2++;
						break;
					case 1:
						if (string.Compare(SQLiteLastError(), "near \"TYPES\": syntax error", StringComparison.OrdinalIgnoreCase) == 0)
						{
							int num3 = strSql.IndexOf(';');
							if (num3 == -1)
							{
								num3 = strSql.Length - 1;
							}
							text = strSql.Substring(0, num3 + 1);
							strSql = strSql.Substring(num3 + 1);
							strRemain = "";
							while (sqliteStatement == null && strSql.Length > 0)
							{
								sqliteStatement = Prepare(cnn, strSql, previous, timeoutMS, out strRemain);
								strSql = strRemain;
							}
							sqliteStatement?.SetTypes(text);
							return sqliteStatement;
						}
						if (_buildingSchema || string.Compare(SQLiteLastError(), 0, "no such table: TEMP.SCHEMA", 0, 26, StringComparison.OrdinalIgnoreCase) != 0)
						{
							break;
						}
						strRemain = "";
						_buildingSchema = true;
						try
						{
							if (((IServiceProvider)SqliteFactory.Instance).GetService(typeof(ISQLiteSchemaExtensions)) is ISQLiteSchemaExtensions iSQLiteSchemaExtensions)
							{
								iSQLiteSchemaExtensions.BuildTempSchema(cnn);
							}
							while (sqliteStatement == null && strSql.Length > 0)
							{
								sqliteStatement = Prepare(cnn, strSql, previous, timeoutMS, out strRemain);
								strSql = strRemain;
							}
							return sqliteStatement;
						}
						finally
						{
							_buildingSchema = false;
						}
					case 5:
					case 6:
						if (random == null)
						{
							random = new Random();
						}
						if ((uint)(Environment.TickCount - (int)tickCount) > timeoutMS)
						{
							throw new SqliteException(num, SQLiteLastError());
						}
						Thread.CurrentThread.Join(random.Next(1, 150));
						break;
					}
				}
				if (num > 0)
				{
					throw new SqliteException(num, SQLiteLastError());
				}
				strRemain = SqliteConvert.UTF8ToString(ptrRemain, nativestringlen);
				if (stmt != IntPtr.Zero)
				{
					sqliteStatement = new SqliteStatement(this, stmt, strSql.Substring(0, strSql.Length - strRemain.Length), previous);
				}
				return sqliteStatement;
			}
			finally
			{
				gCHandle.Free();
			}
		}

		internal override void Bind_Double(SqliteStatement stmt, int index, double value)
		{
			int num = UnsafeNativeMethods.sqlite3_bind_double(stmt._sqlite_stmt, index, value);
			if (num > 0)
			{
				throw new SqliteException(num, SQLiteLastError());
			}
		}

		internal override void Bind_Int32(SqliteStatement stmt, int index, int value)
		{
			int num = UnsafeNativeMethods.sqlite3_bind_int(stmt._sqlite_stmt, index, value);
			if (num > 0)
			{
				throw new SqliteException(num, SQLiteLastError());
			}
		}

		internal override void Bind_Int64(SqliteStatement stmt, int index, long value)
		{
			int num = UnsafeNativeMethods.sqlite3_bind_int64(stmt._sqlite_stmt, index, value);
			if (num > 0)
			{
				throw new SqliteException(num, SQLiteLastError());
			}
		}

		internal override void Bind_Text(SqliteStatement stmt, int index, string value)
		{
			byte[] array = SqliteConvert.ToUTF8(value);
			int num = UnsafeNativeMethods.sqlite3_bind_text(stmt._sqlite_stmt, index, array, array.Length - 1, (IntPtr)(-1));
			if (num > 0)
			{
				throw new SqliteException(num, SQLiteLastError());
			}
		}

		internal override void Bind_DateTime(SqliteStatement stmt, int index, DateTime dt)
		{
			byte[] array = ToUTF8(dt);
			int num = UnsafeNativeMethods.sqlite3_bind_text(stmt._sqlite_stmt, index, array, array.Length - 1, (IntPtr)(-1));
			if (num > 0)
			{
				throw new SqliteException(num, SQLiteLastError());
			}
		}

		internal override void Bind_Blob(SqliteStatement stmt, int index, byte[] blobData)
		{
			int num = UnsafeNativeMethods.sqlite3_bind_blob(stmt._sqlite_stmt, index, blobData, blobData.Length, (IntPtr)(-1));
			if (num > 0)
			{
				throw new SqliteException(num, SQLiteLastError());
			}
		}

		internal override void Bind_Null(SqliteStatement stmt, int index)
		{
			int num = UnsafeNativeMethods.sqlite3_bind_null(stmt._sqlite_stmt, index);
			if (num > 0)
			{
				throw new SqliteException(num, SQLiteLastError());
			}
		}

		internal override int Bind_ParamCount(SqliteStatement stmt)
		{
			return UnsafeNativeMethods.sqlite3_bind_parameter_count(stmt._sqlite_stmt);
		}

		internal override string Bind_ParamName(SqliteStatement stmt, int index)
		{
			return SqliteConvert.UTF8ToString(UnsafeNativeMethods.sqlite3_bind_parameter_name(stmt._sqlite_stmt, index), -1);
		}

		internal override int Bind_ParamIndex(SqliteStatement stmt, string paramName)
		{
			return UnsafeNativeMethods.sqlite3_bind_parameter_index(stmt._sqlite_stmt, SqliteConvert.ToUTF8(paramName));
		}

		internal override int ColumnCount(SqliteStatement stmt)
		{
			return UnsafeNativeMethods.sqlite3_column_count(stmt._sqlite_stmt);
		}

		internal override string ColumnName(SqliteStatement stmt, int index)
		{
			return SqliteConvert.UTF8ToString(UnsafeNativeMethods.sqlite3_column_name(stmt._sqlite_stmt, index), -1);
		}

		internal override TypeAffinity ColumnAffinity(SqliteStatement stmt, int index)
		{
			return UnsafeNativeMethods.sqlite3_column_type(stmt._sqlite_stmt, index);
		}

		internal override string ColumnType(SqliteStatement stmt, int index, out TypeAffinity nAffinity)
		{
			int nativestringlen = -1;
			IntPtr intPtr = UnsafeNativeMethods.sqlite3_column_decltype(stmt._sqlite_stmt, index);
			nAffinity = ColumnAffinity(stmt, index);
			if (intPtr != IntPtr.Zero)
			{
				return SqliteConvert.UTF8ToString(intPtr, nativestringlen);
			}
			string[] typeDefinitions = stmt.TypeDefinitions;
			if (typeDefinitions != null && index < typeDefinitions.Length && typeDefinitions[index] != null)
			{
				return typeDefinitions[index];
			}
			return string.Empty;
		}

		internal override int ColumnIndex(SqliteStatement stmt, string columnName)
		{
			int num = ColumnCount(stmt);
			for (int i = 0; i < num; i++)
			{
				if (string.Compare(columnName, ColumnName(stmt, i), ignoreCase: true, CultureInfo.InvariantCulture) == 0)
				{
					return i;
				}
			}
			return -1;
		}

		internal override string ColumnOriginalName(SqliteStatement stmt, int index)
		{
			return SqliteConvert.UTF8ToString(UnsafeNativeMethods.sqlite3_column_origin_name(stmt._sqlite_stmt, index), -1);
		}

		internal override string ColumnDatabaseName(SqliteStatement stmt, int index)
		{
			return SqliteConvert.UTF8ToString(UnsafeNativeMethods.sqlite3_column_database_name(stmt._sqlite_stmt, index), -1);
		}

		internal override string ColumnTableName(SqliteStatement stmt, int index)
		{
			return SqliteConvert.UTF8ToString(UnsafeNativeMethods.sqlite3_column_table_name(stmt._sqlite_stmt, index), -1);
		}

		internal override void ColumnMetaData(string dataBase, string table, string column, out string dataType, out string collateSequence, out bool notNull, out bool primaryKey, out bool autoIncrement)
		{
			int nativestringlen = -1;
			int nativestringlen2 = -1;
			IntPtr ptrDataType;
			IntPtr ptrCollSeq;
			int notNull2;
			int primaryKey2;
			int autoInc;
			int num = UnsafeNativeMethods.sqlite3_table_column_metadata(_sql, SqliteConvert.ToUTF8(dataBase), SqliteConvert.ToUTF8(table), SqliteConvert.ToUTF8(column), out ptrDataType, out ptrCollSeq, out notNull2, out primaryKey2, out autoInc);
			if (num > 0)
			{
				throw new SqliteException(num, SQLiteLastError());
			}
			dataType = SqliteConvert.UTF8ToString(ptrDataType, nativestringlen);
			collateSequence = SqliteConvert.UTF8ToString(ptrCollSeq, nativestringlen2);
			notNull = notNull2 == 1;
			primaryKey = primaryKey2 == 1;
			autoIncrement = autoInc == 1;
		}

		internal override double GetDouble(SqliteStatement stmt, int index)
		{
			return UnsafeNativeMethods.sqlite3_column_double(stmt._sqlite_stmt, index);
		}

		internal override int GetInt32(SqliteStatement stmt, int index)
		{
			return UnsafeNativeMethods.sqlite3_column_int(stmt._sqlite_stmt, index);
		}

		internal override long GetInt64(SqliteStatement stmt, int index)
		{
			return UnsafeNativeMethods.sqlite3_column_int64(stmt._sqlite_stmt, index);
		}

		internal override string GetText(SqliteStatement stmt, int index)
		{
			return SqliteConvert.UTF8ToString(UnsafeNativeMethods.sqlite3_column_text(stmt._sqlite_stmt, index), -1);
		}

		internal override DateTime GetDateTime(SqliteStatement stmt, int index)
		{
			return ToDateTime(UnsafeNativeMethods.sqlite3_column_text(stmt._sqlite_stmt, index), -1);
		}

		internal unsafe override long GetBytes(SqliteStatement stmt, int index, int nDataOffset, byte[] bDest, int nStart, int nLength)
		{
			int num = nLength;
			int num2 = UnsafeNativeMethods.sqlite3_column_bytes(stmt._sqlite_stmt, index);
			IntPtr intPtr = UnsafeNativeMethods.sqlite3_column_blob(stmt._sqlite_stmt, index);
			if (bDest == null)
			{
				return num2;
			}
			if (num + nStart > bDest.Length)
			{
				num = bDest.Length - nStart;
			}
			if (num + nDataOffset > num2)
			{
				num = num2 - nDataOffset;
			}
			if (num > 0)
			{
				Marshal.Copy((IntPtr)((byte*)(void*)intPtr + nDataOffset), bDest, nStart, num);
			}
			else
			{
				num = 0;
			}
			return num;
		}

		internal override long GetChars(SqliteStatement stmt, int index, int nDataOffset, char[] bDest, int nStart, int nLength)
		{
			int num = nLength;
			string text = GetText(stmt, index);
			int length = text.Length;
			if (bDest == null)
			{
				return length;
			}
			if (num + nStart > bDest.Length)
			{
				num = bDest.Length - nStart;
			}
			if (num + nDataOffset > length)
			{
				num = length - nDataOffset;
			}
			if (num > 0)
			{
				text.CopyTo(nDataOffset, bDest, nStart, num);
			}
			else
			{
				num = 0;
			}
			return num;
		}

		internal override bool IsNull(SqliteStatement stmt, int index)
		{
			return ColumnAffinity(stmt, index) == TypeAffinity.Null;
		}

		internal override int AggregateCount(IntPtr context)
		{
			return UnsafeNativeMethods.sqlite3_aggregate_count(context);
		}

		internal override void CreateFunction(string strFunction, int nArgs, bool needCollSeq, SQLiteCallback func, SQLiteCallback funcstep, SQLiteFinalCallback funcfinal)
		{
			int num = UnsafeNativeMethods.sqlite3_create_function(_sql, SqliteConvert.ToUTF8(strFunction), nArgs, 4, IntPtr.Zero, func, funcstep, funcfinal);
			if (num == 0)
			{
				num = UnsafeNativeMethods.sqlite3_create_function(_sql, SqliteConvert.ToUTF8(strFunction), nArgs, 1, IntPtr.Zero, func, funcstep, funcfinal);
			}
			if (num > 0)
			{
				throw new SqliteException(num, SQLiteLastError());
			}
		}

		internal override void CreateCollation(string strCollation, SQLiteCollation func, SQLiteCollation func16, IntPtr user_data)
		{
			int num = UnsafeNativeMethods.sqlite3_create_collation(_sql, SqliteConvert.ToUTF8(strCollation), 2, user_data, func16);
			if (num == 0)
			{
				UnsafeNativeMethods.sqlite3_create_collation(_sql, SqliteConvert.ToUTF8(strCollation), 1, user_data, func);
			}
			if (num > 0)
			{
				throw new SqliteException(num, SQLiteLastError());
			}
		}

		internal override int ContextCollateCompare(CollationEncodingEnum enc, IntPtr context, string s1, string s2)
		{
			throw new NotImplementedException();
		}

		internal override int ContextCollateCompare(CollationEncodingEnum enc, IntPtr context, char[] c1, char[] c2)
		{
			throw new NotImplementedException();
		}

		internal override CollationSequence GetCollationSequence(SqliteFunction func, IntPtr context)
		{
			throw new NotImplementedException();
		}

		internal unsafe override long GetParamValueBytes(IntPtr p, int nDataOffset, byte[] bDest, int nStart, int nLength)
		{
			int num = nLength;
			int num2 = UnsafeNativeMethods.sqlite3_value_bytes(p);
			IntPtr intPtr = UnsafeNativeMethods.sqlite3_value_blob(p);
			if (bDest == null)
			{
				return num2;
			}
			if (num + nStart > bDest.Length)
			{
				num = bDest.Length - nStart;
			}
			if (num + nDataOffset > num2)
			{
				num = num2 - nDataOffset;
			}
			if (num > 0)
			{
				Marshal.Copy((IntPtr)((byte*)(void*)intPtr + nDataOffset), bDest, nStart, num);
			}
			else
			{
				num = 0;
			}
			return num;
		}

		internal override double GetParamValueDouble(IntPtr ptr)
		{
			return UnsafeNativeMethods.sqlite3_value_double(ptr);
		}

		internal override int GetParamValueInt32(IntPtr ptr)
		{
			return UnsafeNativeMethods.sqlite3_value_int(ptr);
		}

		internal override long GetParamValueInt64(IntPtr ptr)
		{
			return UnsafeNativeMethods.sqlite3_value_int64(ptr);
		}

		internal override string GetParamValueText(IntPtr ptr)
		{
			return SqliteConvert.UTF8ToString(UnsafeNativeMethods.sqlite3_value_text(ptr), -1);
		}

		internal override TypeAffinity GetParamValueType(IntPtr ptr)
		{
			return UnsafeNativeMethods.sqlite3_value_type(ptr);
		}

		internal override void ReturnBlob(IntPtr context, byte[] value)
		{
			UnsafeNativeMethods.sqlite3_result_blob(context, value, value.Length, (IntPtr)(-1));
		}

		internal override void ReturnDouble(IntPtr context, double value)
		{
			UnsafeNativeMethods.sqlite3_result_double(context, value);
		}

		internal override void ReturnError(IntPtr context, string value)
		{
			UnsafeNativeMethods.sqlite3_result_error(context, SqliteConvert.ToUTF8(value), value.Length);
		}

		internal override void ReturnInt32(IntPtr context, int value)
		{
			UnsafeNativeMethods.sqlite3_result_int(context, value);
		}

		internal override void ReturnInt64(IntPtr context, long value)
		{
			UnsafeNativeMethods.sqlite3_result_int64(context, value);
		}

		internal override void ReturnNull(IntPtr context)
		{
			UnsafeNativeMethods.sqlite3_result_null(context);
		}

		internal override void ReturnText(IntPtr context, string value)
		{
			byte[] array = SqliteConvert.ToUTF8(value);
			UnsafeNativeMethods.sqlite3_result_text(context, SqliteConvert.ToUTF8(value), array.Length - 1, (IntPtr)(-1));
		}

		internal override IntPtr AggregateContext(IntPtr context)
		{
			return UnsafeNativeMethods.sqlite3_aggregate_context(context, 1);
		}

		internal override void SetPassword(byte[] passwordBytes)
		{
			int num = UnsafeNativeMethods.sqlite3_key(_sql, passwordBytes, passwordBytes.Length);
			if (num > 0)
			{
				throw new SqliteException(num, SQLiteLastError());
			}
		}

		internal override void ChangePassword(byte[] newPasswordBytes)
		{
			int num = UnsafeNativeMethods.sqlite3_rekey(_sql, newPasswordBytes, (newPasswordBytes != null) ? newPasswordBytes.Length : 0);
			if (num > 0)
			{
				throw new SqliteException(num, SQLiteLastError());
			}
		}

		internal override void SetUpdateHook(SQLiteUpdateCallback func)
		{
			UnsafeNativeMethods.sqlite3_update_hook(_sql, func, IntPtr.Zero);
		}

		internal override void SetCommitHook(SQLiteCommitCallback func)
		{
			UnsafeNativeMethods.sqlite3_commit_hook(_sql, func, IntPtr.Zero);
		}

		internal override void SetRollbackHook(SQLiteRollbackCallback func)
		{
			UnsafeNativeMethods.sqlite3_rollback_hook(_sql, func, IntPtr.Zero);
		}

		internal override object GetValue(SqliteStatement stmt, int index, SQLiteType typ)
		{
			if (IsNull(stmt, index))
			{
				return DBNull.Value;
			}
			TypeAffinity typeAffinity = typ.Affinity;
			Type type = null;
			if (typ.Type != DbType.Object)
			{
				type = SqliteConvert.SQLiteTypeToType(typ);
				typeAffinity = SqliteConvert.TypeToAffinity(type);
			}
			switch (typeAffinity)
			{
			case TypeAffinity.Blob:
			{
				if (typ.Type == DbType.Guid && typ.Affinity == TypeAffinity.Text)
				{
					return new Guid(GetText(stmt, index));
				}
				int num = (int)GetBytes(stmt, index, 0, null, 0, 0);
				byte[] array = new byte[num];
				GetBytes(stmt, index, 0, array, 0, num);
				if (typ.Type == DbType.Guid && num == 16)
				{
					return new Guid(array);
				}
				return array;
			}
			case TypeAffinity.DateTime:
				return GetDateTime(stmt, index);
			case TypeAffinity.Double:
				if (type == null)
				{
					return GetDouble(stmt, index);
				}
				return Convert.ChangeType(GetDouble(stmt, index), type, null);
			case TypeAffinity.Int64:
				if (type == null)
				{
					return GetInt64(stmt, index);
				}
				return Convert.ChangeType(GetInt64(stmt, index), type, null);
			default:
				return GetText(stmt, index);
			}
		}

		internal override int GetCursorForTable(SqliteStatement stmt, int db, int rootPage)
		{
			return -1;
		}

		internal override long GetRowIdForCursor(SqliteStatement stmt, int cursor)
		{
			return 0L;
		}

		internal override void GetIndexColumnExtendedInfo(string database, string index, string column, out int sortMode, out int onError, out string collationSequence)
		{
			sortMode = 0;
			onError = 2;
			collationSequence = "BINARY";
		}
	}
	internal class SQLite3_UTF16 : SQLite3
	{
		internal SQLite3_UTF16(SQLiteDateFormats fmt)
			: base(fmt)
		{
		}

		public override string ToString(IntPtr b, int nbytelen)
		{
			return UTF16ToString(b, nbytelen);
		}

		public static string UTF16ToString(IntPtr b, int nbytelen)
		{
			if (nbytelen == 0 || b == IntPtr.Zero)
			{
				return "";
			}
			if (nbytelen == -1)
			{
				return Marshal.PtrToStringUni(b);
			}
			return Marshal.PtrToStringUni(b, nbytelen / 2);
		}

		internal override void Open(string strFilename, SQLiteOpenFlagsEnum flags, int maxPoolSize, bool usePool)
		{
			if (_sql != null)
			{
				return;
			}
			_usePool = usePool;
			if (usePool)
			{
				_fileName = strFilename;
				_sql = SqliteConnectionPool.Remove(strFilename, maxPoolSize, out _poolVersion);
			}
			if (_sql == null)
			{
				if ((flags & SQLiteOpenFlagsEnum.Create) == 0 && !File.Exists(strFilename))
				{
					throw new SqliteException(14, strFilename);
				}
				IntPtr db;
				int num = UnsafeNativeMethods.sqlite3_open16(strFilename, out db);
				if (num > 0)
				{
					throw new SqliteException(num, null);
				}
				_sql = db;
			}
			_functionsArray = SqliteFunction.BindFunctions(this);
		}

		internal override void Bind_DateTime(SqliteStatement stmt, int index, DateTime dt)
		{
			Bind_Text(stmt, index, ToString(dt));
		}

		internal override void Bind_Text(SqliteStatement stmt, int index, string value)
		{
			int num = UnsafeNativeMethods.sqlite3_bind_text16(stmt._sqlite_stmt, index, value, value.Length * 2, (IntPtr)(-1));
			if (num > 0)
			{
				throw new SqliteException(num, SQLiteLastError());
			}
		}

		internal override DateTime GetDateTime(SqliteStatement stmt, int index)
		{
			return ToDateTime(GetText(stmt, index));
		}

		internal override string ColumnName(SqliteStatement stmt, int index)
		{
			return UTF16ToString(UnsafeNativeMethods.sqlite3_column_name16(stmt._sqlite_stmt, index), -1);
		}

		internal override string GetText(SqliteStatement stmt, int index)
		{
			return UTF16ToString(UnsafeNativeMethods.sqlite3_column_text16(stmt._sqlite_stmt, index), -1);
		}

		internal override string ColumnOriginalName(SqliteStatement stmt, int index)
		{
			return UTF16ToString(UnsafeNativeMethods.sqlite3_column_origin_name16(stmt._sqlite_stmt, index), -1);
		}

		internal override string ColumnDatabaseName(SqliteStatement stmt, int index)
		{
			return UTF16ToString(UnsafeNativeMethods.sqlite3_column_database_name16(stmt._sqlite_stmt, index), -1);
		}

		internal override string ColumnTableName(SqliteStatement stmt, int index)
		{
			return UTF16ToString(UnsafeNativeMethods.sqlite3_column_table_name16(stmt._sqlite_stmt, index), -1);
		}

		internal override string GetParamValueText(IntPtr ptr)
		{
			return UTF16ToString(UnsafeNativeMethods.sqlite3_value_text16(ptr), -1);
		}

		internal override void ReturnError(IntPtr context, string value)
		{
			UnsafeNativeMethods.sqlite3_result_error16(context, value, value.Length * 2);
		}

		internal override void ReturnText(IntPtr context, string value)
		{
			UnsafeNativeMethods.sqlite3_result_text16(context, value, value.Length * 2, (IntPtr)(-1));
		}
	}
	internal abstract class SQLiteBase : SqliteConvert, IDisposable
	{
		internal static object _lock = new object();

		internal abstract string Version { get; }

		internal abstract int Changes { get; }

		internal SQLiteBase(SQLiteDateFormats fmt)
			: base(fmt)
		{
		}

		internal abstract void Open(string strFilename, SQLiteOpenFlagsEnum flags, int maxPoolSize, bool usePool);

		internal abstract void Close();

		internal abstract void SetTimeout(int nTimeoutMS);

		internal abstract string SQLiteLastError();

		internal abstract void ClearPool();

		internal abstract SqliteStatement Prepare(SqliteConnection cnn, string strSql, SqliteStatement previous, uint timeoutMS, out string strRemain);

		internal abstract bool Step(SqliteStatement stmt);

		internal abstract int Reset(SqliteStatement stmt);

		internal abstract void Cancel();

		internal abstract void Bind_Double(SqliteStatement stmt, int index, double value);

		internal abstract void Bind_Int32(SqliteStatement stmt, int index, int value);

		internal abstract void Bind_Int64(SqliteStatement stmt, int index, long value);

		internal abstract void Bind_Text(SqliteStatement stmt, int index, string value);

		internal abstract void Bind_Blob(SqliteStatement stmt, int index, byte[] blobData);

		internal abstract void Bind_DateTime(SqliteStatement stmt, int index, DateTime dt);

		internal abstract void Bind_Null(SqliteStatement stmt, int index);

		internal abstract int Bind_ParamCount(SqliteStatement stmt);

		internal abstract string Bind_ParamName(SqliteStatement stmt, int index);

		internal abstract int Bind_ParamIndex(SqliteStatement stmt, string paramName);

		internal abstract int ColumnCount(SqliteStatement stmt);

		internal abstract string ColumnName(SqliteStatement stmt, int index);

		internal abstract TypeAffinity ColumnAffinity(SqliteStatement stmt, int index);

		internal abstract string ColumnType(SqliteStatement stmt, int index, out TypeAffinity nAffinity);

		internal abstract int ColumnIndex(SqliteStatement stmt, string columnName);

		internal abstract string ColumnOriginalName(SqliteStatement stmt, int index);

		internal abstract string ColumnDatabaseName(SqliteStatement stmt, int index);

		internal abstract string ColumnTableName(SqliteStatement stmt, int index);

		internal abstract void ColumnMetaData(string dataBase, string table, string column, out string dataType, out string collateSequence, out bool notNull, out bool primaryKey, out bool autoIncrement);

		internal abstract void GetIndexColumnExtendedInfo(string database, string index, string column, out int sortMode, out int onError, out string collationSequence);

		internal abstract double GetDouble(SqliteStatement stmt, int index);

		internal abstract int GetInt32(SqliteStatement stmt, int index);

		internal abstract long GetInt64(SqliteStatement stmt, int index);

		internal abstract string GetText(SqliteStatement stmt, int index);

		internal abstract long GetBytes(SqliteStatement stmt, int index, int nDataoffset, byte[] bDest, int nStart, int nLength);

		internal abstract long GetChars(SqliteStatement stmt, int index, int nDataoffset, char[] bDest, int nStart, int nLength);

		internal abstract DateTime GetDateTime(SqliteStatement stmt, int index);

		internal abstract bool IsNull(SqliteStatement stmt, int index);

		internal abstract void CreateCollation(string strCollation, SQLiteCollation func, SQLiteCollation func16, IntPtr user_data);

		internal abstract void CreateFunction(string strFunction, int nArgs, bool needCollSeq, SQLiteCallback func, SQLiteCallback funcstep, SQLiteFinalCallback funcfinal);

		internal abstract CollationSequence GetCollationSequence(SqliteFunction func, IntPtr context);

		internal abstract int ContextCollateCompare(CollationEncodingEnum enc, IntPtr context, string s1, string s2);

		internal abstract int ContextCollateCompare(CollationEncodingEnum enc, IntPtr context, char[] c1, char[] c2);

		internal abstract int AggregateCount(IntPtr context);

		internal abstract IntPtr AggregateContext(IntPtr context);

		internal abstract long GetParamValueBytes(IntPtr ptr, int nDataOffset, byte[] bDest, int nStart, int nLength);

		internal abstract double GetParamValueDouble(IntPtr ptr);

		internal abstract int GetParamValueInt32(IntPtr ptr);

		internal abstract long GetParamValueInt64(IntPtr ptr);

		internal abstract string GetParamValueText(IntPtr ptr);

		internal abstract TypeAffinity GetParamValueType(IntPtr ptr);

		internal abstract void ReturnBlob(IntPtr context, byte[] value);

		internal abstract void ReturnDouble(IntPtr context, double value);

		internal abstract void ReturnError(IntPtr context, string value);

		internal abstract void ReturnInt32(IntPtr context, int value);

		internal abstract void ReturnInt64(IntPtr context, long value);

		internal abstract void ReturnNull(IntPtr context);

		internal abstract void ReturnText(IntPtr context, string value);

		internal abstract void SetPassword(byte[] passwordBytes);

		internal abstract void ChangePassword(byte[] newPasswordBytes);

		internal abstract void SetUpdateHook(SQLiteUpdateCallback func);

		internal abstract void SetCommitHook(SQLiteCommitCallback func);

		internal abstract void SetRollbackHook(SQLiteRollbackCallback func);

		internal abstract int GetCursorForTable(SqliteStatement stmt, int database, int rootPage);

		internal abstract long GetRowIdForCursor(SqliteStatement stmt, int cursor);

		internal abstract object GetValue(SqliteStatement stmt, int index, SQLiteType typ);

		protected virtual void Dispose(bool bDisposing)
		{
		}

		public void Dispose()
		{
			Dispose(bDisposing: true);
		}

		internal static string SQLiteLastError(SqliteConnectionHandle db)
		{
			return SqliteConvert.UTF8ToString(UnsafeNativeMethods.sqlite3_errmsg(db), -1);
		}

		internal static void FinalizeStatement(SqliteStatementHandle stmt)
		{
			lock (_lock)
			{
				int num = UnsafeNativeMethods.sqlite3_finalize(stmt);
				if (num > 0)
				{
					throw new SqliteException(num, null);
				}
			}
		}

		internal static void CloseConnection(SqliteConnectionHandle db)
		{
			lock (_lock)
			{
				ResetConnection(db);
				int num = ((!UnsafeNativeMethods.use_sqlite3_close_v2) ? UnsafeNativeMethods.sqlite3_close(db) : UnsafeNativeMethods.sqlite3_close_v2(db));
				if (num > 0)
				{
					throw new SqliteException(num, SQLiteLastError(db));
				}
			}
		}

		internal static void ResetConnection(SqliteConnectionHandle db)
		{
			lock (_lock)
			{
				IntPtr errMsg = IntPtr.Zero;
				do
				{
					errMsg = UnsafeNativeMethods.sqlite3_next_stmt(db, errMsg);
					if (errMsg != IntPtr.Zero)
					{
						UnsafeNativeMethods.sqlite3_reset(errMsg);
					}
				}
				while (errMsg != IntPtr.Zero);
				UnsafeNativeMethods.sqlite3_exec(db, SqliteConvert.ToUTF8("ROLLBACK"), IntPtr.Zero, IntPtr.Zero, out errMsg);
				if (errMsg != IntPtr.Zero)
				{
					UnsafeNativeMethods.sqlite3_free(errMsg);
				}
			}
		}
	}
	internal interface ISQLiteSchemaExtensions
	{
		void BuildTempSchema(SqliteConnection cnn);
	}
	[Flags]
	internal enum SQLiteOpenFlagsEnum
	{
		None = 0,
		ReadOnly = 1,
		ReadWrite = 2,
		Create = 4,
		Default = 6,
		FileProtectionComplete = 0x100000,
		FileProtectionCompleteUnlessOpen = 0x200000,
		FileProtectionCompleteUntilFirstUserAuthentication = 0x300000,
		FileProtectionNone = 0x400000
	}
	public enum SQLiteConfig
	{
		SingleThread = 1,
		MultiThread,
		Serialized
	}
	[Designer("SQLite.Designer.SqliteCommandDesigner, SQLite.Designer, Version=1.0.36.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139")]
	[ToolboxItem(true)]
	public sealed class SqliteCommand : DbCommand, ICloneable
	{
		private string _commandText;

		private SqliteConnection _cnn;

		private long _version;

		private WeakReference _activeReader;

		internal int _commandTimeout;

		private bool _designTimeVisible;

		private UpdateRowSource _updateRowSource;

		private SqliteParameterCollection _parameterCollection;

		internal List<SqliteStatement> _statementList;

		internal string _remainingText;

		private SqliteTransaction _transaction;

		[DefaultValue("")]
		[RefreshProperties(RefreshProperties.All)]
		[Editor("Microsoft.VSDesigner.Data.SQL.Design.SqlCommandTextEditor, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
		public override string CommandText
		{
			get
			{
				return _commandText;
			}
			set
			{
				if (!(_commandText == value))
				{
					if (_activeReader != null && _activeReader.IsAlive)
					{
						throw new InvalidOperationException("Cannot set CommandText while a DataReader is active");
					}
					ClearCommands();
					_commandText = value;
					_ = _cnn;
				}
			}
		}

		[DefaultValue(30)]
		public override int CommandTimeout
		{
			get
			{
				return _commandTimeout;
			}
			set
			{
				_commandTimeout = value;
			}
		}

		[RefreshProperties(RefreshProperties.All)]
		[DefaultValue(CommandType.Text)]
		public override CommandType CommandType
		{
			get
			{
				return CommandType.Text;
			}
			set
			{
				if (value != CommandType.Text)
				{
					throw new NotSupportedException();
				}
			}
		}

		[DefaultValue(null)]
		[Editor("Microsoft.VSDesigner.Data.Design.DbConnectionEditor, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
		public new SqliteConnection Connection
		{
			get
			{
				return _cnn;
			}
			set
			{
				if (_activeReader != null && _activeReader.IsAlive)
				{
					throw new InvalidOperationException("Cannot set Connection while a DataReader 

Room Architect Tool_Data/Managed/Mono.Posix.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Messaging;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters;
using System.Runtime.Serialization.Formatters.Binary;
using System.Security;
using System.Security.Permissions;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using Mono.Unix;
using Mono.Unix.Native;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("Mono.Posix.dll")]
[assembly: AssemblyDescription("Unix Integration Classes")]
[assembly: CLSCompliant(true)]
[assembly: ComVisible(false)]
[assembly: AssemblyDelaySign(true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("4.0.0.0")]
[module: UnverifiableCode]
internal static class Consts
{
	public const string MonoVersion = "5.11.0.0";

	public const string MonoCompany = "Mono development team";

	public const string MonoProduct = "Mono Common Language Infrastructure";

	public const string MonoCopyright = "(c) Various Mono authors";

	public const int MonoCorlibVersion = 1051100001;

	public const string FxVersion = "4.0.0.0";

	public const string FxFileVersion = "4.6.57.0";

	public const string EnvironmentVersion = "4.0.30319.42000";

	public const string VsVersion = "0.0.0.0";

	public const string VsFileVersion = "11.0.0.0";

	private const string PublicKeyToken = "b77a5c561934e089";

	public const string AssemblyI18N = "I18N, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMicrosoft_JScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMono_Http = "Mono.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Posix = "Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Security = "Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Messaging_RabbitMQ = "Mono.Messaging.RabbitMQ, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyCorlib = "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Data = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Design = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing_Design = "System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Messaging = "System.Messaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Security = "System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Web = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Core = "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string WindowsBase_3_0 = "WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
internal sealed class Locale
{
	private Locale()
	{
	}

	public static string GetText(string msg)
	{
		return msg;
	}

	public static string GetText(string fmt, params object[] args)
	{
		return string.Format(fmt, args);
	}
}
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Field | AttributeTargets.Delegate)]
internal class MapAttribute : Attribute
{
	private string nativeType;

	private string suppressFlags;

	public string NativeType => nativeType;

	public string SuppressFlags
	{
		get
		{
			return suppressFlags;
		}
		set
		{
			suppressFlags = value;
		}
	}

	public MapAttribute()
	{
	}

	public MapAttribute(string nativeType)
	{
		this.nativeType = nativeType;
	}
}
namespace Mono.Unix
{
	[Serializable]
	public class AbstractUnixEndPoint : EndPoint
	{
		private string path;

		public string Path
		{
			get
			{
				return path;
			}
			set
			{
				path = value;
			}
		}

		public override AddressFamily AddressFamily => AddressFamily.Unix;

		public AbstractUnixEndPoint(string path)
		{
			if (path == null)
			{
				throw new ArgumentNullException("path");
			}
			if (path == "")
			{
				throw new ArgumentException("Cannot be empty.", "path");
			}
			this.path = path;
		}

		public override EndPoint Create(SocketAddress socketAddress)
		{
			byte[] array = new byte[socketAddress.Size - 2 - 1];
			for (int i = 0; i < array.Length; i++)
			{
				array[i] = socketAddress[3 + i];
			}
			return new AbstractUnixEndPoint(Encoding.Default.GetString(array));
		}

		public override SocketAddress Serialize()
		{
			byte[] bytes = Encoding.Default.GetBytes(path);
			SocketAddress socketAddress = new SocketAddress(AddressFamily, 3 + bytes.Length);
			socketAddress[2] = 0;
			for (int i = 0; i < bytes.Length; i++)
			{
				socketAddress[i + 2 + 1] = bytes[i];
			}
			return socketAddress;
		}

		public override string ToString()
		{
			return path;
		}

		public override int GetHashCode()
		{
			return path.GetHashCode();
		}

		public override bool Equals(object o)
		{
			if (!(o is AbstractUnixEndPoint abstractUnixEndPoint))
			{
				return false;
			}
			return abstractUnixEndPoint.path == path;
		}
	}
	public class Catalog
	{
		private Catalog()
		{
		}

		[DllImport("intl", CallingConvention = CallingConvention.Cdecl)]
		private static extern IntPtr bindtextdomain(IntPtr domainname, IntPtr dirname);

		[DllImport("intl", CallingConvention = CallingConvention.Cdecl)]
		private static extern IntPtr bind_textdomain_codeset(IntPtr domainname, IntPtr codeset);

		[DllImport("intl", CallingConvention = CallingConvention.Cdecl)]
		private static extern IntPtr textdomain(IntPtr domainname);

		public static void Init(string package, string localedir)
		{
			MarshalStrings(package, out var p, localedir, out var p2, "UTF-8", out var p3);
			try
			{
				if (bindtextdomain(p, p2) == IntPtr.Zero)
				{
					throw new UnixIOException(Errno.ENOMEM);
				}
				if (bind_textdomain_codeset(p, p3) == IntPtr.Zero)
				{
					throw new UnixIOException(Errno.ENOMEM);
				}
				if (textdomain(p) == IntPtr.Zero)
				{
					throw new UnixIOException(Errno.ENOMEM);
				}
			}
			finally
			{
				UnixMarshal.FreeHeap(p);
				UnixMarshal.FreeHeap(p2);
				UnixMarshal.FreeHeap(p3);
			}
		}

		private static void MarshalStrings(string s1, out IntPtr p1, string s2, out IntPtr p2, string s3, out IntPtr p3)
		{
			p1 = (p2 = (p3 = IntPtr.Zero));
			bool flag = true;
			try
			{
				p1 = UnixMarshal.StringToHeap(s1);
				p2 = UnixMarshal.StringToHeap(s2);
				if (s3 != null)
				{
					p3 = UnixMarshal.StringToHeap(s3);
				}
				flag = false;
			}
			finally
			{
				if (flag)
				{
					UnixMarshal.FreeHeap(p1);
					UnixMarshal.FreeHeap(p2);
					UnixMarshal.FreeHeap(p3);
				}
			}
		}

		[DllImport("intl", CallingConvention = CallingConvention.Cdecl)]
		private static extern IntPtr gettext(IntPtr instring);

		public static string GetString(string s)
		{
			IntPtr intPtr = UnixMarshal.StringToHeap(s);
			try
			{
				IntPtr intPtr2 = gettext(intPtr);
				if (intPtr2 != intPtr)
				{
					return UnixMarshal.PtrToStringUnix(intPtr2);
				}
				return s;
			}
			finally
			{
				UnixMarshal.FreeHeap(intPtr);
			}
		}

		[DllImport("intl", CallingConvention = CallingConvention.Cdecl)]
		private static extern IntPtr ngettext(IntPtr singular, IntPtr plural, int n);

		public static string GetPluralString(string s, string p, int n)
		{
			MarshalStrings(s, out var p2, p, out var p3, null, out var _);
			try
			{
				IntPtr intPtr = ngettext(p2, p3, n);
				if (intPtr == p2)
				{
					return s;
				}
				if (intPtr == p3)
				{
					return p;
				}
				return UnixMarshal.PtrToStringUnix(intPtr);
			}
			finally
			{
				UnixMarshal.FreeHeap(p2);
				UnixMarshal.FreeHeap(p3);
			}
		}
	}
	public enum FileAccessPattern
	{
		Normal = 0,
		Sequential = 2,
		Random = 1,
		NoReuse = 5,
		PreLoad = 3,
		FlushCache = 4
	}
	[Flags]
	public enum FileAccessPermissions
	{
		UserReadWriteExecute = 0x1C0,
		UserRead = 0x100,
		UserWrite = 0x80,
		UserExecute = 0x40,
		GroupReadWriteExecute = 0x38,
		GroupRead = 0x20,
		GroupWrite = 0x10,
		GroupExecute = 8,
		OtherReadWriteExecute = 7,
		OtherRead = 4,
		OtherWrite = 2,
		OtherExecute = 1,
		DefaultPermissions = 0x1B6,
		AllPermissions = 0x1FF
	}
	public sealed class FileHandleOperations
	{
		private FileHandleOperations()
		{
		}

		public static void AdviseFileAccessPattern(int fd, FileAccessPattern pattern, long offset, long len)
		{
			UnixMarshal.ThrowExceptionForLastErrorIf(Syscall.posix_fadvise(fd, offset, len, (PosixFadviseAdvice)pattern));
		}

		public static void AdviseFileAccessPattern(int fd, FileAccessPattern pattern)
		{
			AdviseFileAccessPattern(fd, pattern, 0L, 0L);
		}

		public static void AdviseFileAccessPattern(FileStream file, FileAccessPattern pattern, long offset, long len)
		{
			if (file == null)
			{
				throw new ArgumentNullException("file");
			}
			UnixMarshal.ThrowExceptionForLastErrorIf(Syscall.posix_fadvise(file.Handle.ToInt32(), offset, len, (PosixFadviseAdvice)pattern));
		}

		public static void AdviseFileAccessPattern(FileStream file, FileAccessPattern pattern)
		{
			AdviseFileAccessPattern(file, pattern, 0L, 0L);
		}

		public static void AdviseFileAccessPattern(UnixStream stream, FileAccessPattern pattern, long offset, long len)
		{
			if (stream == null)
			{
				throw new ArgumentNullException("stream");
			}
			UnixMarshal.ThrowExceptionForLastErrorIf(Syscall.posix_fadvise(stream.Handle, offset, len, (PosixFadviseAdvice)pattern));
		}

		public static void AdviseFileAccessPattern(UnixStream stream, FileAccessPattern pattern)
		{
			AdviseFileAccessPattern(stream, pattern, 0L, 0L);
		}
	}
	[Flags]
	public enum FileSpecialAttributes
	{
		SetUserId = 0x800,
		SetGroupId = 0x400,
		Sticky = 0x200
	}
	public enum FileTypes
	{
		Directory = 16384,
		CharacterDevice = 8192,
		BlockDevice = 24576,
		RegularFile = 32768,
		Fifo = 4096,
		SymbolicLink = 40960,
		Socket = 49152
	}
	internal struct PeerCredData
	{
		public int pid;

		public int uid;

		public int gid;
	}
	public class PeerCred
	{
		private const int so_peercred = 10001;

		private PeerCredData data;

		public int ProcessID => data.pid;

		public int UserID => data.uid;

		public int GroupID => data.gid;

		public PeerCred(Socket sock)
		{
			if (sock.AddressFamily != AddressFamily.Unix)
			{
				throw new ArgumentException("Only Unix sockets are supported", "sock");
			}
			data = (PeerCredData)sock.GetSocketOption(SocketOptionLevel.Socket, (SocketOptionName)10001);
		}
	}
	public class StdioFileStream : Stream
	{
		public static readonly IntPtr InvalidFileStream = IntPtr.Zero;

		public static readonly IntPtr StandardInput = Stdlib.stdin;

		public static readonly IntPtr StandardOutput = Stdlib.stdout;

		public static readonly IntPtr StandardError = Stdlib.stderr;

		private bool canSeek;

		private bool canRead;

		private bool canWrite;

		private bool owner = true;

		private IntPtr file = InvalidFileStream;

		public IntPtr Handle
		{
			get
			{
				AssertNotDisposed();
				GC.KeepAlive(this);
				return file;
			}
		}

		public override bool CanRead => canRead;

		public override bool CanSeek => canSeek;

		public override bool CanWrite => canWrite;

		public override long Length
		{
			get
			{
				AssertNotDisposed();
				if (!CanSeek)
				{
					throw new NotSupportedException("File Stream doesn't support seeking");
				}
				long num = Stdlib.ftell(file);
				if (num == -1)
				{
					throw new NotSupportedException("Unable to obtain current file position");
				}
				UnixMarshal.ThrowExceptionForLastErrorIf(Stdlib.fseek(file, 0L, SeekFlags.SEEK_END));
				long num2 = Stdlib.ftell(file);
				if (num2 == -1)
				{
					UnixMarshal.ThrowExceptionForLastError();
				}
				UnixMarshal.ThrowExceptionForLastErrorIf(Stdlib.fseek(file, num, SeekFlags.SEEK_SET));
				GC.KeepAlive(this);
				return num2;
			}
		}

		public override long Position
		{
			get
			{
				AssertNotDisposed();
				if (!CanSeek)
				{
					throw new NotSupportedException("The stream does not support seeking");
				}
				long num = Stdlib.ftell(file);
				if (num == -1)
				{
					UnixMarshal.ThrowExceptionForLastError();
				}
				GC.KeepAlive(this);
				return num;
			}
			set
			{
				AssertNotDisposed();
				Seek(value, SeekOrigin.Begin);
			}
		}

		public StdioFileStream(IntPtr fileStream)
			: this(fileStream, ownsHandle: true)
		{
		}

		public StdioFileStream(IntPtr fileStream, bool ownsHandle)
		{
			InitStream(fileStream, ownsHandle);
		}

		public StdioFileStream(IntPtr fileStream, FileAccess access)
			: this(fileStream, access, ownsHandle: true)
		{
		}

		public StdioFileStream(IntPtr fileStream, FileAccess access, bool ownsHandle)
		{
			InitStream(fileStream, ownsHandle);
			InitCanReadWrite(access);
		}

		public StdioFileStream(string path)
		{
			if (path == null)
			{
				throw new ArgumentNullException("path");
			}
			InitStream(Fopen(path, "rb"), ownsHandle: true);
		}

		public StdioFileStream(string path, string mode)
		{
			if (path == null)
			{
				throw new ArgumentNullException("path");
			}
			InitStream(Fopen(path, mode), ownsHandle: true);
		}

		public StdioFileStream(string path, FileMode mode)
		{
			if (path == null)
			{
				throw new ArgumentNullException("path");
			}
			InitStream(Fopen(path, ToFopenMode(path, mode)), ownsHandle: true);
		}

		public StdioFileStream(string path, FileAccess access)
		{
			if (path == null)
			{
				throw new ArgumentNullException("path");
			}
			InitStream(Fopen(path, ToFopenMode(path, access)), ownsHandle: true);
			InitCanReadWrite(access);
		}

		public StdioFileStream(string path, FileMode mode, FileAccess access)
		{
			if (path == null)
			{
				throw new ArgumentNullException("path");
			}
			InitStream(Fopen(path, ToFopenMode(path, mode, access)), ownsHandle: true);
			InitCanReadWrite(access);
		}

		private static IntPtr Fopen(string path, string mode)
		{
			if (path.Length == 0)
			{
				throw new ArgumentException("path");
			}
			if (mode == null)
			{
				throw new ArgumentNullException("mode");
			}
			IntPtr intPtr = Stdlib.fopen(path, mode);
			if (intPtr == IntPtr.Zero)
			{
				throw new DirectoryNotFoundException("path", UnixMarshal.CreateExceptionForLastError());
			}
			return intPtr;
		}

		private void InitStream(IntPtr fileStream, bool ownsHandle)
		{
			if (InvalidFileStream == fileStream)
			{
				throw new ArgumentException(Locale.GetText("Invalid file stream"), "fileStream");
			}
			file = fileStream;
			owner = ownsHandle;
			try
			{
				if ((long)Stdlib.fseek(file, 0L, SeekFlags.SEEK_CUR) != -1)
				{
					canSeek = true;
				}
				Stdlib.fread(IntPtr.Zero, 0uL, 0uL, file);
				if (Stdlib.ferror(file) == 0)
				{
					canRead = true;
				}
				Stdlib.fwrite(IntPtr.Zero, 0uL, 0uL, file);
				if (Stdlib.ferror(file) == 0)
				{
					canWrite = true;
				}
				Stdlib.clearerr(file);
			}
			catch (Exception)
			{
				throw new ArgumentException(Locale.GetText("Invalid file stream"), "fileStream");
			}
			GC.KeepAlive(this);
		}

		private void InitCanReadWrite(FileAccess access)
		{
			canRead = canRead && (access == FileAccess.Read || access == FileAccess.ReadWrite);
			canWrite = canWrite && (access == FileAccess.Write || access == FileAccess.ReadWrite);
		}

		private static string ToFopenMode(string file, FileMode mode)
		{
			string result = NativeConvert.ToFopenMode(mode);
			AssertFileMode(file, mode);
			return result;
		}

		private static string ToFopenMode(string file, FileAccess access)
		{
			return NativeConvert.ToFopenMode(access);
		}

		private static string ToFopenMode(string file, FileMode mode, FileAccess access)
		{
			string result = NativeConvert.ToFopenMode(mode, access);
			bool flag = AssertFileMode(file, mode);
			if (mode == FileMode.OpenOrCreate && access == FileAccess.Read && !flag)
			{
				result = "w+b";
			}
			return result;
		}

		private static bool AssertFileMode(string file, FileMode mode)
		{
			bool flag = FileExists(file);
			if (mode == FileMode.CreateNew && flag)
			{
				throw new IOException("File exists and FileMode.CreateNew specified");
			}
			if ((mode == FileMode.Open || mode == FileMode.Truncate) && !flag)
			{
				throw new FileNotFoundException("File doesn't exist and FileMode.Open specified", file);
			}
			return flag;
		}

		private static bool FileExists(string file)
		{
			IntPtr intPtr = Stdlib.fopen(file, "r");
			bool result = intPtr != IntPtr.Zero;
			if (intPtr != IntPtr.Zero)
			{
				Stdlib.fclose(intPtr);
			}
			return result;
		}

		private void AssertNotDisposed()
		{
			if (file == InvalidFileStream)
			{
				throw new ObjectDisposedException("Invalid File Stream");
			}
			GC.KeepAlive(this);
		}

		public void SaveFilePosition(FilePosition pos)
		{
			AssertNotDisposed();
			UnixMarshal.ThrowExceptionForLastErrorIf(Stdlib.fgetpos(file, pos));
			GC.KeepAlive(this);
		}

		public void RestoreFilePosition(FilePosition pos)
		{
			AssertNotDisposed();
			if (pos == null)
			{
				throw new ArgumentNullException("value");
			}
			UnixMarshal.ThrowExceptionForLastErrorIf(Stdlib.fsetpos(file, pos));
			GC.KeepAlive(this);
		}

		public override void Flush()
		{
			AssertNotDisposed();
			if (Stdlib.fflush(file) != 0)
			{
				UnixMarshal.ThrowExceptionForLastError();
			}
			GC.KeepAlive(this);
		}

		public unsafe override int Read([In][Out] byte[] buffer, int offset, int count)
		{
			AssertNotDisposed();
			AssertValidBuffer(buffer, offset, count);
			if (!CanRead)
			{
				throw new NotSupportedException("Stream does not support reading");
			}
			ulong num;
			fixed (byte* ptr = &buffer[offset])
			{
				num = Stdlib.fread(ptr, 1uL, (ulong)count, file);
			}
			if (num != (ulong)count && Stdlib.ferror(file) != 0)
			{
				throw new IOException();
			}
			GC.KeepAlive(this);
			return (int)num;
		}

		private void AssertValidBuffer(byte[] buffer, int offset, int count)
		{
			if (buffer == null)
			{
				throw new ArgumentNullException("buffer");
			}
			if (offset < 0)
			{
				throw new ArgumentOutOfRangeException("offset", "< 0");
			}
			if (count < 0)
			{
				throw new ArgumentOutOfRangeException("count", "< 0");
			}
			if (offset > buffer.Length)
			{
				throw new ArgumentException("destination offset is beyond array size");
			}
			if (offset > buffer.Length - count)
			{
				throw new ArgumentException("would overrun buffer");
			}
		}

		public void Rewind()
		{
			AssertNotDisposed();
			Stdlib.rewind(file);
			GC.KeepAlive(this);
		}

		public override long Seek(long offset, SeekOrigin origin)
		{
			AssertNotDisposed();
			if (!CanSeek)
			{
				throw new NotSupportedException("The File Stream does not support seeking");
			}
			SeekFlags seekFlags = SeekFlags.SEEK_CUR;
			if (Stdlib.fseek(origin: origin switch
			{
				SeekOrigin.Begin => SeekFlags.SEEK_SET, 
				SeekOrigin.Current => SeekFlags.SEEK_CUR, 
				SeekOrigin.End => SeekFlags.SEEK_END, 
				_ => throw new ArgumentException("origin"), 
			}, stream: file, offset: offset) != 0)
			{
				throw new IOException("Unable to seek", UnixMarshal.CreateExceptionForLastError());
			}
			long num = Stdlib.ftell(file);
			if (num == -1)
			{
				throw new IOException("Unable to get current file position", UnixMarshal.CreateExceptionForLastError());
			}
			GC.KeepAlive(this);
			return num;
		}

		public override void SetLength(long value)
		{
			throw new NotSupportedException("ANSI C doesn't provide a way to truncate a file");
		}

		public unsafe override void Write(byte[] buffer, int offset, int count)
		{
			AssertNotDisposed();
			AssertValidBuffer(buffer, offset, count);
			if (!CanWrite)
			{
				throw new NotSupportedException("File Stream does not support writing");
			}
			ulong num;
			fixed (byte* ptr = &buffer[offset])
			{
				num = Stdlib.fwrite(ptr, 1uL, (ulong)count, file);
			}
			if (num != (ulong)count)
			{
				UnixMarshal.ThrowExceptionForLastError();
			}
			GC.KeepAlive(this);
		}

		~StdioFileStream()
		{
			Close();
		}

		public override void Close()
		{
			if (file == InvalidFileStream)
			{
				return;
			}
			if (owner)
			{
				if (Stdlib.fclose(file) != 0)
				{
					UnixMarshal.ThrowExceptionForLastError();
				}
			}
			else
			{
				Flush();
			}
			file = InvalidFileStream;
			canRead = false;
			canSeek = false;
			canWrite = false;
			GC.SuppressFinalize(this);
			GC.KeepAlive(this);
		}
	}
	public class UnixClient : MarshalByRefObject, IDisposable
	{
		private NetworkStream stream;

		private Socket client;

		private bool disposed;

		public Socket Client
		{
			get
			{
				return client;
			}
			set
			{
				client = value;
				stream = null;
			}
		}

		public PeerCred PeerCredential
		{
			get
			{
				CheckDisposed();
				return new PeerCred(client);
			}
		}

		public LingerOption LingerState
		{
			get
			{
				CheckDisposed();
				return (LingerOption)client.GetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Linger);
			}
			set
			{
				CheckDisposed();
				client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Linger, value);
			}
		}

		public int ReceiveBufferSize
		{
			get
			{
				CheckDisposed();
				return (int)client.GetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReceiveBuffer);
			}
			set
			{
				CheckDisposed();
				client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReceiveBuffer, value);
			}
		}

		public int ReceiveTimeout
		{
			get
			{
				CheckDisposed();
				return (int)client.GetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReceiveTimeout);
			}
			set
			{
				CheckDisposed();
				client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReceiveTimeout, value);
			}
		}

		public int SendBufferSize
		{
			get
			{
				CheckDisposed();
				return (int)client.GetSocketOption(SocketOptionLevel.Socket, SocketOptionName.SendBuffer);
			}
			set
			{
				CheckDisposed();
				client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.SendBuffer, value);
			}
		}

		public int SendTimeout
		{
			get
			{
				CheckDisposed();
				return (int)client.GetSocketOption(SocketOptionLevel.Socket, SocketOptionName.SendTimeout);
			}
			set
			{
				CheckDisposed();
				client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.SendTimeout, value);
			}
		}

		public UnixClient()
		{
			if (client != null)
			{
				client.Close();
				client = null;
			}
			client = new Socket(AddressFamily.Unix, SocketType.Stream, ProtocolType.IP);
		}

		public UnixClient(string path)
			: this()
		{
			if (path == null)
			{
				throw new ArgumentNullException("ep");
			}
			Connect(path);
		}

		public UnixClient(UnixEndPoint ep)
			: this()
		{
			if (ep == null)
			{
				throw new ArgumentNullException("ep");
			}
			Connect(ep);
		}

		internal UnixClient(Socket sock)
		{
			Client = sock;
		}

		public void Close()
		{
			CheckDisposed();
			Dispose();
		}

		public void Connect(UnixEndPoint remoteEndPoint)
		{
			CheckDisposed();
			client.Connect(remoteEndPoint);
			stream = new NetworkStream(client, ownsSocket: true);
		}

		public void Connect(string path)
		{
			CheckDisposed();
			Connect(new UnixEndPoint(path));
		}

		public void Dispose()
		{
			Dispose(disposing: true);
			GC.SuppressFinalize(this);
		}

		protected virtual void Dispose(bool disposing)
		{
			if (disposed)
			{
				return;
			}
			if (disposing)
			{
				NetworkStream networkStream = stream;
				stream = null;
				if (networkStream != null)
				{
					networkStream.Close();
					networkStream = null;
				}
				else if (client != null)
				{
					client.Close();
				}
				client = null;
			}
			disposed = true;
		}

		public NetworkStream GetStream()
		{
			CheckDisposed();
			if (stream == null)
			{
				stream = new NetworkStream(client, ownsSocket: true);
			}
			return stream;
		}

		private void CheckDisposed()
		{
			if (disposed)
			{
				throw new ObjectDisposedException(GetType().FullName);
			}
		}

		~UnixClient()
		{
			Dispose(disposing: false);
		}
	}
	public sealed class UnixDirectoryInfo : UnixFileSystemInfo
	{
		public override string Name
		{
			get
			{
				string fileName = UnixPath.GetFileName(base.FullPath);
				if (fileName == null || fileName.Length == 0)
				{
					return base.FullPath;
				}
				return fileName;
			}
		}

		public UnixDirectoryInfo Parent
		{
			get
			{
				if (base.FullPath == "/")
				{
					return this;
				}
				string directoryName = UnixPath.GetDirectoryName(base.FullPath);
				if (directoryName == "")
				{
					throw new InvalidOperationException("Do not know parent directory for path `" + base.FullPath + "'");
				}
				return new UnixDirectoryInfo(directoryName);
			}
		}

		public UnixDirectoryInfo Root
		{
			get
			{
				string pathRoot = UnixPath.GetPathRoot(base.FullPath);
				if (pathRoot == null)
				{
					return null;
				}
				return new UnixDirectoryInfo(pathRoot);
			}
		}

		public UnixDirectoryInfo(string path)
			: base(path)
		{
		}

		internal UnixDirectoryInfo(string path, Stat stat)
			: base(path, stat)
		{
		}

		[CLSCompliant(false)]
		public void Create(FilePermissions mode)
		{
			UnixMarshal.ThrowExceptionForLastErrorIf(Syscall.mkdir(base.FullPath, mode));
			Refresh();
		}

		public void Create(FileAccessPermissions mode)
		{
			Create((FilePermissions)mode);
		}

		public void Create()
		{
			FilePermissions mode = FilePermissions.ACCESSPERMS;
			Create(mode);
		}

		public override void Delete()
		{
			Delete(recursive: false);
		}

		public void Delete(bool recursive)
		{
			if (recursive)
			{
				UnixFileSystemInfo[] fileSystemEntries = GetFileSystemEntries();
				foreach (UnixFileSystemInfo unixFileSystemInfo in fileSystemEntries)
				{
					if (unixFileSystemInfo is UnixDirectoryInfo unixDirectoryInfo)
					{
						unixDirectoryInfo.Delete(recursive: true);
					}
					else
					{
						unixFileSystemInfo.Delete();
					}
				}
			}
			UnixMarshal.ThrowExceptionForLastErrorIf(Syscall.rmdir(base.FullPath));
			Refresh();
		}

		public Dirent[] GetEntries()
		{
			IntPtr intPtr = Syscall.opendir(base.FullPath);
			if (intPtr == IntPtr.Zero)
			{
				UnixMarshal.ThrowExceptionForLastError();
			}
			bool flag = false;
			try
			{
				Dirent[] entries = GetEntries(intPtr);
				flag = true;
				return entries;
			}
			finally
			{
				int retval = Syscall.closedir(intPtr);
				if (flag)
				{
					UnixMarshal.ThrowExceptionForLastErrorIf(retval);
				}
			}
		}

		private static Dirent[] GetEntries(IntPtr dirp)
		{
			ArrayList arrayList = new ArrayList();
			int num;
			IntPtr result;
			do
			{
				Dirent dirent = new Dirent();
				num = Syscall.readdir_r(dirp, dirent, out result);
				if (num == 0 && result != IntPtr.Zero && dirent.d_name != "." && dirent.d_name != "..")
				{
					arrayList.Add(dirent);
				}
			}
			while (num == 0 && result != IntPtr.Zero);
			if (num != 0)
			{
				UnixMarshal.ThrowExceptionForLastErrorIf(num);
			}
			return (Dirent[])arrayList.ToArray(typeof(Dirent));
		}

		public Dirent[] GetEntries(Regex regex)
		{
			IntPtr intPtr = Syscall.opendir(base.FullPath);
			if (intPtr == IntPtr.Zero)
			{
				UnixMarshal.ThrowExceptionForLastError();
			}
			try
			{
				return GetEntries(intPtr, regex);
			}
			finally
			{
				UnixMarshal.ThrowExceptionForLastErrorIf(Syscall.closedir(intPtr));
			}
		}

		private static Dirent[] GetEntries(IntPtr dirp, Regex regex)
		{
			ArrayList arrayList = new ArrayList();
			int num;
			IntPtr result;
			do
			{
				Dirent dirent = new Dirent();
				num = Syscall.readdir_r(dirp, dirent, out result);
				if (num == 0 && result != IntPtr.Zero && regex.Match(dirent.d_name).Success && dirent.d_name != "." && dirent.d_name != "..")
				{
					arrayList.Add(dirent);
				}
			}
			while (num == 0 && result != IntPtr.Zero);
			if (num != 0)
			{
				UnixMarshal.ThrowExceptionForLastError();
			}
			return (Dirent[])arrayList.ToArray(typeof(Dirent));
		}

		public Dirent[] GetEntries(string regex)
		{
			Regex regex2 = new Regex(regex);
			return GetEntries(regex2);
		}

		public UnixFileSystemInfo[] GetFileSystemEntries()
		{
			Dirent[] entries = GetEntries();
			return GetFileSystemEntries(entries);
		}

		private UnixFileSystemInfo[] GetFileSystemEntries(Dirent[] dentries)
		{
			UnixFileSystemInfo[] array = new UnixFileSystemInfo[dentries.Length];
			for (int i = 0; i != array.Length; i++)
			{
				array[i] = UnixFileSystemInfo.GetFileSystemEntry(UnixPath.Combine(base.FullPath, dentries[i].d_name));
			}
			return array;
		}

		public UnixFileSystemInfo[] GetFileSystemEntries(Regex regex)
		{
			Dirent[] entries = GetEntries(regex);
			return GetFileSystemEntries(entries);
		}

		public UnixFileSystemInfo[] GetFileSystemEntries(string regex)
		{
			Regex regex2 = new Regex(regex);
			return GetFileSystemEntries(regex2);
		}

		public static string GetCurrentDirectory()
		{
			StringBuilder stringBuilder = new StringBuilder(16);
			IntPtr zero = IntPtr.Zero;
			do
			{
				stringBuilder.Capacity *= 2;
				zero = Syscall.getcwd(stringBuilder, (ulong)stringBuilder.Capacity);
			}
			while (zero == IntPtr.Zero && Stdlib.GetLastError() == Errno.ERANGE);
			if (zero == IntPtr.Zero)
			{
				UnixMarshal.ThrowExceptionForLastError();
			}
			return stringBuilder.ToString();
		}

		public static void SetCurrentDirectory(string path)
		{
			UnixMarshal.ThrowExceptionForLastErrorIf(Syscall.chdir(path));
		}
	}
	public enum UnixDriveType
	{
		Unknown,
		NoRootDirectory,
		Removable,
		Fixed,
		Network,
		CDRom,
		Ram
	}
	public sealed class UnixDriveInfo
	{
		private Statvfs stat;

		private string fstype;

		private string mount_point;

		private string block_device;

		public long AvailableFreeSpace
		{
			get
			{
				Refresh();
				return Convert.ToInt64(stat.f_bavail * stat.f_frsize);
			}
		}

		public string DriveFormat => fstype;

		public UnixDriveType DriveType => UnixDriveType.Unknown;

		public bool IsReady
		{
			get
			{
				bool flag = Refresh(throwException: false);
				if (mount_point == "/" || !flag)
				{
					return flag;
				}
				if (Syscall.statvfs(RootDirectory.Parent.FullName, out var buf) != 0)
				{
					return false;
				}
				return buf.f_fsid != stat.f_fsid;
			}
		}

		public string Name => mount_point;

		public UnixDirectoryInfo RootDirectory => new UnixDirectoryInfo(mount_point);

		public long TotalFreeSpace
		{
			get
			{
				Refresh();
				return (long)(stat.f_bfree * stat.f_frsize);
			}
		}

		public long TotalSize
		{
			get
			{
				Refresh();
				return (long)(stat.f_frsize * stat.f_blocks);
			}
		}

		public string VolumeLabel => block_device;

		public long MaximumFilenameLength
		{
			get
			{
				Refresh();
				return Convert.ToInt64(stat.f_namemax);
			}
		}

		public UnixDriveInfo(string mountPoint)
		{
			if (mountPoint == null)
			{
				throw new ArgumentNullException("mountPoint");
			}
			Fstab fstab = Syscall.getfsfile(mountPoint);
			if (fstab != null)
			{
				FromFstab(fstab);
				return;
			}
			mount_point = mountPoint;
			block_device = "";
			fstype = "Unknown";
		}

		private void FromFstab(Fstab fstab)
		{
			fstype = fstab.fs_vfstype;
			mount_point = fstab.fs_file;
			block_device = fstab.fs_spec;
		}

		public static UnixDriveInfo GetForSpecialFile(string specialFile)
		{
			if (specialFile == null)
			{
				throw new ArgumentNullException("specialFile");
			}
			Fstab fstab = Syscall.getfsspec(specialFile);
			if (fstab == null)
			{
				throw new ArgumentException("specialFile isn't valid: " + specialFile);
			}
			return new UnixDriveInfo(fstab);
		}

		private UnixDriveInfo(Fstab fstab)
		{
			FromFstab(fstab);
		}

		public static UnixDriveInfo[] GetDrives()
		{
			ArrayList arrayList = new ArrayList();
			lock (Syscall.fstab_lock)
			{
				if (Syscall.setfsent() != 1)
				{
					throw new IOException("Error calling setfsent(3)", new UnixIOException());
				}
				try
				{
					Fstab fstab;
					while ((fstab = Syscall.getfsent()) != null)
					{
						if (fstab.fs_file != null && fstab.fs_file.StartsWith("/"))
						{
							arrayList.Add(new UnixDriveInfo(fstab));
						}
					}
				}
				finally
				{
					Syscall.endfsent();
				}
			}
			return (UnixDriveInfo[])arrayList.ToArray(typeof(UnixDriveInfo));
		}

		public override string ToString()
		{
			return VolumeLabel;
		}

		private void Refresh()
		{
			Refresh(throwException: true);
		}

		private bool Refresh(bool throwException)
		{
			int num = Syscall.statvfs(mount_point, out stat);
			if (num == -1 && throwException)
			{
				Errno lastError = Stdlib.GetLastError();
				throw new InvalidOperationException(UnixMarshal.GetErrorDescription(lastError), new UnixIOException(lastError));
			}
			if (num == -1)
			{
				return false;
			}
			return true;
		}
	}
	[Serializable]
	public class UnixEncoding : Encoding
	{
		[Serializable]
		private class UnixDecoder : Decoder
		{
			private uint leftOverBits;

			private uint leftOverCount;

			public UnixDecoder()
			{
				leftOverBits = 0u;
				leftOverCount = 0u;
			}

			public override int GetCharCount(byte[] bytes, int index, int count)
			{
				return InternalGetCharCount(bytes, index, count, leftOverBits, leftOverCount, throwOnInvalid: true, flush: false);
			}

			public override int GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex)
			{
				return InternalGetChars(bytes, byteIndex, byteCount, chars, charIndex, ref leftOverBits, ref leftOverCount, throwOnInvalid: true, flush: false);
			}
		}

		[Serializable]
		private class UnixEncoder : Encoder
		{
			private uint leftOver;

			public UnixEncoder()
			{
				leftOver = 0u;
			}

			public override int GetByteCount(char[] chars, int index, int count, bool flush)
			{
				return InternalGetByteCount(chars, index, count, leftOver, flush);
			}

			public override int GetBytes(char[] chars, int charIndex, int charCount, byte[] bytes, int byteCount, bool flush)
			{
				return InternalGetBytes(chars, charIndex, charCount, bytes, byteCount, ref leftOver, flush);
			}
		}

		public static readonly Encoding Instance = new UnixEncoding();

		public static readonly char EscapeByte = '\0';

		private static int InternalGetByteCount(char[] chars, int index, int count, uint leftOver, bool flush)
		{
			if (chars == null)
			{
				throw new ArgumentNullException("chars");
			}
			if (index < 0 || index > chars.Length)
			{
				throw new ArgumentOutOfRangeException("index", _("ArgRange_Array"));
			}
			if (count < 0 || count > chars.Length - index)
			{
				throw new ArgumentOutOfRangeException("count", _("ArgRange_Array"));
			}
			int num = 0;
			uint num2 = leftOver;
			while (count > 0)
			{
				char c = chars[index];
				if (num2 == 0)
				{
					if (c == EscapeByte && count > 1)
					{
						num++;
						index++;
						count--;
					}
					else if (c < '\u0080')
					{
						num++;
					}
					else if (c < 'ࠀ')
					{
						num += 2;
					}
					else if (c >= '\ud800' && c <= '\udbff')
					{
						num2 = c;
					}
					else
					{
						num += 3;
					}
				}
				else
				{
					if (c < '\udc00' || c > '\udfff')
					{
						num += 3;
						num2 = 0u;
						continue;
					}
					num += 4;
					num2 = 0u;
				}
				index++;
				count--;
			}
			if (flush && num2 != 0)
			{
				num += 3;
			}
			return num;
		}

		public override int GetByteCount(char[] chars, int index, int count)
		{
			return InternalGetByteCount(chars, index, count, 0u, flush: true);
		}

		public override int GetByteCount(string s)
		{
			if (s == null)
			{
				throw new ArgumentNullException("s");
			}
			int num = 0;
			int num2 = s.Length;
			int num3 = 0;
			while (num2 > 0)
			{
				char c = s[num++];
				if (c == EscapeByte && num2 > 1)
				{
					num3++;
					num++;
					num2--;
				}
				else if (c < '\u0080')
				{
					num3++;
				}
				else if (c < 'ࠀ')
				{
					num3 += 2;
				}
				else if (c >= '\ud800' && c <= '\udbff' && num2 > 1)
				{
					uint num4 = s[num];
					if (num4 >= 56320 && num4 <= 57343)
					{
						num3 += 4;
						num++;
						num2--;
					}
					else
					{
						num3 += 3;
					}
				}
				else
				{
					num3 += 3;
				}
				num2--;
			}
			return num3;
		}

		private static int InternalGetBytes(char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex, ref uint leftOver, bool flush)
		{
			if (chars == null)
			{
				throw new ArgumentNullException("chars");
			}
			if (bytes == null)
			{
				throw new ArgumentNullException("bytes");
			}
			if (charIndex < 0 || charIndex > chars.Length)
			{
				throw new ArgumentOutOfRangeException("charIndex", _("ArgRange_Array"));
			}
			if (charCount < 0 || charCount > chars.Length - charIndex)
			{
				throw new ArgumentOutOfRangeException("charCount", _("ArgRange_Array"));
			}
			if (byteIndex < 0 || byteIndex > bytes.Length)
			{
				throw new ArgumentOutOfRangeException("byteIndex", _("ArgRange_Array"));
			}
			int num = bytes.Length;
			uint num2 = leftOver;
			int num3 = byteIndex;
			while (charCount > 0)
			{
				char c = chars[charIndex++];
				charCount--;
				uint num4;
				if (num2 == 0)
				{
					if (c >= '\ud800' && c <= '\udbff')
					{
						num2 = c;
						continue;
					}
					if (c == EscapeByte)
					{
						if (num3 >= num)
						{
							throw new ArgumentException(_("Arg_InsufficientSpace"), "bytes");
						}
						if (--charCount >= 0)
						{
							bytes[num3++] = (byte)chars[charIndex++];
						}
						continue;
					}
					num4 = c;
				}
				else if (c >= '\udc00' && c <= '\udfff')
				{
					num4 = (uint)((int)(num2 - 55296 << 10) + (c - 56320) + 65536);
					num2 = 0u;
				}
				else
				{
					num4 = num2;
					num2 = 0u;
					charIndex--;
					charCount++;
				}
				if (num4 < 128)
				{
					if (num3 >= num)
					{
						throw new ArgumentException(_("Arg_InsufficientSpace"), "bytes");
					}
					bytes[num3++] = (byte)num4;
					continue;
				}
				if (num4 < 2048)
				{
					if (num3 + 2 > num)
					{
						throw new ArgumentException(_("Arg_InsufficientSpace"), "bytes");
					}
					bytes[num3++] = (byte)(0xC0u | (num4 >> 6));
					bytes[num3++] = (byte)(0x80u | (num4 & 0x3Fu));
					continue;
				}
				if (num4 < 65536)
				{
					if (num3 + 3 > num)
					{
						throw new ArgumentException(_("Arg_InsufficientSpace"), "bytes");
					}
					bytes[num3++] = (byte)(0xE0u | (num4 >> 12));
					bytes[num3++] = (byte)(0x80u | ((num4 >> 6) & 0x3Fu));
					bytes[num3++] = (byte)(0x80u | (num4 & 0x3Fu));
					continue;
				}
				if (num3 + 4 > num)
				{
					throw new ArgumentException(_("Arg_InsufficientSpace"), "bytes");
				}
				bytes[num3++] = (byte)(0xF0u | (num4 >> 18));
				bytes[num3++] = (byte)(0x80u | ((num4 >> 12) & 0x3Fu));
				bytes[num3++] = (byte)(0x80u | ((num4 >> 6) & 0x3Fu));
				bytes[num3++] = (byte)(0x80u | (num4 & 0x3Fu));
			}
			if (flush && num2 != 0)
			{
				if (num3 + 3 > num)
				{
					throw new ArgumentException(_("Arg_InsufficientSpace"), "bytes");
				}
				bytes[num3++] = (byte)(0xE0u | (num2 >> 12));
				bytes[num3++] = (byte)(0x80u | ((num2 >> 6) & 0x3Fu));
				bytes[num3++] = (byte)(0x80u | (num2 & 0x3Fu));
				num2 = 0u;
			}
			leftOver = num2;
			return num3 - byteIndex;
		}

		public override int GetBytes(char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex)
		{
			uint leftOver = 0u;
			return InternalGetBytes(chars, charIndex, charCount, bytes, byteIndex, ref leftOver, flush: true);
		}

		public unsafe override int GetBytes(string s, int charIndex, int charCount, byte[] bytes, int byteIndex)
		{
			if (s == null)
			{
				throw new ArgumentNullException("s");
			}
			if (bytes == null)
			{
				throw new ArgumentNullException("bytes");
			}
			if (charIndex < 0 || charIndex > s.Length)
			{
				throw new ArgumentOutOfRangeException("charIndex", _("ArgRange_StringIndex"));
			}
			if (charCount < 0 || charCount > s.Length - charIndex)
			{
				throw new ArgumentOutOfRangeException("charCount", _("ArgRange_StringRange"));
			}
			if (byteIndex < 0 || byteIndex > bytes.Length)
			{
				throw new ArgumentOutOfRangeException("byteIndex", _("ArgRange_Array"));
			}
			fixed (char* ptr = s)
			{
				fixed (byte* ptr2 = bytes)
				{
					return GetBytes(ptr + charIndex, charCount, ptr2 + byteIndex, bytes.Length - byteIndex);
				}
			}
		}

		public unsafe override int GetBytes(char* chars, int charCount, byte* bytes, int byteCount)
		{
			if (bytes == null || chars == null)
			{
				throw new ArgumentNullException((bytes == null) ? "bytes" : "chars");
			}
			if (charCount < 0 || byteCount < 0)
			{
				throw new ArgumentOutOfRangeException((charCount < 0) ? "charCount" : "byteCount");
			}
			int num = 0;
			int num2 = 0;
			while (charCount > 0)
			{
				char c = chars[num2++];
				uint num3;
				if (c >= '\ud800' && c <= '\udbff' && charCount > 1)
				{
					num3 = chars[num2];
					if (num3 >= 56320 && num3 <= 57343)
					{
						num3 = (uint)((int)(num3 - 56320) + (c - 55296 << 10) + 65536);
						num2++;
						charCount--;
					}
					else
					{
						num3 = c;
					}
				}
				else
				{
					if (c == EscapeByte && charCount > 1)
					{
						if (num >= byteCount)
						{
							throw new ArgumentException(_("Arg_InsufficientSpace"), "bytes");
						}
						charCount -= 2;
						if (charCount >= 0)
						{
							bytes[num++] = (byte)chars[num2++];
						}
						continue;
					}
					num3 = c;
				}
				charCount--;
				if (num3 < 128)
				{
					if (num >= byteCount)
					{
						throw new ArgumentException(_("Arg_InsufficientSpace"), "bytes");
					}
					bytes[num++] = (byte)num3;
					continue;
				}
				if (num3 < 2048)
				{
					if (num + 2 > byteCount)
					{
						throw new ArgumentException(_("Arg_InsufficientSpace"), "bytes");
					}
					bytes[num++] = (byte)(0xC0u | (num3 >> 6));
					bytes[num++] = (byte)(0x80u | (num3 & 0x3Fu));
					continue;
				}
				if (num3 < 65536)
				{
					if (num + 3 > byteCount)
					{
						throw new ArgumentException(_("Arg_InsufficientSpace"), "bytes");
					}
					bytes[num++] = (byte)(0xE0u | (num3 >> 12));
					bytes[num++] = (byte)(0x80u | ((num3 >> 6) & 0x3Fu));
					bytes[num++] = (byte)(0x80u | (num3 & 0x3Fu));
					continue;
				}
				if (num + 4 > byteCount)
				{
					throw new ArgumentException(_("Arg_InsufficientSpace"), "bytes");
				}
				bytes[num++] = (byte)(0xF0u | (num3 >> 18));
				bytes[num++] = (byte)(0x80u | ((num3 >> 12) & 0x3Fu));
				bytes[num++] = (byte)(0x80u | ((num3 >> 6) & 0x3Fu));
				bytes[num++] = (byte)(0x80u | (num3 & 0x3Fu));
			}
			return num;
		}

		private static int InternalGetCharCount(byte[] bytes, int index, int count, uint leftOverBits, uint leftOverCount, bool throwOnInvalid, bool flush)
		{
			if (bytes == null)
			{
				throw new ArgumentNullException("bytes");
			}
			if (index < 0 || index > bytes.Length)
			{
				throw new ArgumentOutOfRangeException("index", _("ArgRange_Array"));
			}
			if (count < 0 || count > bytes.Length - index)
			{
				throw new ArgumentOutOfRangeException("count", _("ArgRange_Array"));
			}
			int num = 0;
			int num2 = 0;
			uint num3 = leftOverBits;
			uint num4 = leftOverCount & 0xFu;
			uint num5 = (leftOverCount >> 4) & 0xFu;
			while (count > 0)
			{
				uint num6 = bytes[index++];
				num++;
				count--;
				if (num5 == 0)
				{
					if (num6 < 128)
					{
						num2++;
						num = 0;
					}
					else if ((num6 & 0xE0) == 192)
					{
						num3 = num6 & 0x1Fu;
						num4 = 1u;
						num5 = 2u;
					}
					else if ((num6 & 0xF0) == 224)
					{
						num3 = num6 & 0xFu;
						num4 = 1u;
						num5 = 3u;
					}
					else if ((num6 & 0xF8) == 240)
					{
						num3 = num6 & 7u;
						num4 = 1u;
						num5 = 4u;
					}
					else if ((num6 & 0xFC) == 248)
					{
						num3 = num6 & 3u;
						num4 = 1u;
						num5 = 5u;
					}
					else if ((num6 & 0xFE) == 252)
					{
						num3 = num6 & 3u;
						num4 = 1u;
						num5 = 6u;
					}
					else
					{
						num2 += num * 2;
						num = 0;
					}
				}
				else if ((num6 & 0xC0) == 128)
				{
					num3 = (num3 << 6) | (num6 & 0x3Fu);
					if (++num4 < num5)
					{
						continue;
					}
					if (num3 < 65536)
					{
						bool flag = false;
						switch (num5)
						{
						case 2u:
							flag = num3 <= 127;
							break;
						case 3u:
							flag = num3 <= 2047;
							break;
						case 4u:
							flag = num3 <= 65535;
							break;
						case 5u:
							flag = num3 <= 2097151;
							break;
						case 6u:
							flag = num3 <= 67108863;
							break;
						}
						num2 = ((!flag) ? (num2 + 1) : (num2 + num * 2));
					}
					else if (num3 < 1114112)
					{
						num2 += 2;
					}
					else if (throwOnInvalid)
					{
						num2 += num * 2;
					}
					num5 = 0u;
					num = 0;
				}
				else
				{
					if (num6 < 128)
					{
						index--;
						count++;
						num--;
					}
					num2 += num * 2;
					num5 = 0u;
					num = 0;
				}
			}
			if (flush && num5 != 0 && throwOnInvalid)
			{
				num2 += num * 2;
			}
			return num2;
		}

		public override int GetCharCount(byte[] bytes, int index, int count)
		{
			return InternalGetCharCount(bytes, index, count, 0u, 0u, throwOnInvalid: true, flush: true);
		}

		private static int InternalGetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex, ref uint leftOverBits, ref uint leftOverCount, bool throwOnInvalid, bool flush)
		{
			if (bytes == null)
			{
				throw new ArgumentNullException("bytes");
			}
			if (chars == null)
			{
				throw new ArgumentNullException("chars");
			}
			if (byteIndex < 0 || byteIndex > bytes.Length)
			{
				throw new ArgumentOutOfRangeException("byteIndex", _("ArgRange_Array"));
			}
			if (byteCount < 0 || byteCount > bytes.Length - byteIndex)
			{
				throw new ArgumentOutOfRangeException("byteCount", _("ArgRange_Array"));
			}
			if (charIndex < 0 || charIndex > chars.Length)
			{
				throw new ArgumentOutOfRangeException("charIndex", _("ArgRange_Array"));
			}
			if (charIndex == chars.Length)
			{
				return 0;
			}
			byte[] array = new byte[6];
			int next_raw = 0;
			int num = chars.Length;
			int posn = charIndex;
			uint num2 = leftOverBits;
			uint num3 = leftOverCount & 0xFu;
			uint num4 = (leftOverCount >> 4) & 0xFu;
			while (byteCount > 0)
			{
				uint num5 = bytes[byteIndex++];
				array[next_raw++] = (byte)num5;
				byteCount--;
				if (num4 == 0)
				{
					if (num5 < 128)
					{
						if (posn >= num)
						{
							throw new ArgumentException(_("Arg_InsufficientSpace"), "chars");
						}
						next_raw = 0;
						chars[posn++] = (char)num5;
					}
					else if ((num5 & 0xE0) == 192)
					{
						num2 = num5 & 0x1Fu;
						num3 = 1u;
						num4 = 2u;
					}
					else if ((num5 & 0xF0) == 224)
					{
						num2 = num5 & 0xFu;
						num3 = 1u;
						num4 = 3u;
					}
					else if ((num5 & 0xF8) == 240)
					{
						num2 = num5 & 7u;
						num3 = 1u;
						num4 = 4u;
					}
					else if ((num5 & 0xFC) == 248)
					{
						num2 = num5 & 3u;
						num3 = 1u;
						num4 = 5u;
					}
					else if ((num5 & 0xFE) == 252)
					{
						num2 = num5 & 3u;
						num3 = 1u;
						num4 = 6u;
					}
					else
					{
						next_raw = 0;
						chars[posn++] = EscapeByte;
						chars[posn++] = (char)num5;
					}
				}
				else if ((num5 & 0xC0) == 128)
				{
					num2 = (num2 << 6) | (num5 & 0x3Fu);
					if (++num3 < num4)
					{
						continue;
					}
					if (num2 < 65536)
					{
						bool flag = false;
						switch (num4)
						{
						case 2u:
							flag = num2 <= 127;
							break;
						case 3u:
							flag = num2 <= 2047;
							break;
						case 4u:
							flag = num2 <= 65535;
							break;
						case 5u:
							flag = num2 <= 2097151;
							break;
						case 6u:
							flag = num2 <= 67108863;
							break;
						}
						if (flag)
						{
							CopyRaw(array, ref next_raw, chars, ref posn, num);
						}
						else
						{
							if (posn >= num)
							{
								throw new ArgumentException(_("Arg_InsufficientSpace"), "chars");
							}
							chars[posn++] = (char)num2;
						}
					}
					else if (num2 < 1114112)
					{
						if (posn + 2 > num)
						{
							throw new ArgumentException(_("Arg_InsufficientSpace"), "chars");
						}
						num2 -= 65536;
						chars[posn++] = (char)((num2 >> 10) + 55296);
						chars[posn++] = (char)((num2 & 0x3FF) + 56320);
					}
					else if (throwOnInvalid)
					{
						CopyRaw(array, ref next_raw, chars, ref posn, num);
					}
					num4 = 0u;
					next_raw = 0;
				}
				else
				{
					if (num5 < 128)
					{
						byteIndex--;
						byteCount++;
						next_raw--;
					}
					CopyRaw(array, ref next_raw, chars, ref posn, num);
					num4 = 0u;
					next_raw = 0;
				}
			}
			if (flush && num4 != 0 && throwOnInvalid)
			{
				CopyRaw(array, ref next_raw, chars, ref posn, num);
			}
			leftOverBits = num2;
			leftOverCount = num3 | (num4 << 4);
			return posn - charIndex;
		}

		private static void CopyRaw(byte[] raw, ref int next_raw, char[] chars, ref int posn, int length)
		{
			if (posn + next_raw * 2 > length)
			{
				throw new ArgumentException(_("Arg_InsufficientSpace"), "chars");
			}
			for (int i = 0; i < next_raw; i++)
			{
				chars[posn++] = EscapeByte;
				chars[posn++] = (char)raw[i];
			}
			next_raw = 0;
		}

		public override int GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex)
		{
			uint leftOverBits = 0u;
			uint leftOverCount = 0u;
			return InternalGetChars(bytes, byteIndex, byteCount, chars, charIndex, ref leftOverBits, ref leftOverCount, throwOnInvalid: true, flush: true);
		}

		public override int GetMaxByteCount(int charCount)
		{
			if (charCount < 0)
			{
				throw new ArgumentOutOfRangeException("charCount", _("ArgRange_NonNegative"));
			}
			return charCount * 4;
		}

		public override int GetMaxCharCount(int byteCount)
		{
			if (byteCount < 0)
			{
				throw new ArgumentOutOfRangeException("byteCount", _("ArgRange_NonNegative"));
			}
			return byteCount;
		}

		public override Decoder GetDecoder()
		{
			return new UnixDecoder();
		}

		public override Encoder GetEncoder()
		{
			return new UnixEncoder();
		}

		public override byte[] GetPreamble()
		{
			return new byte[0];
		}

		public override bool Equals(object value)
		{
			if (value is UnixEncoding)
			{
				return true;
			}
			return false;
		}

		public override int GetHashCode()
		{
			return base.GetHashCode();
		}

		public override byte[] GetBytes(string s)
		{
			if (s == null)
			{
				throw new ArgumentNullException("s");
			}
			byte[] array = new byte[GetByteCount(s)];
			GetBytes(s, 0, s.Length, array, 0);
			return array;
		}

		private static string _(string arg)
		{
			return arg;
		}
	}
	[Serializable]
	public class UnixEndPoint : EndPoint
	{
		private string filename;

		public string Filename
		{
			get
			{
				return filename;
			}
			set
			{
				filename = value;
			}
		}

		public override AddressFamily AddressFamily => AddressFamily.Unix;

		public UnixEndPoint(string filename)
		{
			if (filename == null)
			{
				throw new ArgumentNullException("filename");
			}
			if (filename == "")
			{
				throw new ArgumentException("Cannot be empty.", "filename");
			}
			this.filename = filename;
		}

		public override EndPoint Create(SocketAddress socketAddress)
		{
			if (socketAddress.Size == 2)
			{
				return new UnixEndPoint("a")
				{
					filename = ""
				};
			}
			int num = socketAddress.Size - 2;
			byte[] array = new byte[num];
			for (int i = 0; i < array.Length; i++)
			{
				array[i] = socketAddress[i + 2];
				if (array[i] == 0)
				{
					num = i;
					break;
				}
			}
			return new UnixEndPoint(Encoding.Default.GetString(array, 0, num));
		}

		public override SocketAddress Serialize()
		{
			byte[] bytes = Encoding.Default.GetBytes(filename);
			SocketAddress socketAddress = new SocketAddress(AddressFamily, 2 + bytes.Length + 1);
			for (int i = 0; i < bytes.Length; i++)
			{
				socketAddress[2 + i] = bytes[i];
			}
			socketAddress[2 + bytes.Length] = 0;
			return socketAddress;
		}

		public override string ToString()
		{
			return filename;
		}

		public override int GetHashCode()
		{
			return filename.GetHashCode();
		}

		public override bool Equals(object o)
		{
			if (!(o is UnixEndPoint unixEndPoint))
			{
				return false;
			}
			return unixEndPoint.filename == filename;
		}
	}
	public sealed class UnixEnvironment
	{
		public static string CurrentDirectory
		{
			get
			{
				return UnixDirectoryInfo.GetCurrentDirectory();
			}
			set
			{
				UnixDirectoryInfo.SetCurrentDirectory(value);
			}
		}

		public static string MachineName
		{
			get
			{
				if (Syscall.uname(out var buf) != 0)
				{
					throw UnixMarshal.CreateExceptionForLastError();
				}
				return buf.nodename;
			}
			set
			{
				UnixMarshal.ThrowExceptionForLastErrorIf(Syscall.sethostname(value));
			}
		}

		public static string UserName => UnixUserInfo.GetRealUser().UserName;

		public static UnixGroupInfo RealGroup => new UnixGroupInfo(RealGroupId);

		public static long RealGroupId => Syscall.getgid();

		public static UnixUserInfo RealUser => new UnixUserInfo(RealUserId);

		public static long RealUserId => Syscall.getuid();

		public static UnixGroupInfo EffectiveGroup
		{
			get
			{
				return new UnixGroupInfo(EffectiveGroupId);
			}
			set
			{
				EffectiveGroupId = value.GroupId;
			}
		}

		public static long EffectiveGroupId
		{
			get
			{
				return Syscall.getegid();
			}
			set
			{
				Syscall.setegid(Convert.ToUInt32(value));
			}
		}

		public static UnixUserInfo EffectiveUser
		{
			get
			{
				return new UnixUserInfo(EffectiveUserId);
			}
			set
			{
				EffectiveUserId = value.UserId;
			}
		}

		public static long EffectiveUserId
		{
			get
			{
				return Syscall.geteuid();
			}
			set
			{
				Syscall.seteuid(Convert.ToUInt32(value));
			}
		}

		public static string Login => UnixUserInfo.GetRealUser().UserName;

		private UnixEnvironment()
		{
		}

		[CLSCompliant(false)]
		public static long GetConfigurationValue(SysconfName name)
		{
			long num = Syscall.sysconf(name);
			if (num == -1 && Stdlib.GetLastError() != 0)
			{
				UnixMarshal.ThrowExceptionForLastError();
			}
			return num;
		}

		[CLSCompliant(false)]
		public static string GetConfigurationString(ConfstrName name)
		{
			ulong num = Syscall.confstr(name, null, 0uL);
			if (num == ulong.MaxValue)
			{
				UnixMarshal.ThrowExceptionForLastError();
			}
			if (num == 0L)
			{
				return "";
			}
			StringBuilder stringBuilder = new StringBuilder((int)num + 1);
			num = Syscall.confstr(name, stringBuilder, num);
			if (num == ulong.MaxValue)
			{
				UnixMarshal.ThrowExceptionForLastError();
			}
			return stringBuilder.ToString();
		}

		public static void SetNiceValue(int inc)
		{
			UnixMarshal.ThrowExceptionForLastErrorIf(Syscall.nice(inc));
		}

		public static int CreateSession()
		{
			int num = Syscall.setsid();
			UnixMarshal.ThrowExceptionForLastErrorIf(num);
			return num;
		}

		public static void SetProcessGroup()
		{
			UnixMarshal.ThrowExceptionForLastErrorIf(Syscall.setpgrp());
		}

		public static int GetProcessGroup()
		{
			return Syscall.getpgrp();
		}

		public static UnixGroupInfo[] GetSupplementaryGroups()
		{
			uint[] array = _GetSupplementaryGroupIds();
			UnixGroupInfo[] array2 = new UnixGroupInfo[array.Length];
			for (int i = 0; i < array2.Length; i++)
			{
				array2[i] = new UnixGroupInfo(array[i]);
			}
			return array2;
		}

		private static uint[] _GetSupplementaryGroupIds()
		{
			int num = Syscall.getgroups(0, new uint[0]);
			if (num == -1)
			{
				UnixMarshal.ThrowExceptionForLastError();
			}
			uint[] array = new uint[num];
			UnixMarshal.ThrowExceptionForLastErrorIf(Syscall.getgroups(array));
			return array;
		}

		public static void SetSupplementaryGroups(UnixGroupInfo[] groups)
		{
			uint[] array = new uint[groups.Length];
			for (int i = 0; i < array.Length; i++)
			{
				array[i] = Convert.ToUInt32(groups[i].GroupId);
			}
			UnixMarshal.ThrowExceptionForLastErrorIf(Syscall.setgroups(array));
		}

		public static long[] GetSupplementaryGroupIds()
		{
			uint[] array = _GetSupplementaryGroupIds();
			long[] array2 = new long[array.Length];
			for (int i = 0; i < array2.Length; i++)
			{
				array2[i] = array[i];
			}
			return array2;
		}

		public static void SetSupplementaryGroupIds(long[] list)
		{
			uint[] array = new uint[list.Length];
			for (int i = 0; i < array.Length; i++)
			{
				array[i] = Convert.ToUInt32(list[i]);
			}
			UnixMarshal.ThrowExceptionForLastErrorIf(Syscall.setgroups(array));
		}

		public static int GetParentProcessId()
		{
			return Syscall.getppid();
		}

		public static UnixProcess GetParentProcess()
		{
			return new UnixProcess(GetParentProcessId());
		}

		public static string[] GetUserShells()
		{
			ArrayList arrayList = new ArrayList();
			lock (Syscall.usershell_lock)
			{
				try
				{
					if (Syscall.setusershell() != 0)
					{
						UnixMarshal.ThrowExceptionForLastError();
					}
					string value;
					while ((value = Syscall.getusershell()) != null)
					{
						arrayList.Add(value);
					}
				}
				finally
				{
					Syscall.endusershell();
				}
			}
			return (string[])arrayList.ToArray(typeof(string));
		}
	}
	public sealed class UnixFileInfo : UnixFileSystemInfo
	{
		public override string Name => UnixPath.GetFileName(base.FullPath);

		public string DirectoryName => UnixPath.GetDirectoryName(base.FullPath);

		public UnixDirectoryInfo Directory => new UnixDirectoryInfo(DirectoryName);

		public UnixFileInfo(string path)
			: base(path)
		{
		}

		internal UnixFileInfo(string path, Stat stat)
			: base(path, stat)
		{
		}

		public override void Delete()
		{
			UnixMarshal.ThrowExceptionForLastErrorIf(Syscall.unlink(base.FullPath));
			Refresh();
		}

		public UnixStream Create()
		{
			FilePermissions mode = FilePermissions.S_IRUSR | FilePermissions.S_IWUSR | FilePermissions.S_IRGRP | FilePermissions.S_IROTH;
			return Create(mode);
		}

		[CLSCompliant(false)]
		public UnixStream Create(FilePermissions mode)
		{
			int num = Syscall.creat(base.FullPath, mode);
			if (num < 0)
			{
				UnixMarshal.ThrowExceptionForLastError();
			}
			Refresh();
			return new UnixStream(num);
		}

		public UnixStream Create(FileAccessPermissions mode)
		{
			return Create((FilePermissions)mode);
		}

		[CLSCompliant(false)]
		public UnixStream Open(OpenFlags flags)
		{
			if ((flags & OpenFlags.O_CREAT) != 0)
			{
				throw new ArgumentException("Cannot specify OpenFlags.O_CREAT without providing FilePermissions.  Use the Open(OpenFlags, FilePermissions) method instead");
			}
			int num = Syscall.open(base.FullPath, flags);
			if (num < 0)
			{
				UnixMarshal.ThrowExceptionForLastError();
			}
			return new UnixStream(num);
		}

		[CLSCompliant(false)]
		public UnixStream Open(OpenFlags flags, FilePermissions mode)
		{
			int num = Syscall.open(base.FullPath, flags, mode);
			if (num < 0)
			{
				UnixMarshal.ThrowExceptionForLastError();
			}
			return new UnixStream(num);
		}

		public UnixStream Open(FileMode mode)
		{
			OpenFlags flags = NativeConvert.ToOpenFlags(mode, FileAccess.ReadWrite);
			return Open(flags);
		}

		public UnixStream Open(FileMode mode, FileAccess access)
		{
			OpenFlags flags = NativeConvert.ToOpenFlags(mode, access);
			return Open(flags);
		}

		[CLSCompliant(false)]
		public UnixStream Open(FileMode mode, FileAccess access, FilePermissions perms)
		{
			OpenFlags flags = NativeConvert.ToOpenFlags(mode, access);
			int num = Syscall.open(base.FullPath, flags, perms);
			if (num < 0)
			{
				UnixMarshal.ThrowExceptionForLastError();
			}
			return new UnixStream(num);
		}

		public UnixStream OpenRead()
		{
			return Open(FileMode.Open, FileAccess.Read);
		}

		public UnixStream OpenWrite()
		{
			return Open(FileMode.OpenOrCreate, FileAccess.Write);
		}
	}
	public abstract class UnixFileSystemInfo
	{
		private Stat stat;

		private string fullPath;

		private string originalPath;

		private bool valid;

		internal const FileSpecialAttributes AllSpecialAttributes = FileSpecialAttributes.SetUserId | FileSpecialAttributes.SetGroupId | FileSpecialAttributes.Sticky;

		internal const FileTypes AllFileTypes = (FileTypes)61440;

		protected string FullPath
		{
			get
			{
				return fullPath;
			}
			set
			{
				if (fullPath != value)
				{
					UnixPath.CheckPath(value);
					valid = false;
					fullPath = value;
				}
			}
		}

		protected string OriginalPath
		{
			get
			{
				return originalPath;
			}
			set
			{
				originalPath = value;
			}
		}

		public virtual string FullName => FullPath;

		public abstract string Name { get; }

		public bool Exists
		{
			get
			{
				Refresh(force: true);
				return valid;
			}
		}

		public long Device
		{
			get
			{
				AssertValid();
				return Convert.ToInt64(stat.st_dev);
			}
		}

		public long Inode
		{
			get
			{
				AssertValid();
				return Convert.ToInt64(stat.st_ino);
			}
		}

		[CLSCompliant(false)]
		public FilePermissions Protection
		{
			get
			{
				AssertValid();
				return stat.st_mode;
			}
			set
			{
				UnixMarshal.ThrowExceptionForLastErrorIf(Syscall.chmod(FullPath, value));
			}
		}

		public FileTypes FileType
		{
			get
			{
				AssertValid();
				return (FileTypes)(stat.st_mode & FilePermissions.S_IFMT);
			}
		}

		public FileAccessPermissions FileAccessPermissions
		{
			get
			{
				AssertValid();
				return (FileAccessPermissions)(stat.st_mode & FilePermissions.ACCESSPERMS);
			}
			set
			{
				AssertValid();
				int st_mode = (int)stat.st_mode;
				st_mode &= -512;
				st_mode |= (int)value;
				Protection = (FilePermissions)st_mode;
			}
		}

		public FileSpecialAttributes FileSpecialAttributes
		{
			get
			{
				AssertValid();
				return (FileSpecialAttributes)(stat.st_mode & (FilePermissions.S_ISUID | FilePermissions.S_ISGID | FilePermissions.S_ISVTX));
			}
			set
			{
				AssertValid();
				int st_mode = (int)stat.st_mode;
				st_mode &= -3585;
				st_mode |= (int)value;
				Protection = (FilePermissions)st_mode;
			}
		}

		public long LinkCount
		{
			get
			{
				AssertValid();
				return Convert.ToInt64(stat.st_nlink);
			}
		}

		public UnixUserInfo OwnerUser
		{
			get
			{
				AssertValid();
				return new UnixUserInfo(stat.st_uid);
			}
		}

		public long OwnerUserId
		{
			get
			{
				AssertValid();
				return stat.st_uid;
			}
		}

		public UnixGroupInfo OwnerGroup
		{
			get
			{
				AssertValid();
				return new UnixGroupInfo(stat.st_gid);
			}
		}

		public long OwnerGroupId
		{
			get
			{
				AssertValid();
				return stat.st_gid;
			}
		}

		public long DeviceType
		{
			get
			{
				AssertValid();
				return Convert.ToInt64(stat.st_rdev);
			}
		}

		public long Length
		{
			get
			{
				AssertValid();
				return stat.st_size;
			}
		}

		public long BlockSize
		{
			get
			{
				AssertValid();
				return stat.st_blksize;
			}
		}

		public long BlocksAllocated
		{
			get
			{
				AssertValid();
				return stat.st_blocks;
			}
		}

		public DateTime LastAccessTime
		{
			get
			{
				AssertValid();
				return NativeConvert.ToDateTime(stat.st_atime, stat.st_atime_nsec);
			}
		}

		public DateTime LastAccessTimeUtc => LastAccessTime.ToUniversalTime();

		public DateTime LastWriteTime
		{
			get
			{
				AssertValid();
				return NativeConvert.ToDateTime(stat.st_mtime, stat.st_mtime_nsec);
			}
		}

		public DateTime LastWriteTimeUtc => LastWriteTime.ToUniversalTime();

		public DateTime LastStatusChangeTime
		{
			get
			{
				AssertValid();
				return NativeConvert.ToDateTime(stat.st_ctime, stat.st_ctime_nsec);
			}
		}

		public DateTime LastStatusChangeTimeUtc => LastStatusChangeTime.ToUniversalTime();

		public bool IsDirectory
		{
			get
			{
				AssertValid();
				return IsFileType(stat.st_mode, FilePermissions.S_IFDIR);
			}
		}

		public bool IsCharacterDevice
		{
			get
			{
				AssertValid();
				return IsFileType(stat.st_mode, FilePermissions.S_IFCHR);
			}
		}

		public bool IsBlockDevice
		{
			get
			{
				AssertValid();
				return IsFileType(stat.st_mode, FilePermissions.S_IFBLK);
			}
		}

		public bool IsRegularFile
		{
			get
			{
				AssertValid();
				return IsFileType(stat.st_mode, FilePermissions.S_IFREG);
			}
		}

		public bool IsFifo
		{
			get
			{
				AssertValid();
				return IsFileType(stat.st_mode, FilePermissions.S_IFIFO);
			}
		}

		public bool IsSymbolicLink
		{
			get
			{
				AssertValid();
				return IsFileType(stat.st_mode, FilePermissions.S_IFLNK);
			}
		}

		public bool IsSocket
		{
			get
			{
				AssertValid();
				return IsFileType(stat.st_mode, FilePermissions.S_IFSOCK);
			}
		}

		public bool IsSetUser
		{
			get
			{
				AssertValid();
				return IsSet(stat.st_mode, FilePermissions.S_ISUID);
			}
		}

		public bool IsSetGroup
		{
			get
			{
				AssertValid();
				return IsSet(stat.st_mode, FilePermissions.S_ISGID);
			}
		}

		public bool IsSticky
		{
			get
			{
				AssertValid();
				return IsSet(stat.st_mode, FilePermissions.S_ISVTX);
			}
		}

		protected UnixFileSystemInfo(string path)
		{
			UnixPath.CheckPath(path);
			originalPath = path;
			fullPath = UnixPath.GetFullPath(path);
			Refresh(force: true);
		}

		internal UnixFileSystemInfo(string path, Stat stat)
		{
			originalPath = path;
			fullPath = UnixPath.GetFullPath(path);
			this.stat = stat;
			valid = true;
		}

		private void AssertValid()
		{
			Refresh(force: false);
			if (!valid)
			{
				throw new InvalidOperationException("Path doesn't exist!");
			}
		}

		internal static bool IsFileType(FilePermissions mode, FilePermissions type)
		{
			return (mode & FilePermissions.S_IFMT) == type;
		}

		internal static bool IsSet(FilePermissions mode, FilePermissions type)
		{
			return (mode & type) == type;
		}

		[CLSCompliant(false)]
		public bool CanAccess(AccessModes mode)
		{
			return Syscall.access(FullPath, mode) == 0;
		}

		public UnixFileSystemInfo CreateLink(string path)
		{
			UnixMarshal.ThrowExceptionForLastErrorIf(Syscall.link(FullName, path));
			return GetFileSystemEntry(path);
		}

		public UnixSymbolicLinkInfo CreateSymbolicLink(string path)
		{
			UnixMarshal.ThrowExceptionForLastErrorIf(Syscall.symlink(FullName, path));
			return new UnixSymbolicLinkInfo(path);
		}

		public abstract void Delete();

		[CLSCompliant(false)]
		public long GetConfigurationValue(PathconfName name)
		{
			long num = Syscall.pathconf(FullPath, name);
			if (num == -1 && Stdlib.GetLastError() != 0)
			{
				UnixMarshal.ThrowExceptionForLastError();
			}
			return num;
		}

		public void Refresh()
		{
			Refresh(force: true);
		}

		internal void Refresh(bool force)
		{
			if (!valid || force)
			{
				valid = GetFileStatus(FullPath, out stat);
			}
		}

		protected virtual bool GetFileStatus(string path, out Stat stat)
		{
			return Syscall.stat(path, out stat) == 0;
		}

		public void SetLength(long length)
		{
			int num;
			do
			{
				num = Syscall.truncate(FullPath, length);
			}
			while (UnixMarshal.ShouldRetrySyscall(num));
			UnixMarshal.ThrowExceptionForLastErrorIf(num);
		}

		public virtual void SetOwner(long owner, long group)
		{
			uint owner2 = Convert.ToUInt32(owner);
			uint group2 = Convert.ToUInt32(group);
			UnixMarshal.ThrowExceptionForLastErrorIf(Syscall.chown(FullPath, owner2, group2));
		}

		public void SetOwner(string owner)
		{
			Passwd passwd = Syscall.getpwnam(owner);
			if (passwd == null)
			{
				throw new ArgumentException(Locale.GetText("invalid username"), "owner");
			}
			uint pw_uid = passwd.pw_uid;
			uint pw_gid = passwd.pw_gid;
			SetOwner(pw_uid, pw_gid);
		}

		public void SetOwner(string owner, string group)
		{
			long owner2 = -1L;
			if (owner != null)
			{
				owner2 = new UnixUserInfo(owner).UserId;
			}
			long group2 = -1L;
			if (group != null)
			{
				group2 = new UnixGroupInfo(group).GroupId;
			}
			SetOwner(owner2, group2);
		}

		public void SetOwner(UnixUserInfo owner)
		{
			long group;
			long owner2 = (group = -1L);
			if (owner != null)
			{
				owner2 = owner.UserId;
				group = owner.GroupId;
			}
			SetOwner(owner2, group);
		}

		public void SetOwner(UnixUserInfo owner, UnixGroupInfo group)
		{
			long group2;
			long owner2 = (group2 = -1L);
			if (owner != null)
			{
				owner2 = owner.UserId;
			}
			if (group != null)
			{
				group2 = owner.GroupId;
			}
			SetOwner(owner2, group2);
		}

		public override string ToString()
		{
			return FullPath;
		}

		public Stat ToStat()
		{
			AssertValid();
			return stat;
		}

		public static UnixFileSystemInfo GetFileSystemEntry(string path)
		{
			if (TryGetFileSystemEntry(path, out var entry))
			{
				return entry;
			}
			UnixMarshal.ThrowExceptionForLastError();
			throw new DirectoryNotFoundException("UnixMarshal.ThrowExceptionForLastError didn't throw?!");
		}

		public static bool TryGetFileSystemEntry(string path, out UnixFileSystemInfo entry)
		{
			if (Syscall.lstat(path, out var buf) == -1)
			{
				if (Stdlib.GetLastError() == Errno.ENOENT)
				{
					entry = new UnixFileInfo(path);
					return true;
				}
				entry = null;
				return false;
			}
			if (IsFileType(buf.st_mode, FilePermissions.S_IFDIR))
			{
				entry = new UnixDirectoryInfo(path, buf);
			}
			else if (IsFileType(buf.st_mode, FilePermissions.S_IFLNK))
			{
				entry = new UnixSymbolicLinkInfo(path, buf);
			}
			else
			{
				entry = new UnixFileInfo(path, buf);
			}
			return true;
		}
	}
	public sealed class UnixGroupInfo
	{
		private Mono.Unix.Native.Group group;

		public string GroupName => group.gr_name;

		public string Password => group.gr_passwd;

		public long GroupId => group.gr_gid;

		public UnixGroupInfo(string group)
		{
			this.group = new Mono.Unix.Native.Group();
			if (Syscall.getgrnam_r(group, this.group, out var grbufp) != 0 || grbufp == null)
			{
				throw new ArgumentException(Locale.GetText("invalid group name"), "group");
			}
		}

		public UnixGroupInfo(long group)
		{
			this.group = new Mono.Unix.Native.Group();
			if (Syscall.getgrgid_r(Convert.ToUInt32(group), this.group, out var grbufp) != 0 || grbufp == null)
			{
				throw new ArgumentException(Locale.GetText("invalid group id"), "group");
			}
		}

		public UnixGroupInfo(Mono.Unix.Native.Group group)
		{
			this.group = CopyGroup(group);
		}

		private static Mono.Unix.Native.Group CopyGroup(Mono.Unix.Native.Group group)
		{
			return new Mono.Unix.Native.Group
			{
				gr_gid = group.gr_gid,
				gr_mem = group.gr_mem,
				gr_name = group.gr_name,
				gr_passwd = group.gr_passwd
			};
		}

		public UnixUserInfo[] GetMembers()
		{
			ArrayList arrayList = new ArrayList(group.gr_mem.Length);
			for (int i = 0; i < group.gr_mem.Length; i++)
			{
				try
				{
					arrayList.Add(new UnixUserInfo(group.gr_mem[i]));
				}
				catch (ArgumentException)
				{
				}
			}
			return (UnixUserInfo[])arrayList.ToArray(typeof(UnixUserInfo));
		}

		public string[] GetMemberNames()
		{
			return (string[])group.gr_mem.Clone();
		}

		public override int GetHashCode()
		{
			return group.GetHashCode();
		}

		public override bool Equals(object obj)
		{
			if (obj == null || GetType() != obj.GetType())
			{
				return false;
			}
			return group.Equals(((UnixGroupInfo)obj).group);
		}

		public override string ToString()
		{
			return group.ToString();
		}

		public Mono.Unix.Native.Group ToGroup()
		{
			return CopyGroup(group);
		}

		public static UnixGroupInfo[] GetLocalGroups()
		{
			ArrayList arrayList = new ArrayList();
			lock (Syscall.grp_lock)
			{
				if (Syscall.setgrent() != 0)
				{
					UnixMarshal.ThrowExceptionForLastError();
				}
				try
				{
					Mono.Unix.Native.Group group;
					while ((group = Syscall.getgrent()) != null)
					{
						arrayList.Add(new UnixGroupInfo(group));
					}
					if (Stdlib.GetLastError() != 0)
					{
						UnixMarshal.ThrowExceptionForLastError();
					}
				}
				finally
				{
					Syscall.endgrent();
				}
			}
			return (UnixGroupInfo[])arrayList.ToArray(typeof(UnixGroupInfo));
		}
	}
	[Serializable]
	public class UnixIOException : IOException
	{
		private int errno;

		public int NativeErrorCode => errno;

		public Errno ErrorCode => NativeConvert.ToErrno(errno);

		public UnixIOException()
			: this(Marshal.GetLastWin32Error())
		{
		}

		public UnixIOException(int errno)
			: base(GetMessage(NativeConvert.ToErrno(errno)))
		{
			this.errno = errno;
		}

		public UnixIOException(int errno, Exception inner)
			: base(GetMessage(NativeConvert.ToErrno(errno)), inner)
		{
			this.errno = errno;
		}

		public UnixIOException(Errno errno)
			: base(GetMessage(errno))
		{
			this.errno = NativeConvert.FromErrno(errno);
		}

		public UnixIOException(Errno errno, Exception inner)
			: base(GetMessage(errno), inner)
		{
			this.errno = NativeConvert.FromErrno(errno);
		}

		public UnixIOException(string message)
			: base(message)
		{
			errno = 0;
		}

		public UnixIOException(string message, Exception inner)
			: base(message, inner)
		{
			errno = 0;
		}

		protected UnixIOException(SerializationInfo info, StreamingContext context)
			: base(info, context)
		{
		}

		private static string GetMessage(Errno errno)
		{
			return $"{UnixMarshal.GetErrorDescription(errno)} [{errno}].";
		}
	}
	public class UnixListener : MarshalByRefObject, IDisposable
	{
		private bool disposed;

		private bool listening;

		private Socket server;

		private EndPoint savedEP;

		public EndPoint LocalEndpoint => savedEP;

		protected Socket Server => server;

		private void Init(UnixEndPoint ep)
		{
			listening = false;
			string filename = ep.Filename;
			if (File.Exists(filename))
			{
				Socket socket = new Socket(AddressFamily.Unix, SocketType.Stream, ProtocolType.IP);
				try
				{
					socket.Connect(ep);
					socket.Close();
					throw new InvalidOperationException("There's already a server listening on " + filename);
				}
				catch (SocketException)
				{
				}
				File.Delete(filename);
			}
			server = new Socket(AddressFamily.Unix, SocketType.Stream, ProtocolType.IP);
			server.Bind(ep);
			savedEP = server.LocalEndPoint;
		}

		public UnixListener(string path)
		{
			if (!Directory.Exists(Path.GetDirectoryName(path)))
			{
				Directory.CreateDirectory(Path.GetDirectoryName(path));
			}
			Init(new UnixEndPoint(path));
		}

		public UnixListener(UnixEndPoint localEndPoint)
		{
			if (localEndPoint == null)
			{
				throw new ArgumentNullException("localendPoint");
			}
			Init(localEndPoint);
		}

		public Socket AcceptSocket()
		{
			CheckDisposed();
			if (!listening)
			{
				throw new InvalidOperationException("Socket is not listening");
			}
			return server.Accept();
		}

		public UnixClient AcceptUnixClient()
		{
			CheckDisposed();
			if (!listening)
			{
				throw new InvalidOperationException("Socket is not listening");
			}
			return new UnixClient(AcceptSocket());
		}

		~UnixListener()
		{
			Dispose(disposing: false);
		}

		public bool Pending()
		{
			CheckDisposed();
			if (!listening)
			{
				throw new InvalidOperationException("Socket is not listening");
			}
			return server.Poll(1000, SelectMode.SelectRead);
		}

		public void Start()
		{
			Start(5);
		}

		public void Start(int backlog)
		{
			CheckDisposed();
			if (!listening)
			{
				server.Listen(backlog);
				listening = true;
			}
		}

		public void Stop()
		{
			CheckDisposed();
			Dispose(disposing: true);
		}

		public void Dispose()
		{
			Dispose(disposing: true);
			GC.SuppressFinalize(this);
		}

		protected void Dispose(bool disposing)
		{
			if (disposed)
			{
				return;
			}
			if (disposing)
			{
				try
				{
					File.Delete(((UnixEndPoint)savedEP).Filename);
				}
				catch
				{
				}
				if (server != null)
				{
					server.Close();
				}
				server = null;
			}
			disposed = true;
		}

		private void CheckDisposed()
		{
			if (disposed)
			{
				throw new ObjectDisposedException(GetType().FullName);
			}
		}
	}
	internal class ErrorMarshal
	{
		internal delegate string ErrorTranslator(Errno errno);

		internal static readonly ErrorTranslator Translate;

		static ErrorMarshal()
		{
			try
			{
				Translate = strerror_r;
				Translate(Errno.ERANGE);
			}
			catch (EntryPointNotFoundException)
			{
				Translate = strerror;
			}
		}

		private static string strerror(Errno errno)
		{
			return Stdlib.strerror(errno);
		}

		private static string strerror_r(Errno errno)
		{
			StringBuilder stringBuilder = new StringBuilder(16);
			int num = 0;
			do
			{
				stringBuilder.Capacity *= 2;
				num = Syscall.strerror_r(errno, stringBuilder);
			}
			while (num == -1 && Stdlib.GetLastError() == Errno.ERANGE);
			if (num == -1)
			{
				return "** Unknown error code: " + (int)errno + "**";
			}
			return stringBuilder.ToString();
		}
	}
	public sealed class UnixMarshal
	{
		private UnixMarshal()
		{
		}

		[CLSCompliant(false)]
		public static string GetErrorDescription(Errno errno)
		{
			return ErrorMarshal.Translate(errno);
		}

		public static IntPtr AllocHeap(long size)
		{
			if (size < 0)
			{
				throw new ArgumentOutOfRangeException("size", "< 0");
			}
			return Stdlib.malloc((ulong)size);
		}

		public static IntPtr ReAllocHeap(IntPtr ptr, long size)
		{
			if (size < 0)
			{
				throw new ArgumentOutOfRangeException("size", "< 0");
			}
			return Stdlib.realloc(ptr, (ulong)size);
		}

		public static void FreeHeap(IntPtr ptr)
		{
			Stdlib.free(ptr);
		}

		public unsafe static string PtrToStringUnix(IntPtr p)
		{
			if (p == IntPtr.Zero)
			{
				return null;
			}
			int length = checked((int)Stdlib.strlen(p));
			return new string((sbyte*)(void*)p, 0, length, UnixEncoding.Instance);
		}

		public static string PtrToString(IntPtr p)
		{
			if (p == IntPtr.Zero)
			{
				return null;
			}
			return PtrToString(p, UnixEncoding.Instance);
		}

		public unsafe static string PtrToString(IntPtr p, Encoding encoding)
		{
			if (p == IntPtr.Zero)
			{
				return null;
			}
			if (encoding == null)
			{
				throw new ArgumentNullException("encoding");
			}
			int stringByteLength = GetStringByteLength(p, encoding);
			string text = new string((sbyte*)(void*)p, 0, stringByteLength, encoding);
			stringByteLength = text.Length;
			while (stringByteLength > 0 && text[stringByteLength - 1] == '\0')
			{
				stringByteLength--;
			}
			if (stringByteLength == text.Length)
			{
				return text;
			}
			return text.Substring(0, stringByteLength);
		}

		private static int GetStringByteLength(IntPtr p, Encoding encoding)
		{
			Type type = encoding.GetType();
			int num = -1;
			num = ((typeof(UTF8Encoding).IsAssignableFrom(type) || typeof(UTF7Encoding).IsAssignableFrom(type) || typeof(UnixEncoding).IsAssignableFrom(type) || typeof(ASCIIEncoding).IsAssignableFrom(type)) ? checked((int)Stdlib.strlen(p)) : (typeof(UnicodeEncoding).IsAssignableFrom(type) ? GetInt16BufferLength(p) : ((!typeof(UTF32Encoding).IsAssignableFrom(type)) ? GetRandomBufferLength(p, encoding.GetMaxByteCount(1)) : GetInt32BufferLength(p))));
			if (num == -1)
			{
				throw new NotSupportedException("Unable to determine native string buffer length");
			}
			return num;
		}

		private static int GetInt16BufferLength(IntPtr p)
		{
			int i;
			for (i = 0; Marshal.ReadInt16(p, i * 2) != 0; i = checked(i + 1))
			{
			}
			return checked(i * 2);
		}

		private static int GetInt32BufferLength(IntPtr p)
		{
			int i;
			for (i = 0; Marshal.ReadInt32(p, i * 4) != 0; i = checked(i + 1))
			{
			}
			return checked(i * 4);
		}

		private static int GetRandomBufferLength(IntPtr p, int nullLength)
		{
			switch (nullLength)
			{
			case 1:
				return checked((int)Stdlib.strlen(p));
			case 2:
				return GetInt16BufferLength(p);
			case 4:
				return GetInt32BufferLength(p);
			default:
			{
				int result = 0;
				int num = 0;
				do
				{
					num = ((Marshal.ReadByte(p, result++) == 0) ? (num + 1) : 0);
				}
				while (num != nullLength);
				return result;
			}
			}
		}

		public static string[] PtrToStringArray(IntPtr stringArray)
		{
			return PtrToStringArray(stringArray, UnixEncoding.Instance);
		}

		public static string[] PtrToStringArray(IntPtr stringArray, Encoding encoding)
		{
			if (stringArray == IntPtr.Zero)
			{
				return new string[0];
			}
			return PtrToStringArray(CountStrings(stringArray), stringArray, encoding);
		}

		private static int CountStrings(IntPtr stringArray)
		{
			int i;
			for (i = 0; Marshal.ReadIntPtr(stringArray, i * IntPtr.Size) != IntPtr.Zero; i++)
			{
			}
			return i;
		}

		public static string[] PtrToStringArray(int count, IntPtr stringArray)
		{
			return PtrToStringArray(count, stringArray, UnixEncoding.Instance);
		}

		public static string[] PtrToStringArray(int count, IntPtr stringArray, Encoding encoding)
		{
			if (count < 0)
			{
				throw new ArgumentOutOfRangeException("count", "< 0");
			}
			if (encoding == null)
			{
				throw new ArgumentNullException("encoding");
			}
			if (stringArray == IntPtr.Zero)
			{
				return new string[count];
			}
			string[] array = new string[count];
			for (int i = 0; i < count; i++)
			{
				IntPtr p = Marshal.ReadIntPtr(stringArray, i * IntPtr.Size);
				array[i] = PtrToString(p, encoding);
			}
			return array;
		}

		public static IntPtr StringToHeap(string s)
		{
			return StringToHeap(s, UnixEncoding.Instance);
		}

		public static IntPtr StringToHeap(string s, Encoding encoding)
		{
			if (s == null)
			{
				return IntPtr.Zero;
			}
			return StringToHeap(s, 0, s.Length, encoding);
		}

		public static IntPtr StringToHeap(string s, int index, int count)
		{
			return StringToHeap(s, index, count, UnixEncoding.Instance);
		}

		public unsafe static IntPtr StringToHeap(string s, int index, int count, Encoding encoding)
		{
			if (s == null)
			{
				return IntPtr.Zero;
			}
			if (encoding == null)
			{
				throw new ArgumentNullException("encoding");
			}
			if (index < 0 || count < 0)
			{
				throw new ArgumentOutOfRangeException((index < 0) ? "index" : "count", "Non - negative number required.");
			}
			if (s.Length - index < count)
			{
				throw new ArgumentOutOfRangeException("s", "Index and count must refer to a location within the string.");
			}
			int maxByteCount = encoding.GetMaxByteCount(1);
			int byteCount = encoding.GetByteCount(s);
			int num = checked(byteCount + maxByteCount);
			IntPtr intPtr = AllocHeap(num);
			if (intPtr == IntPtr.Zero)
			{
				throw new UnixIOException(Errno.ENOMEM);
			}
			fixed (char* ptr2 = s)
			{
				byte* ptr = (byte*)(void*)intPtr;
				int bytes;
				try
				{
					bytes = encoding.GetBytes(ptr2 + index, count, ptr, num);
				}
				catch
				{
					FreeHeap(intPtr);
					throw;
				}
				if (bytes != byteCount)
				{
					FreeHeap(intPtr);
					throw new NotSupportedException("encoding.GetBytes() doesn't equal encoding.GetByteCount()!");
				}
				ptr += byteCount;
				for (int i = 0; i < maxByteCount; i++)
				{
					ptr[i] = 0;
				}
			}
			return intPtr;
		}

		public static bool ShouldRetrySyscall(int r)
		{
			if (r == -1 && Stdlib.GetLastError() == Errno.EINTR)
			{
				return true;
			}
			return false;
		}

		[CLSCompliant(false)]
		public static bool ShouldRetrySyscall(int r, out Errno errno)
		{
			errno = (Errno)0;
			if (r == -1 && (errno = Stdlib.GetLastError()) == Errno.EINTR)
			{
				return true;
			}
			return false;
		}

		internal static string EscapeFormatString(string message, char[] permitted)
		{
			if (message == null)
			{
				return "";
			}
			StringBuilder stringBuilder = new StringBuilder(message.Length);
			for (int i = 0; i < message.Length; i++)
			{
				char c = message[i];
				stringBuilder.Append(c);
				if (c == '%' && i + 1 < message.Length)
				{
					char c2 = message[i + 1];
					if (c2 == '%' || IsCharPresent(permitted, c2))
					{
						stringBuilder.Append(c2);
					}
					else
					{
						stringBuilder.Append('%').Append(c2);
					}
					i++;
				}
				else if (c == '%')
				{
					stringBuilder.Append('%');
				}
			}
			return stringBuilder.ToString();
		}

		private static bool IsCharPresent(char[] array, char c)
		{
			if (array == null)
			{
				return false;
			}
			for (int i = 0; i < array.Length; i++)
			{
				if (array[i] == c)
				{
					return true;
				}
			}
			return false;
		}

		internal static Exception CreateExceptionForError(Errno errno)
		{
			string errorDescription = GetErrorDescription(errno);
			UnixIOException ex = new UnixIOException(errno);
			switch (errno)
			{
			case Errno.EBADF:
			case Errno.EINVAL:
				return new ArgumentException(errorDescription, ex);
			case Errno.ERANGE:
				return new ArgumentOutOfRangeException(errorDescription);
			case Errno.ENOTDIR:
				return new DirectoryNotFoundException(errorDescription, ex);
			case Errno.ENOENT:
				return new FileNotFoundException(errorDescription, ex);
			case Errno.EPERM:
			case Errno.EOPNOTSUPP:
				return new InvalidOperationException(errorDescription, ex);
			case Errno.ENOEXEC:
				return new InvalidProgramException(errorDescription, ex);
			case Errno.EIO:
			case Errno.ENXIO:
			case Errno.ENOSPC:
			case Errno.ESPIPE:
			case Errno.EROFS:
			case Errno.ENOTEMPTY:
				return new IOException(errorDescription, ex);
			case Errno.EFAULT:
				return new NullReferenceException(errorDescription, ex);
			case Errno.EOVERFLOW:
				return new OverflowException(errorDescription, ex);
			case Errno.ENAMETOOLONG:
				return new PathTooLongException(errorDescription, ex);
			case Errno.EACCES:
			case Errno.EISDIR:
				return new UnauthorizedAccessException(errorDescription, ex);
			default:
				return ex;
			}
		}

		internal static Exception CreateExceptionForLastError()
		{
			return CreateExceptionForError(Stdlib.GetLastError());
		}

		[CLSCompliant(false)]
		public static void ThrowExceptionForError(Errno errno)
		{
			throw CreateExceptionForError(errno);
		}

		public static void ThrowExceptionForLastError()
		{
			throw CreateExceptionForLastError();
		}

		[CLSCompliant(false)]
		public static void ThrowExceptionForErrorIf(int retval, Errno errno)
		{
			if (retval == -1)
			{
				ThrowExceptionForError(errno);
			}
		}

		public static void ThrowExceptionForLastErrorIf(int retval)
		{
			if (retval == -1)
			{
				ThrowExceptionForLastError();
			}
		}
	}
	public sealed class UnixPath
	{
		public static readonly char DirectorySeparatorChar = '/';

		public static readonly char AltDirectorySeparatorChar = '/';

		public static readonly char PathSeparator = ':';

		public static readonly char VolumeSeparatorChar = '/';

		private static readonly char[] _InvalidPathChars = new char[0];

		private UnixPath()
		{
		}

		public static char[] GetInvalidPathChars()
		{
			return (char[])_InvalidPathChars.Clone();
		}

		public static string Combine(string path1, params string[] paths)
		{
			if (path1 == null)
			{
				throw new ArgumentNullException("path1");
			}
			if (paths == null)
			{
				throw new ArgumentNullException("paths");
			}
			if (path1.IndexOfAny(_InvalidPathChars) != -1)
			{
				throw new ArgumentException("Illegal characters in path", "path1");
			}
			int num = path1.Length;
			int num2 = -1;
			for (int i = 0; i < paths.Length; i++)
			{
				if (paths[i] == null)
				{
					throw new ArgumentNullException("paths[" + i + "]");
				}
				if (paths[i].IndexOfAny(_InvalidPathChars) != -1)
				{
					throw new ArgumentException("Illegal characters in path", "paths[" + i + "]");
				}
				if (IsPathRooted(paths[i]))
				{
					num = 0;
					num2 = i;
				}
				num += paths[i].Length + 1;
			}
			StringBuilder stringBuilder = new StringBuilder(num);
			if (num2 == -1)
			{
				stringBuilder.Append(path1);
				num2 = 0;
			}
			for (int j = num2; j < paths.Length; j++)
			{
				Combine(stringBuilder, paths[j]);
			}
			return stringBuilder.ToString();
		}

		private static void Combine(StringBuilder path, string part)
		{
			if (path.Length > 0 && part.Length > 0)
			{
				char c = path[path.Length - 1];
				if (c != DirectorySeparatorChar && c != AltDirectorySeparatorChar && c != VolumeSeparatorChar)
				{
					path.Append(DirectorySeparatorChar);
				}
			}
			path.Append(part);
		}

		public static string GetDirectoryName(string path)
		{
			CheckPath(path);
			int num = path.LastIndexOf(DirectorySeparatorChar);
			if (num > 0)
			{
				return path.Substring(0, num);
			}
			if (num == 0)
			{
				return "/";
			}
			return "";
		}

		public static string GetFileName(string path)
		{
			if (path == null || path.Length == 0)
			{
				return path;
			}
			int num = path.LastIndexOf(DirectorySeparatorChar);
			if (num >= 0)
			{
				return path.Substring(num + 1);
			}
			return path;
		}

		public static string GetFullPath(string path)
		{
			path = _GetFullPath(path);
			return GetCanonicalPath(path);
		}

		private static string _GetFullPath(string path)
		{
			if (path == null)
			{
				throw new ArgumentNullException("path");
			}
			if (!IsPathRooted(path))
			{
				string currentDirectory = UnixDirectoryInfo.GetCurrentDirectory();
				char directorySeparatorChar = DirectorySeparatorChar;
				path = currentDirectory + directorySeparatorChar + path;
			}
			return path;
		}

		public static string GetCanonicalPath(string path)
		{
			GetPathComponents(path, out var components, out var lastIndex);
			string text = string.Join("/", components, 0, lastIndex);
			if (!IsPathRooted(path))
			{
				return text;
			}
			return "/" + text;
		}

		private static void GetPathComponents(string path, out string[] components, out int lastIndex)
		{
			string[] array = path.Split(new char[1] { DirectorySeparatorChar });
			int num = 0;
			for (int i = 0; i < array.Length; i++)
			{
				if (!(array[i] == ".") && !(array[i] == string.Empty))
				{
					if (array[i] == "..")
					{
						num = ((num == 0) ? (num + 1) : (num - 1));
					}
					else
					{
						array[num++] = array[i];
					}
				}
			}
			components = array;
			lastIndex = num;
		}

		public static string GetPathRoot(string path)
		{
			if (path == null)
			{
				return null;
			}
			if (!IsPathRooted(path))
			{
				return "";
			}
			return "/";
		}

		public static string GetCompleteRealPath(string path)
		{
			if (path == null)
			{
				throw new ArgumentNullException("path");
			}
			GetPathComponents(path, out var components, out var lastIndex);
			StringBuilder stringBuilder = new StringBuilder();
			if (components.Length != 0)
			{
				string text = (IsPathRooted(path) ? "/" : "");
				text += components[0];
				stringBuilder.Append(GetRealPath(text));
			}
			for (int i = 1; i < lastIndex; i++)
			{
				stringBuilder.Append("/").Append(components[i]);
				string realPath = GetRealPath(stringBuilder.ToString());
				stringBuilder.Remove(0, stringBuilder.Length);
				stringBuilder.Append(realPath);
			}
			return stringBuilder.ToString();
		}

		public static string GetRealPath(string path)
		{
			while (true)
			{
				string text = ReadSymbolicLink(path);
				if (text == null)
				{
					break;
				}
				if (IsPathRooted(text))
				{
					path = text;
					continue;
				}
				string directoryName = GetDirectoryName(path);
				char directorySeparatorChar = DirectorySeparatorChar;
				path = directoryName + directorySeparatorChar + text;
				path = GetCanonicalPath(path);
			}
			return path;
		}

		internal static string ReadSymbolicLink(string path)
		{
			string text = TryReadLink(path);
			if (text == null)
			{
				Errno lastError = Stdlib.GetLastError();
				if (lastError != Errno.EINVAL)
				{
					UnixMarshal.ThrowExceptionForError(lastError);
				}
			}
			return text;
		}

		public static string TryReadLink(string path)
		{
			byte[] array = new byte[256];
			checked
			{
				long num;
				while (true)
				{
					num = Syscall.readlink(path, array);
					if (num < 0)
					{
						return null;
					}
					if (num != array.Length)
					{
						break;
					}
					array = new byte[array.LongLength * 2];
				}
				return UnixEncoding.Instance.GetString(array, 0, (int)num);
			}
		}

		public static string TryReadLinkAt(int dirfd, string path)
		{
			byte[] array = new byte[256];
			checked
			{
				long num;
				while (true)
				{
					num = Syscall.readlinkat(dirfd, path, array);
					if (num < 0)
					{
						return null;
					}
					if (num != array.Length)
					{
						break;
					}
					array = new byte[array.LongLength * 2];
				}
				return UnixEncoding.Instance.GetString(array, 0, (int)num);
			}
		}

		public static string ReadLink(string path)
		{
			string text = TryReadLink(path);
			if (text == null)
			{
				UnixMarshal.ThrowExceptionForLastError();
			}
			return text;
		}

		public static string ReadLinkAt(int dirfd, string path)
		{
			string text = TryReadLinkAt(dirfd, path);
			if (text == null)
			{
				UnixMarshal.ThrowExceptionForLastError();
			}
			return text;
		}

		public static bool IsPathRooted(string path)
		{
			if (path == null || path.Length == 0)
			{
				return false;
			}
			return path[0] == DirectorySeparatorChar;
		}

		internal static void CheckPath(string path)
		{
			if (path == null)
			{
				throw new ArgumentNullException();
			}
			if (path.Length == 0)
			{
				throw new ArgumentException("Path cannot contain a zero-length string", "path");
			}
			if (path.IndexOfAny(_InvalidPathChars) != -1)
			{
				throw new ArgumentException("Invalid characters in path.", "path");
			}
		}
	}
	public struct UnixPipes : IEquatable<UnixPipes>
	{
		public UnixStream Reading;

		public UnixStream Writing;

		public UnixPipes(UnixStream reading, UnixStream writing)
		{
			Reading = reading;
			Writing = writing;
		}

		public static UnixPipes CreatePipes()
		{
			UnixMarshal.ThrowExceptionForLastErrorIf(Syscall.pipe(out var reading, out var writing));
			return new UnixPipes(new UnixStream(reading), new UnixStream(writing));
		}

		public override bool Equals(object value)
		{
			if (value == null || value.GetType() != GetType())
			{
				return false;
			}
			UnixPipes unixPipes = (UnixPipes)value;
			if (Reading.Handle == unixPipes.Reading.Handle)
			{
				return Writing.Handle == unixPipes.Writing.Handle;
			}
			return false;
		}

		public bool Equals(UnixPipes value)
		{
			if (Reading.Handle == value.Reading.Handle)
			{
				return Writing.Handle == value.Writing.Handle;
			}
			return false;
		}

		public override int GetHashCode()
		{
			return Reading.Handle.GetHashCode() ^ Writing.Handle.GetHashCode();
		}

		public static bool operator ==(UnixPipes lhs, UnixPipes rhs)
		{
			return lhs.Equals(rhs);
		}

		public static bool operator !=(UnixPipes lhs, UnixPipes rhs)
		{
			return !lhs.Equals(rhs);
		}
	}
	public sealed class UnixProcess
	{
		private int pid;

		public int Id => pid;

		public bool HasExited => Syscall.WIFEXITED(GetProcessStatus());

		public int ExitCode
		{
			get
			{
				if (!HasExited)
				{
					throw new InvalidOperationException(Locale.GetText("Process hasn't exited"));
				}
				return Syscall.WEXITSTATUS(GetProcessStatus());
			}
		}

		public bool HasSignaled => Syscall.WIFSIGNALED(GetProcessStatus());

		public Signum TerminationSignal
		{
			get
			{
				if (!HasSignaled)
				{
					throw new InvalidOperationException(Locale.GetText("Process wasn't terminated by a signal"));
				}
				return Syscall.WTERMSIG(GetProcessStatus());
			}
		}

		public bool HasStopped => Syscall.WIFSTOPPED(GetProcessStatus());

		public Signum StopSignal
		{
			get
			{
				if (!HasStopped)
				{
					throw new InvalidOperationException(Locale.GetText("Process isn't stopped"));
				}
				return Syscall.WSTOPSIG(GetProcessStatus());
			}
		}

		public int ProcessGroupId
		{
			get
			{
				return Syscall.getpgid(pid);
			}
			set
			{
				UnixMarshal.ThrowExceptionForLastErrorIf(Syscall.setpgid(pid, value));
			}
		}

		public int SessionId
		{
			get
			{
				int num = Syscall.getsid(pid);
				UnixMarshal.ThrowExceptionForLastErrorIf(num);
				return num;
			}
		}

		internal UnixProcess(int pid)
		{
			this.pid = pid;
		}

		private int GetProcessStatus()
		{
			int status;
			int num = Syscall.waitpid(pid, out status, WaitOptions.WNOHANG | WaitOptions.WUNTRACED);
			UnixMarshal.ThrowExceptionForLastErrorIf(num);
			return num;
		}

		public static UnixProcess GetCurrentProcess()
		{
			return new UnixProcess(GetCurrentProcessId());
		}

		public static int GetCurrentProcessId()
		{
			return Syscall.getpid();
		}

		public void Kill()
		{
			Signal(Signum.SIGKILL);
		}

		[CLSCompliant(false)]
		public void Signal(Signum signal)
		{
			UnixMarshal.ThrowExceptionForLastErrorIf(Syscall.kill(pid, signal));
		}

		public void WaitForExit()
		{
			int num;
			do
			{
				num = Syscall.waitpid(pid, out var _, (WaitOptions)0);
			}
			while (UnixMarshal.ShouldRetrySyscall(num));
			UnixMarshal.ThrowExceptionForLastErrorIf(num);
		}
	}
	public class UnixSignal : WaitHandle
	{
		[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
		private delegate int Mono_Posix_RuntimeIsShuttingDown();

		[Map]
		private struct SignalInfo
		{
			public int signum;

			public int count;

			public int read_fd;

			public int write_fd;

			public int pipecnt;

			public int pipelock;

			public int have_handler;

			public IntPtr handler;
		}

		private int signum;

		private IntPtr signal_info;

		private static Mono_Posix_RuntimeIsShuttingDown ShuttingDown;

		public Signum Signum
		{
			get
			{
				if (IsRealTimeSignal)
				{
					throw new InvalidOperationException("This signal is a RealTimeSignum");
				}
				return NativeConvert.ToSignum(signum);
			}
		}

		public RealTimeSignum RealTimeSignum
		{
			get
			{
				if (!IsRealTimeSignal)
				{
					throw new InvalidOperationException("This signal is not a RealTimeSignum");
				}
				return NativeConvert.ToRealTimeSignum(signum - GetSIGRTMIN());
			}
		}

		public bool IsRealTimeSignal
		{
			get
			{
				AssertValid();
				int sIGRTMIN = GetSIGRTMIN();
				if (sIGRTMIN == -1)
				{
					return false;
				}
				return signum >= sIGRTMIN;
			}
		}

		private unsafe SignalInfo* Info
		{
			get
			{
				AssertValid();
				return (SignalInfo*)(void*)signal_info;
			}
		}

		public bool IsSet => Count > 0;

		public unsafe int Count
		{
			get
			{
				return Info->count;
			}
			set
			{
				Interlocked.Exchange(ref Info->count, value);
			}
		}

		static UnixSignal()
		{
			ShuttingDown = RuntimeShuttingDownCallback;
			Stdlib.VersionCheck();
		}

		public UnixSignal(Signum signum)
		{
			this.signum = NativeConvert.FromSignum(signum);
			signal_info = install(this.signum);
			if (signal_info == IntPtr.Zero)
			{
				throw new ArgumentException("Unable to handle signal", "signum");
			}
		}

		public UnixSignal(RealTimeSignum rtsig)
		{
			signum = NativeConvert.FromRealTimeSignum(rtsig);
			signal_info = install(signum);
			Errno lastError = Stdlib.GetLastError();
			if (signal_info == IntPtr.Zero)
			{
				if (lastError == Errno.EADDRINUSE)
				{
					throw new ArgumentException("Signal registered outside of Mono.Posix", "signum");
				}
				throw new ArgumentException("Unable to handle signal", "signum");
			}
		}

		[DllImport("MonoPosixHelper", CallingConvention = CallingConvention.Cdecl, EntryPoint = "Mono_Unix_UnixSignal_install", SetLastError = true)]
		private static extern IntPtr install(int signum);

		[DllImport("MonoPosixHelper", CallingConvention = CallingConvention.Cdecl, EntryPoint = "Mono_Unix_UnixSignal_uninstall")]
		private static extern int uninstall(IntPtr info);

		private static int RuntimeShuttingDownCallback()
		{
			if (!Environment.HasShutdownStarted)
			{
				return 0;
			}
			return 1;
		}

		[DllImport("MonoPosixHelper", CallingConvention = CallingConvention.Cdecl, EntryPoint = "Mono_Unix_UnixSignal_WaitAny")]
		private static extern int WaitAny(IntPtr[] infos, int count, int time

Room Architect Tool_Data/Managed/Mono.Security.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration.Assemblies;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Net;
using System.Net.Security;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Security;
using System.Security.Authentication;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Security.Permissions;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using Mono.Math;
using Mono.Math.Prime;
using Mono.Math.Prime.Generator;
using Mono.Net.Security;
using Mono.Security.Cryptography;
using Mono.Security.Interface;
using Mono.Security.Protocol.Tls;
using Mono.Security.Protocol.Tls.Handshake;
using Mono.Security.Protocol.Tls.Handshake.Client;
using Mono.Security.Protocol.Tls.Handshake.Server;
using Mono.Security.X509;
using Mono.Security.X509.Extensions;
using Mono.Xml;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyCompany("MONO development team")]
[assembly: AssemblyCopyright("(c) 2003-2004 Various Authors")]
[assembly: AssemblyDescription("Mono.Security.dll")]
[assembly: AssemblyProduct("MONO CLI")]
[assembly: AssemblyTitle("Mono.Security.dll")]
[assembly: CLSCompliant(true)]
[assembly: ComVisible(false)]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: AssemblyDelaySign(true)]
[assembly: InternalsVisibleTo("System, PublicKey=00000000000000000400000000000000")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("4.0.0.0")]
[module: UnverifiableCode]
internal static class AssemblyRef
{
	internal const string SystemConfiguration = "System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	internal const string System = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string EcmaPublicKey = "b77a5c561934e089";

	public const string FrameworkPublicKeyFull = "00000000000000000400000000000000";

	public const string FrameworkPublicKeyFull2 = "00000000000000000400000000000000";

	public const string MicrosoftPublicKey = "b03f5f7f11d50a3a";

	public const string MicrosoftJScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string MicrosoftVSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string SystemData = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string SystemDesign = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string SystemDrawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string SystemWeb = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string SystemWebExtensions = "System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string SystemWindowsForms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
internal static class Consts
{
	public const string MonoVersion = "5.11.0.0";

	public const string MonoCompany = "Mono development team";

	public const string MonoProduct = "Mono Common Language Infrastructure";

	public const string MonoCopyright = "(c) Various Mono authors";

	public const int MonoCorlibVersion = 1051100001;

	public const string FxVersion = "4.0.0.0";

	public const string FxFileVersion = "4.6.57.0";

	public const string EnvironmentVersion = "4.0.30319.42000";

	public const string VsVersion = "0.0.0.0";

	public const string VsFileVersion = "11.0.0.0";

	private const string PublicKeyToken = "b77a5c561934e089";

	public const string AssemblyI18N = "I18N, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMicrosoft_JScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMono_Http = "Mono.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Posix = "Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Security = "Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Messaging_RabbitMQ = "Mono.Messaging.RabbitMQ, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyCorlib = "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Data = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Design = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing_Design = "System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Messaging = "System.Messaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Security = "System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Web = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Core = "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string WindowsBase_3_0 = "WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
internal sealed class Locale
{
	private Locale()
	{
	}

	public static string GetText(string msg)
	{
		return msg;
	}

	public static string GetText(string fmt, params object[] args)
	{
		return string.Format(fmt, args);
	}
}
namespace Mono.Xml
{
	[CLSCompliant(false)]
	public class MiniParser
	{
		public interface IReader
		{
			int Read();
		}

		public interface IAttrList
		{
			int Length { get; }

			bool IsEmpty { get; }

			string[] Names { get; }

			string[] Values { get; }

			string GetName(int i);

			string GetValue(int i);

			string GetValue(string name);

			void ChangeValue(string name, string newValue);
		}

		public interface IMutableAttrList : IAttrList
		{
			void Clear();

			void Add(string name, string value);

			void CopyFrom(IAttrList attrs);

			void Remove(int i);

			void Remove(string name);
		}

		public interface IHandler
		{
			void OnStartParsing(MiniParser parser);

			void OnStartElement(string name, IAttrList attrs);

			void OnEndElement(string name);

			void OnChars(string ch);

			void OnEndParsing(MiniParser parser);
		}

		public class HandlerAdapter : IHandler
		{
			public void OnStartParsing(MiniParser parser)
			{
			}

			public void OnStartElement(string name, IAttrList attrs)
			{
			}

			public void OnEndElement(string name)
			{
			}

			public void OnChars(string ch)
			{
			}

			public void OnEndParsing(MiniParser parser)
			{
			}
		}

		private enum CharKind : byte
		{
			LEFT_BR = 0,
			RIGHT_BR = 1,
			SLASH = 2,
			PI_MARK = 3,
			EQ = 4,
			AMP = 5,
			SQUOTE = 6,
			DQUOTE = 7,
			BANG = 8,
			LEFT_SQBR = 9,
			SPACE = 10,
			RIGHT_SQBR = 11,
			TAB = 12,
			CR = 13,
			EOL = 14,
			CHARS = 15,
			UNKNOWN = 31
		}

		private enum ActionCode : byte
		{
			START_ELEM = 0,
			END_ELEM = 1,
			END_NAME = 2,
			SET_ATTR_NAME = 3,
			SET_ATTR_VAL = 4,
			SEND_CHARS = 5,
			START_CDATA = 6,
			END_CDATA = 7,
			ERROR = 8,
			STATE_CHANGE = 9,
			FLUSH_CHARS_STATE_CHANGE = 10,
			ACC_CHARS_STATE_CHANGE = 11,
			ACC_CDATA = 12,
			PROC_CHAR_REF = 13,
			UNKNOWN = 15
		}

		public class AttrListImpl : IMutableAttrList, IAttrList
		{
			protected ArrayList names;

			protected ArrayList values;

			public int Length => names.Count;

			public bool IsEmpty => Length != 0;

			public string[] Names => names.ToArray(typeof(string)) as string[];

			public string[] Values => values.ToArray(typeof(string)) as string[];

			public AttrListImpl()
				: this(0)
			{
			}

			public AttrListImpl(int initialCapacity)
			{
				if (initialCapacity <= 0)
				{
					names = new ArrayList();
					values = new ArrayList();
				}
				else
				{
					names = new ArrayList(initialCapacity);
					values = new ArrayList(initialCapacity);
				}
			}

			public AttrListImpl(IAttrList attrs)
				: this(attrs?.Length ?? 0)
			{
				if (attrs != null)
				{
					CopyFrom(attrs);
				}
			}

			public string GetName(int i)
			{
				string result = null;
				if (i >= 0 && i < Length)
				{
					result = names[i] as string;
				}
				return result;
			}

			public string GetValue(int i)
			{
				string result = null;
				if (i >= 0 && i < Length)
				{
					result = values[i] as string;
				}
				return result;
			}

			public string GetValue(string name)
			{
				return GetValue(names.IndexOf(name));
			}

			public void ChangeValue(string name, string newValue)
			{
				int num = names.IndexOf(name);
				if (num >= 0 && num < Length)
				{
					values[num] = newValue;
				}
			}

			public void Clear()
			{
				names.Clear();
				values.Clear();
			}

			public void Add(string name, string value)
			{
				names.Add(name);
				values.Add(value);
			}

			public void Remove(int i)
			{
				if (i >= 0)
				{
					names.RemoveAt(i);
					values.RemoveAt(i);
				}
			}

			public void Remove(string name)
			{
				Remove(names.IndexOf(name));
			}

			public void CopyFrom(IAttrList attrs)
			{
				if (attrs != null && this == attrs)
				{
					Clear();
					int length = attrs.Length;
					for (int i = 0; i < length; i++)
					{
						Add(attrs.GetName(i), attrs.GetValue(i));
					}
				}
			}
		}

		public class XMLError : Exception
		{
			protected string descr;

			protected int line;

			protected int column;

			public int Line => line;

			public int Column => column;

			public XMLError()
				: this("Unknown")
			{
			}

			public XMLError(string descr)
				: this(descr, -1, -1)
			{
			}

			public XMLError(string descr, int line, int column)
				: base(descr)
			{
				this.descr = descr;
				this.line = line;
				this.column = column;
			}

			public override string ToString()
			{
				return $"{descr} @ (line = {line}, col = {column})";
			}
		}

		private static readonly int INPUT_RANGE = 13;

		private static readonly ushort[] tbl = new ushort[262]
		{
			2305, 43264, 63616, 10368, 6272, 14464, 18560, 22656, 26752, 34944,
			39040, 47232, 30848, 2177, 10498, 6277, 14595, 18561, 22657, 26753,
			35088, 39041, 43137, 47233, 30849, 64004, 4352, 43266, 64258, 2177,
			10369, 14465, 18561, 22657, 26753, 34945, 39041, 47233, 30849, 14597,
			2307, 10499, 6403, 18691, 22787, 26883, 35075, 39171, 43267, 47363,
			30979, 63747, 64260, 8710, 4615, 41480, 2177, 14465, 18561, 22657,
			26753, 34945, 39041, 47233, 30849, 6400, 2307, 10499, 14595, 18691,
			22787, 26883, 35075, 39171, 43267, 47363, 30979, 63747, 6400, 2177,
			10369, 14465, 18561, 22657, 26753, 34945, 39041, 43137, 47233, 30849,
			63617, 2561, 23818, 11274, 7178, 15370, 19466, 27658, 35850, 39946,
			43783, 48138, 31754, 64522, 64265, 8198, 4103, 43272, 2177, 14465,
			18561, 22657, 26753, 34945, 39041, 47233, 30849, 64265, 17163, 43276,
			2178, 10370, 6274, 14466, 22658, 26754, 34946, 39042, 47234, 30850,
			2317, 23818, 11274, 7178, 15370, 19466, 27658, 35850, 39946, 44042,
			48138, 31754, 64522, 26894, 30991, 43275, 2180, 10372, 6276, 14468,
			18564, 22660, 34948, 39044, 47236, 63620, 17163, 43276, 2178, 10370,
			6274, 14466, 22658, 26754, 34946, 39042, 47234, 30850, 63618, 9474,
			35088, 2182, 6278, 14470, 18566, 22662, 26758, 39046, 43142, 47238,
			30854, 63622, 25617, 23822, 2830, 11022, 6926, 15118, 19214, 35598,
			39694, 43790, 47886, 31502, 64270, 29713, 23823, 2831, 11023, 6927,
			15119, 19215, 27407, 35599, 39695, 43791, 47887, 64271, 38418, 6400,
			1555, 9747, 13843, 17939, 22035, 26131, 34323, 42515, 46611, 30227,
			62995, 8198, 4103, 43281, 64265, 2177, 14465, 18561, 22657, 26753,
			34945, 39041, 47233, 30849, 46858, 3090, 11282, 7186, 15378, 19474,
			23570, 27666, 35858, 39954, 44050, 31762, 64530, 3091, 11283, 7187,
			15379, 19475, 23571, 27667, 35859, 39955, 44051, 48147, 31763, 64531,
			65535, 65535
		};

		protected static string[] errors = new string[8] { "Expected element", "Invalid character in tag", "No '='", "Invalid character entity", "Invalid attr value", "Empty tag", "No end tag", "Bad entity ref" };

		protected int line;

		protected int col;

		protected int[] twoCharBuff;

		protected bool splitCData;

		public MiniParser()
		{
			twoCharBuff = new int[2];
			splitCData = false;
			Reset();
		}

		public void Reset()
		{
			line = 0;
			col = 0;
		}

		protected static bool StrEquals(string str, StringBuilder sb, int sbStart, int len)
		{
			if (len != str.Length)
			{
				return false;
			}
			for (int i = 0; i < len; i++)
			{
				if (str[i] != sb[sbStart + i])
				{
					return false;
				}
			}
			return true;
		}

		protected void FatalErr(string descr)
		{
			throw new XMLError(descr, line, col);
		}

		protected static int Xlat(int charCode, int state)
		{
			int num = state * INPUT_RANGE;
			int num2 = System.Math.Min(tbl.Length - num, INPUT_RANGE);
			while (--num2 >= 0)
			{
				ushort num3 = tbl[num];
				if (charCode == num3 >> 12)
				{
					return num3 & 0xFFF;
				}
				num++;
			}
			return 4095;
		}

		public void Parse(IReader reader, IHandler handler)
		{
			if (reader == null)
			{
				throw new ArgumentNullException("reader");
			}
			if (handler == null)
			{
				handler = new HandlerAdapter();
			}
			AttrListImpl attrListImpl = new AttrListImpl();
			string text = null;
			Stack stack = new Stack();
			string text2 = null;
			line = 1;
			col = 0;
			int num = 0;
			int num2 = 0;
			StringBuilder stringBuilder = new StringBuilder();
			bool flag = false;
			bool flag2 = false;
			bool flag3 = false;
			int num3 = 0;
			handler.OnStartParsing(this);
			while (true)
			{
				col++;
				num = reader.Read();
				if (num == -1)
				{
					break;
				}
				int num4 = "<>/?=&'\"![ ]\t\r\n".IndexOf((char)num) & 0xF;
				switch (num4)
				{
				case 13:
					continue;
				case 12:
					num4 = 10;
					break;
				}
				if (num4 == 14)
				{
					col = 0;
					line++;
					num4 = 10;
				}
				int num5 = Xlat(num4, num2);
				num2 = num5 & 0xFF;
				if (num == 10 && (num2 == 14 || num2 == 15))
				{
					continue;
				}
				num5 >>= 8;
				if (num2 >= 128)
				{
					if (num2 == 255)
					{
						FatalErr("State dispatch error.");
					}
					else
					{
						FatalErr(errors[num2 ^ 0x80]);
					}
				}
				switch (num5)
				{
				case 9:
					break;
				case 0:
					handler.OnStartElement(text2, attrListImpl);
					if (num != 47)
					{
						stack.Push(text2);
					}
					else
					{
						handler.OnEndElement(text2);
					}
					attrListImpl.Clear();
					break;
				case 1:
				{
					text2 = stringBuilder.ToString();
					stringBuilder = new StringBuilder();
					string text6 = null;
					if (stack.Count == 0 || text2 != (text6 = stack.Pop() as string))
					{
						if (text6 == null)
						{
							FatalErr("Tag stack underflow");
						}
						else
						{
							FatalErr($"Expected end tag '{text2}' but found '{text6}'");
						}
					}
					handler.OnEndElement(text2);
					break;
				}
				case 2:
					text2 = stringBuilder.ToString();
					stringBuilder = new StringBuilder();
					if (num != 47 && num != 62)
					{
						break;
					}
					goto case 0;
				case 3:
					text = stringBuilder.ToString();
					stringBuilder = new StringBuilder();
					break;
				case 4:
					if (text == null)
					{
						FatalErr("Internal error.");
					}
					attrListImpl.Add(text, stringBuilder.ToString());
					stringBuilder = new StringBuilder();
					text = null;
					break;
				case 5:
					handler.OnChars(stringBuilder.ToString());
					stringBuilder = new StringBuilder();
					break;
				case 6:
				{
					string text5 = "CDATA[";
					flag2 = false;
					flag3 = false;
					switch (num)
					{
					case 45:
						num = reader.Read();
						if (num != 45)
						{
							FatalErr("Invalid comment");
						}
						col++;
						flag2 = true;
						twoCharBuff[0] = -1;
						twoCharBuff[1] = -1;
						break;
					default:
						flag3 = true;
						num3 = 0;
						break;
					case 91:
					{
						for (int i = 0; i < text5.Length; i++)
						{
							if (reader.Read() != text5[i])
							{
								col += i + 1;
								break;
							}
						}
						col += text5.Length;
						flag = true;
						break;
					}
					}
					break;
				}
				case 7:
				{
					int num20 = 0;
					num = 93;
					while (true)
					{
						switch (num)
						{
						case 93:
							goto IL_033d;
						default:
						{
							for (int k = 0; k < num20; k++)
							{
								stringBuilder.Append(']');
							}
							stringBuilder.Append((char)num);
							num2 = 18;
							break;
						}
						case 62:
						{
							for (int j = 0; j < num20 - 2; j++)
							{
								stringBuilder.Append(']');
							}
							flag = false;
							break;
						}
						}
						break;
						IL_033d:
						num = reader.Read();
						num20++;
					}
					col += num20;
					break;
				}
				case 8:
					FatalErr($"Error {num2}");
					break;
				case 10:
					stringBuilder = new StringBuilder();
					if (num == 60)
					{
						break;
					}
					goto case 11;
				case 11:
					stringBuilder.Append((char)num);
					break;
				case 12:
					if (flag2)
					{
						if (num == 62 && twoCharBuff[0] == 45 && twoCharBuff[1] == 45)
						{
							flag2 = false;
							num2 = 0;
						}
						else
						{
							twoCharBuff[0] = twoCharBuff[1];
							twoCharBuff[1] = num;
						}
					}
					else if (flag3)
					{
						if (num == 60 || num == 62)
						{
							num3 ^= 1;
						}
						if (num == 62 && num3 != 0)
						{
							flag3 = false;
							num2 = 0;
						}
					}
					else
					{
						if (splitCData && stringBuilder.Length > 0 && flag)
						{
							handler.OnChars(stringBuilder.ToString());
							stringBuilder = new StringBuilder();
						}
						flag = false;
						stringBuilder.Append((char)num);
					}
					break;
				case 13:
				{
					num = reader.Read();
					int num6 = col + 1;
					if (num == 35)
					{
						int num7 = 10;
						int num8 = 0;
						int num9 = 0;
						num = reader.Read();
						num6++;
						if (num == 120)
						{
							num = reader.Read();
							num6++;
							num7 = 16;
						}
						NumberStyles style = ((num7 == 16) ? NumberStyles.HexNumber : NumberStyles.Integer);
						while (true)
						{
							int num10 = -1;
							if (char.IsNumber((char)num) || "abcdef".IndexOf(char.ToLower((char)num)) != -1)
							{
								try
								{
									num10 = int.Parse(new string((char)num, 1), style);
								}
								catch (FormatException)
								{
									num10 = -1;
								}
							}
							if (num10 == -1)
							{
								break;
							}
							num8 *= num7;
							num8 += num10;
							num9++;
							num = reader.Read();
							num6++;
						}
						if (num == 59 && num9 > 0)
						{
							stringBuilder.Append((char)num8);
						}
						else
						{
							FatalErr("Bad char ref");
						}
					}
					else
					{
						string text3 = "aglmopqstu";
						string text4 = "&'\"><";
						int num11 = 0;
						int num12 = 15;
						int num13 = 0;
						int length = stringBuilder.Length;
						while (true)
						{
							if (num11 != 15)
							{
								num11 = text3.IndexOf((char)num) & 0xF;
							}
							if (num11 == 15)
							{
								FatalErr(errors[7]);
							}
							stringBuilder.Append((char)num);
							int num14 = "U㾏侏ཟク\ue1f4⊙\ueeff\ueeffo"[num11];
							int num15 = (num14 >> 4) & 0xF;
							int num16 = num14 & 0xF;
							int num17 = num14 >> 12;
							int num18 = (num14 >> 8) & 0xF;
							num = reader.Read();
							num6++;
							num11 = 15;
							if (num15 != 15 && num == text3[num15])
							{
								if (num17 < 14)
								{
									num12 = num17;
								}
								num13 = 12;
							}
							else if (num16 != 15 && num == text3[num16])
							{
								if (num18 < 14)
								{
									num12 = num18;
								}
								num13 = 8;
							}
							else if (num == 59)
							{
								if (num12 != 15 && num13 != 0 && ((num14 >> num13) & 0xF) == 14)
								{
									break;
								}
								continue;
							}
							num11 = 0;
						}
						int num19 = num6 - col - 1;
						if (num19 > 0 && num19 < 5 && (StrEquals("amp", stringBuilder, length, num19) || StrEquals("apos", stringBuilder, length, num19) || StrEquals("quot", stringBuilder, length, num19) || StrEquals("lt", stringBuilder, length, num19) || StrEquals("gt", stringBuilder, length, num19)))
						{
							stringBuilder.Length = length;
							stringBuilder.Append(text4[num12]);
						}
						else
						{
							FatalErr(errors[7]);
						}
					}
					col = num6;
					break;
				}
				default:
					FatalErr($"Unexpected action code - {num5}.");
					break;
				}
			}
			if (num2 != 0)
			{
				FatalErr("Unexpected EOF");
			}
			handler.OnEndParsing(this);
		}
	}
	[CLSCompliant(false)]
	public class SecurityParser : MiniParser, MiniParser.IHandler, MiniParser.IReader
	{
		private SecurityElement root;

		private string xmldoc;

		private int pos;

		private SecurityElement current;

		private Stack stack;

		public SecurityParser()
		{
			stack = new Stack();
		}

		public void LoadXml(string xml)
		{
			root = null;
			xmldoc = xml;
			pos = 0;
			stack.Clear();
			Parse(this, this);
		}

		public SecurityElement ToXml()
		{
			return root;
		}

		public int Read()
		{
			if (pos >= xmldoc.Length)
			{
				return -1;
			}
			return xmldoc[pos++];
		}

		public void OnStartParsing(MiniParser parser)
		{
		}

		public void OnStartElement(string name, IAttrList attrs)
		{
			SecurityElement securityElement = new SecurityElement(name);
			if (root == null)
			{
				root = securityElement;
				current = securityElement;
			}
			else
			{
				((SecurityElement)stack.Peek()).AddChild(securityElement);
			}
			stack.Push(securityElement);
			current = securityElement;
			int length = attrs.Length;
			for (int i = 0; i < length; i++)
			{
				current.AddAttribute(attrs.GetName(i), SecurityElement.Escape(attrs.GetValue(i)));
			}
		}

		public void OnEndElement(string name)
		{
			current = (SecurityElement)stack.Pop();
		}

		public void OnChars(string ch)
		{
			current.Text = SecurityElement.Escape(ch);
		}

		public void OnEndParsing(MiniParser parser)
		{
		}
	}
}
namespace Mono.Security
{
	public class ASN1
	{
		private byte m_nTag;

		private byte[] m_aValue;

		private ArrayList elist;

		public int Count
		{
			get
			{
				if (elist == null)
				{
					return 0;
				}
				return elist.Count;
			}
		}

		public byte Tag => m_nTag;

		public int Length
		{
			get
			{
				if (m_aValue != null)
				{
					return m_aValue.Length;
				}
				return 0;
			}
		}

		public byte[] Value
		{
			get
			{
				if (m_aValue == null)
				{
					GetBytes();
				}
				return (byte[])m_aValue.Clone();
			}
			set
			{
				if (value != null)
				{
					m_aValue = (byte[])value.Clone();
				}
			}
		}

		public ASN1 this[int index]
		{
			get
			{
				try
				{
					if (elist == null || index >= elist.Count)
					{
						return null;
					}
					return (ASN1)elist[index];
				}
				catch (ArgumentOutOfRangeException)
				{
					return null;
				}
			}
		}

		public ASN1()
			: this(0, null)
		{
		}

		public ASN1(byte tag)
			: this(tag, null)
		{
		}

		public ASN1(byte tag, byte[] data)
		{
			m_nTag = tag;
			m_aValue = data;
		}

		public ASN1(byte[] data)
		{
			m_nTag = data[0];
			int num = 0;
			int num2 = data[1];
			if (num2 > 128)
			{
				num = num2 - 128;
				num2 = 0;
				for (int i = 0; i < num; i++)
				{
					num2 *= 256;
					num2 += data[i + 2];
				}
			}
			else if (num2 == 128)
			{
				throw new NotSupportedException("Undefined length encoding.");
			}
			m_aValue = new byte[num2];
			Buffer.BlockCopy(data, 2 + num, m_aValue, 0, num2);
			if ((m_nTag & 0x20) == 32)
			{
				int anPos = 2 + num;
				Decode(data, ref anPos, data.Length);
			}
		}

		private bool CompareArray(byte[] array1, byte[] array2)
		{
			bool flag = array1.Length == array2.Length;
			if (flag)
			{
				for (int i = 0; i < array1.Length; i++)
				{
					if (array1[i] != array2[i])
					{
						return false;
					}
				}
			}
			return flag;
		}

		public bool Equals(byte[] asn1)
		{
			return CompareArray(GetBytes(), asn1);
		}

		public bool CompareValue(byte[] value)
		{
			return CompareArray(m_aValue, value);
		}

		public ASN1 Add(ASN1 asn1)
		{
			if (asn1 != null)
			{
				if (elist == null)
				{
					elist = new ArrayList();
				}
				elist.Add(asn1);
			}
			return asn1;
		}

		public virtual byte[] GetBytes()
		{
			byte[] array = null;
			if (Count > 0)
			{
				int num = 0;
				ArrayList arrayList = new ArrayList();
				foreach (ASN1 item in elist)
				{
					byte[] bytes = item.GetBytes();
					arrayList.Add(bytes);
					num += bytes.Length;
				}
				array = new byte[num];
				int num2 = 0;
				for (int i = 0; i < elist.Count; i++)
				{
					byte[] array2 = (byte[])arrayList[i];
					Buffer.BlockCopy(array2, 0, array, num2, array2.Length);
					num2 += array2.Length;
				}
			}
			else if (m_aValue != null)
			{
				array = m_aValue;
			}
			int num3 = 0;
			byte[] array3;
			if (array != null)
			{
				int num4 = array.Length;
				if (num4 > 127)
				{
					if (num4 <= 255)
					{
						array3 = new byte[3 + num4];
						Buffer.BlockCopy(array, 0, array3, 3, num4);
						num3 = 129;
						array3[2] = (byte)num4;
					}
					else if (num4 <= 65535)
					{
						array3 = new byte[4 + num4];
						Buffer.BlockCopy(array, 0, array3, 4, num4);
						num3 = 130;
						array3[2] = (byte)(num4 >> 8);
						array3[3] = (byte)num4;
					}
					else if (num4 <= 16777215)
					{
						array3 = new byte[5 + num4];
						Buffer.BlockCopy(array, 0, array3, 5, num4);
						num3 = 131;
						array3[2] = (byte)(num4 >> 16);
						array3[3] = (byte)(num4 >> 8);
						array3[4] = (byte)num4;
					}
					else
					{
						array3 = new byte[6 + num4];
						Buffer.BlockCopy(array, 0, array3, 6, num4);
						num3 = 132;
						array3[2] = (byte)(num4 >> 24);
						array3[3] = (byte)(num4 >> 16);
						array3[4] = (byte)(num4 >> 8);
						array3[5] = (byte)num4;
					}
				}
				else
				{
					array3 = new byte[2 + num4];
					Buffer.BlockCopy(array, 0, array3, 2, num4);
					num3 = num4;
				}
				if (m_aValue == null)
				{
					m_aValue = array;
				}
			}
			else
			{
				array3 = new byte[2];
			}
			array3[0] = m_nTag;
			array3[1] = (byte)num3;
			return array3;
		}

		protected void Decode(byte[] asn1, ref int anPos, int anLength)
		{
			while (anPos < anLength - 1)
			{
				DecodeTLV(asn1, ref anPos, out var tag, out var length, out var content);
				if (tag != 0)
				{
					ASN1 aSN = Add(new ASN1(tag, content));
					if ((tag & 0x20) == 32)
					{
						int anPos2 = anPos;
						aSN.Decode(asn1, ref anPos2, anPos2 + length);
					}
					anPos += length;
				}
			}
		}

		protected void DecodeTLV(byte[] asn1, ref int pos, out byte tag, out int length, out byte[] content)
		{
			tag = asn1[pos++];
			length = asn1[pos++];
			if ((length & 0x80) == 128)
			{
				int num = length & 0x7F;
				length = 0;
				for (int i = 0; i < num; i++)
				{
					length = length * 256 + asn1[pos++];
				}
			}
			content = new byte[length];
			Buffer.BlockCopy(asn1, pos, content, 0, length);
		}

		public ASN1 Element(int index, byte anTag)
		{
			try
			{
				if (elist == null || index >= elist.Count)
				{
					return null;
				}
				ASN1 aSN = (ASN1)elist[index];
				if (aSN.Tag == anTag)
				{
					return aSN;
				}
				return null;
			}
			catch (ArgumentOutOfRangeException)
			{
				return null;
			}
		}

		public override string ToString()
		{
			StringBuilder stringBuilder = new StringBuilder();
			stringBuilder.AppendFormat("Tag: {0} {1}", m_nTag.ToString("X2"), Environment.NewLine);
			stringBuilder.AppendFormat("Length: {0} {1}", Value.Length, Environment.NewLine);
			stringBuilder.Append("Value: ");
			stringBuilder.Append(Environment.NewLine);
			for (int i = 0; i < Value.Length; i++)
			{
				stringBuilder.AppendFormat("{0} ", Value[i].ToString("X2"));
				if ((i + 1) % 16 == 0)
				{
					stringBuilder.AppendFormat(Environment.NewLine);
				}
			}
			return stringBuilder.ToString();
		}

		public void SaveToFile(string filename)
		{
			if (filename == null)
			{
				throw new ArgumentNullException("filename");
			}
			using FileStream fileStream = File.Create(filename);
			byte[] bytes = GetBytes();
			fileStream.Write(bytes, 0, bytes.Length);
		}
	}
	public static class ASN1Convert
	{
		public static ASN1 FromDateTime(DateTime dt)
		{
			if (dt.Year < 2050)
			{
				return new ASN1(23, Encoding.ASCII.GetBytes(dt.ToUniversalTime().ToString("yyMMddHHmmss", CultureInfo.InvariantCulture) + "Z"));
			}
			return new ASN1(24, Encoding.ASCII.GetBytes(dt.ToUniversalTime().ToString("yyyyMMddHHmmss", CultureInfo.InvariantCulture) + "Z"));
		}

		public static ASN1 FromInt32(int value)
		{
			byte[] bytes = BitConverterLE.GetBytes(value);
			Array.Reverse(bytes);
			int i;
			for (i = 0; i < bytes.Length && bytes[i] == 0; i++)
			{
			}
			ASN1 aSN = new ASN1(2);
			switch (i)
			{
			case 0:
				aSN.Value = bytes;
				break;
			case 4:
				aSN.Value = new byte[1];
				break;
			default:
			{
				byte[] array = new byte[4 - i];
				Buffer.BlockCopy(bytes, i, array, 0, array.Length);
				aSN.Value = array;
				break;
			}
			}
			return aSN;
		}

		public static ASN1 FromOid(string oid)
		{
			if (oid == null)
			{
				throw new ArgumentNullException("oid");
			}
			return new ASN1(CryptoConfig.EncodeOID(oid));
		}

		public static ASN1 FromUnsignedBigInteger(byte[] big)
		{
			if (big == null)
			{
				throw new ArgumentNullException("big");
			}
			if (big[0] >= 128)
			{
				int num = big.Length + 1;
				byte[] array = new byte[num];
				Buffer.BlockCopy(big, 0, array, 1, num - 1);
				big = array;
			}
			return new ASN1(2, big);
		}

		public static int ToInt32(ASN1 asn1)
		{
			if (asn1 == null)
			{
				throw new ArgumentNullException("asn1");
			}
			if (asn1.Tag != 2)
			{
				throw new FormatException("Only integer can be converted");
			}
			int num = 0;
			for (int i = 0; i < asn1.Value.Length; i++)
			{
				num = (num << 8) + asn1.Value[i];
			}
			return num;
		}

		public static string ToOid(ASN1 asn1)
		{
			if (asn1 == null)
			{
				throw new ArgumentNullException("asn1");
			}
			byte[] value = asn1.Value;
			StringBuilder stringBuilder = new StringBuilder();
			byte b = (byte)(value[0] / 40);
			byte b2 = (byte)(value[0] % 40);
			if (b > 2)
			{
				b2 += (byte)((b - 2) * 40);
				b = 2;
			}
			stringBuilder.Append(b.ToString(CultureInfo.InvariantCulture));
			stringBuilder.Append(".");
			stringBuilder.Append(b2.ToString(CultureInfo.InvariantCulture));
			ulong num = 0uL;
			for (b = 1; b < value.Length; b++)
			{
				num = (num << 7) | (byte)(value[b] & 0x7Fu);
				if ((value[b] & 0x80) != 128)
				{
					stringBuilder.Append(".");
					stringBuilder.Append(num.ToString(CultureInfo.InvariantCulture));
					num = 0uL;
				}
			}
			return stringBuilder.ToString();
		}

		public static DateTime ToDateTime(ASN1 time)
		{
			if (time == null)
			{
				throw new ArgumentNullException("time");
			}
			string text = Encoding.ASCII.GetString(time.Value);
			string format = null;
			switch (text.Length)
			{
			case 11:
				format = "yyMMddHHmmZ";
				break;
			case 13:
				text = ((Convert.ToInt16(text.Substring(0, 2), CultureInfo.InvariantCulture) < 50) ? ("20" + text) : ("19" + text));
				format = "yyyyMMddHHmmssZ";
				break;
			case 15:
				format = "yyyyMMddHHmmssZ";
				break;
			case 17:
			{
				string text2 = ((Convert.ToInt16(text.Substring(0, 2), CultureInfo.InvariantCulture) >= 50) ? "19" : "20");
				char c = ((text[12] == '+') ? '-' : '+');
				text = $"{text2}{text.Substring(0, 12)}{c}{text[13]}{text[14]}:{text[15]}{text[16]}";
				format = "yyyyMMddHHmmsszzz";
				break;
			}
			}
			return DateTime.ParseExact(text, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal);
		}
	}
	internal sealed class BitConverterLE
	{
		private BitConverterLE()
		{
		}

		private unsafe static byte[] GetUShortBytes(byte* bytes)
		{
			if (!BitConverter.IsLittleEndian)
			{
				return new byte[2]
				{
					bytes[1],
					*bytes
				};
			}
			return new byte[2]
			{
				*bytes,
				bytes[1]
			};
		}

		private unsafe static byte[] GetUIntBytes(byte* bytes)
		{
			if (!BitConverter.IsLittleEndian)
			{
				return new byte[4]
				{
					bytes[3],
					bytes[2],
					bytes[1],
					*bytes
				};
			}
			return new byte[4]
			{
				*bytes,
				bytes[1],
				bytes[2],
				bytes[3]
			};
		}

		private unsafe static byte[] GetULongBytes(byte* bytes)
		{
			if (!BitConverter.IsLittleEndian)
			{
				return new byte[8]
				{
					bytes[7],
					bytes[6],
					bytes[5],
					bytes[4],
					bytes[3],
					bytes[2],
					bytes[1],
					*bytes
				};
			}
			return new byte[8]
			{
				*bytes,
				bytes[1],
				bytes[2],
				bytes[3],
				bytes[4],
				bytes[5],
				bytes[6],
				bytes[7]
			};
		}

		internal static byte[] GetBytes(bool value)
		{
			return new byte[1] { (byte)(value ? 1 : 0) };
		}

		internal unsafe static byte[] GetBytes(char value)
		{
			return GetUShortBytes((byte*)(&value));
		}

		internal unsafe static byte[] GetBytes(short value)
		{
			return GetUShortBytes((byte*)(&value));
		}

		internal unsafe static byte[] GetBytes(int value)
		{
			return GetUIntBytes((byte*)(&value));
		}

		internal unsafe static byte[] GetBytes(long value)
		{
			return GetULongBytes((byte*)(&value));
		}

		internal unsafe static byte[] GetBytes(ushort value)
		{
			return GetUShortBytes((byte*)(&value));
		}

		internal unsafe static byte[] GetBytes(uint value)
		{
			return GetUIntBytes((byte*)(&value));
		}

		internal unsafe static byte[] GetBytes(ulong value)
		{
			return GetULongBytes((byte*)(&value));
		}

		internal unsafe static byte[] GetBytes(float value)
		{
			return GetUIntBytes((byte*)(&value));
		}

		internal unsafe static byte[] GetBytes(double value)
		{
			return GetULongBytes((byte*)(&value));
		}

		private unsafe static void UShortFromBytes(byte* dst, byte[] src, int startIndex)
		{
			if (BitConverter.IsLittleEndian)
			{
				*dst = src[startIndex];
				dst[1] = src[startIndex + 1];
			}
			else
			{
				*dst = src[startIndex + 1];
				dst[1] = src[startIndex];
			}
		}

		private unsafe static void UIntFromBytes(byte* dst, byte[] src, int startIndex)
		{
			if (BitConverter.IsLittleEndian)
			{
				*dst = src[startIndex];
				dst[1] = src[startIndex + 1];
				dst[2] = src[startIndex + 2];
				dst[3] = src[startIndex + 3];
			}
			else
			{
				*dst = src[startIndex + 3];
				dst[1] = src[startIndex + 2];
				dst[2] = src[startIndex + 1];
				dst[3] = src[startIndex];
			}
		}

		private unsafe static void ULongFromBytes(byte* dst, byte[] src, int startIndex)
		{
			if (BitConverter.IsLittleEndian)
			{
				for (int i = 0; i < 8; i++)
				{
					dst[i] = src[startIndex + i];
				}
			}
			else
			{
				for (int j = 0; j < 8; j++)
				{
					dst[j] = src[startIndex + (7 - j)];
				}
			}
		}

		internal static bool ToBoolean(byte[] value, int startIndex)
		{
			return value[startIndex] != 0;
		}

		internal unsafe static char ToChar(byte[] value, int startIndex)
		{
			char result = default(char);
			UShortFromBytes((byte*)(&result), value, startIndex);
			return result;
		}

		internal unsafe static short ToInt16(byte[] value, int startIndex)
		{
			short result = default(short);
			UShortFromBytes((byte*)(&result), value, startIndex);
			return result;
		}

		internal unsafe static int ToInt32(byte[] value, int startIndex)
		{
			int result = default(int);
			UIntFromBytes((byte*)(&result), value, startIndex);
			return result;
		}

		internal unsafe static long ToInt64(byte[] value, int startIndex)
		{
			long result = default(long);
			ULongFromBytes((byte*)(&result), value, startIndex);
			return result;
		}

		internal unsafe static ushort ToUInt16(byte[] value, int startIndex)
		{
			ushort result = default(ushort);
			UShortFromBytes((byte*)(&result), value, startIndex);
			return result;
		}

		internal unsafe static uint ToUInt32(byte[] value, int startIndex)
		{
			uint result = default(uint);
			UIntFromBytes((byte*)(&result), value, startIndex);
			return result;
		}

		internal unsafe static ulong ToUInt64(byte[] value, int startIndex)
		{
			ulong result = default(ulong);
			ULongFromBytes((byte*)(&result), value, startIndex);
			return result;
		}

		internal unsafe static float ToSingle(byte[] value, int startIndex)
		{
			float result = default(float);
			UIntFromBytes((byte*)(&result), value, startIndex);
			return result;
		}

		internal unsafe static double ToDouble(byte[] value, int startIndex)
		{
			double result = default(double);
			ULongFromBytes((byte*)(&result), value, startIndex);
			return result;
		}
	}
	public sealed class PKCS7
	{
		public class Oid
		{
			public const string rsaEncryption = "1.2.840.113549.1.1.1";

			public const string data = "1.2.840.113549.1.7.1";

			public const string signedData = "1.2.840.113549.1.7.2";

			public const string envelopedData = "1.2.840.113549.1.7.3";

			public const string signedAndEnvelopedData = "1.2.840.113549.1.7.4";

			public const string digestedData = "1.2.840.113549.1.7.5";

			public const string encryptedData = "1.2.840.113549.1.7.6";

			public const string contentType = "1.2.840.113549.1.9.3";

			public const string messageDigest = "1.2.840.113549.1.9.4";

			public const string signingTime = "1.2.840.113549.1.9.5";

			public const string countersignature = "1.2.840.113549.1.9.6";
		}

		public class ContentInfo
		{
			private string contentType;

			private ASN1 content;

			public ASN1 ASN1 => GetASN1();

			public ASN1 Content
			{
				get
				{
					return content;
				}
				set
				{
					content = value;
				}
			}

			public string ContentType
			{
				get
				{
					return contentType;
				}
				set
				{
					contentType = value;
				}
			}

			public ContentInfo()
			{
				content = new ASN1(160);
			}

			public ContentInfo(string oid)
				: this()
			{
				contentType = oid;
			}

			public ContentInfo(byte[] data)
				: this(new ASN1(data))
			{
			}

			public ContentInfo(ASN1 asn1)
			{
				if (asn1.Tag != 48 || (asn1.Count < 1 && asn1.Count > 2))
				{
					throw new ArgumentException("Invalid ASN1");
				}
				if (asn1[0].Tag != 6)
				{
					throw new ArgumentException("Invalid contentType");
				}
				contentType = ASN1Convert.ToOid(asn1[0]);
				if (asn1.Count > 1)
				{
					if (asn1[1].Tag != 160)
					{
						throw new ArgumentException("Invalid content");
					}
					content = asn1[1];
				}
			}

			internal ASN1 GetASN1()
			{
				ASN1 aSN = new ASN1(48);
				aSN.Add(ASN1Convert.FromOid(contentType));
				if (content != null && content.Count > 0)
				{
					aSN.Add(content);
				}
				return aSN;
			}

			public byte[] GetBytes()
			{
				return GetASN1().GetBytes();
			}
		}

		public class EncryptedData
		{
			private byte _version;

			private ContentInfo _content;

			private ContentInfo _encryptionAlgorithm;

			private byte[] _encrypted;

			public ASN1 ASN1 => GetASN1();

			public ContentInfo ContentInfo => _content;

			public ContentInfo EncryptionAlgorithm => _encryptionAlgorithm;

			public byte[] EncryptedContent
			{
				get
				{
					if (_encrypted == null)
					{
						return null;
					}
					return (byte[])_encrypted.Clone();
				}
			}

			public byte Version
			{
				get
				{
					return _version;
				}
				set
				{
					_version = value;
				}
			}

			public EncryptedData()
			{
				_version = 0;
			}

			public EncryptedData(byte[] data)
				: this(new ASN1(data))
			{
			}

			public EncryptedData(ASN1 asn1)
				: this()
			{
				if (asn1.Tag != 48 || asn1.Count < 2)
				{
					throw new ArgumentException("Invalid EncryptedData");
				}
				if (asn1[0].Tag != 2)
				{
					throw new ArgumentException("Invalid version");
				}
				_version = asn1[0].Value[0];
				ASN1 aSN = asn1[1];
				if (aSN.Tag != 48)
				{
					throw new ArgumentException("missing EncryptedContentInfo");
				}
				ASN1 aSN2 = aSN[0];
				if (aSN2.Tag != 6)
				{
					throw new ArgumentException("missing EncryptedContentInfo.ContentType");
				}
				_content = new ContentInfo(ASN1Convert.ToOid(aSN2));
				ASN1 aSN3 = aSN[1];
				if (aSN3.Tag != 48)
				{
					throw new ArgumentException("missing EncryptedContentInfo.ContentEncryptionAlgorithmIdentifier");
				}
				_encryptionAlgorithm = new ContentInfo(ASN1Convert.ToOid(aSN3[0]));
				_encryptionAlgorithm.Content = aSN3[1];
				ASN1 aSN4 = aSN[2];
				if (aSN4.Tag != 128)
				{
					throw new ArgumentException("missing EncryptedContentInfo.EncryptedContent");
				}
				_encrypted = aSN4.Value;
			}

			internal ASN1 GetASN1()
			{
				return null;
			}

			public byte[] GetBytes()
			{
				return GetASN1().GetBytes();
			}
		}

		public class EnvelopedData
		{
			private byte _version;

			private ContentInfo _content;

			private ContentInfo _encryptionAlgorithm;

			private ArrayList _recipientInfos;

			private byte[] _encrypted;

			public ArrayList RecipientInfos => _recipientInfos;

			public ASN1 ASN1 => GetASN1();

			public ContentInfo ContentInfo => _content;

			public ContentInfo EncryptionAlgorithm => _encryptionAlgorithm;

			public byte[] EncryptedContent
			{
				get
				{
					if (_encrypted == null)
					{
						return null;
					}
					return (byte[])_encrypted.Clone();
				}
			}

			public byte Version
			{
				get
				{
					return _version;
				}
				set
				{
					_version = value;
				}
			}

			public EnvelopedData()
			{
				_version = 0;
				_content = new ContentInfo();
				_encryptionAlgorithm = new ContentInfo();
				_recipientInfos = new ArrayList();
			}

			public EnvelopedData(byte[] data)
				: this(new ASN1(data))
			{
			}

			public EnvelopedData(ASN1 asn1)
				: this()
			{
				if (asn1[0].Tag != 48 || asn1[0].Count < 3)
				{
					throw new ArgumentException("Invalid EnvelopedData");
				}
				if (asn1[0][0].Tag != 2)
				{
					throw new ArgumentException("Invalid version");
				}
				_version = asn1[0][0].Value[0];
				ASN1 aSN = asn1[0][1];
				if (aSN.Tag != 49)
				{
					throw new ArgumentException("missing RecipientInfos");
				}
				for (int i = 0; i < aSN.Count; i++)
				{
					ASN1 data = aSN[i];
					_recipientInfos.Add(new RecipientInfo(data));
				}
				ASN1 aSN2 = asn1[0][2];
				if (aSN2.Tag != 48)
				{
					throw new ArgumentException("missing EncryptedContentInfo");
				}
				ASN1 aSN3 = aSN2[0];
				if (aSN3.Tag != 6)
				{
					throw new ArgumentException("missing EncryptedContentInfo.ContentType");
				}
				_content = new ContentInfo(ASN1Convert.ToOid(aSN3));
				ASN1 aSN4 = aSN2[1];
				if (aSN4.Tag != 48)
				{
					throw new ArgumentException("missing EncryptedContentInfo.ContentEncryptionAlgorithmIdentifier");
				}
				_encryptionAlgorithm = new ContentInfo(ASN1Convert.ToOid(aSN4[0]));
				_encryptionAlgorithm.Content = aSN4[1];
				ASN1 aSN5 = aSN2[2];
				if (aSN5.Tag != 128)
				{
					throw new ArgumentException("missing EncryptedContentInfo.EncryptedContent");
				}
				_encrypted = aSN5.Value;
			}

			internal ASN1 GetASN1()
			{
				return new ASN1(48);
			}

			public byte[] GetBytes()
			{
				return GetASN1().GetBytes();
			}
		}

		public class RecipientInfo
		{
			private int _version;

			private string _oid;

			private byte[] _key;

			private byte[] _ski;

			private string _issuer;

			private byte[] _serial;

			public string Oid => _oid;

			public byte[] Key
			{
				get
				{
					if (_key == null)
					{
						return null;
					}
					return (byte[])_key.Clone();
				}
			}

			public byte[] SubjectKeyIdentifier
			{
				get
				{
					if (_ski == null)
					{
						return null;
					}
					return (byte[])_ski.Clone();
				}
			}

			public string Issuer => _issuer;

			public byte[] Serial
			{
				get
				{
					if (_serial == null)
					{
						return null;
					}
					return (byte[])_serial.Clone();
				}
			}

			public int Version => _version;

			public RecipientInfo()
			{
			}

			public RecipientInfo(ASN1 data)
			{
				if (data.Tag != 48)
				{
					throw new ArgumentException("Invalid RecipientInfo");
				}
				ASN1 aSN = data[0];
				if (aSN.Tag != 2)
				{
					throw new ArgumentException("missing Version");
				}
				_version = aSN.Value[0];
				ASN1 aSN2 = data[1];
				if (aSN2.Tag == 128 && _version == 3)
				{
					_ski = aSN2.Value;
				}
				else
				{
					_issuer = X501.ToString(aSN2[0]);
					_serial = aSN2[1].Value;
				}
				ASN1 aSN3 = data[2];
				_oid = ASN1Convert.ToOid(aSN3[0]);
				ASN1 aSN4 = data[3];
				_key = aSN4.Value;
			}
		}

		public class SignedData
		{
			private byte version;

			private string hashAlgorithm;

			private ContentInfo contentInfo;

			private Mono.Security.X509.X509CertificateCollection certs;

			private ArrayList crls;

			private SignerInfo signerInfo;

			private bool mda;

			private bool signed;

			public ASN1 ASN1 => GetASN1();

			public Mono.Security.X509.X509CertificateCollection Certificates => certs;

			public ContentInfo ContentInfo => contentInfo;

			public ArrayList Crls => crls;

			public string HashName
			{
				get
				{
					return hashAlgorithm;
				}
				set
				{
					hashAlgorithm = value;
					signerInfo.HashName = value;
				}
			}

			public SignerInfo SignerInfo => signerInfo;

			public byte Version
			{
				get
				{
					return version;
				}
				set
				{
					version = value;
				}
			}

			public bool UseAuthenticatedAttributes
			{
				get
				{
					return mda;
				}
				set
				{
					mda = value;
				}
			}

			public SignedData()
			{
				version = 1;
				contentInfo = new ContentInfo();
				certs = new Mono.Security.X509.X509CertificateCollection();
				crls = new ArrayList();
				signerInfo = new SignerInfo();
				mda = true;
				signed = false;
			}

			public SignedData(byte[] data)
				: this(new ASN1(data))
			{
			}

			public SignedData(ASN1 asn1)
			{
				if (asn1[0].Tag != 48 || asn1[0].Count < 4)
				{
					throw new ArgumentException("Invalid SignedData");
				}
				if (asn1[0][0].Tag != 2)
				{
					throw new ArgumentException("Invalid version");
				}
				version = asn1[0][0].Value[0];
				contentInfo = new ContentInfo(asn1[0][2]);
				int num = 3;
				certs = new Mono.Security.X509.X509CertificateCollection();
				if (asn1[0][num].Tag == 160)
				{
					for (int i = 0; i < asn1[0][num].Count; i++)
					{
						certs.Add(new Mono.Security.X509.X509Certificate(asn1[0][num][i].GetBytes()));
					}
					num++;
				}
				crls = new ArrayList();
				if (asn1[0][num].Tag == 161)
				{
					for (int j = 0; j < asn1[0][num].Count; j++)
					{
						crls.Add(asn1[0][num][j].GetBytes());
					}
					num++;
				}
				if (asn1[0][num].Count > 0)
				{
					signerInfo = new SignerInfo(asn1[0][num]);
				}
				else
				{
					signerInfo = new SignerInfo();
				}
				if (signerInfo.HashName != null)
				{
					HashName = OidToName(signerInfo.HashName);
				}
				mda = signerInfo.AuthenticatedAttributes.Count > 0;
			}

			public bool VerifySignature(AsymmetricAlgorithm aa)
			{
				if (aa == null)
				{
					return false;
				}
				RSAPKCS1SignatureDeformatter rSAPKCS1SignatureDeformatter = new RSAPKCS1SignatureDeformatter(aa);
				rSAPKCS1SignatureDeformatter.SetHashAlgorithm(this.hashAlgorithm);
				HashAlgorithm hashAlgorithm = HashAlgorithm.Create(this.hashAlgorithm);
				byte[] signature = signerInfo.Signature;
				byte[] array = null;
				if (mda)
				{
					ASN1 aSN = new ASN1(49);
					foreach (ASN1 authenticatedAttribute in signerInfo.AuthenticatedAttributes)
					{
						aSN.Add(authenticatedAttribute);
					}
					array = hashAlgorithm.ComputeHash(aSN.GetBytes());
				}
				else
				{
					array = hashAlgorithm.ComputeHash(contentInfo.Content[0].Value);
				}
				if (array != null && signature != null)
				{
					return rSAPKCS1SignatureDeformatter.VerifySignature(array, signature);
				}
				return false;
			}

			internal string OidToName(string oid)
			{
				return oid switch
				{
					"1.3.14.3.2.26" => "SHA1", 
					"1.2.840.113549.2.2" => "MD2", 
					"1.2.840.113549.2.5" => "MD5", 
					"2.16.840.1.101.3.4.1" => "SHA256", 
					"2.16.840.1.101.3.4.2" => "SHA384", 
					"2.16.840.1.101.3.4.3" => "SHA512", 
					_ => oid, 
				};
			}

			internal ASN1 GetASN1()
			{
				ASN1 aSN = new ASN1(48);
				byte[] data = new byte[1] { version };
				aSN.Add(new ASN1(2, data));
				ASN1 aSN2 = aSN.Add(new ASN1(49));
				if (hashAlgorithm != null)
				{
					string oid = CryptoConfig.MapNameToOID(hashAlgorithm);
					aSN2.Add(AlgorithmIdentifier(oid));
				}
				ASN1 aSN3 = contentInfo.ASN1;
				aSN.Add(aSN3);
				if (!signed && hashAlgorithm != null)
				{
					if (mda)
					{
						ASN1 value = Attribute("1.2.840.113549.1.9.3", aSN3[0]);
						signerInfo.AuthenticatedAttributes.Add(value);
						byte[] data2 = HashAlgorithm.Create(hashAlgorithm).ComputeHash(aSN3[1][0].Value);
						ASN1 aSN4 = new ASN1(48);
						ASN1 value2 = Attribute("1.2.840.113549.1.9.4", aSN4.Add(new ASN1(4, data2)));
						signerInfo.AuthenticatedAttributes.Add(value2);
					}
					else
					{
						RSAPKCS1SignatureFormatter rSAPKCS1SignatureFormatter = new RSAPKCS1SignatureFormatter(signerInfo.Key);
						rSAPKCS1SignatureFormatter.SetHashAlgorithm(hashAlgorithm);
						byte[] rgbHash = HashAlgorithm.Create(hashAlgorithm).ComputeHash(aSN3[1][0].Value);
						signerInfo.Signature = rSAPKCS1SignatureFormatter.CreateSignature(rgbHash);
					}
					signed = true;
				}
				if (certs.Count > 0)
				{
					ASN1 aSN5 = aSN.Add(new ASN1(160));
					foreach (Mono.Security.X509.X509Certificate cert in certs)
					{
						aSN5.Add(new ASN1(cert.RawData));
					}
				}
				if (crls.Count > 0)
				{
					ASN1 aSN6 = aSN.Add(new ASN1(161));
					foreach (byte[] crl in crls)
					{
						aSN6.Add(new ASN1(crl));
					}
				}
				ASN1 aSN7 = aSN.Add(new ASN1(49));
				if (signerInfo.Key != null)
				{
					aSN7.Add(signerInfo.ASN1);
				}
				return aSN;
			}

			public byte[] GetBytes()
			{
				return GetASN1().GetBytes();
			}
		}

		public class SignerInfo
		{
			private byte version;

			private Mono.Security.X509.X509Certificate x509;

			private string hashAlgorithm;

			private AsymmetricAlgorithm key;

			private ArrayList authenticatedAttributes;

			private ArrayList unauthenticatedAttributes;

			private byte[] signature;

			private string issuer;

			private byte[] serial;

			private byte[] ski;

			public string IssuerName => issuer;

			public byte[] SerialNumber
			{
				get
				{
					if (serial == null)
					{
						return null;
					}
					return (byte[])serial.Clone();
				}
			}

			public byte[] SubjectKeyIdentifier
			{
				get
				{
					if (ski == null)
					{
						return null;
					}
					return (byte[])ski.Clone();
				}
			}

			public ASN1 ASN1 => GetASN1();

			public ArrayList AuthenticatedAttributes => authenticatedAttributes;

			public Mono.Security.X509.X509Certificate Certificate
			{
				get
				{
					return x509;
				}
				set
				{
					x509 = value;
				}
			}

			public string HashName
			{
				get
				{
					return hashAlgorithm;
				}
				set
				{
					hashAlgorithm = value;
				}
			}

			public AsymmetricAlgorithm Key
			{
				get
				{
					return key;
				}
				set
				{
					key = value;
				}
			}

			public byte[] Signature
			{
				get
				{
					if (signature == null)
					{
						return null;
					}
					return (byte[])signature.Clone();
				}
				set
				{
					if (value != null)
					{
						signature = (byte[])value.Clone();
					}
				}
			}

			public ArrayList UnauthenticatedAttributes => unauthenticatedAttributes;

			public byte Version
			{
				get
				{
					return version;
				}
				set
				{
					version = value;
				}
			}

			public SignerInfo()
			{
				version = 1;
				authenticatedAttributes = new ArrayList();
				unauthenticatedAttributes = new ArrayList();
			}

			public SignerInfo(byte[] data)
				: this(new ASN1(data))
			{
			}

			public SignerInfo(ASN1 asn1)
				: this()
			{
				if (asn1[0].Tag != 48 || asn1[0].Count < 5)
				{
					throw new ArgumentException("Invalid SignedData");
				}
				if (asn1[0][0].Tag != 2)
				{
					throw new ArgumentException("Invalid version");
				}
				version = asn1[0][0].Value[0];
				ASN1 aSN = asn1[0][1];
				if (aSN.Tag == 128 && version == 3)
				{
					ski = aSN.Value;
				}
				else
				{
					issuer = X501.ToString(aSN[0]);
					serial = aSN[1].Value;
				}
				ASN1 aSN2 = asn1[0][2];
				hashAlgorithm = ASN1Convert.ToOid(aSN2[0]);
				int num = 3;
				ASN1 aSN3 = asn1[0][num];
				if (aSN3.Tag == 160)
				{
					num++;
					for (int i = 0; i < aSN3.Count; i++)
					{
						authenticatedAttributes.Add(aSN3[i]);
					}
				}
				num++;
				ASN1 aSN4 = asn1[0][num++];
				if (aSN4.Tag == 4)
				{
					signature = aSN4.Value;
				}
				ASN1 aSN5 = asn1[0][num];
				if (aSN5 != null && aSN5.Tag == 161)
				{
					for (int j = 0; j < aSN5.Count; j++)
					{
						unauthenticatedAttributes.Add(aSN5[j]);
					}
				}
			}

			internal ASN1 GetASN1()
			{
				if (key == null || hashAlgorithm == null)
				{
					return null;
				}
				byte[] data = new byte[1] { version };
				ASN1 aSN = new ASN1(48);
				aSN.Add(new ASN1(2, data));
				aSN.Add(IssuerAndSerialNumber(x509));
				string oid = CryptoConfig.MapNameToOID(hashAlgorithm);
				aSN.Add(AlgorithmIdentifier(oid));
				ASN1 aSN2 = null;
				if (authenticatedAttributes.Count > 0)
				{
					aSN2 = aSN.Add(new ASN1(160));
					authenticatedAttributes.Sort(new SortedSet());
					foreach (ASN1 authenticatedAttribute in authenticatedAttributes)
					{
						aSN2.Add(authenticatedAttribute);
					}
				}
				if (key is RSA)
				{
					aSN.Add(AlgorithmIdentifier("1.2.840.113549.1.1.1"));
					if (aSN2 != null)
					{
						RSAPKCS1SignatureFormatter rSAPKCS1SignatureFormatter = new RSAPKCS1SignatureFormatter(key);
						rSAPKCS1SignatureFormatter.SetHashAlgorithm(hashAlgorithm);
						byte[] bytes = aSN2.GetBytes();
						bytes[0] = 49;
						byte[] rgbHash = HashAlgorithm.Create(hashAlgorithm).ComputeHash(bytes);
						signature = rSAPKCS1SignatureFormatter.CreateSignature(rgbHash);
					}
					aSN.Add(new ASN1(4, signature));
					if (unauthenticatedAttributes.Count > 0)
					{
						ASN1 aSN3 = aSN.Add(new ASN1(161));
						unauthenticatedAttributes.Sort(new SortedSet());
						foreach (ASN1 unauthenticatedAttribute in unauthenticatedAttributes)
						{
							aSN3.Add(unauthenticatedAttribute);
						}
					}
					return aSN;
				}
				if (key is DSA)
				{
					throw new NotImplementedException("not yet");
				}
				throw new CryptographicException("Unknown assymetric algorithm");
			}

			public byte[] GetBytes()
			{
				return GetASN1().GetBytes();
			}
		}

		internal class SortedSet : IComparer
		{
			public int Compare(object x, object y)
			{
				if (x == null)
				{
					if (y != null)
					{
						return -1;
					}
					return 0;
				}
				if (y == null)
				{
					return 1;
				}
				ASN1 obj = x as ASN1;
				ASN1 aSN = y as ASN1;
				if (obj == null || aSN == null)
				{
					throw new ArgumentException(Locale.GetText("Invalid objects."));
				}
				byte[] bytes = obj.GetBytes();
				byte[] bytes2 = aSN.GetBytes();
				for (int i = 0; i < bytes.Length && i != bytes2.Length; i++)
				{
					if (bytes[i] != bytes2[i])
					{
						if (bytes[i] >= bytes2[i])
						{
							return 1;
						}
						return -1;
					}
				}
				if (bytes.Length > bytes2.Length)
				{
					return 1;
				}
				if (bytes.Length < bytes2.Length)
				{
					return -1;
				}
				return 0;
			}
		}

		private PKCS7()
		{
		}

		public static ASN1 Attribute(string oid, ASN1 value)
		{
			ASN1 aSN = new ASN1(48);
			aSN.Add(ASN1Convert.FromOid(oid));
			aSN.Add(new ASN1(49)).Add(value);
			return aSN;
		}

		public static ASN1 AlgorithmIdentifier(string oid)
		{
			ASN1 aSN = new ASN1(48);
			aSN.Add(ASN1Convert.FromOid(oid));
			aSN.Add(new ASN1(5));
			return aSN;
		}

		public static ASN1 AlgorithmIdentifier(string oid, ASN1 parameters)
		{
			ASN1 aSN = new ASN1(48);
			aSN.Add(ASN1Convert.FromOid(oid));
			aSN.Add(parameters);
			return aSN;
		}

		public static ASN1 IssuerAndSerialNumber(Mono.Security.X509.X509Certificate x509)
		{
			ASN1 asn = null;
			ASN1 asn2 = null;
			ASN1 aSN = new ASN1(x509.RawData);
			int num = 0;
			bool flag = false;
			while (num < aSN[0].Count)
			{
				ASN1 aSN2 = aSN[0][num++];
				if (aSN2.Tag == 2)
				{
					asn2 = aSN2;
				}
				else if (aSN2.Tag == 48)
				{
					if (flag)
					{
						asn = aSN2;
						break;
					}
					flag = true;
				}
			}
			ASN1 aSN3 = new ASN1(48);
			aSN3.Add(asn);
			aSN3.Add(asn2);
			return aSN3;
		}
	}
	public sealed class StrongName
	{
		internal class StrongNameSignature
		{
			private byte[] hash;

			private byte[] signature;

			private uint signaturePosition;

			private uint signatureLength;

			private uint metadataPosition;

			private uint metadataLength;

			private byte cliFlag;

			private uint cliFlagPosition;

			public byte[] Hash
			{
				get
				{
					return hash;
				}
				set
				{
					hash = value;
				}
			}

			public byte[] Signature
			{
				get
				{
					return signature;
				}
				set
				{
					signature = value;
				}
			}

			public uint MetadataPosition
			{
				get
				{
					return metadataPosition;
				}
				set
				{
					metadataPosition = value;
				}
			}

			public uint MetadataLength
			{
				get
				{
					return metadataLength;
				}
				set
				{
					metadataLength = value;
				}
			}

			public uint SignaturePosition
			{
				get
				{
					return signaturePosition;
				}
				set
				{
					signaturePosition = value;
				}
			}

			public uint SignatureLength
			{
				get
				{
					return signatureLength;
				}
				set
				{
					signatureLength = value;
				}
			}

			public byte CliFlag
			{
				get
				{
					return cliFlag;
				}
				set
				{
					cliFlag = value;
				}
			}

			public uint CliFlagPosition
			{
				get
				{
					return cliFlagPosition;
				}
				set
				{
					cliFlagPosition = value;
				}
			}
		}

		internal enum StrongNameOptions
		{
			Metadata,
			Signature
		}

		private RSA rsa;

		private byte[] publicKey;

		private byte[] keyToken;

		private string tokenAlgorithm;

		public bool CanSign
		{
			get
			{
				if (rsa == null)
				{
					return false;
				}
				if (RSA is RSAManaged)
				{
					return !(rsa as RSAManaged).PublicOnly;
				}
				try
				{
					RSAParameters rSAParameters = rsa.ExportParameters(includePrivateParameters: true);
					return rSAParameters.D != null && rSAParameters.P != null && rSAParameters.Q != null;
				}
				catch (CryptographicException)
				{
					return false;
				}
			}
		}

		public RSA RSA
		{
			get
			{
				if (rsa == null)
				{
					rsa = RSA.Create();
				}
				return rsa;
			}
			set
			{
				rsa = value;
				InvalidateCache();
			}
		}

		public byte[] PublicKey
		{
			get
			{
				if (publicKey == null)
				{
					byte[] array = CryptoConvert.ToCapiKeyBlob(rsa, includePrivateKey: false);
					publicKey = new byte[32 + (rsa.KeySize >> 3)];
					publicKey[0] = array[4];
					publicKey[1] = array[5];
					publicKey[2] = array[6];
					publicKey[3] = array[7];
					publicKey[4] = 4;
					publicKey[5] = 128;
					publicKey[6] = 0;
					publicKey[7] = 0;
					byte[] bytes = BitConverterLE.GetBytes(publicKey.Length - 12);
					publicKey[8] = bytes[0];
					publicKey[9] = bytes[1];
					publicKey[10] = bytes[2];
					publicKey[11] = bytes[3];
					publicKey[12] = 6;
					Buffer.BlockCopy(array, 1, publicKey, 13, publicKey.Length - 13);
					publicKey[23] = 49;
				}
				return (byte[])publicKey.Clone();
			}
		}

		public byte[] PublicKeyToken
		{
			get
			{
				if (keyToken == null)
				{
					byte[] array = PublicKey;
					if (array == null)
					{
						return null;
					}
					byte[] array2 = HashAlgorithm.Create(TokenAlgorithm).ComputeHash(array);
					keyToken = new byte[8];
					Buffer.BlockCopy(array2, array2.Length - 8, keyToken, 0, 8);
					Array.Reverse(keyToken, 0, 8);
				}
				return (byte[])keyToken.Clone();
			}
		}

		public string TokenAlgorithm
		{
			get
			{
				if (tokenAlgorithm == null)
				{
					tokenAlgorithm = "SHA1";
				}
				return tokenAlgorithm;
			}
			set
			{
				string text = value.ToUpper(CultureInfo.InvariantCulture);
				if (text == "SHA1" || text == "MD5")
				{
					tokenAlgorithm = value;
					InvalidateCache();
					return;
				}
				throw new ArgumentException("Unsupported hash algorithm for token");
			}
		}

		public StrongName()
		{
		}

		public StrongName(int keySize)
		{
			rsa = new RSAManaged(keySize);
		}

		public StrongName(byte[] data)
		{
			if (data == null)
			{
				throw new ArgumentNullException("data");
			}
			if (data.Length == 16)
			{
				int num = 0;
				int num2 = 0;
				while (num < data.Length)
				{
					num2 += data[num++];
				}
				if (num2 == 4)
				{
					publicKey = (byte[])data.Clone();
				}
			}
			else
			{
				RSA = CryptoConvert.FromCapiKeyBlob(data);
				if (rsa == null)
				{
					throw new ArgumentException("data isn't a correctly encoded RSA public key");
				}
			}
		}

		public StrongName(RSA rsa)
		{
			if (rsa == null)
			{
				throw new ArgumentNullException("rsa");
			}
			RSA = rsa;
		}

		private void InvalidateCache()
		{
			publicKey = null;
			keyToken = null;
		}

		public byte[] GetBytes()
		{
			return CryptoConvert.ToCapiPrivateKeyBlob(RSA);
		}

		private uint RVAtoPosition(uint r, int sections, byte[] headers)
		{
			for (int i = 0; i < sections; i++)
			{
				uint num = BitConverterLE.ToUInt32(headers, i * 40 + 20);
				uint num2 = BitConverterLE.ToUInt32(headers, i * 40 + 12);
				int num3 = (int)BitConverterLE.ToUInt32(headers, i * 40 + 8);
				if (num2 <= r && r < num2 + num3)
				{
					return num + r - num2;
				}
			}
			return 0u;
		}

		internal StrongNameSignature StrongHash(Stream stream, StrongNameOptions options)
		{
			StrongNameSignature strongNameSignature = new StrongNameSignature();
			HashAlgorithm hashAlgorithm = HashAlgorithm.Create(TokenAlgorithm);
			CryptoStream cryptoStream = new CryptoStream(Stream.Null, hashAlgorithm, CryptoStreamMode.Write);
			byte[] array = new byte[128];
			stream.Read(array, 0, 128);
			if (BitConverterLE.ToUInt16(array, 0) != 23117)
			{
				return null;
			}
			uint num = BitConverterLE.ToUInt32(array, 60);
			cryptoStream.Write(array, 0, 128);
			if (num != 128)
			{
				byte[] array2 = new byte[num - 128];
				stream.Read(array2, 0, array2.Length);
				cryptoStream.Write(array2, 0, array2.Length);
			}
			byte[] array3 = new byte[248];
			stream.Read(array3, 0, 248);
			if (BitConverterLE.ToUInt32(array3, 0) != 17744)
			{
				return null;
			}
			if (BitConverterLE.ToUInt16(array3, 4) != 332)
			{
				return null;
			}
			byte[] src = new byte[8];
			Buffer.BlockCopy(src, 0, array3, 88, 4);
			Buffer.BlockCopy(src, 0, array3, 152, 8);
			cryptoStream.Write(array3, 0, 248);
			ushort num2 = BitConverterLE.ToUInt16(array3, 6);
			int num3 = num2 * 40;
			byte[] array4 = new byte[num3];
			stream.Read(array4, 0, num3);
			cryptoStream.Write(array4, 0, num3);
			uint r = BitConverterLE.ToUInt32(array3, 232);
			uint num4 = RVAtoPosition(r, num2, array4);
			int num5 = (int)BitConverterLE.ToUInt32(array3, 236);
			byte[] array5 = new byte[num5];
			stream.Position = num4;
			stream.Read(array5, 0, num5);
			uint r2 = BitConverterLE.ToUInt32(array5, 32);
			strongNameSignature.SignaturePosition = RVAtoPosition(r2, num2, array4);
			strongNameSignature.SignatureLength = BitConverterLE.ToUInt32(array5, 36);
			uint r3 = BitConverterLE.ToUInt32(array5, 8);
			strongNameSignature.MetadataPosition = RVAtoPosition(r3, num2, array4);
			strongNameSignature.MetadataLength = BitConverterLE.ToUInt32(array5, 12);
			if (options == StrongNameOptions.Metadata)
			{
				cryptoStream.Close();
				hashAlgorithm.Initialize();
				byte[] array6 = new byte[strongNameSignature.MetadataLength];
				stream.Position = strongNameSignature.MetadataPosition;
				stream.Read(array6, 0, array6.Length);
				strongNameSignature.Hash = hashAlgorithm.ComputeHash(array6);
				return strongNameSignature;
			}
			for (int i = 0; i < num2; i++)
			{
				uint num6 = BitConverterLE.ToUInt32(array4, i * 40 + 20);
				int num7 = (int)BitConverterLE.ToUInt32(array4, i * 40 + 16);
				byte[] array7 = new byte[num7];
				stream.Position = num6;
				stream.Read(array7, 0, num7);
				if (num6 <= strongNameSignature.SignaturePosition && strongNameSignature.SignaturePosition < num6 + num7)
				{
					int num8 = (int)(strongNameSignature.SignaturePosition - num6);
					if (num8 > 0)
					{
						cryptoStream.Write(array7, 0, num8);
					}
					strongNameSignature.Signature = new byte[strongNameSignature.SignatureLength];
					Buffer.BlockCopy(array7, num8, strongNameSignature.Signature, 0, (int)strongNameSignature.SignatureLength);
					Array.Reverse(strongNameSignature.Signature);
					int num9 = (int)(num8 + strongNameSignature.SignatureLength);
					int num10 = num7 - num9;
					if (num10 > 0)
					{
						cryptoStream.Write(array7, num9, num10);
					}
				}
				else
				{
					cryptoStream.Write(array7, 0, num7);
				}
			}
			cryptoStream.Close();
			strongNameSignature.Hash = hashAlgorithm.Hash;
			return strongNameSignature;
		}

		public byte[] Hash(string fileName)
		{
			FileStream fileStream = File.OpenRead(fileName);
			StrongNameSignature strongNameSignature = StrongHash(fileStream, StrongNameOptions.Metadata);
			fileStream.Close();
			return strongNameSignature.Hash;
		}

		public bool Sign(string fileName)
		{
			bool flag = false;
			StrongNameSignature strongNameSignature;
			using (FileStream fileStream = File.OpenRead(fileName))
			{
				strongNameSignature = StrongHash(fileStream, StrongNameOptions.Signature);
				fileStream.Close();
			}
			if (strongNameSignature.Hash == null)
			{
				return false;
			}
			byte[] array = null;
			try
			{
				RSAPKCS1SignatureFormatter rSAPKCS1SignatureFormatter = new RSAPKCS1SignatureFormatter(rsa);
				rSAPKCS1SignatureFormatter.SetHashAlgorithm(TokenAlgorithm);
				array = rSAPKCS1SignatureFormatter.CreateSignature(strongNameSignature.Hash);
				Array.Reverse(array);
			}
			catch (CryptographicException)
			{
				return false;
			}
			using FileStream fileStream2 = File.OpenWrite(fileName);
			fileStream2.Position = strongNameSignature.SignaturePosition;
			fileStream2.Write(array, 0, array.Length);
			fileStream2.Close();
			return true;
		}

		public bool Verify(string fileName)
		{
			bool flag = false;
			using FileStream fileStream = File.OpenRead(fileName);
			flag = Verify(fileStream);
			fileStream.Close();
			return flag;
		}

		public bool Verify(Stream stream)
		{
			StrongNameSignature strongNameSignature = StrongHash(stream, StrongNameOptions.Signature);
			if (strongNameSignature.Hash == null)
			{
				return false;
			}
			try
			{
				AssemblyHashAlgorithm algorithm = AssemblyHashAlgorithm.SHA1;
				if (tokenAlgorithm == "MD5")
				{
					algorithm = AssemblyHashAlgorithm.MD5;
				}
				return Verify(rsa, algorithm, strongNameSignature.Hash, strongNameSignature.Signature);
			}
			catch (CryptographicException)
			{
				return false;
			}
		}

		private static bool Verify(RSA rsa, AssemblyHashAlgorithm algorithm, byte[] hash, byte[] signature)
		{
			RSAPKCS1SignatureDeformatter rSAPKCS1SignatureDeformatter = new RSAPKCS1SignatureDeformatter(rsa);
			switch (algorithm)
			{
			case AssemblyHashAlgorithm.MD5:
				rSAPKCS1SignatureDeformatter.SetHashAlgorithm("MD5");
				break;
			default:
				rSAPKCS1SignatureDeformatter.SetHashAlgorithm("SHA1");
				break;
			}
			return rSAPKCS1SignatureDeformatter.VerifySignature(hash, signature);
		}
	}
}
namespace Mono.Security.X509
{
	public class PKCS5
	{
		public const string pbeWithMD2AndDESCBC = "1.2.840.113549.1.5.1";

		public const string pbeWithMD5AndDESCBC = "1.2.840.113549.1.5.3";

		public const string pbeWithMD2AndRC2CBC = "1.2.840.113549.1.5.4";

		public const string pbeWithMD5AndRC2CBC = "1.2.840.113549.1.5.6";

		public const string pbeWithSHA1AndDESCBC = "1.2.840.113549.1.5.10";

		public const string pbeWithSHA1AndRC2CBC = "1.2.840.113549.1.5.11";
	}
	public class PKCS9
	{
		public const string friendlyName = "1.2.840.113549.1.9.20";

		public const string localKeyId = "1.2.840.113549.1.9.21";
	}
	internal class SafeBag
	{
		private string _bagOID;

		private ASN1 _asn1;

		public string BagOID => _bagOID;

		public ASN1 ASN1 => _asn1;

		public SafeBag(string bagOID, ASN1 asn1)
		{
			_bagOID = bagOID;
			_asn1 = asn1;
		}
	}
	public class PKCS12 : ICloneable
	{
		public class DeriveBytes
		{
			public enum Purpose
			{
				Key,
				IV,
				MAC
			}

			private static byte[] keyDiversifier = new byte[64]
			{
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1
			};

			private static byte[] ivDiversifier = new byte[64]
			{
				2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
				2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
				2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
				2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
				2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
				2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
				2, 2, 2, 2
			};

			private static byte[] macDiversifier = new byte[64]
			{
				3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
				3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
				3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
				3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
				3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
				3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
				3, 3, 3, 3
			};

			private string _hashName;

			private int _iterations;

			private byte[] _password;

			private byte[] _salt;

			public string HashName
			{
				get
				{
					return _hashName;
				}
				set
				{
					_hashName = value;
				}
			}

			public int IterationCount
			{
				get
				{
					return _iterations;
				}
				set
				{
					_iterations = value;
				}
			}

			public byte[] Password
			{
				get
				{
					return (byte[])_password.Clone();
				}
				set
				{
					if (value == null)
					{
						_password = new byte[0];
					}
					else
					{
						_password = (byte[])value.Clone();
					}
				}
			}

			public byte[] Salt
			{
				get
				{
					return (byte[])_salt.Clone();
				}
				set
				{
					if (value != null)
					{
						_salt = (byte[])value.Clone();
					}
					else
					{
						_salt = null;
					}
				}
			}

			private void Adjust(byte[] a, int aOff, byte[] b)
			{
				int num = (b[^1] & 0xFF) + (a[aOff + b.Length - 1] & 0xFF) + 1;
				a[aOff + b.Length - 1] = (byte)num;
				num >>= 8;
				for (int num2 = b.Length - 2; num2 >= 0; num2--)
				{
					num += (b[num2] & 0xFF) + (a[aOff + num2] & 0xFF);
					a[aOff + num2] = (byte)num;
					num >>= 8;
				}
			}

			private byte[] Derive(byte[] diversifier, int n)
			{
				HashAlgorithm hashAlgorithm = PKCS1.CreateFromName(_hashName);
				int num = hashAlgorithm.HashSize >> 3;
				int num2 = 64;
				byte[] array = new byte[n];
				byte[] array2;
				if (_salt != null && _salt.Length != 0)
				{
					array2 = new byte[num2 * ((_salt.Length + num2 - 1) / num2)];
					for (int i = 0; i != array2.Length; i++)
					{
						array2[i] = _salt[i % _salt.Length];
					}
				}
				else
				{
					array2 = new byte[0];
				}
				byte[] array3;
				if (_password != null && _password.Length != 0)
				{
					array3 = new byte[num2 * ((_password.Length + num2 - 1) / num2)];
					for (int j = 0; j != array3.Length; j++)
					{
						array3[j] = _password[j % _password.Length];
					}
				}
				else
				{
					array3 = new byte[0];
				}
				byte[] array4 = new byte[array2.Length + array3.Length];
				Buffer.BlockCopy(array2, 0, array4, 0, array2.Length);
				Buffer.BlockCopy(array3, 0, array4, array2.Length, array3.Length);
				byte[] array5 = new byte[num2];
				int num3 = (n + num - 1) / num;
				for (int k = 1; k <= num3; k++)
				{
					hashAlgorithm.TransformBlock(diversifier, 0, diversifier.Length, diversifier, 0);
					hashAlgorithm.TransformFinalBlock(array4, 0, array4.Length);
					byte[] array6 = hashAlgorithm.Hash;
					hashAlgorithm.Initialize();
					for (int l = 1; l != _iterations; l++)
					{
						array6 = hashAlgorithm.ComputeHash(array6, 0, array6.Length);
					}
					for (int m = 0; m != array5.Length; m++)
					{
						array5[m] = array6[m % array6.Length];
					}
					for (int num4 = 0; num4 != array4.Length / num2; num4++)
					{
						Adjust(array4, num4 * num2, array5);
					}
					if (k == num3)
					{
						Buffer.BlockCopy(array6, 0, array, (k - 1) * num, array.Length - (k - 1) * num);
					}
					else
					{
						Buffer.BlockCopy(array6, 0, array, (k - 1) * num, array6.Length);
					}
				}
				return array;
			}

			public byte[] DeriveKey(int size)
			{
				return Derive(keyDiversifier, size);
			}

			public byte[] DeriveIV(int size)
			{
				return Derive(ivDiversifier, size);
			}

			public byte[] DeriveMAC(int size)
			{
				return Derive(macDiversifier, size);
			}
		}

		public const string pbeWithSHAAnd128BitRC4 = "1.2.840.113549.1.12.1.1";

		public const string pbeWithSHAAnd40BitRC4 = "1.2.840.113549.1.12.1.2";

		public const string pbeWithSHAAnd3KeyTripleDESCBC = "1.2.840.113549.1.12.1.3";

		public const string pbeWithSHAAnd2KeyTripleDESCBC = "1.2.840.113549.1.12.1.4";

		public const string pbeWithSHAAnd128BitRC2CBC = "1.2.840.113549.1.12.1.5";

		public const string pbeWithSHAAnd40BitRC2CBC = "1.2.840.113549.1.12.1.6";

		public const string keyBag = "1.2.840.113549.1.12.10.1.1";

		public const string pkcs8ShroudedKeyBag = "1.2.840.113549.1.12.10.1.2";

		public const string certBag = "1.2.840.113549.1.12.10.1.3";

		public const string crlBag = "1.2.840.113549.1.12.10.1.4";

		public const string secretBag = "1.2.840.113549.1.12.10.1.5";

		public const string safeContentsBag = "1.2.840.113549.1.12.10.1.6";

		public const string x509Certificate = "1.2.840.113549.1.9.22.1";

		public const string sdsiCertificate = "1.2.840.113549.1.9.22.2";

		public const string x509Crl = "1.2.840.113549.1.9.23.1";

		private const int recommendedIterationCount = 2000;

		private byte[] _password;

		private ArrayList _keyBags;

		private ArrayList _secretBags;

		private X509CertificateCollection _certs;

		private bool _keyBagsChanged;

		private bool _secretBagsChanged;

		private bool _certsChanged;

		private int _iterations;

		private ArrayList _safeBags;

		private RandomNumberGenerator _rng;

		public const int CryptoApiPasswordLimit = 32;

		private static int password_max_length = int.MaxValue;

		public string Password
		{
			set
			{
				if (_password != null)
				{
					Array.Clear(_password, 0, _password.Length);
				}
				_password = null;
				if (value == null)
				{
					return;
				}
				if (value.Length > 0)
				{
					int num = value.Length;
					int num2 = 0;
					if (num < MaximumPasswordLength)
					{
						if (value[num - 1] != 0)
						{
							num2 = 1;
						}
					}
					else
					{
						num = MaximumPasswordLength;
					}
					_password = new byte[num + num2 << 1];
					Encoding.BigEndianUnicode.GetBytes(value, 0, num, _password, 0);
				}
				else
				{
					_password = new byte[2];
				}
			}
		}

		public int IterationCount
		{
			get
			{
				return _iterations;
			}
			set
			{
				_iterations = value;
			}
		}

		public ArrayList Keys
		{
			get
			{
				if (_keyBagsChanged)
				{
					_keyBags.Clear();
					foreach (SafeBag safeBag in _safeBags)
					{
						if (safeBag.BagOID.Equals("1.2.840.113549.1.12.10.1.1"))
						{
							byte[] privateKey = new PKCS8.PrivateKeyInfo(safeBag.ASN1[1].Value).PrivateKey;
							switch (privateKey[0])
							{
							case 2:
								_keyBags.Add(PKCS8.PrivateKeyInfo.DecodeDSA(privateKey, default(DSAParameters)));
								break;
							case 48:
								_keyBags.Add(PKCS8.PrivateKeyInfo.DecodeRSA(privateKey));
								break;
							}
							Array.Clear(privateKey, 0, privateKey.Length);
						}
						else if (safeBag.BagOID.Equals("1.2.840.113549.1.12.10.1.2"))
						{
							PKCS8.EncryptedPrivateKeyInfo encryptedPrivateKeyInfo = new PKCS8.EncryptedPrivateKeyInfo(safeBag.ASN1[1].Value);
							byte[] array = Decrypt(encryptedPrivateKeyInfo.Algorithm, encryptedPrivateKeyInfo.Salt, encryptedPrivateKeyInfo.IterationCount, encryptedPrivateKeyInfo.EncryptedData);
							byte[] privateKey2 = new PKCS8.PrivateKeyInfo(array).PrivateKey;
							switch (privateKey2[0])
							{
							case 2:
								_keyBags.Add(PKCS8.PrivateKeyInfo.DecodeDSA(privateKey2, default(DSAParameters)));
								break;
							case 48:
								_keyBags.Add(PKCS8.PrivateKeyInfo.DecodeRSA(privateKey2));
								break;
							}
							Array.Clear(privateKey2, 0, privateKey2.Length);
							Array.Clear(array, 0, array.Length);
						}
					}
					_keyBagsChanged = false;
				}
				return ArrayList.ReadOnly(_keyBags);
			}
		}

		public ArrayList Secrets
		{
			get
			{
				if (_secretBagsChanged)
				{
					_secretBags.Clear();
					foreach (SafeBag safeBag in _safeBags)
					{
						if (safeBag.BagOID.Equals("1.2.840.113549.1.12.10.1.5"))
						{
							byte[] value = safeBag.ASN1[1].Value;
							_secretBags.Add(value);
						}
					}
					_secretBagsChanged = false;
				}
				return ArrayList.ReadOnly(_secretBags);
			}
		}

		public X509CertificateCollection Certificates
		{
			get
			{
				if (_certsChanged)
				{
					_certs.Clear();
					foreach (SafeBag safeBag in _safeBags)
					{
						if (safeBag.BagOID.Equals("1.2.840.113549.1.12.10.1.3"))
						{
							PKCS7.ContentInfo contentInfo = new PKCS7.ContentInfo(safeBag.ASN1[1].Value);
							_certs.Add(new X509Certificate(contentInfo.Content[0].Value));
						}
					}
					_certsChanged = false;
				}
				return _certs;
			}
		}

		internal RandomNumberGenerator RNG
		{
			get
			{
				if (_rng == null)
				{
					_rng = RandomNumberGenerator.Create();
				}
				return _rng;
			}
		}

		public static int MaximumPasswordLength
		{
			get
			{
				return password_max_length;
			}
			set
			{
				if (value < 32)
				{
					throw new ArgumentOutOfRangeException(Locale.GetText("Maximum password length cannot be less than {0}.", 32));
				}
				password_max_length = value;
			}
		}

		public PKCS12()
		{
			_iterations = 2000;
			_keyBags = new ArrayList();
			_secretBags = new ArrayList();
			_certs = new X509CertificateCollection();
			_keyBagsChanged = false;
			_secretBagsChanged = false;
			_certsChanged = false;
			_safeBags = new ArrayList();
		}

		public PKCS12(byte[] data)
			: this()
		{
			Password = null;
			Decode(data);
		}

		public PKCS12(byte[] data, string password)
			: this()
		{
			Password = password;
			Decode(data);
		}

		public PKCS12(byte[] data, byte[] password)
			: this()
		{
			_password = password;
			Decode(data);
		}

		private void Decode(byte[] data)
		{
			ASN1 aSN = new ASN1(data);
			if (aSN.Tag != 48)
			{
				throw new ArgumentException("invalid data");
			}
			if (aSN[0].Tag != 2)
			{
				throw new ArgumentException("invalid PFX version");
			}
			PKCS7.ContentInfo contentInfo = new PKCS7.ContentInfo(aSN[1]);
			if (contentInfo.ContentType != "1.2.840.113549.1.7.1")
			{
				throw new ArgumentException("invalid authenticated safe");
			}
			if (aSN.Count > 2)
			{
				ASN1 aSN2 = aSN[2];
				if (aSN2.Tag != 48)
				{
					throw new ArgumentException("invalid MAC");
				}
				ASN1 aSN3 = aSN2[0];
				if (aSN3.Tag != 48)
				{
					throw new ArgumentException("invalid MAC");
				}
				if (ASN1Convert.ToOid(aSN3[0][0]) != "1.3.14.3.2.26")
				{
					throw new ArgumentException("unsupported HMAC");
				}
				byte[] value = aSN3[1].Value;
				ASN1 aSN4 = aSN2[1];
				if (aSN4.Tag != 4)
				{
					throw new ArgumentException("missing MAC salt");
				}
				_iterations = 1;
				if (aSN2.Count > 2)
				{
					ASN1 aSN5 = aSN2[2];
					if (aSN5.Tag != 2)
					{
						throw new ArgumentException("invalid MAC iteration");
					}
					_iterations = ASN1Convert.ToInt32(aSN5);
				}
				byte[] value2 = contentInfo.Content[0].Value;
				byte[] actual = MAC(_password, aSN4.Value, _iterations, value2);
				if (!Compare(value, actual))
				{
					byte[] password = new byte[2];
					actual = MAC(password, aSN4.Value, _iterations, value2);
					if (!Compare(value, actual))
					{
						throw new CryptographicException("Invalid MAC - file may have been tampered with!");
					}
					_password = password;
				}
			}
			ASN1 aSN6 = new ASN1(contentInfo.Content[0].Value);
			for (int i = 0; i < aSN6.Count; i++)
			{
				PKCS7.ContentInfo contentInfo2 = new PKCS7.ContentInfo(aSN6[i]);
				switch (contentInfo2.ContentType)
				{
				case "1.2.840.113549.1.7.1":
				{
					ASN1 aSN8 = new ASN1(contentInfo2.Content[0].Value);
					for (int k = 0; k < aSN8.Count; k++)
					{
						ASN1 safeBag2 = aSN8[k];
						ReadSafeBag(safeBag2);
					}
					break;
				}
				case "1.2.840.113549.1.7.6":
				{
					PKCS7.EncryptedData ed = new PKCS7.EncryptedData(contentInfo2.Content[0]);
					ASN1 aSN7 = new ASN1(Decrypt(ed));
					for (int j = 0; j < aSN7.Count; j++)
					{
						ASN1 safeBag = aSN7[j];
						ReadSafeBag(safeBag);
					}
					break;
				}
				case "1.2.840.113549.1.7.3":
					throw new NotImplementedException("public key encrypted");
				default:
					throw new ArgumentException("unknown authenticatedSafe");
				}
			}
		}

		~PKCS12()
		{
			if (_password != null)
			{
				Array.Clear(_password, 0, _password.Length);
			}
			_password = null;
		}

		private bool Compare(byte[] expected, byte[] actual)
		{
			bool result = false;
			if (expected.Length == actual.Length)
			{
				for (int i = 0; i < expected.Length; i++)
				{
					if (expected[i] != actual[i])
					{
						return false;
					}
				}
				result = true;
			}
			return result;
		}

		private SymmetricAlgorithm GetSymmetricAlgorithm(string algorithmOid, byte[] salt, int iterationCount)
		{
			string text = null;
			int size = 8;
			int num = 8;
			DeriveBytes deriveBytes = new DeriveBytes();
			deriveBytes.Password = _password;
			deriveBytes.Salt = salt;
			deriveBytes.IterationCount = iterationCount;
			switch (algorithmOid)
			{
			case "1.2.840.113549.1.5.1":
				deriveBytes.HashName = "MD2";
				text = "DES";
				break;
			case "1.2.840.113549.1.5.3":
				deriveBytes.HashName = "MD5";
				text = "DES";
				break;
			case "1.2.840.113549.1.5.4":
				deriveBytes.HashName = "MD2";
				text = "RC2";
				size = 4;
				break;
			case "1.2.840.113549.1.5.6":
				deriveBytes.HashName = "MD5";
				text = "RC2";
				size = 4;
				break;
			case "1.2.840.113549.1.5.10":
				deriveBytes.HashName = "SHA1";
				text = "DES";
				break;
			case "1.2.840.113549.1.5.11":
				deriveBytes.HashName = "SHA1";
				text = "RC2";
				size = 4;
				break;
			case "1.2.840.113549.1.12.1.1":
				deriveBytes.HashName = "SHA1";
				text = "RC4";
				size = 16;
				num = 0;
				break;
			case "1.2.840.113549.1.12.1.2":
				deriveBytes.HashName = "SHA1";
				text = "RC4";
				size = 5;
				num = 0;
				break;
			case "1.2.840.113549.1.12.1.3":
				deriveBytes.HashName = "SHA1";
				text = "TripleDES";
				size = 24;
				break;
			case "1.2.840.113549.1.12.1.4":
				deriveBytes.HashName = "SHA1";
				text = "TripleDES";
				size = 16;
				break;
			case "1.2.840.113549.1.12.1.5":
				deriveBytes.HashName = "SHA1";
				text = "RC2";
				size = 16;
				break;
			case "1.2.840.113549.1.12.1.6":
				deriveBytes.HashName = "SHA1";
				text = "RC2";
				size = 5;
				break;
			default:
				throw new NotSupportedException("unknown oid " + text);
			}
			SymmetricAlgorithm symmetricAlgorithm = null;
			symmetricAlgorithm = SymmetricAlgorithm.Create(text);
			symmetricAlgorithm.Key = deriveBytes.DeriveKey(size);
			if (num > 0)
			{
				symmetricAlgorithm.IV = deriveBytes.DeriveIV(num);
				symmetricAlgorithm.Mode = CipherMode.CBC;
			}
			return symmetricAlgorithm;
		}

		public byte[] Decrypt(string algorithmOid, byte[] salt, int iterationCount, byte[] encryptedData)
		{
			SymmetricAlgorithm symmetricAlgorithm = null;
			byte[] array = null;
			try
			{
				symmetricAlgorithm = GetSymmetricAlgorithm(algorithmOid, salt, iterationCount);
				return symmetricAlgorithm.CreateDecryptor().TransformFinalBlock(encryptedData, 0, encryptedData.Length);
			}
			finally
			{
				symmetricAlgorithm?.Clear();
			}
		}

		public byte[] Decrypt(PKCS7.EncryptedData ed)
		{
			return Decrypt(ed.EncryptionAlgorithm.ContentType, ed.EncryptionAlgorithm.Content[0].Value, ASN1Convert.ToInt32(ed.EncryptionAlgorithm.Content[1]), ed.EncryptedContent);
		}

		public byte[] Encrypt(string algorithmOid, byte[] salt, int iterationCount, byte[] data)
		{
			byte[] array = null;
			using SymmetricAlgorithm symmetricAlgorithm = GetSymmetricAlgorithm(algorithmOid, salt, iterationCount);
			return symmetricAlgorithm.CreateEncryptor().TransformFinalBlock(data, 0, data.Length);
		}

		private DSAParameters GetExistingParameters(out bool found)
		{
			foreach (X509Certificate certificate in Certificates)
			{
				if (certificate.KeyAlgorithmParameters != null)
				{
					DSA dSA = certificate.DSA;
					if (dSA != null)
					{
						found = true;
						return dSA.ExportParameters(includePrivateParameters: false);
					}
				}
			}
			found = false;
			return default(DSAParameters);
		}

		private void AddPrivateKey(PKCS8.PrivateKeyInfo pki)
		{
			byte[] privateKey = pki.PrivateKey;
			switch (privateKey[0])
			{
			case 2:
			{
				bool found;
				DSAParameters existingParameters = GetExistingParameters(out found);
				if (found)
				{
					_keyBags.Add(PKCS8.PrivateKeyInfo.DecodeDSA(privateKey, existingParameters));
				}
				break;
			}
			case 48:
				_keyBags.Add(PKCS8.PrivateKeyInfo.DecodeRSA(privateKey));
				break;
			default:
				Array.Clear(privateKey, 0, privateKey.Length);
				throw new CryptographicException("Unknown private key format");
			}
			Array.Clear(privateKey, 0, privateKey.Length);
		}

		private void ReadSafeBag(ASN1 safeBag)
		{
			if (safeBag.Tag != 48)
			{
				throw new ArgumentException("invalid safeBag");
			}
			ASN1 aSN = safeBag[0];
			if (aSN.Tag != 6)
			{
				throw new ArgumentException("invalid safeBag id");
			}
			ASN1 aSN2 = safeBag[1];
			string text = ASN1Convert.ToOid(aSN);
			switch (text)
			{
			case "1.2.840.113549.1.12.10.1.1":
				AddPrivateKey(new PKCS8.PrivateKeyInfo(aSN2.Value));
				break;
			case "1.2.840.113549.1.12.10.1.2":
			{
				PKCS8.EncryptedPrivateKeyInfo encryptedPrivateKeyInfo = new PKCS8.EncryptedPrivateKeyInfo(aSN2.Value);
				byte[] array = Decrypt(encryptedPrivateKeyInfo.Algorithm, encryptedPrivateKeyInfo.Salt, encryptedPrivateKeyInfo.IterationCount, encryptedPrivateKeyInfo.EncryptedData);
				AddPrivateKey(new PKCS8.PrivateKeyInfo(array));
				Array.Clear(array, 0, array.Length);
				break;
			}
			case "1.2.840.113549.1.12.10.1.3":
			{
				PKCS7.ContentInfo contentInfo = new PKCS7.ContentInfo(aSN2.Value);
				if (contentInfo.ContentType != "1.2.840.113549.1.9.22.1")
				{
					throw new NotSupportedException("unsupport certificate type");
				}
				X509Certificate value2 = new X509Certificate(contentInfo.Content[0].Value);
				_certs.Add(value2);
				break;
			}
			case "1.2.840.113549.1.12.10.1.5":
			{
				byte[] value = aSN2.Value;
				_secretBags.Add(value);
				break;
			}
			default:
				throw new ArgumentException("unknown safeBag oid");
			case "1.2.840.113549.1.12.10.1.4":
			case "1.2.840.113549.1.12.10.1.6":
				break;
			}
			if (safeBag.Count > 2)
			{
				ASN1 aSN3 = safeBag[2];
				if (aSN3.Tag != 49)
				{
					throw new ArgumentException("invalid safeBag attributes id");
				}
				for (int i = 0; i < aSN3.Count; i++)
				{
					ASN1 aSN4 = aSN3[i];
					if (aSN4.Tag != 48)
					{
						throw new ArgumentException("invalid PKCS12 attributes id");
					}
					ASN1 aSN5 = aSN4[0];
					if (aSN5.Tag != 6)
					{
						throw new ArgumentException("invalid attribute id");
					}
					string text2 = ASN1Convert.ToOid(aSN5);
					ASN1 aSN6 = aSN4[1];
					for (int j = 0; j < aSN6.Count; j++)
					{
						ASN1 aSN7 = aSN6[j];
						if (!(text2 == "1.2.840.113549.1.9.20"))
						{
							if (text2 == "1.2.840.113549.1.9.21" && aSN7.Tag != 4)
							{
								throw new ArgumentException("invalid attribute value id");
							}
						}
						else if (aSN7.Tag != 30)
						{
							throw new ArgumentException("invalid attribute value id");
						}
					}
				}
			}
			_safeBags.Add(new SafeBag(text, safeBag));
		}

		private ASN1 Pkcs8ShroudedKeyBagSafeBag(AsymmetricAlgorithm aa, IDictionary attributes)
		{
			PKCS8.PrivateKeyInfo privateKeyInfo = new PKCS8.PrivateKeyInfo();
			if (aa is RSA)
			{
				privateKeyInfo.Algorithm = "1.2.840.113549.1.1.1";
				privateKeyInfo.PrivateKey = PKCS8.PrivateKeyInfo.Encode((RSA)aa);
			}
			else
			{
				if (!(aa is DSA))
				{
					throw new CryptographicException("Unknown asymmetric algorithm {0}", aa.ToString());
				}
				privateKeyInfo.Algorithm = null;
				privateKeyInfo.PrivateKey = PKCS8.PrivateKeyInfo.Encode((DSA)aa);
			}
			PKCS8.EncryptedPrivateKeyInfo encryptedPrivateKeyInfo = new PKCS8.EncryptedPrivateKeyInfo();
			encryptedPrivateKeyInfo.Algorithm = "1.2.840.113549.1.12.1.3";
			encryptedPrivateKeyInfo.IterationCount = _iterations;
			encryptedPrivateKeyInfo.EncryptedData = Encrypt("1.2.840.113549.1.12.1.3", encryptedPrivateKeyInfo.Salt, _iterations, privateKeyInfo.GetBytes());
			ASN1 aSN = new ASN1(48);
			aSN.Add(ASN1Convert.FromOid("1.2.840.113549.1.12.10.1.2"));
			ASN1 aSN2 = new ASN1(160);
			aSN2.Add(new ASN1(encryptedPrivateKeyInfo.GetBytes()));
			aSN.Add(aSN2);
			if (attributes != null)
			{
				ASN1 aSN3 = new ASN1(49);
				IDictionaryEnumerator enumerator = attributes.GetEnumerator();
				while (enumerator.MoveNext())
				{
					string text = (string)enumerator.Key;
					if (!(text == "1.2.840.113549.1.9.20"))
					{
						if (!(text == "1.2.840.113549.1.9.21"))
						{
							continue;
						}
						ArrayList arrayList = (ArrayList)enumerator.Value;
						if (arrayList.Count <= 0)
						{
							continue;
						}
						ASN1 aSN4 = new ASN1(48);
						aSN4.Add(ASN1Convert.FromOid("1.2.840.113549.1.9.21"));
						ASN1 aSN5 = new ASN1(49);
						foreach (byte[] item in arrayList)
						{
							ASN1 aSN6 = new ASN1(4);
							aSN6.Value = item;
							aSN5.Add(aSN6);
						}
						aSN4.Add(aSN5);
						aSN3.Add(aSN4);
						continue;
					}
					ArrayList arrayList2 = (ArrayList)enumerator.Value;
					if (arrayList2.Count <= 0)
					{
						continue;
					}
					ASN1 aSN7 = new ASN1(48);
					aSN7.Add(ASN1Convert.FromOid("1.2.840.113549.1.9.20"));
					ASN1 aSN8 = new ASN1(49);
					foreach (byte[] item2 in arrayList2)
					{
						ASN1 aSN9 = new ASN1(30);
						aSN9.Value = item2;
						aSN8.Add(aSN9);
					}
					aSN7.Add(aSN8);
					aSN3.Add(aSN7);
				}
				if (aSN3.Count > 0)
				{
					aSN.Add(aSN3);
				}
			}
			return aSN;
		}

		private ASN1 KeyBagSafeBag(AsymmetricAlgorithm aa, IDictionary attributes)
		{
			PKCS8.PrivateKeyInfo privateKeyInfo = new PKCS8.PrivateKeyInfo();
			if (aa is RSA)
			{
				privateKeyInfo.Algorithm = "1.2.840.113549.1.1.1";
				privateKeyInfo.PrivateKey = PKCS8.PrivateKeyInfo.Encode((RSA)aa);
			}
			else
			{
				if (!(aa is DSA))
				{
					throw new CryptographicException("Unknown asymmetric algorithm {0}", aa.ToString());
				}
				privateKeyInfo.Algorithm = null;
				privateKeyInfo.PrivateKey = PKCS8.PrivateKeyInfo.Encode((DSA)aa);
			}
			ASN1 aSN = new ASN1(48);
			aSN.Add(ASN1Convert.FromOid("1.2.840.113549.1.12.10.1.1"));
			ASN1 aSN2 = new ASN1(160);
			aSN2.Add(new ASN1(privateKeyInfo.GetBytes()));
			aSN.Add(aSN2);
			if (attributes != null)
			{
				ASN1 aSN3 = new ASN1(49);
				IDictionaryEnumerator enumerator = attributes.GetEnumerator();
				while (enumerator.MoveNext())
				{
					string text = (string)enumerator.Key;
					if (!(text == "1.2.840.113549.1.9.20"))
					{
						if (!(text == "1.2.840.113549.1.9.21"))
						{
							continue;
						}
						ArrayList arrayList = (ArrayList)enumerator.Value;
						if (arrayList.Count <= 0)
						{
							continue;
						}
						ASN1 aSN4 = new ASN1(48);
						aSN4.Add(ASN1Convert.FromOid("1.2.840.113549.1.9.21"));
						ASN1 aSN5 = new ASN1(49);
						foreach (byte[] item in arrayList)
						{
							ASN1 aSN6 = new ASN1(4);
							aSN6.Value = item;
							aSN5.Add(aSN6);
						}
						aSN4.Add(aSN5);
						aSN3.Add(aSN4);
						continue;
					}
					ArrayList arrayList2 = (ArrayList)enumerator.Value;
					if (arrayList2.Count <= 0)
					{
						continue;
					}
					ASN1 aSN7 = new ASN1(48);
					aSN7.Add(ASN1Convert.FromOid("1.2.840.113549.1.9.20"));
					ASN1 aSN8 = new ASN1(49);
					foreach (byte[] item2 in arrayList2)
					{
						ASN1 aSN9 = new ASN1(30);
						aSN9.Value = item2;
						aSN8.Add(aSN9);
					}
					aSN7.Add(aSN8);
					aSN3.Add(aSN7);
				}
				if (aSN3.Count > 0)
				{
					aSN.Add(aSN3);
				}
			}
			return aSN;
		}

		private ASN1 SecretBagSafeBag(byte[] secret, IDictionary attributes)
		{
			ASN1 aSN = new ASN1(48);
			aSN.Add(ASN1Convert.FromOid("1.2.840.113549.1.12.10.1.5"));
			ASN1 asn = new ASN1(128, secret);
			aSN.Add(asn);
			if (attributes != null)
			{
				ASN1 aSN2 = new ASN1(49);
				IDictionaryEnumerator enumerator = attributes.GetEnumerator();
				while (enumerator.MoveNext())
				{
					string text = (string)enumerator.Key;
					if (!(text == "1.2.840.113549.1.9.20"))
					{
						if (!(text == "1.2.840.113549.1.9.21"))
						{
							continue;
						}
						ArrayList arrayList = (ArrayList)enumerator.Value;
						if (arrayList.Count <= 0)
						{
							continue;
						}
						ASN1 aSN3 = new ASN1(48);
						aSN3.Add(ASN1Convert.FromOid("1.2.840.113549.1.9.21"));
						ASN1 aSN4 = new ASN1(49);
						foreach (byte[] item in arrayList)
						{
							ASN1 aSN5 = new ASN1(4);
							aSN5.Value = item;
							aSN4.Add(aSN5);
						}
						aSN3.Add(aSN4);
						aSN2.Add(aSN3);
						continue;
					}
					ArrayList arrayList2 = (ArrayList)enumerator.Value;
					if (arrayList2.Count <= 0)
					{
						continue;
					}
					ASN1 aSN6 = new ASN1(48);
					aSN6.Add(ASN1Convert.FromOid("1.2.840.113549.1.9.20"));
					ASN1 aSN7 = new ASN1(49);
					foreach (byte[] item2 in arrayList2)
					{
						ASN1 aSN8 = new ASN1(30);
						aSN8.Value = item2;
						aSN7.Add(aSN8);
					}
					aSN6.Add(aSN7);
					aSN2.Add(aSN6);
				}
				if (aSN2.Count > 0)
				{
					aSN.Add(aSN2);
				}
			}
			return aSN;
		}

		private ASN1 CertificateSafeBag(X509Certificate x509, IDictionary attributes)
		{
			ASN1 asn = new ASN1(4, x509.RawData);
			PKCS7.ContentInfo contentInfo = new PKCS7.ContentInfo();
			contentInfo.ContentType = "1.2.840.113549.1.9.22.1";
			contentInfo.Content.Add(asn);
			ASN1 aSN = new ASN1(160);
			aSN.Add(contentInfo.ASN1);
			ASN1 aSN2 = new ASN1(48);
			aSN2.Add(ASN1Convert.FromOid("1.2.840.113549.1.12.10.1.3"));
			aSN2.Add(aSN);
			if (attributes != null)
			{
				ASN1 aSN3 = new ASN1(49);
				IDictionaryEnumerator enumerator = attributes.GetEnumerator();
				while (enumerator.MoveNext())
				{
					string text = (string)enumerator.Key;
					if (!(text == "1.2.840.113549.1.9.20"))
					{
						if (!(text == "1.2.840.113549.1.9.21"))
						{
							continue;
						}
						ArrayList arrayList = (ArrayList)enumerator.Value;
						if (arrayList.Count <= 0)
						{
							continue;
						}
						ASN1 aSN4 = new ASN1(48);
						aSN4.Add(ASN1Convert.FromOid("1.2.840.113549.1.9.21"));
						ASN1 aSN5 = new ASN1(49);
						foreach (byte[] item in arrayList)
						{
							ASN1 aSN6 = new ASN1(4);
							aSN6.Value = item;
							aSN5.Add(aSN6);
						}
						aSN4.Add(aSN5);
						aSN3.Add(aSN4);
						continue;
					}
					ArrayList arrayList2 = (ArrayList)enumerator.Value;
					if (arrayList2.Count <= 0)
					{
						continue;
					}
					ASN1 aSN7 = new ASN1(48);
					aSN7.Add(ASN1Convert.FromOid("1.2.840.113549.1.9.20"));
					ASN1 aSN8 = new ASN1(49);
					foreach (byte[] item2 in arrayList2)
					{
						ASN1 aSN9 = new ASN1(30);
						aSN9.Value = item2;
						aSN8.Add(aSN9);
					}
					aSN7.Add(aSN8);
					aSN3.Add(aSN7);
				}
				if (aSN3.Count > 0)
				{
					aSN2.Add(aSN3);
				}
			}
			return aSN2;
		}

		private byte[] MAC(byte[] password, byte[] salt, int iterations, byte[] data)
		{
			DeriveBytes deriveBytes = new DeriveBytes();
			deriveBytes.HashName = "SHA1";
			deriveBytes.Password = password;
			deriveBytes.Salt = salt;
			deriveBytes.IterationCount = iterations;
			HMACSHA1 obj = (HMACSHA1)System.Security.Cryptography.HMAC.Create();
			obj.Key = deriveBytes.DeriveMAC(20);
			return obj.ComputeHash(data, 0, data.Length);
		}

		public byte[] GetBytes()
		{
			ASN1 aSN = new ASN1(48);
			ArrayList arrayList = new ArrayList();
			foreach (SafeBag safeBag5 in _safeBags)
			{
				if (safeBag5.BagOID.Equals("1.2.840.113549.1.12.10.1.3"))
				{
					PKCS7.ContentInfo contentInfo = new PKCS7.ContentInfo(safeBag5.ASN1[1].Value);
					arrayList.Add(new X509Certificate(contentInfo.Content[0].Value));
				}
			}
			ArrayList arrayList2 = new ArrayList();
			ArrayList arrayList3 = new ArrayList();
			foreach (X509Certificate certificate in Certificates)
			{
				bool flag = false;
				foreach (X509Certificate item in arrayList)
				{
					if (Compare(certificate.RawData, item.RawData))
					{
						flag = true;
					}
				}
				if (!flag)
				{
					arrayList2.Add(certificate);
				}
			}
			foreach (X509Certificate item2 in arrayList)
			{
				bool flag2 = false;
				foreach (X509Certificate certificate2 in Certificates)
				{
					if (Compare(item2.RawData, certificate2.RawData))
					{
						flag2 = true;
					}
				}
				if (!flag2)
				{
					arrayList3.Add(item2);
				}
			}
			foreach (X509Certificate item3 in arrayList3)
			{
				RemoveCertificate(item3);
			}
			foreach (X509Certificate item4 in arrayList2)
			{
				AddCertificate(item4);
			}
			if (_safeBags.Count > 0)
			{
				ASN1 aSN2 = new ASN1(48);
				foreach (SafeBag safeBag6 in _safeBags)
				{
					if (safeBag6.BagOID.Equals("1.2.840.113549.1.12.10.1.3"))
					{
						aSN2.Add(safeBag6.ASN1);
					}
				}
				if (aSN2.Count > 0)
				{
					PKCS7.ContentInfo contentInfo2 = EncryptedContentInfo(aSN2, "1.2.840.113549.1.12.1.3");
					aSN.Add(contentInfo2.ASN1);
				}
			}
			if (_safeBags.Count > 0)
			{
				ASN1 aSN3 = new ASN1(48);
				foreach (SafeBag safeBag7 in _safeBags)
				{
					if (safeBag7.BagOID.Equals("1.2.840.113549.1.12.10.1.1") || safeBag7.BagOID.Equals("1.2.840.113549.1.12.10.1.2"))
					{
						aSN3.Add(safeBag7.ASN1);
					}
				}
				if (aSN3.Count > 0)
				{
					ASN1 aSN4 = new ASN1(160);
					aSN4.Add(new ASN1(4, aSN3.GetBytes()));
					PKCS7.ContentInfo contentInfo3 = new PKCS7.ContentInfo("1.2.840.113549.1.7.1");
					contentInfo3.Content = aSN4;
					aSN.Add(contentInfo3.ASN1);
				}
			}
			if (_safeBags.Count > 0)
			{
				ASN1 aSN5 = new ASN1(48);
				foreach (SafeBag safeBag8 in _safeBags)
				{
					if (safeBag8.BagOID.Equals("1.2.840.113549.1.12.10.1.5"))
					{
						aSN5.Add(safeBag8.ASN1);
					}
				}
				if (aSN5.Count > 0)
				{
					PKCS7.ContentInfo contentInfo4 = EncryptedContentInfo(aSN5, "1.2.840.113549.1.12.1.3");
					aSN.Add(contentInfo4.ASN1);
				}
			}
			ASN1 asn = new ASN1(4, aSN.GetBytes());
			ASN1 aSN6 = new ASN1(160);
			aSN6.Add(asn);
			PKCS7.ContentInfo contentInfo5 = new PKCS7.ContentInfo("1.2.840.113549.1.7.1");
			contentInfo5.Content = aSN6;
			ASN1 aSN7 = new ASN1(48);
			if (_password != null)
			{
				byte[] array = new byte[20];
				RNG.GetBytes(array);
				byte[] d

Room Architect Tool_Data/Managed/Mono.WebBrowser.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using Mono.Mozilla;
using Mono.Mozilla.DOM;
using Mono.WebBrowser;
using Mono.WebBrowser.DOM;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("Mono.WebBrowser")]
[assembly: AssemblyDescription("Managed Wrapper for xulrunner engine, to support WebBrowser")]
[assembly: AssemblyConfiguration("Development version")]
[assembly: AssemblyProduct("Mono.WebBrowser")]
[assembly: AssemblyCopyright("(c) 2007, 2008 Andreia Gaita")]
[assembly: AssemblyInformationalVersion("4.6.57.0")]
[assembly: AssemblyFileVersion("4.6.57.0")]
[assembly: AssemblyDelaySign(true)]
[assembly: AssemblyVersion("4.0.0.0")]
internal static class Consts
{
	public const string MonoVersion = "5.11.0.0";

	public const string MonoCompany = "Mono development team";

	public const string MonoProduct = "Mono Common Language Infrastructure";

	public const string MonoCopyright = "(c) Various Mono authors";

	public const int MonoCorlibVersion = 1051100001;

	public const string FxVersion = "4.0.0.0";

	public const string FxFileVersion = "4.6.57.0";

	public const string EnvironmentVersion = "4.0.30319.42000";

	public const string VsVersion = "0.0.0.0";

	public const string VsFileVersion = "11.0.0.0";

	private const string PublicKeyToken = "b77a5c561934e089";

	public const string AssemblyI18N = "I18N, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMicrosoft_JScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMono_Http = "Mono.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Posix = "Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Security = "Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Messaging_RabbitMQ = "Mono.Messaging.RabbitMQ, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyCorlib = "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Data = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Design = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing_Design = "System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Messaging = "System.Messaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Security = "System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Web = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Core = "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string WindowsBase_3_0 = "WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
namespace Mono.WebBrowser
{
	public class Exception : System.Exception
	{
		internal enum ErrorCodes
		{
			Other,
			GluezillaInit,
			EngineNotSupported,
			ServiceManager,
			IOService,
			DirectoryService,
			PrefService,
			StreamNotOpen,
			Navigation,
			AccessibilityService,
			DocumentEncoderService
		}

		private ErrorCodes code;

		private static ArrayList messages;

		internal ErrorCodes ErrorCode => code;

		static Exception()
		{
			messages = new ArrayList();
			messages.Insert(0, string.Intern("A critical error occurred."));
			messages.Insert(1, string.Intern("An error occurred while initializing gluezilla. Please make sure you have libgluezilla installed."));
			messages.Insert(2, string.Intern("Browser engine not supported at this time: "));
			messages.Insert(3, string.Intern("Error obtaining a handle to the service manager."));
			messages.Insert(4, string.Intern("Error obtaining a handle to the io service."));
			messages.Insert(5, string.Intern("Error obtaining a handle to the directory service."));
			messages.Insert(6, string.Intern("Error obtaining a handle to the preferences service."));
			messages.Insert(7, string.Intern("Stream is not open for writing. Call OpenStream before appending."));
			messages.Insert(8, string.Intern("An error occurred while initializing the navigation object."));
			messages.Insert(9, string.Intern("Error obtaining a handle to the accessibility service."));
			messages.Insert(10, string.Intern("Error obtaining a handle to the document encoder service."));
		}

		internal Exception(ErrorCodes code)
			: base(GetMessage(code, string.Empty))
		{
			this.code = code;
		}

		internal Exception(ErrorCodes code, string message)
			: base(GetMessage(code, message))
		{
			this.code = code;
		}

		internal Exception(ErrorCodes code, System.Exception innerException)
			: base(GetMessage(code, string.Empty), innerException)
		{
			this.code = code;
		}

		internal Exception(ErrorCodes code, string message, Exception innerException)
			: base(GetMessage(code, message), innerException)
		{
			this.code = code;
		}

		private static string GetMessage(ErrorCodes code, string message)
		{
			return (messages[(int)code] as string) + " " + message;
		}
	}
	public interface IWebBrowser
	{
		bool Initialized { get; }

		IWindow Window { get; }

		IDocument Document { get; }

		bool Offline { get; set; }

		INavigation Navigation { get; }

		event NodeEventHandler KeyDown;

		event NodeEventHandler KeyPress;

		event NodeEventHandler KeyUp;

		event NodeEventHandler MouseClick;

		event NodeEventHandler MouseDoubleClick;

		event NodeEventHandler MouseDown;

		event NodeEventHandler MouseEnter;

		event NodeEventHandler MouseLeave;

		event NodeEventHandler MouseMove;

		event NodeEventHandler MouseUp;

		event EventHandler Focus;

		event CreateNewWindowEventHandler CreateNewWindow;

		event AlertEventHandler Alert;

		event LoadStartedEventHandler LoadStarted;

		event LoadCommitedEventHandler LoadCommited;

		event ProgressChangedEventHandler ProgressChanged;

		event LoadFinishedEventHandler LoadFinished;

		event StatusChangedEventHandler StatusChanged;

		event SecurityChangedEventHandler SecurityChanged;

		event ContextMenuEventHandler ContextMenuShown;

		event NavigationRequestedEventHandler NavigationRequested;

		bool Load(IntPtr handle, int width, int height);

		void Shutdown();

		void FocusIn(FocusOption focus);

		void FocusOut();

		void Activate();

		void Deactivate();

		void Resize(int width, int height);

		void Render(byte[] data);

		void Render(string html);

		void Render(string html, string uri, string contentType);

		void ExecuteScript(string script);
	}
	public enum ReloadOption : uint
	{
		None,
		Proxy,
		Full
	}
	public enum FocusOption
	{
		None,
		FocusFirstElement,
		FocusLastElement
	}
	[Flags]
	public enum DialogButtonFlags
	{
		BUTTON_POS_0 = 1,
		BUTTON_POS_1 = 0x100,
		BUTTON_POS_2 = 0x10000,
		BUTTON_TITLE_OK = 1,
		BUTTON_TITLE_CANCEL = 2,
		BUTTON_TITLE_YES = 3,
		BUTTON_TITLE_NO = 4,
		BUTTON_TITLE_SAVE = 5,
		BUTTON_TITLE_DONT_SAVE = 6,
		BUTTON_TITLE_REVERT = 7,
		BUTTON_TITLE_IS_STRING = 0x7F,
		BUTTON_POS_0_DEFAULT = 0,
		BUTTON_POS_1_DEFAULT = 0x1000000,
		BUTTON_POS_2_DEFAULT = 0x2000000,
		BUTTON_DELAY_ENABLE = 0x4000000,
		STD_OK_CANCEL_BUTTONS = 0x201
	}
	public enum DialogType
	{
		Alert = 1,
		AlertCheck,
		Confirm,
		ConfirmEx,
		ConfirmCheck,
		Prompt,
		PromptUsernamePassword,
		PromptPassword,
		Select
	}
	public enum Platform
	{
		Unknown,
		Winforms,
		Gtk
	}
	public enum SecurityLevel
	{
		Insecure = 1,
		Mixed,
		Secure
	}
	public delegate bool CreateNewWindowEventHandler(object sender, CreateNewWindowEventArgs e);
	public class CreateNewWindowEventArgs : EventArgs
	{
		private bool isModal;

		public bool IsModal => isModal;

		public CreateNewWindowEventArgs(bool isModal)
		{
			this.isModal = isModal;
		}
	}
	public delegate void AlertEventHandler(object sender, AlertEventArgs e);
	public class AlertEventArgs : EventArgs
	{
		private DialogType type;

		private string title;

		private string text;

		private string text2;

		private string username;

		private string password;

		private string checkMsg;

		private bool checkState;

		private DialogButtonFlags dialogButtons;

		private StringCollection buttons;

		private StringCollection options;

		private object returnValue;

		public DialogType Type
		{
			get
			{
				return type;
			}
			set
			{
				type = value;
			}
		}

		public string Title
		{
			get
			{
				return title;
			}
			set
			{
				title = value;
			}
		}

		public string Text
		{
			get
			{
				return text;
			}
			set
			{
				text = value;
			}
		}

		public string Text2
		{
			get
			{
				return text2;
			}
			set
			{
				text2 = value;
			}
		}

		public string CheckMessage
		{
			get
			{
				return checkMsg;
			}
			set
			{
				checkMsg = value;
			}
		}

		public bool CheckState
		{
			get
			{
				return checkState;
			}
			set
			{
				checkState = value;
			}
		}

		public DialogButtonFlags DialogButtons
		{
			get
			{
				return dialogButtons;
			}
			set
			{
				dialogButtons = value;
			}
		}

		public StringCollection Buttons
		{
			get
			{
				return buttons;
			}
			set
			{
				buttons = value;
			}
		}

		public StringCollection Options
		{
			get
			{
				return options;
			}
			set
			{
				options = value;
			}
		}

		public string Username
		{
			get
			{
				return username;
			}
			set
			{
				username = value;
			}
		}

		public string Password
		{
			get
			{
				return password;
			}
			set
			{
				password = value;
			}
		}

		public bool BoolReturn
		{
			get
			{
				if (returnValue is bool)
				{
					return (bool)returnValue;
				}
				return false;
			}
			set
			{
				returnValue = value;
			}
		}

		public int IntReturn
		{
			get
			{
				if (returnValue is int)
				{
					return (int)returnValue;
				}
				return -1;
			}
			set
			{
				returnValue = value;
			}
		}

		public string StringReturn
		{
			get
			{
				if (returnValue is string)
				{
					return (string)returnValue;
				}
				return string.Empty;
			}
			set
			{
				returnValue = value;
			}
		}
	}
	public delegate void StatusChangedEventHandler(object sender, StatusChangedEventArgs e);
	public class StatusChangedEventArgs : EventArgs
	{
		private string message;

		private int status;

		public string Message
		{
			get
			{
				return message;
			}
			set
			{
				message = value;
			}
		}

		public int Status
		{
			get
			{
				return status;
			}
			set
			{
				status = value;
			}
		}

		public StatusChangedEventArgs(string message, int status)
		{
			this.message = message;
			this.status = status;
		}
	}
	public delegate void ProgressChangedEventHandler(object sender, ProgressChangedEventArgs e);
	public class ProgressChangedEventArgs : EventArgs
	{
		private int progress;

		private int maxProgress;

		public int Progress => progress;

		public int MaxProgress => maxProgress;

		public ProgressChangedEventArgs(int progress, int maxProgress)
		{
			this.progress = progress;
			this.maxProgress = maxProgress;
		}
	}
	public delegate void LoadStartedEventHandler(object sender, LoadStartedEventArgs e);
	public class LoadStartedEventArgs : CancelEventArgs
	{
		private string uri;

		private string frameName;

		public string Uri => uri;

		public string FrameName => frameName;

		public LoadStartedEventArgs(string uri, string frameName)
		{
			this.uri = uri;
			this.frameName = frameName;
		}
	}
	public delegate void LoadCommitedEventHandler(object sender, LoadCommitedEventArgs e);
	public class LoadCommitedEventArgs : EventArgs
	{
		private string uri;

		public string Uri => uri;

		public LoadCommitedEventArgs(string uri)
		{
			this.uri = uri;
		}
	}
	public delegate void LoadFinishedEventHandler(object sender, LoadFinishedEventArgs e);
	public class LoadFinishedEventArgs : EventArgs
	{
		private string uri;

		public string Uri => uri;

		public LoadFinishedEventArgs(string uri)
		{
			this.uri = uri;
		}
	}
	public delegate void SecurityChangedEventHandler(object sender, SecurityChangedEventArgs e);
	public class SecurityChangedEventArgs : EventArgs
	{
		private SecurityLevel state;

		public SecurityLevel State
		{
			get
			{
				return state;
			}
			set
			{
				state = value;
			}
		}

		public SecurityChangedEventArgs(SecurityLevel state)
		{
			this.state = state;
		}
	}
	public delegate void ContextMenuEventHandler(object sender, ContextMenuEventArgs e);
	public class ContextMenuEventArgs : EventArgs
	{
		private int x;

		private int y;

		public int X => x;

		public int Y => y;

		public ContextMenuEventArgs(int x, int y)
		{
			this.x = x;
			this.y = y;
		}
	}
	public delegate void NavigationRequestedEventHandler(object sender, NavigationRequestedEventArgs e);
	public class NavigationRequestedEventArgs : CancelEventArgs
	{
		private string uri;

		public string Uri => uri;

		public NavigationRequestedEventArgs(string uri)
		{
			this.uri = uri;
		}
	}
	public sealed class Manager
	{
		public static IWebBrowser GetNewInstance()
		{
			return GetNewInstance(Platform.Winforms);
		}

		public static IWebBrowser GetNewInstance(Platform platform)
		{
			string text = Environment.GetEnvironmentVariable("MONO_BROWSER_ENGINE");
			if (text == "webkit")
			{
				try
				{
					return (IWebBrowser)Assembly.LoadWithPartialName("mono-webkit").CreateInstance("Mono.WebKit.WebBrowser");
				}
				catch
				{
					text = null;
				}
			}
			if (text == null || text == "mozilla")
			{
				return new Mono.Mozilla.WebBrowser(platform);
			}
			throw new Exception(Exception.ErrorCodes.EngineNotSupported, text);
		}
	}
}
namespace Mono.WebBrowser.DOM
{
	public class NodeEventArgs : EventArgs
	{
		private INode node;

		public INode Node => node;

		public IElement Element
		{
			get
			{
				if (node is IElement)
				{
					return (IElement)node;
				}
				return null;
			}
		}

		public IDocument Document
		{
			get
			{
				if (node is IDocument)
				{
					return (IDocument)node;
				}
				return null;
			}
		}

		public NodeEventArgs(INode node)
		{
			this.node = node;
		}
	}
	public class WindowEventArgs : EventArgs
	{
		private IWindow window;

		public IWindow Window => window;

		public WindowEventArgs(IWindow window)
		{
			this.window = window;
		}
	}
	public delegate void NodeEventHandler(object sender, NodeEventArgs e);
	public delegate void WindowEventHandler(object sender, WindowEventArgs e);
	public interface IAttribute : INode
	{
		string Name { get; }

		new int GetHashCode();
	}
	public interface IAttributeCollection : INodeList, IList, ICollection, IEnumerable
	{
		IAttribute this[string name] { get; }

		bool Exists(string name);

		new int GetHashCode();
	}
	public interface IDOMImplementation
	{
		bool HasFeature(string feature, string version);

		IDocumentType CreateDocumentType(string qualifiedName, string publicId, string systemId);

		IDocument CreateDocument(string namespaceURI, string qualifiedName, IDocumentType doctype);
	}
	public interface IDocument : INode
	{
		IElement Active { get; }

		string ActiveLinkColor { get; set; }

		IElementCollection Anchors { get; }

		IElementCollection Applets { get; }

		string Background { get; set; }

		string BackColor { get; set; }

		IElement Body { get; }

		string Charset { get; set; }

		string Cookie { get; set; }

		IElement DocumentElement { get; }

		IDocumentType DocType { get; }

		string Domain { get; }

		string ForeColor { get; set; }

		IElementCollection Forms { get; }

		IElementCollection Images { get; }

		IDOMImplementation Implementation { get; }

		string LinkColor { get; set; }

		IElementCollection Links { get; }

		IStylesheetList Stylesheets { get; }

		string Title { get; set; }

		string Url { get; }

		string VisitedLinkColor { get; set; }

		IWindow Window { get; }

		event EventHandler LoadStopped;

		IAttribute CreateAttribute(string name);

		IElement CreateElement(string tagName);

		IElement GetElementById(string id);

		IElement GetElement(int x, int y);

		IElementCollection GetElementsByTagName(string id);

		void Write(string text);

		string InvokeScript(string script);

		new int GetHashCode();
	}
	public interface IDocumentType : INode
	{
		string Name { get; }

		INamedNodeMap Entities { get; }

		INamedNodeMap Notations { get; }

		string PublicId { get; }

		string SystemId { get; }

		string InternalSubset { get; }
	}
	public interface IElement : INode
	{
		IElementCollection All { get; }

		IElementCollection Children { get; }

		int ClientWidth { get; }

		int ClientHeight { get; }

		int ScrollHeight { get; }

		int ScrollWidth { get; }

		int ScrollLeft { get; set; }

		int ScrollTop { get; set; }

		int OffsetHeight { get; }

		int OffsetWidth { get; }

		int OffsetLeft { get; }

		int OffsetTop { get; }

		IElement OffsetParent { get; }

		string InnerText { get; set; }

		string InnerHTML { get; set; }

		string OuterText { get; set; }

		string OuterHTML { get; set; }

		string Style { get; set; }

		int TabIndex { get; set; }

		string TagName { get; }

		bool Disabled { get; set; }

		System.IO.Stream ContentStream { get; }

		IElement AppendChild(IElement child);

		void Blur();

		void Focus();

		bool HasAttribute(string name);

		string GetAttribute(string name);

		IElementCollection GetElementsByTagName(string id);

		new int GetHashCode();

		void ScrollIntoView(bool alignWithTop);

		void SetAttribute(string name, string value);
	}
	public interface IElementCollection : INodeList, IList, ICollection, IEnumerable
	{
		new IElement this[int index] { get; set; }

		new int GetHashCode();
	}
	public interface IHistory
	{
		int Count { get; }

		void Back(int count);

		void Forward(int count);

		void GoToIndex(int index);

		void GoToUrl(string url);
	}
	public interface IMediaList
	{
	}
	public interface INamedNodeMap : IList, ICollection, IEnumerable
	{
		INode this[string name] { get; set; }

		new INode this[int index] { get; set; }

		INode this[string namespaceURI, string localName] { get; set; }

		INode RemoveNamedItem(string name);

		INode RemoveNamedItemNS(string namespaceURI, string localName);
	}
	public interface INavigation
	{
		bool CanGoBack { get; }

		bool CanGoForward { get; }

		int HistoryCount { get; }

		bool Back();

		bool Forward();

		void Home();

		void Reload();

		void Reload(ReloadOption option);

		void Stop();

		void Go(int index);

		void Go(int index, bool relative);

		void Go(string url);

		void Go(string url, LoadFlags flags);
	}
	[Flags]
	public enum LoadFlags : uint
	{
		None = 0u,
		AsMetaRefresh = 0x10u,
		AsLinkClick = 0x20u,
		BypassHistory = 0x40u,
		ReplaceHistory = 0x80u,
		BypassLocalCache = 0x100u,
		BypassProxy = 0x200u,
		CharsetChange = 0x400u
	}
	public interface INode
	{
		IAttributeCollection Attributes { get; }

		INodeList ChildNodes { get; }

		INode FirstChild { get; }

		INode LastChild { get; }

		string LocalName { get; }

		INode Next { get; }

		IDocument Owner { get; }

		INode Parent { get; }

		INode Previous { get; }

		NodeType Type { get; }

		string Value { get; set; }

		IntPtr AccessibleObject { get; }

		event NodeEventHandler Click;

		event NodeEventHandler DoubleClick;

		event NodeEventHandler KeyDown;

		event NodeEventHandler KeyPress;

		event NodeEventHandler KeyUp;

		event NodeEventHandler MouseDown;

		event NodeEventHandler MouseEnter;

		event NodeEventHandler MouseLeave;

		event NodeEventHandler MouseMove;

		event NodeEventHandler MouseOver;

		event NodeEventHandler MouseUp;

		event NodeEventHandler OnFocus;

		event NodeEventHandler OnBlur;

		INode InsertBefore(INode newChild, INode refChild);

		INode ReplaceChild(INode newChild, INode oldChild);

		INode RemoveChild(INode child);

		INode AppendChild(INode child);

		void FireEvent(string eventName);

		new int GetHashCode();

		new bool Equals(object obj);

		void AttachEventHandler(string eventName, EventHandler handler);

		void DetachEventHandler(string eventName, EventHandler handler);

		void AttachEventHandler(string eventName, Delegate handler);

		void DetachEventHandler(string eventName, Delegate handler);
	}
	public enum NodeType
	{
		Element = 1,
		Attribute,
		Text,
		CDataSection,
		EntityReference,
		Entity,
		ProcessingInstruction,
		Comment,
		Document,
		DocumentType,
		DocumentFragment,
		Notation
	}
	public interface INodeList : IList, ICollection, IEnumerable
	{
		new INode this[int index] { get; set; }

		new int GetHashCode();
	}
	public interface IStylesheet
	{
		string Type { get; }

		bool Disabled { get; set; }

		INode OwnerNode { get; }

		IStylesheet ParentStyleSheet { get; }

		string Href { get; }

		string Title { get; }

		IMediaList Media { get; }
	}
	public interface IStylesheetList : IEnumerable
	{
		int Count { get; }

		IStylesheet this[int index] { get; set; }
	}
	public interface IWindow
	{
		IDocument Document { get; }

		IWindowCollection Frames { get; }

		string Name { get; set; }

		IWindow Parent { get; }

		string StatusText { get; }

		IWindow Top { get; }

		IHistory History { get; }

		event EventHandler Load;

		event EventHandler Unload;

		event EventHandler OnFocus;

		event EventHandler OnBlur;

		event EventHandler Error;

		event EventHandler Scroll;

		void AttachEventHandler(string eventName, EventHandler handler);

		void DetachEventHandler(string eventName, EventHandler handler);

		void Focus();

		new bool Equals(object obj);

		new int GetHashCode();

		void Open(string url);

		void ScrollTo(int x, int y);
	}
	public interface IWindowCollection : IList, ICollection, IEnumerable
	{
		new IWindow this[int index] { get; set; }
	}
}
namespace Mono.Mozilla
{
	internal class AsciiString : IDisposable
	{
		[StructLayout(LayoutKind.Sequential)]
		private class nsStringContainer
		{
			private IntPtr v;

			private IntPtr d1;

			private uint d2;

			private IntPtr d3;
		}

		private bool disposed;

		private nsStringContainer unmanagedContainer;

		private HandleRef handle;

		private string str = string.Empty;

		private bool dirty;

		public HandleRef Handle
		{
			get
			{
				dirty = true;
				return handle;
			}
		}

		public string String
		{
			get
			{
				if (dirty)
				{
					Base.gluezilla_CStringGetData(handle, out var aBuf, out var _);
					str = Marshal.PtrToStringAnsi(aBuf);
					dirty = false;
				}
				return str;
			}
			set
			{
				if (str != value)
				{
					str = value;
					Base.gluezilla_CStringSetData(handle, str, (uint)str.Length);
				}
			}
		}

		public int Length => String.Length;

		public AsciiString(string value)
		{
			unmanagedContainer = new nsStringContainer();
			IntPtr ptr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(nsStringContainer)));
			Marshal.StructureToPtr(unmanagedContainer, ptr, fDeleteOld: false);
			handle = new HandleRef(typeof(nsStringContainer), ptr);
			Base.gluezilla_CStringContainerInit(handle);
			String = value;
		}

		~AsciiString()
		{
			Dispose(disposing: false);
		}

		protected virtual void Dispose(bool disposing)
		{
			if (!disposed)
			{
				if (disposing)
				{
					Base.gluezilla_CStringContainerFinish(handle);
					Marshal.FreeHGlobal(handle.Handle);
				}
				disposed = true;
			}
		}

		public void Dispose()
		{
			Dispose(disposing: true);
			GC.SuppressFinalize(this);
		}

		public override string ToString()
		{
			return String;
		}
	}
	internal class Base
	{
		private class BindingInfo
		{
			public CallbackBinder callback;

			public IntPtr gluezilla;
		}

		private static Hashtable boundControls;

		private static bool initialized;

		private static object initLock;

		private static string monoMozDir;

		private static bool isInitialized()
		{
			if (!initialized)
			{
				return false;
			}
			return true;
		}

		private static BindingInfo getBinding(IWebBrowser control)
		{
			if (!boundControls.ContainsKey(control))
			{
				return null;
			}
			return boundControls[control] as BindingInfo;
		}

		static Base()
		{
			initLock = new object();
			boundControls = new Hashtable();
		}

		public static void Debug(int signal)
		{
			gluezilla_debug(signal);
		}

		public static bool Init(WebBrowser control, Platform platform)
		{
			lock (initLock)
			{
				if (!initialized)
				{
					Platform mozPlatform;
					try
					{
						short num = gluezilla_init(platform, out mozPlatform);
						monoMozDir = Path.Combine(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), ".mono"), "mozilla-" + num);
						if (!Directory.Exists(monoMozDir))
						{
							Directory.CreateDirectory(monoMozDir);
						}
					}
					catch (DllNotFoundException)
					{
						Console.WriteLine("libgluezilla not found. To have webbrowser support, you need libgluezilla installed");
						initialized = false;
						return false;
					}
					control.enginePlatform = mozPlatform;
					initialized = true;
				}
			}
			return initialized;
		}

		public static bool Bind(WebBrowser control, IntPtr handle, int width, int height)
		{
			if (!isInitialized())
			{
				return false;
			}
			BindingInfo bindingInfo = new BindingInfo();
			bindingInfo.callback = new CallbackBinder(control.callbacks);
			IntPtr intPtr = Marshal.AllocHGlobal(Marshal.SizeOf(bindingInfo.callback));
			Marshal.StructureToPtr(bindingInfo.callback, intPtr, fDeleteOld: true);
			bindingInfo.gluezilla = gluezilla_bind(intPtr, handle, width, height, Environment.CurrentDirectory, monoMozDir, control.platform);
			lock (initLock)
			{
				if (bindingInfo.gluezilla == IntPtr.Zero)
				{
					Marshal.FreeHGlobal(intPtr);
					bindingInfo = null;
					initialized = false;
					return false;
				}
			}
			boundControls.Add(control, bindingInfo);
			return true;
		}

		public static bool Create(IWebBrowser control)
		{
			if (!isInitialized())
			{
				return false;
			}
			gluezilla_createBrowserWindow(getBinding(control).gluezilla);
			return true;
		}

		public static void Shutdown(IWebBrowser control)
		{
			lock (initLock)
			{
				if (initialized)
				{
					gluezilla_shutdown(getBinding(control).gluezilla);
					boundControls.Remove(control);
					if (boundControls.Count == 0)
					{
						initialized = false;
					}
				}
			}
		}

		public static void Focus(IWebBrowser control, FocusOption focus)
		{
			if (isInitialized())
			{
				gluezilla_focus(getBinding(control).gluezilla, focus);
			}
		}

		public static void Blur(IWebBrowser control)
		{
			if (isInitialized())
			{
				gluezilla_blur(getBinding(control).gluezilla);
			}
		}

		public static void Activate(IWebBrowser control)
		{
			if (isInitialized())
			{
				gluezilla_activate(getBinding(control).gluezilla);
			}
		}

		public static void Deactivate(IWebBrowser control)
		{
			if (isInitialized())
			{
				gluezilla_deactivate(getBinding(control).gluezilla);
			}
		}

		public static void Resize(IWebBrowser control, int width, int height)
		{
			if (isInitialized())
			{
				gluezilla_resize(getBinding(control).gluezilla, width, height);
			}
		}

		public static void Home(IWebBrowser control)
		{
			if (isInitialized())
			{
				gluezilla_home(getBinding(control).gluezilla);
			}
		}

		public static nsIWebNavigation GetWebNavigation(IWebBrowser control)
		{
			if (!isInitialized())
			{
				return null;
			}
			return gluezilla_getWebNavigation(getBinding(control).gluezilla);
		}

		public static IntPtr StringInit()
		{
			if (!isInitialized())
			{
				return IntPtr.Zero;
			}
			return gluezilla_stringInit();
		}

		public static void StringFinish(HandleRef str)
		{
			if (isInitialized())
			{
				gluezilla_stringFinish(str);
			}
		}

		public static string StringGet(HandleRef str)
		{
			if (!isInitialized())
			{
				return string.Empty;
			}
			return Marshal.PtrToStringUni(gluezilla_stringGet(str));
		}

		public static void StringSet(HandleRef str, string text)
		{
			if (isInitialized())
			{
				gluezilla_stringSet(str, text);
			}
		}

		public static object GetProxyForObject(IWebBrowser control, Guid iid, object obj)
		{
			if (!isInitialized())
			{
				return null;
			}
			gluezilla_getProxyForObject(getBinding(control).gluezilla, iid, obj, out var ret);
			return Marshal.GetObjectForIUnknown(ret);
		}

		public static nsIServiceManager GetServiceManager(IWebBrowser control)
		{
			if (!isInitialized())
			{
				return null;
			}
			return gluezilla_getServiceManager2(getBinding(control).gluezilla);
		}

		public static string EvalScript(IWebBrowser control, string script)
		{
			if (!isInitialized())
			{
				return null;
			}
			return Marshal.PtrToStringAuto(gluezilla_evalScript(getBinding(control).gluezilla, script));
		}

		[DllImport("gluezilla")]
		private static extern void gluezilla_debug(int signal);

		[DllImport("gluezilla")]
		private static extern short gluezilla_init(Platform platform, out Platform mozPlatform);

		[DllImport("gluezilla")]
		private static extern IntPtr gluezilla_bind(IntPtr events, IntPtr hwnd, int width, int height, string startDir, string dataDir, Platform platform);

		[DllImport("gluezilla")]
		private static extern int gluezilla_createBrowserWindow(IntPtr instance);

		[DllImport("gluezilla")]
		private static extern IntPtr gluezilla_shutdown(IntPtr instance);

		[DllImport("gluezilla")]
		private static extern int gluezilla_focus(IntPtr instance, FocusOption focus);

		[DllImport("gluezilla")]
		private static extern int gluezilla_blur(IntPtr instance);

		[DllImport("gluezilla")]
		private static extern int gluezilla_activate(IntPtr instance);

		[DllImport("gluezilla")]
		private static extern int gluezilla_deactivate(IntPtr instance);

		[DllImport("gluezilla")]
		private static extern int gluezilla_resize(IntPtr instance, int width, int height);

		[DllImport("gluezilla")]
		private static extern int gluezilla_home(IntPtr instance);

		[DllImport("gluezilla")]
		[return: MarshalAs(UnmanagedType.Interface)]
		private static extern nsIWebNavigation gluezilla_getWebNavigation(IntPtr instance);

		[DllImport("gluezilla")]
		private static extern IntPtr gluezilla_stringInit();

		[DllImport("gluezilla")]
		private static extern int gluezilla_stringFinish(HandleRef str);

		[DllImport("gluezilla")]
		private static extern IntPtr gluezilla_stringGet(HandleRef str);

		[DllImport("gluezilla")]
		private static extern void gluezilla_stringSet(HandleRef str, [MarshalAs(UnmanagedType.LPWStr)] string text);

		[DllImport("gluezilla")]
		private static extern void gluezilla_getProxyForObject(IntPtr instance, [MarshalAs(UnmanagedType.LPStruct)] Guid iid, [MarshalAs(UnmanagedType.Interface)] object obj, out IntPtr ret);

		[DllImport("gluezilla")]
		public static extern uint gluezilla_StringContainerInit(HandleRef aStr);

		[DllImport("gluezilla")]
		public static extern void gluezilla_StringContainerFinish(HandleRef aStr);

		[DllImport("gluezilla")]
		public static extern uint gluezilla_StringGetData(HandleRef aStr, out IntPtr aBuf, out bool aTerm);

		[DllImport("gluezilla")]
		public static extern uint gluezilla_StringSetData(HandleRef aStr, [MarshalAs(UnmanagedType.LPWStr)] string aBuf, uint aCount);

		[DllImport("gluezilla")]
		public static extern uint gluezilla_CStringContainerInit(HandleRef aStr);

		[DllImport("gluezilla")]
		public static extern void gluezilla_CStringContainerFinish(HandleRef aStr);

		[DllImport("gluezilla")]
		public static extern uint gluezilla_CStringGetData(HandleRef aStr, out IntPtr aBuf, out bool aTerm);

		[DllImport("gluezilla")]
		public static extern uint gluezilla_CStringSetData(HandleRef aStr, string aBuf, uint aCount);

		[DllImport("gluezilla")]
		[return: MarshalAs(UnmanagedType.Interface)]
		public static extern nsIServiceManager gluezilla_getServiceManager2(IntPtr instance);

		[DllImport("gluezilla")]
		private static extern IntPtr gluezilla_evalScript(IntPtr instance, string script);
	}
	internal class Callback
	{
		private WebBrowser owner;

		private string currentUri;

		private bool calledLoadStarted;

		public Callback(WebBrowser owner)
		{
			this.owner = owner;
		}

		public void OnWidgetLoaded()
		{
		}

		public void OnStateChange(nsIWebProgress progress, nsIRequest request, int status, uint state)
		{
			if (!owner.created)
			{
				owner.created = true;
			}
			bool num = (state & 1) != 0;
			bool flag = (state & 4) != 0;
			bool flag2 = (state & 2) != 0;
			bool flag3 = (state & 0x10) != 0;
			bool flag4 = (state & 0x10000) != 0;
			bool flag5 = (state & 0x20000) != 0;
			bool flag6 = (state & 0x40000) != 0;
			bool flag7 = (state & 0x80000) != 0;
			if (num && flag4 && flag5 && !calledLoadStarted)
			{
				progress.getDOMWindow(out var ret);
				((nsIChannel)request).getURI(out var ret2);
				if (ret2 == null)
				{
					currentUri = "about:blank";
				}
				else
				{
					AsciiString asciiString = new AsciiString(string.Empty);
					ret2.getSpec(asciiString.Handle);
					currentUri = asciiString.ToString();
				}
				calledLoadStarted = true;
				LoadStartedEventHandler loadStartedEventHandler = (LoadStartedEventHandler)owner.Events[WebBrowser.LoadStarted];
				if (loadStartedEventHandler != null)
				{
					AsciiString asciiString2 = new AsciiString(string.Empty);
					ret.getName(asciiString2.Handle);
					LoadStartedEventArgs loadStartedEventArgs = new LoadStartedEventArgs(currentUri, asciiString2.ToString());
					loadStartedEventHandler(this, loadStartedEventArgs);
					if (loadStartedEventArgs.Cancel)
					{
						request.cancel(2152398850u);
					}
				}
			}
			else if (flag5 && flag4 && flag)
			{
				progress.getDOMWindow(out var ret3);
				((nsIChannel)request).getURI(out var ret4);
				if (ret4 == null)
				{
					currentUri = "about:blank";
				}
				else
				{
					AsciiString asciiString3 = new AsciiString(string.Empty);
					ret4.getSpec(asciiString3.Handle);
					currentUri = asciiString3.ToString();
				}
				ret3.getTop(out var ret5);
				if (ret5 == null || ret5.GetHashCode() == ret3.GetHashCode())
				{
					owner.Reset();
					ret3.getDocument(out var ret6);
					if (ret6 != null)
					{
						owner.document = new Document(owner, ret6);
					}
				}
				LoadCommitedEventHandler loadCommitedEventHandler = (LoadCommitedEventHandler)owner.Events[WebBrowser.LoadCommited];
				if (loadCommitedEventHandler != null)
				{
					LoadCommitedEventArgs e = new LoadCommitedEventArgs(currentUri);
					loadCommitedEventHandler(this, e);
				}
			}
			else if (flag5 && flag4 && flag2)
			{
				progress.getDOMWindow(out var _);
				((nsIChannel)request).getURI(out var ret8);
				if (ret8 == null)
				{
					currentUri = "about:blank";
					return;
				}
				AsciiString asciiString4 = new AsciiString(string.Empty);
				ret8.getSpec(asciiString4.Handle);
				currentUri = asciiString4.ToString();
			}
			else if (flag3 && !flag4 && !flag5 && flag6 && flag7)
			{
				calledLoadStarted = false;
				LoadFinishedEventHandler loadFinishedEventHandler = (LoadFinishedEventHandler)owner.Events[WebBrowser.LoadFinished];
				if (loadFinishedEventHandler != null)
				{
					progress.getDOMWindow(out var _);
					LoadFinishedEventArgs e2 = new LoadFinishedEventArgs(currentUri);
					loadFinishedEventHandler(this, e2);
				}
			}
			else
			{
				if (!(flag3 && !flag4 && flag5) || flag6 || flag7)
				{
					return;
				}
				progress.getDOMWindow(out var ret10);
				ret10.getDocument(out var ret11);
				if (ret11 != null)
				{
					int hashCode = ret11.GetHashCode();
					if (owner.documents.ContainsKey(hashCode))
					{
						((EventHandler)(owner.documents[hashCode] as Document).Events[Document.LoadStopped])?.Invoke(this, null);
					}
				}
				calledLoadStarted = false;
			}
		}

		public void OnProgress(nsIWebProgress progress, nsIRequest request, int currentTotalProgress, int maxTotalProgress)
		{
			Mono.WebBrowser.ProgressChangedEventHandler progressChangedEventHandler = (Mono.WebBrowser.ProgressChangedEventHandler)owner.Events[WebBrowser.ProgressChanged];
			if (progressChangedEventHandler != null)
			{
				Mono.WebBrowser.ProgressChangedEventArgs e = new Mono.WebBrowser.ProgressChangedEventArgs(currentTotalProgress, maxTotalProgress);
				progressChangedEventHandler(this, e);
			}
		}

		public void OnLocationChanged(nsIWebProgress progress, nsIRequest request, nsIURI uri)
		{
		}

		public void OnStatusChange(nsIWebProgress progress, nsIRequest request, string message, int status)
		{
			StatusChangedEventHandler statusChangedEventHandler = (StatusChangedEventHandler)owner.Events[WebBrowser.StatusChanged];
			if (statusChangedEventHandler != null)
			{
				StatusChangedEventArgs e = new StatusChangedEventArgs(message, status);
				statusChangedEventHandler(this, e);
			}
		}

		public void OnSecurityChange(nsIWebProgress progress, nsIRequest request, uint status)
		{
			SecurityChangedEventHandler securityChangedEventHandler = (SecurityChangedEventHandler)owner.Events[WebBrowser.SecurityChanged];
			if (securityChangedEventHandler != null)
			{
				SecurityLevel state = SecurityLevel.Insecure;
				switch (status)
				{
				case 4u:
					state = SecurityLevel.Insecure;
					break;
				case 1u:
					state = SecurityLevel.Mixed;
					break;
				case 2u:
					state = SecurityLevel.Secure;
					break;
				}
				SecurityChangedEventArgs e = new SecurityChangedEventArgs(state);
				securityChangedEventHandler(this, e);
			}
		}

		public bool OnClientDomKeyDown(KeyInfo keyInfo, ModifierKeys modifiers, nsIDOMNode target)
		{
			INode node = new Node(owner, target);
			string key = string.Intern(node.GetHashCode() + ":keydown");
			EventHandler eventHandler = (EventHandler)owner.DomEvents[key];
			if (eventHandler != null)
			{
				EventArgs e = new EventArgs();
				eventHandler(node, e);
			}
			NodeEventHandler nodeEventHandler = (NodeEventHandler)owner.Events[WebBrowser.KeyDown];
			if (nodeEventHandler != null)
			{
				NodeEventArgs e2 = new NodeEventArgs(node);
				nodeEventHandler(this, e2);
				return true;
			}
			return false;
		}

		public bool OnClientDomKeyUp(KeyInfo keyInfo, ModifierKeys modifiers, nsIDOMNode target)
		{
			INode node = new Node(owner, target);
			string key = string.Intern(node.GetHashCode() + ":keyup");
			EventHandler eventHandler = (EventHandler)owner.DomEvents[key];
			if (eventHandler != null)
			{
				EventArgs e = new EventArgs();
				eventHandler(node, e);
			}
			NodeEventHandler nodeEventHandler = (NodeEventHandler)owner.Events[WebBrowser.KeyUp];
			if (nodeEventHandler != null)
			{
				NodeEventArgs e2 = new NodeEventArgs(node);
				nodeEventHandler(this, e2);
				return true;
			}
			return false;
		}

		public bool OnClientDomKeyPress(KeyInfo keyInfo, ModifierKeys modifiers, nsIDOMNode target)
		{
			INode node = new Node(owner, target);
			string key = string.Intern(node.GetHashCode() + ":keypress");
			EventHandler eventHandler = (EventHandler)owner.DomEvents[key];
			if (eventHandler != null)
			{
				EventArgs e = new EventArgs();
				eventHandler(node, e);
			}
			NodeEventHandler nodeEventHandler = (NodeEventHandler)owner.Events[WebBrowser.KeyPress];
			if (nodeEventHandler != null)
			{
				NodeEventArgs e2 = new NodeEventArgs(node);
				nodeEventHandler(this, e2);
				return true;
			}
			return false;
		}

		public bool OnClientMouseDown(MouseInfo mouseInfo, ModifierKeys modifiers, nsIDOMNode target)
		{
			INode node = new Node(owner, target);
			string key = string.Intern(node.GetHashCode() + ":mousedown");
			EventHandler eventHandler = (EventHandler)owner.DomEvents[key];
			if (eventHandler != null)
			{
				EventArgs e = new EventArgs();
				eventHandler(node, e);
			}
			NodeEventHandler nodeEventHandler = (NodeEventHandler)owner.Events[WebBrowser.MouseDown];
			if (nodeEventHandler != null)
			{
				NodeEventArgs e2 = new NodeEventArgs(node);
				nodeEventHandler(this, e2);
				return true;
			}
			return false;
		}

		public bool OnClientMouseUp(MouseInfo mouseInfo, ModifierKeys modifiers, nsIDOMNode target)
		{
			INode node = new Node(owner, target);
			string key = string.Intern(node.GetHashCode() + ":mouseup");
			EventHandler eventHandler = (EventHandler)owner.DomEvents[key];
			if (eventHandler != null)
			{
				EventArgs e = new EventArgs();
				eventHandler(node, e);
			}
			NodeEventHandler nodeEventHandler = (NodeEventHandler)owner.Events[WebBrowser.MouseUp];
			if (nodeEventHandler != null)
			{
				NodeEventArgs e2 = new NodeEventArgs(node);
				nodeEventHandler(this, e2);
				return true;
			}
			return false;
		}

		public bool OnClientMouseClick(MouseInfo mouseInfo, ModifierKeys modifiers, nsIDOMNode target)
		{
			INode node = new Node(owner, target);
			string key = string.Intern(node.GetHashCode() + ":click");
			EventHandler eventHandler = (EventHandler)owner.DomEvents[key];
			if (eventHandler != null)
			{
				EventArgs e = new EventArgs();
				eventHandler(node, e);
			}
			NodeEventHandler nodeEventHandler = (NodeEventHandler)owner.Events[WebBrowser.MouseClick];
			if (nodeEventHandler != null)
			{
				NodeEventArgs e2 = new NodeEventArgs(node);
				nodeEventHandler(this, e2);
				return true;
			}
			return false;
		}

		public bool OnClientMouseDoubleClick(MouseInfo mouseInfo, ModifierKeys modifiers, nsIDOMNode target)
		{
			INode node = new Node(owner, target);
			string key = string.Intern(node.GetHashCode() + ":dblclick");
			EventHandler eventHandler = (EventHandler)owner.DomEvents[key];
			if (eventHandler != null)
			{
				EventArgs e = new EventArgs();
				eventHandler(node, e);
			}
			NodeEventHandler nodeEventHandler = (NodeEventHandler)owner.Events[WebBrowser.MouseDoubleClick];
			if (nodeEventHandler != null)
			{
				NodeEventArgs e2 = new NodeEventArgs(node);
				nodeEventHandler(this, e2);
				return true;
			}
			return false;
		}

		public bool OnClientMouseOver(MouseInfo mouseInfo, ModifierKeys modifiers, nsIDOMNode target)
		{
			INode typedNode = new DOMObject(owner).GetTypedNode(target);
			string key = string.Intern(typedNode.GetHashCode() + ":mouseover");
			EventHandler eventHandler = (EventHandler)owner.DomEvents[key];
			if (eventHandler != null)
			{
				EventArgs e = new EventArgs();
				eventHandler(typedNode, e);
			}
			NodeEventHandler nodeEventHandler = (NodeEventHandler)owner.Events[WebBrowser.MouseEnter];
			if (nodeEventHandler != null)
			{
				NodeEventArgs e2 = new NodeEventArgs(typedNode);
				nodeEventHandler(typedNode, e2);
				return true;
			}
			return false;
		}

		public bool OnClientMouseOut(MouseInfo mouseInfo, ModifierKeys modifiers, nsIDOMNode target)
		{
			INode node = new Node(owner, target);
			string key = string.Intern(node.GetHashCode() + ":mouseout");
			EventHandler eventHandler = (EventHandler)owner.DomEvents[key];
			if (eventHandler != null)
			{
				EventArgs e = new EventArgs();
				eventHandler(node, e);
			}
			NodeEventHandler nodeEventHandler = (NodeEventHandler)owner.Events[WebBrowser.MouseLeave];
			if (nodeEventHandler != null)
			{
				NodeEventArgs e2 = new NodeEventArgs(node);
				nodeEventHandler(this, e2);
				return true;
			}
			return false;
		}

		public bool OnClientActivate()
		{
			return false;
		}

		public bool OnClientFocus()
		{
			EventHandler eventHandler = (EventHandler)owner.Events[WebBrowser.Focus];
			if (eventHandler != null)
			{
				EventArgs e = new EventArgs();
				eventHandler(this, e);
			}
			return false;
		}

		public bool OnClientBlur()
		{
			EventHandler eventHandler = (EventHandler)owner.Events[WebBrowser.Blur];
			if (eventHandler != null)
			{
				EventArgs e = new EventArgs();
				eventHandler(this, e);
			}
			return false;
		}

		public bool OnCreateNewWindow()
		{
			bool result = false;
			CreateNewWindowEventHandler createNewWindowEventHandler = (CreateNewWindowEventHandler)owner.Events[WebBrowser.CreateNewWindow];
			if (createNewWindowEventHandler != null)
			{
				CreateNewWindowEventArgs e = new CreateNewWindowEventArgs(isModal: false);
				result = createNewWindowEventHandler(this, e);
			}
			return result;
		}

		public void OnAlert(IntPtr title, IntPtr text)
		{
			AlertEventHandler alertEventHandler = (AlertEventHandler)owner.Events[WebBrowser.Alert];
			if (alertEventHandler != null)
			{
				AlertEventArgs alertEventArgs = new AlertEventArgs();
				alertEventArgs.Type = DialogType.Alert;
				if (title != IntPtr.Zero)
				{
					alertEventArgs.Title = Marshal.PtrToStringUni(title);
				}
				if (text != IntPtr.Zero)
				{
					alertEventArgs.Text = Marshal.PtrToStringUni(text);
				}
				alertEventHandler(this, alertEventArgs);
			}
		}

		public bool OnAlertCheck(IntPtr title, IntPtr text, IntPtr chkMsg, ref bool chkState)
		{
			AlertEventHandler alertEventHandler = (AlertEventHandler)owner.Events[WebBrowser.Alert];
			if (alertEventHandler != null)
			{
				AlertEventArgs alertEventArgs = new AlertEventArgs();
				alertEventArgs.Type = DialogType.AlertCheck;
				if (title != IntPtr.Zero)
				{
					alertEventArgs.Title = Marshal.PtrToStringUni(title);
				}
				if (text != IntPtr.Zero)
				{
					alertEventArgs.Text = Marshal.PtrToStringUni(text);
				}
				if (chkMsg != IntPtr.Zero)
				{
					alertEventArgs.CheckMessage = Marshal.PtrToStringUni(chkMsg);
				}
				alertEventArgs.CheckState = chkState;
				alertEventHandler(this, alertEventArgs);
				return alertEventArgs.BoolReturn;
			}
			return false;
		}

		public bool OnConfirm(IntPtr title, IntPtr text)
		{
			AlertEventHandler alertEventHandler = (AlertEventHandler)owner.Events[WebBrowser.Alert];
			if (alertEventHandler != null)
			{
				AlertEventArgs alertEventArgs = new AlertEventArgs();
				alertEventArgs.Type = DialogType.Confirm;
				if (title != IntPtr.Zero)
				{
					alertEventArgs.Title = Marshal.PtrToStringUni(title);
				}
				if (text != IntPtr.Zero)
				{
					alertEventArgs.Text = Marshal.PtrToStringUni(text);
				}
				alertEventHandler(this, alertEventArgs);
				return alertEventArgs.BoolReturn;
			}
			return false;
		}

		public bool OnConfirmCheck(IntPtr title, IntPtr text, IntPtr chkMsg, ref bool chkState)
		{
			AlertEventHandler alertEventHandler = (AlertEventHandler)owner.Events[WebBrowser.Alert];
			if (alertEventHandler != null)
			{
				AlertEventArgs alertEventArgs = new AlertEventArgs();
				alertEventArgs.Type = DialogType.ConfirmCheck;
				if (title != IntPtr.Zero)
				{
					alertEventArgs.Title = Marshal.PtrToStringUni(title);
				}
				if (text != IntPtr.Zero)
				{
					alertEventArgs.Text = Marshal.PtrToStringUni(text);
				}
				if (chkMsg != IntPtr.Zero)
				{
					alertEventArgs.CheckMessage = Marshal.PtrToStringUni(chkMsg);
				}
				alertEventArgs.CheckState = chkState;
				alertEventHandler(this, alertEventArgs);
				chkState = alertEventArgs.CheckState;
				return alertEventArgs.BoolReturn;
			}
			return false;
		}

		public bool OnConfirmEx(IntPtr title, IntPtr text, DialogButtonFlags flags, IntPtr title0, IntPtr title1, IntPtr title2, IntPtr chkMsg, ref bool chkState, out int retVal)
		{
			retVal = -1;
			AlertEventHandler alertEventHandler = (AlertEventHandler)owner.Events[WebBrowser.Alert];
			if (alertEventHandler != null)
			{
				AlertEventArgs alertEventArgs = new AlertEventArgs();
				alertEventArgs.Type = DialogType.ConfirmEx;
				if (title != IntPtr.Zero)
				{
					alertEventArgs.Title = Marshal.PtrToStringUni(title);
				}
				if (text != IntPtr.Zero)
				{
					alertEventArgs.Text = Marshal.PtrToStringUni(text);
				}
				if (chkMsg != IntPtr.Zero)
				{
					alertEventArgs.CheckMessage = Marshal.PtrToStringUni(chkMsg);
				}
				alertEventArgs.CheckState = chkState;
				alertEventHandler(this, alertEventArgs);
				chkState = alertEventArgs.CheckState;
				return alertEventArgs.BoolReturn;
			}
			return false;
		}

		public bool OnPrompt(IntPtr title, IntPtr text, ref IntPtr retVal)
		{
			AlertEventHandler alertEventHandler = (AlertEventHandler)owner.Events[WebBrowser.Alert];
			if (alertEventHandler != null)
			{
				AlertEventArgs alertEventArgs = new AlertEventArgs();
				alertEventArgs.Type = DialogType.Prompt;
				if (title != IntPtr.Zero)
				{
					alertEventArgs.Title = Marshal.PtrToStringUni(title);
				}
				if (text != IntPtr.Zero)
				{
					alertEventArgs.Text = Marshal.PtrToStringUni(text);
				}
				if (retVal != IntPtr.Zero)
				{
					alertEventArgs.Text2 = Marshal.PtrToStringUni(retVal);
				}
				alertEventHandler(this, alertEventArgs);
				retVal = Marshal.StringToHGlobalUni(alertEventArgs.StringReturn);
				return alertEventArgs.BoolReturn;
			}
			return false;
		}

		public bool OnPromptUsernameAndPassword(IntPtr title, IntPtr text, IntPtr chkMsg, ref bool chkState, out IntPtr username, out IntPtr password)
		{
			username = IntPtr.Zero;
			password = IntPtr.Zero;
			AlertEventHandler alertEventHandler = (AlertEventHandler)owner.Events[WebBrowser.Alert];
			if (alertEventHandler != null)
			{
				AlertEventArgs alertEventArgs = new AlertEventArgs();
				alertEventArgs.Type = DialogType.PromptUsernamePassword;
				if (title != IntPtr.Zero)
				{
					alertEventArgs.Title = Marshal.PtrToStringUni(title);
				}
				if (text != IntPtr.Zero)
				{
					alertEventArgs.Text = Marshal.PtrToStringUni(text);
				}
				if (chkMsg != IntPtr.Zero)
				{
					alertEventArgs.CheckMessage = Marshal.PtrToStringUni(chkMsg);
				}
				alertEventArgs.CheckState = chkState;
				alertEventHandler(this, alertEventArgs);
				return alertEventArgs.BoolReturn;
			}
			return false;
		}

		public bool OnPromptPassword(IntPtr title, IntPtr text, IntPtr chkMsg, ref bool chkState, out IntPtr password)
		{
			password = IntPtr.Zero;
			AlertEventHandler alertEventHandler = (AlertEventHandler)owner.Events[WebBrowser.Alert];
			if (alertEventHandler != null)
			{
				AlertEventArgs alertEventArgs = new AlertEventArgs();
				alertEventArgs.Type = DialogType.PromptPassword;
				if (title != IntPtr.Zero)
				{
					alertEventArgs.Title = Marshal.PtrToStringUni(title);
				}
				if (text != IntPtr.Zero)
				{
					alertEventArgs.Text = Marshal.PtrToStringUni(text);
				}
				if (chkMsg != IntPtr.Zero)
				{
					alertEventArgs.CheckMessage = Marshal.PtrToStringUni(chkMsg);
				}
				alertEventArgs.CheckState = chkState;
				alertEventHandler(this, alertEventArgs);
				return alertEventArgs.BoolReturn;
			}
			return false;
		}

		public bool OnSelect(IntPtr title, IntPtr text, uint count, IntPtr list, out int retVal)
		{
			retVal = 0;
			AlertEventHandler alertEventHandler = (AlertEventHandler)owner.Events[WebBrowser.Alert];
			if (alertEventHandler != null)
			{
				AlertEventArgs alertEventArgs = new AlertEventArgs();
				alertEventArgs.Type = DialogType.Select;
				if (title != IntPtr.Zero)
				{
					alertEventArgs.Title = Marshal.PtrToStringUni(title);
				}
				if (text != IntPtr.Zero)
				{
					alertEventArgs.Text = Marshal.PtrToStringUni(text);
				}
				alertEventHandler(this, alertEventArgs);
				return alertEventArgs.BoolReturn;
			}
			return false;
		}

		public void OnLoad()
		{
			((Window)owner.Window).OnLoad();
		}

		public void OnUnload()
		{
			((Window)owner.Window).OnUnload();
		}

		public void OnShowContextMenu(uint contextFlags, [MarshalAs(UnmanagedType.Interface)] nsIDOMEvent eve, [MarshalAs(UnmanagedType.Interface)] nsIDOMNode node)
		{
			ContextMenuEventHandler contextMenuEventHandler = (ContextMenuEventHandler)owner.Events[WebBrowser.ContextMenuEvent];
			if (contextMenuEventHandler != null)
			{
				nsIDOMMouseEvent obj = (nsIDOMMouseEvent)eve;
				obj.getClientX(out var ret);
				obj.getClientY(out var ret2);
				ContextMenuEventArgs e = new ContextMenuEventArgs(ret, ret2);
				contextMenuEventHandler(owner, e);
			}
		}

		public void OnGeneric(string type)
		{
			EventHandler eventHandler = (EventHandler)owner.Events[WebBrowser.Generic];
			if (eventHandler != null)
			{
				EventArgs e = new EventArgs();
				eventHandler(type, e);
			}
		}
	}
	internal delegate void CallbackVoid();
	internal delegate void CallbackString(string arg1);
	internal delegate void CallbackWString([MarshalAs(UnmanagedType.LPWStr)] string arg1);
	internal delegate void CallbackStringString(string arg1, string arg2);
	internal delegate void CallbackStringInt(string arg1, int arg2);
	internal delegate void CallbackWStringInt([MarshalAs(UnmanagedType.LPWStr)] string arg1, int arg2);
	internal delegate void CallbackStringIntInt(string arg1, int arg2, int arg3);
	internal delegate void CallbackStringIntUint(string arg1, int arg2, uint arg3);
	internal delegate void CallbackIntInt(int arg1, int arg2);
	internal delegate void CallbackIntUint(int arg2, uint arg3);
	internal delegate void CallbackUint(uint arg1);
	internal delegate void CallbackUintInt(uint arg1, int arg2);
	internal delegate void CallbackPtrPtr(IntPtr arg1, IntPtr arg2);
	internal delegate void CallbackBool(bool val);
	internal delegate bool KeyCallback(KeyInfo keyInfo, ModifierKeys modifiers, [MarshalAs(UnmanagedType.Interface)] nsIDOMNode target);
	internal delegate bool MouseCallback(MouseInfo mouseInfo, ModifierKeys modifiers, [MarshalAs(UnmanagedType.Interface)] nsIDOMNode target);
	internal delegate void GenericCallback(IntPtr type);
	internal delegate bool Callback2();
	internal delegate bool Callback2String(string arg1);
	internal delegate bool CallbackOnAlertCheck(IntPtr title, IntPtr text, IntPtr chkMsg, ref bool chkState);
	internal delegate bool CallbackOnConfirm(IntPtr title, IntPtr text);
	internal delegate bool CallbackOnConfirmCheck(IntPtr title, IntPtr text, IntPtr chkMsg, ref bool chkState);
	internal delegate bool CallbackOnConfirmEx(IntPtr title, IntPtr text, DialogButtonFlags flags, IntPtr title0, IntPtr title1, IntPtr title2, IntPtr chkMsg, ref bool chkState, out int retVal);
	internal delegate bool CallbackOnPrompt(IntPtr title, IntPtr text, ref IntPtr retVal);
	internal delegate bool CallbackOnPromptUsernameAndPassword(IntPtr title, IntPtr text, IntPtr chkMsg, ref bool chkState, out IntPtr username, out IntPtr password);
	internal delegate bool CallbackOnPromptPassword(IntPtr title, IntPtr text, IntPtr chkMsg, ref bool chkState, out IntPtr password);
	internal delegate bool CallbackOnSelect(IntPtr title, IntPtr text, uint count, IntPtr list, out int retVal);
	internal delegate void CallbackOnLocationChanged([MarshalAs(UnmanagedType.Interface)] nsIWebProgress progress, [MarshalAs(UnmanagedType.Interface)] nsIRequest request, [MarshalAs(UnmanagedType.Interface)] nsIURI uri);
	internal delegate void CallbackOnStatusChange([MarshalAs(UnmanagedType.Interface)] nsIWebProgress progress, [MarshalAs(UnmanagedType.Interface)] nsIRequest request, [MarshalAs(UnmanagedType.LPWStr)] string message, int status);
	internal delegate void CallbackOnSecurityChange([MarshalAs(UnmanagedType.Interface)] nsIWebProgress progress, [MarshalAs(UnmanagedType.Interface)] nsIRequest request, uint status);
	internal delegate void CallbackOnStateChange([MarshalAs(UnmanagedType.Interface)] nsIWebProgress progress, [MarshalAs(UnmanagedType.Interface)] nsIRequest request, int arg2, uint arg3);
	internal delegate void CallbackOnProgress([MarshalAs(UnmanagedType.Interface)] nsIWebProgress progress, [MarshalAs(UnmanagedType.Interface)] nsIRequest request, int arg2, int arg3);
	internal delegate void CallbackOnShowContextMenu(uint contextFlags, [MarshalAs(UnmanagedType.Interface)] nsIDOMEvent eve, [MarshalAs(UnmanagedType.Interface)] nsIDOMNode node);
	internal struct CallbackBinder
	{
		public CallbackVoid OnWidgetLoaded;

		public CallbackOnStateChange OnStateChange;

		public CallbackOnProgress OnProgress;

		public CallbackOnLocationChanged OnLocationChanged;

		public CallbackOnStatusChange OnStatusChange;

		public CallbackOnSecurityChange OnSecurityChange;

		public KeyCallback OnKeyDown;

		public KeyCallback OnKeyUp;

		public KeyCallback OnKeyPress;

		public MouseCallback OnMouseDown;

		public MouseCallback OnMouseUp;

		public MouseCallback OnMouseClick;

		public MouseCallback OnMouseDoubleClick;

		public MouseCallback OnMouseOver;

		public MouseCallback OnMouseOut;

		public Callback2 OnActivate;

		public Callback2 OnFocus;

		public Callback2 OnBlur;

		public CallbackPtrPtr OnAlert;

		public CallbackOnAlertCheck OnAlertCheck;

		public CallbackOnConfirm OnConfirm;

		public CallbackOnConfirmCheck OnConfirmCheck;

		public CallbackOnConfirmEx OnConfirmEx;

		public CallbackOnPrompt OnPrompt;

		public CallbackOnPromptUsernameAndPassword OnPromptUsernameAndPassword;

		public CallbackOnPromptPassword OnPromptPassword;

		public CallbackOnSelect OnSelect;

		public CallbackVoid OnLoad;

		public CallbackVoid OnUnload;

		public CallbackOnShowContextMenu OnShowContextMenu;

		public CallbackWString OnGeneric;

		internal CallbackBinder(Callback callback)
		{
			OnWidgetLoaded = callback.OnWidgetLoaded;
			OnStateChange = callback.OnStateChange;
			OnProgress = callback.OnProgress;
			OnLocationChanged = callback.OnLocationChanged;
			OnStatusChange = callback.OnStatusChange;
			OnSecurityChange = callback.OnSecurityChange;
			OnKeyDown = callback.OnClientDomKeyDown;
			OnKeyUp = callback.OnClientDomKeyUp;
			OnKeyPress = callback.OnClientDomKeyPress;
			OnMouseDown = callback.OnClientMouseDown;
			OnMouseUp = callback.OnClientMouseUp;
			OnMouseClick = callback.OnClientMouseClick;
			OnMouseDoubleClick = callback.OnClientMouseDoubleClick;
			OnMouseOver = callback.OnClientMouseOver;
			OnMouseOut = callback.OnClientMouseOut;
			OnActivate = callback.OnClientActivate;
			OnFocus = callback.OnClientFocus;
			OnBlur = callback.OnClientBlur;
			OnAlert = callback.OnAlert;
			OnAlertCheck = callback.OnAlertCheck;
			OnConfirm = callback.OnConfirm;
			OnConfirmCheck = callback.OnConfirmCheck;
			OnConfirmEx = callback.OnConfirmEx;
			OnPrompt = callback.OnPrompt;
			OnPromptUsernameAndPassword = callback.OnPromptUsernameAndPassword;
			OnPromptPassword = callback.OnPromptPassword;
			OnSelect = callback.OnSelect;
			OnLoad = callback.OnLoad;
			OnUnload = callback.OnUnload;
			OnShowContextMenu = callback.OnShowContextMenu;
			OnGeneric = callback.OnGeneric;
		}
	}
	internal struct SizeInfo
	{
		public uint width;

		public uint height;
	}
	internal struct ModifierKeys
	{
		public int altKey;

		public int ctrlKey;

		public int metaKey;

		public int shiftKey;
	}
	internal struct MouseInfo
	{
		public ushort button;

		public int clientX;

		public int clientY;

		public int screenX;

		public int screenY;
	}
	internal struct KeyInfo
	{
		public uint charCode;

		public uint keyCode;
	}
	[Flags]
	internal enum StateFlags
	{
		Start = 1,
		Redirecting = 2,
		Transferring = 4,
		Negotiating = 8,
		Stop = 0x10,
		IsRequest = 0x10000,
		IsDocument = 0x20000,
		IsNetwork = 0x40000,
		IsWindow = 0x80000,
		Restoring = 0x1000000,
		IsInsecure = 4,
		IsBroken = 1,
		IsSecure = 2,
		SecureHigh = 0x40000,
		SecureMed = 0x10000,
		SecureLow = 0x20000
	}
	internal class DocumentEncoder : DOMObject
	{
		private nsIDocumentEncoder docEncoder;

		private string mimeType;

		private DocumentEncoderFlags flags;

		public string MimeType
		{
			get
			{
				if (mimeType == null)
				{
					mimeType = "text/html";
				}
				return mimeType;
			}
			set
			{
				mimeType = value;
			}
		}

		public DocumentEncoderFlags Flags
		{
			get
			{
				return flags;
			}
			set
			{
				flags = value;
			}
		}

		public DocumentEncoder(WebBrowser control)
			: base(control)
		{
			IntPtr ret = IntPtr.Zero;
			base.control.ServiceManager.getServiceByContractID("@mozilla.org/layout/documentEncoder;1?type=text/html", typeof(nsIDocumentEncoder).GUID, out ret);
			if (ret == IntPtr.Zero)
			{
				throw new Mono.WebBrowser.Exception(Mono.WebBrowser.Exception.ErrorCodes.DocumentEncoderService);
			}
			try
			{
				docEncoder = (nsIDocumentEncoder)Marshal.GetObjectForIUnknown(ret);
			}
			catch (System.Exception)
			{
				throw new Mono.WebBrowser.Exception(Mono.WebBrowser.Exception.ErrorCodes.DocumentEncoderService);
			}
			if (control.platform != control.enginePlatform)
			{
				docEncoder = nsDocumentEncoder.GetProxy(control, docEncoder);
			}
		}

		protected override void Dispose(bool disposing)
		{
			if (!disposed)
			{
				if (disposing)
				{
					docEncoder = null;
				}
				disposed = true;
			}
		}

		private void Init(Document document, string mimeType, DocumentEncoderFlags flags)
		{
			UniString uniString = new UniString(mimeType);
			try
			{
				docEncoder.init((nsIDOMDocument)document.nodeNoProxy, uniString.Handle, (uint)flags);
			}
			catch (System.Exception innerException)
			{
				throw new Mono.WebBrowser.Exception(Mono.WebBrowser.Exception.ErrorCodes.DocumentEncoderService, innerException);
			}
		}

		public string EncodeToString(Document document)
		{
			Init(document, MimeType, Flags);
			docEncoder.encodeToString(storage);
			return Base.StringGet(storage);
		}

		public string EncodeToString(HTMLElement element)
		{
			Init((Document)element.Owner, MimeType, Flags);
			docEncoder.setNode(element.nodeNoProxy);
			docEncoder.encodeToString(storage);
			string text = Base.StringGet(storage);
			string tagName = element.TagName;
			string text2 = "<" + tagName;
			foreach (IAttribute attribute in element.Attributes)
			{
				text2 = text2 + " " + attribute.Name + "=\"" + attribute.Value + "\"";
			}
			return text2 + ">" + text + "</" + tagName + ">";
		}

		public System.IO.Stream EncodeToStream(Document document)
		{
			Init(document, MimeType, Flags);
			Stream stream = new Stream(new MemoryStream());
			docEncoder.encodeToStream(stream);
			return stream.BaseStream;
		}

		public System.IO.Stream EncodeToStream(HTMLElement element)
		{
			Init((Document)element.Owner, MimeType, Flags);
			docEncoder.setNode(element.nodeNoProxy);
			Stream stream = new Stream(new MemoryStream());
			docEncoder.encodeToStream(stream);
			return stream.BaseStream;
		}
	}
	internal class Stream : nsIInputStream, nsIOutputStream
	{
		private System.IO.Stream back;

		public System.IO.Stream BaseStream => back;

		public Stream(System.IO.Stream stream)
		{
			back = stream;
		}

		public int close()
		{
			back.Close();
			return 0;
		}

		public int flush()
		{
			back.Flush();
			return 0;
		}

		public int write([MarshalAs(UnmanagedType.LPStr)] string str, uint count, out uint ret)
		{
			ret = count;
			if (count == 0)
			{
				return 0;
			}
			byte[] bytes = Encoding.ASCII.GetBytes(str);
			back.Write(bytes, 0, (int)count);
			return 0;
		}

		public int writeFrom([MarshalAs(UnmanagedType.Interface)] nsIInputStream aFromStream, uint aCount, out uint ret)
		{
			ret = 0u;
			return 0;
		}

		public int writeSegments(nsIReadSegmentFunDelegate aReader, IntPtr aClosure, uint aCount, out uint ret)
		{
			ret = 0u;
			return 0;
		}

		public int isNonBlocking(out bool ret)
		{
			ret = false;
			return 0;
		}

		public int available(out uint ret)
		{
			ret = 0u;
			return 0;
		}

		public int read(HandleRef str, uint count, out uint ret)
		{
			byte[] array = new byte[count];
			ret = (uint)back.Read(array, 0, (int)count);
			string @string = Encoding.ASCII.GetString(array);
			Base.StringSet(str, @string);
			return 0;
		}

		public int readSegments(nsIWriteSegmentFunDelegate aWriter, IntPtr aClosure, uint aCount, out uint ret)
		{
			ret = 0u;
			return 0;
		}
	}
	internal class UniString : IDisposable
	{
		[StructLayout(LayoutKind.Sequential)]
		private class nsStringContainer
		{
			private IntPtr v;

			private IntPtr d1;

			private uint d2;

			private IntPtr d3;
		}

		private bool disposed;

		private nsStringContainer unmanagedContainer;

		private HandleRef handle;

		private string str = string.Empty;

		private bool dirty;

		public HandleRef Handle
		{
			get
			{
				dirty = true;
				return handle;
			}
		}

		public string String
		{
			get
			{
				if (dirty)
				{
					Base.gluezilla_StringGetData(handle, out var aBuf, out var _);
					str = Marshal.PtrToStringUni(aBuf);
					dirty = false;
				}
				return str;
			}
			set
			{
				if (str != value)
				{
					str = value;
					Base.gluezilla_StringSetData(handle, str, (uint)str.Length);
				}
			}
		}

		public int Length => String.Length;

		public UniString(string value)
		{
			unmanagedContainer = new nsStringContainer();
			IntPtr ptr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(nsStringContainer)));
			Marshal.StructureToPtr(unmanagedContainer, ptr, fDeleteOld: false);
			handle = new HandleRef(typeof(nsStringContainer), ptr);
			Base.gluezilla_StringContainerInit(handle);
			String = value;
		}

		~UniString()
		{
			Dispose(disposing: false);
		}

		protected virtual void Dispose(bool disposing)
		{
			if (!disposed)
			{
				if (disposing)
				{
					Base.gluezilla_StringContainerFinish(handle);
					Marshal.FreeHGlobal(handle.Handle);
				}
				disposed = true;
			}
		}

		public void Dispose()
		{
			Dispose(disposing: true);
			GC.SuppressFinalize(this);
		}

		public override string ToString()
		{
			return String;
		}
	}
	internal class WebBrowser : IWebBrowser
	{
		private bool loaded;

		internal bool created;

		private bool creating;

		internal Document document;

		internal Navigation navigation;

		internal Platform platform;

		internal Platform enginePlatform;

		internal Callback callbacks;

		private EventHandlerList events;

		private EventHandlerList domEvents;

		private string statusText;

		private bool streamingMode;

		internal Hashtable documents;

		private int width;

		private int height;

		private bool isDirty;

		private ContentListener contentListener;

		private nsIServiceManager servMan;

		private nsIIOService ioService;

		private nsIAccessibilityService accessibilityService;

		private nsIErrorService errorService;

		private DocumentEncoder docEncoder;

		internal static object KeyDownEvent;

		internal static object KeyPressEvent;

		internal static object KeyUpEvent;

		internal static object MouseClickEvent;

		internal static object MouseDoubleClickEvent;

		internal static object MouseDownEvent;

		internal static object MouseEnterEvent;

		internal static object MouseLeaveEvent;

		internal static object MouseMoveEvent;

		internal static object MouseUpEvent;

		internal static object FocusEvent;

		internal static object BlurEvent;

		internal static object CreateNewWindowEvent;

		internal static object AlertEvent;

		internal static object LoadStartedEvent;

		internal static object LoadCommitedEvent;

		internal static object ProgressChangedEvent;

		internal static object LoadFinishedEvent;

		internal static object LoadEvent;

		internal static object UnloadEvent;

		internal static object StatusChangedEvent;

		internal static object SecurityChangedEvent;

		internal static object ProgressEvent;

		internal static object ContextMenuEvent;

		internal static object NavigationRequestedEvent;

		internal static object GenericEvent;

		private bool Created
		{
			get
			{
				if (!creating && !created)
				{
					creating = true;
					created = Base.Create(this);
					if (created && isDirty)
					{
						isDirty = false;
						Base.Resize(this, width, height);
					}
				}
				return created;
			}
		}

		public bool Initialized => loaded;

		public IWindow Window
		{
			get
			{
				if (Navigation != null)
				{
					((nsIWebBrowserFocus)navigation.navigation).getFocusedWindow(out var ret);
					if (ret == null)
					{
						((nsIWebBrowser)navigation.navigation).getContentDOMWindow(out ret);
					}
					if (ret != null)
					{
						return new Window(this, ret);
					}
				}
				return null;
			}
		}

		public IDocument Document
		{
			get
			{
				if (Navigation != null && document == null)
				{
					document = navigation.Document;
				}
				return document;
			}
		}

		public INavigation Navigation
		{
			get
			{
				if (!Created)
				{
					return null;
				}
				if (navigation == null)
				{
					nsIWebNavigation webNavigation = Base.GetWebNavigation(this);
					navigation = new Navigation(this, webNavigation);
				}
				return navigation;
			}
		}

		public string StatusText => statusText;

		public bool Offline
		{
			get
			{
				if (!Created)
				{
					return true;
				}
				IOService.getOffline(out var ret);
				return ret;
			}
			set
			{
				IOService.setOffline(value);
			}
		}

		internal EventHandlerList DomEvents
		{
			get
			{
				if (domEvents == null)
				{
					domEvents = new EventHandlerList();
				}
				return domEvents;
			}
		}

		internal EventHandlerList Events
		{
			get
			{
				if (events == null)
				{
					events = new EventHandlerList();
				}
				return events;
			}
		}

		private ContentListener ContentListener
		{
			get
			{
				if (contentListener == null)
				{
					contentListener = new ContentListener(this);
				}
				return contentListener;
			}
		}

		internal nsIServiceManager ServiceManager
		{
			get
			{
				if (servMan == null)
				{
					servMan = Base.GetServiceManager(this);
				}
				return servMan;
			}
		}

		internal nsIIOService IOService
		{
			get
			{
				if (ioService == null)
				{
					IntPtr ret = IntPtr.Zero;
					ServiceManager.getServiceByContractID("@mozilla.org/network/io-service;1", typeof(nsIIOService).GUID, out ret);
					if (ret == IntPtr.Zero)
					{
						throw new Mono.WebBrowser.Exception(Mono.WebBrowser.Exception.ErrorCodes.IOService);
					}
					try
					{
						ioService = (nsIIOService)Marshal.GetObjectForIUnknown(ret);
					}
					catch (System.Exception innerException)
					{
						throw new Mono.WebBrowser.Exception(Mono.WebBrowser.Exception.ErrorCodes.IOService, innerException);
					}
				}
				return ioService;
			}
		}

		internal nsIAccessibilityService AccessibilityService
		{
			get
			{
				if (accessibilityService == null)
				{
					IntPtr ret = IntPtr.Zero;
					ServiceManager.getServiceByContractID("@mozilla.org/accessibilityService;1", typeof(nsIAccessibilityService).GUID, out ret);
					if (ret == IntPtr.Zero)
					{
						throw new Mono.WebBrowser.Exception(Mono.WebBrowser.Exception.ErrorCodes.AccessibilityService);
					}
					try
					{
						accessibilityService = (nsIAccessibilityService)Marshal.GetObjectForIUnknown(ret);
					}
					catch (System.Exception innerException)
					{
						throw new Mono.WebBrowser.Exception(Mono.WebBrowser.Exception.ErrorCodes.AccessibilityService, innerException);
					}
				}
				return accessibilityService;
			}
		}

		internal nsIErrorService ErrorService
		{
			get
			{
				if (errorService == null)
				{
					IntPtr ret = IntPtr.Zero;
					ServiceManager.getServiceByContractID("@mozilla.org/xpcom/error-service;1", typeof(nsIErrorService).GUID, out ret);
					if (ret == IntPtr.Zero)
					{
						return null;
					}
					try
					{
						errorService = (nsIErrorService)Marshal.GetObjectForIUnknown(ret);
					}
					catch (System.Exception)
					{
						return null;
					}
				}
				return errorService;
			}
		}

		internal DocumentEncoder DocEncoder
		{
			get
			{
				if (docEncoder == null)
				{
					docEncoder = new DocumentEncoder(this);
				}
				return docEncoder;
			}
		}

		public event NodeEventHandler KeyDown
		{
			add
			{
				Events.AddHandler(KeyDownEvent, value);
			}
			remove
			{
				Events.RemoveHandler(KeyDownEvent, value);
			}
		}

		public event NodeEventHandler KeyPress
		{
			add
			{
				Events.AddHandler(KeyPressEvent, value);
			}
			remove
			{
				Events.RemoveHandler(KeyPressEvent, value);
			}
		}

		public event NodeEventHandler KeyUp
		{
			add
			{
				Events.AddHandler(KeyUpEvent, value);
			}
			remove
			{
				Events.RemoveHandler(KeyUpEvent, value);
			}
		}

		public event NodeEventHandler MouseClick
		{
			add
			{
				Events.AddHandler(MouseClickEvent, value);
			}
			remove
			{
				Events.RemoveHandler(MouseClickEvent, value);
			}
		}

		public event NodeEventHandler MouseDoubleClick
		{
			add
			{
				Events.AddHandler(MouseDoubleClickEvent, value);
			}
			remove
			{
				Events.RemoveHandler(MouseDoubleClickEvent, value);
			}
		}

		public event NodeEventHandler MouseDown
		{
			add
			{
				Events.AddHandler(MouseDownEvent, value);
			}
			remove
			{
				Events.RemoveHandler(MouseDownEvent, value);
			}
		}

		public event NodeEventHandler MouseEnter
		{
			add
			{
				Events.AddHandler(MouseEnterEvent, value);
			}
			remove
			{
				Events.RemoveHandler(MouseEnterEvent, value);
			}
		}

		public event NodeEventHandler MouseLeave
		{
			add
			{
				Events.AddHandler(MouseLeaveEvent, value);
			}
			remove
			{
				Events.RemoveHandler(MouseLeaveEvent, value);
			}
		}

		public event NodeEventHandler MouseMove
		{
			add
			{
				Events.AddHandler(MouseMoveEvent, value);
			}
			remove
			{
				Events.RemoveHandler(MouseMoveEvent, value);
			}
		}

		public event NodeEventHandler MouseUp
		{
			add
			{
				Events.AddHandler(MouseUpEvent, value);
			}
			remove
			{
				Events.RemoveHandler(MouseUpEvent, value);
			}
		}

		public event EventHandler Focus
		{
			add
			{
				Events.AddHandler(FocusEvent, value);
			}
			remove
			{
				Events.RemoveHandler(FocusEvent, value);
			}
		}

		public event EventHandler Blur
		{
			add
			{
				Events.AddHandler(BlurEvent, value);
			}
			remove
			{
				Events.RemoveHandler(BlurEvent, value);
			}
		}

		public event CreateNewWindowEventHandler CreateNewWindow
		{
			add
			{
				Events.AddHandler(CreateNewWindowEvent, value);
			}
			remove
			{
				Events.RemoveHandler(CreateNewWindowEvent, value);
			}
		}

		public event AlertEventHandler Alert
		{
			add
			{
				Events.AddHandler(AlertEvent, value);
			}
			remove
			{
				Events.RemoveHandler(AlertEvent, value);
			}
		}

		public event EventHandler Loaded
		{
			add
			{
				Events.AddHandler(LoadEvent, value);
			}
			remove
			{
				Events.RemoveHandler(LoadEvent, value);
			}
		}

		public event EventHandler Unloaded
		{
			add
			{
				Events.AddHandler(UnloadEvent, value);
			}
			remove
			{
				Events.RemoveHandler(UnloadEvent, value);
			}
		}

		public event StatusChangedEventHandler StatusChanged
		{
			add
			{
				Events.AddHandler(StatusChangedEvent, value);
			}
			remove
			{
				Events.RemoveHandler(StatusChangedEvent, value);
			}
		}

		public event SecurityChangedEventHandler SecurityChanged
		{
			add
			{
				Events.AddHandler(SecurityChangedEvent, value);
			}
			remove
			{
				Events.RemoveHandler(SecurityChangedEvent, value);
			}
		}

		public event LoadStartedEventHandler LoadStarted
		{
			add
			{
				Events.AddHandler(LoadStartedEvent, value);
			}
			remove
			{
				Events.RemoveHandler(LoadStartedEvent, value);
			}
		}

		public event LoadCommitedEventHandler LoadCommited
		{
			add
			{
				Events.AddHandler(LoadCommitedEvent, value);
			}
			remove
			{
				Events.RemoveHandler(LoadCommitedEvent, value);
			}
		}

		public event Mono.WebBrowser.ProgressChangedEventHandler ProgressChanged
		{
			add
			{
				Events.AddHandler(ProgressChangedEvent, value);
			}
			remove
			{
				Events.RemoveHandler(ProgressChangedEvent, value);
			}
		}

		public event LoadFinishedEventHandler LoadFinished
		{
			add
			{
				Events.AddHandler(LoadFinishedEvent, value);
			}
			remove
			{
				Events.RemoveHandler(LoadFinishedEvent, value);
			}
		}

		public event ContextMenuEventHandler ContextMenuShown
		{
			add
			{
				Events.AddHandler(ContextMenuEvent, value);
			}
			remove
			{
				Events.RemoveHandler(ContextMenuEvent, value);
			}
		}

		public event NavigationRequestedEventHandler NavigationRequested
		{
			add
			{
				ContentListener.AddHandler(value);
			}
			remove
			{
				ContentListener.RemoveHandler(value);
			}
		}

		internal event EventHandler Generic
		{
			add
			{
				Events.AddHandler(GenericEvent, value);
			}
			remove
			{
				Events.RemoveHandler(GenericEvent, value);
			}
		}

		public WebBrowser(Platform platform)
		{
			this.platform = platform;
			callbacks = new Callback(this);
			loaded = Base.Init(this, platform);
			documents = new Hashtable();
		}

		public bool Load(IntPtr handle, int width, int height)
		{
			loaded = Base.Bind(this, handle, width, height);
			return loaded;
		}

		public void Shutdown()
		{
			Base.Shutdown(this);
		}

		internal void Reset()
		{
			document = null;
			DomEvents.Dispose();
			domEvents = null;
			documents.Clear();
		}

		public void FocusIn(FocusOption focus)
		{
			if (created)
			{
				Base.Focus(this, focus);
			}
		}

		public void FocusOut()
		{
			if (created)
			{
				Base.Blur(this);
			}
		}

		public void Activate()
		{
			if (Created)
			{
				Base.Activate(this);
			}
		}

		public void Deactivate()
		{
			if (created)
			{
				Base.Deactivate(this);
			}
		}

		public void Resize(int width, int height)
		{
			this.width = width;
			this.height = height;
			isDirty = true;
			if (created)
			{
				Base.Resize(this, width, height);
			}
		}

		public void Render(byte[] data)
		{
			if (Created)
			{
				if (data == null)
				{
					throw new ArgumentNullException("data");
				}
				string @string = Encoding.UTF8.GetString(data);
				Render(@string);
			}
		}

		public void Render(string html)
		{
			if (Created)
			{
				Render(html, "file:///", "text/html");
			}
		}

		public void Render(string html, string uri, string contentType)
		{
			if (Created)
			{
				if (Navigation == null)
				{
					throw new Mono.WebBrowser.Exception(Mono.WebBrowser.Exception.ErrorCodes.Navigation);
				}
				nsIWebBrowserStream nsIWebBrowserStream2 = (nsIWebBrowserStream)navigation.navigation;
				AsciiString asciiString = new AsciiString(uri);
				IOService.newURI(asciiString.Handle, null, null, out var ret);
				HandleRef handle = new AsciiString(contentType).Handle;
				nsIWebBrowserStream2.openStream(ret, handle);
				IntPtr intPtr = Marshal.StringToHGlobalAnsi(html);
				nsIWebBrowserStream2.appendToStream(intPtr, (uint)html.Length);
				Marshal.FreeHGlobal(intPtr);
				nsIWebBrowserStream2.closeStream();
			}
		}

		public void ExecuteScript(string script)
		{
			if (Created)
			{
				Base.EvalScript(this, script);
			}
		}

		internal void AttachEvent(INode node, string eve, EventHandler handler)
		{
			string key = string.Intern(node.GetHashCode() + ":" + eve);
			DomEvents.AddHandler(key, handler);
		}

		internal void DetachEvent(INode node, string eve, EventHandler handler)
		{
			string key = string.Intern(node.GetHashCode() + ":" + eve);
			DomEvents.RemoveHandler(key, handler);
		}

		static WebBrowser()
		{
			KeyDown = new object();
			KeyPress = new object();
			KeyUp = new object();
			MouseClick = new object();
			MouseDoubleClick = new object();
			MouseDown = new object();
			MouseEnter = new object();
			MouseLeave = new object();
			MouseMove = new object();
			MouseUp = new object();
			Focus = new object();
			Blur = new object();
			CreateNewWindow = new object();
			Alert = new object();
			LoadStarted = new object();
			LoadCommited = new object();
			ProgressChanged = new object();
			LoadFinished = new object();
			LoadEvent = new object();
			UnloadEvent = new object();
			StatusChanged = new object();
			SecurityChanged = new object();
			ProgressEvent = new object();
			ContextMenuEvent = new object();
			NavigationRequested = new object();
			Generic = new object();
		}
	}
	internal enum StopOption : uint
	{
		Network = 1u,
		Content,
		All
	}
	internal delegate void nsIReadSegmentFunDelegate([MarshalAs(UnmanagedType.Interface)] nsIOutputStream aInStream, IntPtr aClosure, string aFromSegment, uint aCount, out uint aWriteCount);
	internal delegate void nsITimerCallbackDelegate([MarshalAs(UnmanagedType.Interface)] nsITimer timer, IntPtr closure);
	internal delegate void nsIWriteSegmentFunDelegate([MarshalAs(UnmanagedType.Interface)] nsIInputStream aInStream, IntPtr aClosure, string aFromSegment, uint aToOffset, uint aCount, out uint aWriteCount);
	[ComImport]
	[Guid("71a3b4e7-e83d-45cf-a20e-9ce292bcf19f")]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	internal interface nsIAccessNode
	{
		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getDOMNode([MarshalAs(UnmanagedType.Interface)] out nsIDOMNode ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getNumChildren(out int ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getChildNodeAt(int childNum, [MarshalAs(UnmanagedType.Interface)] out nsIAccessNode ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getParentNode([MarshalAs(UnmanagedType.Interface)] out nsIAccessNode ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getFirstChildNode([MarshalAs(UnmanagedType.Interface)] out nsIAccessNode ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getLastChildNode([MarshalAs(UnmanagedType.Interface)] out nsIAccessNode ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getPreviousSiblingNode([MarshalAs(UnmanagedType.Interface)] out nsIAccessNode ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getNextSiblingNode([MarshalAs(UnmanagedType.Interface)] out nsIAccessNode ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getAccessibleDocument([MarshalAs(UnmanagedType.Interface)] out nsIAccessibleDocument ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getInnerHTML(HandleRef ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int scrollTo(uint aScrollType);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int scrollToPoint(uint aCoordinateType, int aX, int aY);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getOwnerWindow(IntPtr ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getUniqueID(IntPtr ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getComputedStyleValue(HandleRef pseudoElt, HandleRef propertyName, HandleRef ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getComputedStyleCSSValue(HandleRef pseudoElt, HandleRef propertyName, [MarshalAs(UnmanagedType.Interface)] out nsIDOMCSSPrimitiveValue ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getLanguage(HandleRef ret);
	}
	internal class nsAccessNode
	{
		public static nsIAccessNode GetProxy(IWebBrowser control, nsIAccessNode obj)
		{
			return Base.GetProxyForObject(control, typeof(nsIAccessNode).GUID, obj) as nsIAccessNode;
		}
	}
	[ComImport]
	[Guid("27386cf1-f27e-4d2d-9bf4-c4621d50d299")]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	internal interface nsIAccessibilityService : nsIAccessibleRetrieval
	{
		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		new int getAccessibleFor([MarshalAs(UnmanagedType.Interface)] nsIDOMNode aNode, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		new int getAttachedAccessibleFor([MarshalAs(UnmanagedType.Interface)] nsIDOMNode aNode, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		new int getRelevantContentNodeFor([MarshalAs(UnmanagedType.Interface)] nsIDOMNode aNode, [MarshalAs(UnmanagedType.Interface)] out nsIDOMNode ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		new int getAccessibleInWindow([MarshalAs(UnmanagedType.Interface)] nsIDOMNode aNode, [MarshalAs(UnmanagedType.Interface)] nsIDOMWindow aDOMWin, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		new int getAccessibleInWeakShell([MarshalAs(UnmanagedType.Interface)] nsIDOMNode aNode, [MarshalAs(UnmanagedType.Interface)] nsIWeakReference aPresShell, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		new int getAccessibleInShell([MarshalAs(UnmanagedType.Interface)] nsIDOMNode aNode, IntPtr aPresShell, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		new int getCachedAccessNode([MarshalAs(UnmanagedType.Interface)] nsIDOMNode aNode, [MarshalAs(UnmanagedType.Interface)] nsIWeakReference aShell, [MarshalAs(UnmanagedType.Interface)] out nsIAccessNode ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		new int getCachedAccessible([MarshalAs(UnmanagedType.Interface)] nsIDOMNode aNode, [MarshalAs(UnmanagedType.Interface)] nsIWeakReference aShell, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		new int getStringRole(uint aRole, HandleRef ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		new int getStringStates(uint aStates, uint aExtraStates, [MarshalAs(UnmanagedType.Interface)] out nsIDOMDOMStringList ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		new int getStringEventType(uint aEventType, HandleRef ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		new int getStringRelationType(uint aRelationType, HandleRef ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int createOuterDocAccessible([MarshalAs(UnmanagedType.Interface)] nsIDOMNode aNode, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int createRootAccessible(IntPtr aShell, IntPtr aDocument, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int createHTML4ButtonAccessible([MarshalAs(UnmanagedType.Interface)] IntPtr aFrame, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int createHyperTextAccessible([MarshalAs(UnmanagedType.Interface)] IntPtr aFrame, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int createHTMLBRAccessible([MarshalAs(UnmanagedType.Interface)] IntPtr aFrame, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int createHTMLButtonAccessible([MarshalAs(UnmanagedType.Interface)] IntPtr aFrame, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int createHTMLAccessibleByMarkup(IntPtr aFrame, [MarshalAs(UnmanagedType.Interface)] nsIWeakReference aWeakShell, [MarshalAs(UnmanagedType.Interface)] nsIDOMNode aDOMNode, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int createHTMLLIAccessible([MarshalAs(UnmanagedType.Interface)] IntPtr aFrame, [MarshalAs(UnmanagedType.Interface)] IntPtr aBulletFrame, HandleRef aBulletText, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int createHTMLCheckboxAccessible([MarshalAs(UnmanagedType.Interface)] IntPtr aFrame, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int createHTMLComboboxAccessible([MarshalAs(UnmanagedType.Interface)] nsIDOMNode aNode, [MarshalAs(UnmanagedType.Interface)] nsIWeakReference aPresShell, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int createHTMLGenericAccessible([MarshalAs(UnmanagedType.Interface)] IntPtr aFrame, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int createHTMLGroupboxAccessible([MarshalAs(UnmanagedType.Interface)] IntPtr aFrame, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int createHTMLHRAccessible([MarshalAs(UnmanagedType.Interface)] IntPtr aFrame, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int createHTMLImageAccessible([MarshalAs(UnmanagedType.Interface)] IntPtr aFrame, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int createHTMLLabelAccessible([MarshalAs(UnmanagedType.Interface)] IntPtr aFrame, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int createHTMLListboxAccessible([MarshalAs(UnmanagedType.Interface)] nsIDOMNode aNode, [MarshalAs(UnmanagedType.Interface)] nsIWeakReference aPresShell, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int createHTMLObjectFrameAccessible(IntPtr aFrame, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int createHTMLRadioButtonAccessible([MarshalAs(UnmanagedType.Interface)] IntPtr aFrame, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int createHTMLSelectOptionAccessible([MarshalAs(UnmanagedType.Interface)] nsIDOMNode aNode, [MarshalAs(UnmanagedType.Interface)] nsIAccessible aAccParent, [MarshalAs(UnmanagedType.Interface)] nsIWeakReference aPresShell, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int createHTMLTableAccessible([MarshalAs(UnmanagedType.Interface)] IntPtr aFrame, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int createHTMLTableCellAccessible([MarshalAs(UnmanagedType.Interface)] IntPtr aFrame, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int createHTMLTableHeadAccessible([MarshalAs(UnmanagedType.Interface)] nsIDOMNode aDOMNode, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int createHTMLTextAccessible([MarshalAs(UnmanagedType.Interface)] IntPtr aFrame, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int createHTMLTextFieldAccessible([MarshalAs(UnmanagedType.Interface)] IntPtr aFrame, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int createHTMLCaptionAccessible([MarshalAs(UnmanagedType.Interface)] IntPtr aFrame, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getAccessible([MarshalAs(UnmanagedType.Interface)] nsIDOMNode aNode, IntPtr aPresShell, [MarshalAs(UnmanagedType.Interface)] nsIWeakReference aWeakShell, out IntPtr frameHint, out bool aIsHidden, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int addNativeRootAccessible(IntPtr aAtkAccessible, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int removeNativeRootAccessible([MarshalAs(UnmanagedType.Interface)] nsIAccessible aRootAccessible);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int invalidateSubtreeFor(IntPtr aPresShell, IntPtr aChangedContent, uint aEvent);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int processDocLoadEvent([MarshalAs(UnmanagedType.Interface)] nsITimer aTimer, IntPtr aClosure, uint aEventType);
	}
	internal class nsAccessibilityService
	{
		public static nsIAccessibilityService GetProxy(IWebBrowser control, nsIAccessibilityService obj)
		{
			return Base.GetProxyForObject(control, typeof(nsIAccessibilityService).GUID, obj) as nsIAccessibilityService;
		}
	}
	[ComImport]
	[Guid("004b6882-2df1-49df-bb5f-0fb81a5b1edf")]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	internal interface nsIAccessible
	{
		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getParent([MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getNextSibling([MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getPreviousSibling([MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getFirstChild([MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getLastChild([MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getChildren([MarshalAs(UnmanagedType.Interface)] out nsIArray ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getChildCount(out int ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getIndexInParent(out int ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getName(HandleRef ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int setName(HandleRef value);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getValue(HandleRef ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getDescription(HandleRef ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getKeyboardShortcut(HandleRef ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getDefaultKeyBinding(HandleRef ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getKeyBindings(char aActionIndex, [MarshalAs(UnmanagedType.Interface)] out nsIDOMDOMStringList ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getRole(out uint ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getFinalRole(out uint ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getFinalState(out uint aState, out uint aExtraState);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getHelp(HandleRef ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getFocusedChild([MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getAttributes([MarshalAs(UnmanagedType.Interface)] out nsIPersistentProperties ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int groupPosition(out int aGroupLevel, out int aSimilarItemsInGroup, out int aPositionInGroup);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getChildAtPoint(int x, int y, [MarshalAs(UnmanagedType.Interface)] out nsIAccessible ret);

		[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		int getChildAt(int aChildIndex, [MarshalAs(Unman

Room Architect Tool_Data/Managed/mscorlib.dll

Decompiled 3 months ago
#define CONTRACTS_FULL
#define DEBUG
using System;
using System.Buffers;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Configuration.Assemblies;
using System.Diagnostics;
using System.Diagnostics.Contracts;
using System.Diagnostics.SymbolStore;
using System.Diagnostics.Tracing;
using System.Globalization;
using System.IO;
using System.Numerics.Hashing;
using System.Reflection;
using System.Reflection.Emit;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
using System.Runtime.ExceptionServices;
using System.Runtime.Hosting;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
using System.Runtime.InteropServices.WindowsRuntime;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Activation;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Contexts;
using System.Runtime.Remoting.Lifetime;
using System.Runtime.Remoting.Messaging;
using System.Runtime.Remoting.Metadata;
using System.Runtime.Remoting.Proxies;
using System.Runtime.Remoting.Services;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters;
using System.Runtime.Serialization.Formatters.Binary;
using System.Runtime.Versioning;
using System.Security;
using System.Security.AccessControl;
using System.Security.Claims;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Security.Permissions;
using System.Security.Policy;
using System.Security.Principal;
using System.Security.Util;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Internal.Runtime.Augments;
using Microsoft.Win32;
using Microsoft.Win32.SafeHandles;
using Mono;
using Mono.Globalization.Unicode;
using Mono.Interop;
using Mono.Math;
using Mono.Math.Prime;
using Mono.Math.Prime.Generator;
using Mono.Security;
using Mono.Security.Authenticode;
using Mono.Security.Cryptography;
using Mono.Security.X509;
using Mono.Security.X509.Extensions;
using Mono.Xml;
using Unity;
using XamMac.CoreFoundation;

[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("mscorlib.dll")]
[assembly: AssemblyDescription("mscorlib.dll")]
[assembly: AssemblyDefaultAlias("mscorlib.dll")]
[assembly: AssemblyCompany("Mono development team")]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright("(c) Various Mono authors")]
[assembly: AssemblyInformationalVersion("4.6.57.0")]
[assembly: SatelliteContractVersion("4.0.0.0")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: CLSCompliant(true)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: AssemblyDelaySign(true)]
[assembly: AllowPartiallyTrustedCallers]
[assembly: AssemblyFileVersion("4.6.57.0")]
[assembly: ComVisible(false)]
[assembly: CompilationRelaxations(CompilationRelaxations.NoStringInterning)]
[assembly: DefaultDependency(LoadHint.Always)]
[assembly: StringFreezing]
[assembly: InternalsVisibleTo("System, PublicKey=00000000000000000400000000000000")]
[assembly: InternalsVisibleTo("System.Core, PublicKey=00000000000000000400000000000000")]
[assembly: InternalsVisibleTo("System.Runtime.WindowsRuntime, PublicKey=00000000000000000400000000000000")]
[assembly: InternalsVisibleTo("System.Runtime.WindowsRuntime.UI.Xaml, PublicKey=00000000000000000400000000000000")]
[assembly: InternalsVisibleTo("System.Runtime.InteropServices.RuntimeInformation, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
[assembly: AssemblyKeyFile("../ecma.pub")]
[assembly: ComCompatibleVersion(1, 0, 3300, 0)]
[assembly: Guid("BED7F4EA-1A96-11D2-8F08-00A0C9A6186D")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("4.0.0.0")]
[module: UnverifiableCode]
internal static class Interop
{
	internal static class Libraries
	{
		internal const string CoreLibNative = "System.Private.CoreLib.Native";
	}
}
internal static class AssemblyRef
{
	internal const string SystemConfiguration = "System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	internal const string System = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string EcmaPublicKey = "b77a5c561934e089";

	public const string FrameworkPublicKeyFull = "00000000000000000400000000000000";

	public const string FrameworkPublicKeyFull2 = "00000000000000000400000000000000";

	public const string MicrosoftPublicKey = "b03f5f7f11d50a3a";

	public const string MicrosoftJScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string MicrosoftVSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string SystemData = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string SystemDesign = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string SystemDrawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string SystemWeb = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string SystemWebExtensions = "System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string SystemWindowsForms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
internal static class Consts
{
	public const string MonoVersion = "5.11.0.0";

	public const string MonoCompany = "Mono development team";

	public const string MonoProduct = "Mono Common Language Infrastructure";

	public const string MonoCopyright = "(c) Various Mono authors";

	public const int MonoCorlibVersion = 1051100001;

	public const string FxVersion = "4.0.0.0";

	public const string FxFileVersion = "4.6.57.0";

	public const string EnvironmentVersion = "4.0.30319.42000";

	public const string VsVersion = "0.0.0.0";

	public const string VsFileVersion = "11.0.0.0";

	private const string PublicKeyToken = "b77a5c561934e089";

	public const string AssemblyI18N = "I18N, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMicrosoft_JScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMono_Http = "Mono.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Posix = "Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Security = "Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Messaging_RabbitMQ = "Mono.Messaging.RabbitMQ, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyCorlib = "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Data = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Design = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing_Design = "System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Messaging = "System.Messaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Security = "System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Web = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Core = "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string WindowsBase_3_0 = "WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
internal sealed class Locale
{
	private Locale()
	{
	}

	public static string GetText(string msg)
	{
		return msg;
	}

	public static string GetText(string fmt, params object[] args)
	{
		return string.Format(fmt, args);
	}
}
internal static class SR
{
	public const string Arg_AccessException = "Cannot access member.";

	public const string Arg_AccessViolationException = "Attempted to read or write protected memory. This is often an indication that other memory is corrupt.";

	public const string Arg_ApplicationException = "Error in the application.";

	public const string Arg_ArgumentException = "Value does not fall within the expected range.";

	public const string Arg_ArgumentOutOfRangeException = "Specified argument was out of the range of valid values.";

	public const string Arg_ArithmeticException = "Overflow or underflow in the arithmetic operation.";

	public const string Arg_ArrayPlusOffTooSmall = "Destination array is not long enough to copy all the items in the collection. Check array index and length.";

	public const string Arg_ArrayTypeMismatchException = "Attempted to access an element as a type incompatible with the array.";

	public const string Arg_ArrayZeroError = "Array must not be of length zero.";

	public const string Arg_BadImageFormatException = "Format of the executable (.exe) or library (.dll) is invalid.";

	public const string Arg_BogusIComparer = "Unable to sort because the IComparer.Compare() method returns inconsistent results. Either a value does not compare equal to itself, or one value repeatedly compared to another value yields different results. IComparer: '{0}'.";

	public const string Arg_CannotBeNaN = "TimeSpan does not accept floating point Not-a-Number values.";

	public const string Arg_CannotHaveNegativeValue = "String cannot contain a minus sign if the base is not 10.";

	public const string Arg_CopyNonBlittableArray = "Arrays must contain only blittable data in order to be copied to unmanaged memory.";

	public const string Arg_CopyOutOfRange = "Requested range extends past the end of the array.";

	public const string Arg_CryptographyException = "Error occurred during a cryptographic operation.";

	public const string Arg_DataMisalignedException = "A datatype misalignment was detected in a load or store instruction.";

	public const string Arg_DateTimeRange = "Combination of arguments to the DateTime constructor is out of the legal range.";

	public const string Arg_DirectoryNotFoundException = "Attempted to access a path that is not on the disk.";

	public const string Arg_DecBitCtor = "Decimal byte array constructor requires an array of length four containing valid decimal bytes.";

	public const string Arg_DivideByZero = "Attempted to divide by zero.";

	public const string Arg_DlgtNullInst = "Delegate to an instance method cannot have null 'this'.";

	public const string Arg_DlgtTypeMis = "Delegates must be of the same type.";

	public const string Arg_DuplicateWaitObjectException = "Duplicate objects in argument.";

	public const string Arg_EnumAndObjectMustBeSameType = "Object must be the same type as the enum. The type passed in was '{0}'; the enum type was '{1}'.";

	public const string Arg_EntryPointNotFoundException = "Entry point was not found.";

	public const string Arg_EntryPointNotFoundExceptionParameterized = "Unable to find an entry point named '{0}' in DLL '{1}'.";

	public const string Arg_EnumIllegalVal = "Illegal enum value: {0}.";

	public const string Arg_ExecutionEngineException = "Internal error in the runtime.";

	public const string Arg_ExternalException = "External component has thrown an exception.";

	public const string Arg_FieldAccessException = "Attempted to access a field that is not accessible by the caller.";

	public const string Arg_FormatException = "One of the identified items was in an invalid format.";

	public const string Arg_GuidArrayCtor = "Byte array for GUID must be exactly {0} bytes long.";

	public const string Arg_HexStyleNotSupported = "The number style AllowHexSpecifier is not supported on floating point data types.";

	public const string Arg_HTCapacityOverflow = "Hashtable's capacity overflowed and went negative. Check load factor, capacity and the current size of the table.";

	public const string Arg_IndexOutOfRangeException = "Index was outside the bounds of the array.";

	public const string Arg_InsufficientExecutionStackException = "Insufficient stack to continue executing the program safely. This can happen from having too many functions on the call stack or function on the stack using too much stack space.";

	public const string Arg_InvalidBase = "Invalid Base.";

	public const string Arg_InvalidCastException = "Specified cast is not valid.";

	public const string Arg_InvalidHexStyle = "With the AllowHexSpecifier bit set in the enum bit field, the only other valid bits that can be combined into the enum value must be a subset of those in HexNumber.";

	public const string Arg_InvalidOperationException = "Operation is not valid due to the current state of the object.";

	public const string Arg_OleAutDateInvalid = " Not a legal OleAut date.";

	public const string Arg_OleAutDateScale = "OleAut date did not convert to a DateTime correctly.";

	public const string Arg_InvalidRuntimeTypeHandle = "Invalid RuntimeTypeHandle.";

	public const string Arg_IOException = "I/O error occurred.";

	public const string Arg_KeyNotFound = "The given key was not present in the dictionary.";

	public const string Arg_LongerThanSrcString = "Source string was not long enough. Check sourceIndex and count.";

	public const string Arg_LowerBoundsMustMatch = "The arrays' lower bounds must be identical.";

	public const string Arg_MissingFieldException = "Attempted to access a non-existing field.";

	public const string Arg_MethodAccessException = "Attempt to access the method failed.";

	public const string Arg_MissingMemberException = "Attempted to access a missing member.";

	public const string Arg_MissingMethodException = "Attempted to access a missing method.";

	public const string Arg_MulticastNotSupportedException = "Attempted to add multiple callbacks to a delegate that does not support multicast.";

	public const string Arg_MustBeBoolean = "Object must be of type Boolean.";

	public const string Arg_MustBeByte = "Object must be of type Byte.";

	public const string Arg_MustBeChar = "Object must be of type Char.";

	public const string Arg_MustBeDateTime = "Object must be of type DateTime.";

	public const string Arg_MustBeDateTimeOffset = "Object must be of type DateTimeOffset.";

	public const string Arg_MustBeDecimal = "Object must be of type Decimal.";

	public const string Arg_MustBeDouble = "Object must be of type Double.";

	public const string Arg_MustBeEnum = "Type provided must be an Enum.";

	public const string Arg_MustBeGuid = "Object must be of type GUID.";

	public const string Arg_MustBeInt16 = "Object must be of type Int16.";

	public const string Arg_MustBeInt32 = "Object must be of type Int32.";

	public const string Arg_MustBeInt64 = "Object must be of type Int64.";

	public const string Arg_MustBePrimArray = "Object must be an array of primitives.";

	public const string Arg_MustBeSByte = "Object must be of type SByte.";

	public const string Arg_MustBeSingle = "Object must be of type Single.";

	public const string Arg_MustBeStatic = "Method must be a static method.";

	public const string Arg_MustBeString = "Object must be of type String.";

	public const string Arg_MustBeStringPtrNotAtom = "The pointer passed in as a String must not be in the bottom 64K of the process's address space.";

	public const string Arg_MustBeTimeSpan = "Object must be of type TimeSpan.";

	public const string Arg_MustBeUInt16 = "Object must be of type UInt16.";

	public const string Arg_MustBeUInt32 = "Object must be of type UInt32.";

	public const string Arg_MustBeUInt64 = "Object must be of type UInt64.";

	public const string Arg_MustBeVersion = "Object must be of type Version.";

	public const string Arg_NeedAtLeast1Rank = "Must provide at least one rank.";

	public const string Arg_Need2DArray = "Array was not a two-dimensional array.";

	public const string Arg_Need3DArray = "Array was not a three-dimensional array.";

	public const string Arg_NegativeArgCount = "Argument count must not be negative.";

	public const string Arg_NotFiniteNumberException = "Arg_NotFiniteNumberException = Number encountered was not a finite quantity.";

	public const string Arg_NonZeroLowerBound = "The lower bound of target array must be zero.";

	public const string Arg_NotGenericParameter = "Method may only be called on a Type for which Type.IsGenericParameter is true.";

	public const string Arg_NotImplementedException = "The method or operation is not implemented.";

	public const string Arg_NotSupportedException = "Specified method is not supported.";

	public const string Arg_NotSupportedNonZeroLowerBound = "Arrays with non-zero lower bounds are not supported.";

	public const string Arg_NullReferenceException = "Object reference not set to an instance of an object.";

	public const string Arg_ObjObjEx = "Object of type '{0}' cannot be converted to type '{1}'.";

	public const string Arg_OverflowException = "Arithmetic operation resulted in an overflow.";

	public const string Arg_OutOfMemoryException = "Insufficient memory to continue the execution of the program.";

	public const string Arg_PlatformNotSupported = "Operation is not supported on this platform.";

	public const string Arg_ParamName_Name = "Parameter name: {0}";

	public const string Arg_PathIllegal = "The path is not of a legal form.";

	public const string Arg_PathIllegalUNC = "The UNC path should be of the form \\\\\\\\server\\\\share.";

	public const string Arg_RankException = "Attempted to operate on an array with the incorrect number of dimensions.";

	public const string Arg_RankIndices = "Indices length does not match the array rank.";

	public const string Arg_RankMultiDimNotSupported = "Only single dimensional arrays are supported for the requested action.";

	public const string Arg_RanksAndBounds = "Number of lengths and lowerBounds must match.";

	public const string Arg_RegGetOverflowBug = "RegistryKey.GetValue does not allow a String that has a length greater than Int32.MaxValue.";

	public const string Arg_RegKeyNotFound = "The specified registry key does not exist.";

	public const string Arg_SecurityException = "Security error.";

	public const string Arg_StackOverflowException = "Operation caused a stack overflow.";

	public const string Arg_SynchronizationLockException = "Object synchronization method was called from an unsynchronized block of code.";

	public const string Arg_SystemException = "System error.";

	public const string Arg_TargetInvocationException = "Exception has been thrown by the target of an invocation.";

	public const string Arg_TargetParameterCountException = "Number of parameters specified does not match the expected number.";

	public const string Arg_DefaultValueMissingException = "Missing parameter does not have a default value.";

	public const string Arg_ThreadStartException = "Thread failed to start.";

	public const string Arg_ThreadStateException = "Thread was in an invalid state for the operation being executed.";

	public const string Arg_TimeoutException = "The operation has timed out.";

	public const string Arg_TypeAccessException = "Attempt to access the type failed.";

	public const string Arg_TypeLoadException = "Failure has occurred while loading a type.";

	public const string Arg_UnauthorizedAccessException = "Attempted to perform an unauthorized operation.";

	public const string Arg_VersionString = "Version string portion was too short or too long.";

	public const string Arg_WrongType = "The value '{0}' is not of type '{1}' and cannot be used in this generic collection.";

	public const string Argument_AbsolutePathRequired = "Absolute path information is required.";

	public const string Argument_AddingDuplicate = "An item with the same key has already been added. Key: {0}";

	public const string Argument_AddingDuplicate__ = "Item has already been added. Key in dictionary: '{0}'  Key being added: '{1}'";

	public const string Argument_AdjustmentRulesNoNulls = "The AdjustmentRule array cannot contain null elements.";

	public const string Argument_AdjustmentRulesOutOfOrder = "The elements of the AdjustmentRule array must be in chronological order and must not overlap.";

	public const string Argument_BadFormatSpecifier = "Format specifier was invalid.";

	public const string Argument_CodepageNotSupported = "{0} is not a supported code page.";

	public const string Argument_CompareOptionOrdinal = "CompareOption.Ordinal cannot be used with other options.";

	public const string Argument_ConflictingDateTimeRoundtripStyles = "The DateTimeStyles value RoundtripKind cannot be used with the values AssumeLocal, AssumeUniversal or AdjustToUniversal.";

	public const string Argument_ConflictingDateTimeStyles = "The DateTimeStyles values AssumeLocal and AssumeUniversal cannot be used together.";

	public const string Argument_ConversionOverflow = "Conversion buffer overflow.";

	public const string Argument_ConvertMismatch = "The conversion could not be completed because the supplied DateTime did not have the Kind property set correctly.  For example, when the Kind property is DateTimeKind.Local, the source time zone must be TimeZoneInfo.Local.";

	public const string Argument_CultureInvalidIdentifier = "{0} is an invalid culture identifier.";

	public const string Argument_CultureIetfNotSupported = "Culture IETF Name {0} is not a recognized IETF name.";

	public const string Argument_CultureIsNeutral = "Culture ID {0} (0x{0:X4}) is a neutral culture; a region cannot be created from it.";

	public const string Argument_CultureNotSupported = "Culture is not supported.";

	public const string Argument_CustomCultureCannotBePassedByNumber = "Customized cultures cannot be passed by LCID, only by name.";

	public const string Argument_DateTimeBadBinaryData = "The binary data must result in a DateTime with ticks between DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks.";

	public const string Argument_DateTimeHasTicks = "The supplied DateTime must have the Year, Month, and Day properties set to 1.  The time cannot be specified more precisely than whole milliseconds.";

	public const string Argument_DateTimeHasTimeOfDay = "The supplied DateTime includes a TimeOfDay setting.   This is not supported.";

	public const string Argument_DateTimeIsInvalid = "The supplied DateTime represents an invalid time.  For example, when the clock is adjusted forward, any time in the period that is skipped is invalid.";

	public const string Argument_DateTimeIsNotAmbiguous = "The supplied DateTime is not in an ambiguous time range.";

	public const string Argument_DateTimeKindMustBeUnspecified = "The supplied DateTime must have the Kind property set to DateTimeKind.Unspecified.";

	public const string Argument_DateTimeOffsetInvalidDateTimeStyles = "The DateTimeStyles value 'NoCurrentDateDefault' is not allowed when parsing DateTimeOffset.";

	public const string Argument_DateTimeOffsetIsNotAmbiguous = "The supplied DateTimeOffset is not in an ambiguous time range.";

	public const string Argument_EmptyDecString = "Decimal separator cannot be the empty string.";

	public const string Argument_EmptyName = "Empty name is not legal.";

	public const string Argument_EmptyWaithandleArray = "Waithandle array may not be empty.";

	public const string Argument_EncoderFallbackNotEmpty = "Must complete Convert() operation or call Encoder.Reset() before calling GetBytes() or GetByteCount(). Encoder '{0}' fallback '{1}'.";

	public const string Argument_EncodingConversionOverflowBytes = "The output byte buffer is too small to contain the encoded data, encoding '{0}' fallback '{1}'.";

	public const string Argument_EncodingConversionOverflowChars = "The output char buffer is too small to contain the decoded characters, encoding '{0}' fallback '{1}'.";

	public const string Argument_EncodingNotSupported = "'{0}' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.";

	public const string Argument_EnumTypeDoesNotMatch = "The argument type, '{0}', is not the same as the enum type '{1}'.";

	public const string Argument_FallbackBufferNotEmpty = "Cannot change fallback when buffer is not empty. Previous Convert() call left data in the fallback buffer.";

	public const string Argument_IdnBadLabelSize = "IDN labels must be between 1 and 63 characters long.";

	public const string Argument_IdnBadPunycode = "Invalid IDN encoded string.";

	public const string Argument_IdnIllegalName = "Decoded string is not a valid IDN name.";

	public const string Argument_ImplementIComparable = "At least one object must implement IComparable.";

	public const string Argument_InvalidArgumentForComparison = "Type of argument is not compatible with the generic comparer.";

	public const string Argument_InvalidArrayLength = "Length of the array must be {0}.";

	public const string Argument_InvalidArrayType = "Target array type is not compatible with the type of items in the collection.";

	public const string Argument_InvalidCalendar = "Not a valid calendar for the given culture.";

	public const string Argument_InvalidCharSequence = "Invalid Unicode code point found at index {0}.";

	public const string Argument_InvalidCharSequenceNoIndex = "String contains invalid Unicode code points.";

	public const string Argument_InvalidCodePageBytesIndex = "Unable to translate bytes {0} at index {1} from specified code page to Unicode.";

	public const string Argument_InvalidCodePageConversionIndex = "Unable to translate Unicode character \\\\u{0:X4} at index {1} to specified code page.";

	public const string Argument_InvalidCultureName = "Culture name '{0}' is not supported.";

	public const string Argument_InvalidDateTimeKind = "Invalid DateTimeKind value.";

	public const string Argument_InvalidDateTimeStyles = "An undefined DateTimeStyles value is being used.";

	public const string Argument_InvalidDigitSubstitution = "The DigitSubstitution property must be of a valid member of the DigitShapes enumeration. Valid entries include Context, NativeNational or None.";

	public const string Argument_InvalidEnumValue = "The value '{0}' is not valid for this usage of the type {1}.";

	public const string Argument_InvalidFlag = "Value of flags is invalid.";

	public const string Argument_InvalidGroupSize = "Every element in the value array should be between one and nine, except for the last element, which can be zero.";

	public const string Argument_InvalidHighSurrogate = "Found a high surrogate char without a following low surrogate at index: {0}. The input may not be in this encoding, or may not contain valid Unicode (UTF-16) characters.";

	public const string Argument_InvalidId = "The specified ID parameter '{0}' is not supported.";

	public const string Argument_InvalidLowSurrogate = "Found a low surrogate char without a preceding high surrogate at index: {0}. The input may not be in this encoding, or may not contain valid Unicode (UTF-16) characters.";

	public const string Argument_InvalidNativeDigitCount = "The NativeDigits array must contain exactly ten members.";

	public const string Argument_InvalidNativeDigitValue = "Each member of the NativeDigits array must be a single text element (one or more UTF16 code points) with a Unicode Nd (Number, Decimal Digit) property indicating it is a digit.";

	public const string Argument_InvalidNeutralRegionName = "The region name {0} should not correspond to neutral culture; a specific culture name is required.";

	public const string Argument_InvalidNormalizationForm = "Invalid normalization form.";

	public const string Argument_InvalidNumberStyles = "An undefined NumberStyles value is being used.";

	public const string Argument_InvalidOffLen = "Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.";

	public const string Argument_InvalidPathChars = "Illegal characters in path.";

	public const string Argument_InvalidREG_TZI_FORMAT = "The REG_TZI_FORMAT structure is corrupt.";

	public const string Argument_InvalidResourceCultureName = "The given culture name '{0}' cannot be used to locate a resource file. Resource filenames must consist of only letters, numbers, hyphens or underscores.";

	public const string Argument_InvalidSerializedString = "The specified serialized string '{0}' is not supported.";

	public const string Argument_InvalidTimeSpanStyles = "An undefined TimeSpanStyles value is being used.";

	public const string Argument_MustBeFalse = "Argument must be initialized to false";

	public const string Argument_NoEra = "No Era was supplied.";

	public const string Argument_NoRegionInvariantCulture = "There is no region associated with the Invariant Culture (Culture ID: 0x7F).";

	public const string Argument_NotIsomorphic = "Object contains non-primitive or non-blittable data.";

	public const string Argument_OffsetLocalMismatch = "The UTC Offset of the local dateTime parameter does not match the offset argument.";

	public const string Argument_OffsetPrecision = "Offset must be specified in whole minutes.";

	public const string Argument_OffsetOutOfRange = "Offset must be within plus or minus 14 hours.";

	public const string Argument_OffsetUtcMismatch = "The UTC Offset for Utc DateTime instances must be 0.";

	public const string Argument_OneOfCulturesNotSupported = "Culture name {0} or {1} is not supported.";

	public const string Argument_OnlyMscorlib = "Only mscorlib's assembly is valid.";

	public const string Argument_OutOfOrderDateTimes = "The DateStart property must come before the DateEnd property.";

	public const string ArgumentOutOfRange_HugeArrayNotSupported = "Arrays larger than 2GB are not supported.";

	public const string ArgumentOutOfRange_Index = "Index was out of range. Must be non-negative and less than the size of the collection.";

	public const string ArgumentOutOfRange_Length = "The specified length exceeds maximum capacity of SecureString.";

	public const string ArgumentOutOfRange_LengthTooLarge = "The specified length exceeds the maximum value of {0}.";

	public const string ArgumentOutOfRange_NeedNonNegNum = "Non-negative number required.";

	public const string ArgumentOutOfRange_NeedNonNegNumRequired = "Non-negative number required.";

	public const string Argument_PathFormatNotSupported = "The given path's format is not supported.";

	public const string Argument_RecursiveFallback = "Recursive fallback not allowed for character \\\\u{0:X4}.";

	public const string Argument_RecursiveFallbackBytes = "Recursive fallback not allowed for bytes {0}.";

	public const string Argument_ResultCalendarRange = "The result is out of the supported range for this calendar. The result should be between {0} (Gregorian date) and {1} (Gregorian date), inclusive.";

	public const string Argument_SemaphoreInitialMaximum = "The initial count for the semaphore must be greater than or equal to zero and less than the maximum count.";

	public const string Argument_TimeSpanHasSeconds = "The TimeSpan parameter cannot be specified more precisely than whole minutes.";

	public const string Argument_TimeZoneNotFound = "The time zone ID '{0}' was not found on the local computer.";

	public const string Argument_TimeZoneInfoBadTZif = "The tzfile does not begin with the magic characters 'TZif'.  Please verify that the file is not corrupt.";

	public const string Argument_TimeZoneInfoInvalidTZif = "The TZif data structure is corrupt.";

	public const string Argument_ToExclusiveLessThanFromExclusive = "fromInclusive must be less than or equal to toExclusive.";

	public const string Argument_TransitionTimesAreIdentical = "The DaylightTransitionStart property must not equal the DaylightTransitionEnd property.";

	public const string Argument_UTCOutOfRange = "The UTC time represented when the offset is applied must be between year 0 and 10,000.";

	public const string Argument_WaitHandleNameTooLong = "The name can be no more than {0} characters in length.";

	public const string ArgumentException_OtherNotArrayOfCorrectLength = "Object is not a array with the same number of elements as the array to compare it to.";

	public const string ArgumentException_TupleIncorrectType = "Argument must be of type {0}.";

	public const string ArgumentException_TupleLastArgumentNotATuple = "The last element of an eight element tuple must be a Tuple.";

	public const string ArgumentException_ValueTupleIncorrectType = "Argument must be of type {0}.";

	public const string ArgumentException_ValueTupleLastArgumentNotAValueTuple = "The last element of an eight element ValueTuple must be a ValueTuple.";

	public const string ArgumentNull_Array = "Array cannot be null.";

	public const string ArgumentNull_ArrayElement = "At least one element in the specified array was null.";

	public const string ArgumentNull_ArrayValue = "Found a null value within an array.";

	public const string ArgumentNull_Generic = "Value cannot be null.";

	public const string ArgumentNull_Key = "Key cannot be null.";

	public const string ArgumentNull_Obj = "Object cannot be null.";

	public const string ArgumentNull_String = "String reference not set to an instance of a String.";

	public const string ArgumentNull_Type = "Type cannot be null.";

	public const string ArgumentNull_Waithandles = "The waitHandles parameter cannot be null.";

	public const string ArgumentNull_WithParamName = "Parameter '{0}' cannot be null.";

	public const string ArgumentOutOfRange_AddValue = "Value to add was out of range.";

	public const string ArgumentOutOfRange_ActualValue = "Actual value was {0}.";

	public const string ArgumentOutOfRange_BadYearMonthDay = "Year, Month, and Day parameters describe an un-representable DateTime.";

	public const string ArgumentOutOfRange_BadHourMinuteSecond = "Hour, Minute, and Second parameters describe an un-representable DateTime.";

	public const string ArgumentOutOfRange_BiggerThanCollection = "Must be less than or equal to the size of the collection.";

	public const string ArgumentOutOfRange_Bounds_Lower_Upper = "Argument must be between {0} and {1}.";

	public const string ArgumentOutOfRange_CalendarRange = "Specified time is not supported in this calendar. It should be between {0} (Gregorian date) and {1} (Gregorian date), inclusive.";

	public const string ArgumentOutOfRange_Capacity = "Capacity exceeds maximum capacity.";

	public const string ArgumentOutOfRange_Count = "Count must be positive and count must refer to a location within the string/array/collection.";

	public const string ArgumentOutOfRange_DateArithmetic = "The added or subtracted value results in an un-representable DateTime.";

	public const string ArgumentOutOfRange_DateTimeBadMonths = "Months value must be between +/-120000.";

	public const string ArgumentOutOfRange_DateTimeBadTicks = "Ticks must be between DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks.";

	public const string ArgumentOutOfRange_DateTimeBadYears = "Years value must be between +/-10000.";

	public const string ArgumentOutOfRange_Day = "Day must be between 1 and {0} for month {1}.";

	public const string ArgumentOutOfRange_DayOfWeek = "The DayOfWeek enumeration must be in the range 0 through 6.";

	public const string ArgumentOutOfRange_DayParam = "The Day parameter must be in the range 1 through 31.";

	public const string ArgumentOutOfRange_DecimalRound = "Decimal can only round to between 0 and 28 digits of precision.";

	public const string ArgumentOutOfRange_DecimalScale = "Decimal's scale value must be between 0 and 28, inclusive.";

	public const string ArgumentOutOfRange_EndIndexStartIndex = "endIndex cannot be greater than startIndex.";

	public const string ArgumentOutOfRange_Enum = "Enum value was out of legal range.";

	public const string ArgumentOutOfRange_Era = "Time value was out of era range.";

	public const string ArgumentOutOfRange_FileTimeInvalid = "Not a valid Win32 FileTime.";

	public const string ArgumentOutOfRange_GenericPositive = "Value must be positive.";

	public const string ArgumentOutOfRange_GetByteCountOverflow = "Too many characters. The resulting number of bytes is larger than what can be returned as an int.";

	public const string ArgumentOutOfRange_GetCharCountOverflow = "Too many bytes. The resulting number of chars is larger than what can be returned as an int.";

	public const string ArgumentOutOfRange_IndexCount = "Index and count must refer to a location within the string.";

	public const string ArgumentOutOfRange_IndexCountBuffer = "Index and count must refer to a location within the buffer.";

	public const string ArgumentOutOfRange_IndexLength = "Index and length must refer to a location within the string.";

	public const string ArgumentOutOfRange_IndexString = "Index was out of range. Must be non-negative and less than the length of the string.";

	public const string ArgumentOutOfRange_InvalidEraValue = "Era value was not valid.";

	public const string ArgumentOutOfRange_InvalidHighSurrogate = "A valid high surrogate character is between 0xd800 and 0xdbff, inclusive.";

	public const string ArgumentOutOfRange_InvalidLowSurrogate = "A valid low surrogate character is between 0xdc00 and 0xdfff, inclusive.";

	public const string ArgumentOutOfRange_InvalidUTF32 = "A valid UTF32 value is between 0x000000 and 0x10ffff, inclusive, and should not include surrogate codepoint values (0x00d800 ~ 0x00dfff).";

	public const string ArgumentOutOfRange_LengthGreaterThanCapacity = "The length cannot be greater than the capacity.";

	public const string ArgumentOutOfRange_ListInsert = "Index must be within the bounds of the List.";

	public const string ArgumentOutOfRange_ListItem = "Index was out of range. Must be non-negative and less than the size of the list.";

	public const string ArgumentOutOfRange_ListRemoveAt = "Index was out of range. Must be non-negative and less than the size of the list.";

	public const string ArgumentOutOfRange_Month = "Month must be between one and twelve.";

	public const string ArgumentOutOfRange_MonthParam = "The Month parameter must be in the range 1 through 12.";

	public const string ArgumentOutOfRange_MustBeNonNegInt32 = "Value must be non-negative and less than or equal to Int32.MaxValue.";

	public const string ArgumentOutOfRange_MustBeNonNegNum = "'{0}' must be non-negative.";

	public const string ArgumentOutOfRange_MustBePositive = "'{0}' must be greater than zero.";

	public const string ArgumentOutOfRange_NeedNonNegOrNegative1 = "Number must be either non-negative and less than or equal to Int32.MaxValue or -1.";

	public const string ArgumentOutOfRange_NeedPosNum = "Positive number required.";

	public const string ArgumentOutOfRange_NegativeCapacity = "Capacity must be positive.";

	public const string ArgumentOutOfRange_NegativeCount = "Count cannot be less than zero.";

	public const string ArgumentOutOfRange_NegativeLength = "Length cannot be less than zero.";

	public const string ArgumentOutOfRange_OffsetLength = "Offset and length must refer to a position in the string.";

	public const string ArgumentOutOfRange_OffsetOut = "Either offset did not refer to a position in the string, or there is an insufficient length of destination character array.";

	public const string ArgumentOutOfRange_PartialWCHAR = "Pointer startIndex and length do not refer to a valid string.";

	public const string ArgumentOutOfRange_Range = "Valid values are between {0} and {1}, inclusive.";

	public const string ArgumentOutOfRange_RoundingDigits = "Rounding digits must be between 0 and 15, inclusive.";

	public const string ArgumentOutOfRange_SmallCapacity = "capacity was less than the current size.";

	public const string ArgumentOutOfRange_SmallMaxCapacity = "MaxCapacity must be one or greater.";

	public const string ArgumentOutOfRange_StartIndex = "StartIndex cannot be less than zero.";

	public const string ArgumentOutOfRange_StartIndexLargerThanLength = "startIndex cannot be larger than length of string.";

	public const string ArgumentOutOfRange_StartIndexLessThanLength = "startIndex must be less than length of string.";

	public const string ArgumentOutOfRange_UtcOffset = "The TimeSpan parameter must be within plus or minus 14.0 hours.";

	public const string ArgumentOutOfRange_UtcOffsetAndDaylightDelta = "The sum of the BaseUtcOffset and DaylightDelta properties must within plus or minus 14.0 hours.";

	public const string ArgumentOutOfRange_Version = "Version's parameters must be greater than or equal to zero.";

	public const string ArgumentOutOfRange_Week = "The Week parameter must be in the range 1 through 5.";

	public const string ArgumentOutOfRange_Year = "Year must be between 1 and 9999.";

	public const string Arithmetic_NaN = "Function does not accept floating point Not-a-Number values.";

	public const string ArrayTypeMismatch_CantAssignType = "Source array type cannot be assigned to destination array type.";

	public const string BadImageFormatException_CouldNotLoadFileOrAssembly = "Could not load file or assembly '{0}'. An attempt was made to load a program with an incorrect format.";

	public const string CollectionCorrupted = "A prior operation on this collection was interrupted by an exception. Collection's state is no longer trusted.";

	public const string Exception_EndOfInnerExceptionStack = "--- End of inner exception stack trace ---";

	public const string Exception_WasThrown = "Exception of type '{0}' was thrown.";

	public const string Format_BadBase64Char = "The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.";

	public const string Format_BadBase64CharArrayLength = "Invalid length for a Base-64 char array or string.";

	public const string Format_BadBoolean = "String was not recognized as a valid Boolean.";

	public const string Format_BadFormatSpecifier = "Format specifier was invalid.";

	public const string Format_BadQuote = "Cannot find a matching quote character for the character '{0}'.";

	public const string Format_EmptyInputString = "Input string was either empty or contained only whitespace.";

	public const string Format_GuidHexPrefix = "Expected hex 0x in '{0}'.";

	public const string Format_GuidInvLen = "Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).";

	public const string Format_GuidInvalidChar = "Guid string should only contain hexadecimal characters.";

	public const string Format_GuidBrace = "Expected {0xdddddddd, etc}.";

	public const string Format_GuidComma = "Could not find a comma, or the length between the previous token and the comma was zero (i.e., '0x,'etc.).";

	public const string Format_GuidBraceAfterLastNumber = "Could not find a brace, or the length between the previous token and the brace was zero (i.e., '0x,'etc.).";

	public const string Format_GuidDashes = "Dashes are in the wrong position for GUID parsing.";

	public const string Format_GuidEndBrace = "Could not find the ending brace.";

	public const string Format_ExtraJunkAtEnd = "Additional non-parsable characters are at the end of the string.";

	public const string Format_GuidUnrecognized = "Unrecognized Guid format.";

	public const string Format_IndexOutOfRange = "Index (zero based) must be greater than or equal to zero and less than the size of the argument list.";

	public const string Format_InvalidGuidFormatSpecification = "Format String can be only 'D', 'd', 'N', 'n', 'P', 'p', 'B', 'b', 'X' or 'x'.";

	public const string Format_InvalidString = "Input string was not in a correct format.";

	public const string Format_NeedSingleChar = "String must be exactly one character long.";

	public const string Format_NoParsibleDigits = "Could not find any recognizable digits.";

	public const string Format_BadTimeSpan = "String was not recognized as a valid TimeSpan.";

	public const string InsufficientMemory_MemFailPoint = "Insufficient available memory to meet the expected demands of an operation at this time.  Please try again later.";

	public const string InsufficientMemory_MemFailPoint_TooBig = "Insufficient memory to meet the expected demands of an operation, and this system is likely to never satisfy this request.  If this is a 32 bit system, consider booting in 3 GB mode.";

	public const string InsufficientMemory_MemFailPoint_VAFrag = "Insufficient available memory to meet the expected demands of an operation at this time, possibly due to virtual address space fragmentation.  Please try again later.";

	public const string InvalidCast_CannotCastNullToValueType = "Null object cannot be converted to a value type.";

	public const string InvalidCast_DownCastArrayElement = "At least one element in the source array could not be cast down to the destination array type.";

	public const string InvalidCast_FromTo = "Invalid cast from '{0}' to '{1}'.";

	public const string InvalidCast_IConvertible = "Object must implement IConvertible.";

	public const string InvalidCast_StoreArrayElement = "Object cannot be stored in an array of this type.";

	public const string InvalidOperation_Calling = "WinRT Interop has already been initialized and cannot be initialized again.";

	public const string InvalidOperation_DateTimeParsing = "Internal Error in DateTime and Calendar operations.";

	public const string InvalidOperation_EnumEnded = "Enumeration already finished.";

	public const string InvalidOperation_EnumFailedVersion = "Collection was modified; enumeration operation may not execute.";

	public const string InvalidOperation_EnumNotStarted = "Enumeration has not started. Call MoveNext.";

	public const string InvalidOperation_EnumOpCantHappen = "Enumeration has either not started or has already finished.";

	public const string InvalidOperation_HandleIsNotInitialized = "Handle is not initialized.";

	public const string InvalidOperation_IComparerFailed = "Failed to compare two elements in the array.";

	public const string InvalidOperation_NoValue = "Nullable object must have a value.";

	public const string InvalidOperation_NullArray = "The underlying array is null.";

	public const string InvalidOperation_Overlapped_Pack = "Cannot pack a packed Overlapped again.";

	public const string InvalidOperation_ReadOnly = "Instance is read-only.";

	public const string InvalidOperation_ThreadWrongThreadStart = "The thread was created with a ThreadStart delegate that does not accept a parameter.";

	public const string InvalidOperation_UnknownEnumType = "Unknown enum type.";

	public const string InvalidOperation_WriteOnce = "This property has already been set and cannot be modified.";

	public const string InvalidOperation_ArrayCreateInstance_NotARuntimeType = "Array.CreateInstance() can only accept Type objects created by the runtime.";

	public const string InvalidOperation_TooEarly = "Internal Error: This operation cannot be invoked in an eager class constructor.";

	public const string InvalidOperation_NullContext = "Cannot call Set on a null context";

	public const string InvalidOperation_CannotUseAFCOtherThread = "AsyncFlowControl object must be used on the thread where it was created.";

	public const string InvalidOperation_CannotRestoreUnsupressedFlow = "Cannot restore context flow when it is not suppressed.";

	public const string InvalidOperation_CannotSupressFlowMultipleTimes = "Context flow is already suppressed.";

	public const string InvalidOperation_CannotUseAFCMultiple = "AsyncFlowControl object can be used only once to call Undo().";

	public const string InvalidOperation_AsyncFlowCtrlCtxMismatch = "AsyncFlowControl objects can be used to restore flow only on a Context that had its flow suppressed.";

	public const string InvalidProgram_Default = "Common Language Runtime detected an invalid program.";

	public const string InvalidProgram_Specific = "Common Language Runtime detected an invalid program. The body of method '{0}' is invalid.";

	public const string InvalidProgram_Vararg = "Method '{0}' has a variable argument list. Variable argument lists are not supported in .NET Core.";

	public const string InvalidProgram_CallVirtFinalize = "Object.Finalize() can not be called directly. It is only callable by the runtime.";

	public const string InvalidTimeZone_InvalidRegistryData = "The time zone ID '{0}' was found on the local computer, but the registry information was corrupt.";

	public const string IO_FileExists_Name = "The file '{0}' already exists.";

	public const string IO_FileName_Name = "File name: '{0}'";

	public const string IO_FileNotFound = "Unable to find the specified file.";

	public const string IO_FileNotFound_FileName = "Could not load file or assembly '{0}'. The system cannot find the file specified.";

	public const string IO_FileLoad = "Could not load the specified file.";

	public const string IO_FileLoad_FileName = "Could not load the file '{0}'.";

	public const string IO_PathNotFound_NoPathName = "Could not find a part of the path.";

	public const string IO_PathNotFound_Path = "Could not find a part of the path '{0}'.";

	public const string IO_PathTooLong = "The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.";

	public const string IO_SharingViolation_File = "The process cannot access the file '{0}' because it is being used by another process.";

	public const string IO_SharingViolation_NoFileName = "The process cannot access the file because it is being used by another process.";

	public const string IO_AlreadyExists_Name = "Cannot create '{0}' because a file or directory with the same name already exists.";

	public const string UnauthorizedAccess_IODenied_NoPathName = "Access to the path is denied.";

	public const string UnauthorizedAccess_IODenied_Path = "Access to the path '{0}' is denied.";

	public const string Lazy_CreateValue_NoParameterlessCtorForT = "The lazily-initialized type does not have a public, parameterless constructor.";

	public const string Lazy_ctor_ModeInvalid = "The mode argument specifies an invalid value.";

	public const string Lazy_StaticInit_InvalidOperation = "ValueFactory returned null.";

	public const string Lazy_ToString_ValueNotCreated = "Value is not created.";

	public const string Lazy_Value_RecursiveCallsToValue = "ValueFactory attempted to access the Value property of this instance.";

	public const string MissingConstructor_Name = "Constructor on type '{0}' not found.";

	public const string MustUseCCRewrite = "An assembly (probably '{1}') must be rewritten using the code contracts binary rewriter (CCRewrite) because it is calling Contract.{0} and the CONTRACTS_FULL symbol is defined.  Remove any explicit definitions of the CONTRACTS_FULL symbol from your project and rebuild.  CCRewrite can be downloaded from http://go.microsoft.com/fwlink/?LinkID=169180. \\r\\nAfter the rewriter is installed, it can be enabled in Visual Studio from the project's Properties page on the Code Contracts pane.  Ensure that 'Perform Runtime Contract Checking' is enabled, which will define CONTRACTS_FULL.";

	public const string NotSupported_FixedSizeCollection = "Collection was of a fixed size.";

	public const string NotSupported_MaxWaitHandles = "The number of WaitHandles must be less than or equal to 64.";

	public const string NotSupported_NoCodepageData = "No data is available for encoding {0}. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.";

	public const string NotSupported_ReadOnlyCollection = "Collection is read-only.";

	public const string NotSupported_StringComparison = "The string comparison type passed in is currently not supported.";

	public const string NotSupported_VoidArray = "Arrays of System.Void are not supported.";

	public const string NotSupported_ByRefLike = "Cannot create boxed ByRef-like values.";

	public const string NotSupported_Type = "Type is not supported.";

	public const string NotSupported_WaitAllSTAThread = "WaitAll for multiple handles on a STA thread is not supported.";

	public const string ObjectDisposed_Generic = "Cannot access a disposed object.";

	public const string ObjectDisposed_ObjectName_Name = "Object name: '{0}'.";

	public const string Overflow_Byte = "Value was either too large or too small for an unsigned byte.";

	public const string Overflow_Char = "Value was either too large or too small for a character.";

	public const string Overflow_Decimal = "Value was either too large or too small for a Decimal.";

	public const string Overflow_Double = "Value was either too large or too small for a Double.";

	public const string Overflow_TimeSpanElementTooLarge = "The TimeSpan could not be parsed because at least one of the numeric components is out of range or contains too many digits.";

	public const string Overflow_Duration = "The duration cannot be returned for TimeSpan.MinValue because the absolute value of TimeSpan.MinValue exceeds the value of TimeSpan.MaxValue.";

	public const string Overflow_Int16 = "Value was either too large or too small for an Int16.";

	public const string Overflow_Int32 = "Value was either too large or too small for an Int32.";

	public const string Overflow_Int64 = "Value was either too large or too small for an Int64.";

	public const string Overflow_NegateTwosCompNum = "Negating the minimum value of a twos complement number is invalid.";

	public const string Overflow_NegativeUnsigned = "The string was being parsed as an unsigned number and could not have a negative sign.";

	public const string Overflow_SByte = "Value was either too large or too small for a signed byte.";

	public const string Overflow_Single = "Value was either too large or too small for a Single.";

	public const string Overflow_TimeSpanTooLong = "TimeSpan overflowed because the duration is too long.";

	public const string Overflow_UInt16 = "Value was either too large or too small for a UInt16.";

	public const string Overflow_UInt32 = "Value was either too large or too small for a UInt32.";

	public const string Overflow_UInt64 = "Value was either too large or too small for a UInt64.";

	public const string Rank_MultiDimNotSupported = "Only single dimension arrays are supported here.";

	public const string RuntimeWrappedException = "An object that does not derive from System.Exception has been wrapped in a RuntimeWrappedException.";

	public const string SpinWait_SpinUntil_ArgumentNull = "The condition argument is null.";

	public const string Serialization_CorruptField = "The value of the field '{0}' is invalid.  The serialized data is corrupt.";

	public const string Serialization_InvalidData = "An error occurred while deserializing the object.  The serialized data is corrupt.";

	public const string Serialization_InvalidEscapeSequence = "The serialized data contained an invalid escape sequence '\\\\{0}'.";

	public const string Serialization_InvalidType = "Only system-provided types can be passed to the GetUninitializedObject method. '{0}' is not a valid instance of a type.";

	public const string SpinWait_SpinUntil_TimeoutWrong = "The timeout must represent a value between -1 and Int32.MaxValue, inclusive.";

	public const string Threading_AbandonedMutexException = "The wait completed due to an abandoned mutex.";

	public const string Threading_SemaphoreFullException = "Adding the specified count to the semaphore would cause it to exceed its maximum count.";

	public const string Threading_ThreadInterrupted = "Thread was interrupted from a waiting state.";

	public const string Threading_WaitHandleCannotBeOpenedException = "No handle of the given name exists.";

	public const string Threading_WaitHandleCannotBeOpenedException_InvalidHandle = "A WaitHandle with system-wide name '{0}' cannot be created. A WaitHandle of a different type might have the same name.";

	public const string TimeZoneNotFound_MissingRegistryData = "The time zone ID '{0}' was not found on the local computer.";

	public const string TypeInitialization_Default = "Type constructor threw an exception.";

	public const string TypeInitialization_Type = "The type initializer for '{0}' threw an exception.";

	public const string TypeInitialization_Type_NoTypeAvailable = "A type initializer threw an exception. To determine which type, inspect the InnerException's StackTrace property.";

	public const string Verification_Exception = "Operation could destabilize the runtime.";

	public const string Arg_EnumFormatUnderlyingTypeAndObjectMustBeSameType = "Enum underlying type and the object must be same type or object. Type passed in was '{0}'; the enum underlying type was '{1}'.";

	public const string Format_InvalidEnumFormatSpecification = "Format String can be only 'G', 'g', 'X', 'x', 'F', 'f', 'D' or 'd'.";

	public const string Arg_MustBeEnumBaseTypeOrEnum = "The value passed in must be an enum base or an underlying type for an enum, such as an Int32.";

	public const string Arg_EnumUnderlyingTypeAndObjectMustBeSameType = "Enum underlying type and the object must be same type or object must be a String. Type passed in was '{0}'; the enum underlying type was '{1}'.";

	public const string Arg_MustBeType = "Type must be a type provided by the runtime.";

	public const string Arg_MustContainEnumInfo = "Must specify valid information for parsing in the string.";

	public const string Arg_EnumValueNotFound = "Requested value '{0}' was not found.";

	public const string Argument_StringZeroLength = "String cannot be of zero length.";

	public const string Argument_StringFirstCharIsZero = "The first char in the string is the null character.";

	public const string Argument_LongEnvVarValue = "Environment variable name or value is too long.";

	public const string Argument_IllegalEnvVarName = "Environment variable name cannot contain equal character.";

	public const string AssumptionFailed = "Assumption failed.";

	public const string AssumptionFailed_Cnd = "Assumption failed: {0}";

	public const string AssertionFailed = "Assertion failed.";

	public const string AssertionFailed_Cnd = "Assertion failed: {0}";

	public const string PreconditionFailed = "Precondition failed.";

	public const string PreconditionFailed_Cnd = "Precondition failed: {0}";

	public const string PostconditionFailed = "Postcondition failed.";

	public const string PostconditionFailed_Cnd = "Postcondition failed: {0}";

	public const string PostconditionOnExceptionFailed = "Postcondition failed after throwing an exception.";

	public const string PostconditionOnExceptionFailed_Cnd = "Postcondition failed after throwing an exception: {0}";

	public const string InvariantFailed = "Invariant failed.";

	public const string InvariantFailed_Cnd = "Invariant failed: {0}";

	public const string MissingEncodingNameResource = "Could not find a resource entry for the encoding codepage '{0} - {1}'";

	public const string Globalization_cp_1200 = "Unicode";

	public const string Globalization_cp_1201 = "Unicode (Big-Endian)";

	public const string Globalization_cp_12000 = "Unicode (UTF-32)";

	public const string Globalization_cp_12001 = "Unicode (UTF-32 Big-Endian)";

	public const string Globalization_cp_20127 = "US-ASCII";

	public const string Globalization_cp_28591 = "Western European (ISO)";

	public const string Globalization_cp_65000 = "Unicode (UTF-7)";

	public const string Globalization_cp_65001 = "Unicode (UTF-8)";

	public const string DebugAssertBanner = "---- DEBUG ASSERTION FAILED ----";

	public const string DebugAssertLongMessage = "---- Assert Long Message ----";

	public const string DebugAssertShortMessage = "---- Assert Short Message ----";

	public const string InvalidCast_Empty = "Object cannot be cast to Empty.";

	public const string Arg_UnknownTypeCode = "Unknown TypeCode value.";

	public const string Format_BadDatePattern = "Could not determine the order of year, month, and date from '{0}'.";

	public const string Format_BadDateTime = "String was not recognized as a valid DateTime.";

	public const string Format_BadDateTimeCalendar = "The DateTime represented by the string is not supported in calendar {0}.";

	public const string Format_BadDayOfWeek = "String was not recognized as a valid DateTime because the day of week was incorrect.";

	public const string Format_DateOutOfRange = "The DateTime represented by the string is out of range.";

	public const string Format_MissingIncompleteDate = "There must be at least a partial date with a year present in the input.";

	public const string Format_OffsetOutOfRange = "The time zone offset must be within plus or minus 14 hours.";

	public const string Format_RepeatDateTimePattern = "DateTime pattern '{0}' appears more than once with different values.";

	public const string Format_UnknowDateTimeWord = "The string was not recognized as a valid DateTime. There is an unknown word starting at index {0}.";

	public const string Format_UTCOutOfRange = "The UTC representation of the date falls outside the year range 1-9999.";

	public const string RFLCT_Ambiguous = "Ambiguous match found.";

	public const string AggregateException_ctor_DefaultMessage = "One or more errors occurred.";

	public const string AggregateException_ctor_InnerExceptionNull = "An element of innerExceptions was null.";

	public const string AggregateException_DeserializationFailure = "The serialization stream contains no inner exceptions.";

	public const string AggregateException_InnerException = "(Inner Exception #{0}) ";

	public const string ArgumentOutOfRange_TimeoutTooLarge = "Time-out interval must be less than 2^32-2.";

	public const string ArgumentOutOfRange_PeriodTooLarge = "Period must be less than 2^32-2.";

	public const string TaskScheduler_FromCurrentSynchronizationContext_NoCurrent = "The current SynchronizationContext may not be used as a TaskScheduler.";

	public const string TaskScheduler_ExecuteTask_WrongTaskScheduler = "ExecuteTask may not be called for a task which was previously queued to a different TaskScheduler.";

	public const string TaskScheduler_InconsistentStateAfterTryExecuteTaskInline = "The TryExecuteTaskInline call to the underlying scheduler succeeded, but the task body was not invoked.";

	public const string TaskSchedulerException_ctor_DefaultMessage = "An exception was thrown by a TaskScheduler.";

	public const string Task_MultiTaskContinuation_FireOptions = "It is invalid to exclude specific continuation kinds for continuations off of multiple tasks.";

	public const string Task_ContinueWith_ESandLR = "The specified TaskContinuationOptions combined LongRunning and ExecuteSynchronously.  Synchronous continuations should not be long running.";

	public const string Task_MultiTaskContinuation_EmptyTaskList = "The tasks argument contains no tasks.";

	public const string Task_MultiTaskContinuation_NullTask = "The tasks argument included a null value.";

	public const string Task_FromAsync_PreferFairness = "It is invalid to specify TaskCreationOptions.PreferFairness in calls to FromAsync.";

	public const string Task_FromAsync_LongRunning = "It is invalid to specify TaskCreationOptions.LongRunning in calls to FromAsync.";

	public const string AsyncMethodBuilder_InstanceNotInitialized = "The builder was not properly initialized.";

	public const string TaskT_TransitionToFinal_AlreadyCompleted = "An attempt was made to transition a task to a final state when it had already completed.";

	public const string TaskT_DebuggerNoResult = "{Not yet computed}";

	public const string OperationCanceled = "The operation was canceled.";

	public const string CancellationToken_CreateLinkedToken_TokensIsEmpty = "No tokens were supplied.";

	public const string CancellationTokenSource_Disposed = "The CancellationTokenSource has been disposed.";

	public const string CancellationToken_SourceDisposed = "The CancellationTokenSource associated with this CancellationToken has been disposed.";

	public const string TaskExceptionHolder_UnknownExceptionType = "(Internal)Expected an Exception or an IEnumerable<Exception>";

	public const string TaskExceptionHolder_UnhandledException = "A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread.";

	public const string Task_Delay_InvalidMillisecondsDelay = "The value needs to be either -1 (signifying an infinite timeout), 0 or a positive integer.";

	public const string Task_Delay_InvalidDelay = "The value needs to translate in milliseconds to -1 (signifying an infinite timeout), 0 or a positive integer less than or equal to Int32.MaxValue.";

	public const string Task_Dispose_NotCompleted = "A task may only be disposed if it is in a completion state (RanToCompletion, Faulted or Canceled).";

	public const string Task_WaitMulti_NullTask = "The tasks array included at least one null element.";

	public const string Task_ContinueWith_NotOnAnything = "The specified TaskContinuationOptions excluded all continuation kinds.";

	public const string Task_RunSynchronously_AlreadyStarted = "RunSynchronously may not be called on a task that was already started.";

	public const string Task_ThrowIfDisposed = "The task has been disposed.";

	public const string Task_RunSynchronously_TaskCompleted = "RunSynchronously may not be called on a task that has already completed.";

	public const string Task_RunSynchronously_Promise = "RunSynchronously may not be called on a task not bound to a delegate, such as the task returned from an asynchronous method.";

	public const string Task_RunSynchronously_Continuation = "RunSynchronously may not be called on a continuation task.";

	public const string Task_Start_AlreadyStarted = "Start may not be called on a task that was already started.";

	public const string Task_Start_ContinuationTask = "Start may not be called on a continuation task.";

	public const string Task_Start_Promise = "Start may not be called on a promise-style task.";

	public const string Task_Start_TaskCompleted = "Start may not be called on a task that has completed.";

	public const string TaskCanceledException_ctor_DefaultMessage = "A task was canceled.";

	public const string TaskCompletionSourceT_TrySetException_NoExceptions = "The exceptions collection was empty.";

	public const string TaskCompletionSourceT_TrySetException_NullException = "The exceptions collection included at least one null element.";

	public const string Argument_MinMaxValue = "'{0}' cannot be greater than {1}.";

	public const string ExecutionContext_ExceptionInAsyncLocalNotification = "An exception was not handled in an AsyncLocal<T> notification callback.";

	public const string InvalidOperation_WrongAsyncResultOrEndCalledMultiple = "Either the IAsyncResult object did not come from the corresponding async method on this type, or the End method was called multiple times with the same IAsyncResult.";

	public const string SpinLock_IsHeldByCurrentThread = "Thread tracking is disabled.";

	public const string SpinLock_TryEnter_LockRecursionException = "The calling thread already holds the lock.";

	public const string SpinLock_Exit_SynchronizationLockException = "The calling thread does not hold the lock.";

	public const string SpinLock_TryReliableEnter_ArgumentException = "The tookLock argument must be set to false before calling this method.";

	public const string SpinLock_TryEnter_ArgumentOutOfRange = "The timeout must be a value between -1 and Int32.MaxValue, inclusive.";

	public const string ManualResetEventSlim_Disposed = "The event has been disposed.";

	public const string ManualResetEventSlim_ctor_SpinCountOutOfRange = "The spinCount argument must be in the range 0 to {0}, inclusive.";

	public const string ManualResetEventSlim_ctor_TooManyWaiters = "There are too many threads currently waiting on the event. A maximum of {0} waiting threads are supported.";

	public const string InvalidOperation_SendNotSupportedOnWindowsRTSynchronizationContext = "Send is not supported in the Windows Runtime SynchronizationContext";

	public const string InvalidOperation_SetData_OnlyOnce = "SetData can only be used to set the value of a given name once.";

	public const string SemaphoreSlim_Disposed = "The semaphore has been disposed.";

	public const string SemaphoreSlim_Release_CountWrong = "The releaseCount argument must be greater than zero.";

	public const string SemaphoreSlim_Wait_TimeoutWrong = "The timeout must represent a value between -1 and Int32.MaxValue, inclusive.";

	public const string SemaphoreSlim_ctor_MaxCountWrong = "The maximumCount argument must be a positive number. If a maximum is not required, use the constructor without a maxCount parameter.";

	public const string SemaphoreSlim_ctor_InitialCountWrong = "The initialCount argument must be non-negative and less than or equal to the maximumCount.";

	public const string ThreadLocal_ValuesNotAvailable = "The ThreadLocal object is not tracking values. To use the Values property, use a ThreadLocal constructor that accepts the trackAllValues parameter and set the parameter to true.";

	public const string ThreadLocal_Value_RecursiveCallsToValue = "ValueFactory attempted to access the Value property of this instance.";

	public const string ThreadLocal_Disposed = "The ThreadLocal object has been disposed.";

	public const string LockRecursionException_WriteAfterReadNotAllowed = "Write lock may not be acquired with read lock held. This pattern is prone to deadlocks. Please ensure that read locks are released before taking a write lock. If an upgrade is necessary, use an upgrade lock in place of the read lock.";

	public const string LockRecursionException_RecursiveWriteNotAllowed = "Recursive write lock acquisitions not allowed in this mode.";

	public const string LockRecursionException_ReadAfterWriteNotAllowed = "A read lock may not be acquired with the write lock held in this mode.";

	public const string LockRecursionException_RecursiveUpgradeNotAllowed = "Recursive upgradeable lock acquisitions not allowed in this mode.";

	public const string LockRecursionException_RecursiveReadNotAllowed = "Recursive read lock acquisitions not allowed in this mode.";

	public const string SynchronizationLockException_IncorrectDispose = "The lock is being disposed while still being used. It either is being held by a thread and/or has active waiters waiting to acquire the lock.";

	public const string SynchronizationLockException_MisMatchedWrite = "The write lock is being released without being held.";

	public const string LockRecursionException_UpgradeAfterReadNotAllowed = "Upgradeable lock may not be acquired with read lock held.";

	public const string LockRecursionException_UpgradeAfterWriteNotAllowed = "Upgradeable lock may not be acquired with write lock held in this mode. Acquiring Upgradeable lock gives the ability to read along with an option to upgrade to a writer.";

	public const string SynchronizationLockException_MisMatchedUpgrade = "The upgradeable lock is being released without being held.";

	public const string SynchronizationLockException_MisMatchedRead = "The read lock is being released without being held.";

	public const string InvalidOperation_TimeoutsNotSupported = "Timeouts are not supported on this stream.";

	public const string NotSupported_UnreadableStream = "Stream does not support reading.";

	public const string NotSupported_UnwritableStream = "Stream does not support writing.";

	public const string ObjectDisposed_StreamClosed = "Cannot access a closed Stream.";

	public const string NotSupported_SubclassOverride = "Derived classes must provide an implementation.";

	public const string InvalidOperation_NoPublicRemoveMethod = "Cannot remove the event handler since no public remove method exists for the event.";

	public const string InvalidOperation_NoPublicAddMethod = "Cannot add the event handler since no public add method exists for the event.";

	public const string SerializationException = "Serialization error.";

	public const string Serialization_NotFound = "Member '{0}' was not found.";

	public const string Serialization_OptionalFieldVersionValue = "Version value must be positive.";

	public const string Serialization_SameNameTwice = "Cannot add the same member twice to a SerializationInfo object.";

	public const string NotSupported_AbstractNonCLS = "This non-CLS method is not implemented.";

	public const string NotSupported_NoTypeInfo = "Cannot resolve {0} to a TypeInfo object.";

	public const string Arg_CustomAttributeFormatException = "Binary format of the specified custom attribute was invalid.";

	public const string Argument_InvalidMemberForNamedArgument = "The member must be either a field or a property.";

	public const string Arg_InvalidFilterCriteriaException = "Specified filter criteria was invalid.";

	public const string Arg_ParmArraySize = "Must specify one or more parameters.";

	public const string Arg_MustBePointer = "Type must be a Pointer.";

	public const string Arg_InvalidHandle = "Invalid handle.";

	public const string Argument_InvalidEnum = "The Enum type should contain one and only one instance field.";

	public const string Argument_MustHaveAttributeBaseClass = "Type passed in must be derived from System.Attribute or System.Attribute itself.";

	public const string InvalidFilterCriteriaException_CritString = "A String must be provided for the filter criteria.";

	public const string InvalidFilterCriteriaException_CritInt = "An Int32 must be provided for the filter criteria.";

	public const string InvalidOperation_NotSupportedOnWinRTEvent = "Adding or removing event handlers dynamically is not supported on WinRT events.";

	public const string PlatformNotSupported_ReflectionOnly = "ReflectionOnly loading is not supported on this platform.";

	public const string PlatformNotSupported_OSXFileLocking = "Locking/unlocking file regions is not supported on this platform. Use FileShare on the entire file instead.";

	public const string MissingMember_Name = "Member '{0}' not found.";

	public const string MissingMethod_Name = "Method '{0}' not found.";

	public const string MissingField_Name = "Field '{0}' not found.";

	public const string Format_StringZeroLength = "String cannot have zero length.";

	public const string Security_CannotReadRegistryData = "The time zone ID '{0}' was found on the local computer, but the application does not have permission to read the registry information.";

	public const string Security_InvalidAssemblyPublicKey = "Invalid assembly public key.";

	public const string Security_RegistryPermission = "Requested registry access is not allowed.";

	public const string ClassLoad_General = "Could not load type '{0}' from assembly '{1}'.";

	public const string ClassLoad_RankTooLarge = "'{0}' from assembly '{1}' has too many dimensions.";

	public const string ClassLoad_ExplicitGeneric = "Could not load type '{0}' from assembly '{1}' because generic types cannot have explicit layout.";

	public const string ClassLoad_BadFormat = "Could not load type '{0}' from assembly '{1}' because the format is invalid.";

	public const string ClassLoad_ValueClassTooLarge = "Array of type '{0}' from assembly '{1}' cannot be created because base value type is too large.";

	public const string ClassLoad_ExplicitLayout = "Could not load type '{0}' from assembly '{1}' because it contains an object field at offset '{2}' that is incorrectly aligned or overlapped by a non-object field.";

	public const string EE_MissingMethod = "Method not found: '{0}'.";

	public const string EE_MissingField = "Field not found: '{0}'.";

	public const string UnauthorizedAccess_RegistryKeyGeneric_Key = "Access to the registry key '{0}' is denied.";

	public const string UnknownError_Num = "Unknown error '{0}'.";

	public const string Argument_NeedStructWithNoRefs = "The specified Type must be a struct containing no references.";

	public const string ArgumentNull_Buffer = "Buffer cannot be null.";

	public const string ArgumentOutOfRange_AddressSpace = "The number of bytes cannot exceed the virtual address space on a 32 bit machine.";

	public const string ArgumentOutOfRange_UIntPtrMaxMinusOne = "The length of the buffer must be less than the maximum UIntPtr value for your platform.";

	public const string Arg_BufferTooSmall = "Not enough space available in the buffer.";

	public const string InvalidOperation_MustCallInitialize = "You must call Initialize on this object instance before using it.";

	public const string ArgumentException_BufferNotFromPool = "The buffer is not associated with this pool and may not be returned to it.";

	public const string Argument_InvalidSafeBufferOffLen = "Offset and length were greater than the size of the SafeBuffer.";

	public const string Argument_InvalidSeekOrigin = "Invalid seek origin.";

	public const string Argument_NotEnoughBytesToRead = "There are not enough bytes remaining in the accessor to read at this position.";

	public const string Argument_NotEnoughBytesToWrite = "There are not enough bytes remaining in the accessor to write at this position.";

	public const string Argument_OffsetAndCapacityOutOfBounds = "Offset and capacity were greater than the size of the view.";

	public const string ArgumentOutOfRange_UnmanagedMemStreamLength = "UnmanagedMemoryStream length must be non-negative and less than 2^63 - 1 - baseAddress.";

	public const string Argument_UnmanagedMemAccessorWrapAround = "The UnmanagedMemoryAccessor capacity and offset would wrap around the high end of the address space.";

	public const string ArgumentOutOfRange_StreamLength = "Stream length must be non-negative and less than 2^31 - 1 - origin.";

	public const string ArgumentOutOfRange_UnmanagedMemStreamWrapAround = "The UnmanagedMemoryStream capacity would wrap around the high end of the address space.";

	public const string InvalidOperation_CalledTwice = "The method cannot be called twice on the same instance.";

	public const string IO_FixedCapacity = "Unable to expand length of this stream beyond its capacity.";

	public const string IO_SeekBeforeBegin = "An attempt was made to move the position before the beginning of the stream.";

	public const string IO_StreamTooLong = "Stream was too long.";

	public const string Arg_BadDecimal = "Read an invalid decimal value from the buffer.";

	public const string NotSupported_Reading = "Accessor does not support reading.";

	public const string NotSupported_UmsSafeBuffer = "This operation is not supported for an UnmanagedMemoryStream created from a SafeBuffer.";

	public const string NotSupported_Writing = "Accessor does not support writing.";

	public const string NotSupported_UnseekableStream = "Stream does not support seeking.";

	public const string IndexOutOfRange_UMSPosition = "Unmanaged memory stream position was beyond the capacity of the stream.";

	public const string ObjectDisposed_StreamIsClosed = "Cannot access a closed Stream.";

	public const string ObjectDisposed_ViewAccessorClosed = "Cannot access a closed accessor.";

	public const string ArgumentOutOfRange_PositionLessThanCapacityRequired = "The position may not be greater or equal to the capacity of the accessor.";

	public const string IO_EOF_ReadBeyondEOF = "Unable to read beyond the end of the stream.";

	public const string Arg_EndOfStreamException = "Attempted to read past the end of the stream.";

	public const string ObjectDisposed_FileClosed = "Cannot access a closed file.";

	public const string Arg_InvalidSearchPattern = "Search pattern cannot contain \\\"..\\\" to move up directories and can be contained only internally in file/directory names, as in \\\"a..b\\\".";

	public const string ArgumentOutOfRange_FileLengthTooBig = "Specified file length was too large for the file system.";

	public const string Argument_InvalidHandle = "'handle' has been disposed or is an invalid handle.";

	public const string Argument_AlreadyBoundOrSyncHandle = "'handle' has already been bound to the thread pool, or was not opened for asynchronous I/O.";

	public const string Argument_PreAllocatedAlreadyAllocated = "'preAllocated' is already in use.";

	public const string Argument_NativeOverlappedAlreadyFree = "'overlapped' has already been freed.";

	public const string Argument_NativeOverlappedWrongBoundHandle = "'overlapped' was not allocated by this ThreadPoolBoundHandle instance.";

	public const string Arg_HandleNotAsync = "Handle does not support asynchronous operations. The parameters to the FileStream constructor may need to be changed to indicate that the handle was opened synchronously (that is, it was not opened for overlapped I/O).";

	public const string ArgumentNull_Path = "Path cannot be null.";

	public const string Argument_EmptyPath = "Empty path name is not legal.";

	public const string Argument_InvalidFileModeAndAccessCombo = "Combining FileMode: {0} with FileAccess: {1} is invalid.";

	public const string Argument_InvalidAppendMode = "Append access can be requested only in write-only mode.";

	public const string IO_UnknownFileName = "[Unknown]";

	public const string IO_FileStreamHandlePosition = "The OS handle's position is not what FileStream expected. Do not use a handle simultaneously in one FileStream and in Win32 code or another FileStream. This may cause data loss.";

	public const string NotSupported_FileStreamOnNonFiles = "FileStream was asked to open a device that was not a file. For support for devices like 'com1:' or 'lpt1:', call CreateFile, then use the FileStream constructors that take an OS handle as an IntPtr.";

	public const string IO_BindHandleFailed = "BindHandle for ThreadPool failed on this handle.";

	public const string Arg_HandleNotSync = "Handle does not support synchronous operations. The parameters to the FileStream constructor may need to be changed to indicate that the handle was opened asynchronously (that is, it was opened explicitly for overlapped I/O).";

	public const string IO_SetLengthAppendTruncate = "Unable to truncate data that previously existed in a file opened in Append mode.";

	public const string IO_SeekAppendOverwrite = "Unable seek backward to overwrite data that previously existed in a file opened in Append mode.";

	public const string IO_FileTooLongOrHandleNotSync = "IO operation will not work. Most likely the file will become too long or the handle was not opened to support synchronous IO operations.";

	public const string IndexOutOfRange_IORaceCondition = "Probable I/O race condition detected while copying memory. The I/O package is not thread safe by default. In multithreaded applications, a stream must be accessed in a thread-safe way, such as a thread-safe wrapper returned by TextReader's or TextWriter's Synchronized methods. This also applies to classes like StreamWriter and StreamReader.";

	public const string Arg_ResourceFileUnsupportedVersion = "The ResourceReader class does not know how to read this version of .resources files.";

	public const string Resources_StreamNotValid = "Stream is not a valid resource file.";

	public const string BadImageFormat_ResourcesHeaderCorrupted = "Corrupt .resources file. Unable to read resources from this file because of invalid header information. Try regenerating the .resources file.";

	public const string Argument_StreamNotReadable = "Stream was not readable.";

	public const string BadImageFormat_NegativeStringLength = "Corrupt .resources file. String length must be non-negative.";

	public const string BadImageFormat_ResourcesNameInvalidOffset = "Corrupt .resources file. The Invalid offset into name section is .";

	public const string BadImageFormat_TypeMismatch = "Corrupt .resources file.  The specified type doesn't match the available data in the stream.";

	public const string BadImageFormat_ResourceNameCorrupted_NameIndex = "Corrupt .resources file. The resource name for name index that extends past the end of the stream is ";

	public const string BadImageFormat_ResourcesDataInvalidOffset = "Corrupt .resources file. Invalid offset  into data section is ";

	public const string Format_Bad7BitInt32 = "Too many bytes in what should have been a 7 bit encoded Int32.";

	public const string BadImageFormat_InvalidType = "Corrupt .resources file.  The specified type doesn't exist.";

	public const string ResourceReaderIsClosed = "ResourceReader is closed.";

	public const string Arg_MissingManifestResourceException = "Unable to find manifest resource.";

	public const string Serialization_MissingKeys = "The keys for this dictionary are missing.";

	public const string Serialization_NullKey = "One of the serialized keys is null.";

	public const string NotSupported_KeyCollectionSet = "Mutating a key collection derived from a dictionary is not allowed.";

	public const string NotSupported_ValueCollectionSet = "Mutating a value collection derived from a dictionary is not allowed.";

	public const string IO_IO_StreamTooLong = "Stream was too long.";

	public const string UnauthorizedAccess_MemStreamBuffer = "MemoryStream's internal buffer cannot be accessed.";

	public const string NotSupported_MemStreamNotExpandable = "Memory stream is not expandable.";

	public const string IO_IO_SeekBeforeBegin = "An attempt was made to move the position before the beginning of the stream.";

	public const string ArgumentNull_Stream = "Stream cannot be null.";

	public const string IO_IO_InvalidStringLen_Len = "BinaryReader encountered an invalid string length of {0} characters.";

	public const string ArgumentOutOfRange_BinaryReaderFillBuffer = "The number of bytes requested does not fit into BinaryReader's internal buffer.";

	public const string Serialization_InsufficientDeserializationState = "Insufficient state to deserialize the object. Missing field '{0}'.";

	public const string NotSupported_UnitySerHolder = "The UnitySerializationHolder object is designed to transmit information about other types and is not serializable itself.";

	public const string Serialization_UnableToFindModule = "The given module {0} cannot be found within the assembly {1}.";

	public const string Argument_InvalidUnity = "Invalid Unity type.";

	public const string InvalidOperation_InvalidHandle = "The handle is invalid.";

	public const string PlatformNotSupported_NamedSynchronizationPrimitives = "The named version of this synchronization primitive is not supported on this platform.";

	public const string InvalidOperation_EmptyQueue = "Queue empty.";

	public const string Overflow_MutexReacquireCount = "The current thread attempted to reacquire a mutex that has reached its maximum acquire count.";

	public const string Serialization_InsufficientState = "Insufficient state to return the real object.";

	public const string Serialization_UnknownMember = "Cannot get the member '{0}'.";

	public const string Serialization_NullSignature = "The method signature cannot be null.";

	public const string Serialization_MemberTypeNotRecognized = "Unknown member type.";

	public const string Serialization_BadParameterInfo = "Non existent ParameterInfo. Position bigger than member's parameters length.";

	public const string Serialization_NoParameterInfo = "Serialized member does not have a ParameterInfo.";

	public const string ArgumentNull_Assembly = "Assembly cannot be null.";

	public const string Arg_InvalidNeutralResourcesLanguage_Asm_Culture = "The NeutralResourcesLanguageAttribute on the assembly \"{0}\" specifies an invalid culture name: \"{1}\".";

	public const string Arg_InvalidNeutralResourcesLanguage_FallbackLoc = "The NeutralResourcesLanguageAttribute specifies an invalid or unrecognized ultimate resource fallback location: \"{0}\".";

	public const string Arg_InvalidSatelliteContract_Asm_Ver = "Satellite contract version attribute on the assembly '{0}' specifies an invalid version: {1}.";

	public const string Arg_ResMgrNotResSet = "Type parameter must refer to a subclass of ResourceSet.";

	public const string BadImageFormat_ResourceNameCorrupted = "Corrupt .resources file. A resource name extends past the end of the stream.";

	public const string BadImageFormat_ResourcesNameTooLong = "Corrupt .resources file. Resource name extends past the end of the file.";

	public const string InvalidOperation_ResMgrBadResSet_Type = "'{0}': ResourceSet derived classes must provide a constructor that takes a String file name and a constructor that takes a Stream.";

	public const string InvalidOperation_ResourceNotStream_Name = "Resource '{0}' was not a Stream - call GetObject instead.";

	public const string MissingManifestResource_MultipleBlobs = "A case-insensitive lookup for resource file \"{0}\" in assembly \"{1}\" found multiple entries. Remove the duplicates or specify the exact case.";

	public const string MissingManifestResource_NoNeutralAsm = "Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure \"{0}\" was correctly embedded or linked into assembly \"{1}\" at compile time, or that all the satellite assemblies required are loadable and fully signed.";

	public const string MissingManifestResource_NoNeutralDisk = "Could not find any resources appropriate for the specified culture (or the neutral culture) on disk.";

	public const string MissingManifestResource_NoPRIresources = "Unable to open Package Resource Index.";

	public const string MissingManifestResource_ResWFileNotLoaded = "Unable to load resources for resource file \"{0}\" in package \"{1}\".";

	public const string MissingSatelliteAssembly_Culture_Name = "The satellite assembly named \"{1}\" for fallback culture \"{0}\" either could not be found or could not be loaded. This is generally a setup problem. Please consider reinstalling or repairing the application.";

	public const string MissingSatelliteAssembly_Default = "Resource lookup fell back to the ultimate fallback resources in a satellite assembly, but that satellite either was not found or could not be loaded. Please consider reinstalling or repairing the application.";

	public const string NotSupported_ObsoleteResourcesFile = "Found an obsolete .resources file in assembly '{0}'. Rebuild that .resources file then rebuild that assembly.";

	public const string NotSupported_ResourceObjectSerialization = "Cannot read resources that depend on serialization.";

	public const string ObjectDisposed_ResourceSet = "Cannot access a closed resource set.";

	public const string Arg_ResourceNameNotExist = "The specified resource name \"{0}\" does not exist in the resource file.";

	public const string BadImageFormat_ResourceDataLengthInvalid = "Corrupt .resources file.  The specified data length '{0}' is not a valid position in the stream.";

	public const string BadImageFormat_ResourcesIndexTooLong = "Corrupt .resources file. String for name index '{0}' extends past the end of the file.";

	public const string InvalidOperation_ResourceNotString_Name = "Resource '{0}' was not a String - call GetObject instead.";

	public const string InvalidOperation_ResourceNotString_Type = "Resource was of type '{0}' instead of String - call GetObject instead.";

	public const string NotSupported_WrongResourceReader_Type = "This .resources file should not be read with this reader. The resource reader type is \"{0}\".";

	public const string Arg_MustBeDelegate = "Type must derive from Delegate.";

	public const string NotSupported_GlobalMethodSerialization = "Serialization of global methods (including implicit serialization via the use of asynchronous delegates) is not supported.";

	public const string NotSupported_DelegateSerHolderSerial = "DelegateSerializationHolder objects are designed to represent a delegate during serialization and are not serializable themselves.";

	public const string DelegateSer_InsufficientMetadata = "The delegate cannot be serialized properly due to missing metadata for the target method.";

	public const string Argument_NoUninitializedStrings = "Uninitialized Strings cannot be created.";

	public const string ArgumentOutOfRangeException_NoGCRegionSizeTooLarge = "totalSize is too large. For more information about setting the maximum size, see \\\"Latency Modes\\\" in http://go.microsoft.com/fwlink/?LinkId=522706.";

	public const string InvalidOperationException_AlreadyInNoGCRegion = "The NoGCRegion mode was already in progress.";

	public const string InvalidOperationException_NoGCRegionAllocationExceeded = "Allocated memory exceeds specified memory for NoGCRegion mode.";

	public const string InvalidOperationException_NoGCRegionInduced = "Garbage collection was induced in NoGCRegion mode.";

	public const string InvalidOperationException_NoGCRegionNotInProgress = "NoGCRegion mode must be set.";

	public const string InvalidOperationException_SetLatencyModeNoGC = "The NoGCRegion mode is in progress. End it and then set a different mode.";

	public const string InvalidOperation_NotWithConcurrentGC = "This API is not available when the concurrent GC is enabled.";

	public const string ThreadState_AlreadyStarted = "Thread is running or terminated; it cannot restart.";

	public const string ThreadState_Dead_Priority = "Thread is dead; priority cannot be accessed.";

	public const string ThreadState_Dead_State = "Thread is dead; state cannot be accessed.";

	public const string ThreadState_NotStarted = "Thread has not been started.";

	public const string ThreadState_SetPriorityFailed = "Unable to set thread priority.";

	public const string Serialization_InvalidFieldState = "Object fields may not be properly initialized.";

	public const string Acc_CreateAbst = "Cannot create an abstract class.";

	public const string Acc_CreateGeneric = "Cannot create a type for which Type.ContainsGenericParameters is true.";

	public const string Argument_InvalidValue = "Value was invalid.";

	public const string NotSupported_ManagedActivation = "Cannot create uninitialized instances of types requiring managed activation.";

	public const string PlatformNotSupported_ResourceManager_ResWFileUnsupportedMethod = "ResourceManager method '{0}' is not supported when reading from .resw resource files.";

	public const string PlatformNotSupported_ResourceManager_ResWFileUnsupportedProperty = "ResourceManager property '{0}' is not supported when reading from .resw resource files.";

	public const string Serialization_NonSerType = "Type '{0}' in Assembly '{1}' is not marked as serializable.";

	public const string InvalidCast_DBNull = "Object cannot be cast to DBNull.";

	public const string NotSupported_NYI = "This feature is not currently implemented.";

	public const string Delegate_GarbageCollected = "The corresponding delegate has been garbage collected. Please make sure the delegate is still referenced by managed code when you are using the marshalled native function pointer.";

	public const string Arg_AmbiguousMatchException = "Ambiguous match found.";

	public const string NotSupported_ChangeType = "ChangeType operation is not supported.";

	public const string Arg_EmptyArray = "Array may not be empty.";

	public const string MissingMember = "Member not found.";

	public const string MissingField = "Field not found.";

	public const string InvalidCast_FromDBNull = "Object cannot be cast from DBNull to other types.";

	public const string NotSupported_DBNullSerial = "Only one DBNull instance may exist, and calls to DBNull deserialization methods are not allowed.";

	public const string Serialization_StringBuilderCapacity = "The serialized Capacity property of StringBuilder must be positive, less than or equal to MaxCapacity and greater than or equal to the String length.";

	public const string Serialization_StringBuilderMaxCapacity = "The serialized MaxCapacity property of StringBuilder must be positive and greater than or equal to the String length.";

	public const string PlatformNotSupported_Remoting = "Remoting is not supported on this platform.";

	public const string PlatformNotSupported_StrongNameSigning = "Strong-name signing is not supported on this platform.";

	public const string Serialization_MissingDateTimeData = "Invalid serialized DateTime data. Unable to find 'ticks' or 'dateData'.";

	public const string Serialization_DateTimeTicksOutOfRange = "Invalid serialized DateTime data. Ticks must be between DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks.";

	public const string Arg_InvalidANSIString = "The ANSI string passed in could not be converted from the default ANSI code page to Unicode.";

	public const string Arg_ExpectedNulTermination = "The value passed was not NUL terminated.";

	public const string PlatformNotSupported_ArgIterator = "ArgIterator is not supported on this platform.";

	public const string Arg_TypeUnloadedException = "Type had been unloaded.";

	public const string Overflow_Currency = "Value was either too large or too small for a Currency.";

	public const string PlatformNotSupported_SecureBinarySerialization = "Secure binary serialization is not supported on this platform.";

	public const string Serialization_InvalidPtrValue = "An IntPtr or UIntPtr with an eight byte value cannot be deserialized on a machine with a four byte word size.";

	public const string EventSource_ListenerNotFound = "Listener not found.";

	public const string EventSource_ToString = "EventSource({0}, {1})";

	public const string EventSource_ImplementGetMetadata = "Please implement the GetMetadata method in your derived class";

	public const string EventSource_NeedGuid = "The Guid of an EventSource must be non zero.";

	public const string EventSource_NeedName = "The name of an EventSource must not be null.";

	public const string EventSource_NeedDescriptors = "The descriptor of an EventSource must be non-null.";

	public const string EventSource_NeedManifest = "The manifest of an EventSource must be non-null.";

	public const string EventSource_EventSourceGuidInUse = "An instance of EventSource with Guid {0} already exists.";

	public const string EventSource_ListenerWriteFailure = "An error occurred when writing to a listener.";

	public const string EventSource_NoManifest = "A manifest could not be generated for this EventSource because it contains one or more ill-formed event methods.";

	public const string Argument_StreamNotWritable = "Stream was not writable.";

	public const string Arg_SurrogatesNotAllowedAsSingleChar = "Unicode surrogate characters must be written out as pairs together in the same call, not individually. Consider passing in a character array instead.";

	public const string CustomAttributeFormat_InvalidFieldFail = "'{0}' field specified was not found.";

	public const string CustomAttributeFormat_InvalidPropertyFail = "'{0}' property specified was not found.";

	public const string NotSupported_CannotCallEqualsOnSpan = "Equals() on Span and ReadOnlySpan is not supported. Use operator== instead.";

	public const string NotSupported_CannotCallGetHashCodeOnSpan = "GetHashCode() on Span and ReadOnlySpan is not supported.";

	public const string Argument_DestinationTooShort = "Destination is too short.";

	public const string Argument_InvalidTypeWithPointersNotSupported = "Cannot use type '{0}'. Only value types without pointers or references are supported.";

	public const string ArrayTypeMismatch_ConstrainedCopy = "Array.ConstrainedCopy will

Room Architect Tool_Data/Managed/netstandard.dll

Decompiled 3 months ago
using System;
using System.CodeDom.Compiler;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.ComponentModel.Design.Serialization;
using System.Configuration.Assemblies;
using System.Data;
using System.Data.Common;
using System.Data.SqlTypes;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
using System.Diagnostics.SymbolStore;
using System.Diagnostics.Tracing;
using System.Drawing;
using System.Dynamic;
using System.Globalization;
using System.IO;
using System.IO.Compression;
using System.IO.IsolatedStorage;
using System.IO.MemoryMappedFiles;
using System.IO.Pipes;
using System.Linq;
using System.Linq.Expressions;
using System.Net;
using System.Net.Cache;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Net.Mail;
using System.Net.Mime;
using System.Net.NetworkInformation;
using System.Net.Security;
using System.Net.Sockets;
using System.Net.WebSockets;
using System.Numerics;
using System.Reflection;
using System.Reflection.Emit;
using System.Resources;
using System.Runtime;
using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
using System.Runtime.ExceptionServices;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters;
using System.Runtime.Serialization.Formatters.Binary;
using System.Runtime.Serialization.Json;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Authentication;
using System.Security.Authentication.ExtendedProtection;
using System.Security.Claims;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Security.Permissions;
using System.Security.Principal;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using System.Timers;
using System.Transactions;
using System.Web;
using System.Windows.Input;
using System.Xml;
using System.Xml.Linq;
using System.Xml.Resolvers;
using System.Xml.Schema;
using System.Xml.Serialization;
using System.Xml.XPath;
using System.Xml.Xsl;
using Microsoft.Win32.SafeHandles;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("netstandard")]
[assembly: AssemblyDescription("netstandard")]
[assembly: AssemblyDefaultAlias("netstandard")]
[assembly: AssemblyCompany("Mono development team")]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright("(c) Various Mono authors")]
[assembly: AssemblyInformationalVersion("2.0.0.0")]
[assembly: AssemblyFileVersion("2.0.0.0")]
[assembly: AssemblyVersion("2.0.0.0")]
[assembly: TypeForwardedTo(typeof(CriticalHandleMinusOneIsInvalid))]
[assembly: TypeForwardedTo(typeof(CriticalHandleZeroOrMinusOneIsInvalid))]
[assembly: TypeForwardedTo(typeof(SafeFileHandle))]
[assembly: TypeForwardedTo(typeof(SafeHandleMinusOneIsInvalid))]
[assembly: TypeForwardedTo(typeof(SafeHandleZeroOrMinusOneIsInvalid))]
[assembly: TypeForwardedTo(typeof(SafeMemoryMappedFileHandle))]
[assembly: TypeForwardedTo(typeof(SafeMemoryMappedViewHandle))]
[assembly: TypeForwardedTo(typeof(SafePipeHandle))]
[assembly: TypeForwardedTo(typeof(SafeProcessHandle))]
[assembly: TypeForwardedTo(typeof(SafeWaitHandle))]
[assembly: TypeForwardedTo(typeof(SafeX509ChainHandle))]
[assembly: TypeForwardedTo(typeof(AccessViolationException))]
[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(AggregateException))]
[assembly: TypeForwardedTo(typeof(AppContext))]
[assembly: TypeForwardedTo(typeof(AppDomain))]
[assembly: TypeForwardedTo(typeof(AppDomainUnloadedException))]
[assembly: TypeForwardedTo(typeof(ApplicationException))]
[assembly: TypeForwardedTo(typeof(ApplicationId))]
[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(AssemblyLoadEventArgs))]
[assembly: TypeForwardedTo(typeof(AssemblyLoadEventHandler))]
[assembly: TypeForwardedTo(typeof(AsyncCallback))]
[assembly: TypeForwardedTo(typeof(Attribute))]
[assembly: TypeForwardedTo(typeof(AttributeTargets))]
[assembly: TypeForwardedTo(typeof(AttributeUsageAttribute))]
[assembly: TypeForwardedTo(typeof(BadImageFormatException))]
[assembly: TypeForwardedTo(typeof(Base64FormattingOptions))]
[assembly: TypeForwardedTo(typeof(BitConverter))]
[assembly: TypeForwardedTo(typeof(bool))]
[assembly: TypeForwardedTo(typeof(Buffer))]
[assembly: TypeForwardedTo(typeof(byte))]
[assembly: TypeForwardedTo(typeof(CannotUnloadAppDomainException))]
[assembly: TypeForwardedTo(typeof(char))]
[assembly: TypeForwardedTo(typeof(CharEnumerator))]
[assembly: TypeForwardedTo(typeof(CLSCompliantAttribute))]
[assembly: TypeForwardedTo(typeof(GeneratedCodeAttribute))]
[assembly: TypeForwardedTo(typeof(IndentedTextWriter))]
[assembly: TypeForwardedTo(typeof(ArrayList))]
[assembly: TypeForwardedTo(typeof(BitArray))]
[assembly: TypeForwardedTo(typeof(CaseInsensitiveComparer))]
[assembly: TypeForwardedTo(typeof(CaseInsensitiveHashCodeProvider))]
[assembly: TypeForwardedTo(typeof(CollectionBase))]
[assembly: TypeForwardedTo(typeof(Comparer))]
[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<>))]
[assembly: TypeForwardedTo(typeof(DictionaryBase))]
[assembly: TypeForwardedTo(typeof(DictionaryEntry))]
[assembly: TypeForwardedTo(typeof(Comparer<>))]
[assembly: TypeForwardedTo(typeof(Dictionary<, >))]
[assembly: TypeForwardedTo(typeof(EqualityComparer<>))]
[assembly: TypeForwardedTo(typeof(HashSet<>))]
[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(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(Hashtable))]
[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(IHashCodeProvider))]
[assembly: TypeForwardedTo(typeof(IList))]
[assembly: TypeForwardedTo(typeof(IStructuralComparable))]
[assembly: TypeForwardedTo(typeof(IStructuralEquatable))]
[assembly: TypeForwardedTo(typeof(Collection<>))]
[assembly: TypeForwardedTo(typeof(KeyedCollection<, >))]
[assembly: TypeForwardedTo(typeof(ObservableCollection<>))]
[assembly: TypeForwardedTo(typeof(ReadOnlyCollection<>))]
[assembly: TypeForwardedTo(typeof(ReadOnlyDictionary<, >))]
[assembly: TypeForwardedTo(typeof(ReadOnlyObservableCollection<>))]
[assembly: TypeForwardedTo(typeof(Queue))]
[assembly: TypeForwardedTo(typeof(ReadOnlyCollectionBase))]
[assembly: TypeForwardedTo(typeof(SortedList))]
[assembly: TypeForwardedTo(typeof(BitVector32))]
[assembly: TypeForwardedTo(typeof(CollectionsUtil))]
[assembly: TypeForwardedTo(typeof(HybridDictionary))]
[assembly: TypeForwardedTo(typeof(INotifyCollectionChanged))]
[assembly: TypeForwardedTo(typeof(IOrderedDictionary))]
[assembly: TypeForwardedTo(typeof(ListDictionary))]
[assembly: TypeForwardedTo(typeof(NameObjectCollectionBase))]
[assembly: TypeForwardedTo(typeof(NameValueCollection))]
[assembly: TypeForwardedTo(typeof(NotifyCollectionChangedAction))]
[assembly: TypeForwardedTo(typeof(NotifyCollectionChangedEventArgs))]
[assembly: TypeForwardedTo(typeof(NotifyCollectionChangedEventHandler))]
[assembly: TypeForwardedTo(typeof(OrderedDictionary))]
[assembly: TypeForwardedTo(typeof(StringCollection))]
[assembly: TypeForwardedTo(typeof(StringDictionary))]
[assembly: TypeForwardedTo(typeof(StringEnumerator))]
[assembly: TypeForwardedTo(typeof(Stack))]
[assembly: TypeForwardedTo(typeof(StructuralComparisons))]
[assembly: TypeForwardedTo(typeof(Comparison<>))]
[assembly: TypeForwardedTo(typeof(AddingNewEventArgs))]
[assembly: TypeForwardedTo(typeof(AddingNewEventHandler))]
[assembly: TypeForwardedTo(typeof(AmbientValueAttribute))]
[assembly: TypeForwardedTo(typeof(ArrayConverter))]
[assembly: TypeForwardedTo(typeof(AsyncCompletedEventArgs))]
[assembly: TypeForwardedTo(typeof(AsyncCompletedEventHandler))]
[assembly: TypeForwardedTo(typeof(AsyncOperation))]
[assembly: TypeForwardedTo(typeof(AsyncOperationManager))]
[assembly: TypeForwardedTo(typeof(AttributeCollection))]
[assembly: TypeForwardedTo(typeof(AttributeProviderAttribute))]
[assembly: TypeForwardedTo(typeof(BackgroundWorker))]
[assembly: TypeForwardedTo(typeof(BaseNumberConverter))]
[assembly: TypeForwardedTo(typeof(BindableAttribute))]
[assembly: TypeForwardedTo(typeof(BindableSupport))]
[assembly: TypeForwardedTo(typeof(BindingDirection))]
[assembly: TypeForwardedTo(typeof(BindingList<>))]
[assembly: TypeForwardedTo(typeof(BooleanConverter))]
[assembly: TypeForwardedTo(typeof(BrowsableAttribute))]
[assembly: TypeForwardedTo(typeof(ByteConverter))]
[assembly: TypeForwardedTo(typeof(CancelEventArgs))]
[assembly: TypeForwardedTo(typeof(CancelEventHandler))]
[assembly: TypeForwardedTo(typeof(CategoryAttribute))]
[assembly: TypeForwardedTo(typeof(CharConverter))]
[assembly: TypeForwardedTo(typeof(CollectionChangeAction))]
[assembly: TypeForwardedTo(typeof(CollectionChangeEventArgs))]
[assembly: TypeForwardedTo(typeof(CollectionChangeEventHandler))]
[assembly: TypeForwardedTo(typeof(CollectionConverter))]
[assembly: TypeForwardedTo(typeof(ComplexBindingPropertiesAttribute))]
[assembly: TypeForwardedTo(typeof(Component))]
[assembly: TypeForwardedTo(typeof(ComponentCollection))]
[assembly: TypeForwardedTo(typeof(ComponentConverter))]
[assembly: TypeForwardedTo(typeof(ComponentEditor))]
[assembly: TypeForwardedTo(typeof(ComponentResourceManager))]
[assembly: TypeForwardedTo(typeof(Container))]
[assembly: TypeForwardedTo(typeof(ContainerFilterService))]
[assembly: TypeForwardedTo(typeof(CultureInfoConverter))]
[assembly: TypeForwardedTo(typeof(CustomTypeDescriptor))]
[assembly: TypeForwardedTo(typeof(DataErrorsChangedEventArgs))]
[assembly: TypeForwardedTo(typeof(DataObjectAttribute))]
[assembly: TypeForwardedTo(typeof(DataObjectFieldAttribute))]
[assembly: TypeForwardedTo(typeof(DataObjectMethodAttribute))]
[assembly: TypeForwardedTo(typeof(DataObjectMethodType))]
[assembly: TypeForwardedTo(typeof(DateTimeConverter))]
[assembly: TypeForwardedTo(typeof(DateTimeOffsetConverter))]
[assembly: TypeForwardedTo(typeof(DecimalConverter))]
[assembly: TypeForwardedTo(typeof(DefaultBindingPropertyAttribute))]
[assembly: TypeForwardedTo(typeof(DefaultEventAttribute))]
[assembly: TypeForwardedTo(typeof(DefaultPropertyAttribute))]
[assembly: TypeForwardedTo(typeof(DefaultValueAttribute))]
[assembly: TypeForwardedTo(typeof(DescriptionAttribute))]
[assembly: TypeForwardedTo(typeof(ActiveDesignerEventArgs))]
[assembly: TypeForwardedTo(typeof(ActiveDesignerEventHandler))]
[assembly: TypeForwardedTo(typeof(CheckoutException))]
[assembly: TypeForwardedTo(typeof(CommandID))]
[assembly: TypeForwardedTo(typeof(ComponentChangedEventArgs))]
[assembly: TypeForwardedTo(typeof(ComponentChangedEventHandler))]
[assembly: TypeForwardedTo(typeof(ComponentChangingEventArgs))]
[assembly: TypeForwardedTo(typeof(ComponentChangingEventHandler))]
[assembly: TypeForwardedTo(typeof(ComponentEventArgs))]
[assembly: TypeForwardedTo(typeof(ComponentEventHandler))]
[assembly: TypeForwardedTo(typeof(ComponentRenameEventArgs))]
[assembly: TypeForwardedTo(typeof(ComponentRenameEventHandler))]
[assembly: TypeForwardedTo(typeof(DesignerCollection))]
[assembly: TypeForwardedTo(typeof(DesignerEventArgs))]
[assembly: TypeForwardedTo(typeof(DesignerEventHandler))]
[assembly: TypeForwardedTo(typeof(DesignerOptionService))]
[assembly: TypeForwardedTo(typeof(DesignerTransaction))]
[assembly: TypeForwardedTo(typeof(DesignerTransactionCloseEventArgs))]
[assembly: TypeForwardedTo(typeof(DesignerTransactionCloseEventHandler))]
[assembly: TypeForwardedTo(typeof(DesignerVerb))]
[assembly: TypeForwardedTo(typeof(DesignerVerbCollection))]
[assembly: TypeForwardedTo(typeof(DesigntimeLicenseContext))]
[assembly: TypeForwardedTo(typeof(DesigntimeLicenseContextSerializer))]
[assembly: TypeForwardedTo(typeof(HelpContextType))]
[assembly: TypeForwardedTo(typeof(HelpKeywordAttribute))]
[assembly: TypeForwardedTo(typeof(HelpKeywordType))]
[assembly: TypeForwardedTo(typeof(IComponentChangeService))]
[assembly: TypeForwardedTo(typeof(IComponentDiscoveryService))]
[assembly: TypeForwardedTo(typeof(IComponentInitializer))]
[assembly: TypeForwardedTo(typeof(IDesigner))]
[assembly: TypeForwardedTo(typeof(IDesignerEventService))]
[assembly: TypeForwardedTo(typeof(IDesignerFilter))]
[assembly: TypeForwardedTo(typeof(IDesignerHost))]
[assembly: TypeForwardedTo(typeof(IDesignerHostTransactionState))]
[assembly: TypeForwardedTo(typeof(IDesignerOptionService))]
[assembly: TypeForwardedTo(typeof(IDictionaryService))]
[assembly: TypeForwardedTo(typeof(IEventBindingService))]
[assembly: TypeForwardedTo(typeof(IExtenderListService))]
[assembly: TypeForwardedTo(typeof(IExtenderProviderService))]
[assembly: TypeForwardedTo(typeof(IHelpService))]
[assembly: TypeForwardedTo(typeof(IInheritanceService))]
[assembly: TypeForwardedTo(typeof(IMenuCommandService))]
[assembly: TypeForwardedTo(typeof(IReferenceService))]
[assembly: TypeForwardedTo(typeof(IResourceService))]
[assembly: TypeForwardedTo(typeof(IRootDesigner))]
[assembly: TypeForwardedTo(typeof(ISelectionService))]
[assembly: TypeForwardedTo(typeof(IServiceContainer))]
[assembly: TypeForwardedTo(typeof(ITreeDesigner))]
[assembly: TypeForwardedTo(typeof(ITypeDescriptorFilterService))]
[assembly: TypeForwardedTo(typeof(ITypeDiscoveryService))]
[assembly: TypeForwardedTo(typeof(ITypeResolutionService))]
[assembly: TypeForwardedTo(typeof(MenuCommand))]
[assembly: TypeForwardedTo(typeof(SelectionTypes))]
[assembly: TypeForwardedTo(typeof(ComponentSerializationService))]
[assembly: TypeForwardedTo(typeof(ContextStack))]
[assembly: TypeForwardedTo(typeof(DefaultSerializationProviderAttribute))]
[assembly: TypeForwardedTo(typeof(DesignerLoader))]
[assembly: TypeForwardedTo(typeof(DesignerSerializerAttribute))]
[assembly: TypeForwardedTo(typeof(IDesignerLoaderHost))]
[assembly: TypeForwardedTo(typeof(IDesignerLoaderHost2))]
[assembly: TypeForwardedTo(typeof(IDesignerLoaderService))]
[assembly: TypeForwardedTo(typeof(IDesignerSerializationManager))]
[assembly: TypeForwardedTo(typeof(IDesignerSerializationProvider))]
[assembly: TypeForwardedTo(typeof(IDesignerSerializationService))]
[assembly: TypeForwardedTo(typeof(INameCreationService))]
[assembly: TypeForwardedTo(typeof(InstanceDescriptor))]
[assembly: TypeForwardedTo(typeof(MemberRelationship))]
[assembly: TypeForwardedTo(typeof(MemberRelationshipService))]
[assembly: TypeForwardedTo(typeof(ResolveNameEventArgs))]
[assembly: TypeForwardedTo(typeof(ResolveNameEventHandler))]
[assembly: TypeForwardedTo(typeof(RootDesignerSerializerAttribute))]
[assembly: TypeForwardedTo(typeof(SerializationStore))]
[assembly: TypeForwardedTo(typeof(ServiceContainer))]
[assembly: TypeForwardedTo(typeof(ServiceCreatorCallback))]
[assembly: TypeForwardedTo(typeof(StandardCommands))]
[assembly: TypeForwardedTo(typeof(StandardToolWindows))]
[assembly: TypeForwardedTo(typeof(TypeDescriptionProviderService))]
[assembly: TypeForwardedTo(typeof(ViewTechnology))]
[assembly: TypeForwardedTo(typeof(DesignerAttribute))]
[assembly: TypeForwardedTo(typeof(DesignerCategoryAttribute))]
[assembly: TypeForwardedTo(typeof(DesignerSerializationVisibility))]
[assembly: TypeForwardedTo(typeof(DesignerSerializationVisibilityAttribute))]
[assembly: TypeForwardedTo(typeof(DesignOnlyAttribute))]
[assembly: TypeForwardedTo(typeof(DesignTimeVisibleAttribute))]
[assembly: TypeForwardedTo(typeof(DisplayNameAttribute))]
[assembly: TypeForwardedTo(typeof(DoubleConverter))]
[assembly: TypeForwardedTo(typeof(DoWorkEventArgs))]
[assembly: TypeForwardedTo(typeof(DoWorkEventHandler))]
[assembly: TypeForwardedTo(typeof(EditorAttribute))]
[assembly: TypeForwardedTo(typeof(EditorBrowsableAttribute))]
[assembly: TypeForwardedTo(typeof(EditorBrowsableState))]
[assembly: TypeForwardedTo(typeof(EnumConverter))]
[assembly: TypeForwardedTo(typeof(EventDescriptor))]
[assembly: TypeForwardedTo(typeof(EventDescriptorCollection))]
[assembly: TypeForwardedTo(typeof(EventHandlerList))]
[assembly: TypeForwardedTo(typeof(ExpandableObjectConverter))]
[assembly: TypeForwardedTo(typeof(ExtenderProvidedPropertyAttribute))]
[assembly: TypeForwardedTo(typeof(GuidConverter))]
[assembly: TypeForwardedTo(typeof(HandledEventArgs))]
[assembly: TypeForwardedTo(typeof(HandledEventHandler))]
[assembly: TypeForwardedTo(typeof(IBindingList))]
[assembly: TypeForwardedTo(typeof(IBindingListView))]
[assembly: TypeForwardedTo(typeof(ICancelAddNew))]
[assembly: TypeForwardedTo(typeof(IChangeTracking))]
[assembly: TypeForwardedTo(typeof(IComNativeDescriptorHandler))]
[assembly: TypeForwardedTo(typeof(IComponent))]
[assembly: TypeForwardedTo(typeof(IContainer))]
[assembly: TypeForwardedTo(typeof(ICustomTypeDescriptor))]
[assembly: TypeForwardedTo(typeof(IDataErrorInfo))]
[assembly: TypeForwardedTo(typeof(IEditableObject))]
[assembly: TypeForwardedTo(typeof(IExtenderProvider))]
[assembly: TypeForwardedTo(typeof(IIntellisenseBuilder))]
[assembly: TypeForwardedTo(typeof(IListSource))]
[assembly: TypeForwardedTo(typeof(ImmutableObjectAttribute))]
[assembly: TypeForwardedTo(typeof(INestedContainer))]
[assembly: TypeForwardedTo(typeof(INestedSite))]
[assembly: TypeForwardedTo(typeof(InheritanceAttribute))]
[assembly: TypeForwardedTo(typeof(InheritanceLevel))]
[assembly: TypeForwardedTo(typeof(InitializationEventAttribute))]
[assembly: TypeForwardedTo(typeof(INotifyDataErrorInfo))]
[assembly: TypeForwardedTo(typeof(INotifyPropertyChanged))]
[assembly: TypeForwardedTo(typeof(INotifyPropertyChanging))]
[assembly: TypeForwardedTo(typeof(InstallerTypeAttribute))]
[assembly: TypeForwardedTo(typeof(InstanceCreationEditor))]
[assembly: TypeForwardedTo(typeof(Int16Converter))]
[assembly: TypeForwardedTo(typeof(Int32Converter))]
[assembly: TypeForwardedTo(typeof(Int64Converter))]
[assembly: TypeForwardedTo(typeof(InvalidAsynchronousStateException))]
[assembly: TypeForwardedTo(typeof(InvalidEnumArgumentException))]
[assembly: TypeForwardedTo(typeof(IRaiseItemChangedEvents))]
[assembly: TypeForwardedTo(typeof(IRevertibleChangeTracking))]
[assembly: TypeForwardedTo(typeof(ISite))]
[assembly: TypeForwardedTo(typeof(ISupportInitialize))]
[assembly: TypeForwardedTo(typeof(ISupportInitializeNotification))]
[assembly: TypeForwardedTo(typeof(ISynchronizeInvoke))]
[assembly: TypeForwardedTo(typeof(ITypeDescriptorContext))]
[assembly: TypeForwardedTo(typeof(ITypedList))]
[assembly: TypeForwardedTo(typeof(License))]
[assembly: TypeForwardedTo(typeof(LicenseContext))]
[assembly: TypeForwardedTo(typeof(LicenseException))]
[assembly: TypeForwardedTo(typeof(LicenseManager))]
[assembly: TypeForwardedTo(typeof(LicenseProvider))]
[assembly: TypeForwardedTo(typeof(LicenseProviderAttribute))]
[assembly: TypeForwardedTo(typeof(LicenseUsageMode))]
[assembly: TypeForwardedTo(typeof(LicFileLicenseProvider))]
[assembly: TypeForwardedTo(typeof(ListBindableAttribute))]
[assembly: TypeForwardedTo(typeof(ListChangedEventArgs))]
[assembly: TypeForwardedTo(typeof(ListChangedEventHandler))]
[assembly: TypeForwardedTo(typeof(ListChangedType))]
[assembly: TypeForwardedTo(typeof(ListSortDescription))]
[assembly: TypeForwardedTo(typeof(ListSortDescriptionCollection))]
[assembly: TypeForwardedTo(typeof(ListSortDirection))]
[assembly: TypeForwardedTo(typeof(LocalizableAttribute))]
[assembly: TypeForwardedTo(typeof(LookupBindingPropertiesAttribute))]
[assembly: TypeForwardedTo(typeof(MarshalByValueComponent))]
[assembly: TypeForwardedTo(typeof(MaskedTextProvider))]
[assembly: TypeForwardedTo(typeof(MaskedTextResultHint))]
[assembly: TypeForwardedTo(typeof(MemberDescriptor))]
[assembly: TypeForwardedTo(typeof(MergablePropertyAttribute))]
[assembly: TypeForwardedTo(typeof(MultilineStringConverter))]
[assembly: TypeForwardedTo(typeof(NestedContainer))]
[assembly: TypeForwardedTo(typeof(NotifyParentPropertyAttribute))]
[assembly: TypeForwardedTo(typeof(NullableConverter))]
[assembly: TypeForwardedTo(typeof(ParenthesizePropertyNameAttribute))]
[assembly: TypeForwardedTo(typeof(PasswordPropertyTextAttribute))]
[assembly: TypeForwardedTo(typeof(ProgressChangedEventArgs))]
[assembly: TypeForwardedTo(typeof(ProgressChangedEventHandler))]
[assembly: TypeForwardedTo(typeof(PropertyChangedEventArgs))]
[assembly: TypeForwardedTo(typeof(PropertyChangedEventHandler))]
[assembly: TypeForwardedTo(typeof(PropertyChangingEventArgs))]
[assembly: TypeForwardedTo(typeof(PropertyChangingEventHandler))]
[assembly: TypeForwardedTo(typeof(PropertyDescriptor))]
[assembly: TypeForwardedTo(typeof(PropertyDescriptorCollection))]
[assembly: TypeForwardedTo(typeof(PropertyTabAttribute))]
[assembly: TypeForwardedTo(typeof(PropertyTabScope))]
[assembly: TypeForwardedTo(typeof(ProvidePropertyAttribute))]
[assembly: TypeForwardedTo(typeof(ReadOnlyAttribute))]
[assembly: TypeForwardedTo(typeof(RecommendedAsConfigurableAttribute))]
[assembly: TypeForwardedTo(typeof(ReferenceConverter))]
[assembly: TypeForwardedTo(typeof(RefreshEventArgs))]
[assembly: TypeForwardedTo(typeof(RefreshEventHandler))]
[assembly: TypeForwardedTo(typeof(RefreshProperties))]
[assembly: TypeForwardedTo(typeof(RefreshPropertiesAttribute))]
[assembly: TypeForwardedTo(typeof(RunInstallerAttribute))]
[assembly: TypeForwardedTo(typeof(RunWorkerCompletedEventArgs))]
[assembly: TypeForwardedTo(typeof(RunWorkerCompletedEventHandler))]
[assembly: TypeForwardedTo(typeof(SByteConverter))]
[assembly: TypeForwardedTo(typeof(SettingsBindableAttribute))]
[assembly: TypeForwardedTo(typeof(SingleConverter))]
[assembly: TypeForwardedTo(typeof(StringConverter))]
[assembly: TypeForwardedTo(typeof(SyntaxCheck))]
[assembly: TypeForwardedTo(typeof(TimeSpanConverter))]
[assembly: TypeForwardedTo(typeof(ToolboxItemAttribute))]
[assembly: TypeForwardedTo(typeof(ToolboxItemFilterAttribute))]
[assembly: TypeForwardedTo(typeof(ToolboxItemFilterType))]
[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(WarningException))]
[assembly: TypeForwardedTo(typeof(Win32Exception))]
[assembly: TypeForwardedTo(typeof(AssemblyHashAlgorithm))]
[assembly: TypeForwardedTo(typeof(AssemblyVersionCompatibility))]
[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))]
[assembly: TypeForwardedTo(typeof(ContextBoundObject))]
[assembly: TypeForwardedTo(typeof(ContextMarshalException))]
[assembly: TypeForwardedTo(typeof(ContextStaticAttribute))]
[assembly: TypeForwardedTo(typeof(Convert))]
[assembly: TypeForwardedTo(typeof(Converter<, >))]
[assembly: TypeForwardedTo(typeof(AcceptRejectRule))]
[assembly: TypeForwardedTo(typeof(CommandBehavior))]
[assembly: TypeForwardedTo(typeof(CommandType))]
[assembly: TypeForwardedTo(typeof(CatalogLocation))]
[assembly: TypeForwardedTo(typeof(DataAdapter))]
[assembly: TypeForwardedTo(typeof(DataColumnMapping))]
[assembly: TypeForwardedTo(typeof(DataColumnMappingCollection))]
[assembly: TypeForwardedTo(typeof(DataTableMapping))]
[assembly: TypeForwardedTo(typeof(DataTableMappingCollection))]
[assembly: TypeForwardedTo(typeof(DbColumn))]
[assembly: TypeForwardedTo(typeof(DbCommand))]
[assembly: TypeForwardedTo(typeof(DbCommandBuilder))]
[assembly: TypeForwardedTo(typeof(DbConnection))]
[assembly: TypeForwardedTo(typeof(DbConnectionStringBuilder))]
[assembly: TypeForwardedTo(typeof(DbDataAdapter))]
[assembly: TypeForwardedTo(typeof(DbDataReader))]
[assembly: TypeForwardedTo(typeof(DbDataReaderExtensions))]
[assembly: TypeForwardedTo(typeof(DbDataRecord))]
[assembly: TypeForwardedTo(typeof(DbDataSourceEnumerator))]
[assembly: TypeForwardedTo(typeof(DbEnumerator))]
[assembly: TypeForwardedTo(typeof(DbException))]
[assembly: TypeForwardedTo(typeof(DbMetaDataCollectionNames))]
[assembly: TypeForwardedTo(typeof(DbMetaDataColumnNames))]
[assembly: TypeForwardedTo(typeof(DbParameter))]
[assembly: TypeForwardedTo(typeof(DbParameterCollection))]
[assembly: TypeForwardedTo(typeof(DbProviderFactory))]
[assembly: TypeForwardedTo(typeof(DbProviderSpecificTypePropertyAttribute))]
[assembly: TypeForwardedTo(typeof(DbTransaction))]
[assembly: TypeForwardedTo(typeof(GroupByBehavior))]
[assembly: TypeForwardedTo(typeof(IDbColumnSchemaGenerator))]
[assembly: TypeForwardedTo(typeof(IdentifierCase))]
[assembly: TypeForwardedTo(typeof(RowUpdatedEventArgs))]
[assembly: TypeForwardedTo(typeof(RowUpdatingEventArgs))]
[assembly: TypeForwardedTo(typeof(SchemaTableColumn))]
[assembly: TypeForwardedTo(typeof(SchemaTableOptionalColumn))]
[assembly: TypeForwardedTo(typeof(SupportedJoinOperators))]
[assembly: TypeForwardedTo(typeof(ConflictOption))]
[assembly: TypeForwardedTo(typeof(ConnectionState))]
[assembly: TypeForwardedTo(typeof(Constraint))]
[assembly: TypeForwardedTo(typeof(ConstraintCollection))]
[assembly: TypeForwardedTo(typeof(ConstraintException))]
[assembly: TypeForwardedTo(typeof(DataColumn))]
[assembly: TypeForwardedTo(typeof(DataColumnChangeEventArgs))]
[assembly: TypeForwardedTo(typeof(DataColumnChangeEventHandler))]
[assembly: TypeForwardedTo(typeof(DataColumnCollection))]
[assembly: TypeForwardedTo(typeof(DataException))]
[assembly: TypeForwardedTo(typeof(DataRelation))]
[assembly: TypeForwardedTo(typeof(DataRelationCollection))]
[assembly: TypeForwardedTo(typeof(DataRow))]
[assembly: TypeForwardedTo(typeof(DataRowAction))]
[assembly: TypeForwardedTo(typeof(DataRowBuilder))]
[assembly: TypeForwardedTo(typeof(DataRowChangeEventArgs))]
[assembly: TypeForwardedTo(typeof(DataRowChangeEventHandler))]
[assembly: TypeForwardedTo(typeof(DataRowCollection))]
[assembly: TypeForwardedTo(typeof(DataRowState))]
[assembly: TypeForwardedTo(typeof(DataRowVersion))]
[assembly: TypeForwardedTo(typeof(DataRowView))]
[assembly: TypeForwardedTo(typeof(DataSet))]
[assembly: TypeForwardedTo(typeof(DataSetDateTime))]
[assembly: TypeForwardedTo(typeof(DataSysDescriptionAttribute))]
[assembly: TypeForwardedTo(typeof(DataTable))]
[assembly: TypeForwardedTo(typeof(DataTableClearEventArgs))]
[assembly: TypeForwardedTo(typeof(DataTableClearEventHandler))]
[assembly: TypeForwardedTo(typeof(DataTableCollection))]
[assembly: TypeForwardedTo(typeof(DataTableNewRowEventArgs))]
[assembly: TypeForwardedTo(typeof(DataTableNewRowEventHandler))]
[assembly: TypeForwardedTo(typeof(DataTableReader))]
[assembly: TypeForwardedTo(typeof(DataView))]
[assembly: TypeForwardedTo(typeof(DataViewManager))]
[assembly: TypeForwardedTo(typeof(DataViewRowState))]
[assembly: TypeForwardedTo(typeof(DataViewSetting))]
[assembly: TypeForwardedTo(typeof(DataViewSettingCollection))]
[assembly: TypeForwardedTo(typeof(DBConcurrencyException))]
[assembly: TypeForwardedTo(typeof(DbType))]
[assembly: TypeForwardedTo(typeof(DeletedRowInaccessibleException))]
[assembly: TypeForwardedTo(typeof(DuplicateNameException))]
[assembly: TypeForwardedTo(typeof(EvaluateException))]
[assembly: TypeForwardedTo(typeof(FillErrorEventArgs))]
[assembly: TypeForwardedTo(typeof(FillErrorEventHandler))]
[assembly: TypeForwardedTo(typeof(ForeignKeyConstraint))]
[assembly: TypeForwardedTo(typeof(IColumnMapping))]
[assembly: TypeForwardedTo(typeof(IColumnMappingCollection))]
[assembly: TypeForwardedTo(typeof(IDataAdapter))]
[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(IDbDataAdapter))]
[assembly: TypeForwardedTo(typeof(IDbDataParameter))]
[assembly: TypeForwardedTo(typeof(IDbTransaction))]
[assembly: TypeForwardedTo(typeof(InRowChangingEventException))]
[assembly: TypeForwardedTo(typeof(InternalDataCollectionBase))]
[assembly: TypeForwardedTo(typeof(InvalidConstraintException))]
[assembly: TypeForwardedTo(typeof(InvalidExpressionException))]
[assembly: TypeForwardedTo(typeof(System.Data.IsolationLevel))]
[assembly: TypeForwardedTo(typeof(ITableMapping))]
[assembly: TypeForwardedTo(typeof(ITableMappingCollection))]
[assembly: TypeForwardedTo(typeof(KeyRestrictionBehavior))]
[assembly: TypeForwardedTo(typeof(LoadOption))]
[assembly: TypeForwardedTo(typeof(MappingType))]
[assembly: TypeForwardedTo(typeof(MergeFailedEventArgs))]
[assembly: TypeForwardedTo(typeof(MergeFailedEventHandler))]
[assembly: TypeForwardedTo(typeof(MissingMappingAction))]
[assembly: TypeForwardedTo(typeof(MissingPrimaryKeyException))]
[assembly: TypeForwardedTo(typeof(MissingSchemaAction))]
[assembly: TypeForwardedTo(typeof(NoNullAllowedException))]
[assembly: TypeForwardedTo(typeof(ParameterDirection))]
[assembly: TypeForwardedTo(typeof(PropertyCollection))]
[assembly: TypeForwardedTo(typeof(ReadOnlyException))]
[assembly: TypeForwardedTo(typeof(RowNotInTableException))]
[assembly: TypeForwardedTo(typeof(Rule))]
[assembly: TypeForwardedTo(typeof(SchemaSerializationMode))]
[assembly: TypeForwardedTo(typeof(SchemaType))]
[assembly: TypeForwardedTo(typeof(SerializationFormat))]
[assembly: TypeForwardedTo(typeof(SqlDbType))]
[assembly: TypeForwardedTo(typeof(INullable))]
[assembly: TypeForwardedTo(typeof(SqlAlreadyFilledException))]
[assembly: TypeForwardedTo(typeof(SqlBinary))]
[assembly: TypeForwardedTo(typeof(SqlBoolean))]
[assembly: TypeForwardedTo(typeof(SqlByte))]
[assembly: TypeForwardedTo(typeof(SqlBytes))]
[assembly: TypeForwardedTo(typeof(SqlChars))]
[assembly: TypeForwardedTo(typeof(SqlCompareOptions))]
[assembly: TypeForwardedTo(typeof(SqlDateTime))]
[assembly: TypeForwardedTo(typeof(SqlDecimal))]
[assembly: TypeForwardedTo(typeof(SqlDouble))]
[assembly: TypeForwardedTo(typeof(SqlGuid))]
[assembly: TypeForwardedTo(typeof(SqlInt16))]
[assembly: TypeForwardedTo(typeof(SqlInt32))]
[assembly: TypeForwardedTo(typeof(SqlInt64))]
[assembly: TypeForwardedTo(typeof(SqlMoney))]
[assembly: TypeForwardedTo(typeof(SqlNotFilledException))]
[assembly: TypeForwardedTo(typeof(SqlNullValueException))]
[assembly: TypeForwardedTo(typeof(SqlSingle))]
[assembly: TypeForwardedTo(typeof(SqlString))]
[assembly: TypeForwardedTo(typeof(SqlTruncateException))]
[assembly: TypeForwardedTo(typeof(SqlTypeException))]
[assembly: TypeForwardedTo(typeof(SqlXml))]
[assembly: TypeForwardedTo(typeof(StorageState))]
[assembly: TypeForwardedTo(typeof(StateChangeEventArgs))]
[assembly: TypeForwardedTo(typeof(StateChangeEventHandler))]
[assembly: TypeForwardedTo(typeof(StatementCompletedEventArgs))]
[assembly: TypeForwardedTo(typeof(StatementCompletedEventHandler))]
[assembly: TypeForwardedTo(typeof(StatementType))]
[assembly: TypeForwardedTo(typeof(StrongTypingException))]
[assembly: TypeForwardedTo(typeof(SyntaxErrorException))]
[assembly: TypeForwardedTo(typeof(UniqueConstraint))]
[assembly: TypeForwardedTo(typeof(UpdateRowSource))]
[assembly: TypeForwardedTo(typeof(UpdateStatus))]
[assembly: TypeForwardedTo(typeof(VersionNotFoundException))]
[assembly: TypeForwardedTo(typeof(XmlReadMode))]
[assembly: TypeForwardedTo(typeof(XmlWriteMode))]
[assembly: TypeForwardedTo(typeof(DataMisalignedException))]
[assembly: TypeForwardedTo(typeof(DateTime))]
[assembly: TypeForwardedTo(typeof(DateTimeKind))]
[assembly: TypeForwardedTo(typeof(DateTimeOffset))]
[assembly: TypeForwardedTo(typeof(DayOfWeek))]
[assembly: TypeForwardedTo(typeof(DBNull))]
[assembly: TypeForwardedTo(typeof(decimal))]
[assembly: TypeForwardedTo(typeof(Delegate))]
[assembly: TypeForwardedTo(typeof(BooleanSwitch))]
[assembly: TypeForwardedTo(typeof(ExcludeFromCodeCoverageAttribute))]
[assembly: TypeForwardedTo(typeof(SuppressMessageAttribute))]
[assembly: TypeForwardedTo(typeof(ConditionalAttribute))]
[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(CorrelationManager))]
[assembly: TypeForwardedTo(typeof(DataReceivedEventArgs))]
[assembly: TypeForwardedTo(typeof(DataReceivedEventHandler))]
[assembly: TypeForwardedTo(typeof(Debug))]
[assembly: TypeForwardedTo(typeof(DebuggableAttribute))]
[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(DebuggerStepperBoundaryAttribute))]
[assembly: TypeForwardedTo(typeof(DebuggerStepThroughAttribute))]
[assembly: TypeForwardedTo(typeof(DebuggerTypeProxyAttribute))]
[assembly: TypeForwardedTo(typeof(DebuggerVisualizerAttribute))]
[assembly: TypeForwardedTo(typeof(DefaultTraceListener))]
[assembly: TypeForwardedTo(typeof(DelimitedListTraceListener))]
[assembly: TypeForwardedTo(typeof(EventTypeFilter))]
[assembly: TypeForwardedTo(typeof(FileVersionInfo))]
[assembly: TypeForwardedTo(typeof(MonitoringDescriptionAttribute))]
[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(ProcessWindowStyle))]
[assembly: TypeForwardedTo(typeof(SourceFilter))]
[assembly: TypeForwardedTo(typeof(SourceLevels))]
[assembly: TypeForwardedTo(typeof(SourceSwitch))]
[assembly: TypeForwardedTo(typeof(StackFrame))]
[assembly: TypeForwardedTo(typeof(StackFrameExtensions))]
[assembly: TypeForwardedTo(typeof(StackTrace))]
[assembly: TypeForwardedTo(typeof(Stopwatch))]
[assembly: TypeForwardedTo(typeof(Switch))]
[assembly: TypeForwardedTo(typeof(SwitchAttribute))]
[assembly: TypeForwardedTo(typeof(SwitchLevelAttribute))]
[assembly: TypeForwardedTo(typeof(ISymbolBinder))]
[assembly: TypeForwardedTo(typeof(ISymbolBinder1))]
[assembly: TypeForwardedTo(typeof(ISymbolDocument))]
[assembly: TypeForwardedTo(typeof(ISymbolDocumentWriter))]
[assembly: TypeForwardedTo(typeof(ISymbolMethod))]
[assembly: TypeForwardedTo(typeof(ISymbolNamespace))]
[assembly: TypeForwardedTo(typeof(ISymbolReader))]
[assembly: TypeForwardedTo(typeof(ISymbolScope))]
[assembly: TypeForwardedTo(typeof(ISymbolVariable))]
[assembly: TypeForwardedTo(typeof(ISymbolWriter))]
[assembly: TypeForwardedTo(typeof(SymAddressKind))]
[assembly: TypeForwardedTo(typeof(SymbolToken))]
[assembly: TypeForwardedTo(typeof(SymDocumentType))]
[assembly: TypeForwardedTo(typeof(SymLanguageType))]
[assembly: TypeForwardedTo(typeof(SymLanguageVendor))]
[assembly: TypeForwardedTo(typeof(TextWriterTraceListener))]
[assembly: TypeForwardedTo(typeof(ThreadPriorityLevel))]
[assembly: TypeForwardedTo(typeof(System.Diagnostics.ThreadState))]
[assembly: TypeForwardedTo(typeof(ThreadWaitReason))]
[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))]
[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))]
[assembly: TypeForwardedTo(typeof(DivideByZeroException))]
[assembly: TypeForwardedTo(typeof(DllNotFoundException))]
[assembly: TypeForwardedTo(typeof(double))]
[assembly: TypeForwardedTo(typeof(Color))]
[assembly: TypeForwardedTo(typeof(Point))]
[assembly: TypeForwardedTo(typeof(PointF))]
[assembly: TypeForwardedTo(typeof(Rectangle))]
[assembly: TypeForwardedTo(typeof(RectangleF))]
[assembly: TypeForwardedTo(typeof(Size))]
[assembly: TypeForwardedTo(typeof(SizeF))]
[assembly: TypeForwardedTo(typeof(DuplicateWaitObjectException))]
[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(EntryPointNotFoundException))]
[assembly: TypeForwardedTo(typeof(Enum))]
[assembly: TypeForwardedTo(typeof(Environment))]
[assembly: TypeForwardedTo(typeof(EnvironmentVariableTarget))]
[assembly: TypeForwardedTo(typeof(EventArgs))]
[assembly: TypeForwardedTo(typeof(EventHandler))]
[assembly: TypeForwardedTo(typeof(EventHandler<>))]
[assembly: TypeForwardedTo(typeof(Exception))]
[assembly: TypeForwardedTo(typeof(ExecutionEngineException))]
[assembly: TypeForwardedTo(typeof(FieldAccessException))]
[assembly: TypeForwardedTo(typeof(FileStyleUriParser))]
[assembly: TypeForwardedTo(typeof(FlagsAttribute))]
[assembly: TypeForwardedTo(typeof(FormatException))]
[assembly: TypeForwardedTo(typeof(FormattableString))]
[assembly: TypeForwardedTo(typeof(FtpStyleUriParser))]
[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(GCNotificationStatus))]
[assembly: TypeForwardedTo(typeof(GenericUriParser))]
[assembly: TypeForwardedTo(typeof(GenericUriParserOptions))]
[assembly: TypeForwardedTo(typeof(Calendar))]
[assembly: TypeForwardedTo(typeof(CalendarAlgorithmType))]
[assembly: TypeForwardedTo(typeof(CalendarWeekRule))]
[assembly: TypeForwardedTo(typeof(CharUnicodeInfo))]
[assembly: TypeForwardedTo(typeof(ChineseLunisolarCalendar))]
[assembly: TypeForwardedTo(typeof(CompareInfo))]
[assembly: TypeForwardedTo(typeof(CompareOptions))]
[assembly: TypeForwardedTo(typeof(CultureInfo))]
[assembly: TypeForwardedTo(typeof(CultureNotFoundException))]
[assembly: TypeForwardedTo(typeof(CultureTypes))]
[assembly: TypeForwardedTo(typeof(DateTimeFormatInfo))]
[assembly: TypeForwardedTo(typeof(DateTimeStyles))]
[assembly: TypeForwardedTo(typeof(DaylightTime))]
[assembly: TypeForwardedTo(typeof(DigitShapes))]
[assembly: TypeForwardedTo(typeof(EastAsianLunisolarCalendar))]
[assembly: TypeForwardedTo(typeof(GlobalizationExtensions))]
[assembly: TypeForwardedTo(typeof(GregorianCalendar))]
[assembly: TypeForwardedTo(typeof(GregorianCalendarTypes))]
[assembly: TypeForwardedTo(typeof(HebrewCalendar))]
[assembly: TypeForwardedTo(typeof(HijriCalendar))]
[assembly: TypeForwardedTo(typeof(IdnMapping))]
[assembly: TypeForwardedTo(typeof(JapaneseCalendar))]
[assembly: TypeForwardedTo(typeof(JapaneseLunisolarCalendar))]
[assembly: TypeForwardedTo(typeof(JulianCalendar))]
[assembly: TypeForwardedTo(typeof(KoreanCalendar))]
[assembly: TypeForwardedTo(typeof(KoreanLunisolarCalendar))]
[assembly: TypeForwardedTo(typeof(NumberFormatInfo))]
[assembly: TypeForwardedTo(typeof(NumberStyles))]
[assembly: TypeForwardedTo(typeof(PersianCalendar))]
[assembly: TypeForwardedTo(typeof(RegionInfo))]
[assembly: TypeForwardedTo(typeof(SortKey))]
[assembly: TypeForwardedTo(typeof(SortVersion))]
[assembly: TypeForwardedTo(typeof(StringInfo))]
[assembly: TypeForwardedTo(typeof(TaiwanCalendar))]
[assembly: TypeForwardedTo(typeof(TaiwanLunisolarCalendar))]
[assembly: TypeForwardedTo(typeof(TextElementEnumerator))]
[assembly: TypeForwardedTo(typeof(TextInfo))]
[assembly: TypeForwardedTo(typeof(ThaiBuddhistCalendar))]
[assembly: TypeForwardedTo(typeof(TimeSpanStyles))]
[assembly: TypeForwardedTo(typeof(UmAlQuraCalendar))]
[assembly: TypeForwardedTo(typeof(UnicodeCategory))]
[assembly: TypeForwardedTo(typeof(GopherStyleUriParser))]
[assembly: TypeForwardedTo(typeof(Guid))]
[assembly: TypeForwardedTo(typeof(HttpStyleUriParser))]
[assembly: TypeForwardedTo(typeof(IAsyncResult))]
[assembly: TypeForwardedTo(typeof(ICloneable))]
[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(InsufficientMemoryException))]
[assembly: TypeForwardedTo(typeof(short))]
[assembly: TypeForwardedTo(typeof(int))]
[assembly: TypeForwardedTo(typeof(long))]
[assembly: TypeForwardedTo(typeof(IntPtr))]
[assembly: TypeForwardedTo(typeof(InvalidCastException))]
[assembly: TypeForwardedTo(typeof(InvalidOperationException))]
[assembly: TypeForwardedTo(typeof(InvalidProgramException))]
[assembly: TypeForwardedTo(typeof(InvalidTimeZoneException))]
[assembly: TypeForwardedTo(typeof(BinaryReader))]
[assembly: TypeForwardedTo(typeof(BinaryWriter))]
[assembly: TypeForwardedTo(typeof(BufferedStream))]
[assembly: TypeForwardedTo(typeof(CompressionLevel))]
[assembly: TypeForwardedTo(typeof(CompressionMode))]
[assembly: TypeForwardedTo(typeof(DeflateStream))]
[assembly: TypeForwardedTo(typeof(GZipStream))]
[assembly: TypeForwardedTo(typeof(ZipArchive))]
[assembly: TypeForwardedTo(typeof(ZipArchiveEntry))]
[assembly: TypeForwardedTo(typeof(ZipArchiveMode))]
[assembly: TypeForwardedTo(typeof(ZipFile))]
[assembly: TypeForwardedTo(typeof(ZipFileExtensions))]
[assembly: TypeForwardedTo(typeof(Directory))]
[assembly: TypeForwardedTo(typeof(DirectoryInfo))]
[assembly: TypeForwardedTo(typeof(DirectoryNotFoundException))]
[assembly: TypeForwardedTo(typeof(DriveInfo))]
[assembly: TypeForwardedTo(typeof(DriveNotFoundException))]
[assembly: TypeForwardedTo(typeof(DriveType))]
[assembly: TypeForwardedTo(typeof(EndOfStreamException))]
[assembly: TypeForwardedTo(typeof(ErrorEventArgs))]
[assembly: TypeForwardedTo(typeof(ErrorEventHandler))]
[assembly: TypeForwardedTo(typeof(File))]
[assembly: TypeForwardedTo(typeof(FileAccess))]
[assembly: TypeForwardedTo(typeof(FileAttributes))]
[assembly: TypeForwardedTo(typeof(FileInfo))]
[assembly: TypeForwardedTo(typeof(FileLoadException))]
[assembly: TypeForwardedTo(typeof(FileMode))]
[assembly: TypeForwardedTo(typeof(FileNotFoundException))]
[assembly: TypeForwardedTo(typeof(FileOptions))]
[assembly: TypeForwardedTo(typeof(FileShare))]
[assembly: TypeForwardedTo(typeof(FileStream))]
[assembly: TypeForwardedTo(typeof(FileSystemEventArgs))]
[assembly: TypeForwardedTo(typeof(FileSystemEventHandler))]
[assembly: TypeForwardedTo(typeof(FileSystemInfo))]
[assembly: TypeForwardedTo(typeof(FileSystemWatcher))]
[assembly: TypeForwardedTo(typeof(HandleInheritability))]
[assembly: TypeForwardedTo(typeof(InternalBufferOverflowException))]
[assembly: TypeForwardedTo(typeof(InvalidDataException))]
[assembly: TypeForwardedTo(typeof(IOException))]
[assembly: TypeForwardedTo(typeof(INormalizeForIsolatedStorage))]
[assembly: TypeForwardedTo(typeof(IsolatedStorage))]
[assembly: TypeForwardedTo(typeof(IsolatedStorageException))]
[assembly: TypeForwardedTo(typeof(IsolatedStorageFile))]
[assembly: TypeForwardedTo(typeof(IsolatedStorageFileStream))]
[assembly: TypeForwardedTo(typeof(IsolatedStorageScope))]
[assembly: TypeForwardedTo(typeof(MemoryMappedFile))]
[assembly: TypeForwardedTo(typeof(MemoryMappedFileAccess))]
[assembly: TypeForwardedTo(typeof(MemoryMappedFileOptions))]
[assembly: TypeForwardedTo(typeof(MemoryMappedFileRights))]
[assembly: TypeForwardedTo(typeof(MemoryMappedViewAccessor))]
[assembly: TypeForwardedTo(typeof(MemoryMappedViewStream))]
[assembly: TypeForwardedTo(typeof(MemoryStream))]
[assembly: TypeForwardedTo(typeof(NotifyFilters))]
[assembly: TypeForwardedTo(typeof(Path))]
[assembly: TypeForwardedTo(typeof(PathTooLongException))]
[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(PipeStreamImpersonationWorker))]
[assembly: TypeForwardedTo(typeof(PipeTransmissionMode))]
[assembly: TypeForwardedTo(typeof(RenamedEventArgs))]
[assembly: TypeForwardedTo(typeof(RenamedEventHandler))]
[assembly: TypeForwardedTo(typeof(SearchOption))]
[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))]
[assembly: TypeForwardedTo(typeof(UnmanagedMemoryAccessor))]
[assembly: TypeForwardedTo(typeof(UnmanagedMemoryStream))]
[assembly: TypeForwardedTo(typeof(WaitForChangedResult))]
[assembly: TypeForwardedTo(typeof(WatcherChangeTypes))]
[assembly: TypeForwardedTo(typeof(IObservable<>))]
[assembly: TypeForwardedTo(typeof(IObserver<>))]
[assembly: TypeForwardedTo(typeof(IProgress<>))]
[assembly: TypeForwardedTo(typeof(IServiceProvider))]
[assembly: TypeForwardedTo(typeof(Lazy<>))]
[assembly: TypeForwardedTo(typeof(Lazy<, >))]
[assembly: TypeForwardedTo(typeof(LdapStyleUriParser))]
[assembly: TypeForwardedTo(typeof(Enumerable))]
[assembly: TypeForwardedTo(typeof(EnumerableExecutor))]
[assembly: TypeForwardedTo(typeof(EnumerableExecutor<>))]
[assembly: TypeForwardedTo(typeof(EnumerableQuery))]
[assembly: TypeForwardedTo(typeof(EnumerableQuery<>))]
[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(DynamicExpression))]
[assembly: TypeForwardedTo(typeof(DynamicExpressionVisitor))]
[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(IGrouping<, >))]
[assembly: TypeForwardedTo(typeof(ILookup<, >))]
[assembly: TypeForwardedTo(typeof(IOrderedEnumerable<>))]
[assembly: TypeForwardedTo(typeof(IOrderedQueryable))]
[assembly: TypeForwardedTo(typeof(IOrderedQueryable<>))]
[assembly: TypeForwardedTo(typeof(IQueryable))]
[assembly: TypeForwardedTo(typeof(IQueryable<>))]
[assembly: TypeForwardedTo(typeof(IQueryProvider))]
[assembly: TypeForwardedTo(typeof(Lookup<, >))]
[assembly: TypeForwardedTo(typeof(OrderedParallelQuery<>))]
[assembly: TypeForwardedTo(typeof(ParallelEnumerable))]
[assembly: TypeForwardedTo(typeof(ParallelExecutionMode))]
[assembly: TypeForwardedTo(typeof(ParallelMergeOptions))]
[assembly: TypeForwardedTo(typeof(ParallelQuery))]
[assembly: TypeForwardedTo(typeof(ParallelQuery<>))]
[assembly: TypeForwardedTo(typeof(Queryable))]
[assembly: TypeForwardedTo(typeof(LoaderOptimization))]
[assembly: TypeForwardedTo(typeof(LoaderOptimizationAttribute))]
[assembly: TypeForwardedTo(typeof(LocalDataStoreSlot))]
[assembly: TypeForwardedTo(typeof(MarshalByRefObject))]
[assembly: TypeForwardedTo(typeof(Math))]
[assembly: TypeForwardedTo(typeof(MemberAccessException))]
[assembly: TypeForwardedTo(typeof(MethodAccessException))]
[assembly: TypeForwardedTo(typeof(MidpointRounding))]
[assembly: TypeForwardedTo(typeof(MissingFieldException))]
[assembly: TypeForwardedTo(typeof(MissingMemberException))]
[assembly: TypeForwardedTo(typeof(MissingMethodException))]
[assembly: TypeForwardedTo(typeof(ModuleHandle))]
[assembly: TypeForwardedTo(typeof(MTAThreadAttribute))]
[assembly: TypeForwardedTo(typeof(MulticastDelegate))]
[assembly: TypeForwardedTo(typeof(MulticastNotSupportedException))]
[assembly: TypeForwardedTo(typeof(AuthenticationManager))]
[assembly: TypeForwardedTo(typeof(AuthenticationSchemes))]
[assembly: TypeForwardedTo(typeof(AuthenticationSchemeSelector))]
[assembly: TypeForwardedTo(typeof(Authorization))]
[assembly: TypeForwardedTo(typeof(BindIPEndPoint))]
[assembly: TypeForwardedTo(typeof(HttpCacheAgeControl))]
[assembly: TypeForwardedTo(typeof(HttpRequestCacheLevel))]
[assembly: TypeForwardedTo(typeof(HttpRequestCachePolicy))]
[assembly: TypeForwardedTo(typeof(RequestCacheLevel))]
[assembly: TypeForwardedTo(typeof(RequestCachePolicy))]
[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(Dns))]
[assembly: TypeForwardedTo(typeof(DnsEndPoint))]
[assembly: TypeForwardedTo(typeof(DownloadDataCompletedEventArgs))]
[assembly: TypeForwardedTo(typeof(DownloadDataCompletedEventHandler))]
[assembly: TypeForwardedTo(typeof(DownloadProgressChangedEventArgs))]
[assembly: TypeForwardedTo(typeof(DownloadProgressChangedEventHandler))]
[assembly: TypeForwardedTo(typeof(DownloadStringCompletedEventArgs))]
[assembly: TypeForwardedTo(typeof(DownloadStringCompletedEventHandler))]
[assembly: TypeForwardedTo(typeof(EndPoint))]
[assembly: TypeForwardedTo(typeof(FileWebRequest))]
[assembly: TypeForwardedTo(typeof(FileWebResponse))]
[assembly: TypeForwardedTo(typeof(FtpStatusCode))]
[assembly: TypeForwardedTo(typeof(FtpWebRequest))]
[assembly: TypeForwardedTo(typeof(FtpWebResponse))]
[assembly: TypeForwardedTo(typeof(GlobalProxySelection))]
[assembly: TypeForwardedTo(typeof(ByteArrayContent))]
[assembly: TypeForwardedTo(typeof(ClientCertificateOption))]
[assembly: TypeForwardedTo(typeof(DelegatingHandler))]
[assembly: TypeForwardedTo(typeof(FormUrlEncodedContent))]
[assembly: TypeForwardedTo(typeof(AuthenticationHeaderValue))]
[assembly: TypeForwardedTo(typeof(CacheControlHeaderValue))]
[assembly: TypeForwardedTo(typeof(ContentDispositionHeaderValue))]
[assembly: TypeForwardedTo(typeof(ContentRangeHeaderValue))]
[assembly: TypeForwardedTo(typeof(EntityTagHeaderValue))]
[assembly: TypeForwardedTo(typeof(HttpContentHeaders))]
[assembly: TypeForwardedTo(typeof(HttpHeaders))]
[assembly: TypeForwardedTo(typeof(HttpHeaderValueCollection<>))]
[assembly: TypeForwardedTo(typeof(HttpRequestHeaders))]
[assembly: TypeForwardedTo(typeof(HttpResponseHeaders))]
[assembly: TypeForwardedTo(typeof(MediaTypeHeaderValue))]
[assembly: TypeForwardedTo(typeof(MediaTypeWithQualityHeaderValue))]
[assembly: TypeForwardedTo(typeof(NameValueHeaderValue))]
[assembly: TypeForwardedTo(typeof(NameValueWithParametersHeaderValue))]
[assembly: TypeForwardedTo(typeof(ProductHeaderValue))]
[assembly: TypeForwardedTo(typeof(ProductInfoHeaderValue))]
[assembly: TypeForwardedTo(typeof(RangeConditionHeaderValue))]
[assembly: TypeForwardedTo(typeof(RangeHeaderValue))]
[assembly: TypeForwardedTo(typeof(RangeItemHeaderValue))]
[assembly: TypeForwardedTo(typeof(RetryConditionHeaderValue))]
[assembly: TypeForwardedTo(typeof(StringWithQualityHeaderValue))]
[assembly: TypeForwardedTo(typeof(TransferCodingHeaderValue))]
[assembly: TypeForwardedTo(typeof(TransferCodingWithQualityHeaderValue))]
[assembly: TypeForwardedTo(typeof(ViaHeaderValue))]
[assembly: TypeForwardedTo(typeof(WarningHeaderValue))]
[assembly: TypeForwardedTo(typeof(HttpClient))]
[assembly: TypeForwardedTo(typeof(HttpClientHandler))]
[assembly: TypeForwardedTo(typeof(HttpCompletionOption))]
[assembly: TypeForwardedTo(typeof(HttpContent))]
[assembly: TypeForwardedTo(typeof(HttpMessageHandler))]
[assembly: TypeForwardedTo(typeof(HttpMessageInvoker))]
[assembly: TypeForwardedTo(typeof(HttpMethod))]
[assembly: TypeForwardedTo(typeof(HttpRequestException))]
[assembly: TypeForwardedTo(typeof(HttpRequestMessage))]
[assembly: TypeForwardedTo(typeof(HttpResponseMessage))]
[assembly: TypeForwardedTo(typeof(MessageProcessingHandler))]
[assembly: TypeForwardedTo(typeof(MultipartContent))]
[assembly: TypeForwardedTo(typeof(MultipartFormDataContent))]
[assembly: TypeForwardedTo(typeof(StreamContent))]
[assembly: TypeForwardedTo(typeof(StringContent))]
[assembly: TypeForwardedTo(typeof(HttpContinueDelegate))]
[assembly: TypeForwardedTo(typeof(HttpListener))]
[assembly: TypeForwardedTo(typeof(HttpListenerBasicIdentity))]
[assembly: TypeForwardedTo(typeof(HttpListenerContext))]
[assembly: TypeForwardedTo(typeof(HttpListenerException))]
[assembly: TypeForwardedTo(typeof(HttpListenerPrefixCollection))]
[assembly: TypeForwardedTo(typeof(HttpListenerRequest))]
[assembly: TypeForwardedTo(typeof(HttpListenerResponse))]
[assembly: TypeForwardedTo(typeof(HttpListenerTimeoutManager))]
[assembly: TypeForwardedTo(typeof(HttpRequestHeader))]
[assembly: TypeForwardedTo(typeof(HttpResponseHeader))]
[assembly: TypeForwardedTo(typeof(HttpStatusCode))]
[assembly: TypeForwardedTo(typeof(HttpVersion))]
[assembly: TypeForwardedTo(typeof(HttpWebRequest))]
[assembly: TypeForwardedTo(typeof(HttpWebResponse))]
[assembly: TypeForwardedTo(typeof(IAuthenticationModule))]
[assembly: TypeForwardedTo(typeof(ICredentialPolicy))]
[assembly: TypeForwardedTo(typeof(ICredentials))]
[assembly: TypeForwardedTo(typeof(ICredentialsByHost))]
[assembly: TypeForwardedTo(typeof(IPAddress))]
[assembly: TypeForwardedTo(typeof(IPEndPoint))]
[assembly: TypeForwardedTo(typeof(IPHostEntry))]
[assembly: TypeForwardedTo(typeof(IWebProxy))]
[assembly: TypeForwardedTo(typeof(IWebProxyScript))]
[assembly: TypeForwardedTo(typeof(IWebRequestCreate))]
[assembly: TypeForwardedTo(typeof(AlternateView))]
[assembly: TypeForwardedTo(typeof(AlternateViewCollection))]
[assembly: TypeForwardedTo(typeof(Attachment))]
[assembly: TypeForwardedTo(typeof(AttachmentBase))]
[assembly: TypeForwardedTo(typeof(AttachmentCollection))]
[assembly: TypeForwardedTo(typeof(DeliveryNotificationOptions))]
[assembly: TypeForwardedTo(typeof(LinkedResource))]
[assembly: TypeForwardedTo(typeof(LinkedResourceCollection))]
[assembly: TypeForwardedTo(typeof(MailAddress))]
[assembly: TypeForwardedTo(typeof(MailAddressCollection))]
[assembly: TypeForwardedTo(typeof(MailMessage))]
[assembly: TypeForwardedTo(typeof(MailPriority))]
[assembly: TypeForwardedTo(typeof(SendCompletedEventHandler))]
[assembly: TypeForwardedTo(typeof(SmtpClient))]
[assembly: TypeForwardedTo(typeof(SmtpDeliveryFormat))]
[assembly: TypeForwardedTo(typeof(SmtpDeliveryMethod))]
[assembly: TypeForwardedTo(typeof(SmtpException))]
[assembly: TypeForwardedTo(typeof(SmtpFailedRecipientException))]
[assembly: TypeForwardedTo(typeof(SmtpFailedRecipientsException))]
[assembly: TypeForwardedTo(typeof(SmtpStatusCode))]
[assembly: TypeForwardedTo(typeof(ContentDisposition))]
[assembly: TypeForwardedTo(typeof(ContentType))]
[assembly: TypeForwardedTo(typeof(DispositionTypeNames))]
[assembly: TypeForwardedTo(typeof(MediaTypeNames))]
[assembly: TypeForwardedTo(typeof(TransferEncoding))]
[assembly: TypeForwardedTo(typeof(NetworkCredential))]
[assembly: TypeForwardedTo(typeof(DuplicateAddressDetectionState))]
[assembly: TypeForwardedTo(typeof(GatewayIPAddressInformation))]
[assembly: TypeForwardedTo(typeof(GatewayIPAddressInformationCollection))]
[assembly: TypeForwardedTo(typeof(IcmpV4Statistics))]
[assembly: TypeForwardedTo(typeof(IcmpV6Statistics))]
[assembly: TypeForwardedTo(typeof(IPAddressCollection))]
[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(IPStatus))]
[assembly: TypeForwardedTo(typeof(IPv4InterfaceProperties))]
[assembly: TypeForwardedTo(typeof(IPv4InterfaceStatistics))]
[assembly: TypeForwardedTo(typeof(IPv6InterfaceProperties))]
[assembly: TypeForwardedTo(typeof(MulticastIPAddressInformation))]
[assembly: TypeForwardedTo(typeof(MulticastIPAddressInformationCollection))]
[assembly: TypeForwardedTo(typeof(NetBiosNodeType))]
[assembly: TypeForwardedTo(typeof(NetworkAddressChangedEventHandler))]
[assembly: TypeForwardedTo(typeof(NetworkAvailabilityChangedEventHandler))]
[assembly: TypeForwardedTo(typeof(NetworkAvailabilityEventArgs))]
[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(Ping))]
[assembly: TypeForwardedTo(typeof(PingCompletedEventArgs))]
[assembly: TypeForwardedTo(typeof(PingCompletedEventHandler))]
[assembly: TypeForwardedTo(typeof(PingException))]
[assembly: TypeForwardedTo(typeof(PingOptions))]
[assembly: TypeForwardedTo(typeof(PingReply))]
[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))]
[assembly: TypeForwardedTo(typeof(OpenReadCompletedEventArgs))]
[assembly: TypeForwardedTo(typeof(OpenReadCompletedEventHandler))]
[assembly: TypeForwardedTo(typeof(OpenWriteCompletedEventArgs))]
[assembly: TypeForwardedTo(typeof(OpenWriteCompletedEventHandler))]
[assembly: TypeForwardedTo(typeof(ProtocolViolationException))]
[assembly: TypeForwardedTo(typeof(AuthenticatedStream))]
[assembly: TypeForwardedTo(typeof(AuthenticationLevel))]
[assembly: TypeForwardedTo(typeof(EncryptionPolicy))]
[assembly: TypeForwardedTo(typeof(LocalCertificateSelectionCallback))]
[assembly: TypeForwardedTo(typeof(NegotiateStream))]
[assembly: TypeForwardedTo(typeof(ProtectionLevel))]
[assembly: TypeForwardedTo(typeof(RemoteCertificateValidationCallback))]
[assembly: TypeForwardedTo(typeof(SslPolicyErrors))]
[assembly: TypeForwardedTo(typeof(SslStream))]
[assembly: TypeForwardedTo(typeof(SecurityProtocolType))]
[assembly: TypeForwardedTo(typeof(ServicePoint))]
[assembly: TypeForwardedTo(typeof(ServicePointManager))]
[assembly: TypeForwardedTo(typeof(SocketAddress))]
[assembly: TypeForwardedTo(typeof(AddressFamily))]
[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(ProtocolFamily))]
[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(SocketError))]
[assembly: TypeForwardedTo(typeof(SocketException))]
[assembly: TypeForwardedTo(typeof(SocketFlags))]
[assembly: TypeForwardedTo(typeof(SocketInformation))]
[assembly: TypeForwardedTo(typeof(SocketInformationOptions))]
[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(TransmitFileOptions))]
[assembly: TypeForwardedTo(typeof(UdpClient))]
[assembly: TypeForwardedTo(typeof(UdpReceiveResult))]
[assembly: TypeForwardedTo(typeof(TransportContext))]
[assembly: TypeForwardedTo(typeof(UploadDataCompletedEventArgs))]
[assembly: TypeForwardedTo(typeof(UploadDataCompletedEventHandler))]
[assembly: TypeForwardedTo(typeof(UploadFileCompletedEventArgs))]
[assembly: TypeForwardedTo(typeof(UploadFileCompletedEventHandler))]
[assembly: TypeForwardedTo(typeof(UploadProgressChangedEventArgs))]
[assembly: TypeForwardedTo(typeof(UploadProgressChangedEventHandler))]
[assembly: TypeForwardedTo(typeof(UploadStringCompletedEventArgs))]
[assembly: TypeForwardedTo(typeof(UploadStringCompletedEventHandler))]
[assembly: TypeForwardedTo(typeof(UploadValuesCompletedEventArgs))]
[assembly: TypeForwardedTo(typeof(UploadValuesCompletedEventHandler))]
[assembly: TypeForwardedTo(typeof(WebClient))]
[assembly: TypeForwardedTo(typeof(WebException))]
[assembly: TypeForwardedTo(typeof(WebExceptionStatus))]
[assembly: TypeForwardedTo(typeof(WebHeaderCollection))]
[assembly: TypeForwardedTo(typeof(WebProxy))]
[assembly: TypeForwardedTo(typeof(WebRequest))]
[assembly: TypeForwardedTo(typeof(WebRequestMethods))]
[assembly: TypeForwardedTo(typeof(WebResponse))]
[assembly: TypeForwardedTo(typeof(ClientWebSocket))]
[assembly: TypeForwardedTo(typeof(ClientWebSocketOptions))]
[assembly: TypeForwardedTo(typeof(HttpListenerWebSocketContext))]
[assembly: TypeForwardedTo(typeof(WebSocket))]
[assembly: TypeForwardedTo(typeof(WebSocketCloseStatus))]
[assembly: TypeForwardedTo(typeof(WebSocketContext))]
[assembly: TypeForwardedTo(typeof(WebSocketError))]
[assembly: TypeForwardedTo(typeof(WebSocketException))]
[assembly: TypeForwardedTo(typeof(WebSocketMessageType))]
[assembly: TypeForwardedTo(typeof(WebSocketReceiveResult))]
[assembly: TypeForwardedTo(typeof(WebSocketState))]
[assembly: TypeForwardedTo(typeof(WebUtility))]
[assembly: TypeForwardedTo(typeof(NetPipeStyleUriParser))]
[assembly: TypeForwardedTo(typeof(NetTcpStyleUriParser))]
[assembly: TypeForwardedTo(typeof(NewsStyleUriParser))]
[assembly: TypeForwardedTo(typeof(NonSerializedAttribute))]
[assembly: TypeForwardedTo(typeof(NotFiniteNumberException))]
[assembly: TypeForwardedTo(typeof(NotImplementedException))]
[assembly: TypeForwardedTo(typeof(NotSupportedException))]
[assembly: TypeForwardedTo(typeof(Nullable))]
[assembly: TypeForwardedTo(typeof(Nullable<>))]
[assembly: TypeForwardedTo(typeof(NullReferenceException))]
[assembly: TypeForwardedTo(typeof(BigInteger))]
[assembly: TypeForwardedTo(typeof(Complex))]
[assembly: TypeForwardedTo(typeof(object))]
[assembly: TypeForwardedTo(typeof(ObjectDisposedException))]
[assembly: TypeForwardedTo(typeof(ObsoleteAttribute))]
[assembly: TypeForwardedTo(typeof(OperatingSystem))]
[assembly: TypeForwardedTo(typeof(OperationCanceledException))]
[assembly: TypeForwardedTo(typeof(OutOfMemoryException))]
[assembly: TypeForwardedTo(typeof(OverflowException))]
[assembly: TypeForwardedTo(typeof(ParamArrayAttribute))]
[assembly: TypeForwardedTo(typeof(PlatformID))]
[assembly: TypeForwardedTo(typeof(PlatformNotSupportedException))]
[assembly: TypeForwardedTo(typeof(Predicate<>))]
[assembly: TypeForwardedTo(typeof(Progress<>))]
[assembly: TypeForwardedTo(typeof(Random))]
[assembly: TypeForwardedTo(typeof(RankException))]
[assembly: TypeForwardedTo(typeof(AmbiguousMatchException))]
[assembly: TypeForwardedTo(typeof(Assembly))]
[assembly: TypeForwardedTo(typeof(AssemblyAlgorithmIdAttribute))]
[assembly: TypeForwardedTo(typeof(AssemblyCompanyAttribute))]
[assembly: TypeForwardedTo(typeof(AssemblyConfigurationAttribute))]
[assembly: TypeForwardedTo(typeof(AssemblyContentType))]
[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(AssemblyName))]
[assembly: TypeForwardedTo(typeof(AssemblyNameFlags))]
[assembly: TypeForwardedTo(typeof(AssemblyNameProxy))]
[assembly: TypeForwardedTo(typeof(AssemblyProductAttribute))]
[assembly: TypeForwardedTo(typeof(AssemblySignatureKeyAttribute))]
[assembly: TypeForwardedTo(typeof(AssemblyTitleAttribute))]
[assembly: TypeForwardedTo(typeof(AssemblyTrademarkAttribute))]
[assembly: TypeForwardedTo(typeof(AssemblyVersionAttribute))]
[assembly: TypeForwardedTo(typeof(Binder))]
[assembly: TypeForwardedTo(typeof(BindingFlags))]
[assembly: TypeForwardedTo(typeof(CallingConventions))]
[assembly: TypeForwardedTo(typeof(ConstructorInfo))]
[assembly: TypeForwardedTo(typeof(CustomAttributeData))]
[assembly: TypeForwardedTo(typeof(CustomAttributeExtensions))]
[assembly: TypeForwardedTo(typeof(CustomAttributeFormatException))]
[assembly: TypeForwardedTo(typeof(CustomAttributeNamedArgument))]
[assembly: TypeForwardedTo(typeof(CustomAttributeTypedArgument))]
[assembly: TypeForwardedTo(typeof(DefaultMemberAttribute))]
[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(EventInfo))]
[assembly: TypeForwardedTo(typeof(ExceptionHandlingClause))]
[assembly: TypeForwardedTo(typeof(ExceptionHandlingClauseOptions))]
[assembly: TypeForwardedTo(typeof(FieldAttributes))]
[assembly: TypeForwardedTo(typeof(FieldInfo))]
[assembly: TypeForwardedTo(typeof(GenericParameterAttributes))]
[assembly: TypeForwardedTo(typeof(ICustomAttributeProvider))]
[assembly: TypeForwardedTo(typeof(ImageFileMachine))]
[assembly: TypeForwardedTo(typeof(InterfaceMapping))]
[assembly: TypeForwardedTo(typeof(IntrospectionExtensions))]
[assembly: TypeForwardedTo(typeof(InvalidFilterCriteriaException))]
[assembly: TypeForwardedTo(typeof(IReflect))]
[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(MethodAttributes))]
[assembly: TypeForwardedTo(typeof(MethodBase))]
[assembly: TypeForwardedTo(typeof(MethodBody))]
[assembly: TypeForwardedTo(typeof(MethodImplAttributes))]
[assembly: TypeForwardedTo(typeof(MethodInfo))]
[assembly: TypeForwardedTo(typeof(Missing))]
[assembly: TypeForwardedTo(typeof(Module))]
[assembly: TypeForwardedTo(typeof(ModuleResolveEventHandler))]
[assembly: TypeForwardedTo(typeof(ObfuscateAssemblyAttribute))]
[assembly: TypeForwardedTo(typeof(ObfuscationAttribute))]
[assembly: TypeForwardedTo(typeof(ParameterAttributes))]
[assembly: TypeForwardedTo(typeof(ParameterInfo))]
[assembly: TypeForwardedTo(typeof(ParameterModifier))]
[assembly: TypeForwardedTo(typeof(Pointer))]
[assembly: TypeForwardedTo(typeof(PortableExecutableKinds))]
[assembly: TypeForwardedTo(typeof(ProcessorArchitecture))]
[assembly: TypeForwardedTo(typeof(PropertyAttributes))]
[assembly: TypeForwardedTo(typeof(PropertyInfo))]
[assembly: TypeForwardedTo(typeof(ReflectionContext))]
[assembly: TypeForwardedTo(typeof(ReflectionTypeLoadException))]
[assembly: TypeForwardedTo(typeof(ResourceAttributes))]
[assembly: TypeForwardedTo(typeof(ResourceLocation))]
[assembly: TypeForwardedTo(typeof(RuntimeReflectionExtensions))]
[assembly: TypeForwardedTo(typeof(StrongNameKeyPair))]
[assembly: TypeForwardedTo(typeof(TargetException))]
[assembly: TypeForwardedTo(typeof(TargetInvocationException))]
[assembly: TypeForwardedTo(typeof(TargetParameterCountException))]
[assembly: TypeForwardedTo(typeof(TypeAttributes))]
[assembly: TypeForwardedTo(typeof(TypeDelegator))]
[assembly: TypeForwardedTo(typeof(TypeFilter))]
[assembly: TypeForwardedTo(typeof(TypeInfo))]
[assembly: TypeForwardedTo(typeof(ResolveEventArgs))]
[assembly: TypeForwardedTo(typeof(ResolveEventHandler))]
[assembly: TypeForwardedTo(typeof(IResourceReader))]
[assembly: TypeForwardedTo(typeof(IResourceWriter))]
[assembly: TypeForwardedTo(typeof(MissingManifestResourceException))]
[assembly: TypeForwardedTo(typeof(MissingSatelliteAssemblyException))]
[assembly: TypeForwardedTo(typeof(NeutralResourcesLanguageAttribute))]
[assembly: TypeForwardedTo(typeof(ResourceManager))]
[assembly: TypeForwardedTo(typeof(ResourceReader))]
[assembly: TypeForwardedTo(typeof(ResourceSet))]
[assembly: TypeForwardedTo(typeof(ResourceWriter))]
[assembly: TypeForwardedTo(typeof(SatelliteContractVersionAttribute))]
[assembly: TypeForwardedTo(typeof(UltimateResourceFallbackLocation))]
[assembly: TypeForwardedTo(typeof(AssemblyTargetedPatchBandAttribute))]
[assembly: TypeForwardedTo(typeof(AccessedThroughPropertyAttribute))]
[assembly: TypeForwardedTo(typeof(AsyncStateMachineAttribute))]
[assembly: TypeForwardedTo(typeof(AsyncTaskMethodBuilder))]
[assembly: TypeForwardedTo(typeof(AsyncTaskMethodBuilder<>))]
[assembly: TypeForwardedTo(typeof(AsyncVoidMethodBuilder))]
[assembly: TypeForwardedTo(typeof(CallConvCdecl))]
[assembly: TypeForwardedTo(typeof(CallConvFastcall))]
[assembly: TypeForwardedTo(typeof(CallConvStdcall))]
[assembly: TypeForwardedTo(typeof(CallConvThiscall))]
[assembly: TypeForwardedTo(typeof(CallerFilePathAttribute))]
[assembly: TypeForwardedTo(typeof(CallerLineNumberAttribute))]
[assembly: TypeForwardedTo(typeof(CallerMemberNameAttribute))]
[assembly: TypeForwardedTo(typeof(CallSite))]
[assembly: TypeForwardedTo(typeof(CallSite<>))]
[assembly: TypeForwardedTo(typeof(CallSiteBinder))]
[assembly: TypeForwardedTo(typeof(CallSiteHelpers))]
[assembly: TypeForwardedTo(typeof(CompilationRelaxations))]
[assembly: TypeForwardedTo(typeof(CompilationRelaxationsAttribute))]
[assembly: TypeForwardedTo(typeof(CompilerGeneratedAttribute))]
[assembly: TypeForwardedTo(typeof(CompilerGlobalScopeAttribute))]
[assembly: TypeForwardedTo(typeof(CompilerMarshalOverride))]
[assembly: TypeForwardedTo(typeof(ConditionalWeakTable<, >))]
[assembly: TypeForwardedTo(typeof(ConfiguredTaskAwaitable))]
[assembly: TypeForwardedTo(typeof(ConfiguredTaskAwaitable<>))]
[assembly: TypeForwardedTo(typeof(ContractHelper))]
[assembly: TypeForwardedTo(typeof(CustomConstantAttribute))]
[assembly: TypeForwardedTo(typeof(DateTimeConstantAttribute))]
[assembly: TypeForwardedTo(typeof(DebugInfoGenerator))]
[assembly: TypeForwardedTo(typeof(DecimalConstantAttribute))]
[assembly: TypeForwardedTo(typeof(DefaultDependencyAttribute))]
[assembly: TypeForwardedTo(typeof(DependencyAttribute))]
[assembly: TypeForwardedTo(typeof(DisablePrivateReflectionAttribute))]
[assembly: TypeForwardedTo(typeof(DiscardableAttribute))]
[assembly: TypeForwardedTo(typeof(DynamicAttribute))]
[assembly: TypeForwardedTo(typeof(ExtensionAttribute))]
[assembly: TypeForwardedTo(typeof(FixedAddressValueTypeAttribute))]
[assembly: TypeForwardedTo(typeof(FixedBufferAttribute))]
[assembly: TypeForwardedTo(typeof(FormattableStringFactory))]
[assembly: TypeForwardedTo(typeof(HasCopySemanticsAttribute))]
[assembly: TypeForwardedTo(typeof(IAsyncStateMachine))]
[assembly: TypeForwardedTo(typeof(ICriticalNotifyCompletion))]
[assembly: TypeForwardedTo(typeof(IndexerNameAttribute))]
[assembly: TypeForwardedTo(typeof(INotifyCompletion))]
[assembly: TypeForwardedTo(typeof(InternalsVisibleToAttribute))]
[assembly: TypeForwardedTo(typeof(IRuntimeVariables))]
[assembly: TypeForwardedTo(typeof(IsBoxed))]
[assembly: TypeForwardedTo(typeof(IsByValue))]
[assembly: TypeForwardedTo(typeof(IsConst))]
[assembly: TypeForwardedTo(typeof(IsCopyConstructed))]
[assembly: TypeForwardedTo(typeof(IsExplicitlyDereferenced))]
[assembly: TypeForwardedTo(typeof(IsImplicitlyDereferenced))]
[assembly: TypeForwardedTo(typeof(IsJitIntrinsic))]
[assembly: TypeForwardedTo(typeof(IsLong))]
[assembly: TypeForwardedTo(typeof(IsPinned))]
[assembly: TypeForwardedTo(typeof(IsSignUnspecifiedByte))]
[assembly: TypeForwardedTo(typeof(IStrongBox))]
[assembly: TypeForwardedTo(typeof(IsUdtReturn))]
[assembly: TypeForwardedTo(typeof(IsVolatile))]
[assembly: TypeForwardedTo(typeof(IteratorStateMachineAttribute))]
[assembly: TypeForwardedTo(typeof(IUnknownConstantAttribute))]
[assembly: TypeForwardedTo(typeof(LoadHint))]
[assembly: TypeForwardedTo(typeof(MethodCodeType))]
[assembly: TypeForwardedTo(typeof(MethodImplAttribute))]
[assembly: TypeForwardedTo(typeof(MethodImplOptions))]
[assembly: TypeForwardedTo(typeof(NativeCppClassAttribute))]
[assembly: TypeForwardedTo(typeof(ReadOnlyCollectionBuilder<>))]
[assembly: TypeForwardedTo(typeof(ReferenceAssemblyAttribute))]
[assembly: TypeForwardedTo(typeof(RequiredAttributeAttribute))]
[assembly: TypeForwardedTo(typeof(RuleCache<>))]
[assembly: TypeForwardedTo(typeof(RuntimeCompatibilityAttribute))]
[assembly: TypeForwardedTo(typeof(RuntimeHelpers))]
[assembly: TypeForwardedTo(typeof(RuntimeWrappedException))]
[assembly: TypeForwardedTo(typeof(ScopelessEnumAttribute))]
[assembly: TypeForwardedTo(typeof(SpecialNameAttribute))]
[assembly: TypeForwardedTo(typeof(StateMachineAttribute))]
[assembly: TypeForwardedTo(typeof(StringFreezingAttribute))]
[assembly: TypeForwardedTo(typeof(StrongBox<>))]
[assembly: TypeForwardedTo(typeof(SuppressIldasmAttribute))]
[assembly: TypeForwardedTo(typeof(TaskAwaiter))]
[assembly: TypeForwardedTo(typeof(TaskAwaiter<>))]
[assembly: TypeForwardedTo(typeof(TupleElementNamesAttribute))]
[assembly: TypeForwardedTo(typeof(TypeForwardedFromAttribute))]
[assembly: TypeForwardedTo(typeof(TypeForwardedToAttribute))]
[assembly: TypeForwardedTo(typeof(UnsafeValueTypeAttribute))]
[assembly: TypeForwardedTo(typeof(YieldAwaitable))]
[assembly: TypeForwardedTo(typeof(Cer))]
[assembly: TypeForwardedTo(typeof(Consistency))]
[assembly: TypeForwardedTo(typeof(CriticalFinalizerObject))]
[assembly: TypeForwardedTo(typeof(PrePrepareMethodAttribute))]
[assembly: TypeForwardedTo(typeof(ReliabilityContractAttribute))]
[assembly: TypeForwardedTo(typeof(ExceptionDispatchInfo))]
[assembly: TypeForwardedTo(typeof(FirstChanceExceptionEventArgs))]
[assembly: TypeForwardedTo(typeof(HandleProcessCorruptedStateExceptionsAttribute))]
[assembly: TypeForwardedTo(typeof(GCLargeObjectHeapCompactionMode))]
[assembly: TypeForwardedTo(typeof(GCLatencyMode))]
[assembly: TypeForwardedTo(typeof(GCSettings))]
[assembly: TypeForwardedTo(typeof(AllowReversePInvokeCallsAttribute))]
[assembly: TypeForwardedTo(typeof(Architecture))]
[assembly: TypeForwardedTo(typeof(ArrayWithOffset))]
[assembly: TypeForwardedTo(typeof(BestFitMappingAttribute))]
[assembly: TypeForwardedTo(typeof(BStrWrapper))]
[assembly: TypeForwardedTo(typeof(CallingConvention))]
[assembly: TypeForwardedTo(typeof(CharSet))]
[assembly: TypeForwardedTo(typeof(ClassInterfaceAttribute))]
[assembly: TypeForwardedTo(typeof(ClassInterfaceType))]
[assembly: TypeForwardedTo(typeof(CoClassAttribute))]
[assembly: TypeForwardedTo(typeof(ComAliasNameAttribute))]
[assembly: TypeForwardedTo(typeof(ComAwareEventInfo))]
[assembly: TypeForwardedTo(typeof(ComCompatibleVersionAttribute))]
[assembly: TypeForwardedTo(typeof(ComConversionLossAttribute))]
[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(ComRegisterFunctionAttribute))]
[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(IDataObject))]
[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(IEnumSTATDATA))]
[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(ComUnregisterFunctionAttribute))]
[assembly: TypeForwardedTo(typeof(ComVisibleAttribute))]
[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(ExternalException))]
[assembly: TypeForwardedTo(typeof(FieldOffsetAttribute))]
[assembly: TypeForwardedTo(typeof(GCHandle))]
[assembly: TypeForwardedTo(typeof(GCHandleType))]
[assembly: TypeForwardedTo(typeof(GuidAttribute))]
[assembly: TypeForwardedTo(typeof(HandleCollector))]
[assembly: TypeForwardedTo(typeof(HandleRef))]
[assembly: TypeForwardedTo(typeof(ICustomAdapter))]
[assembly: TypeForwardedTo(typeof(ICustomFactory))]
[assembly: TypeForwardedTo(typeof(ICustomMarshaler))]
[assembly: TypeForwardedTo(typeof(ICustomQueryInterface))]
[assembly: TypeForwardedTo(typeof(InAttribute))]
[assembly: TypeForwardedTo(typeof(InterfaceTypeAttribute))]
[assembly: TypeForwardedTo(typeof(InvalidComObjectException))]
[assembly: TypeForwardedTo(typeof(InvalidOleVariantTypeException))]
[assembly: TypeForwardedTo(typeof(LayoutKind))]
[assembly: TypeForwardedTo(typeof(LCIDConversionAttribute))]
[assembly: TypeForwardedTo(typeof(Marshal))]
[assembly: TypeForwardedTo(typeof(MarshalAsAttribute))]
[assembly: TypeForwardedTo(typeof(MarshalDirectiveException))]
[assembly: TypeForwardedTo(typeof(OptionalAttribute))]
[assembly: TypeForwardedTo(typeof(OSPlatform))]
[assembly: TypeForwardedTo(typeof(OutAttribute))]
[assembly: TypeForwardedTo(typeof(PreserveSigAttribute))]
[assembly: TypeForwardedTo(typeof(PrimaryInteropAssemblyAttribute))]
[assembly: TypeForwardedTo(typeof(ProgIdAttribute))]
[assembly: TypeForwardedTo(typeof(RuntimeEnvironment))]
[assembly: TypeForwardedTo(typeof(RuntimeInformation))]
[assembly: TypeForwardedTo(typeof(SafeArrayRankMismatchException))]
[assembly: TypeForwardedTo(typeof(SafeArrayTypeMismatchException))]
[assembly: TypeForwardedTo(typeof(SafeBuffer))]
[assembly: TypeForwardedTo(typeof(SafeHandle))]
[assembly: TypeForwardedTo(typeof(SEHException))]
[assembly: TypeForwardedTo(typeof(StructLayoutAttribute))]
[assembly: TypeForwardedTo(typeof(TypeIdentifierAttribute))]
[assembly: TypeForwardedTo(typeof(UnknownWrapper))]
[assembly: TypeForwardedTo(typeof(UnmanagedFunctionPointerAttribute))]
[assembly: TypeForwardedTo(typeof(UnmanagedType))]
[assembly: TypeForwardedTo(typeof(VarEnum))]
[assembly: TypeForwardedTo(typeof(VariantWrapper))]
[assembly: TypeForwardedTo(typeof(MemoryFailPoint))]
[assembly: TypeForwardedTo(typeof(CollectionDataContractAttribute))]
[assembly: TypeForwardedTo(typeof(ContractNamespaceAttribute))]
[assembly: TypeForwardedTo(typeof(DataContractAttribute))]
[assembly: TypeForwardedTo(typeof(DataContractResolver))]
[assembly: TypeForwardedTo(typeof(DataContractSerializer))]
[assembly: TypeForwardedTo(typeof(DataContractSerializerExtensions))]
[assembly: TypeForwardedTo(typeof(DataContractSerializerSettings))]
[assembly: TypeForwardedTo(typeof(DataMemberAttribute))]
[assembly: TypeForwardedTo(typeof(DateTimeFormat))]
[assembly: TypeForwardedTo(typeof(EmitTypeInformation))]
[assembly: TypeForwardedTo(typeof(EnumMemberAttribute))]
[assembly: TypeForwardedTo(typeof(ExportOptions))]
[assembly: TypeForwardedTo(typeof(ExtensionDataObject))]
[assembly: TypeForwardedTo(typeof(Formatter))]
[assembly: TypeForwardedTo(typeof(FormatterConverter))]
[assembly: TypeForwardedTo(typeof(BinaryFormatter))]
[assembly: TypeForwardedTo(typeof(FormatterAssemblyStyle))]
[assembly: TypeForwardedTo(typeof(FormatterTypeStyle))]
[assembly: TypeForwardedTo(typeof(TypeFilterLevel))]
[assembly: TypeForwardedTo(typeof(FormatterServices))]
[assembly: TypeForwardedTo(typeof(IDeserializationCallback))]
[assembly: TypeForwardedTo(typeof(IExtensibleDataObject))]
[assembly: TypeForwardedTo(typeof(IFormatter))]
[assembly: TypeForwardedTo(typeof(IFormatterConverter))]
[assembly: TypeForwardedTo(typeof(IgnoreDataMemberAttribute))]
[assembly: TypeForwardedTo(typeof(InvalidDataContractException))]
[assembly: TypeForwardedTo(typeof(IObjectReference))]
[assembly: TypeForwardedTo(typeof(ISafeSerializationData))]
[assembly: TypeForwardedTo(typeof(ISerializable))]
[assembly: TypeForwardedTo(typeof(ISerializationSurrogate))]
[assembly: TypeForwardedTo(typeof(ISerializationSurrogateProvider))]
[assembly: TypeForwardedTo(typeof(ISurrogateSelector))]
[assembly: TypeForwardedTo(typeof(DataContractJsonSerializer))]
[assembly: TypeForwardedTo(typeof(DataContractJsonSerializerSettings))]
[assembly: TypeForwardedTo(typeof(IXmlJsonReaderInitializer))]
[assembly: TypeForwardedTo(typeof(IXmlJsonWriterInitializer))]
[assembly: TypeForwardedTo(typeof(JsonReaderWriterFactory))]
[assembly: TypeForwardedTo(typeof(KnownTypeAttribute))]
[assembly: TypeForwardedTo(typeof(ObjectIDGenerator))]
[assembly: TypeForwardedTo(typeof(ObjectManager))]
[assembly: TypeForwardedTo(typeof(OnDeserializedAttribute))]
[assembly: TypeForwardedTo(typeof(OnDeserializingAttribute))]
[assembly: TypeForwardedTo(typeof(OnSerializedAttribute))]
[assembly: TypeForwardedTo(typeof(OnSerializingAttribute))]
[assembly: TypeForwardedTo(typeof(OptionalFieldAttribute))]
[assembly: TypeForwardedTo(typeof(SafeSerializationEventArgs))]
[assembly: TypeForwardedTo(typeof(SerializationBinder))]
[assembly: TypeForwardedTo(typeof(SerializationEntry))]
[assembly: TypeForwardedTo(typeof(SerializationException))]
[assembly: TypeForwardedTo(typeof(SerializationInfo))]
[assembly: TypeForwardedTo(typeof(SerializationInfoEnumerator))]
[assembly: TypeForwardedTo(typeof(SerializationObjectManager))]
[assembly: TypeForwardedTo(typeof(StreamingContext))]
[assembly: TypeForwardedTo(typeof(StreamingContextStates))]
[assembly: TypeForwardedTo(typeof(SurrogateSelector))]
[assembly: TypeForwardedTo(typeof(XmlObjectSerializer))]
[assembly: TypeForwardedTo(typeof(XmlSerializableServices))]
[assembly: TypeForwardedTo(typeof(XPathQueryGenerator))]
[assembly: TypeForwardedTo(typeof(XsdDataContractExporter))]
[assembly: TypeForwardedTo(typeof(TargetedPatchingOptOutAttribute))]
[assembly: TypeForwardedTo(typeof(ComponentGuaranteesAttribute))]
[assembly: TypeForwardedTo(typeof(ComponentGuaranteesOptions))]
[assembly: TypeForwardedTo(typeof(FrameworkName))]
[assembly: TypeForwardedTo(typeof(ResourceConsumptionAttribute))]
[assembly: TypeForwardedTo(typeof(ResourceExposureAttribute))]
[assembly: TypeForwardedTo(typeof(ResourceScope))]
[assembly: TypeForwardedTo(typeof(TargetFrameworkAttribute))]
[assembly: TypeForwardedTo(typeof(VersioningHelper))]
[assembly: TypeForwardedTo(typeof(RuntimeArgumentHandle))]
[assembly: TypeForwardedTo(typeof(RuntimeFieldHandle))]
[assembly: TypeForwardedTo(typeof(RuntimeMethodHandle))]
[assembly: TypeForwardedTo(typeof(RuntimeTypeHandle))]
[assembly: TypeForwardedTo(typeof(sbyte))]
[assembly: TypeForwardedTo(typeof(AllowPartiallyTrustedCallersAttribute))]
[assembly: TypeForwardedTo(typeof(AuthenticationException))]
[assembly: TypeForwardedTo(typeof(CipherAlgorithmType))]
[assembly: TypeForwardedTo(typeof(ExchangeAlgorithmType))]
[assembly: TypeForwardedTo(typeof(ChannelBinding))]
[assembly: TypeForwardedTo(typeof(ChannelBindingKind))]
[assembly: TypeForwardedTo(typeof(ExtendedProtectionPolicy))]
[assembly: TypeForwardedTo(typeof(ExtendedProtectionPolicyTypeConverter))]
[assembly: TypeForwardedTo(typeof(PolicyEnforcement))]
[assembly: TypeForwardedTo(typeof(ProtectionScenario))]
[assembly: TypeForwardedTo(typeof(ServiceNameCollection))]
[assembly: TypeForwardedTo(typeof(HashAlgorithmType))]
[assembly: TypeForwardedTo(typeof(InvalidCredentialException))]
[assembly: TypeForwardedTo(typeof(SslProtocols))]
[assembly: TypeForwardedTo(typeof(Claim))]
[assembly: TypeForwardedTo(typeof(ClaimsIdentity))]
[assembly: TypeForwardedTo(typeof(ClaimsPrincipal))]
[assembly: TypeForwardedTo(typeof(ClaimTypes))]
[assembly: TypeForwardedTo(typeof(ClaimValueTypes))]
[assembly: TypeForwardedTo(typeof(Aes))]
[assembly: TypeForwardedTo(typeof(AesCryptoServiceProvider))]
[assembly: TypeForwardedTo(typeof(AesManaged))]
[assembly: TypeForwardedTo(typeof(AsnEncodedData))]
[assembly: TypeForwardedTo(typeof(AsnEncodedDataCollection))]
[assembly: TypeForwardedTo(typeof(AsnEncodedDataEnumerator))]
[assembly: TypeForwardedTo(typeof(AsymmetricAlgorithm))]
[assembly: TypeForwardedTo(typeof(AsymmetricKeyExchangeDeformatter))]
[assembly: TypeForwardedTo(typeof(AsymmetricKeyExchangeFormatter))]
[assembly: TypeForwardedTo(typeof(AsymmetricSignatureDeformatter))]
[assembly: TypeForwardedTo(typeof(AsymmetricSignatureFormatter))]
[assembly: TypeForwardedTo(typeof(CipherMode))]
[assembly: TypeForwardedTo(typeof(CryptoConfig))]
[assembly: TypeForwardedTo(typeof(CryptographicException))]
[assembly: TypeForwardedTo(typeof(CryptographicUnexpectedOperationException))]
[assembly: TypeForwardedTo(typeof(CryptoStream))]
[assembly: TypeForwardedTo(typeof(CryptoStreamMode))]
[assembly: TypeForwardedTo(typeof(CspKeyContainerInfo))]
[assembly: TypeForwardedTo(typeof(CspParameters))]
[assembly: TypeForwardedTo(typeof(CspProviderFlags))]
[assembly: TypeForwardedTo(typeof(DeriveBytes))]
[assembly: TypeForwardedTo(typeof(DES))]
[assembly: TypeForwardedTo(typeof(DESCryptoServiceProvider))]
[assembly: TypeForwardedTo(typeof(DSA))]
[assembly: TypeForwardedTo(typeof(DSACryptoServiceProvider))]
[assembly: TypeForwardedTo(typeof(DSAParameters))]
[assembly: TypeForwardedTo(typeof(DSASignatureDeformatter))]
[assembly: TypeForwardedTo(typeof(DSASignatureFormatter))]
[assembly: TypeForwardedTo(typeof(ECCurve))]
[assembly: TypeForwardedTo(typeof(ECDiffieHellmanPublicKey))]
[assembly: TypeForwardedTo(typeof(ECDsa))]
[assembly: TypeForwardedTo(typeof(ECParameters))]
[assembly: TypeForwardedTo(typeof(ECPoint))]
[assembly: TypeForwardedTo(typeof(FromBase64Transform))]
[assembly: TypeForwardedTo(typeof(FromBase64TransformMode))]
[assembly: TypeForwardedTo(typeof(HashAlgorithm))]
[assembly: TypeForwardedTo(typeof(HashAlgorithmName))]
[assembly: TypeForwardedTo(typeof(HMAC))]
[assembly: TypeForwardedTo(typeof(HMACMD5))]
[assembly: TypeForwardedTo(typeof(HMACSHA1))]
[assembly: TypeForwardedTo(typeof(HMACSHA256))]
[assembly: TypeForwardedTo(typeof(HMACSHA384))]
[assembly: TypeForwardedTo(typeof(HMACSHA512))]
[assembly: TypeForwardedTo(typeof(ICryptoTransform))]
[assembly: TypeForwardedTo(typeof(ICspAsymmetricAlgorithm))]
[assembly: TypeForwardedTo(typeof(IncrementalHash))]
[assembly: TypeForwardedTo(typeof(KeyedHashAlgorithm))]
[assembly: TypeForwardedTo(typeof(KeyNumber))]
[assembly: TypeForwardedTo(typeof(KeySizes))]
[assembly: TypeForwardedTo(typeof(MaskGenerationMethod))]
[assembly: TypeForwardedTo(typeof(MD5))]
[assembly: TypeForwardedTo(typeof(MD5CryptoServiceProvider))]
[assembly: TypeForwardedTo(typeof(Oid))]
[assembly: TypeForwardedTo(typeof(OidCollection))]
[assembly: TypeForwardedTo(typeof(OidEnumerator))]
[assembly: TypeForwardedTo(typeof(OidGroup))]
[assembly: TypeForwardedTo(typeof(PaddingMode))]
[assembly: TypeForwardedTo(typeof(PasswordDeriveBytes))]
[assembly: TypeForwardedTo(typeof(PKCS1MaskGenerationMethod))]
[assembly: TypeForwardedTo(typeof(RandomNumberGenerator))]
[assembly: TypeForwardedTo(typeof(RC2))]
[assembly: TypeForwardedTo(typeof(RC2CryptoServiceProvider))]
[assembly: TypeForwardedTo(typeof(Rfc2898DeriveBytes))]
[assembly: TypeForwardedTo(typeof(Rijndael))]
[assembly: TypeForwardedTo(typeof(RijndaelManaged))]
[assembly: TypeForwardedTo(typeof(RNGCryptoServiceProvider))]
[assembly: TypeForwardedTo(typeof(RSA))]
[assembly: TypeForwardedTo(typeof(RSACryptoServiceProvider))]
[assembly: TypeForwardedTo(typeof(RSAEncryptionPadding))]
[assembly: TypeForwardedTo(typeof(RSAEncryptionPaddingMode))]
[assembly: TypeForwardedTo(typeof(RSAOAEPKeyExchangeDeformatter))]
[assembly: TypeForwardedTo(typeof(RSAOAEPKeyExchangeFormatter))]
[assembly: TypeForwardedTo(typeof(RSAParameters))]
[assembly: TypeForwardedTo(typeof(RSAPKCS1KeyExchangeDeformatter))]
[assembly: TypeForwardedTo(typeof(RSAPKCS1KeyExchangeFormatter))]
[assembly: TypeForwardedTo(typeof(RSAPKCS1SignatureDeformatter))]
[assembly: TypeForwardedTo(typeof(RSAPKCS1SignatureFormatter))]
[assembly: TypeForwardedTo(typeof(RSASignaturePadding))]
[assembly: TypeForwardedTo(typeof(RSASignaturePaddingMode))]
[assembly: TypeForwardedTo(typeof(SHA1))]
[assembly: TypeForwardedTo(typeof(SHA1CryptoServiceProvider))]
[assembly: TypeForwardedTo(typeof(SHA1Managed))]
[assembly: TypeForwardedTo(typeof(SHA256))]
[assembly: TypeForwardedTo(typeof(SHA256CryptoServiceProvider))]
[assembly: TypeForwardedTo(typeof(SHA256Managed))]
[assembly: TypeForwardedTo(typeof(SHA384))]
[assembly: TypeForwardedTo(typeof(SHA384CryptoServiceProvider))]
[as

Room Architect Tool_Data/Managed/Newtonsoft.Json.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Data;
using System.Data.SqlTypes;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Dynamic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Linq.Expressions;
using System.Numerics;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters;
using System.Runtime.Versioning;
using System.Security;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Linq;
using Microsoft.CodeAnalysis;
using Newtonsoft.Json.Bson;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Linq.JsonPath;
using Newtonsoft.Json.Schema;
using Newtonsoft.Json.Serialization;
using Newtonsoft.Json.Utilities;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AllowPartiallyTrustedCallers]
[assembly: InternalsVisibleTo("Newtonsoft.Json.Schema, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f561df277c6c0b497d629032b410cdcf286e537c054724f7ffa0164345f62b3e642029d7a80cc351918955328c4adc8a048823ef90b0cf38ea7db0d729caf2b633c3babe08b0310198c1081995c19029bc675193744eab9d7345b8a67258ec17d112cebdbbb2a281487dceeafb9d83aa930f32103fbe1d2911425bc5744002c7")]
[assembly: InternalsVisibleTo("Newtonsoft.Json.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f561df277c6c0b497d629032b410cdcf286e537c054724f7ffa0164345f62b3e642029d7a80cc351918955328c4adc8a048823ef90b0cf38ea7db0d729caf2b633c3babe08b0310198c1081995c19029bc675193744eab9d7345b8a67258ec17d112cebdbbb2a281487dceeafb9d83aa930f32103fbe1d2911425bc5744002c7")]
[assembly: InternalsVisibleTo("Newtonsoft.Json.Dynamic, PublicKey=0024000004800000940000000602000000240000525341310004000001000100cbd8d53b9d7de30f1f1278f636ec462cf9c254991291e66ebb157a885638a517887633b898ccbcf0d5c5ff7be85a6abe9e765d0ac7cd33c68dac67e7e64530e8222101109f154ab14a941c490ac155cd1d4fcba0fabb49016b4ef28593b015cab5937da31172f03f67d09edda404b88a60023f062ae71d0b2e4438b74cc11dc9")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("9ca358aa-317b-4925-8ada-4a29e943a363")]
[assembly: CLSCompliant(true)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("Newtonsoft")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyCopyright("Copyright © James Newton-King 2008")]
[assembly: AssemblyDescription("Json.NET is a popular high-performance JSON framework for .NET")]
[assembly: AssemblyFileVersion("12.0.3.23909")]
[assembly: AssemblyInformationalVersion("12.0.3+7c3d7f8da7e35dde8fa74188b0decff70f8f10e3")]
[assembly: AssemblyProduct("Json.NET")]
[assembly: AssemblyTitle("Json.NET .NET Standard 2.0")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: AssemblyVersion("12.0.0.0")]
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]
	[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]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module | 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 System.Diagnostics.CodeAnalysis
{
	[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = true)]
	internal sealed class NotNullAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false)]
	internal sealed class NotNullWhenAttribute : Attribute
	{
		public bool ReturnValue { get; }

		public NotNullWhenAttribute(bool returnValue)
		{
			ReturnValue = returnValue;
		}
	}
	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue, Inherited = false)]
	internal sealed class MaybeNullAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, Inherited = false)]
	internal sealed class AllowNullAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
	internal class DoesNotReturnIfAttribute : Attribute
	{
		public bool ParameterValue { get; }

		public DoesNotReturnIfAttribute(bool parameterValue)
		{
			ParameterValue = parameterValue;
		}
	}
}
namespace Newtonsoft.Json
{
	public enum ConstructorHandling
	{
		Default,
		AllowNonPublicDefaultConstructor
	}
	public enum DateFormatHandling
	{
		IsoDateFormat,
		MicrosoftDateFormat
	}
	public enum DateParseHandling
	{
		None,
		DateTime,
		DateTimeOffset
	}
	public enum DateTimeZoneHandling
	{
		Local,
		Utc,
		Unspecified,
		RoundtripKind
	}
	public class DefaultJsonNameTable : JsonNameTable
	{
		private class Entry
		{
			internal readonly string Value;

			internal readonly int HashCode;

			internal Entry Next;

			internal Entry(string value, int hashCode, Entry next)
			{
				Value = value;
				HashCode = hashCode;
				Next = next;
			}
		}

		private static readonly int HashCodeRandomizer;

		private int _count;

		private Entry[] _entries;

		private int _mask = 31;

		static DefaultJsonNameTable()
		{
			HashCodeRandomizer = Environment.TickCount;
		}

		public DefaultJsonNameTable()
		{
			_entries = new Entry[_mask + 1];
		}

		public override string? Get(char[] key, int start, int length)
		{
			if (length == 0)
			{
				return string.Empty;
			}
			int num = length + HashCodeRandomizer;
			num += (num << 7) ^ key[start];
			int num2 = start + length;
			for (int i = start + 1; i < num2; i++)
			{
				num += (num << 7) ^ key[i];
			}
			num -= num >> 17;
			num -= num >> 11;
			num -= num >> 5;
			int num3 = num & _mask;
			for (Entry entry = _entries[num3]; entry != null; entry = entry.Next)
			{
				if (entry.HashCode == num && TextEquals(entry.Value, key, start, length))
				{
					return entry.Value;
				}
			}
			return null;
		}

		public string Add(string key)
		{
			if (key == null)
			{
				throw new ArgumentNullException("key");
			}
			int length = key.Length;
			if (length == 0)
			{
				return string.Empty;
			}
			int num = length + HashCodeRandomizer;
			for (int i = 0; i < key.Length; i++)
			{
				num += (num << 7) ^ key[i];
			}
			num -= num >> 17;
			num -= num >> 11;
			num -= num >> 5;
			for (Entry entry = _entries[num & _mask]; entry != null; entry = entry.Next)
			{
				if (entry.HashCode == num && entry.Value.Equals(key, StringComparison.Ordinal))
				{
					return entry.Value;
				}
			}
			return AddEntry(key, num);
		}

		private string AddEntry(string str, int hashCode)
		{
			int num = hashCode & _mask;
			Entry entry = new Entry(str, hashCode, _entries[num]);
			_entries[num] = entry;
			if (_count++ == _mask)
			{
				Grow();
			}
			return entry.Value;
		}

		private void Grow()
		{
			Entry[] entries = _entries;
			int num = _mask * 2 + 1;
			Entry[] array = new Entry[num + 1];
			for (int i = 0; i < entries.Length; i++)
			{
				Entry entry = entries[i];
				while (entry != null)
				{
					int num2 = entry.HashCode & num;
					Entry next = entry.Next;
					entry.Next = array[num2];
					array[num2] = entry;
					entry = next;
				}
			}
			_entries = array;
			_mask = num;
		}

		private static bool TextEquals(string str1, char[] str2, int str2Start, int str2Length)
		{
			if (str1.Length != str2Length)
			{
				return false;
			}
			for (int i = 0; i < str1.Length; i++)
			{
				if (str1[i] != str2[str2Start + i])
				{
					return false;
				}
			}
			return true;
		}
	}
	[Flags]
	public enum DefaultValueHandling
	{
		Include = 0,
		Ignore = 1,
		Populate = 2,
		IgnoreAndPopulate = 3
	}
	public enum FloatFormatHandling
	{
		String,
		Symbol,
		DefaultValue
	}
	public enum FloatParseHandling
	{
		Double,
		Decimal
	}
	public enum Formatting
	{
		None,
		Indented
	}
	public interface IArrayPool<T>
	{
		T[] Rent(int minimumLength);

		void Return(T[]? array);
	}
	public interface IJsonLineInfo
	{
		int LineNumber { get; }

		int LinePosition { get; }

		bool HasLineInfo();
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple = false)]
	public sealed class JsonArrayAttribute : JsonContainerAttribute
	{
		private bool _allowNullItems;

		public bool AllowNullItems
		{
			get
			{
				return _allowNullItems;
			}
			set
			{
				_allowNullItems = value;
			}
		}

		public JsonArrayAttribute()
		{
		}

		public JsonArrayAttribute(bool allowNullItems)
		{
			_allowNullItems = allowNullItems;
		}

		public JsonArrayAttribute(string id)
			: base(id)
		{
		}
	}
	[AttributeUsage(AttributeTargets.Constructor, AllowMultiple = false)]
	public sealed class JsonConstructorAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple = false)]
	public abstract class JsonContainerAttribute : Attribute
	{
		internal bool? _isReference;

		internal bool? _itemIsReference;

		internal ReferenceLoopHandling? _itemReferenceLoopHandling;

		internal TypeNameHandling? _itemTypeNameHandling;

		private Type? _namingStrategyType;

		private object[]? _namingStrategyParameters;

		public string? Id { get; set; }

		public string? Title { get; set; }

		public string? Description { get; set; }

		public Type? ItemConverterType { get; set; }

		public object[]? ItemConverterParameters { get; set; }

		public Type? NamingStrategyType
		{
			get
			{
				return _namingStrategyType;
			}
			set
			{
				_namingStrategyType = value;
				NamingStrategyInstance = null;
			}
		}

		public object[]? NamingStrategyParameters
		{
			get
			{
				return _namingStrategyParameters;
			}
			set
			{
				_namingStrategyParameters = value;
				NamingStrategyInstance = null;
			}
		}

		internal NamingStrategy? NamingStrategyInstance { get; set; }

		public bool IsReference
		{
			get
			{
				return _isReference.GetValueOrDefault();
			}
			set
			{
				_isReference = value;
			}
		}

		public bool ItemIsReference
		{
			get
			{
				return _itemIsReference.GetValueOrDefault();
			}
			set
			{
				_itemIsReference = value;
			}
		}

		public ReferenceLoopHandling ItemReferenceLoopHandling
		{
			get
			{
				return _itemReferenceLoopHandling.GetValueOrDefault();
			}
			set
			{
				_itemReferenceLoopHandling = value;
			}
		}

		public TypeNameHandling ItemTypeNameHandling
		{
			get
			{
				return _itemTypeNameHandling.GetValueOrDefault();
			}
			set
			{
				_itemTypeNameHandling = value;
			}
		}

		protected JsonContainerAttribute()
		{
		}

		protected JsonContainerAttribute(string id)
		{
			Id = id;
		}
	}
	public static class JsonConvert
	{
		public static readonly string True = "true";

		public static readonly string False = "false";

		public static readonly string Null = "null";

		public static readonly string Undefined = "undefined";

		public static readonly string PositiveInfinity = "Infinity";

		public static readonly string NegativeInfinity = "-Infinity";

		public static readonly string NaN = "NaN";

		public static Func<JsonSerializerSettings>? DefaultSettings { get; set; }

		public static string ToString(DateTime value)
		{
			return ToString(value, DateFormatHandling.IsoDateFormat, DateTimeZoneHandling.RoundtripKind);
		}

		public static string ToString(DateTime value, DateFormatHandling format, DateTimeZoneHandling timeZoneHandling)
		{
			DateTime value2 = DateTimeUtils.EnsureDateTime(value, timeZoneHandling);
			using StringWriter stringWriter = StringUtils.CreateStringWriter(64);
			stringWriter.Write('"');
			DateTimeUtils.WriteDateTimeString(stringWriter, value2, format, null, CultureInfo.InvariantCulture);
			stringWriter.Write('"');
			return stringWriter.ToString();
		}

		public static string ToString(DateTimeOffset value)
		{
			return ToString(value, DateFormatHandling.IsoDateFormat);
		}

		public static string ToString(DateTimeOffset value, DateFormatHandling format)
		{
			using StringWriter stringWriter = StringUtils.CreateStringWriter(64);
			stringWriter.Write('"');
			DateTimeUtils.WriteDateTimeOffsetString(stringWriter, value, format, null, CultureInfo.InvariantCulture);
			stringWriter.Write('"');
			return stringWriter.ToString();
		}

		public static string ToString(bool value)
		{
			if (!value)
			{
				return False;
			}
			return True;
		}

		public static string ToString(char value)
		{
			return ToString(char.ToString(value));
		}

		public static string ToString(Enum value)
		{
			return value.ToString("D");
		}

		public static string ToString(int value)
		{
			return value.ToString(null, CultureInfo.InvariantCulture);
		}

		public static string ToString(short value)
		{
			return value.ToString(null, CultureInfo.InvariantCulture);
		}

		[CLSCompliant(false)]
		public static string ToString(ushort value)
		{
			return value.ToString(null, CultureInfo.InvariantCulture);
		}

		[CLSCompliant(false)]
		public static string ToString(uint value)
		{
			return value.ToString(null, CultureInfo.InvariantCulture);
		}

		public static string ToString(long value)
		{
			return value.ToString(null, CultureInfo.InvariantCulture);
		}

		private static string ToStringInternal(BigInteger value)
		{
			return value.ToString(null, CultureInfo.InvariantCulture);
		}

		[CLSCompliant(false)]
		public static string ToString(ulong value)
		{
			return value.ToString(null, CultureInfo.InvariantCulture);
		}

		public static string ToString(float value)
		{
			return EnsureDecimalPlace(value, value.ToString("R", CultureInfo.InvariantCulture));
		}

		internal static string ToString(float value, FloatFormatHandling floatFormatHandling, char quoteChar, bool nullable)
		{
			return EnsureFloatFormat(value, EnsureDecimalPlace(value, value.ToString("R", CultureInfo.InvariantCulture)), floatFormatHandling, quoteChar, nullable);
		}

		private static string EnsureFloatFormat(double value, string text, FloatFormatHandling floatFormatHandling, char quoteChar, bool nullable)
		{
			if (floatFormatHandling == FloatFormatHandling.Symbol || (!double.IsInfinity(value) && !double.IsNaN(value)))
			{
				return text;
			}
			if (floatFormatHandling == FloatFormatHandling.DefaultValue)
			{
				if (nullable)
				{
					return Null;
				}
				return "0.0";
			}
			return quoteChar + text + quoteChar;
		}

		public static string ToString(double value)
		{
			return EnsureDecimalPlace(value, value.ToString("R", CultureInfo.InvariantCulture));
		}

		internal static string ToString(double value, FloatFormatHandling floatFormatHandling, char quoteChar, bool nullable)
		{
			return EnsureFloatFormat(value, EnsureDecimalPlace(value, value.ToString("R", CultureInfo.InvariantCulture)), floatFormatHandling, quoteChar, nullable);
		}

		private static string EnsureDecimalPlace(double value, string text)
		{
			if (double.IsNaN(value) || double.IsInfinity(value) || text.IndexOf('.') != -1 || text.IndexOf('E') != -1 || text.IndexOf('e') != -1)
			{
				return text;
			}
			return text + ".0";
		}

		private static string EnsureDecimalPlace(string text)
		{
			if (text.IndexOf('.') != -1)
			{
				return text;
			}
			return text + ".0";
		}

		public static string ToString(byte value)
		{
			return value.ToString(null, CultureInfo.InvariantCulture);
		}

		[CLSCompliant(false)]
		public static string ToString(sbyte value)
		{
			return value.ToString(null, CultureInfo.InvariantCulture);
		}

		public static string ToString(decimal value)
		{
			return EnsureDecimalPlace(value.ToString(null, CultureInfo.InvariantCulture));
		}

		public static string ToString(Guid value)
		{
			return ToString(value, '"');
		}

		internal static string ToString(Guid value, char quoteChar)
		{
			string text = value.ToString("D", CultureInfo.InvariantCulture);
			string text2 = quoteChar.ToString(CultureInfo.InvariantCulture);
			return text2 + text + text2;
		}

		public static string ToString(TimeSpan value)
		{
			return ToString(value, '"');
		}

		internal static string ToString(TimeSpan value, char quoteChar)
		{
			return ToString(value.ToString(), quoteChar);
		}

		public static string ToString(Uri? value)
		{
			if (value == null)
			{
				return Null;
			}
			return ToString(value, '"');
		}

		internal static string ToString(Uri value, char quoteChar)
		{
			return ToString(value.OriginalString, quoteChar);
		}

		public static string ToString(string? value)
		{
			return ToString(value, '"');
		}

		public static string ToString(string? value, char delimiter)
		{
			return ToString(value, delimiter, StringEscapeHandling.Default);
		}

		public static string ToString(string? value, char delimiter, StringEscapeHandling stringEscapeHandling)
		{
			if (delimiter != '"' && delimiter != '\'')
			{
				throw new ArgumentException("Delimiter must be a single or double quote.", "delimiter");
			}
			return JavaScriptUtils.ToEscapedJavaScriptString(value, delimiter, appendDelimiters: true, stringEscapeHandling);
		}

		public static string ToString(object? value)
		{
			if (value == null)
			{
				return Null;
			}
			return ConvertUtils.GetTypeCode(value.GetType()) switch
			{
				PrimitiveTypeCode.String => ToString((string)value), 
				PrimitiveTypeCode.Char => ToString((char)value), 
				PrimitiveTypeCode.Boolean => ToString((bool)value), 
				PrimitiveTypeCode.SByte => ToString((sbyte)value), 
				PrimitiveTypeCode.Int16 => ToString((short)value), 
				PrimitiveTypeCode.UInt16 => ToString((ushort)value), 
				PrimitiveTypeCode.Int32 => ToString((int)value), 
				PrimitiveTypeCode.Byte => ToString((byte)value), 
				PrimitiveTypeCode.UInt32 => ToString((uint)value), 
				PrimitiveTypeCode.Int64 => ToString((long)value), 
				PrimitiveTypeCode.UInt64 => ToString((ulong)value), 
				PrimitiveTypeCode.Single => ToString((float)value), 
				PrimitiveTypeCode.Double => ToString((double)value), 
				PrimitiveTypeCode.DateTime => ToString((DateTime)value), 
				PrimitiveTypeCode.Decimal => ToString((decimal)value), 
				PrimitiveTypeCode.DBNull => Null, 
				PrimitiveTypeCode.DateTimeOffset => ToString((DateTimeOffset)value), 
				PrimitiveTypeCode.Guid => ToString((Guid)value), 
				PrimitiveTypeCode.Uri => ToString((Uri)value), 
				PrimitiveTypeCode.TimeSpan => ToString((TimeSpan)value), 
				PrimitiveTypeCode.BigInteger => ToStringInternal((BigInteger)value), 
				_ => throw new ArgumentException("Unsupported type: {0}. Use the JsonSerializer class to get the object's JSON representation.".FormatWith(CultureInfo.InvariantCulture, value.GetType())), 
			};
		}

		[DebuggerStepThrough]
		public static string SerializeObject(object? value)
		{
			return SerializeObject(value, (Type?)null, (JsonSerializerSettings?)null);
		}

		[DebuggerStepThrough]
		public static string SerializeObject(object? value, Formatting formatting)
		{
			return SerializeObject(value, formatting, (JsonSerializerSettings?)null);
		}

		[DebuggerStepThrough]
		public static string SerializeObject(object? value, params JsonConverter[] converters)
		{
			JsonSerializerSettings settings = ((converters != null && converters.Length != 0) ? new JsonSerializerSettings
			{
				Converters = converters
			} : null);
			return SerializeObject(value, null, settings);
		}

		[DebuggerStepThrough]
		public static string SerializeObject(object? value, Formatting formatting, params JsonConverter[] converters)
		{
			JsonSerializerSettings settings = ((converters != null && converters.Length != 0) ? new JsonSerializerSettings
			{
				Converters = converters
			} : null);
			return SerializeObject(value, null, formatting, settings);
		}

		[DebuggerStepThrough]
		public static string SerializeObject(object? value, JsonSerializerSettings settings)
		{
			return SerializeObject(value, null, settings);
		}

		[DebuggerStepThrough]
		public static string SerializeObject(object? value, Type? type, JsonSerializerSettings? settings)
		{
			JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(settings);
			return SerializeObjectInternal(value, type, jsonSerializer);
		}

		[DebuggerStepThrough]
		public static string SerializeObject(object? value, Formatting formatting, JsonSerializerSettings? settings)
		{
			return SerializeObject(value, null, formatting, settings);
		}

		[DebuggerStepThrough]
		public static string SerializeObject(object? value, Type? type, Formatting formatting, JsonSerializerSettings? settings)
		{
			JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(settings);
			jsonSerializer.Formatting = formatting;
			return SerializeObjectInternal(value, type, jsonSerializer);
		}

		private static string SerializeObjectInternal(object? value, Type? type, JsonSerializer jsonSerializer)
		{
			StringWriter stringWriter = new StringWriter(new StringBuilder(256), CultureInfo.InvariantCulture);
			using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter))
			{
				jsonTextWriter.Formatting = jsonSerializer.Formatting;
				jsonSerializer.Serialize(jsonTextWriter, value, type);
			}
			return stringWriter.ToString();
		}

		[DebuggerStepThrough]
		public static object? DeserializeObject(string value)
		{
			return DeserializeObject(value, (Type?)null, (JsonSerializerSettings?)null);
		}

		[DebuggerStepThrough]
		public static object? DeserializeObject(string value, JsonSerializerSettings settings)
		{
			return DeserializeObject(value, null, settings);
		}

		[DebuggerStepThrough]
		public static object? DeserializeObject(string value, Type type)
		{
			return DeserializeObject(value, type, (JsonSerializerSettings?)null);
		}

		[DebuggerStepThrough]
		public static T DeserializeObject<T>(string value)
		{
			return JsonConvert.DeserializeObject<T>(value, (JsonSerializerSettings?)null);
		}

		[DebuggerStepThrough]
		public static T DeserializeAnonymousType<T>(string value, T anonymousTypeObject)
		{
			return DeserializeObject<T>(value);
		}

		[DebuggerStepThrough]
		public static T DeserializeAnonymousType<T>(string value, T anonymousTypeObject, JsonSerializerSettings settings)
		{
			return DeserializeObject<T>(value, settings);
		}

		[DebuggerStepThrough]
		[return: MaybeNull]
		public static T DeserializeObject<T>(string value, params JsonConverter[] converters)
		{
			return (T)DeserializeObject(value, typeof(T), converters);
		}

		[DebuggerStepThrough]
		[return: MaybeNull]
		public static T DeserializeObject<T>(string value, JsonSerializerSettings? settings)
		{
			return (T)DeserializeObject(value, typeof(T), settings);
		}

		[DebuggerStepThrough]
		public static object? DeserializeObject(string value, Type type, params JsonConverter[] converters)
		{
			JsonSerializerSettings settings = ((converters != null && converters.Length != 0) ? new JsonSerializerSettings
			{
				Converters = converters
			} : null);
			return DeserializeObject(value, type, settings);
		}

		public static object? DeserializeObject(string value, Type? type, JsonSerializerSettings? settings)
		{
			ValidationUtils.ArgumentNotNull(value, "value");
			JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(settings);
			if (!jsonSerializer.IsCheckAdditionalContentSet())
			{
				jsonSerializer.CheckAdditionalContent = true;
			}
			using JsonTextReader reader = new JsonTextReader(new StringReader(value));
			return jsonSerializer.Deserialize(reader, type);
		}

		[DebuggerStepThrough]
		public static void PopulateObject(string value, object target)
		{
			PopulateObject(value, target, null);
		}

		public static void PopulateObject(string value, object target, JsonSerializerSettings? settings)
		{
			JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(settings);
			using JsonReader jsonReader = new JsonTextReader(new StringReader(value));
			jsonSerializer.Populate(jsonReader, target);
			if (settings == null || !settings.CheckAdditionalContent)
			{
				return;
			}
			while (jsonReader.Read())
			{
				if (jsonReader.TokenType != JsonToken.Comment)
				{
					throw JsonSerializationException.Create(jsonReader, "Additional text found in JSON string after finishing deserializing object.");
				}
			}
		}

		public static string SerializeXmlNode(XmlNode? node)
		{
			return SerializeXmlNode(node, Formatting.None);
		}

		public static string SerializeXmlNode(XmlNode? node, Formatting formatting)
		{
			XmlNodeConverter xmlNodeConverter = new XmlNodeConverter();
			return SerializeObject(node, formatting, xmlNodeConverter);
		}

		public static string SerializeXmlNode(XmlNode? node, Formatting formatting, bool omitRootObject)
		{
			XmlNodeConverter xmlNodeConverter = new XmlNodeConverter
			{
				OmitRootObject = omitRootObject
			};
			return SerializeObject(node, formatting, xmlNodeConverter);
		}

		public static XmlDocument? DeserializeXmlNode(string value)
		{
			return DeserializeXmlNode(value, null);
		}

		public static XmlDocument? DeserializeXmlNode(string value, string? deserializeRootElementName)
		{
			return DeserializeXmlNode(value, deserializeRootElementName, writeArrayAttribute: false);
		}

		public static XmlDocument? DeserializeXmlNode(string value, string? deserializeRootElementName, bool writeArrayAttribute)
		{
			return DeserializeXmlNode(value, deserializeRootElementName, writeArrayAttribute, encodeSpecialCharacters: false);
		}

		public static XmlDocument? DeserializeXmlNode(string value, string? deserializeRootElementName, bool writeArrayAttribute, bool encodeSpecialCharacters)
		{
			XmlNodeConverter xmlNodeConverter = new XmlNodeConverter();
			xmlNodeConverter.DeserializeRootElementName = deserializeRootElementName;
			xmlNodeConverter.WriteArrayAttribute = writeArrayAttribute;
			xmlNodeConverter.EncodeSpecialCharacters = encodeSpecialCharacters;
			return (XmlDocument)DeserializeObject(value, typeof(XmlDocument), xmlNodeConverter);
		}

		public static string SerializeXNode(XObject? node)
		{
			return SerializeXNode(node, Formatting.None);
		}

		public static string SerializeXNode(XObject? node, Formatting formatting)
		{
			return SerializeXNode(node, formatting, omitRootObject: false);
		}

		public static string SerializeXNode(XObject? node, Formatting formatting, bool omitRootObject)
		{
			XmlNodeConverter xmlNodeConverter = new XmlNodeConverter
			{
				OmitRootObject = omitRootObject
			};
			return SerializeObject(node, formatting, xmlNodeConverter);
		}

		public static XDocument? DeserializeXNode(string value)
		{
			return DeserializeXNode(value, null);
		}

		public static XDocument? DeserializeXNode(string value, string? deserializeRootElementName)
		{
			return DeserializeXNode(value, deserializeRootElementName, writeArrayAttribute: false);
		}

		public static XDocument? DeserializeXNode(string value, string? deserializeRootElementName, bool writeArrayAttribute)
		{
			return DeserializeXNode(value, deserializeRootElementName, writeArrayAttribute, encodeSpecialCharacters: false);
		}

		public static XDocument? DeserializeXNode(string value, string? deserializeRootElementName, bool writeArrayAttribute, bool encodeSpecialCharacters)
		{
			XmlNodeConverter xmlNodeConverter = new XmlNodeConverter();
			xmlNodeConverter.DeserializeRootElementName = deserializeRootElementName;
			xmlNodeConverter.WriteArrayAttribute = writeArrayAttribute;
			xmlNodeConverter.EncodeSpecialCharacters = encodeSpecialCharacters;
			return (XDocument)DeserializeObject(value, typeof(XDocument), xmlNodeConverter);
		}
	}
	public abstract class JsonConverter
	{
		public virtual bool CanRead => true;

		public virtual bool CanWrite => true;

		public abstract void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer);

		public abstract object? ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer);

		public abstract bool CanConvert(Type objectType);
	}
	public abstract class JsonConverter<T> : JsonConverter
	{
		public sealed override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer)
		{
			if (!((value != null) ? (value is T) : ReflectionUtils.IsNullable(typeof(T))))
			{
				throw new JsonSerializationException("Converter cannot write specified value to JSON. {0} is required.".FormatWith(CultureInfo.InvariantCulture, typeof(T)));
			}
			WriteJson(writer, (T)value, serializer);
		}

		public abstract void WriteJson(JsonWriter writer, [AllowNull] T value, JsonSerializer serializer);

		public sealed override object? ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer)
		{
			bool flag = existingValue == null;
			if (!flag && !(existingValue is T))
			{
				throw new JsonSerializationException("Converter cannot read JSON with the specified existing value. {0} is required.".FormatWith(CultureInfo.InvariantCulture, typeof(T)));
			}
			return ReadJson(reader, objectType, flag ? default(T) : ((T)existingValue), !flag, serializer);
		}

		public abstract T ReadJson(JsonReader reader, Type objectType, [AllowNull] T existingValue, bool hasExistingValue, JsonSerializer serializer);

		public sealed override bool CanConvert(Type objectType)
		{
			return typeof(T).IsAssignableFrom(objectType);
		}
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Interface | AttributeTargets.Parameter, AllowMultiple = false)]
	public sealed class JsonConverterAttribute : Attribute
	{
		private readonly Type _converterType;

		public Type ConverterType => _converterType;

		public object[]? ConverterParameters { get; }

		public JsonConverterAttribute(Type converterType)
		{
			if (converterType == null)
			{
				throw new ArgumentNullException("converterType");
			}
			_converterType = converterType;
		}

		public JsonConverterAttribute(Type converterType, params object[] converterParameters)
			: this(converterType)
		{
			ConverterParameters = converterParameters;
		}
	}
	public class JsonConverterCollection : Collection<JsonConverter>
	{
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple = false)]
	public sealed class JsonDictionaryAttribute : JsonContainerAttribute
	{
		public JsonDictionaryAttribute()
		{
		}

		public JsonDictionaryAttribute(string id)
			: base(id)
		{
		}
	}
	[Serializable]
	public class JsonException : Exception
	{
		public JsonException()
		{
		}

		public JsonException(string message)
			: base(message)
		{
		}

		public JsonException(string message, Exception? innerException)
			: base(message, innerException)
		{
		}

		public JsonException(SerializationInfo info, StreamingContext context)
			: base(info, context)
		{
		}

		internal static JsonException Create(IJsonLineInfo lineInfo, string path, string message)
		{
			message = JsonPosition.FormatMessage(lineInfo, path, message);
			return new JsonException(message);
		}
	}
	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
	public class JsonExtensionDataAttribute : Attribute
	{
		public bool WriteData { get; set; }

		public bool ReadData { get; set; }

		public JsonExtensionDataAttribute()
		{
			WriteData = true;
			ReadData = true;
		}
	}
	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
	public sealed class JsonIgnoreAttribute : Attribute
	{
	}
	public abstract class JsonNameTable
	{
		public abstract string? Get(char[] key, int start, int length);
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface, AllowMultiple = false)]
	public sealed class JsonObjectAttribute : JsonContainerAttribute
	{
		private MemberSerialization _memberSerialization;

		internal MissingMemberHandling? _missingMemberHandling;

		internal Required? _itemRequired;

		internal NullValueHandling? _itemNullValueHandling;

		public MemberSerialization MemberSerialization
		{
			get
			{
				return _memberSerialization;
			}
			set
			{
				_memberSerialization = value;
			}
		}

		public MissingMemberHandling MissingMemberHandling
		{
			get
			{
				return _missingMemberHandling.GetValueOrDefault();
			}
			set
			{
				_missingMemberHandling = value;
			}
		}

		public NullValueHandling ItemNullValueHandling
		{
			get
			{
				return _itemNullValueHandling.GetValueOrDefault();
			}
			set
			{
				_itemNullValueHandling = value;
			}
		}

		public Required ItemRequired
		{
			get
			{
				return _itemRequired.GetValueOrDefault();
			}
			set
			{
				_itemRequired = value;
			}
		}

		public JsonObjectAttribute()
		{
		}

		public JsonObjectAttribute(MemberSerialization memberSerialization)
		{
			MemberSerialization = memberSerialization;
		}

		public JsonObjectAttribute(string id)
			: base(id)
		{
		}
	}
	internal enum JsonContainerType
	{
		None,
		Object,
		Array,
		Constructor
	}
	internal struct JsonPosition
	{
		private static readonly char[] SpecialCharacters = new char[18]
		{
			'.', ' ', '\'', '/', '"', '[', ']', '(', ')', '\t',
			'\n', '\r', '\f', '\b', '\\', '\u0085', '\u2028', '\u2029'
		};

		internal JsonContainerType Type;

		internal int Position;

		internal string? PropertyName;

		internal bool HasIndex;

		public JsonPosition(JsonContainerType type)
		{
			Type = type;
			HasIndex = TypeHasIndex(type);
			Position = -1;
			PropertyName = null;
		}

		internal int CalculateLength()
		{
			switch (Type)
			{
			case JsonContainerType.Object:
				return PropertyName.Length + 5;
			case JsonContainerType.Array:
			case JsonContainerType.Constructor:
				return MathUtils.IntLength((ulong)Position) + 2;
			default:
				throw new ArgumentOutOfRangeException("Type");
			}
		}

		internal void WriteTo(StringBuilder sb, ref StringWriter? writer, ref char[]? buffer)
		{
			switch (Type)
			{
			case JsonContainerType.Object:
			{
				string propertyName = PropertyName;
				if (propertyName.IndexOfAny(SpecialCharacters) != -1)
				{
					sb.Append("['");
					if (writer == null)
					{
						writer = new StringWriter(sb);
					}
					JavaScriptUtils.WriteEscapedJavaScriptString(writer, propertyName, '\'', appendDelimiters: false, JavaScriptUtils.SingleQuoteCharEscapeFlags, StringEscapeHandling.Default, null, ref buffer);
					sb.Append("']");
				}
				else
				{
					if (sb.Length > 0)
					{
						sb.Append('.');
					}
					sb.Append(propertyName);
				}
				break;
			}
			case JsonContainerType.Array:
			case JsonContainerType.Constructor:
				sb.Append('[');
				sb.Append(Position);
				sb.Append(']');
				break;
			}
		}

		internal static bool TypeHasIndex(JsonContainerType type)
		{
			if (type != JsonContainerType.Array)
			{
				return type == JsonContainerType.Constructor;
			}
			return true;
		}

		internal static string BuildPath(List<JsonPosition> positions, JsonPosition? currentPosition)
		{
			int num = 0;
			if (positions != null)
			{
				for (int i = 0; i < positions.Count; i++)
				{
					num += positions[i].CalculateLength();
				}
			}
			if (currentPosition.HasValue)
			{
				num += currentPosition.GetValueOrDefault().CalculateLength();
			}
			StringBuilder stringBuilder = new StringBuilder(num);
			StringWriter writer = null;
			char[] buffer = null;
			if (positions != null)
			{
				foreach (JsonPosition position in positions)
				{
					position.WriteTo(stringBuilder, ref writer, ref buffer);
				}
			}
			currentPosition?.WriteTo(stringBuilder, ref writer, ref buffer);
			return stringBuilder.ToString();
		}

		internal static string FormatMessage(IJsonLineInfo? lineInfo, string path, string message)
		{
			if (!message.EndsWith(Environment.NewLine, StringComparison.Ordinal))
			{
				message = message.Trim();
				if (!StringUtils.EndsWith(message, '.'))
				{
					message += ".";
				}
				message += " ";
			}
			message += "Path '{0}'".FormatWith(CultureInfo.InvariantCulture, path);
			if (lineInfo != null && lineInfo.HasLineInfo())
			{
				message += ", line {0}, position {1}".FormatWith(CultureInfo.InvariantCulture, lineInfo.LineNumber, lineInfo.LinePosition);
			}
			message += ".";
			return message;
		}
	}
	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
	public sealed class JsonPropertyAttribute : Attribute
	{
		internal NullValueHandling? _nullValueHandling;

		internal DefaultValueHandling? _defaultValueHandling;

		internal ReferenceLoopHandling? _referenceLoopHandling;

		internal ObjectCreationHandling? _objectCreationHandling;

		internal TypeNameHandling? _typeNameHandling;

		internal bool? _isReference;

		internal int? _order;

		internal Required? _required;

		internal bool? _itemIsReference;

		internal ReferenceLoopHandling? _itemReferenceLoopHandling;

		internal TypeNameHandling? _itemTypeNameHandling;

		public Type? ItemConverterType { get; set; }

		public object[]? ItemConverterParameters { get; set; }

		public Type? NamingStrategyType { get; set; }

		public object[]? NamingStrategyParameters { get; set; }

		public NullValueHandling NullValueHandling
		{
			get
			{
				return _nullValueHandling.GetValueOrDefault();
			}
			set
			{
				_nullValueHandling = value;
			}
		}

		public DefaultValueHandling DefaultValueHandling
		{
			get
			{
				return _defaultValueHandling.GetValueOrDefault();
			}
			set
			{
				_defaultValueHandling = value;
			}
		}

		public ReferenceLoopHandling ReferenceLoopHandling
		{
			get
			{
				return _referenceLoopHandling.GetValueOrDefault();
			}
			set
			{
				_referenceLoopHandling = value;
			}
		}

		public ObjectCreationHandling ObjectCreationHandling
		{
			get
			{
				return _objectCreationHandling.GetValueOrDefault();
			}
			set
			{
				_objectCreationHandling = value;
			}
		}

		public TypeNameHandling TypeNameHandling
		{
			get
			{
				return _typeNameHandling.GetValueOrDefault();
			}
			set
			{
				_typeNameHandling = value;
			}
		}

		public bool IsReference
		{
			get
			{
				return _isReference.GetValueOrDefault();
			}
			set
			{
				_isReference = value;
			}
		}

		public int Order
		{
			get
			{
				return _order.GetValueOrDefault();
			}
			set
			{
				_order = value;
			}
		}

		public Required Required
		{
			get
			{
				return _required.GetValueOrDefault();
			}
			set
			{
				_required = value;
			}
		}

		public string? PropertyName { get; set; }

		public ReferenceLoopHandling ItemReferenceLoopHandling
		{
			get
			{
				return _itemReferenceLoopHandling.GetValueOrDefault();
			}
			set
			{
				_itemReferenceLoopHandling = value;
			}
		}

		public TypeNameHandling ItemTypeNameHandling
		{
			get
			{
				return _itemTypeNameHandling.GetValueOrDefault();
			}
			set
			{
				_itemTypeNameHandling = value;
			}
		}

		public bool ItemIsReference
		{
			get
			{
				return _itemIsReference.GetValueOrDefault();
			}
			set
			{
				_itemIsReference = value;
			}
		}

		public JsonPropertyAttribute()
		{
		}

		public JsonPropertyAttribute(string propertyName)
		{
			PropertyName = propertyName;
		}
	}
	public abstract class JsonReader : IDisposable
	{
		protected internal enum State
		{
			Start,
			Complete,
			Property,
			ObjectStart,
			Object,
			ArrayStart,
			Array,
			Closed,
			PostValue,
			ConstructorStart,
			Constructor,
			Error,
			Finished
		}

		private JsonToken _tokenType;

		private object? _value;

		internal char _quoteChar;

		internal State _currentState;

		private JsonPosition _currentPosition;

		private CultureInfo? _culture;

		private DateTimeZoneHandling _dateTimeZoneHandling;

		private int? _maxDepth;

		private bool _hasExceededMaxDepth;

		internal DateParseHandling _dateParseHandling;

		internal FloatParseHandling _floatParseHandling;

		private string? _dateFormatString;

		private List<JsonPosition>? _stack;

		protected State CurrentState => _currentState;

		public bool CloseInput { get; set; }

		public bool SupportMultipleContent { get; set; }

		public virtual char QuoteChar
		{
			get
			{
				return _quoteChar;
			}
			protected internal set
			{
				_quoteChar = value;
			}
		}

		public DateTimeZoneHandling DateTimeZoneHandling
		{
			get
			{
				return _dateTimeZoneHandling;
			}
			set
			{
				if (value < DateTimeZoneHandling.Local || value > DateTimeZoneHandling.RoundtripKind)
				{
					throw new ArgumentOutOfRangeException("value");
				}
				_dateTimeZoneHandling = value;
			}
		}

		public DateParseHandling DateParseHandling
		{
			get
			{
				return _dateParseHandling;
			}
			set
			{
				if (value < DateParseHandling.None || value > DateParseHandling.DateTimeOffset)
				{
					throw new ArgumentOutOfRangeException("value");
				}
				_dateParseHandling = value;
			}
		}

		public FloatParseHandling FloatParseHandling
		{
			get
			{
				return _floatParseHandling;
			}
			set
			{
				if (value < FloatParseHandling.Double || value > FloatParseHandling.Decimal)
				{
					throw new ArgumentOutOfRangeException("value");
				}
				_floatParseHandling = value;
			}
		}

		public string? DateFormatString
		{
			get
			{
				return _dateFormatString;
			}
			set
			{
				_dateFormatString = value;
			}
		}

		public int? MaxDepth
		{
			get
			{
				return _maxDepth;
			}
			set
			{
				if (value <= 0)
				{
					throw new ArgumentException("Value must be positive.", "value");
				}
				_maxDepth = value;
			}
		}

		public virtual JsonToken TokenType => _tokenType;

		public virtual object? Value => _value;

		public virtual Type? ValueType => _value?.GetType();

		public virtual int Depth
		{
			get
			{
				int num = _stack?.Count ?? 0;
				if (JsonTokenUtils.IsStartToken(TokenType) || _currentPosition.Type == JsonContainerType.None)
				{
					return num;
				}
				return num + 1;
			}
		}

		public virtual string Path
		{
			get
			{
				if (_currentPosition.Type == JsonContainerType.None)
				{
					return string.Empty;
				}
				JsonPosition? currentPosition = ((_currentState != State.ArrayStart && _currentState != State.ConstructorStart && _currentState != State.ObjectStart) ? new JsonPosition?(_currentPosition) : null);
				return JsonPosition.BuildPath(_stack, currentPosition);
			}
		}

		public CultureInfo Culture
		{
			get
			{
				return _culture ?? CultureInfo.InvariantCulture;
			}
			set
			{
				_culture = value;
			}
		}

		public virtual Task<bool> ReadAsync(CancellationToken cancellationToken = default(CancellationToken))
		{
			return cancellationToken.CancelIfRequestedAsync<bool>() ?? Read().ToAsync();
		}

		public async Task SkipAsync(CancellationToken cancellationToken = default(CancellationToken))
		{
			if (TokenType == JsonToken.PropertyName)
			{
				await ReadAsync(cancellationToken).ConfigureAwait(continueOnCapturedContext: false);
			}
			if (JsonTokenUtils.IsStartToken(TokenType))
			{
				int depth = Depth;
				while (await ReadAsync(cancellationToken).ConfigureAwait(continueOnCapturedContext: false) && depth < Depth)
				{
				}
			}
		}

		internal async Task ReaderReadAndAssertAsync(CancellationToken cancellationToken)
		{
			if (!(await ReadAsync(cancellationToken).ConfigureAwait(continueOnCapturedContext: false)))
			{
				throw CreateUnexpectedEndException();
			}
		}

		public virtual Task<bool?> ReadAsBooleanAsync(CancellationToken cancellationToken = default(CancellationToken))
		{
			return cancellationToken.CancelIfRequestedAsync<bool?>() ?? Task.FromResult(ReadAsBoolean());
		}

		public virtual Task<byte[]?> ReadAsBytesAsync(CancellationToken cancellationToken = default(CancellationToken))
		{
			return cancellationToken.CancelIfRequestedAsync<byte[]>() ?? Task.FromResult(ReadAsBytes());
		}

		internal async Task<byte[]?> ReadArrayIntoByteArrayAsync(CancellationToken cancellationToken)
		{
			List<byte> buffer = new List<byte>();
			do
			{
				if (!(await ReadAsync(cancellationToken).ConfigureAwait(continueOnCapturedContext: false)))
				{
					SetToken(JsonToken.None);
				}
			}
			while (!ReadArrayElementIntoByteArrayReportDone(buffer));
			byte[] array = buffer.ToArray();
			SetToken(JsonToken.Bytes, array, updateIndex: false);
			return array;
		}

		public virtual Task<DateTime?> ReadAsDateTimeAsync(CancellationToken cancellationToken = default(CancellationToken))
		{
			return cancellationToken.CancelIfRequestedAsync<DateTime?>() ?? Task.FromResult(ReadAsDateTime());
		}

		public virtual Task<DateTimeOffset?> ReadAsDateTimeOffsetAsync(CancellationToken cancellationToken = default(CancellationToken))
		{
			return cancellationToken.CancelIfRequestedAsync<DateTimeOffset?>() ?? Task.FromResult(ReadAsDateTimeOffset());
		}

		public virtual Task<decimal?> ReadAsDecimalAsync(CancellationToken cancellationToken = default(CancellationToken))
		{
			return cancellationToken.CancelIfRequestedAsync<decimal?>() ?? Task.FromResult(ReadAsDecimal());
		}

		public virtual Task<double?> ReadAsDoubleAsync(CancellationToken cancellationToken = default(CancellationToken))
		{
			return Task.FromResult(ReadAsDouble());
		}

		public virtual Task<int?> ReadAsInt32Async(CancellationToken cancellationToken = default(CancellationToken))
		{
			return cancellationToken.CancelIfRequestedAsync<int?>() ?? Task.FromResult(ReadAsInt32());
		}

		public virtual Task<string?> ReadAsStringAsync(CancellationToken cancellationToken = default(CancellationToken))
		{
			return cancellationToken.CancelIfRequestedAsync<string>() ?? Task.FromResult(ReadAsString());
		}

		internal async Task<bool> ReadAndMoveToContentAsync(CancellationToken cancellationToken)
		{
			bool flag = await ReadAsync(cancellationToken).ConfigureAwait(continueOnCapturedContext: false);
			if (flag)
			{
				flag = await MoveToContentAsync(cancellationToken).ConfigureAwait(continueOnCapturedContext: false);
			}
			return flag;
		}

		internal Task<bool> MoveToContentAsync(CancellationToken cancellationToken)
		{
			JsonToken tokenType = TokenType;
			if (tokenType == JsonToken.None || tokenType == JsonToken.Comment)
			{
				return MoveToContentFromNonContentAsync(cancellationToken);
			}
			return AsyncUtils.True;
		}

		private async Task<bool> MoveToContentFromNonContentAsync(CancellationToken cancellationToken)
		{
			JsonToken tokenType;
			do
			{
				if (!(await ReadAsync(cancellationToken).ConfigureAwait(continueOnCapturedContext: false)))
				{
					return false;
				}
				tokenType = TokenType;
			}
			while (tokenType == JsonToken.None || tokenType == JsonToken.Comment);
			return true;
		}

		internal JsonPosition GetPosition(int depth)
		{
			if (_stack != null && depth < _stack.Count)
			{
				return _stack[depth];
			}
			return _currentPosition;
		}

		protected JsonReader()
		{
			_currentState = State.Start;
			_dateTimeZoneHandling = DateTimeZoneHandling.RoundtripKind;
			_dateParseHandling = DateParseHandling.DateTime;
			_floatParseHandling = FloatParseHandling.Double;
			CloseInput = true;
		}

		private void Push(JsonContainerType value)
		{
			UpdateScopeWithFinishedValue();
			if (_currentPosition.Type == JsonContainerType.None)
			{
				_currentPosition = new JsonPosition(value);
				return;
			}
			if (_stack == null)
			{
				_stack = new List<JsonPosition>();
			}
			_stack.Add(_currentPosition);
			_currentPosition = new JsonPosition(value);
			if (!_maxDepth.HasValue || !(Depth + 1 > _maxDepth) || _hasExceededMaxDepth)
			{
				return;
			}
			_hasExceededMaxDepth = true;
			throw JsonReaderException.Create(this, "The reader's MaxDepth of {0} has been exceeded.".FormatWith(CultureInfo.InvariantCulture, _maxDepth));
		}

		private JsonContainerType Pop()
		{
			JsonPosition currentPosition;
			if (_stack != null && _stack.Count > 0)
			{
				currentPosition = _currentPosition;
				_currentPosition = _stack[_stack.Count - 1];
				_stack.RemoveAt(_stack.Count - 1);
			}
			else
			{
				currentPosition = _currentPosition;
				_currentPosition = default(JsonPosition);
			}
			if (_maxDepth.HasValue && Depth <= _maxDepth)
			{
				_hasExceededMaxDepth = false;
			}
			return currentPosition.Type;
		}

		private JsonContainerType Peek()
		{
			return _currentPosition.Type;
		}

		public abstract bool Read();

		public virtual int? ReadAsInt32()
		{
			JsonToken contentToken = GetContentToken();
			switch (contentToken)
			{
			case JsonToken.None:
			case JsonToken.Null:
			case JsonToken.EndArray:
				return null;
			case JsonToken.Integer:
			case JsonToken.Float:
			{
				object value = Value;
				if (value is int)
				{
					return (int)value;
				}
				int num;
				if (value is BigInteger bigInteger)
				{
					num = (int)bigInteger;
				}
				else
				{
					try
					{
						num = Convert.ToInt32(value, CultureInfo.InvariantCulture);
					}
					catch (Exception ex)
					{
						throw JsonReaderException.Create(this, "Could not convert to integer: {0}.".FormatWith(CultureInfo.InvariantCulture, value), ex);
					}
				}
				SetToken(JsonToken.Integer, num, updateIndex: false);
				return num;
			}
			case JsonToken.String:
			{
				string s = (string)Value;
				return ReadInt32String(s);
			}
			default:
				throw JsonReaderException.Create(this, "Error reading integer. Unexpected token: {0}.".FormatWith(CultureInfo.InvariantCulture, contentToken));
			}
		}

		internal int? ReadInt32String(string? s)
		{
			if (StringUtils.IsNullOrEmpty(s))
			{
				SetToken(JsonToken.Null, null, updateIndex: false);
				return null;
			}
			if (int.TryParse(s, NumberStyles.Integer, Culture, out var result))
			{
				SetToken(JsonToken.Integer, result, updateIndex: false);
				return result;
			}
			SetToken(JsonToken.String, s, updateIndex: false);
			throw JsonReaderException.Create(this, "Could not convert string to integer: {0}.".FormatWith(CultureInfo.InvariantCulture, s));
		}

		public virtual string? ReadAsString()
		{
			JsonToken contentToken = GetContentToken();
			switch (contentToken)
			{
			case JsonToken.None:
			case JsonToken.Null:
			case JsonToken.EndArray:
				return null;
			case JsonToken.String:
				return (string)Value;
			default:
				if (JsonTokenUtils.IsPrimitiveToken(contentToken))
				{
					object value = Value;
					if (value != null)
					{
						string text = ((!(value is IFormattable formattable)) ? ((value is Uri uri) ? uri.OriginalString : value.ToString()) : formattable.ToString(null, Culture));
						SetToken(JsonToken.String, text, updateIndex: false);
						return text;
					}
				}
				throw JsonReaderException.Create(this, "Error reading string. Unexpected token: {0}.".FormatWith(CultureInfo.InvariantCulture, contentToken));
			}
		}

		public virtual byte[]? ReadAsBytes()
		{
			JsonToken contentToken = GetContentToken();
			switch (contentToken)
			{
			case JsonToken.StartObject:
			{
				ReadIntoWrappedTypeObject();
				byte[] array2 = ReadAsBytes();
				ReaderReadAndAssert();
				if (TokenType != JsonToken.EndObject)
				{
					throw JsonReaderException.Create(this, "Error reading bytes. Unexpected token: {0}.".FormatWith(CultureInfo.InvariantCulture, TokenType));
				}
				SetToken(JsonToken.Bytes, array2, updateIndex: false);
				return array2;
			}
			case JsonToken.String:
			{
				string text = (string)Value;
				Guid g;
				byte[] array3 = ((text.Length == 0) ? CollectionUtils.ArrayEmpty<byte>() : ((!ConvertUtils.TryConvertGuid(text, out g)) ? Convert.FromBase64String(text) : g.ToByteArray()));
				SetToken(JsonToken.Bytes, array3, updateIndex: false);
				return array3;
			}
			case JsonToken.None:
			case JsonToken.Null:
			case JsonToken.EndArray:
				return null;
			case JsonToken.Bytes:
				if (Value is Guid guid)
				{
					byte[] array = guid.ToByteArray();
					SetToken(JsonToken.Bytes, array, updateIndex: false);
					return array;
				}
				return (byte[])Value;
			case JsonToken.StartArray:
				return ReadArrayIntoByteArray();
			default:
				throw JsonReaderException.Create(this, "Error reading bytes. Unexpected token: {0}.".FormatWith(CultureInfo.InvariantCulture, contentToken));
			}
		}

		internal byte[] ReadArrayIntoByteArray()
		{
			List<byte> list = new List<byte>();
			do
			{
				if (!Read())
				{
					SetToken(JsonToken.None);
				}
			}
			while (!ReadArrayElementIntoByteArrayReportDone(list));
			byte[] array = list.ToArray();
			SetToken(JsonToken.Bytes, array, updateIndex: false);
			return array;
		}

		private bool ReadArrayElementIntoByteArrayReportDone(List<byte> buffer)
		{
			switch (TokenType)
			{
			case JsonToken.None:
				throw JsonReaderException.Create(this, "Unexpected end when reading bytes.");
			case JsonToken.Integer:
				buffer.Add(Convert.ToByte(Value, CultureInfo.InvariantCulture));
				return false;
			case JsonToken.EndArray:
				return true;
			case JsonToken.Comment:
				return false;
			default:
				throw JsonReaderException.Create(this, "Unexpected token when reading bytes: {0}.".FormatWith(CultureInfo.InvariantCulture, TokenType));
			}
		}

		public virtual double? ReadAsDouble()
		{
			JsonToken contentToken = GetContentToken();
			switch (contentToken)
			{
			case JsonToken.None:
			case JsonToken.Null:
			case JsonToken.EndArray:
				return null;
			case JsonToken.Integer:
			case JsonToken.Float:
			{
				object value = Value;
				if (value is double)
				{
					return (double)value;
				}
				double num = ((!(value is BigInteger bigInteger)) ? Convert.ToDouble(value, CultureInfo.InvariantCulture) : ((double)bigInteger));
				SetToken(JsonToken.Float, num, updateIndex: false);
				return num;
			}
			case JsonToken.String:
				return ReadDoubleString((string)Value);
			default:
				throw JsonReaderException.Create(this, "Error reading double. Unexpected token: {0}.".FormatWith(CultureInfo.InvariantCulture, contentToken));
			}
		}

		internal double? ReadDoubleString(string? s)
		{
			if (StringUtils.IsNullOrEmpty(s))
			{
				SetToken(JsonToken.Null, null, updateIndex: false);
				return null;
			}
			if (double.TryParse(s, NumberStyles.Float | NumberStyles.AllowThousands, Culture, out var result))
			{
				SetToken(JsonToken.Float, result, updateIndex: false);
				return result;
			}
			SetToken(JsonToken.String, s, updateIndex: false);
			throw JsonReaderException.Create(this, "Could not convert string to double: {0}.".FormatWith(CultureInfo.InvariantCulture, s));
		}

		public virtual bool? ReadAsBoolean()
		{
			JsonToken contentToken = GetContentToken();
			switch (contentToken)
			{
			case JsonToken.None:
			case JsonToken.Null:
			case JsonToken.EndArray:
				return null;
			case JsonToken.Integer:
			case JsonToken.Float:
			{
				bool flag = ((!(Value is BigInteger bigInteger)) ? Convert.ToBoolean(Value, CultureInfo.InvariantCulture) : (bigInteger != 0L));
				SetToken(JsonToken.Boolean, flag, updateIndex: false);
				return flag;
			}
			case JsonToken.String:
				return ReadBooleanString((string)Value);
			case JsonToken.Boolean:
				return (bool)Value;
			default:
				throw JsonReaderException.Create(this, "Error reading boolean. Unexpected token: {0}.".FormatWith(CultureInfo.InvariantCulture, contentToken));
			}
		}

		internal bool? ReadBooleanString(string? s)
		{
			if (StringUtils.IsNullOrEmpty(s))
			{
				SetToken(JsonToken.Null, null, updateIndex: false);
				return null;
			}
			if (bool.TryParse(s, out var result))
			{
				SetToken(JsonToken.Boolean, result, updateIndex: false);
				return result;
			}
			SetToken(JsonToken.String, s, updateIndex: false);
			throw JsonReaderException.Create(this, "Could not convert string to boolean: {0}.".FormatWith(CultureInfo.InvariantCulture, s));
		}

		public virtual decimal? ReadAsDecimal()
		{
			JsonToken contentToken = GetContentToken();
			switch (contentToken)
			{
			case JsonToken.None:
			case JsonToken.Null:
			case JsonToken.EndArray:
				return null;
			case JsonToken.Integer:
			case JsonToken.Float:
			{
				object value = Value;
				if (value is decimal)
				{
					return (decimal)value;
				}
				decimal num;
				if (value is BigInteger bigInteger)
				{
					num = (decimal)bigInteger;
				}
				else
				{
					try
					{
						num = Convert.ToDecimal(value, CultureInfo.InvariantCulture);
					}
					catch (Exception ex)
					{
						throw JsonReaderException.Create(this, "Could not convert to decimal: {0}.".FormatWith(CultureInfo.InvariantCulture, value), ex);
					}
				}
				SetToken(JsonToken.Float, num, updateIndex: false);
				return num;
			}
			case JsonToken.String:
				return ReadDecimalString((string)Value);
			default:
				throw JsonReaderException.Create(this, "Error reading decimal. Unexpected token: {0}.".FormatWith(CultureInfo.InvariantCulture, contentToken));
			}
		}

		internal decimal? ReadDecimalString(string? s)
		{
			if (StringUtils.IsNullOrEmpty(s))
			{
				SetToken(JsonToken.Null, null, updateIndex: false);
				return null;
			}
			if (decimal.TryParse(s, NumberStyles.Number, Culture, out var result))
			{
				SetToken(JsonToken.Float, result, updateIndex: false);
				return result;
			}
			if (ConvertUtils.DecimalTryParse(s.ToCharArray(), 0, s.Length, out result) == ParseResult.Success)
			{
				SetToken(JsonToken.Float, result, updateIndex: false);
				return result;
			}
			SetToken(JsonToken.String, s, updateIndex: false);
			throw JsonReaderException.Create(this, "Could not convert string to decimal: {0}.".FormatWith(CultureInfo.InvariantCulture, s));
		}

		public virtual DateTime? ReadAsDateTime()
		{
			switch (GetContentToken())
			{
			case JsonToken.None:
			case JsonToken.Null:
			case JsonToken.EndArray:
				return null;
			case JsonToken.Date:
				if (Value is DateTimeOffset dateTimeOffset)
				{
					SetToken(JsonToken.Date, dateTimeOffset.DateTime, updateIndex: false);
				}
				return (DateTime)Value;
			case JsonToken.String:
				return ReadDateTimeString((string)Value);
			default:
				throw JsonReaderException.Create(this, "Error reading date. Unexpected token: {0}.".FormatWith(CultureInfo.InvariantCulture, TokenType));
			}
		}

		internal DateTime? ReadDateTimeString(string? s)
		{
			if (StringUtils.IsNullOrEmpty(s))
			{
				SetToken(JsonToken.Null, null, updateIndex: false);
				return null;
			}
			if (DateTimeUtils.TryParseDateTime(s, DateTimeZoneHandling, _dateFormatString, Culture, out var dt))
			{
				dt = DateTimeUtils.EnsureDateTime(dt, DateTimeZoneHandling);
				SetToken(JsonToken.Date, dt, updateIndex: false);
				return dt;
			}
			if (DateTime.TryParse(s, Culture, DateTimeStyles.RoundtripKind, out dt))
			{
				dt = DateTimeUtils.EnsureDateTime(dt, DateTimeZoneHandling);
				SetToken(JsonToken.Date, dt, updateIndex: false);
				return dt;
			}
			throw JsonReaderException.Create(this, "Could not convert string to DateTime: {0}.".FormatWith(CultureInfo.InvariantCulture, s));
		}

		public virtual DateTimeOffset? ReadAsDateTimeOffset()
		{
			JsonToken contentToken = GetContentToken();
			switch (contentToken)
			{
			case JsonToken.None:
			case JsonToken.Null:
			case JsonToken.EndArray:
				return null;
			case JsonToken.Date:
				if (Value is DateTime dateTime)
				{
					SetToken(JsonToken.Date, new DateTimeOffset(dateTime), updateIndex: false);
				}
				return (DateTimeOffset)Value;
			case JsonToken.String:
			{
				string s = (string)Value;
				return ReadDateTimeOffsetString(s);
			}
			default:
				throw JsonReaderException.Create(this, "Error reading date. Unexpected token: {0}.".FormatWith(CultureInfo.InvariantCulture, contentToken));
			}
		}

		internal DateTimeOffset? ReadDateTimeOffsetString(string? s)
		{
			if (StringUtils.IsNullOrEmpty(s))
			{
				SetToken(JsonToken.Null, null, updateIndex: false);
				return null;
			}
			if (DateTimeUtils.TryParseDateTimeOffset(s, _dateFormatString, Culture, out var dt))
			{
				SetToken(JsonToken.Date, dt, updateIndex: false);
				return dt;
			}
			if (DateTimeOffset.TryParse(s, Culture, DateTimeStyles.RoundtripKind, out dt))
			{
				SetToken(JsonToken.Date, dt, updateIndex: false);
				return dt;
			}
			SetToken(JsonToken.String, s, updateIndex: false);
			throw JsonReaderException.Create(this, "Could not convert string to DateTimeOffset: {0}.".FormatWith(CultureInfo.InvariantCulture, s));
		}

		internal void ReaderReadAndAssert()
		{
			if (!Read())
			{
				throw CreateUnexpectedEndException();
			}
		}

		internal JsonReaderException CreateUnexpectedEndException()
		{
			return JsonReaderException.Create(this, "Unexpected end when reading JSON.");
		}

		internal void ReadIntoWrappedTypeObject()
		{
			ReaderReadAndAssert();
			if (Value != null && Value.ToString() == "$type")
			{
				ReaderReadAndAssert();
				if (Value != null && Value.ToString().StartsWith("System.Byte[]", StringComparison.Ordinal))
				{
					ReaderReadAndAssert();
					if (Value.ToString() == "$value")
					{
						return;
					}
				}
			}
			throw JsonReaderException.Create(this, "Error reading bytes. Unexpected token: {0}.".FormatWith(CultureInfo.InvariantCulture, JsonToken.StartObject));
		}

		public void Skip()
		{
			if (TokenType == JsonToken.PropertyName)
			{
				Read();
			}
			if (JsonTokenUtils.IsStartToken(TokenType))
			{
				int depth = Depth;
				while (Read() && depth < Depth)
				{
				}
			}
		}

		protected void SetToken(JsonToken newToken)
		{
			SetToken(newToken, null, updateIndex: true);
		}

		protected void SetToken(JsonToken newToken, object? value)
		{
			SetToken(newToken, value, updateIndex: true);
		}

		protected void SetToken(JsonToken newToken, object? value, bool updateIndex)
		{
			_tokenType = newToken;
			_value = value;
			switch (newToken)
			{
			case JsonToken.StartObject:
				_currentState = State.ObjectStart;
				Push(JsonContainerType.Object);
				break;
			case JsonToken.StartArray:
				_currentState = State.ArrayStart;
				Push(JsonContainerType.Array);
				break;
			case JsonToken.StartConstructor:
				_currentState = State.ConstructorStart;
				Push(JsonContainerType.Constructor);
				break;
			case JsonToken.EndObject:
				ValidateEnd(JsonToken.EndObject);
				break;
			case JsonToken.EndArray:
				ValidateEnd(JsonToken.EndArray);
				break;
			case JsonToken.EndConstructor:
				ValidateEnd(JsonToken.EndConstructor);
				break;
			case JsonToken.PropertyName:
				_currentState = State.Property;
				_currentPosition.PropertyName = (string)value;
				break;
			case JsonToken.Raw:
			case JsonToken.Integer:
			case JsonToken.Float:
			case JsonToken.String:
			case JsonToken.Boolean:
			case JsonToken.Null:
			case JsonToken.Undefined:
			case JsonToken.Date:
			case JsonToken.Bytes:
				SetPostValueState(updateIndex);
				break;
			case JsonToken.Comment:
				break;
			}
		}

		internal void SetPostValueState(bool updateIndex)
		{
			if (Peek() != 0 || SupportMultipleContent)
			{
				_currentState = State.PostValue;
			}
			else
			{
				SetFinished();
			}
			if (updateIndex)
			{
				UpdateScopeWithFinishedValue();
			}
		}

		private void UpdateScopeWithFinishedValue()
		{
			if (_currentPosition.HasIndex)
			{
				_currentPosition.Position++;
			}
		}

		private void ValidateEnd(JsonToken endToken)
		{
			JsonContainerType jsonContainerType = Pop();
			if (GetTypeForCloseToken(endToken) != jsonContainerType)
			{
				throw JsonReaderException.Create(this, "JsonToken {0} is not valid for closing JsonType {1}.".FormatWith(CultureInfo.InvariantCulture, endToken, jsonContainerType));
			}
			if (Peek() != 0 || SupportMultipleContent)
			{
				_currentState = State.PostValue;
			}
			else
			{
				SetFinished();
			}
		}

		protected void SetStateBasedOnCurrent()
		{
			JsonContainerType jsonContainerType = Peek();
			switch (jsonContainerType)
			{
			case JsonContainerType.Object:
				_currentState = State.Object;
				break;
			case JsonContainerType.Array:
				_currentState = State.Array;
				break;
			case JsonContainerType.Constructor:
				_currentState = State.Constructor;
				break;
			case JsonContainerType.None:
				SetFinished();
				break;
			default:
				throw JsonReaderException.Create(this, "While setting the reader state back to current object an unexpected JsonType was encountered: {0}".FormatWith(CultureInfo.InvariantCulture, jsonContainerType));
			}
		}

		private void SetFinished()
		{
			_currentState = ((!SupportMultipleContent) ? State.Finished : State.Start);
		}

		private JsonContainerType GetTypeForCloseToken(JsonToken token)
		{
			return token switch
			{
				JsonToken.EndObject => JsonContainerType.Object, 
				JsonToken.EndArray => JsonContainerType.Array, 
				JsonToken.EndConstructor => JsonContainerType.Constructor, 
				_ => throw JsonReaderException.Create(this, "Not a valid close JsonToken: {0}".FormatWith(CultureInfo.InvariantCulture, token)), 
			};
		}

		void IDisposable.Dispose()
		{
			Dispose(disposing: true);
			GC.SuppressFinalize(this);
		}

		protected virtual void Dispose(bool disposing)
		{
			if (_currentState != State.Closed && disposing)
			{
				Close();
			}
		}

		public virtual void Close()
		{
			_currentState = State.Closed;
			_tokenType = JsonToken.None;
			_value = null;
		}

		internal void ReadAndAssert()
		{
			if (!Read())
			{
				throw JsonSerializationException.Create(this, "Unexpected end when reading JSON.");
			}
		}

		internal void ReadForTypeAndAssert(JsonContract? contract, bool hasConverter)
		{
			if (!ReadForType(contract, hasConverter))
			{
				throw JsonSerializationException.Create(this, "Unexpected end when reading JSON.");
			}
		}

		internal bool ReadForType(JsonContract? contract, bool hasConverter)
		{
			if (hasConverter)
			{
				return Read();
			}
			switch (contract?.InternalReadType ?? ReadType.Read)
			{
			case ReadType.Read:
				return ReadAndMoveToContent();
			case ReadType.ReadAsInt32:
				ReadAsInt32();
				break;
			case ReadType.ReadAsInt64:
			{
				bool result = ReadAndMoveToContent();
				if (TokenType == JsonToken.Undefined)
				{
					throw JsonReaderException.Create(this, "An undefined token is not a valid {0}.".FormatWith(CultureInfo.InvariantCulture, contract?.UnderlyingType ?? typeof(long)));
				}
				return result;
			}
			case ReadType.ReadAsDecimal:
				ReadAsDecimal();
				break;
			case ReadType.ReadAsDouble:
				ReadAsDouble();
				break;
			case ReadType.ReadAsBytes:
				ReadAsBytes();
				break;
			case ReadType.ReadAsBoolean:
				ReadAsBoolean();
				break;
			case ReadType.ReadAsString:
				ReadAsString();
				break;
			case ReadType.ReadAsDateTime:
				ReadAsDateTime();
				break;
			case ReadType.ReadAsDateTimeOffset:
				ReadAsDateTimeOffset();
				break;
			default:
				throw new ArgumentOutOfRangeException();
			}
			return TokenType != JsonToken.None;
		}

		internal bool ReadAndMoveToContent()
		{
			if (Read())
			{
				return MoveToContent();
			}
			return false;
		}

		internal bool MoveToContent()
		{
			JsonToken tokenType = TokenType;
			while (tokenType == JsonToken.None || tokenType == JsonToken.Comment)
			{
				if (!Read())
				{
					return false;
				}
				tokenType = TokenType;
			}
			return true;
		}

		private JsonToken GetContentToken()
		{
			JsonToken tokenType;
			do
			{
				if (!Read())
				{
					SetToken(JsonToken.None);
					return JsonToken.None;
				}
				tokenType = TokenType;
			}
			while (tokenType == JsonToken.Comment);
			return tokenType;
		}
	}
	[Serializable]
	public class JsonReaderException : JsonException
	{
		public int LineNumber { get; }

		public int LinePosition { get; }

		public string? Path { get; }

		public JsonReaderException()
		{
		}

		public JsonReaderException(string message)
			: base(message)
		{
		}

		public JsonReaderException(string message, Exception innerException)
			: base(message, innerException)
		{
		}

		public JsonReaderException(SerializationInfo info, StreamingContext context)
			: base(info, context)
		{
		}

		public JsonReaderException(string message, string path, int lineNumber, int linePosition, Exception? innerException)
			: base(message, innerException)
		{
			Path = path;
			LineNumber = lineNumber;
			LinePosition = linePosition;
		}

		internal static JsonReaderException Create(JsonReader reader, string message)
		{
			return Create(reader, message, null);
		}

		internal static JsonReaderException Create(JsonReader reader, string message, Exception? ex)
		{
			return Create(reader as IJsonLineInfo, reader.Path, message, ex);
		}

		internal static JsonReaderException Create(IJsonLineInfo? lineInfo, string path, string message, Exception? ex)
		{
			message = JsonPosition.FormatMessage(lineInfo, path, message);
			int lineNumber;
			int linePosition;
			if (lineInfo != null && lineInfo.HasLineInfo())
			{
				lineNumber = lineInfo.LineNumber;
				linePosition = lineInfo.LinePosition;
			}
			else
			{
				lineNumber = 0;
				linePosition = 0;
			}
			return new JsonReaderException(message, path, lineNumber, linePosition, ex);
		}
	}
	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
	public sealed class JsonRequiredAttribute : Attribute
	{
	}
	[Serializable]
	public class JsonSerializationException : JsonException
	{
		public int LineNumber { get; }

		public int LinePosition { get; }

		public string? Path { get; }

		public JsonSerializationException()
		{
		}

		public JsonSerializationException(string message)
			: base(message)
		{
		}

		public JsonSerializationException(string message, Exception innerException)
			: base(message, innerException)
		{
		}

		public JsonSerializationException(SerializationInfo info, StreamingContext context)
			: base(info, context)
		{
		}

		public JsonSerializationException(string message, string path, int lineNumber, int linePosition, Exception? innerException)
			: base(message, innerException)
		{
			Path = path;
			LineNumber = lineNumber;
			LinePosition = linePosition;
		}

		internal static JsonSerializationException Create(JsonReader reader, string message)
		{
			return Create(reader, message, null);
		}

		internal static JsonSerializationException Create(JsonReader reader, string message, Exception? ex)
		{
			return Create(reader as IJsonLineInfo, reader.Path, message, ex);
		}

		internal static JsonSerializationException Create(IJsonLineInfo? lineInfo, string path, string message, Exception? ex)
		{
			message = JsonPosition.FormatMessage(lineInfo, path, message);
			int lineNumber;
			int linePosition;
			if (lineInfo != null && lineInfo.HasLineInfo())
			{
				lineNumber = lineInfo.LineNumber;
				linePosition = lineInfo.LinePosition;
			}
			else
			{
				lineNumber = 0;
				linePosition = 0;
			}
			return new JsonSerializationException(message, path, lineNumber, linePosition, ex);
		}
	}
	public class JsonSerializer
	{
		internal TypeNameHandling _typeNameHandling;

		internal TypeNameAssemblyFormatHandling _typeNameAssemblyFormatHandling;

		internal PreserveReferencesHandling _preserveReferencesHandling;

		internal ReferenceLoopHandling _referenceLoopHandling;

		internal MissingMemberHandling _missingMemberHandling;

		internal ObjectCreationHandling _objectCreationHandling;

		internal NullValueHandling _nullValueHandling;

		internal DefaultValueHandling _defaultValueHandling;

		internal ConstructorHandling _constructorHandling;

		internal MetadataPropertyHandling _metadataPropertyHandling;

		internal JsonConverterCollection? _converters;

		internal IContractResolver _contractResolver;

		internal ITraceWriter? _traceWriter;

		internal IEqualityComparer? _equalityComparer;

		internal ISerializationBinder _serializationBinder;

		internal StreamingContext _context;

		private IReferenceResolver? _referenceResolver;

		private Formatting? _formatting;

		private DateFormatHandling? _dateFormatHandling;

		private DateTimeZoneHandling? _dateTimeZoneHandling;

		private DateParseHandling? _dateParseHandling;

		private FloatFormatHandling? _floatFormatHandling;

		private FloatParseHandling? _floatParseHandling;

		private StringEscapeHandling? _stringEscapeHandling;

		private CultureInfo _culture;

		private int? _maxDepth;

		private bool _maxDepthSet;

		private bool? _checkAdditionalContent;

		private string? _dateFormatString;

		private bool _dateFormatStringSet;

		public virtual IReferenceResolver? ReferenceResolver
		{
			get
			{
				return GetReferenceResolver();
			}
			set
			{
				if (value == null)
				{
					throw new ArgumentNullException("value", "Reference resolver cannot be null.");
				}
				_referenceResolver = value;
			}
		}

		[Obsolete("Binder is obsolete. Use SerializationBinder instead.")]
		public virtual SerializationBinder Binder
		{
			get
			{
				if (_serializationBinder is SerializationBinder result)
				{
					return result;
				}
				if (_serializationBinder is SerializationBinderAdapter serializationBinderAdapter)
				{
					return serializationBinderAdapter.SerializationBinder;
				}
				throw new InvalidOperationException("Cannot get SerializationBinder because an ISerializationBinder was previously set.");
			}
			set
			{
				if (value == null)
				{
					throw new ArgumentNullException("value", "Serialization binder cannot be null.");
				}
				_serializationBinder = (value as ISerializationBinder) ?? new SerializationBinderAdapter(value);
			}
		}

		public virtual ISerializationBinder SerializationBinder
		{
			get
			{
				return _serializationBinder;
			}
			set
			{
				if (value == null)
				{
					throw new ArgumentNullException("value", "Serialization binder cannot be null.");
				}
				_serializationBinder = value;
			}
		}

		public virtual ITraceWriter? TraceWriter
		{
			get
			{
				return _traceWriter;
			}
			set
			{
				_traceWriter = value;
			}
		}

		public virtual IEqualityComparer? EqualityComparer
		{
			get
			{
				return _equalityComparer;
			}
			set
			{
				_equalityComparer = value;
			}
		}

		public virtual TypeNameHandling TypeNameHandling
		{
			get
			{
				return _typeNameHandling;
			}
			set
			{
				if (value < TypeNameHandling.None || value > TypeNameHandling.Auto)
				{
					throw new ArgumentOutOfRangeException("value");
				}
				_typeNameHandling = value;
			}
		}

		[Obsolete("TypeNameAssemblyFormat is obsolete. Use TypeNameAssemblyFormatHandling instead.")]
		public virtual FormatterAssemblyStyle TypeNameAssemblyFormat
		{
			get
			{
				return (FormatterAssemblyStyle)_typeNameAssemblyFormatHandling;
			}
			set
			{
				if (value < FormatterAssemblyStyle.Simple || value > FormatterAssemblyStyle.Full)
				{
					throw new ArgumentOutOfRangeException("value");
				}
				_typeNameAssemblyFormatHandling = (TypeNameAssemblyFormatHandling)value;
			}
		}

		public virtual TypeNameAssemblyFormatHandling TypeNameAssemblyFormatHandling
		{
			get
			{
				return _typeNameAssemblyFormatHandling;
			}
			set
			{
				if (value < TypeNameAssemblyFormatHandling.Simple || value > TypeNameAssemblyFormatHandling.Full)
				{
					throw new ArgumentOutOfRangeException("value");
				}
				_typeNameAssemblyFormatHandling = value;
			}
		}

		public virtual PreserveReferencesHandling PreserveReferencesHandling
		{
			get
			{
				return _preserveReferencesHandling;
			}
			set
			{
				if (value < PreserveReferencesHandling.None || value > PreserveReferencesHandling.All)
				{
					throw new ArgumentOutOfRangeException("value");
				}
				_preserveReferencesHandling = value;
			}
		}

		public virtual ReferenceLoopHandling ReferenceLoopHandling
		{
			get
			{
				return _referenceLoopHandling;
			}
			set
			{
				if (value < ReferenceLoopHandling.Error || value > ReferenceLoopHandling.Serialize)
				{
					throw new ArgumentOutOfRangeException("value");
				}
				_referenceLoopHandling = value;
			}
		}

		public virtual MissingMemberHandling MissingMemberHandling
		{
			get
			{
				return _missingMemberHandling;
			}
			set
			{
				if (value < MissingMemberHandling.Ignore || value > MissingMemberHandling.Error)
				{
					throw new ArgumentOutOfRangeException("value");
				}
				_missingMemberHandling = value;
			}
		}

		public virtual NullValueHandling NullValueHandling
		{
			get
			{
				return _nullValueHandling;
			}
			set
			{
				if (value < NullValueHandling.Include || value > NullValueHandling.Ignore)
				{
					throw new ArgumentOutOfRangeException("value");
				}
				_nullValueHandling = value;
			}
		}

		public virtual DefaultValueHandling DefaultValueHandling
		{
			get
			{
				return _defaultValueHandling;
			}
			set
			{
				if (value < DefaultValueHandling.Include || value > DefaultValueHandling.IgnoreAndPopulate)
				{
					throw new ArgumentOutOfRangeException("value");
				}
				_defaultValueHandling = value;
			}
		}

		public virtual ObjectCreationHandling ObjectCreationHandling
		{
			get
			{
				return _objectCreationHandling;
			}
			set
			{
				if (value < ObjectCreationHandling.Auto || value > ObjectCreationHandling.Replace)
				{
					throw new ArgumentOutOfRangeException("value");
				}
				_objectCreationHandling = value;
			}
		}

		public virtual ConstructorHandling ConstructorHandling
		{
			get
			{
				return _constructorHandling;
			}
			set
			{
				if (value < ConstructorHandling.Default || value > ConstructorHandling.AllowNonPublicDefaultConstructor)
				{
					throw new ArgumentOutOfRangeException("value");
				}
				_constructorHandling = value;
			}
		}

		public virtual MetadataPropertyHandling MetadataPropertyHandling
		{
			get
			{
				return _metadataPropertyHandling;
			}
			set
			{
				if (value < MetadataPropertyHandling.Default || value > MetadataPropertyHandling.Ignore)
				{
					throw new ArgumentOutOfRangeException("value");
				}
				_metadataPropertyHandling = value;
			}
		}

		public virtual JsonConverterCollection Converters
		{
			get
			{
				if (_converters == null)
				{
					_converters = new JsonConverterCollection();
				}
				return _converters;
			}
		}

		public virtual IContractResolver ContractResolver
		{
			get
			{
				return _contractResolver;
			}
			set
			{
				_contractResolver = value ?? DefaultContractResolver.Instance;
			}
		}

		public virtual StreamingContext Context
		{
			get
			{
				return _context;
			}
			set
			{
				_context = value;
			}
		}

		public virtual Formatting Formatting
		{
			get
			{
				return _formatting.GetValueOrDefault();
			}
			set
			{
				_formatting = value;
			}
		}

		public virtual DateFormatHandling DateFormatHandling
		{
			get
			{
				return _dateFormatHandling.GetValueOrDefault();
			}
			set
			{
				_dateFormatHandling = value;
			}
		}

		public virtual DateTimeZoneHandling DateTimeZoneHandling
		{
			get
			{
				return _dateTimeZoneHandling ?? DateTimeZoneHandling.RoundtripKind;
			}
			set
			{
				_dateTimeZoneHandling = value;
			}
		}

		public virtual DateParseHandling DateParseHandling
		{
			get
			{
				return _dateParseHandling ?? DateParseHandling.DateTime;
			}
			set
			{
				_dateParseHandling = value;
			}
		}

		public virtual FloatParseHandling FloatParseHandling
		{
			get
			{
				return _floatParseHandling.GetValueOrDefault();
			}
			set
			{
				_floatParseHandling = value;
			}
		}

		public virtual FloatFormatHandling FloatFormatHandling
		{
			get
			{
				return _floatFormatHandling.GetValueOrDefault();
			}
			set
			{
				_floatFormatHandling = value;
			}
		}

		public virtual StringEscapeHandling StringEscapeHandling
		{
			get
			{
				return _stringEscapeHandling.GetValueOrDefault();
			}
			set
			{
				_stringEscapeHandling = value;
			}
		}

		public virtual string DateFormatString
		{
			get
			{
				return _dateFormatString ?? "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK";
			}
			set
			{
				_dateFormatString = value;
				_dateFormatStringSet = true;
			}
		}

		public virtual CultureInfo Culture
		{
			get
			{
				return _culture ?? JsonSerializerSettings.DefaultCulture;
			}
			set
			{
				_culture = value;
			}
		}

		public virtual int? MaxDepth
		{
			get
			{
				return _maxDepth;
			}
			set
			{
				if (value <= 0)
				{
					throw new ArgumentException("Value must be positive.", "value");
				}
				_maxDepth = value;
				_maxDepthSet = true;
			}
		}

		public virtual bool CheckAdditionalContent
		{
			get
			{
				return _checkAdditionalContent.GetValueOrDefault();
			}
			set
			{
				_checkAdditionalContent = value;
			}
		}

		public virtual event EventHandler<Newtonsoft.Json.Serialization.ErrorEventArgs>? Error;

		internal bool IsCheckAdditionalContentSet()
		{
			return _checkAdditionalContent.HasValue;
		}

		public JsonSerializer()
		{
			_referenceLoopHandling = ReferenceLoopHandling.Error;
			_missingMemberHandling = MissingMemberHandling.Ignore;
			_nullValueHandling = NullValueHandling.Include;
			_defaultValueHandling = DefaultValueHandling.Include;
			_objectCreationHandling = ObjectCreationHandling.Auto;
			_preserveReferencesHandling = PreserveReferencesHandling.None;
			_constructorHandling = ConstructorHandling.Default;
			_typeNameHandling = TypeNameHandling.None;
			_metadataPropertyHandling = MetadataPropertyHandling.Default;
			_context = JsonSerializerSettings.DefaultContext;
			_serializationBinder = DefaultSerializationBinder.Instance;
			_culture = JsonSerializerSettings.DefaultCulture;
			_contractResolver = DefaultContractResolver.Instance;
		}

		public static JsonSerializer Create()
		{
			return new JsonSerializer();
		}

		public static JsonSerializer Create(JsonSerializerSettings? settings)
		{
			JsonSerializer jsonSerializer = Create();
			if (settings != null)
			{
				ApplySerializerSettings(jsonSerializer, settings);
			}
			return jsonSerializer;
		}

		public static JsonSerializer CreateDefault()
		{
			return Create(JsonConvert.DefaultSettings?.Invoke());
		}

		public static JsonSerializer CreateDefault(JsonSerializerSettings? settings)
		{
			JsonSerializer jsonSerializer = CreateDefault();
			if (settings != null)
			{
				ApplySerializerSettings(jsonSerializer, settings);
			}
			return jsonSerializer;
		}

		private static void ApplySerializerSettings(JsonSerializer serializer, JsonSerializerSettings settings)
		{
			if (!CollectionUtils.IsNullOrEmpty(settings.Converters))
			{
				for (int i = 0; i < settings.Converters.Count; i++)
				{
					serializer.Converters.Insert(i, settings.Converters[i]);
				}
			}
			if (settings._typeNameHandling.HasValue)
			{
				serializer.TypeNameHandling = settings.TypeNameHandling;
			}
			if (settings._metadataPropertyHandling.HasValue)
			{
				serializer.MetadataPropertyHandling = settings.MetadataPropertyHandling;
			}
			if (settings._typeNameAssemblyFormatHandling.HasValue)
			{
				serializer.TypeNameAssemblyFormatHandling = settings.TypeNameAssemblyFormatHandling;
			}
			if (settings._preserveReferencesHandling.HasValue)
			{
				serializer.PreserveReferencesHandling = settings.PreserveReferencesHandling;
			}
			if (settings._referenceLoopHandling.HasValue)
			{
				serializer.ReferenceLoopHandling = settings.ReferenceLoopHandling;
			}
			if (settings._missingMemberHandling.HasValue)
			{
				serializer.MissingMemberHandling = settings.MissingMemberHandling;
			}
			if (settings._objectCreationHandling.HasValue)
			{
				serializer.ObjectCreationHandling = settings.ObjectCreationHandling;
			}
			if (settings._nullValueHandling.HasValue)
			{
				serializer.NullValueHandling = settings.NullValueHandling;
			}
			if (settings._defaultValueHandling.HasValue)
			{
				serializer.DefaultValueHandling = settings.DefaultValueHandling;
			}
			if (settings._constructorHandling.HasValue)
			{
				serializer.ConstructorHandling = settings.ConstructorHandling;
			}
			if (settings._context.HasValue)
			{
				serializer.Context = settings.Context;
			}
			if (settings._checkAdditionalContent.HasValue)
			{
				serializer._checkAdditionalContent = settings._checkAdditionalContent;
			}
			if (settings.Error != null)
			{
				serializer.Error += settings.Error;
			}
			if (settings.ContractResolver != null)
			{
				serializer.ContractResolver = settings.ContractResolver;
			}
			if (settings.ReferenceResolverProvider != null)
			{
				serializer.ReferenceResolver = settings.ReferenceResolverProvider();
			}
			if (settings.TraceWriter != null)
			{
				serializer.TraceWriter = settings.TraceWriter;
			}
			if (settings.EqualityComparer != null)
			{
				serializer.EqualityComparer = settings.EqualityComparer;
			}
			if (settings.SerializationBinder != null)
			{
				serializer.SerializationBinder = settings.SerializationBinder;
			}
			if (settings._formatting.HasValue)
			{
				serializer._formatting = settings._formatting;
			}
			if (settings._dateFormatHandling.HasValue)
			{
				serializer._dateFormatHandling = settings._dateFormatHandling;
			}
			if (settings._dateTimeZoneHandling.HasValue)
			{
				serializer._dateTimeZoneHandling = settings._dateTimeZoneHandling;
			}
			if (settings._dateParseHandling.HasValue)
			{
				serializer._dateParseHandling = settings._dateParseHandling;
			}
			if (settings._dateFormatStringSet)
			{
				serializer._dateFormatString = settings._dateFormatString;
				serializer._dateFormatStringSet = settings._dateFormatStringSet;
			}
			if (settings._floatFormatHandling.HasValue)
			{
				serializer._floatFormatHandling = settings._floatFormatHandling;
			}
			if (settings._floatParseHandling.HasValue)
			{
				serializer._floatParseHandling = settings._floatParseHandling;
			}
			if (settings._stringEscapeHandling.HasValue)
			{
				serializer._stringEscapeHandling = settings._stringEscapeHandling;
			}
			if (settings._culture != null)
			{
				serializer._culture = settings._culture;
			}
			if (settings._maxDepthSet)
			{
				serializer._maxDepth = settings._maxDepth;
				serializer._maxDepthSet = settings._maxDepthSet;
			}
		}

		[DebuggerStepThrough]
		public void Populate(TextReader reader, object target)
		{
			Populate(new JsonTextReader(reader), target);
		}

		[DebuggerStepThrough]
		public void Populate(JsonReader reader, object target)
		{
			PopulateInternal(reader, target);
		}

		internal virtual void PopulateInternal(JsonReader reader, object target)
		{
			ValidationUtils.ArgumentNotNull(reader, "reader");
			ValidationUtils.ArgumentNotNull(target, "target");
			SetupReader(reader, out CultureInfo previousCulture, out DateTimeZoneHandling? previousDateTimeZoneHandling, out DateParseHandling? previousDateParseHandling, out FloatParseHandling? previousFloatParseHandling, out int? previousMaxDepth, out string previousDateFormatString);
			TraceJsonReader traceJsonReader = ((TraceWriter != null && TraceWriter.LevelFilter >= TraceLevel.Verbose) ? CreateTraceJsonReader(reader) : null);
			new JsonSerializerInternalReader(this).Populate(traceJsonReader ?? reader, target);
			if (traceJsonReader != null)
			{
				TraceWriter.Trace(TraceLevel.Verbose, traceJsonReader.GetDeserializedJsonMessage(), null);
			}
			ResetReader(reader, previousCulture, previousDateTimeZoneHandling, previousDateParseHandling, previousFloatParseHandling, previousMaxDepth, previousDateFormatString);
		}

		[DebuggerStepThrough]
		public object? Deserialize(JsonReader reader)
		{
			return Deserialize(reader, null);
		}

		[DebuggerStepThrough]
		public object? Deserialize(TextReader reader, Type objectType)
		{
			return Deserialize(new JsonTextReader(reader), objectType);
		}

		[DebuggerStepThrough]
		[return: MaybeNull]
		public T Deserialize<T>(JsonReader reader)
		{
			return (T)Deserialize(reader, typeof(T));
		}

		[DebuggerStepThrough]
		public object? Deserialize(JsonReader reader, Type? objectType)
		{
			return DeserializeInternal(reader, objectType);
		}

		internal virtual object? DeserializeInternal(JsonReader reader, Type? objectType)
		{
			ValidationUtils.ArgumentNotNull(reader, "reader");
			SetupReader(reader, out CultureInfo previousCulture, out DateTimeZoneHandling? previousDateTimeZoneHandling, out DateParseHandling? previousDateParseHandling, out FloatParseHandling? previousFloatParseHandling, out int? previousMaxDepth, out string previousDateFormatString);
			TraceJsonReader traceJsonReader = ((TraceWriter != null && TraceWriter.LevelFilter >= TraceLevel.Verbose) ? CreateTraceJsonReader(reader) : null);
			object? result = new JsonSerializerInternalReader(this).Deserialize(traceJsonReader ?? reader, objectType, CheckAdditionalContent);
			if (traceJsonReader != null)
			{
				TraceWriter.Trace(TraceLevel.Verbose, traceJsonReader.GetDeserializedJsonMessage(), null);
			}
			ResetReader(reader, previousCulture, previousDateTimeZoneHandling, previousDateParseHandling, previousFloatParseHandling, previousMaxDepth, previousDateFormatString);
			return result;
		}

		private void SetupReader(JsonReader reader, out CultureInfo? previousCulture, out DateTimeZoneHandling? previousDateTimeZoneHandling, out DateParseHandling? previousDateParseHandling, out FloatParseHandling? previousFloatParseHandling, out int? previousMaxDepth, out string? previousDateFormatString)
		{
			if (_culture != null && !_culture.Equals(reader.Culture))
			{
				previousCulture = reader.Culture;
				reader.Culture = _culture;
			}
			else
			{
				previousCulture = null;
			}
			if (_dateTimeZoneHandling.HasValue && reader.DateTimeZoneHandling != _dateTimeZoneHandling)
			{
				previousDateTimeZoneHandling = reader.DateTimeZoneHandling;
				reader.DateTimeZoneHandling = _dateTimeZoneHandling.GetValueOrDefault();
			}
			else
			{
				previousDateTimeZoneHandling = null;
			}
			if (_dateParseHandling.HasValue && reader.DateParseHandling != _dateParseHandling)
			{
				previousDateParseHandling = reader.DateParseHandling;
				reader.DateParseHandling = _dateParseHandling.GetValueOrDefault();
			}
			else
			{
				previousDateParseHandling = null;
			}
			if (_floatParseHandling.HasValue && reader.FloatParseHandling != _floatParseHandling)
			{
				previousFloatParseHandling = reader.FloatParseHandling;
				reader.FloatParseHandling = _floatParseHandling.GetValueOrDefault();
			}
			else
			{
				previousFloatParseHandling = null;
			}
			if (_maxDepthSet && reader.MaxDepth != _maxDepth)
			{
				previousMaxDepth = reader.MaxDepth;
				reader.MaxDepth = _maxDepth;
			}
			else
			{
				previousMaxDepth = null;
			}
			if (_dateFormatStringSet && reader.DateFormatString != _dateFormatString)
			{
				previousDateFormatString = reader.DateFormatString;
				reader.DateFormatString = _dateFormatString;
			}
			else
			{
				previousDateFormatString = null;
			}
			if (reader is JsonTextReader jsonTextReader && jsonTextReader.PropertyNameTable == null && _contractResolver is DefaultContractResolver defaultContractResolver)
			{
				jsonTextReader.PropertyNameTable = defaultContractResolver.GetNameTable();
			}
		}

		private void ResetReader(JsonReader reader, CultureInfo? previousCulture, DateTimeZoneHandling? previousDateTimeZoneHandling, DateParseHandling? previousDateParseHandling, FloatParseHandling? previousFloatParseHandling, int? previousMaxDepth, string? previousDateFormatString)
		{
			if (previousCulture != null)
			{
				reader.Culture = previousCulture;
			}
			if (previousDateTimeZoneHandling.HasValue)
			{
				reader.DateTimeZoneHandling = previousDateTimeZoneHandling.GetValueOrDefault();
			}
			if (previousDateParseHandling.HasValue)
			{
				reader.DateParseHandling = previousDateParseHandling.GetValueOrDefault();
			}
			if (previousFloatParseHandling.HasValue)
			{
				reader.FloatParseHandling = previousFloatParseHandling.GetValueOrDefault();
			}
			if (_maxDepthSet)
			{
				reader.MaxDepth = previousMaxDepth;
			}
			if (_dateFormatStringSet)
			{
				reader.DateFormatString = previousDateFormatString;
			}
			if (reader is JsonTextReader jsonTextReader && jsonTextReader.PropertyNameTable != null && _contractResolver is DefaultContractResolver defaultContractResolver && jsonTextReader.PropertyNameTable == defaultContractResolver.GetNameTable())
			{
				jsonTextReader.PropertyNameTable = null;
			}
		}

		public void Serialize(TextWriter textWriter, object? value)
		{
			Serialize(new JsonTextWriter(textWriter), value);
		}

		public void Serialize(JsonWriter jsonWriter, object? value, Type? objectType)
		{
			SerializeInternal(jsonWriter, value, objectType);
		}

		public void Serialize(TextWriter textWriter, object? value, Type objectType)
		{
			Serialize(new JsonTextWriter(textWriter), value, objectType);
		}

		public void Serialize(JsonWriter jsonWriter, object? value)
		{
			SerializeInternal(jsonWriter, value, null);
		}

		private TraceJsonReader CreateTraceJsonReader(JsonReader reader)
		{
			TraceJsonReader traceJsonReader = new TraceJsonReader(reader);
			if (reader.TokenType != 0)
			{
				traceJsonReader.WriteCurrentToken();
			}
			return traceJsonReader;
		}

		internal virtual void SerializeInternal(JsonWriter jsonWriter, object? value, Type? objectType)
		{
			ValidationUtils.ArgumentNotNull(jsonWriter, "jsonWriter");
			Formatting? formatting = null;
			if (_formatting.HasValue && jsonWriter.Formatting != _formatting)
			{
				formatting = jsonWriter.Formatting;
				jsonWriter.Formatting = _formatting.GetValueOrDefault();
			}
			DateFormatHandling? dateFormatHandling = null;
			if (_dateFormatHandling.HasValue && jsonWriter.DateFormatHandling != _dateFormatHandling)
			{
				dateFormatHandling = jsonWriter.DateFormatHandling;
				jsonWriter.DateFormatHandling = _dateFormatHandling.GetValueOrDefault();
			}
			DateTimeZoneHandling? dateTimeZoneHandling = null;
			if (_dateTimeZoneHandling.HasValue && jsonWriter.DateTimeZoneHandling != _dateTimeZoneHandling)
			{
				dateTimeZoneHandling = jsonWriter.DateTimeZoneHandling;
				jsonWriter.DateTimeZoneHandling = _dateTimeZoneHandling.GetValueOrDefault();
			}
			FloatFormatHandling? floatFormatHandling = null;
			if (_floatFormatHandling.HasValue && jsonWriter.FloatFormatHandling != _floatFormatHandling)
			{
				floatFormatHandling = jsonWriter.FloatFormatHandling;
				jsonWriter.FloatFormatHandling = _floatFormatHandling.GetValueOrDefault();
			}
			StringEscapeHandling? stringEscapeHandling = null;
			if (_stringEscapeHandling.HasValue && jsonWriter.StringEscapeHandling != _stringEscapeHandling)
			{
				stringEscapeHandling = jsonWriter.StringEscapeHandling;
				jsonWriter.StringEscapeHandling = _stringEscapeHandling.GetValueOrDefault();
			}
			CultureInfo cultureInfo = null;
			if (_culture != null && !_culture.Equals(jsonWriter.Culture))
			{
				cultureInfo = jsonWriter.Culture;
				jsonWriter.Culture = _culture;
			}
			string dateFormatString = null;
			if (_dateFormatStringSet && jsonWriter.DateFormatString != _dateFormatString)
			{
				dateFormatString = jsonWriter.DateFormatString;
				jsonWriter.DateFormatString = _dateFormatString;
			}
			TraceJsonWriter traceJsonWriter = ((TraceWriter != null && TraceWriter.LevelFilter >= TraceLevel.Verbose) ? new TraceJsonWriter(jsonWriter) : null);
			new JsonSerializerInternalWriter(this).Serialize(traceJsonWriter ?? jsonWriter, value, objectType);
			if (traceJsonWriter != null)
			{
				TraceWriter.Trace(TraceLevel.Verbose, traceJsonWriter.GetSerializedJsonMessage(), null);
			}
			if (formatting.HasValue)
			{
				jsonWriter.Formatting = formatting.GetValueOrDefault();
			}
			if (dateFormatHandling.HasValue)
			{
				jsonWriter.DateFormatHandling = dateFormatHandling.GetValueOrDefault();
			}
			if (dateTimeZoneHandling.HasValue)
			{
				jsonWriter.DateTimeZoneHandling = dateTimeZoneHandling.GetValueOrDefault();
			}
			if (floatFormatHandling.HasValue)
			{
				jsonWriter.FloatFormatHandling = floatFormatHandling.GetValueOrDefault();
			}
			if (stringEscapeHandling.HasValue)
			{
				jsonWriter.StringEscapeHandling = stringEscapeHandling.GetValueOrDefault();
			}
			if (_dateFormatStringSet)
			{
				jsonWriter.DateFormatString = dateFormatString;
			}
			if (cultureInfo != null)
			{
				jsonWriter.Culture = cultureInfo;
			}
		}

		internal IReferenceResolver GetReferenceResolver()
		{
			if (_referenceResolver == null)
			{
				_referenceResolver = new DefaultReferenceResolver();
			}
			return _referenceResolver;
		}

		internal JsonConverter? GetMatchingConverter(Type type)
		{
			return GetMatchingConverter(_converters, type);
		}

		internal static JsonConverter? GetMatchingConverter(IList<JsonConverter>? converters, Type objectType)
		{
			if (converters != null)
			{
				for (int i = 0; i < converters.Count; i++)
				{
					JsonConverter jsonConverter = converters[i];
					if (jsonConverter.CanConvert(objectType))
					{
						return jsonConverter;
					}
				}
			}
			return null;
		}

		internal void OnError(Newtonsoft.Json.Serialization.ErrorEventArgs e)
		{
			this.Error?.Invoke(this, e);
		}
	}
	public class JsonSerializerSettings
	{
		internal const ReferenceLoopHandling DefaultReferenceLoopHandling = ReferenceLoopHandling.Error;

		internal const MissingMemberHandling DefaultMissingMemberHandling = MissingMemberHandling.Ignore;

		internal const NullValueHandling DefaultNullValueHandling = NullValueHandling.Include;

		internal const DefaultValueHandling DefaultDefaultValueHandling = DefaultValueHandling.Include;

		internal const ObjectCreationHandling DefaultObjectCreationHandling = ObjectCreationHandling.Auto;

		internal const PreserveReferencesHandling DefaultPreserveReferencesHandling = PreserveReferencesHandling.None;

		internal const ConstructorHandling DefaultConstructorHandling = ConstructorHandling.Default;

		internal const TypeNameHandling DefaultTypeNameHandling = TypeNameHandling.None;

		internal const MetadataPropertyHandling DefaultMetadataPropertyHandling = MetadataPropertyHandling.Default;

		internal static readonly StreamingContext DefaultContext;

		internal const Formatting DefaultFormatting = Formatting.None;

		internal const DateFormatHandling DefaultDateFormatHandling = DateFormatHandling.IsoDateFormat;

		internal const DateTimeZoneHandling DefaultDateTimeZoneHandling = DateTimeZoneHandling.RoundtripKind;

		internal const DateParseHandling DefaultDateParseHandling = DateParseHandling.DateTime;

		internal const FloatParseHandling DefaultFloatParseHandling = FloatParseHandling.Double;

		internal const FloatFormatHandling DefaultFloatFormatHandling = FloatFormatHandling.String;

		internal const StringEscapeHandling DefaultStringEscapeHandling = StringEscapeHandling.Default;

		internal const TypeNameAssemblyFormatHandling DefaultTypeNameAssemblyFormatHandling = TypeNameAssemblyFormatHandling.Simple;

		internal static readonly CultureInfo DefaultCulture;

		internal const bool DefaultCheckAdditionalContent = false;

		internal const string DefaultDateFormatString = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK";

		internal Formatting? _formatting;

		internal DateFormatHandling? _dateFormatHandling;

		internal DateTimeZoneHandling? _dateTimeZoneHandling;

		internal DateParseHandling? _dateParseHandling;

		internal FloatFormatHandling? _floatFormatHandling;

		internal FloatParseHandling? _floatParseHandling;

		internal StringEscapeHandling? _stringEscapeHandling;

		internal CultureInfo? _culture;

		internal bool? _checkAdditionalContent;

		internal int? _maxDepth;

		internal bool _maxDepthSet;

		internal string? _dateFormatString;

		internal bool _dateFormatStringSet;

		internal TypeNameAssemblyFormatHandling? _typeNameAssemblyFormatHandling;

		internal DefaultValueHandling? _defaultValueHandling;

		internal PreserveReferencesHandling? _preserveReferencesHandling;

		internal NullValueHandling? _nullValueHandling;

		internal ObjectCreationHandling? _objectCreationHandling;

		internal MissingMemberHandling? _missingMemberHandling;

		internal ReferenceLoopHandling? _referenceLoopHandling;

		internal StreamingContext? _context;

		internal ConstructorHandling? _constructorHandling;

		internal TypeNameHandling? _typeNameHandling;

		internal MetadataPropertyHandling? _metadataPropertyHandling;

		public ReferenceLoopHandling ReferenceLoopHandling
		{
			get
			{
				return _referenceLoopHandling.GetValueOrDefault();
			}
			set
			{
				_referenceLoopHandling = value;
			}
		}

		public MissingMemberHandling MissingMemberHandling
		{
			get
			{
				return _missingMemberHandling.GetValueOrDefault();
			}
			set
			{
				_missingMemberHandling = value;
			}
		}

		public ObjectCreationHandling ObjectCreationHandling
		{
			get
			{
				return _objectCreationHandling.GetValueOrDefault();
			}
			set
			{
				_objectCreationHandling = value;
			}
		}

		public NullValueHandling NullValueHandling
		{
			get
			{
				return _nullValueHandling.GetValueOrDefault();
			}
			set
			{
				_nullValueHandling = value;
			}
		}

		public DefaultValueHandling DefaultValueHandling
		{
			get
			{
				return _defaultValueHandling.GetValueOrDefault();
			}
			set
			{
				_defaultValueHandling = value;
			}
		}

		public IList<JsonConverter> Converters { get; set; }

		public PreserveReferencesHandling PreserveReferencesHandling
		{
			get
			{
				return _preserveReferencesHandling.GetValueOrDefault();
			}
			set
			{
				_preserveReferencesHandling = value;
			}
		}

		public TypeNameHandling TypeNameHandling
		{
			get
			{
				return _typeNameHandling.GetValueOrDefault();
			}
			set
			{
				_typeNameHandling = value;
			}
		}

		public MetadataPropertyHandling MetadataPropertyHandling
		{
			get
			{
				return _metadataPropertyHandling.GetValu

Room Architect Tool_Data/Managed/Novell.Directory.Ldap.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading;
using Novell.Directory.Ldap.Asn1;
using Novell.Directory.Ldap.Controls;
using Novell.Directory.Ldap.Events.Edir.EventData;
using Novell.Directory.Ldap.Rfc2251;
using Novell.Directory.Ldap.Utilclass;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("C# LDAP")]
[assembly: AssemblyDescription("Novell.Directory.Ldap")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Novell, Inc")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright(" (C) 2003 Novell, Inc")]
[assembly: AssemblyTrademark("")]
[assembly: CLSCompliant(true)]
[assembly: AssemblyDelaySign(true)]
[assembly: AssemblyVersion("4.0.0.0")]
internal static class Consts
{
	public const string MonoVersion = "5.11.0.0";

	public const string MonoCompany = "Mono development team";

	public const string MonoProduct = "Mono Common Language Infrastructure";

	public const string MonoCopyright = "(c) Various Mono authors";

	public const int MonoCorlibVersion = 1051100001;

	public const string FxVersion = "4.0.0.0";

	public const string FxFileVersion = "4.6.57.0";

	public const string EnvironmentVersion = "4.0.30319.42000";

	public const string VsVersion = "0.0.0.0";

	public const string VsFileVersion = "11.0.0.0";

	private const string PublicKeyToken = "b77a5c561934e089";

	public const string AssemblyI18N = "I18N, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMicrosoft_JScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMono_Http = "Mono.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Posix = "Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Security = "Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Messaging_RabbitMQ = "Mono.Messaging.RabbitMQ, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyCorlib = "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Data = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Design = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing_Design = "System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Messaging = "System.Messaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Security = "System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Web = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Core = "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string WindowsBase_3_0 = "WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
public interface IThreadRunnable
{
	void Run();
}
public class Integer32
{
	private int _wintv;

	public int intValue
	{
		get
		{
			return _wintv;
		}
		set
		{
			_wintv = value;
		}
	}

	public Integer32(int ival)
	{
		_wintv = ival;
	}
}
public class SupportClass
{
	public class Tokenizer
	{
		private ArrayList elements;

		private string source;

		private string delimiters = " \t\n\r";

		private bool returnDelims;

		public int Count => elements.Count;

		public Tokenizer(string source)
		{
			elements = new ArrayList();
			elements.AddRange(source.Split(delimiters.ToCharArray()));
			RemoveEmptyStrings();
			this.source = source;
		}

		public Tokenizer(string source, string delimiters)
		{
			elements = new ArrayList();
			this.delimiters = delimiters;
			elements.AddRange(source.Split(this.delimiters.ToCharArray()));
			RemoveEmptyStrings();
			this.source = source;
		}

		public Tokenizer(string source, string delimiters, bool retDel)
		{
			elements = new ArrayList();
			this.delimiters = delimiters;
			this.source = source;
			returnDelims = retDel;
			if (returnDelims)
			{
				Tokenize();
			}
			else
			{
				elements.AddRange(source.Split(this.delimiters.ToCharArray()));
			}
			RemoveEmptyStrings();
		}

		private void Tokenize()
		{
			string text = source;
			string text2 = "";
			if (text.IndexOfAny(delimiters.ToCharArray()) < 0 && text.Length > 0)
			{
				elements.Add(text);
			}
			else if (text.IndexOfAny(delimiters.ToCharArray()) < 0 && text.Length <= 0)
			{
				return;
			}
			while (text.IndexOfAny(delimiters.ToCharArray()) >= 0)
			{
				if (text.IndexOfAny(delimiters.ToCharArray()) == 0)
				{
					if (text.Length > 1)
					{
						elements.Add(text.Substring(0, 1));
						text = text.Substring(1);
					}
					else
					{
						text = "";
					}
				}
				else
				{
					text2 = text.Substring(0, text.IndexOfAny(delimiters.ToCharArray()));
					elements.Add(text2);
					elements.Add(text.Substring(text2.Length, 1));
					text = ((text.Length <= text2.Length + 1) ? "" : text.Substring(text2.Length + 1));
				}
			}
			if (text.Length > 0)
			{
				elements.Add(text);
			}
		}

		public bool HasMoreTokens()
		{
			return elements.Count > 0;
		}

		public string NextToken()
		{
			if (source == "")
			{
				throw new Exception();
			}
			string result;
			if (returnDelims)
			{
				RemoveEmptyStrings();
				result = (string)elements[0];
				elements.RemoveAt(0);
				return result;
			}
			elements = new ArrayList();
			elements.AddRange(source.Split(delimiters.ToCharArray()));
			RemoveEmptyStrings();
			result = (string)elements[0];
			elements.RemoveAt(0);
			source = source.Remove(source.IndexOf(result), result.Length);
			source = source.TrimStart(delimiters.ToCharArray());
			return result;
		}

		public string NextToken(string delimiters)
		{
			this.delimiters = delimiters;
			return NextToken();
		}

		private void RemoveEmptyStrings()
		{
			for (int i = 0; i < elements.Count; i++)
			{
				if ((string)elements[i] == "")
				{
					elements.RemoveAt(i);
					i--;
				}
			}
		}
	}

	public class DateTimeFormatManager
	{
		public class DateTimeFormatHashTable : Hashtable
		{
			private class DateTimeFormatProperties
			{
				public string DateFormatPattern = "d-MMM-yy";

				public string TimeFormatPattern = "h:mm:ss tt";
			}

			public void SetDateFormatPattern(DateTimeFormatInfo format, string newPattern)
			{
				if (this[format] != null)
				{
					((DateTimeFormatProperties)this[format]).DateFormatPattern = newPattern;
					return;
				}
				DateTimeFormatProperties dateTimeFormatProperties = new DateTimeFormatProperties();
				dateTimeFormatProperties.DateFormatPattern = newPattern;
				Add(format, dateTimeFormatProperties);
			}

			public string GetDateFormatPattern(DateTimeFormatInfo format)
			{
				if (this[format] == null)
				{
					return "d-MMM-yy";
				}
				return ((DateTimeFormatProperties)this[format]).DateFormatPattern;
			}

			public void SetTimeFormatPattern(DateTimeFormatInfo format, string newPattern)
			{
				if (this[format] != null)
				{
					((DateTimeFormatProperties)this[format]).TimeFormatPattern = newPattern;
					return;
				}
				DateTimeFormatProperties dateTimeFormatProperties = new DateTimeFormatProperties();
				dateTimeFormatProperties.TimeFormatPattern = newPattern;
				Add(format, dateTimeFormatProperties);
			}

			public string GetTimeFormatPattern(DateTimeFormatInfo format)
			{
				if (this[format] == null)
				{
					return "h:mm:ss tt";
				}
				return ((DateTimeFormatProperties)this[format]).TimeFormatPattern;
			}
		}

		public static DateTimeFormatHashTable manager = new DateTimeFormatHashTable();
	}

	public class ArrayListSupport
	{
		public static object[] ToArray(ArrayList collection, object[] objects)
		{
			int num = 0;
			IEnumerator enumerator = collection.GetEnumerator();
			while (enumerator.MoveNext())
			{
				objects[num++] = enumerator.Current;
			}
			return objects;
		}
	}

	public class ThreadClass : IThreadRunnable
	{
		private Thread threadField;

		public Thread Instance
		{
			get
			{
				return threadField;
			}
			set
			{
				threadField = value;
			}
		}

		public string Name
		{
			get
			{
				return threadField.Name;
			}
			set
			{
				if (threadField.Name == null)
				{
					threadField.Name = value;
				}
			}
		}

		public ThreadPriority Priority
		{
			get
			{
				return threadField.Priority;
			}
			set
			{
				threadField.Priority = value;
			}
		}

		public bool IsAlive => threadField.IsAlive;

		public bool IsBackground
		{
			get
			{
				return threadField.IsBackground;
			}
			set
			{
				threadField.IsBackground = value;
			}
		}

		public ThreadClass()
		{
			threadField = new Thread(Run);
		}

		public ThreadClass(string Name)
		{
			threadField = new Thread(Run);
			this.Name = Name;
		}

		public ThreadClass(ThreadStart Start)
		{
			threadField = new Thread(Start);
		}

		public ThreadClass(ThreadStart Start, string Name)
		{
			threadField = new Thread(Start);
			this.Name = Name;
		}

		public virtual void Run()
		{
		}

		public virtual void Start()
		{
			threadField.Start();
		}

		public virtual void Interrupt()
		{
			threadField.Interrupt();
		}

		public void Join()
		{
			threadField.Join();
		}

		public void Join(long MiliSeconds)
		{
			lock (this)
			{
				threadField.Join(new TimeSpan(MiliSeconds * 10000));
			}
		}

		public void Join(long MiliSeconds, int NanoSeconds)
		{
			lock (this)
			{
				threadField.Join(new TimeSpan(MiliSeconds * 10000 + NanoSeconds * 100));
			}
		}

		public void Resume()
		{
			threadField.Resume();
		}

		public void Abort()
		{
			threadField.Abort();
		}

		public void Abort(object stateInfo)
		{
			lock (this)
			{
				threadField.Abort(stateInfo);
			}
		}

		public void Suspend()
		{
			threadField.Suspend();
		}

		public override string ToString()
		{
			return string.Concat("Thread[" + Name + "," + Priority.ToString() + ",", "]");
		}

		public static ThreadClass Current()
		{
			return new ThreadClass
			{
				Instance = Thread.CurrentThread
			};
		}
	}

	public class CollectionSupport : CollectionBase
	{
		public virtual bool Add(object element)
		{
			return base.List.Add(element) != -1;
		}

		public virtual bool AddAll(ICollection collection)
		{
			bool result = false;
			if (collection != null)
			{
				IEnumerator enumerator = new ArrayList(collection).GetEnumerator();
				while (enumerator.MoveNext())
				{
					if (enumerator.Current != null)
					{
						result = Add(enumerator.Current);
					}
				}
			}
			return result;
		}

		public virtual bool AddAll(CollectionSupport collection)
		{
			return AddAll((ICollection)collection);
		}

		public virtual bool Contains(object element)
		{
			return base.List.Contains(element);
		}

		public virtual bool ContainsAll(ICollection collection)
		{
			bool result = false;
			IEnumerator enumerator = new ArrayList(collection).GetEnumerator();
			while (enumerator.MoveNext() && (result = Contains(enumerator.Current)))
			{
			}
			return result;
		}

		public virtual bool ContainsAll(CollectionSupport collection)
		{
			return ContainsAll((ICollection)collection);
		}

		public virtual bool IsEmpty()
		{
			return base.Count == 0;
		}

		public virtual bool Remove(object element)
		{
			bool result = false;
			if (Contains(element))
			{
				base.List.Remove(element);
				result = true;
			}
			return result;
		}

		public virtual bool RemoveAll(ICollection collection)
		{
			bool result = false;
			IEnumerator enumerator = new ArrayList(collection).GetEnumerator();
			while (enumerator.MoveNext())
			{
				if (Contains(enumerator.Current))
				{
					result = Remove(enumerator.Current);
				}
			}
			return result;
		}

		public virtual bool RemoveAll(CollectionSupport collection)
		{
			return RemoveAll((ICollection)collection);
		}

		public virtual bool RetainAll(ICollection collection)
		{
			bool flag = false;
			IEnumerator enumerator = GetEnumerator();
			CollectionSupport collectionSupport = new CollectionSupport();
			collectionSupport.AddAll(collection);
			while (enumerator.MoveNext())
			{
				if (!collectionSupport.Contains(enumerator.Current))
				{
					flag = Remove(enumerator.Current);
					if (flag)
					{
						enumerator = GetEnumerator();
					}
				}
			}
			return flag;
		}

		public virtual bool RetainAll(CollectionSupport collection)
		{
			return RetainAll((ICollection)collection);
		}

		public virtual object[] ToArray()
		{
			int num = 0;
			object[] array = new object[base.Count];
			IEnumerator enumerator = GetEnumerator();
			while (enumerator.MoveNext())
			{
				array[num++] = enumerator.Current;
			}
			return array;
		}

		public virtual object[] ToArray(object[] objects)
		{
			int num = 0;
			IEnumerator enumerator = GetEnumerator();
			while (enumerator.MoveNext())
			{
				objects[num++] = enumerator.Current;
			}
			return objects;
		}

		public static CollectionSupport ToCollectionSupport(object[] array)
		{
			CollectionSupport collectionSupport = new CollectionSupport();
			collectionSupport.AddAll(array);
			return collectionSupport;
		}
	}

	public class ListCollectionSupport : ArrayList
	{
		public ListCollectionSupport()
		{
		}

		public ListCollectionSupport(ICollection collection)
			: base(collection)
		{
		}

		public ListCollectionSupport(int capacity)
			: base(capacity)
		{
		}

		public new virtual bool Add(object valueToInsert)
		{
			base.Insert(Count, valueToInsert);
			return true;
		}

		public virtual bool AddAll(int index, IList list)
		{
			bool result = false;
			if (list != null)
			{
				IEnumerator enumerator = new ArrayList(list).GetEnumerator();
				int num = index;
				while (enumerator.MoveNext())
				{
					base.Insert(num++, enumerator.Current);
					result = true;
				}
			}
			return result;
		}

		public virtual bool AddAll(IList collection)
		{
			return AddAll(Count, collection);
		}

		public virtual bool AddAll(CollectionSupport collection)
		{
			return AddAll(Count, collection);
		}

		public virtual bool AddAll(int index, CollectionSupport collection)
		{
			return AddAll(index, (IList)collection);
		}

		public virtual object ListCollectionClone()
		{
			return MemberwiseClone();
		}

		public virtual IEnumerator ListIterator()
		{
			return base.GetEnumerator();
		}

		public virtual bool RemoveAll(ICollection collection)
		{
			bool result = false;
			IEnumerator enumerator = new ArrayList(collection).GetEnumerator();
			while (enumerator.MoveNext())
			{
				result = true;
				if (base.Contains(enumerator.Current))
				{
					base.Remove(enumerator.Current);
				}
			}
			return result;
		}

		public virtual bool RemoveAll(CollectionSupport collection)
		{
			return RemoveAll((ICollection)collection);
		}

		public virtual object RemoveElement(int index)
		{
			object? result = this[index];
			RemoveAt(index);
			return result;
		}

		public virtual bool RemoveElement(object element)
		{
			bool result = false;
			if (Contains(element))
			{
				base.Remove(element);
				result = true;
			}
			return result;
		}

		public virtual object RemoveFirst()
		{
			object? result = this[0];
			RemoveAt(0);
			return result;
		}

		public virtual object RemoveLast()
		{
			object? result = this[Count - 1];
			base.RemoveAt(Count - 1);
			return result;
		}

		public virtual bool RetainAll(ICollection collection)
		{
			bool flag = false;
			IEnumerator enumerator = GetEnumerator();
			ListCollectionSupport listCollectionSupport = new ListCollectionSupport(collection);
			while (enumerator.MoveNext())
			{
				if (!listCollectionSupport.Contains(enumerator.Current))
				{
					flag = RemoveElement(enumerator.Current);
					if (flag)
					{
						enumerator = GetEnumerator();
					}
				}
			}
			return flag;
		}

		public virtual bool RetainAll(CollectionSupport collection)
		{
			return RetainAll((ICollection)collection);
		}

		public virtual bool ContainsAll(ICollection collection)
		{
			bool result = false;
			IEnumerator enumerator = new ArrayList(collection).GetEnumerator();
			while (enumerator.MoveNext() && (result = Contains(enumerator.Current)))
			{
			}
			return result;
		}

		public virtual bool ContainsAll(CollectionSupport collection)
		{
			return ContainsAll((ICollection)collection);
		}

		public virtual ListCollectionSupport SubList(int startIndex, int endIndex)
		{
			int num = 0;
			GetEnumerator();
			ListCollectionSupport listCollectionSupport = new ListCollectionSupport();
			for (num = startIndex; num < endIndex; num++)
			{
				listCollectionSupport.Add(this[num]);
			}
			return listCollectionSupport;
		}

		public virtual object[] ToArray(object[] objects)
		{
			if (objects.Length < Count)
			{
				objects = new object[Count];
			}
			int num = 0;
			IEnumerator enumerator = GetEnumerator();
			while (enumerator.MoveNext())
			{
				objects[num++] = enumerator.Current;
			}
			return objects;
		}

		public virtual IEnumerator ListIterator(int index)
		{
			if (index < 0 || index > Count)
			{
				throw new IndexOutOfRangeException();
			}
			IEnumerator enumerator = GetEnumerator();
			if (index > 0)
			{
				int num = 0;
				while (enumerator.MoveNext() && num < index - 1)
				{
					num++;
				}
			}
			return enumerator;
		}

		public virtual object GetLast()
		{
			if (Count == 0)
			{
				throw new ArgumentOutOfRangeException();
			}
			return this[Count - 1];
		}

		public virtual bool IsEmpty()
		{
			return Count == 0;
		}

		public virtual object Set(int index, object element)
		{
			object? result = this[index];
			this[index] = element;
			return result;
		}

		public virtual object Get(int index)
		{
			return this[index];
		}
	}

	public class ArraysSupport
	{
		public static bool IsArrayEqual(Array array1, Array array2)
		{
			if (array1.Length != array2.Length)
			{
				return false;
			}
			for (int i = 0; i < array1.Length; i++)
			{
				if (!array1.GetValue(i).Equals(array2.GetValue(i)))
				{
					return false;
				}
			}
			return true;
		}

		public static void FillArray(Array array, int fromindex, int toindex, object val)
		{
			object value = val;
			Type elementType = array.GetType().GetElementType();
			if (elementType != val.GetType())
			{
				value = Convert.ChangeType(val, elementType);
			}
			if (array.Length == 0)
			{
				throw new NullReferenceException();
			}
			if (fromindex > toindex)
			{
				throw new ArgumentException();
			}
			if (fromindex < 0 || array.Length < toindex)
			{
				throw new IndexOutOfRangeException();
			}
			for (int i = ((fromindex > 0) ? fromindex-- : fromindex); i < toindex; i++)
			{
				array.SetValue(value, i);
			}
		}

		public static void FillArray(Array array, object val)
		{
			FillArray(array, 0, array.Length, val);
		}
	}

	public class SetSupport : ArrayList
	{
		public SetSupport()
		{
		}

		public SetSupport(ICollection collection)
			: base(collection)
		{
		}

		public SetSupport(int capacity)
			: base(capacity)
		{
		}

		public new virtual bool Add(object objectToAdd)
		{
			if (Contains(objectToAdd))
			{
				return false;
			}
			base.Add(objectToAdd);
			return true;
		}

		public virtual bool AddAll(ICollection collection)
		{
			bool result = false;
			if (collection != null)
			{
				IEnumerator enumerator = new ArrayList(collection).GetEnumerator();
				while (enumerator.MoveNext())
				{
					if (enumerator.Current != null)
					{
						result = Add(enumerator.Current);
					}
				}
			}
			return result;
		}

		public virtual bool AddAll(CollectionSupport collection)
		{
			return AddAll((ICollection)collection);
		}

		public virtual bool ContainsAll(ICollection collection)
		{
			bool result = false;
			IEnumerator enumerator = collection.GetEnumerator();
			while (enumerator.MoveNext() && (result = Contains(enumerator.Current)))
			{
			}
			return result;
		}

		public virtual bool ContainsAll(CollectionSupport collection)
		{
			return ContainsAll((ICollection)collection);
		}

		public virtual bool IsEmpty()
		{
			return Count == 0;
		}

		public new virtual bool Remove(object elementToRemove)
		{
			bool result = false;
			if (Contains(elementToRemove))
			{
				result = true;
			}
			base.Remove(elementToRemove);
			return result;
		}

		public virtual bool RemoveAll(ICollection collection)
		{
			bool flag = false;
			IEnumerator enumerator = collection.GetEnumerator();
			while (enumerator.MoveNext())
			{
				if (!flag && Contains(enumerator.Current))
				{
					flag = true;
				}
				Remove(enumerator.Current);
			}
			return flag;
		}

		public virtual bool RemoveAll(CollectionSupport collection)
		{
			return RemoveAll((ICollection)collection);
		}

		public virtual bool RetainAll(ICollection collection)
		{
			bool result = false;
			IEnumerator enumerator = collection.GetEnumerator();
			SetSupport setSupport = (SetSupport)collection;
			while (enumerator.MoveNext())
			{
				if (!setSupport.Contains(enumerator.Current))
				{
					result = Remove(enumerator.Current);
					enumerator = GetEnumerator();
				}
			}
			return result;
		}

		public virtual bool RetainAll(CollectionSupport collection)
		{
			return RetainAll((ICollection)collection);
		}

		public new virtual object[] ToArray()
		{
			int num = 0;
			object[] array = new object[Count];
			IEnumerator enumerator = GetEnumerator();
			while (enumerator.MoveNext())
			{
				array[num++] = enumerator.Current;
			}
			return array;
		}

		public virtual object[] ToArray(object[] objects)
		{
			int num = 0;
			IEnumerator enumerator = GetEnumerator();
			while (enumerator.MoveNext())
			{
				objects[num++] = enumerator.Current;
			}
			return objects;
		}
	}

	public class AbstractSetSupport : SetSupport
	{
	}

	public class MessageDigestSupport
	{
		private HashAlgorithm algorithm;

		private byte[] data;

		private int position;

		private string algorithmName;

		public HashAlgorithm Algorithm
		{
			get
			{
				return algorithm;
			}
			set
			{
				algorithm = value;
			}
		}

		public byte[] Data
		{
			get
			{
				return data;
			}
			set
			{
				data = value;
			}
		}

		public string AlgorithmName => algorithmName;

		public MessageDigestSupport(string algorithm)
		{
			if (algorithm.Equals("SHA-1"))
			{
				algorithmName = "SHA";
			}
			else
			{
				algorithmName = algorithm;
			}
			Algorithm = (HashAlgorithm)CryptoConfig.CreateFromName(algorithmName);
			position = 0;
		}

		[CLSCompliant(false)]
		public sbyte[] DigestData()
		{
			sbyte[] result = ToSByteArray(Algorithm.ComputeHash(data));
			Reset();
			return result;
		}

		[CLSCompliant(false)]
		public sbyte[] DigestData(byte[] newData)
		{
			Update(newData);
			return DigestData();
		}

		public void Update(byte[] newData)
		{
			if (position == 0)
			{
				Data = newData;
				position = Data.Length - 1;
				return;
			}
			byte[] array = Data;
			Data = new byte[newData.Length + position + 1];
			array.CopyTo(Data, 0);
			newData.CopyTo(Data, array.Length);
			position = Data.Length - 1;
		}

		public void Update(byte newData)
		{
			Update(new byte[1] { newData });
		}

		public void Update(byte[] newData, int offset, int count)
		{
			byte[] array = new byte[count];
			Array.Copy(newData, offset, array, 0, count);
			Update(array);
		}

		public void Reset()
		{
			data = null;
			position = 0;
		}

		public override string ToString()
		{
			return Algorithm.ToString();
		}

		public static MessageDigestSupport GetInstance(string algorithm)
		{
			return new MessageDigestSupport(algorithm);
		}

		[CLSCompliant(false)]
		public static bool EquivalentDigest(sbyte[] firstDigest, sbyte[] secondDigest)
		{
			bool flag = false;
			if (firstDigest.Length == secondDigest.Length)
			{
				int num = 0;
				flag = true;
				while (flag && num < firstDigest.Length)
				{
					flag = firstDigest[num] == secondDigest[num];
					num++;
				}
			}
			return flag;
		}
	}

	public class SecureRandomSupport
	{
		private RNGCryptoServiceProvider generator;

		public SecureRandomSupport()
		{
			generator = new RNGCryptoServiceProvider();
		}

		public SecureRandomSupport(byte[] seed)
		{
			generator = new RNGCryptoServiceProvider(seed);
		}

		[CLSCompliant(false)]
		public sbyte[] NextBytes(byte[] randomnumbersarray)
		{
			generator.GetBytes(randomnumbersarray);
			return ToSByteArray(randomnumbersarray);
		}

		public static byte[] GetSeed(int numberOfBytes)
		{
			RNGCryptoServiceProvider rNGCryptoServiceProvider = new RNGCryptoServiceProvider();
			byte[] array = new byte[numberOfBytes];
			rNGCryptoServiceProvider.GetBytes(array);
			return array;
		}

		public void SetSeed(byte[] newSeed)
		{
			generator = new RNGCryptoServiceProvider(newSeed);
		}

		public void SetSeed(long newSeed)
		{
			byte[] array = new byte[8];
			for (int num = 7; num > 0; num--)
			{
				array[num] = (byte)(newSeed - (newSeed >> 8 << 8));
				newSeed >>= 8;
			}
			SetSeed(array);
		}
	}

	public interface SingleThreadModel
	{
	}

	[CLSCompliant(false)]
	public static sbyte[] ToSByteArray(byte[] byteArray)
	{
		sbyte[] array = new sbyte[byteArray.Length];
		for (int i = 0; i < byteArray.Length; i++)
		{
			array[i] = (sbyte)byteArray[i];
		}
		return array;
	}

	[CLSCompliant(false)]
	public static byte[] ToByteArray(sbyte[] sbyteArray)
	{
		byte[] array = new byte[sbyteArray.Length];
		for (int i = 0; i < sbyteArray.Length; i++)
		{
			array[i] = (byte)sbyteArray[i];
		}
		return array;
	}

	public static byte[] ToByteArray(string sourceString)
	{
		byte[] array = new byte[sourceString.Length];
		for (int i = 0; i < sourceString.Length; i++)
		{
			array[i] = (byte)sourceString[i];
		}
		return array;
	}

	public static byte[] ToByteArray(object[] tempObjectArray)
	{
		byte[] array = new byte[tempObjectArray.Length];
		for (int i = 0; i < tempObjectArray.Length; i++)
		{
			array[i] = (byte)tempObjectArray[i];
		}
		return array;
	}

	[CLSCompliant(false)]
	public static int ReadInput(Stream sourceStream, ref sbyte[] target, int start, int count)
	{
		if (target.Length == 0)
		{
			return 0;
		}
		byte[] array = new byte[target.Length];
		int num = 0;
		int num2 = start;
		int num3 = count;
		while (num3 > 0)
		{
			int num4 = sourceStream.Read(array, num2, num3);
			if (num4 == 0)
			{
				break;
			}
			num += num4;
			num2 += num4;
			num3 -= num4;
		}
		if (num == 0)
		{
			return -1;
		}
		for (int i = start; i < start + num; i++)
		{
			target[i] = (sbyte)array[i];
		}
		return num;
	}

	[CLSCompliant(false)]
	public static int ReadInput(TextReader sourceTextReader, ref sbyte[] target, int start, int count)
	{
		if (target.Length == 0)
		{
			return 0;
		}
		char[] array = new char[target.Length];
		int num = sourceTextReader.Read(array, start, count);
		if (num == 0)
		{
			return -1;
		}
		for (int i = start; i < start + num; i++)
		{
			target[i] = (sbyte)array[i];
		}
		return num;
	}

	public static long Identity(long literal)
	{
		return literal;
	}

	[CLSCompliant(false)]
	public static ulong Identity(ulong literal)
	{
		return literal;
	}

	public static float Identity(float literal)
	{
		return literal;
	}

	public static double Identity(double literal)
	{
		return literal;
	}

	public static string FormatDateTime(DateTimeFormatInfo format, DateTime date)
	{
		string timeFormatPattern = DateTimeFormatManager.manager.GetTimeFormatPattern(format);
		string dateFormatPattern = DateTimeFormatManager.manager.GetDateFormatPattern(format);
		return date.ToString(dateFormatPattern + " " + timeFormatPattern, format);
	}

	public static object PutElement(IDictionary collection, object key, object newValue)
	{
		object? result = collection[key];
		collection[key] = newValue;
		return result;
	}

	public static bool VectorRemoveElement(IList arrayList, object element)
	{
		bool result = arrayList.Contains(element);
		arrayList.Remove(element);
		return result;
	}

	public static object HashtableRemove(Hashtable hashtable, object key)
	{
		object? result = hashtable[key];
		hashtable.Remove(key);
		return result;
	}

	public static void SetSize(ArrayList arrayList, int newSize)
	{
		if (newSize < 0)
		{
			throw new ArgumentException();
		}
		if (newSize < arrayList.Count)
		{
			arrayList.RemoveRange(newSize, arrayList.Count - newSize);
			return;
		}
		while (newSize > arrayList.Count)
		{
			arrayList.Add(null);
		}
	}

	public static object StackPush(Stack stack, object element)
	{
		stack.Push(element);
		return element;
	}

	public static void GetCharsFromString(string sourceString, int sourceStart, int sourceEnd, ref char[] destinationArray, int destinationStart)
	{
		int num = sourceStart;
		int num2 = destinationStart;
		while (num < sourceEnd)
		{
			destinationArray[num2] = sourceString[num];
			num++;
			num2++;
		}
	}

	public static FileStream GetFileStream(string FileName, bool Append)
	{
		if (Append)
		{
			return new FileStream(FileName, FileMode.Append);
		}
		return new FileStream(FileName, FileMode.Create);
	}

	[CLSCompliant(false)]
	public static char[] ToCharArray(sbyte[] sByteArray)
	{
		char[] array = new char[sByteArray.Length];
		sByteArray.CopyTo(array, 0);
		return array;
	}

	public static char[] ToCharArray(byte[] byteArray)
	{
		char[] array = new char[byteArray.Length];
		byteArray.CopyTo(array, 0);
		return array;
	}

	public static object CreateNewInstance(Type classType)
	{
		object result = null;
		Type[] types = new Type[0];
		ConstructorInfo[] array = null;
		array = classType.GetConstructors();
		if (array.Length == 0)
		{
			throw new UnauthorizedAccessException();
		}
		for (int i = 0; i < array.Length; i++)
		{
			if (array[i].GetParameters().Length == 0)
			{
				result = classType.GetConstructor(types).Invoke(new object[0]);
				break;
			}
			if (i == array.Length - 1)
			{
				throw new MethodAccessException();
			}
		}
		return result;
	}

	public static void WriteStackTrace(Exception throwable, TextWriter stream)
	{
		stream.Write(throwable.StackTrace);
		stream.Flush();
	}

	public static bool EqualsSupport(ICollection source, ICollection target)
	{
		IEnumerator enumerator = ReverseStack(source);
		IEnumerator enumerator2 = ReverseStack(target);
		if (source.Count != target.Count)
		{
			return false;
		}
		while (enumerator.MoveNext() && enumerator2.MoveNext())
		{
			if (!enumerator.Current.Equals(enumerator2.Current))
			{
				return false;
			}
		}
		return true;
	}

	public static bool EqualsSupport(ICollection source, object target)
	{
		if (target.GetType() != typeof(ICollection))
		{
			return false;
		}
		return EqualsSupport(source, (ICollection)target);
	}

	public static bool EqualsSupport(IDictionaryEnumerator source, object target)
	{
		if (target.GetType() != typeof(IDictionaryEnumerator))
		{
			return false;
		}
		return EqualsSupport(source, (IDictionaryEnumerator)target);
	}

	public static bool EqualsSupport(IDictionaryEnumerator source, IDictionaryEnumerator target)
	{
		while (source.MoveNext() && target.MoveNext())
		{
			if (source.Key.Equals(target.Key) && source.Value.Equals(target.Value))
			{
				return true;
			}
		}
		return false;
	}

	public static IEnumerator ReverseStack(ICollection collection)
	{
		if (collection.GetType() == typeof(Stack))
		{
			ArrayList arrayList = new ArrayList(collection);
			arrayList.Reverse();
			return arrayList.GetEnumerator();
		}
		return collection.GetEnumerator();
	}
}
namespace Novell.Directory.Ldap
{
	public enum AuthenticationTypes
	{
		Anonymous = 16,
		Delegation = 256,
		Encryption = 2,
		FastBind = 32,
		None = 0,
		ReadonlyServer = 4,
		Sealing = 128,
		Secure = 1,
		SecureSocketsLayer = 2,
		ServerBind = 512,
		Signing = 64
	}
	public delegate bool CertificateValidationCallback(X509Certificate certificate, int[] certificateErrors);
	internal sealed class Connection
	{
		public enum CertificateProblem : long
		{
			CertEXPIRED = 2148204801L,
			CertVALIDITYPERIODNESTING = 2148204802L,
			CertROLE = 2148204803L,
			CertPATHLENCONST = 2148204804L,
			CertCRITICAL = 2148204805L,
			CertPURPOSE = 2148204806L,
			CertISSUERCHAINING = 2148204807L,
			CertMALFORMED = 2148204808L,
			CertUNTRUSTEDROOT = 2148204809L,
			CertCHAINING = 2148204810L,
			CertREVOKED = 2148204812L,
			CertUNTRUSTEDTESTROOT = 2148204813L,
			CertREVOCATION_FAILURE = 2148204814L,
			CertCN_NO_MATCH = 2148204815L,
			CertWRONG_USAGE = 2148204816L,
			CertUNTRUSTEDCA = 2148204818L
		}

		public class ReaderThread
		{
			private Connection enclosingInstance;

			public Connection Enclosing_Instance => enclosingInstance;

			private void InitBlock(Connection enclosingInstance)
			{
				this.enclosingInstance = enclosingInstance;
			}

			public ReaderThread(Connection enclosingInstance)
			{
				InitBlock(enclosingInstance);
			}

			public virtual void Run()
			{
				string reason = "reader: thread stopping";
				InterThreadException ex = null;
				Message message = null;
				IOException deadReaderException = null;
				enclosingInstance.reader = Thread.CurrentThread;
				try
				{
					while (true)
					{
						Stream in_Renamed = enclosingInstance.in_Renamed;
						if (in_Renamed == null)
						{
							break;
						}
						Asn1Identifier asn1Identifier = new Asn1Identifier(in_Renamed);
						_ = asn1Identifier.Tag;
						if (asn1Identifier.Tag != 16)
						{
							continue;
						}
						Asn1Length asn1Length = new Asn1Length(in_Renamed);
						RfcLdapMessage rfcLdapMessage = new RfcLdapMessage(enclosingInstance.decoder, in_Renamed, asn1Length.Length);
						int messageID = rfcLdapMessage.MessageID;
						try
						{
							message = enclosingInstance.messages.findMessageById(messageID);
							message.putReply(rfcLdapMessage);
						}
						catch (FieldAccessException)
						{
							if (messageID == 0)
							{
								enclosingInstance.notifyAllUnsolicitedListeners(rfcLdapMessage);
								if (enclosingInstance.unsolSvrShutDnNotification)
								{
									ex = new InterThreadException("SERVER_SHUTDOWN_REQ", new object[2] { enclosingInstance.host, enclosingInstance.port }, 91, null, null);
									return;
								}
							}
						}
						if (enclosingInstance.stopReaderMessageID == messageID || enclosingInstance.stopReaderMessageID == -98)
						{
							return;
						}
					}
				}
				catch (ThreadAbortException)
				{
					return;
				}
				catch (IOException ex4)
				{
					deadReaderException = ex4;
					if (enclosingInstance.stopReaderMessageID != -98 && enclosingInstance.clientActive)
					{
						ex = new InterThreadException("CONNECTION_WAIT", new object[2] { enclosingInstance.host, enclosingInstance.port }, 91, ex4, message);
					}
					enclosingInstance.in_Renamed = null;
					enclosingInstance.out_Renamed = null;
				}
				finally
				{
					if (!enclosingInstance.clientActive || ex != null)
					{
						enclosingInstance.shutdown(reason, 0, ex);
					}
					else
					{
						enclosingInstance.stopReaderMessageID = -99;
					}
				}
				enclosingInstance.deadReaderException = deadReaderException;
				enclosingInstance.deadReader = enclosingInstance.reader;
				enclosingInstance.reader = null;
			}
		}

		private class UnsolicitedListenerThread : SupportClass.ThreadClass
		{
			private Connection enclosingInstance;

			private LdapUnsolicitedNotificationListener listenerObj;

			private LdapExtendedResponse unsolicitedMsg;

			public Connection Enclosing_Instance => enclosingInstance;

			private void InitBlock(Connection enclosingInstance)
			{
				this.enclosingInstance = enclosingInstance;
			}

			internal UnsolicitedListenerThread(Connection enclosingInstance, LdapUnsolicitedNotificationListener l, LdapExtendedResponse m)
			{
				InitBlock(enclosingInstance);
				listenerObj = l;
				unsolicitedMsg = m;
			}

			public override void Run()
			{
				listenerObj.messageReceived(unsolicitedMsg);
			}
		}

		private ArrayList handshakeProblemsEncountered = new ArrayList();

		private object writeSemaphore;

		private int writeSemaphoreOwner;

		private int writeSemaphoreCount;

		private int ephemeralId = -1;

		private BindProperties bindProperties;

		private int bindSemaphoreId;

		private Thread reader;

		private Thread deadReader;

		private IOException deadReaderException;

		private LBEREncoder encoder;

		private LBERDecoder decoder;

		private Socket sock;

		private TcpClient socket;

		private TcpClient nonTLSBackup;

		private Stream in_Renamed;

		private Stream out_Renamed;

		private bool clientActive = true;

		private bool ssl;

		private bool unsolSvrShutDnNotification;

		private const int CONTINUE_READING = -99;

		private const int STOP_READING = -98;

		private int stopReaderMessageID;

		private MessageVector messages;

		private ReferralInfo activeReferral;

		private ArrayList unsolicitedListeners;

		private string host;

		private int port;

		private int cloneCount;

		private string name = "";

		private static object nameLock;

		private static int connNum;

		internal static string sdk;

		internal static int protocol;

		internal static string security;

		internal bool Cloned => cloneCount > 0;

		internal bool Ssl
		{
			get
			{
				return ssl;
			}
			set
			{
				ssl = value;
			}
		}

		internal string Host => host;

		internal int Port => port;

		internal int BindSemId
		{
			get
			{
				return bindSemaphoreId;
			}
			set
			{
				bindSemaphoreId = value;
			}
		}

		internal bool BindSemIdClear
		{
			get
			{
				if (bindSemaphoreId == 0)
				{
					return true;
				}
				return false;
			}
		}

		internal bool Bound
		{
			get
			{
				if (bindProperties != null)
				{
					return !bindProperties.Anonymous;
				}
				return false;
			}
		}

		internal bool Connected => in_Renamed != null;

		internal BindProperties BindProperties
		{
			get
			{
				return bindProperties;
			}
			set
			{
				bindProperties = value;
			}
		}

		internal ReferralInfo ActiveReferral
		{
			get
			{
				return activeReferral;
			}
			set
			{
				activeReferral = value;
			}
		}

		internal string ConnectionName => name;

		internal bool TLS => nonTLSBackup != null;

		internal Stream InputStream => in_Renamed;

		internal Stream OutputStream => out_Renamed;

		public event CertificateValidationCallback OnCertificateValidation;

		private static string GetProblemMessage(CertificateProblem Problem)
		{
			string text = "";
			string text2 = Enum.GetName(typeof(CertificateProblem), Problem);
			if (text2 != null)
			{
				return text + text2;
			}
			return "Unknown Certificate Problem";
		}

		private void InitBlock()
		{
			writeSemaphore = new object();
			encoder = new LBEREncoder();
			decoder = new LBERDecoder();
			stopReaderMessageID = -99;
			messages = new MessageVector(5, 5);
			unsolicitedListeners = new ArrayList(3);
		}

		internal Connection()
		{
			InitBlock();
		}

		internal object copy()
		{
			Connection result = new Connection
			{
				host = host,
				port = port
			};
			protocol = protocol;
			return result;
		}

		internal int acquireWriteSemaphore()
		{
			return acquireWriteSemaphore(0);
		}

		internal int acquireWriteSemaphore(int msgId)
		{
			int num = msgId;
			lock (writeSemaphore)
			{
				if (num == 0)
				{
					ephemeralId = ((ephemeralId == int.MinValue) ? (ephemeralId = -1) : (--ephemeralId));
					num = ephemeralId;
				}
				while (true)
				{
					if (writeSemaphoreOwner == 0)
					{
						writeSemaphoreOwner = num;
						break;
					}
					if (writeSemaphoreOwner == num)
					{
						break;
					}
					try
					{
						Monitor.Wait(writeSemaphore);
					}
					catch (ThreadInterruptedException)
					{
					}
				}
				writeSemaphoreCount++;
				return num;
			}
		}

		internal void freeWriteSemaphore(int msgId)
		{
			lock (writeSemaphore)
			{
				if (writeSemaphoreOwner == 0)
				{
					throw new SystemException("Connection.freeWriteSemaphore(" + msgId + "): semaphore not owned by any thread");
				}
				if (writeSemaphoreOwner != msgId)
				{
					throw new SystemException("Connection.freeWriteSemaphore(" + msgId + "): thread does not own the semaphore, owned by " + writeSemaphoreOwner);
				}
				if (--writeSemaphoreCount == 0)
				{
					writeSemaphoreOwner = 0;
					Monitor.Pulse(writeSemaphore);
				}
			}
		}

		private void waitForReader(Thread thread)
		{
			Thread objA = ((reader == null) ? null : reader);
			Thread objB = ((thread == null) ? null : thread);
			while (!object.Equals(objA, objB))
			{
				try
				{
					if (thread == deadReader)
					{
						if (thread == null)
						{
							return;
						}
						IOException rootException = deadReaderException;
						deadReaderException = null;
						deadReader = null;
						throw new LdapException("CONNECTION_READER", 91, null, rootException);
					}
					lock (this)
					{
						Monitor.Wait(this, TimeSpan.FromMilliseconds(5.0));
					}
				}
				catch (ThreadInterruptedException)
				{
				}
				objA = ((reader == null) ? null : reader);
				objB = ((thread == null) ? null : thread);
			}
			deadReaderException = null;
			deadReader = null;
		}

		internal void connect(string host, int port)
		{
			connect(host, port, 0);
		}

		public bool ServerCertificateValidation(X509Certificate certificate, int[] certificateErrors)
		{
			if (this.OnCertificateValidation != null)
			{
				return this.OnCertificateValidation(certificate, certificateErrors);
			}
			return DefaultCertificateValidationHandler(certificate, certificateErrors);
		}

		public bool DefaultCertificateValidationHandler(X509Certificate certificate, int[] certificateErrors)
		{
			bool flag = false;
			if (certificateErrors != null && certificateErrors.Length != 0)
			{
				if (certificateErrors.Length == 1 && certificateErrors[0] == -2146762481)
				{
					return true;
				}
				Console.WriteLine("Detected errors in the Server Certificate:");
				for (int i = 0; i < certificateErrors.Length; i++)
				{
					handshakeProblemsEncountered.Add((CertificateProblem)(uint)certificateErrors[i]);
					Console.WriteLine(certificateErrors[i]);
				}
				return false;
			}
			return true;
		}

		private void connect(string host, int port, int semaphoreId)
		{
			waitForReader(null);
			unsolSvrShutDnNotification = false;
			int msgId = acquireWriteSemaphore(semaphoreId);
			try
			{
				if (port == 0)
				{
					port = 389;
				}
				try
				{
					if (in_Renamed == null || out_Renamed == null)
					{
						if (Ssl)
						{
							this.host = host;
							this.port = port;
							sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.IP);
							IPEndPoint remoteEP = new IPEndPoint(Dns.Resolve(host).AddressList[0], port);
							sock.Connect(remoteEP);
							NetworkStream networkStream = new NetworkStream(sock, ownsSocket: true);
							Assembly assembly;
							try
							{
								assembly = Assembly.LoadWithPartialName("Mono.Security");
							}
							catch (FileNotFoundException)
							{
								throw new LdapException("SSL_PROVIDER_MISSING", 114, null);
							}
							Type? type = assembly.GetType("Mono.Security.Protocol.Tls.SslClientStream");
							object[] array = new object[4] { networkStream, host, false, null };
							Type type2 = assembly.GetType("Mono.Security.Protocol.Tls.SecurityProtocolType");
							_ = (Enum)Activator.CreateInstance(type2);
							int num = (int)Enum.Parse(type2, "Ssl3");
							int num2 = (int)Enum.Parse(type2, "Tls");
							array[3] = Enum.ToObject(type2, num | num2);
							object obj = Activator.CreateInstance(type, array);
							PropertyInfo property = type.GetProperty("ServerCertValidationDelegate");
							property.SetValue(obj, Delegate.CreateDelegate(property.PropertyType, this, "ServerCertificateValidation"), null);
							in_Renamed = (Stream)obj;
							out_Renamed = (Stream)obj;
						}
						else
						{
							socket = new TcpClient(host, port);
							in_Renamed = socket.GetStream();
							out_Renamed = socket.GetStream();
						}
					}
					else
					{
						Console.WriteLine("connect input/out Stream specified");
					}
				}
				catch (SocketException rootException)
				{
					sock = null;
					socket = null;
					throw new LdapException("CONNECTION_ERROR", new object[2] { host, port }, 91, null, rootException);
				}
				catch (IOException rootException2)
				{
					sock = null;
					socket = null;
					throw new LdapException("CONNECTION_ERROR", new object[2] { host, port }, 91, null, rootException2);
				}
				this.host = host;
				this.port = port;
				startReader();
				clientActive = true;
			}
			finally
			{
				freeWriteSemaphore(msgId);
			}
		}

		internal void incrCloneCount()
		{
			lock (this)
			{
				cloneCount++;
			}
		}

		internal Connection destroyClone(bool apiCall)
		{
			lock (this)
			{
				Connection result = this;
				if (cloneCount > 0)
				{
					cloneCount--;
					result = ((!apiCall) ? null : ((Connection)copy()));
				}
				else if (in_Renamed != null)
				{
					InterThreadException notifyUser = new InterThreadException(apiCall ? "CONNECTION_CLOSED" : "CONNECTION_FINALIZED", null, 91, null, null);
					shutdown("destroy clone", 0, notifyUser);
				}
				return result;
			}
		}

		internal void clearBindSemId()
		{
			bindSemaphoreId = 0;
		}

		internal void writeMessage(Message info)
		{
			object[][] contents = new ExceptionMessages().getContents();
			messages.Add(info);
			if (info.BindRequest && !Connected && host != null)
			{
				connect(host, port, info.MessageID);
			}
			if (Connected)
			{
				LdapMessage request = info.Request;
				writeMessage(request);
				return;
			}
			int num = 0;
			for (num = 0; num < contents.Length && contents[num][0] != "CONNECTION_CLOSED"; num++)
			{
			}
			throw new LdapException("CONNECTION_CLOSED", new object[2] { host, port }, 91, (string)contents[num][1]);
		}

		internal void writeMessage(LdapMessage msg)
		{
			int msgId = ((bindSemaphoreId != 0) ? bindSemaphoreId : msg.MessageID);
			Stream stream = out_Renamed;
			acquireWriteSemaphore(msgId);
			try
			{
				if (stream == null)
				{
					throw new IOException("Output stream not initialized");
				}
				if (stream.CanWrite)
				{
					sbyte[] encoding = msg.Asn1Object.getEncoding(encoder);
					stream.Write(SupportClass.ToByteArray(encoding), 0, encoding.Length);
					stream.Flush();
				}
			}
			catch (IOException rootException)
			{
				if (msg.Type == 0 && ssl)
				{
					string text = "Following problem(s) occurred while establishing SSL based Connection : ";
					if (handshakeProblemsEncountered.Count > 0)
					{
						text += GetProblemMessage((CertificateProblem)handshakeProblemsEncountered[0]);
						for (int i = 1; i < handshakeProblemsEncountered.Count; i++)
						{
							text = text + ", " + GetProblemMessage((CertificateProblem)handshakeProblemsEncountered[i]);
						}
					}
					else
					{
						text += "Unknown Certificate Problem";
					}
					throw new LdapException(text, new object[2] { host, port }, 113, null, rootException);
				}
				if (clientActive)
				{
					if (unsolSvrShutDnNotification)
					{
						throw new LdapException("SERVER_SHUTDOWN_REQ", new object[2] { host, port }, 91, null, rootException);
					}
					throw new LdapException("IO_EXCEPTION", new object[2] { host, port }, 91, null, rootException);
				}
			}
			finally
			{
				freeWriteSemaphore(msgId);
				handshakeProblemsEncountered.Clear();
			}
		}

		internal MessageAgent getMessageAgent(int msgId)
		{
			return messages.findMessageById(msgId).MessageAgent;
		}

		internal void removeMessage(Message info)
		{
			SupportClass.VectorRemoveElement(messages, info);
		}

		~Connection()
		{
			shutdown("Finalize", 0, null);
		}

		private void shutdown(string reason, int semaphoreId, InterThreadException notifyUser)
		{
			Message message = null;
			if (!clientActive)
			{
				return;
			}
			clientActive = false;
			while (true)
			{
				try
				{
					object obj = messages[0];
					messages.RemoveAt(0);
					message = (Message)obj;
				}
				catch (ArgumentOutOfRangeException)
				{
					break;
				}
				message.Abandon(null, notifyUser);
			}
			int msgId = acquireWriteSemaphore(semaphoreId);
			if (bindProperties != null && out_Renamed != null && out_Renamed.CanWrite && !bindProperties.Anonymous)
			{
				try
				{
					sbyte[] encoding = new LdapUnbindRequest(null).Asn1Object.getEncoding(encoder);
					out_Renamed.Write(SupportClass.ToByteArray(encoding), 0, encoding.Length);
					out_Renamed.Flush();
					out_Renamed.Close();
				}
				catch (Exception)
				{
				}
			}
			bindProperties = null;
			if (socket != null || sock != null)
			{
				if (reader != null && reason != "reader: thread stopping")
				{
					reader.Abort();
				}
				try
				{
					if (Ssl)
					{
						try
						{
							sock.Shutdown(SocketShutdown.Both);
						}
						catch
						{
						}
						sock.Close();
					}
					else
					{
						if (in_Renamed != null)
						{
							in_Renamed.Close();
						}
						socket.Close();
					}
				}
				catch (Exception)
				{
				}
				socket = null;
				sock = null;
				in_Renamed = null;
				out_Renamed = null;
			}
			freeWriteSemaphore(msgId);
		}

		internal bool areMessagesComplete()
		{
			object[] objectArray = messages.ObjectArray;
			int num = objectArray.Length;
			if (bindSemaphoreId != 0)
			{
				return false;
			}
			if (num == 0)
			{
				return true;
			}
			for (int i = 0; i < num; i++)
			{
				if (!((Message)objectArray[i]).Complete)
				{
					return false;
				}
			}
			return true;
		}

		internal void stopReaderOnReply(int messageID)
		{
			stopReaderMessageID = messageID;
		}

		internal void startReader()
		{
			Thread thread = new Thread(new ReaderThread(this).Run);
			thread.IsBackground = true;
			thread.Start();
			waitForReader(thread);
		}

		internal void startTLS()
		{
			try
			{
				waitForReader(null);
				nonTLSBackup = socket;
				Assembly assembly = null;
				try
				{
					assembly = Assembly.LoadFrom("Mono.Security.dll");
				}
				catch (FileNotFoundException)
				{
					throw new LdapException("SSL_PROVIDER_MISSING", 114, null);
				}
				Type? type = assembly.GetType("Mono.Security.Protocol.Tls.SslClientStream");
				object[] array = new object[4]
				{
					socket.GetStream(),
					host,
					false,
					null
				};
				Type type2 = assembly.GetType("Mono.Security.Protocol.Tls.SecurityProtocolType");
				_ = (Enum)Activator.CreateInstance(type2);
				int num = (int)Enum.Parse(type2, "Ssl3");
				int num2 = (int)Enum.Parse(type2, "Tls");
				array[3] = Enum.ToObject(type2, num | num2);
				object obj = Activator.CreateInstance(type, array);
				EventInfo @event = type.GetEvent("ServerCertValidationDelegate");
				@event.AddEventHandler(obj, Delegate.CreateDelegate(@event.EventHandlerType, this, "ServerCertificateValidation"));
				in_Renamed = (Stream)obj;
				out_Renamed = (Stream)obj;
			}
			catch (IOException rootException)
			{
				nonTLSBackup = null;
				throw new LdapException("Could not negotiate a secure connection", 91, null, rootException);
			}
			catch (Exception rootException2)
			{
				nonTLSBackup = null;
				throw new LdapException("The host is unknown", 91, null, rootException2);
			}
		}

		internal void stopTLS()
		{
			try
			{
				stopReaderMessageID = -98;
				out_Renamed.Close();
				in_Renamed.Close();
				waitForReader(null);
				socket = nonTLSBackup;
				in_Renamed = socket.GetStream();
				out_Renamed = socket.GetStream();
				stopReaderMessageID = -99;
			}
			catch (IOException rootException)
			{
				throw new LdapException("STOPTLS_ERROR", 91, null, rootException);
			}
			finally
			{
				nonTLSBackup = null;
				startReader();
			}
		}

		internal void ReplaceStreams(Stream newIn, Stream newOut)
		{
			waitForReader(null);
			in_Renamed = newIn;
			out_Renamed = newOut;
			startReader();
		}

		internal void AddUnsolicitedNotificationListener(LdapUnsolicitedNotificationListener listener)
		{
			unsolicitedListeners.Add(listener);
		}

		internal void RemoveUnsolicitedNotificationListener(LdapUnsolicitedNotificationListener listener)
		{
			SupportClass.VectorRemoveElement(unsolicitedListeners, listener);
		}

		private void notifyAllUnsolicitedListeners(RfcLdapMessage message)
		{
			if (new LdapExtendedResponse(message).ID.Equals("1.3.6.1.4.1.1466.20036"))
			{
				unsolSvrShutDnNotification = true;
			}
			int count = unsolicitedListeners.Count;
			for (int i = 0; i < count; i++)
			{
				LdapUnsolicitedNotificationListener l = (LdapUnsolicitedNotificationListener)unsolicitedListeners[i];
				LdapExtendedResponse m = new LdapExtendedResponse(message);
				new UnsolicitedListenerThread(this, l, m).Start();
			}
		}

		static Connection()
		{
			connNum = 0;
			security = "simple";
			nameLock = new object();
			sdk = new StringBuilder("2.1.8").ToString();
			protocol = 3;
		}
	}
	public class InterThreadException : LdapException
	{
		private Message request;

		internal virtual int MessageID
		{
			get
			{
				if (request == null)
				{
					return -1;
				}
				return request.MessageID;
			}
		}

		internal virtual int ReplyType
		{
			get
			{
				if (request == null)
				{
					return -1;
				}
				int messageType = request.MessageType;
				int result = -1;
				switch (messageType)
				{
				case 0:
					result = 1;
					break;
				case 2:
					result = -1;
					break;
				case 3:
					result = 5;
					break;
				case 6:
					result = 7;
					break;
				case 8:
					result = 9;
					break;
				case 10:
					result = 11;
					break;
				case 12:
					result = 13;
					break;
				case 14:
					result = 15;
					break;
				case 16:
					result = -1;
					break;
				case 23:
					result = 24;
					break;
				}
				return result;
			}
		}

		internal InterThreadException(string message, object[] arguments, int resultCode, Exception rootException, Message request)
			: base(message, arguments, resultCode, null, rootException)
		{
			this.request = request;
		}
	}
	public class LdapAbandonRequest : LdapMessage
	{
		public LdapAbandonRequest(int id, LdapControl[] cont)
			: base(16, new RfcAbandonRequest(id), cont)
		{
		}
	}
	public class LdapAddRequest : LdapMessage
	{
		public virtual LdapEntry Entry
		{
			get
			{
				RfcAddRequest obj = (RfcAddRequest)Asn1Object.getRequest();
				LdapAttributeSet ldapAttributeSet = new LdapAttributeSet();
				Asn1Object[] array = obj.Attributes.toArray();
				for (int i = 0; i < array.Length; i++)
				{
					RfcAttributeTypeAndValues obj2 = (RfcAttributeTypeAndValues)array[i];
					LdapAttribute ldapAttribute = new LdapAttribute(((Asn1OctetString)obj2.get_Renamed(0)).stringValue());
					object[] array2 = ((Asn1SetOf)obj2.get_Renamed(1)).toArray();
					for (int j = 0; j < array2.Length; j++)
					{
						ldapAttribute.addValue(((Asn1OctetString)array2[j]).byteValue());
					}
					ldapAttributeSet.Add(ldapAttribute);
				}
				return new LdapEntry(Asn1Object.RequestDN, ldapAttributeSet);
			}
		}

		public LdapAddRequest(LdapEntry entry, LdapControl[] cont)
			: base(8, new RfcAddRequest(new RfcLdapDN(entry.DN), makeRfcAttrList(entry)), cont)
		{
		}

		private static RfcAttributeList makeRfcAttrList(LdapEntry entry)
		{
			LdapAttributeSet attributeSet = entry.getAttributeSet();
			RfcAttributeList rfcAttributeList = new RfcAttributeList(attributeSet.Count);
			IEnumerator enumerator = attributeSet.GetEnumerator();
			while (enumerator.MoveNext())
			{
				LdapAttribute ldapAttribute = (LdapAttribute)enumerator.Current;
				Asn1SetOf asn1SetOf = new Asn1SetOf(ldapAttribute.size());
				IEnumerator byteValues = ldapAttribute.ByteValues;
				while (byteValues.MoveNext())
				{
					asn1SetOf.add(new RfcAttributeValue((sbyte[])byteValues.Current));
				}
				rfcAttributeList.add(new RfcAttributeTypeAndValues(new RfcAttributeDescription(ldapAttribute.Name), asn1SetOf));
			}
			return rfcAttributeList;
		}

		public override string ToString()
		{
			return Asn1Object.ToString();
		}
	}
	public class LdapAttribute : ICloneable, IComparable
	{
		private class URLData
		{
			private LdapAttribute enclosingInstance;

			private int length;

			private sbyte[] data;

			public LdapAttribute Enclosing_Instance => enclosingInstance;

			private void InitBlock(LdapAttribute enclosingInstance)
			{
				this.enclosingInstance = enclosingInstance;
			}

			public URLData(LdapAttribute enclosingInstance, sbyte[] data, int length)
			{
				InitBlock(enclosingInstance);
				this.length = length;
				this.data = data;
			}

			public int getLength()
			{
				return length;
			}

			public sbyte[] getData()
			{
				return data;
			}
		}

		private string name;

		private string baseName;

		private string[] subTypes;

		private object[] values;

		public virtual IEnumerator ByteValues => new ArrayEnumeration(ByteValueArray);

		public virtual IEnumerator StringValues => new ArrayEnumeration(StringValueArray);

		[CLSCompliant(false)]
		public virtual sbyte[][] ByteValueArray
		{
			get
			{
				if (values == null)
				{
					return new sbyte[0][];
				}
				int num = values.Length;
				sbyte[][] array = new sbyte[num][];
				int i = 0;
				for (int num2 = num; i < num2; i++)
				{
					array[i] = new sbyte[((sbyte[])values[i]).Length];
					Array.Copy((Array)values[i], 0, array[i], 0, array[i].Length);
				}
				return array;
			}
		}

		public virtual string[] StringValueArray
		{
			get
			{
				if (values == null)
				{
					return new string[0];
				}
				int num = values.Length;
				string[] array = new string[num];
				for (int i = 0; i < num; i++)
				{
					try
					{
						char[] chars = Encoding.GetEncoding("utf-8").GetChars(SupportClass.ToByteArray((sbyte[])values[i]));
						array[i] = new string(chars);
					}
					catch (IOException ex)
					{
						throw new SystemException(ex.ToString());
					}
				}
				return array;
			}
		}

		public virtual string StringValue
		{
			get
			{
				string result = null;
				if (values != null)
				{
					try
					{
						result = new string(Encoding.GetEncoding("utf-8").GetChars(SupportClass.ToByteArray((sbyte[])values[0])));
					}
					catch (IOException ex)
					{
						throw new SystemException(ex.ToString());
					}
				}
				return result;
			}
		}

		[CLSCompliant(false)]
		public virtual sbyte[] ByteValue
		{
			get
			{
				sbyte[] array = null;
				if (values != null)
				{
					array = new sbyte[((sbyte[])values[0]).Length];
					Array.Copy((Array)values[0], 0, array, 0, array.Length);
				}
				return array;
			}
		}

		public virtual string LangSubtype
		{
			get
			{
				if (subTypes != null)
				{
					for (int i = 0; i < subTypes.Length; i++)
					{
						if (subTypes[i].StartsWith("lang-"))
						{
							return subTypes[i];
						}
					}
				}
				return null;
			}
		}

		public virtual string Name => name;

		protected internal virtual string Value
		{
			set
			{
				values = null;
				try
				{
					sbyte[] bytes = SupportClass.ToSByteArray(Encoding.GetEncoding("utf-8").GetBytes(value));
					add(bytes);
				}
				catch (IOException ex)
				{
					throw new SystemException(ex.ToString());
				}
			}
		}

		public LdapAttribute(LdapAttribute attr)
		{
			if (attr == null)
			{
				throw new ArgumentException("LdapAttribute class cannot be null");
			}
			name = attr.name;
			baseName = attr.baseName;
			if (attr.subTypes != null)
			{
				subTypes = new string[attr.subTypes.Length];
				Array.Copy(attr.subTypes, 0, subTypes, 0, subTypes.Length);
			}
			if (attr.values != null)
			{
				values = new object[attr.values.Length];
				Array.Copy(attr.values, 0, values, 0, values.Length);
			}
		}

		public LdapAttribute(string attrName)
		{
			if (attrName == null)
			{
				throw new ArgumentException("Attribute name cannot be null");
			}
			name = attrName;
			baseName = getBaseName(attrName);
			subTypes = getSubtypes(attrName);
		}

		[CLSCompliant(false)]
		public LdapAttribute(string attrName, sbyte[] attrBytes)
			: this(attrName)
		{
			if (attrBytes == null)
			{
				throw new ArgumentException("Attribute value cannot be null");
			}
			sbyte[] array = new sbyte[attrBytes.Length];
			Array.Copy(attrBytes, 0, array, 0, attrBytes.Length);
			add(array);
		}

		public LdapAttribute(string attrName, string attrString)
			: this(attrName)
		{
			if (attrString == null)
			{
				throw new ArgumentException("Attribute value cannot be null");
			}
			try
			{
				sbyte[] bytes = SupportClass.ToSByteArray(Encoding.GetEncoding("utf-8").GetBytes(attrString));
				add(bytes);
			}
			catch (IOException ex)
			{
				throw new SystemException(ex.ToString());
			}
		}

		public LdapAttribute(string attrName, string[] attrStrings)
			: this(attrName)
		{
			if (attrStrings == null)
			{
				throw new ArgumentException("Attribute values array cannot be null");
			}
			int i = 0;
			for (int num = attrStrings.Length; i < num; i++)
			{
				try
				{
					if (attrStrings[i] == null)
					{
						throw new ArgumentException("Attribute value at array index " + i + " cannot be null");
					}
					sbyte[] bytes = SupportClass.ToSByteArray(Encoding.GetEncoding("utf-8").GetBytes(attrStrings[i]));
					add(bytes);
				}
				catch (IOException ex)
				{
					throw new SystemException(ex.ToString());
				}
			}
		}

		public object Clone()
		{
			try
			{
				object obj = MemberwiseClone();
				if (values != null)
				{
					Array.Copy(values, 0, ((LdapAttribute)obj).values, 0, values.Length);
				}
				return obj;
			}
			catch (Exception)
			{
				throw new SystemException("Internal error, cannot create clone");
			}
		}

		public virtual void addValue(string attrString)
		{
			if (attrString == null)
			{
				throw new ArgumentException("Attribute value cannot be null");
			}
			try
			{
				sbyte[] bytes = SupportClass.ToSByteArray(Encoding.GetEncoding("utf-8").GetBytes(attrString));
				add(bytes);
			}
			catch (IOException ex)
			{
				throw new SystemException(ex.ToString());
			}
		}

		[CLSCompliant(false)]
		public virtual void addValue(sbyte[] attrBytes)
		{
			if (attrBytes == null)
			{
				throw new ArgumentException("Attribute value cannot be null");
			}
			add(attrBytes);
		}

		public virtual void addBase64Value(string attrString)
		{
			if (attrString == null)
			{
				throw new ArgumentException("Attribute value cannot be null");
			}
			add(Base64.decode(attrString));
		}

		public virtual void addBase64Value(StringBuilder attrString, int start, int end)
		{
			if (attrString == null)
			{
				throw new ArgumentException("Attribute value cannot be null");
			}
			add(Base64.decode(attrString, start, end));
		}

		public virtual void addBase64Value(char[] attrChars)
		{
			if (attrChars == null)
			{
				throw new ArgumentException("Attribute value cannot be null");
			}
			add(Base64.decode(attrChars));
		}

		public virtual void addURLValue(string url)
		{
			if (url == null)
			{
				throw new ArgumentException("Attribute URL cannot be null");
			}
			addURLValue(new Uri(url));
		}

		public virtual void addURLValue(Uri url)
		{
			if (url == null)
			{
				throw new ArgumentException("Attribute URL cannot be null");
			}
			try
			{
				Stream responseStream = WebRequest.Create(url).GetResponse().GetResponseStream();
				ArrayList arrayList = new ArrayList();
				sbyte[] target = new sbyte[4096];
				int num = 0;
				int num2;
				while ((num2 = SupportClass.ReadInput(responseStream, ref target, 0, 4096)) != -1)
				{
					arrayList.Add(new URLData(this, target, num2));
					target = new sbyte[4096];
					num += num2;
				}
				sbyte[] array = new sbyte[num];
				int num3 = 0;
				for (int i = 0; i < arrayList.Count; i++)
				{
					URLData obj = (URLData)arrayList[i];
					num2 = obj.getLength();
					Array.Copy(obj.getData(), 0, array, num3, num2);
					num3 += num2;
				}
				add(array);
			}
			catch (IOException ex)
			{
				throw new SystemException(ex.ToString());
			}
		}

		public virtual string getBaseName()
		{
			return baseName;
		}

		public static string getBaseName(string attrName)
		{
			if (attrName == null)
			{
				throw new ArgumentException("Attribute name cannot be null");
			}
			int num = attrName.IndexOf(';');
			if (-1 == num)
			{
				return attrName;
			}
			return attrName.Substring(0, num);
		}

		public virtual string[] getSubtypes()
		{
			return subTypes;
		}

		public static string[] getSubtypes(string attrName)
		{
			if (attrName == null)
			{
				throw new ArgumentException("Attribute name cannot be null");
			}
			SupportClass.Tokenizer tokenizer = new SupportClass.Tokenizer(attrName, ";");
			string[] array = null;
			int count = tokenizer.Count;
			if (count > 0)
			{
				tokenizer.NextToken();
				array = new string[count - 1];
				int num = 0;
				while (tokenizer.HasMoreTokens())
				{
					array[num++] = tokenizer.NextToken();
				}
			}
			return array;
		}

		public virtual bool hasSubtype(string subtype)
		{
			if (subtype == null)
			{
				throw new ArgumentException("subtype cannot be null");
			}
			if (subTypes != null)
			{
				for (int i = 0; i < subTypes.Length; i++)
				{
					if (subTypes[i].ToUpper().Equals(subtype.ToUpper()))
					{
						return true;
					}
				}
			}
			return false;
		}

		public virtual bool hasSubtypes(string[] subtypes)
		{
			if (subtypes == null)
			{
				throw new ArgumentException("subtypes cannot be null");
			}
			for (int i = 0; i < subtypes.Length; i++)
			{
				int num = 0;
				while (true)
				{
					if (num < subTypes.Length)
					{
						if (subTypes[num] == null)
						{
							throw new ArgumentException("subtype at array index " + i + " cannot be null");
						}
						if (subTypes[num].ToUpper().Equals(subtypes[i].ToUpper()))
						{
							break;
						}
						num++;
						continue;
					}
					return false;
				}
			}
			return true;
		}

		public virtual void removeValue(string attrString)
		{
			if (attrString == null)
			{
				throw new ArgumentException("Attribute value cannot be null");
			}
			try
			{
				sbyte[] attrBytes = SupportClass.ToSByteArray(Encoding.GetEncoding("utf-8").GetBytes(attrString));
				removeValue(attrBytes);
			}
			catch (IOException ex)
			{
				throw new SystemException(ex.ToString());
			}
		}

		[CLSCompliant(false)]
		public virtual void removeValue(sbyte[] attrBytes)
		{
			if (attrBytes == null)
			{
				throw new ArgumentException("Attribute value cannot be null");
			}
			for (int i = 0; i < values.Length; i++)
			{
				if (!equals(attrBytes, (sbyte[])values[i]))
				{
					continue;
				}
				if (i == 0 && 1 == values.Length)
				{
					values = null;
					break;
				}
				if (values.Length == 1)
				{
					values = null;
					break;
				}
				int num = values.Length - i - 1;
				object[] destinationArray = new object[values.Length - 1];
				if (i != 0)
				{
					Array.Copy(values, 0, destinationArray, 0, i);
				}
				if (num != 0)
				{
					Array.Copy(values, i + 1, destinationArray, i, num);
				}
				values = destinationArray;
				destinationArray = null;
				break;
			}
		}

		public virtual int size()
		{
			if (values != null)
			{
				return values.Length;
			}
			return 0;
		}

		public virtual int CompareTo(object attribute)
		{
			return name.CompareTo(((LdapAttribute)attribute).name);
		}

		private void add(sbyte[] bytes)
		{
			if (values == null)
			{
				values = new object[1] { bytes };
				return;
			}
			for (int i = 0; i < values.Length; i++)
			{
				if (equals(bytes, (sbyte[])values[i]))
				{
					return;
				}
			}
			object[] array = new object[values.Length + 1];
			Array.Copy(values, 0, array, 0, values.Length);
			array[values.Length] = bytes;
			values = array;
			array = null;
		}

		private bool equals(sbyte[] e1, sbyte[] e2)
		{
			if (e1 == e2)
			{
				return true;
			}
			if (e1 == null || e2 == null)
			{
				return false;
			}
			int num = e1.Length;
			if (e2.Length != num)
			{
				return false;
			}
			for (int i = 0; i < num; i++)
			{
				if (e1[i] != e2[i])
				{
					return false;
				}
			}
			return true;
		}

		public override string ToString()
		{
			StringBuilder stringBuilder = new StringBuilder("LdapAttribute: ");
			try
			{
				stringBuilder.Append("{type='" + name + "'");
				if (values != null)
				{
					stringBuilder.Append(", ");
					if (values.Length == 1)
					{
						stringBuilder.Append("value='");
					}
					else
					{
						stringBuilder.Append("values='");
					}
					for (int i = 0; i < values.Length; i++)
					{
						if (i != 0)
						{
							stringBuilder.Append("','");
						}
						if (((sbyte[])values[i]).Length != 0)
						{
							string text = new string(Encoding.GetEncoding("utf-8").GetChars(SupportClass.ToByteArray((sbyte[])values[i])));
							if (text.Length == 0)
							{
								stringBuilder.Append("<binary value, length:" + text.Length);
							}
							else
							{
								stringBuilder.Append(text);
							}
						}
					}
					stringBuilder.Append("'");
				}
				stringBuilder.Append("}");
			}
			catch (Exception ex)
			{
				throw new SystemException(ex.ToString());
			}
			return stringBuilder.ToString();
		}
	}
	public class LdapAttributeSchema : LdapSchemaElement
	{
		private string syntaxString;

		private bool single;

		private string superior;

		private string equality;

		private string ordering;

		private string substring;

		private bool collective;

		private bool userMod = true;

		private int usage;

		public const int USER_APPLICATIONS = 0;

		public const int DIRECTORY_OPERATION = 1;

		public const int DISTRIBUTED_OPERATION = 2;

		public const int DSA_OPERATION = 3;

		public virtual string SyntaxString => syntaxString;

		public virtual string Superior => superior;

		public virtual bool SingleValued => single;

		public virtual string EqualityMatchingRule => equality;

		public virtual string OrderingMatchingRule => ordering;

		public virtual string SubstringMatchingRule => substring;

		public virtual bool Collective => collective;

		public virtual bool UserModifiable => userMod;

		public virtual int Usage => usage;

		private void InitBlock()
		{
			usage = 0;
		}

		public LdapAttributeSchema(string[] names, string oid, string description, string syntaxString, bool single, string superior, bool obsolete, string equality, string ordering, string substring, bool collective, bool isUserModifiable, int usage)
			: base(LdapSchema.schemaTypeNames[0])
		{
			InitBlock();
			base.names = names;
			base.oid = oid;
			base.description = description;
			base.obsolete = obsolete;
			this.syntaxString = syntaxString;
			this.single = single;
			this.equality = equality;
			this.ordering = ordering;
			this.substring = substring;
			this.collective = collective;
			userMod = isUserModifiable;
			this.usage = usage;
			this.superior = superior;
			base.Value = formatString();
		}

		public LdapAttributeSchema(string raw)
			: base(LdapSchema.schemaTypeNames[0])
		{
			InitBlock();
			try
			{
				SchemaParser schemaParser = new SchemaParser(raw);
				if (schemaParser.Names != null)
				{
					names = schemaParser.Names;
				}
				if (schemaParser.ID != null)
				{
					oid = schemaParser.ID;
				}
				if (schemaParser.Description != null)
				{
					description = schemaParser.Description;
				}
				if (schemaParser.Syntax != null)
				{
					syntaxString = schemaParser.Syntax;
				}
				if (schemaParser.Superior != null)
				{
					superior = schemaParser.Superior;
				}
				single = schemaParser.Single;
				obsolete = schemaParser.Obsolete;
				IEnumerator qualifiers = schemaParser.Qualifiers;
				while (qualifiers.MoveNext())
				{
					AttributeQualifier attributeQualifier = (AttributeQualifier)qualifiers.Current;
					setQualifier(attributeQualifier.Name, attributeQualifier.Values);
				}
				base.Value = formatString();
			}
			catch (IOException ex)
			{
				throw new SystemException(ex.ToString());
			}
		}

		protected internal override string formatString()
		{
			StringBuilder stringBuilder = new StringBuilder("( ");
			string iD;
			if ((iD = ID) != null)
			{
				stringBuilder.Append(iD);
			}
			string[] array = Names;
			if (array != null)
			{
				stringBuilder.Append(" NAME ");
				if (array.Length == 1)
				{
					stringBuilder.Append("'" + array[0] + "'");
				}
				else
				{
					stringBuilder.Append("( ");
					for (int i = 0; i < array.Length; i++)
					{
						stringBuilder.Append(" '" + array[i] + "'");
					}
					stringBuilder.Append(" )");
				}
			}
			if ((iD = Description) != null)
			{
				stringBuilder.Append(" DESC ");
				stringBuilder.Append("'" + iD + "'");
			}
			if (Obsolete)
			{
				stringBuilder.Append(" OBSOLETE");
			}
			if ((iD = Superior) != null)
			{
				stringBuilder.Append(" SUP ");
				stringBuilder.Append("'" + iD + "'");
			}
			if ((iD = EqualityMatchingRule) != null)
			{
				stringBuilder.Append(" EQUALITY ");
				stringBuilder.Append("'" + iD + "'");
			}
			if ((iD = OrderingMatchingRule) != null)
			{
				stringBuilder.Append(" ORDERING ");
				stringBuilder.Append("'" + iD + "'");
			}
			if ((iD = SubstringMatchingRule) != null)
			{
				stringBuilder.Append(" SUBSTR ");
				stringBuilder.Append("'" + iD + "'");
			}
			if ((iD = SyntaxString) != null)
			{
				stringBuilder.Append(" SYNTAX ");
				stringBuilder.Append(iD);
			}
			if (SingleValued)
			{
				stringBuilder.Append(" SINGLE-VALUE");
			}
			if (Collective)
			{
				stringBuilder.Append(" COLLECTIVE");
			}
			if (!UserModifiable)
			{
				stringBuilder.Append(" NO-USER-MODIFICATION");
			}
			int num;
			if ((num = Usage) != 0)
			{
				switch (num)
				{
				case 1:
					stringBuilder.Append(" USAGE directoryOperation");
					break;
				case 2:
					stringBuilder.Append(" USAGE distributedOperation");
					break;
				case 3:
					stringBuilder.Append(" USAGE dSAOperation");
					break;
				}
			}
			IEnumerator qualifierNames = QualifierNames;
			while (qualifierNames.MoveNext())
			{
				iD = (string)qualifierNames.Current;
				if (iD == null)
				{
					continue;
				}
				stringBuilder.Append(" " + iD);
				array = getQualifier(iD);
				if (array != null)
				{
					if (array.Length > 1)
					{
						stringBuilder.Append("(");
					}
					for (int j = 0; j < array.Length; j++)
					{
						stringBuilder.Append(" '" + array[j] + "'");
					}
					if (array.Length > 1)
					{
						stringBuilder.Append(" )");
					}
				}
			}
			stringBuilder.Append(" )");
			return stringBuilder.ToString();
		}
	}
	public class LdapAttributeSet : SupportClass.AbstractSetSupport, ICloneable
	{
		private Hashtable map;

		public override int Count => map.Count;

		public LdapAttributeSet()
		{
			map = new Hashtable();
		}

		public override object Clone()
		{
			try
			{
				object obj = MemberwiseClone();
				IEnumerator enumerator = GetEnumerator();
				while (enumerator.MoveNext())
				{
					((LdapAttributeSet)obj).Add(((LdapAttribute)enumerator.Current).Clone());
				}
				return obj;
			}
			catch (Exception)
			{
				throw new SystemException("Internal error, cannot create clone");
			}
		}

		public virtual LdapAttribute getAttribute(string attrName)
		{
			return (LdapAttribute)map[attrName.ToUpper()];
		}

		public virtual LdapAttribute getAttribute(string attrName, string lang)
		{
			string text = attrName + ";" + lang;
			return (LdapAttribute)map[text.ToUpper()];
		}

		public virtual LdapAttributeSet getSubset(string subtype)
		{
			LdapAttributeSet ldapAttributeSet = new LdapAttributeSet();
			IEnumerator enumerator = GetEnumerator();
			while (enumerator.MoveNext())
			{
				LdapAttribute ldapAttribute = (LdapAttribute)enumerator.Current;
				if (ldapAttribute.hasSubtype(subtype))
				{
					ldapAttributeSet.Add(ldapAttribute.Clone());
				}
			}
			return ldapAttributeSet;
		}

		public override IEnumerator GetEnumerator()
		{
			return map.Values.GetEnumerator();
		}

		public override bool IsEmpty()
		{
			return map.Count == 0;
		}

		public override bool Contains(object attr)
		{
			LdapAttribute ldapAttribute = (LdapAttribute)attr;
			return map.ContainsKey(ldapAttribute.Name.ToUpper());
		}

		public override bool Add(object attr)
		{
			LdapAttribute ldapAttribute = (LdapAttribute)attr;
			string key = ldapAttribute.Name.ToUpper();
			if (map.ContainsKey(key))
			{
				return false;
			}
			SupportClass.PutElement(map, key, ldapAttribute);
			return true;
		}

		public override bool Remove(object object_Renamed)
		{
			string text = ((!(object_Renamed is string)) ? ((LdapAttribute)object_Renamed).Name : ((string)object_Renamed));
			if (text == null)
			{
				return false;
			}
			return SupportClass.HashtableRemove(map, text.ToUpper()) != null;
		}

		public override void Clear()
		{
			map.Clear();
		}

		public override bool AddAll(ICollection c)
		{
			bool result = false;
			IEnumerator enumerator = c.GetEnumerator();
			while (enumerator.MoveNext())
			{
				if (Add(enumerator.Current))
				{
					result = true;
				}
			}
			return result;
		}

		public override string ToString()
		{
			StringBuilder stringBuilder = new StringBuilder("LdapAttributeSet: ");
			IEnumerator enumerator = GetEnumerator();
			bool flag = true;
			while (enumerator.MoveNext())
			{
				if (!flag)
				{
					stringBuilder.Append(" ");
				}
				flag = false;
				LdapAttribute ldapAttribute = (LdapAttribute)enumerator.Current;
				stringBuilder.Append(ldapAttribute.ToString());
			}
			return stringBuilder.ToString();
		}
	}
	public interface LdapAuthHandler : LdapReferralHandler
	{
		LdapAuthProvider getAuthProvider(string host, int port);
	}
	public class LdapAuthProvider
	{
		private string dn;

		private sbyte[] password;

		public virtual string DN => dn;

		[CLSCompliant(false)]
		public virtual sbyte[] Password => password;

		[CLSCompliant(false)]
		public LdapAuthProvider(string dn, sbyte[] password)
		{
			this.dn = dn;
			this.password = password;
		}
	}
	public interface LdapBindHandler : LdapReferralHandler
	{
		LdapConnection Bind(string[] ldapurl, LdapConnection conn);
	}
	public class LdapBindRequest : LdapMessage
	{
		public virtual string AuthenticationDN => Asn1Object.RequestDN;

		[CLSCompliant(false)]
		public LdapBindRequest(int version, string dn, sbyte[] passwd, LdapControl[] cont)
			: base(0, new RfcBindRequest(new Asn1Integer(version), new RfcLdapDN(dn), new RfcAuthenticationChoice(new Asn1Tagged(new Asn1Identifier(2, constructed: false, 0), new Asn1OctetString(passwd), explicit_Renamed: false))), cont)
		{
		}

		[CLSCompliant(false)]
		public LdapBindRequest(int version, string dn, string mechanism, sbyte[] credentials, LdapControl[] cont)
			: base(0, new RfcBindRequest(version, dn, mechanism, credentials), cont)
		{
		}

		public override string ToString()
		{
			return Asn1Object.ToString();
		}
	}
	public class LdapCompareAttrNames : IComparer
	{
		private string[] sortByNames;

		private bool[] sortAscending;

		private CultureInfo location;

		private CompareInfo collator;

		public virtual CultureInfo Locale
		{
			get
			{
				return location;
			}
			set
			{
				collator = value.CompareInfo;
				location = value;
			}
		}

		private void InitBlock()
		{
			location = CultureInfo.CurrentCulture;
			collator = CultureInfo.CurrentCulture.CompareInfo;
		}

		public LdapCompareAttrNames(string attrName)
		{
			InitBlock();
			sortByNames = new string[1];
			sortByNames[0] = attrName;
			sortAscending = new bool[1];
			sortAscending[0] = true;
		}

		public LdapCompareAttrNames(string attrName, bool ascendingFlag)
		{
			InitBlock();
			sortByNames = new string[1];
			sortByNames[0] = attrName;
			sortAscending = new bool[1];
			sortAscending[0] = ascendingFlag;
		}

		public LdapCompareAttrNames(string[] attrNames)
		{
			InitBlock();
			sortByNames = new string[attrNames.Length];
			sortAscending = new bool[attrNames.Length];
			for (int i = 0; i < attrNames.Length; i++)
			{
				sortByNames[i] = attrNames[i];
				sortAscending[i] = true;
			}
		}

		public LdapCompareAttrNames(string[] attrNames, bool[] ascendingFlags)
		{
			InitBlock();
			if (attrNames.Length != ascendingFlags.Length)
			{
				throw new LdapException("UNEQUAL_LENGTHS", 18, null);
			}
			sortByNames = new string[attrNames.Length];
			sortAscending = new bool[ascendingFlags.Length];
			for (int i = 0; i < attrNames.Length; i++)
			{
				sortByNames[i] = attrNames[i];
				sortAscending[i] = ascendingFlags[i];
			}
		}

		public virtual int Compare(object object1, object object2)
		{
			LdapEntry ldapEntry = (LdapEntry)object1;
			LdapEntry ldapEntry2 = (LdapEntry)object2;
			int num = 0;
			if (collator == null)
			{
				collator = CultureInfo.CurrentCulture.CompareInfo;
			}
			int num2;
			do
			{
				LdapAttribute attribute = ldapEntry.getAttribute(sortByNames[num]);
				LdapAttribute attribute2 = ldapEntry2.getAttribute(sortByNames[num]);
				if (attribute == null || attribute2 == null)
				{
					num2 = ((attribute != null) ? (-1) : ((attribute2 != null) ? 1 : 0));
				}
				else
				{
					string[] stringValueArray = attribute.StringValueArray;
					string[] stringValueArray2 = attribute2.StringValueArray;
					num2 = collator.Compare(stringValueArray[0], stringValueArray2[0]);
				}
				num++;
			}
			while (num2 == 0 && num < sortByNames.Length);
			if (sortAscending[num - 1])
			{
				return num2;
			}
			return -num2;
		}

		public override bool Equals(object comparator)
		{
			if (!(comparator is LdapCompareAttrNames))
			{
				return false;
			}
			LdapCompareAttrNames ldapCompareAttrNames = (LdapCompareAttrNames)comparator;
			if (ldapCompareAttrNames.sortByNames.Length != sortByNames.Length || ldapCompareAttrNames.sortAscending.Length != sortAscending.Length)
			{
				return false;
			}
			for (int i = 0; i < sortByNames.Length; i++)
			{
				if (ldapCompareAttrNames.sortAscending[i] != sortAscending[i])
				{
					return false;
				}
				if (!ldapCompareAttrNames.sortByNames[i].ToUpper().Equals(sortByNames[i].ToUpper()))
				{
					return false;
				}
			}
			return true;
		}
	}
	public class LdapCompareRequest : LdapMessage
	{
		public virtual string AttributeDescription => ((RfcCompareRequest)Asn1Object.getRequest()).AttributeValueAssertion.AttributeDescription;

		[CLSCompliant(false)]
		public virtual sbyte[] AssertionValue => ((RfcCompareRequest)Asn1Object.getRequest()).AttributeValueAssertion.AssertionValue;

		public virtual string DN => Asn1Object.RequestDN;

		[CLSCompliant(false)]
		public LdapCompareRequest(string dn, string name, sbyte[] value_Renamed, LdapControl[] cont)
			: base(14, new RfcCompareRequest(new RfcLdapDN(dn), new RfcAttributeValueAssertion(new RfcAttributeDescription(name), new RfcAssertionValue(value_Renamed))), cont)
		{
		}
	}
	public class LdapConnection : ICloneable
	{
		private LdapSearchConstraints defSearchCons;

		private LdapControl[] responseCtls;

		private object responseCtlSemaphore;

		private Connection conn;

		private static object nameLock;

		private static int lConnNum;

		private string name;

		public const int SCOPE_BASE = 0;

		public const int SCOPE_ONE = 1;

		public const int SCOPE_SUB = 2;

		public const string NO_ATTRS = "1.1";

		public const string ALL_USER_ATTRS = "*";

		public const int Ldap_V3 = 3;

		public const int DEFAULT_PORT = 389;

		public const int DEFAULT_SSL_PORT = 636;

		public const string Ldap_PROPERTY_SDK = "version.sdk";

		public const string Ldap_PROPERTY_PROTOCOL = "version.protocol";

		public const string Ldap_PROPERTY_SECURITY = "version.security";

		public const string SERVER_SHUTDOWN_OID = "1.3.6.1.4.1.1466.20036";

		private const string START_TLS_OID = "1.3.6.1.4.1.1466.20037";

		public virtual int ProtocolVersion => conn.BindProperties?.ProtocolVersion ?? 3;

		public virtual string AuthenticationDN
		{
			get
			{
				BindProperties bindProperties = conn.BindProperties;
				if (bindProperties == null)
				{
					return null;
				}
				if (bindProperties.Anonymous)
				{
					return null;
				}
				return bindProperties.AuthenticationDN;
			}
		}

		public virtual string AuthenticationMethod
		{
			get
			{
				if (conn.BindProperties == null)
				{
					return "simple";
				}
				return conn.BindProperties.AuthenticationMethod;
			}
		}

		public virtual IDictionary SaslBindProperties
		{
			get
			{
				if (conn.BindProperties == null)
				{
					return null;
				}
				return conn.BindProperties.SaslBindProperties;
			}
		}

		public virtual object SaslBindCallbackHandler
		{
			get
			{
				if (conn.BindProperties == null)
				{
					return null;
				}
				return conn.BindProperties.SaslCallbackHandler;
			}
		}

		public virtual LdapConstraints Constraints
		{
			get
			{
				return (LdapConstraints)defSearchCons.Clone();
			}
			set
			{
				if (value is LdapSearchConstraints)
				{
					defSearchCons = (LdapSearchConstraints)value.Clone();
					return;
				}
				LdapSearchConstraints ldapSearchConstraints = (LdapSearchConstraints)defSearchCons.Clone();
				ldapSearchConstraints.HopLimit = value.HopLimit;
				ldapSearchConstraints.TimeLimit = value.TimeLimit;
				ldapSearchConstraints.setReferralHandler(value.getReferralHandler());
				ldapSearchConstraints.ReferralFollowing = value.ReferralFollowing;
				LdapControl[] controls = value.getControls();
				if (controls != null)
				{
					ldapSearchConstraints.setControls(controls);
				}
				Hashtable properties = ldapSearchConstraints.Properties;
				if (properties != null)
				{
					ldapSearchConstraints.Properties = properties;
				}
				defSearchCons = ldapSearchConstraints;
			}
		}

		public virtual string Host => conn.Host;

		public virtual int Port => conn.Port;

		public virtual LdapSearchConstraints SearchConstraints => (LdapSearchConstraints)defSearchCons.Clone();

		public bool SecureSocketLayer
		{
			get
			{
				return conn.Ssl;
			}
			set
			{
				conn.Ssl = value;
			}
		}

		public virtual bool Bound => conn.Bound;

		public virtual bool Connected => conn.Connected;

		public virtual bool TLS => conn.TLS;

		public virtual LdapControl[] ResponseControls
		{
			get
			{
				if (responseCtls == null)
				{
					return null;
				}
				LdapControl[] array = new LdapControl[responseCtls.Length];
				lock (responseCtlSemaphore)
				{
					for (int i = 0; i < responseCtls.Length; i++)
					{
						array[i] = (LdapControl)responseCtls[i].Clone();
					}
					return array;
				}
			}
		}

		internal virtual Connection Connection => conn;

		internal virtual string ConnectionName => name;

		public event CertificateValidationCallback UserDefinedServerCertValidationDelegate
		{
			add
			{
				conn.OnCertificateValidation += value;
			}
			remove
			{
				conn.OnCertificateValidation -= value;
			}
		}

		private void InitBlock()
		{
			defSearchCons = new LdapSearchConstraints();
			responseCtlSemaphore = new object();
		}

		public LdapConnection()
		{
			InitBlock();
			conn = new Connection();
		}

		public object Clone()
		{
			object obj;
			LdapConnection ldapConnection;
			try
			{
				obj = MemberwiseClone();
				ldapConnection = (LdapConnection)obj;
			}
			catch (Exception)
			{
				throw new SystemException("Internal error, cannot create clone");
			}
			ldapConnection.conn = conn;
			if (defSearchCons != null)
			{
				ldapConnection.defSearchCons = (LdapSearchConstraints)defSearchCons.Clone();
			}
			else
			{
				ldapConnection.defSearchCons = null;
			}
			if (responseCtls != null)
			{
				ldapConnection.responseCtls = new LdapControl[responseCtls.Length];
				for (int i = 0; i < responseCtls.Length; i++)
				{
					ldapConnection.responseCtls[i] = (LdapControl)responseCtls[i].Clone();
				}
			}
			else
			{
				ldapConnection.responseCtls = null;
			}
			conn.incrCloneCount();
			return obj;
		}

		~LdapConnection()
		{
			Disconnect(defSearchCons, how: false);
		}

		public virtual object getProperty(string name)
		{
			if (name.ToUpper().Equals("version.sdk".ToUpper()))
			{
				return Connection.sdk;
			}
			if (name.ToUpper().Equals("version.protocol".ToUpper()))
			{
				return Connection.protocol;
			}
			if (name.ToUpper().Equals("version.security".ToUpper()))
			{
				return Connection.security;
			}
			return null;
		}

		public virtual void AddUnsolicitedNotificationListener(LdapUnsolicitedNotificationListener listener)
		{
			if (listener != null)
			{
				conn.AddUnsolicitedNotificationListener(listener);
			}
		}

		public virtual void RemoveUnsolicitedNotificationListener(LdapUnsolicitedNotificationListener listener)
		{
			if (listener != null)
			{
				conn.RemoveUnsolicitedNotificationListener(listener);
			}
		}

		public virtual void startTLS()
		{
			LdapMessage ldapMessage = MakeExtendedOperation(new LdapExtendedOperation("1.3.6.1.4.1.1466.20037", null), null);
			int messageID = ldapMessage.MessageID;
			conn.acquireWriteSemaphore(messageID);
			try
			{
				if (!conn.areMessagesComplete())
				{
					throw new LdapLocalException("OUTSTANDING_OPERATIONS", 1);
				}
				conn.stopReaderOnReply(messageID);
				((LdapExtendedResponse)SendRequestToServer(ldapMessage, defSearchCons.TimeLimit, null, null).getResponse()).chkResultCode();
				conn.startTLS();
			}
			finally
			{
				conn.startReader();
				conn.freeWriteSemaphore(messageID);
			}
		}

		public virtual void stopTLS()
		{
			if (!TLS)
			{
				throw new LdapLocalException("NO_STARTTLS", 1);
			}
			int msgId = conn.acquireWriteSemaphore();
			try
			{
				if (!conn.areMessagesComplete())
				{
					throw new LdapLocalException("OUTSTANDING_OPERATIONS", 1);
				}
				conn.stopTLS();
			}
			finally
			{
				conn.freeWriteSemaphore(msgId);
				Connect(Host, Port);
			}
		}

		public virtual void Abandon(LdapSearchResults results)
		{
			Abandon(results, defSearchCons);
		}

		public virtual void Abandon(LdapSearchResults results, LdapConstraints cons)
		{
			results.Abandon();
		}

		public virtual void Abandon(int id)
		{
			Abandon(id, defSearchCons);
		}

		public virtual void Abandon(int id, LdapConstraints cons)
		{
			try
			{
				conn.getMessageAgent(id).Abandon(id, cons);
			}
			catch (FieldAccessException)
			{
			}
		}

		public virtual void Abandon(LdapMessageQueue queue)
		{
			Abandon(queue, defSearchCons);
		}

		public virtual void Abandon(LdapMessageQueue queue, LdapConstraints cons)
		{
			if (queue != null)
			{
				MessageAgent messageAgent = ((!(queue is LdapSearchQueue)) ? queue.MessageAgent : queue.MessageAgent);
				int[] messageIDs = messageAgent.MessageIDs;
				for (int i = 0; i < messageIDs.Length; i++)
				{
					messageAgent.Abandon(messageIDs[i], cons);
				}
			}
		}

		public virtual void Add(LdapEntry entry)
		{
			Add(entry, defSearchCons);
		}

		public virtual void Add(LdapEntry entry, LdapConstraints cons)
		{
			LdapResponseQueue ldapResponseQueue = Add(entry, null, cons);
			LdapResponse ldapResponse = (LdapResponse)ldapResponseQueue.getResponse();
			lock (responseCtlSemaphore)
			{
				responseCtls = ldapResponse.Controls;
			}
			chkResultCode(ldapResponseQueue, cons, ldapResponse);
		}

		public virtual LdapResponseQueue Add(LdapEntry entry, LdapResponseQueue queue)
		{
			return Add(entry, queue, defSearchCons);
		}

		public virtual LdapResponseQueue Add(LdapEntry entry, LdapResponseQueue queue, LdapConstraints cons)
		{
			if (cons == null)
			{
				cons = defSearchCons;
			}
			if (entry == null)
			{
				throw new ArgumentException("The LdapEntry parameter cannot be null");
			}
			if (entry.DN == null)
			{
				throw new ArgumentException("The DN value must be present in the LdapEntry object");
			}
			LdapMessage msg = new LdapAddRequest(entry, cons.getControls());
			return SendRequestToServer(msg, cons.TimeLimit, queue, null);
		}

		public virtual void Bind(string dn, string passwd)
		{
			Bind(dn, passwd, AuthenticationTypes.None);
		}

		public virtual void Bind(string dn, string passwd, AuthenticationTypes authenticationTypes)
		{
			Bind(3, dn, passwd, defSearchCons);
		}

		public virtual void Bind(int version, string dn, string passwd)
		{
			Bind(version, dn, passwd, defSearchCons);
		}

		public virtual void Bind(string dn, string passwd, LdapConstraints cons)
		{
			Bind(3, dn, passwd, cons);
		}

		public virtual void Bind(int version, string dn, string passwd, LdapConstraints cons)
		{
			sbyte[] passwd2 = null;
			if (passwd != null)
			{
				try
				{
					passwd2 = SupportClass.ToSByteArray(Encoding.GetEncoding("utf-8").GetBytes(passwd));
					passwd = null;
				}
				catch (IOException ex)
				{
					passwd = null;
					throw new SystemException(ex.ToString());
				}
			}
			Bind(version, dn, passwd2, cons);
		}

		[CLSCompliant(false)]
		public virtual void Bind(int version, string dn, sbyte[] passwd)
		{
			Bind(version, dn, passwd, defSearchCons);
		}

		[CLSCompliant(false)]
		public virtual void Bind(int version, string dn, sbyte[] passwd, LdapConstraints cons)
		{
			LdapResponseQueue ldapResponseQueue = Bind(version, dn, passwd, null, cons, null);
			LdapResponse ldapResponse = (LdapResponse)ldapResponseQueue.getResponse();
			if (ldapResponse != null)
			{
				lock (responseCtlSemaphore)
				{
					responseCtls = ldapResponse.Controls;
				}
				chkResultCode(ldapResponseQueue, cons, ldapResponse);
			}
		}

		[CLSCompliant(false)]
		public virtual LdapResponseQueue Bind(int version, string dn, sbyte[] passwd, LdapResponseQueue queue)
		{
			return Bind(version, dn, passwd, queue, defSearchCons, null);
		}

		[CLSCompliant(false)]
		public virtual LdapResponseQueue Bind(int version, string dn, sbyte[] passwd, LdapResponseQueue queue, LdapConstraints cons, string mech)
		{
			if (cons == null)
			{
				cons = defSearchCons;
			}
			dn = ((dn != null) ? dn.Trim() : "");
			if (passwd == null)
			{
				passwd = new sbyte[0];
			}
			bool anonymous = false;
			if (passwd.Length == 0)
			{
				anonymous = true;
				dn = "";
			}
			LdapMessage ldapMessage = new LdapBindRequest(version, dn, passwd, cons.getControls());
			int messageID = ldapMessage.MessageID;
			BindProperties bindProps = new BindProperties(version, dn, "simple", anonymous, null, null);
			if (!conn.Connected)
			{
				if (conn.Host == null)
				{
					throw new LdapException("CONNECTION_IMPOSSIBLE", 91, null);
				}
				conn.connect(conn.Host, conn.Port);
			}
			conn.acquireWriteSemaphore(messageID);
			return SendRequestToServer(ldapMessage, cons.TimeLimit, queue, bindProps);
		}

		public virtual bool Compare(string dn, LdapAttribute attr)
		{
			return Compare(dn, attr, defSearchCons);
		}

		public virtual bool Compare(string dn, LdapAttribute attr, LdapConstraints cons)
		{
			bool result = false;
			LdapResponseQueue ldapResponseQueue = Compare(dn, attr, null, cons);
			LdapResponse ldapResponse = (LdapResponse)ldapResponseQueue.getResponse();
			lock (responseCtlSemaphore)
			{
				responseCtls = ldapResponse.Controls;
			}
			if (ldapResponse.ResultCode == 6)
			{
				result = true;
			}
			else if (ldapResponse.ResultCode == 5)
			{
				result = false;
			}
			else
			{
				chkResultCode(ldapResponseQueue, cons, ldapResponse);
			}
			return result;
		}

		public virtual LdapResponseQueue Compare(string dn, LdapAttribute attr, LdapResponseQueue queue)
		{
			return Compare(dn, attr, queue, defSearchCons);
		}

		public virtual LdapResponseQueue Compare(string dn, LdapAttribute attr, LdapResponseQueue queue, LdapConstraints cons)
		{
			if (attr.size() != 1)
			{
				throw new ArgumentException("compare: Exactly one value must be present in the LdapAttribute");
			}
			if (dn == null)
			{
				throw new ArgumentException("compare: DN cannot be null");
			}
			if (cons == null)
			{
				cons = defSearchCons;
			}
			LdapMessage msg = new LdapCompareRequest(dn, attr.Name, attr.ByteValue, cons.getControls());
			return SendRequestToServer(msg, cons.TimeLimit, queue, null);
		}

		public virtual void Connect(string host, int port)
		{
			SupportClass.Tokenizer tokenizer = new SupportClass.Tokenizer(host, " ");
			string text = null;
			while (tokenizer.HasMoreTokens())
			{
				try
				{
					int port2 = port;
					text = tokenizer.NextToken();
					int num = text.IndexOf(':');
					if (num != -1 && num + 1 != text.Length)
					{
						try
						{
							port2 = int.Parse(text.Substring(num + 1));
							text = text.Substring(0, num);
						}
						catch (Exception)
						{
							throw new ArgumentException("INVALID_ADDRESS");
						}
					}
					conn = conn.destroyClone(apiCall: true);
					conn.connect(text, port2);
					break;
				}
				catch (LdapException ex2)
				{
					if (!tokenizer.HasMoreTokens())
					{
						throw ex2;
					}
				}
			}
		}

		public virtual void Delete(string dn)
		{
			Delete(dn, defSearchCons);
		}

		public virtual void Delete(string dn, LdapConstraints cons)
		{
			LdapResponseQueue ldapResponseQueue = Delete(dn, null, cons);
			LdapResponse ldapResponse = (LdapResponse)ldapResponseQueue.getResponse();
			lock (responseCtlSemaphore)
			{
				responseCtls = ldapResponse.Controls;
			}
			chkResultCode(ldapResponseQueue, cons, ldapResponse);
		}

		public virtual LdapResponseQueue Delete(string dn, LdapResponseQueue queue)
		{
			return Delete(dn, queue, defSearchCons);
		}

		public virtual LdapResponseQueue Delete(string dn, LdapResponseQueue queue, LdapConstraints cons)
		{
			if (dn == null)
			{
				throw new ArgumentException("DN_PARAM_ERROR");
			}
			if (cons == null)
			{
				cons = defSearchCons;
			}
			LdapMessage msg = new LdapDeleteRequest(dn, cons.getControls());
			return SendRequestToServer(msg, cons.TimeLimit, queue, null);
		}

		public virtual void Disconnect()
		{
			Disconnect(defSearchCons, how: true);
		}

		public virtual void Disconnect(LdapConstraints cons)
		{
			Disconnect(cons, how: true);
		}

		private void Disconnect(LdapConstraints cons, bool how)
		{
			conn = conn.destroyClone(how);
		}

		public virtual LdapExtendedResponse ExtendedOperation(LdapExtendedOperation op)
		{
			return ExtendedOperation(op, defSearchCons);
		}

		public virtual LdapExtendedResponse ExtendedOperation(LdapExtendedOperation op, LdapConstraints cons)
		{
			LdapResponseQueue ldapResponseQueue = ExtendedOperation(op, cons, null);
			LdapExtendedResponse ldapExtendedResponse = (LdapExtendedResponse)ldapResponseQueue.getResponse();
			lock (responseCtlSemaphore)
			{
				responseCtls = ldapExtendedResponse.Controls;
			}
			chkResultCode(ldapResponseQueue, cons, ldapExtendedResponse);
			return ldapExtendedResponse;
		}

		public virtual LdapResponseQueue ExtendedOperation(LdapExtendedOperation op, LdapResponseQueue queue)
		{
			return ExtendedOperation(op, defSearchCons, queue);
		}

		public virtual LdapResponseQueue ExtendedOperation(LdapExtendedOperation op, LdapConstraints cons, LdapResponseQueue queue)
		{
			if (cons == null)
			{
				cons = defSearchCons;
			}
			LdapMessage msg = MakeExtendedOperation(op, cons);
			return SendRequestToServer(msg, cons.TimeLimit, queue, null);
		}

		protected internal virtual LdapMessage MakeExtendedOperation(LdapExtendedOperation op, LdapConstraints cons)
		{
			if (cons == null)
			{
				cons = defSearchCons;
			}
			if (op.getID() == null)
			{
				throw new ArgumentException("OP_PARAM_ERROR");
			}
			return new LdapExtendedRequest(op, cons.getControls());
		}

		public virtual void Modify(string dn, LdapModification mod)
		{
			Modify(dn, mod, defSearchCons);
		}

		public virtual void Modify(string dn, LdapModification mod, LdapConstraints cons)
		{
			Modify(dn, new LdapModification[1] { mod }, cons);
		}

		public virtual void Modify(string dn, LdapModification[] mods)
		{
			Modify(dn, mods, defSearchCons);
		}

		public virtual void Modify(string dn, LdapModification[] mods, LdapConstraints cons)
		{
			LdapResponseQueue ldapResponseQueue = Modify(dn, mods, null, cons);
			LdapResponse ldapResponse = (LdapResponse)ldapResponseQueue.getResponse();
			lock (responseCtlSemaphore)
			{
				respo

Room Architect Tool_Data/Managed/Ookii.Dialogs.dll

Decompiled 3 months ago
using System;
using System.CodeDom.Compiler;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Drawing;
using System.Drawing.Design;
using System.Drawing.Drawing2D;
using System.Globalization;
using System.IO;
using System.Net;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Security.Cryptography;
using System.Security.Permissions;
using System.Text;
using System.Threading;
using System.Windows.Forms;
using System.Windows.Forms.VisualStyles;
using Microsoft.Win32;
using Microsoft.Win32.SafeHandles;
using Ookii.Dialogs.Interop;
using Ookii.Dialogs.Properties;

[assembly: Guid("16078df2-e2d1-4754-9864-84c288a1e9bd")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: ComVisible(false)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: CompilationRelaxations(8)]
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "Ookii.Dialogs.ComCtlv6ActivationContext.#_cookie")]
[assembly: SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "disposing", Scope = "member", Target = "Ookii.Dialogs.ComCtlv6ActivationContext.#Dispose(System.Boolean)")]
[assembly: SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors", Scope = "member", Target = "Ookii.Dialogs.VistaFileDialog.#.ctor()")]
[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "Ookii.Dialogs.VistaOpenFileDialog.#OpenFile()")]
[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "Ookii.Dialogs.VistaSaveFileDialog.#OpenFile()")]
[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Multi", Scope = "member", Target = "Ookii.Dialogs.VistaFileDialog.#SupportMultiDottedExtensions")]
[assembly: AssemblyTitle("Ookii.Dialogs")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Ookii.org")]
[assembly: AssemblyProduct("Ookii.Dialogs")]
[assembly: AssemblyCopyright("Copyright © Sven Groot (Ookii.org) 2009")]
[assembly: AssemblyTrademark("")]
[assembly: CLSCompliant(true)]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Ookii.Dialogs
{
	[DefaultEvent("DoWork")]
	[Description("Represents a dialog that can be used to report progress to the user.")]
	[DefaultProperty("Text")]
	public class ProgressDialog : Component
	{
		private class ProgressChangedData
		{
			public string Text { get; set; }

			public string Description { get; set; }

			public object UserState { get; set; }
		}

		private string _windowTitle;

		private string _text;

		private string _description;

		private IProgressDialog _dialog;

		private string _cancellationText;

		private bool _useCompactPathsForText;

		private bool _useCompactPathsForDescription;

		private SafeModuleHandle _currentAnimationModuleHandle;

		private bool _cancellationPending;

		private IContainer components;

		private BackgroundWorker _backgroundWorker;

		[DefaultValue("")]
		[Localizable(true)]
		[Category("Appearance")]
		[Description("The text in the progress dialog's title bar.")]
		public string WindowTitle
		{
			get
			{
				return _windowTitle ?? string.Empty;
			}
			set
			{
				_windowTitle = value;
			}
		}

		[Description("A short description of the operation being carried out.")]
		[Localizable(true)]
		[Category("Appearance")]
		public string Text
		{
			get
			{
				return _text ?? string.Empty;
			}
			set
			{
				_text = value;
				if (_dialog != null)
				{
					_dialog.SetLine(1u, Text, UseCompactPathsForText, IntPtr.Zero);
				}
			}
		}

		[DefaultValue(false)]
		[Category("Behavior")]
		[Description("Indicates whether path strings in the Text property should be compacted if they are too large to fit on one line.")]
		public bool UseCompactPathsForText
		{
			get
			{
				return _useCompactPathsForText;
			}
			set
			{
				_useCompactPathsForText = value;
				if (_dialog != null)
				{
					_dialog.SetLine(1u, Text, UseCompactPathsForText, IntPtr.Zero);
				}
			}
		}

		[DefaultValue("")]
		[Category("Appearance")]
		[Description("Additional details about the operation being carried out.")]
		[Localizable(true)]
		public string Description
		{
			get
			{
				return _description ?? string.Empty;
			}
			set
			{
				_description = value;
				if (_dialog != null)
				{
					_dialog.SetLine(2u, Description, UseCompactPathsForDescription, IntPtr.Zero);
				}
			}
		}

		[Description("Indicates whether path strings in the Description property should be compacted if they are too large to fit on one line.")]
		[DefaultValue(false)]
		[Category("Behavior")]
		public bool UseCompactPathsForDescription
		{
			get
			{
				return _useCompactPathsForDescription;
			}
			set
			{
				_useCompactPathsForDescription = value;
				if (_dialog != null)
				{
					_dialog.SetLine(2u, Description, UseCompactPathsForDescription, IntPtr.Zero);
				}
			}
		}

		[Localizable(true)]
		[DefaultValue("")]
		[Category("Appearance")]
		[Description("The text that will be shown after the Cancel button is pressed.")]
		public string CancellationText
		{
			get
			{
				return _cancellationText ?? string.Empty;
			}
			set
			{
				_cancellationText = value;
			}
		}

		[Description("Indicates whether an estimate of the remaining time will be shown.")]
		[DefaultValue(false)]
		[Category("Appearance")]
		public bool ShowTimeRemaining { get; set; }

		[DefaultValue(true)]
		[Description("Indicates whether the dialog has a cancel button. Do not set to false unless absolutely necessary.")]
		[Category("Appearance")]
		public bool ShowCancelButton { get; set; }

		[Category("Window Style")]
		[Description("Indicates whether the progress dialog has a minimize button.")]
		[DefaultValue(true)]
		public bool MinimizeBox { get; set; }

		[Browsable(false)]
		public bool CancellationPending
		{
			get
			{
				_backgroundWorker.ReportProgress(-1);
				return _cancellationPending;
			}
		}

		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		[Browsable(false)]
		public AnimationResource Animation { get; set; }

		[Category("Appearance")]
		[Description("Indicates the style of the progress bar.")]
		[DefaultValue(ProgressBarStyle.ProgressBar)]
		public ProgressBarStyle ProgressBarStyle { get; set; }

		[Browsable(false)]
		public bool IsBusy => _backgroundWorker.IsBusy;

		public event DoWorkEventHandler DoWork;

		public event RunWorkerCompletedEventHandler RunWorkerCompleted;

		public event ProgressChangedEventHandler ProgressChanged;

		public ProgressDialog()
			: this(null)
		{
		}

		public ProgressDialog(IContainer container)
		{
			container?.Add(this);
			InitializeComponent();
			ProgressBarStyle = ProgressBarStyle.ProgressBar;
			ShowCancelButton = true;
			MinimizeBox = true;
			if (!NativeMethods.IsWindowsVistaOrLater)
			{
				Animation = AnimationResource.GetShellAnimation(ShellAnimation.FlyingPapers);
			}
		}

		public void Show()
		{
			Show(null);
		}

		public void Show(object argument)
		{
			RunProgressDialog(IntPtr.Zero, argument);
		}

		public void ShowDialog()
		{
			ShowDialog(null, null);
		}

		public void ShowDialog(IWin32Window owner)
		{
			ShowDialog(owner, null);
		}

		public void ShowDialog(IWin32Window owner, object argument)
		{
			RunProgressDialog((owner == null) ? NativeMethods.GetActiveWindow() : owner.Handle, argument);
		}

		public void ReportProgress(int percentProgress)
		{
			ReportProgress(percentProgress, null, null, null);
		}

		public void ReportProgress(int percentProgress, string text, string description)
		{
			ReportProgress(percentProgress, text, description, null);
		}

		public void ReportProgress(int percentProgress, string text, string description, object userState)
		{
			if (percentProgress < 0 || percentProgress > 100)
			{
				throw new ArgumentOutOfRangeException("percentProgress");
			}
			if (_dialog == null)
			{
				throw new InvalidOperationException(Resources.ProgressDialogNotRunningError);
			}
			_backgroundWorker.ReportProgress(percentProgress, new ProgressChangedData
			{
				Text = text,
				Description = description,
				UserState = userState
			});
		}

		protected virtual void OnDoWork(DoWorkEventArgs e)
		{
			this.DoWork?.Invoke(this, e);
		}

		protected virtual void OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)
		{
			this.RunWorkerCompleted?.Invoke(this, e);
		}

		protected virtual void OnProgressChanged(ProgressChangedEventArgs e)
		{
			this.ProgressChanged?.Invoke(this, e);
		}

		private void RunProgressDialog(IntPtr owner, object argument)
		{
			if (_backgroundWorker.IsBusy)
			{
				throw new InvalidOperationException(Resources.ProgressDialogRunning);
			}
			if (Animation != null)
			{
				try
				{
					_currentAnimationModuleHandle = Animation.LoadLibrary();
				}
				catch (Win32Exception ex)
				{
					throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Resources.AnimationLoadErrorFormat, new object[1] { ex.Message }), ex);
				}
				catch (FileNotFoundException ex2)
				{
					throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Resources.AnimationLoadErrorFormat, new object[1] { ex2.Message }), ex2);
				}
			}
			_cancellationPending = false;
			_dialog = (Ookii.Dialogs.Interop.ProgressDialog)new ProgressDialogRCW();
			_dialog.SetTitle(WindowTitle);
			if (Animation != null)
			{
				_dialog.SetAnimation(_currentAnimationModuleHandle, (ushort)Animation.ResourceId);
			}
			if (CancellationText.Length > 0)
			{
				_dialog.SetCancelMsg(CancellationText, null);
			}
			_dialog.SetLine(1u, Text, UseCompactPathsForText, IntPtr.Zero);
			_dialog.SetLine(2u, Description, UseCompactPathsForDescription, IntPtr.Zero);
			ProgressDialogFlags progressDialogFlags = ProgressDialogFlags.Normal;
			if (owner != IntPtr.Zero)
			{
				progressDialogFlags |= ProgressDialogFlags.Modal;
			}
			switch (ProgressBarStyle)
			{
			case ProgressBarStyle.None:
				progressDialogFlags |= ProgressDialogFlags.NoProgressBar;
				break;
			case ProgressBarStyle.MarqueeProgressBar:
				progressDialogFlags = ((!NativeMethods.IsWindowsVistaOrLater) ? (progressDialogFlags | ProgressDialogFlags.NoProgressBar) : (progressDialogFlags | ProgressDialogFlags.MarqueeProgress));
				break;
			}
			if (ShowTimeRemaining)
			{
				progressDialogFlags |= ProgressDialogFlags.AutoTime;
			}
			if (!ShowCancelButton)
			{
				progressDialogFlags |= ProgressDialogFlags.NoCancel;
			}
			if (!MinimizeBox)
			{
				progressDialogFlags |= ProgressDialogFlags.NoMinimize;
			}
			_dialog.StartProgressDialog(owner, null, progressDialogFlags, IntPtr.Zero);
			_backgroundWorker.RunWorkerAsync(argument);
		}

		private void _backgroundWorker_DoWork(object sender, DoWorkEventArgs e)
		{
			OnDoWork(e);
		}

		private void _backgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
		{
			_dialog.StopProgressDialog();
			Marshal.ReleaseComObject(_dialog);
			_dialog = null;
			if (_currentAnimationModuleHandle != null)
			{
				_currentAnimationModuleHandle.Dispose();
				_currentAnimationModuleHandle = null;
			}
			OnRunWorkerCompleted(new RunWorkerCompletedEventArgs((!e.Cancelled && e.Error == null) ? e.Result : null, e.Error, e.Cancelled));
		}

		private void _backgroundWorker_ProgressChanged(object sender, ProgressChangedEventArgs e)
		{
			_cancellationPending = _dialog.HasUserCancelled();
			if (e.ProgressPercentage < 0 || e.ProgressPercentage > 100)
			{
				return;
			}
			_dialog.SetProgress((uint)e.ProgressPercentage, 100u);
			if (e.UserState is ProgressChangedData progressChangedData)
			{
				if (progressChangedData.Text != null)
				{
					Text = progressChangedData.Text;
				}
				if (progressChangedData.Description != null)
				{
					Description = progressChangedData.Description;
				}
				OnProgressChanged(new ProgressChangedEventArgs(e.ProgressPercentage, progressChangedData.UserState));
			}
		}

		protected override void Dispose(bool disposing)
		{
			try
			{
				if (disposing)
				{
					if (components != null)
					{
						components.Dispose();
					}
					if (_currentAnimationModuleHandle != null)
					{
						_currentAnimationModuleHandle.Dispose();
						_currentAnimationModuleHandle = null;
					}
				}
			}
			finally
			{
				base.Dispose(disposing);
			}
		}

		private void InitializeComponent()
		{
			_backgroundWorker = new BackgroundWorker();
			_backgroundWorker.WorkerReportsProgress = true;
			_backgroundWorker.WorkerSupportsCancellation = true;
			_backgroundWorker.DoWork += _backgroundWorker_DoWork;
			_backgroundWorker.RunWorkerCompleted += _backgroundWorker_RunWorkerCompleted;
			_backgroundWorker.ProgressChanged += _backgroundWorker_ProgressChanged;
		}
	}
}
namespace Ookii.Dialogs.Interop
{
	internal class WindowHandleWrapper : IWin32Window
	{
		private IntPtr _handle;

		public IntPtr Handle => _handle;

		public WindowHandleWrapper(IntPtr handle)
		{
			_handle = handle;
		}
	}
}
namespace Ookii.Dialogs
{
	[Description("Prompts the user to select a folder.")]
	[DefaultProperty("SelectedPath")]
	[DefaultEvent("HelpRequest")]
	[Designer("System.Windows.Forms.Design.FolderBrowserDialogDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
	public sealed class VistaFolderBrowserDialog : CommonDialog
	{
		private FolderBrowserDialog _downlevelDialog;

		private string _description;

		private bool _useDescriptionForTitle;

		private string _selectedPath;

		private Environment.SpecialFolder _rootFolder;

		private bool _showNewFolderButton;

		[Browsable(false)]
		public static bool IsVistaFolderDialogSupported => NativeMethods.IsWindowsVistaOrLater;

		[Description("The descriptive text displayed above the tree view control in the dialog box, or below the list view control in the Vista style dialog.")]
		[Localizable(true)]
		[Category("Folder Browsing")]
		[DefaultValue("")]
		[Browsable(true)]
		public string Description
		{
			get
			{
				if (_downlevelDialog != null)
				{
					return _downlevelDialog.Description;
				}
				return _description;
			}
			set
			{
				if (_downlevelDialog != null)
				{
					_downlevelDialog.Description = value;
				}
				else
				{
					_description = value ?? string.Empty;
				}
			}
		}

		[Browsable(true)]
		[Description("The root folder where the browsing starts from. This property has no effect if the Vista style dialog is used.")]
		[Category("Folder Browsing")]
		[Localizable(false)]
		[DefaultValue(typeof(Environment.SpecialFolder), "Desktop")]
		public Environment.SpecialFolder RootFolder
		{
			get
			{
				if (_downlevelDialog != null)
				{
					return _downlevelDialog.RootFolder;
				}
				return _rootFolder;
			}
			set
			{
				if (_downlevelDialog != null)
				{
					_downlevelDialog.RootFolder = value;
				}
				else
				{
					_rootFolder = value;
				}
			}
		}

		[Description("The path selected by the user.")]
		[DefaultValue("")]
		[Browsable(true)]
		[Category("Folder Browsing")]
		[Localizable(true)]
		[Editor("System.Windows.Forms.Design.SelectedPathEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))]
		public string SelectedPath
		{
			get
			{
				if (_downlevelDialog != null)
				{
					return _downlevelDialog.SelectedPath;
				}
				return _selectedPath;
			}
			set
			{
				if (_downlevelDialog != null)
				{
					_downlevelDialog.SelectedPath = value;
				}
				else
				{
					_selectedPath = value ?? string.Empty;
				}
			}
		}

		[Localizable(false)]
		[Description("A value indicating whether the New Folder button appears in the folder browser dialog box. This property has no effect if the Vista style dialog is used; in that case, the New Folder button is always shown.")]
		[DefaultValue(true)]
		[Category("Folder Browsing")]
		[Browsable(true)]
		public bool ShowNewFolderButton
		{
			get
			{
				if (_downlevelDialog != null)
				{
					return _downlevelDialog.ShowNewFolderButton;
				}
				return _showNewFolderButton;
			}
			set
			{
				if (_downlevelDialog != null)
				{
					_downlevelDialog.ShowNewFolderButton = value;
				}
				else
				{
					_showNewFolderButton = value;
				}
			}
		}

		[Category("Folder Browsing")]
		[DefaultValue(false)]
		[Description("A value that indicates whether to use the value of the Description property as the dialog title for Vista style dialogs. This property has no effect on old style dialogs.")]
		public bool UseDescriptionForTitle
		{
			get
			{
				return _useDescriptionForTitle;
			}
			set
			{
				_useDescriptionForTitle = value;
			}
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		[Browsable(false)]
		public event EventHandler HelpRequest
		{
			add
			{
				((CommonDialog)this).HelpRequest += value;
			}
			remove
			{
				((CommonDialog)this).HelpRequest -= value;
			}
		}

		public VistaFolderBrowserDialog()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Expected O, but got Unknown
			if (!IsVistaFolderDialogSupported)
			{
				_downlevelDialog = new FolderBrowserDialog();
			}
			else
			{
				((CommonDialog)this).Reset();
			}
		}

		public override void Reset()
		{
			_description = string.Empty;
			_useDescriptionForTitle = false;
			_selectedPath = string.Empty;
			_rootFolder = Environment.SpecialFolder.Desktop;
			_showNewFolderButton = true;
		}

		protected override bool RunDialog(IntPtr hwndOwner)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Invalid comparison between Unknown and I4
			if (_downlevelDialog != null)
			{
				return (int)((CommonDialog)_downlevelDialog).ShowDialog((IWin32Window)(object)((hwndOwner == IntPtr.Zero) ? null : new WindowHandleWrapper(hwndOwner))) == 1;
			}
			IFileDialog fileDialog = null;
			try
			{
				fileDialog = (NativeFileOpenDialog)new FileOpenDialogRCW();
				SetDialogProperties(fileDialog);
				int num = fileDialog.Show(hwndOwner);
				if (num < 0)
				{
					if (num == -2147023673)
					{
						return false;
					}
					throw Marshal.GetExceptionForHR(num);
				}
				GetResult(fileDialog);
				return true;
			}
			finally
			{
				if (fileDialog != null)
				{
					Marshal.FinalReleaseComObject(fileDialog);
				}
			}
		}

		protected override void Dispose(bool disposing)
		{
			try
			{
				if (disposing && _downlevelDialog != null)
				{
					((Component)(object)_downlevelDialog).Dispose();
				}
			}
			finally
			{
				((Component)this).Dispose(disposing);
			}
		}

		private void SetDialogProperties(IFileDialog dialog)
		{
			if (!string.IsNullOrEmpty(_description))
			{
				if (_useDescriptionForTitle)
				{
					dialog.SetTitle(_description);
				}
				else
				{
					IFileDialogCustomize fileDialogCustomize = (IFileDialogCustomize)dialog;
					fileDialogCustomize.AddText(0, _description);
				}
			}
			dialog.SetOptions(NativeMethods.FOS.FOS_PICKFOLDERS | NativeMethods.FOS.FOS_FORCEFILESYSTEM | NativeMethods.FOS.FOS_FILEMUSTEXIST);
			if (!string.IsNullOrEmpty(_selectedPath))
			{
				string directoryName = Path.GetDirectoryName(_selectedPath);
				if (directoryName == null || !Directory.Exists(directoryName))
				{
					dialog.SetFileName(_selectedPath);
					return;
				}
				string fileName = Path.GetFileName(_selectedPath);
				dialog.SetFolder(NativeMethods.CreateItemFromParsingName(directoryName));
				dialog.SetFileName(fileName);
			}
		}

		private void GetResult(IFileDialog dialog)
		{
			dialog.GetResult(out var ppsi);
			ppsi.GetDisplayName(NativeMethods.SIGDN.SIGDN_FILESYSPATH, out _selectedPath);
		}
	}
	[ToolboxItem(false)]
	[DefaultProperty("Text")]
	[DefaultEvent("Click")]
	[DesignTimeVisible(false)]
	public abstract class TaskDialogItem : Component
	{
		private TaskDialog _owner;

		private int _id;

		private bool _enabled = true;

		private string _text;

		private IContainer components;

		[Browsable(false)]
		public TaskDialog Owner
		{
			get
			{
				return _owner;
			}
			internal set
			{
				_owner = value;
				AutoAssignId();
			}
		}

		[Localizable(true)]
		[DefaultValue("")]
		[Description("The text of the item.")]
		[Category("Appearance")]
		public string Text
		{
			get
			{
				return _text ?? string.Empty;
			}
			set
			{
				_text = value;
				UpdateOwner();
			}
		}

		[Description("Indicates whether the item is enabled.")]
		[Category("Behavior")]
		[DefaultValue(true)]
		public bool Enabled
		{
			get
			{
				return _enabled;
			}
			set
			{
				_enabled = value;
				if (Owner != null)
				{
					Owner.SetItemEnabled(this);
				}
			}
		}

		[Description("The id of the item.")]
		[Category("Data")]
		[DefaultValue(0)]
		internal virtual int Id
		{
			get
			{
				return _id;
			}
			set
			{
				CheckDuplicateId(null, value);
				_id = value;
				UpdateOwner();
			}
		}

		protected abstract IEnumerable ItemCollection { get; }

		protected TaskDialogItem()
		{
			InitializeComponent();
		}

		protected TaskDialogItem(IContainer container)
		{
			container?.Add(this);
			InitializeComponent();
		}

		internal TaskDialogItem(int id)
		{
			InitializeComponent();
			_id = id;
		}

		public void Click()
		{
			if (Owner == null)
			{
				throw new InvalidOperationException(Resources.NoAssociatedTaskDialogError);
			}
			Owner.ClickItem(this);
		}

		protected void UpdateOwner()
		{
			if (Owner != null)
			{
				Owner.UpdateDialog();
			}
		}

		internal virtual void CheckDuplicate(TaskDialogItem itemToExclude)
		{
			CheckDuplicateId(itemToExclude, _id);
		}

		internal virtual void AutoAssignId()
		{
			if (ItemCollection == null)
			{
				return;
			}
			int num = 9;
			foreach (TaskDialogItem item in ItemCollection)
			{
				if (item.Id > num)
				{
					num = item.Id;
				}
			}
			Id = num + 1;
		}

		private void CheckDuplicateId(TaskDialogItem itemToExclude, int id)
		{
			if (id == 0)
			{
				return;
			}
			IEnumerable itemCollection = ItemCollection;
			if (itemCollection == null)
			{
				return;
			}
			foreach (TaskDialogItem item in itemCollection)
			{
				if (item != this && item != itemToExclude && item.Id == id)
				{
					throw new InvalidOperationException(Resources.DuplicateItemIdError);
				}
			}
		}

		protected override void Dispose(bool disposing)
		{
			try
			{
				if (disposing && components != null)
				{
					components.Dispose();
				}
			}
			finally
			{
				base.Dispose(disposing);
			}
		}

		private void InitializeComponent()
		{
			components = new Container();
		}
	}
	public class TaskDialogItemClickedEventArgs : CancelEventArgs
	{
		private readonly TaskDialogItem _item;

		public TaskDialogItem Item => _item;

		public TaskDialogItemClickedEventArgs(TaskDialogItem item)
		{
			_item = item;
		}
	}
	[Description("Displays a task dialog.")]
	[Designer(typeof(TaskDialogDesigner))]
	[DefaultProperty("MainInstruction")]
	[DefaultEvent("ButtonClicked")]
	public class TaskDialog : Component, IWin32Window
	{
		private TaskDialogItemCollection<TaskDialogButton> _buttons;

		private TaskDialogItemCollection<TaskDialogRadioButton> _radioButtons;

		private NativeMethods.TASKDIALOGCONFIG _config = default(NativeMethods.TASKDIALOGCONFIG);

		private TaskDialogIcon _mainIcon;

		private Icon _customMainIcon;

		private Icon _customFooterIcon;

		private TaskDialogIcon _footerIcon;

		private Dictionary<int, TaskDialogButton> _buttonsById;

		private Dictionary<int, TaskDialogRadioButton> _radioButtonsById;

		private IntPtr _handle;

		private int _progressBarMarqueeAnimationSpeed = 100;

		private int _progressBarMinimimum;

		private int _progressBarMaximum = 100;

		private int _progressBarValue;

		private ProgressBarState _progressBarState;

		private int _inEventHandler;

		private bool _updatePending;

		private object _tag;

		private Icon _windowIcon;

		private IContainer components;

		public static bool OSSupportsTaskDialogs => NativeMethods.IsWindowsVistaOrLater;

		[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
		[Localizable(true)]
		[Category("Appearance")]
		[Description("A list of the buttons on the Task Dialog.")]
		public TaskDialogItemCollection<TaskDialogButton> Buttons => _buttons ?? (_buttons = new TaskDialogItemCollection<TaskDialogButton>(this));

		[Localizable(true)]
		[Category("Appearance")]
		[Description("A list of the radio buttons on the Task Dialog.")]
		[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
		public TaskDialogItemCollection<TaskDialogRadioButton> RadioButtons => _radioButtons ?? (_radioButtons = new TaskDialogItemCollection<TaskDialogRadioButton>(this));

		[Localizable(true)]
		[Description("The window title of the task dialog.")]
		[DefaultValue("")]
		[Category("Appearance")]
		public string WindowTitle
		{
			get
			{
				return _config.pszWindowTitle ?? string.Empty;
			}
			set
			{
				_config.pszWindowTitle = (string.IsNullOrEmpty(value) ? null : value);
				UpdateDialog();
			}
		}

		[Editor(typeof(MultilineStringEditor), typeof(UITypeEditor))]
		[Localizable(true)]
		[DefaultValue("")]
		[Category("Appearance")]
		[Description("The dialog's main instruction.")]
		public string MainInstruction
		{
			get
			{
				return _config.pszMainInstruction ?? string.Empty;
			}
			set
			{
				_config.pszMainInstruction = (string.IsNullOrEmpty(value) ? null : value);
				SetElementText(NativeMethods.TaskDialogElements.MainInstruction, MainInstruction);
			}
		}

		[Category("Appearance")]
		[Localizable(true)]
		[Description("The dialog's primary content.")]
		[DefaultValue("")]
		[Editor(typeof(MultilineStringEditor), typeof(UITypeEditor))]
		public string Content
		{
			get
			{
				return _config.pszContent ?? string.Empty;
			}
			set
			{
				_config.pszContent = (string.IsNullOrEmpty(value) ? null : value);
				SetElementText(NativeMethods.TaskDialogElements.Content, Content);
			}
		}

		[DefaultValue(null)]
		[Category("Appearance")]
		[Description("The icon to be used in the title bar of the dialog. Used only when the dialog is shown as a modeless dialog.")]
		[Localizable(true)]
		public Icon WindowIcon
		{
			get
			{
				if (IsDialogRunning)
				{
					IntPtr intPtr = NativeMethods.SendMessage(Handle, 127, new IntPtr(0), IntPtr.Zero);
					return Icon.FromHandle(intPtr);
				}
				return _windowIcon;
			}
			set
			{
				_windowIcon = value;
			}
		}

		[Description("The icon to display in the task dialog.")]
		[Category("Appearance")]
		[Localizable(true)]
		[DefaultValue(TaskDialogIcon.Custom)]
		public TaskDialogIcon MainIcon
		{
			get
			{
				return _mainIcon;
			}
			set
			{
				if (_mainIcon != value)
				{
					_mainIcon = value;
					UpdateDialog();
				}
			}
		}

		[Localizable(true)]
		[Category("Appearance")]
		[Description("A custom icon to display in the dialog.")]
		[DefaultValue(null)]
		public Icon CustomMainIcon
		{
			get
			{
				return _customMainIcon;
			}
			set
			{
				if (_customMainIcon != value)
				{
					_customMainIcon = value;
					UpdateDialog();
				}
			}
		}

		[Category("Appearance")]
		[Description("The icon to display in the footer area of the task dialog.")]
		[DefaultValue(TaskDialogIcon.Custom)]
		[Localizable(true)]
		public TaskDialogIcon FooterIcon
		{
			get
			{
				return _footerIcon;
			}
			set
			{
				if (_footerIcon != value)
				{
					_footerIcon = value;
					UpdateDialog();
				}
			}
		}

		[Description("A custom icon to display in the footer area of the task dialog.")]
		[Category("Appearance")]
		[Localizable(true)]
		[DefaultValue(null)]
		public Icon CustomFooterIcon
		{
			get
			{
				return _customFooterIcon;
			}
			set
			{
				if (_customFooterIcon != value)
				{
					_customFooterIcon = value;
					UpdateDialog();
				}
			}
		}

		[Category("Behavior")]
		[Description("Indicates whether custom buttons should be displayed as normal buttons or command links.")]
		[DefaultValue(TaskDialogButtonStyle.Standard)]
		public TaskDialogButtonStyle ButtonStyle
		{
			get
			{
				if (!GetFlag(NativeMethods.TaskDialogFlags.UseCommandLinksNoIcon))
				{
					if (!GetFlag(NativeMethods.TaskDialogFlags.UseCommandLinks))
					{
						return TaskDialogButtonStyle.Standard;
					}
					return TaskDialogButtonStyle.CommandLinks;
				}
				return TaskDialogButtonStyle.CommandLinksNoIcon;
			}
			set
			{
				SetFlag(NativeMethods.TaskDialogFlags.UseCommandLinks, value == TaskDialogButtonStyle.CommandLinks);
				SetFlag(NativeMethods.TaskDialogFlags.UseCommandLinksNoIcon, value == TaskDialogButtonStyle.CommandLinksNoIcon);
				UpdateDialog();
			}
		}

		[DefaultValue("")]
		[Description("The label for the verification checkbox.")]
		[Localizable(true)]
		[Category("Appearance")]
		public string VerificationText
		{
			get
			{
				return _config.pszVerificationText ?? string.Empty;
			}
			set
			{
				string text = (string.IsNullOrEmpty(value) ? null : value);
				if (_config.pszVerificationText != text)
				{
					_config.pszVerificationText = text;
					UpdateDialog();
				}
			}
		}

		[DefaultValue(false)]
		[Category("Behavior")]
		[Description("Indicates whether the verification checkbox is checked ot not.")]
		public bool IsVerificationChecked
		{
			get
			{
				return GetFlag(NativeMethods.TaskDialogFlags.VerificationFlagChecked);
			}
			set
			{
				if (value != IsVerificationChecked)
				{
					SetFlag(NativeMethods.TaskDialogFlags.VerificationFlagChecked, value);
					if (IsDialogRunning)
					{
						ClickVerification(value, setFocus: false);
					}
				}
			}
		}

		[Localizable(true)]
		[DefaultValue("")]
		[Editor(typeof(MultilineStringEditor), typeof(UITypeEditor))]
		[Description("Additional information to be displayed on the dialog.")]
		[Category("Appearance")]
		public string ExpandedInformation
		{
			get
			{
				return _config.pszExpandedInformation ?? string.Empty;
			}
			set
			{
				_config.pszExpandedInformation = (string.IsNullOrEmpty(value) ? null : value);
				SetElementText(NativeMethods.TaskDialogElements.ExpandedInformation, ExpandedInformation);
			}
		}

		[Category("Appearance")]
		[Description("The text to use for the control for collapsing the expandable information.")]
		[Localizable(true)]
		[DefaultValue("")]
		public string ExpandedControlText
		{
			get
			{
				return _config.pszExpandedControlText ?? string.Empty;
			}
			set
			{
				string text = (string.IsNullOrEmpty(value) ? null : value);
				if (_config.pszExpandedControlText != text)
				{
					_config.pszExpandedControlText = text;
					UpdateDialog();
				}
			}
		}

		[Category("Appearance")]
		[Description("The text to use for the control for expanding the expandable information.")]
		[DefaultValue("")]
		[Localizable(true)]
		public string CollapsedControlText
		{
			get
			{
				return _config.pszCollapsedControlText ?? string.Empty;
			}
			set
			{
				string text = (string.IsNullOrEmpty(value) ? null : value);
				if (_config.pszCollapsedControlText != text)
				{
					_config.pszCollapsedControlText = (string.IsNullOrEmpty(value) ? null : value);
					UpdateDialog();
				}
			}
		}

		[Localizable(true)]
		[Editor(typeof(MultilineStringEditor), typeof(UITypeEditor))]
		[Category("Appearance")]
		[Description("The text to be used in the footer area of the task dialog.")]
		[DefaultValue("")]
		public string Footer
		{
			get
			{
				return _config.pszFooterText ?? string.Empty;
			}
			set
			{
				_config.pszFooterText = (string.IsNullOrEmpty(value) ? null : value);
				SetElementText(NativeMethods.TaskDialogElements.Footer, Footer);
			}
		}

		[DefaultValue(0)]
		[Category("Appearance")]
		[Description("the width of the task dialog's client area in DLU's. If 0, task dialog will calculate the ideal width.")]
		[Localizable(true)]
		public int Width
		{
			get
			{
				return (int)_config.cxWidth;
			}
			set
			{
				if (_config.cxWidth != (uint)value)
				{
					_config.cxWidth = (uint)value;
					UpdateDialog();
				}
			}
		}

		[DefaultValue(false)]
		[Description("Indicates whether hyperlinks are allowed for the Content, ExpandedInformation and Footer properties.")]
		[Category("Behavior")]
		public bool EnableHyperlinks
		{
			get
			{
				return GetFlag(NativeMethods.TaskDialogFlags.EnableHyperLinks);
			}
			set
			{
				if (EnableHyperlinks != value)
				{
					SetFlag(NativeMethods.TaskDialogFlags.EnableHyperLinks, value);
					UpdateDialog();
				}
			}
		}

		[DefaultValue(false)]
		[Category("Behavior")]
		[Description("Indicates that the dialog should be able to be closed using Alt-F4, Escape and the title bar's close button even if no cancel button is specified.")]
		public bool AllowDialogCancellation
		{
			get
			{
				return GetFlag(NativeMethods.TaskDialogFlags.AllowDialogCancellation);
			}
			set
			{
				if (AllowDialogCancellation != value)
				{
					SetFlag(NativeMethods.TaskDialogFlags.AllowDialogCancellation, value);
					UpdateDialog();
				}
			}
		}

		[Category("Behavior")]
		[Description("Indicates that the string specified by the ExpandedInformation property should be displayed at the bottom of the dialog's footer area instead of immediately after the dialog's content.")]
		[DefaultValue(false)]
		public bool ExpandFooterArea
		{
			get
			{
				return GetFlag(NativeMethods.TaskDialogFlags.ExpandFooterArea);
			}
			set
			{
				if (ExpandFooterArea != value)
				{
					SetFlag(NativeMethods.TaskDialogFlags.ExpandFooterArea, value);
					UpdateDialog();
				}
			}
		}

		[DefaultValue(false)]
		[Category("Behavior")]
		[Description("Indicates that the string specified by the ExpandedInformation property should be displayed by default.")]
		public bool ExpandedByDefault
		{
			get
			{
				return GetFlag(NativeMethods.TaskDialogFlags.ExpandedByDefault);
			}
			set
			{
				if (ExpandedByDefault != value)
				{
					SetFlag(NativeMethods.TaskDialogFlags.ExpandedByDefault, value);
					UpdateDialog();
				}
			}
		}

		[Category("Behavior")]
		[Description("Indicates whether the Timer event is raised periodically while the dialog is visible.")]
		[DefaultValue(false)]
		public bool RaiseTimerEvent
		{
			get
			{
				return GetFlag(NativeMethods.TaskDialogFlags.CallbackTimer);
			}
			set
			{
				if (RaiseTimerEvent != value)
				{
					SetFlag(NativeMethods.TaskDialogFlags.CallbackTimer, value);
					UpdateDialog();
				}
			}
		}

		[Category("Layout")]
		[Description("Indicates whether the dialog is centered in the parent window instead of the screen.")]
		[DefaultValue(false)]
		public bool CenterParent
		{
			get
			{
				return GetFlag(NativeMethods.TaskDialogFlags.PositionRelativeToWindow);
			}
			set
			{
				if (CenterParent != value)
				{
					SetFlag(NativeMethods.TaskDialogFlags.PositionRelativeToWindow, value);
					UpdateDialog();
				}
			}
		}

		[Localizable(true)]
		[Category("Appearance")]
		[DefaultValue(false)]
		[Description("Indicates whether text is displayed right to left.")]
		public bool RightToLeft
		{
			get
			{
				return GetFlag(NativeMethods.TaskDialogFlags.RtlLayout);
			}
			set
			{
				if (RightToLeft != value)
				{
					SetFlag(NativeMethods.TaskDialogFlags.RtlLayout, value);
					UpdateDialog();
				}
			}
		}

		[Category("Window Style")]
		[DefaultValue(false)]
		[Description("Indicates whether the dialog has a minimize box on its caption bar.")]
		public bool MinimizeBox
		{
			get
			{
				return GetFlag(NativeMethods.TaskDialogFlags.CanBeMinimized);
			}
			set
			{
				if (MinimizeBox != value)
				{
					SetFlag(NativeMethods.TaskDialogFlags.CanBeMinimized, value);
					UpdateDialog();
				}
			}
		}

		[Description("The type of progress bar displayed on the dialog.")]
		[DefaultValue(ProgressBarStyle.None)]
		[Category("Behavior")]
		public ProgressBarStyle ProgressBarStyle
		{
			get
			{
				if (GetFlag(NativeMethods.TaskDialogFlags.ShowMarqueeProgressBar))
				{
					return ProgressBarStyle.MarqueeProgressBar;
				}
				if (GetFlag(NativeMethods.TaskDialogFlags.ShowProgressBar))
				{
					return ProgressBarStyle.ProgressBar;
				}
				return ProgressBarStyle.None;
			}
			set
			{
				SetFlag(NativeMethods.TaskDialogFlags.ShowMarqueeProgressBar, value == ProgressBarStyle.MarqueeProgressBar);
				SetFlag(NativeMethods.TaskDialogFlags.ShowProgressBar, value == ProgressBarStyle.ProgressBar);
				UpdateProgressBarStyle();
			}
		}

		[Category("Behavior")]
		[DefaultValue(100)]
		[Description("The marquee animation speed of the progress bar in milliseconds.")]
		public int ProgressBarMarqueeAnimationSpeed
		{
			get
			{
				return _progressBarMarqueeAnimationSpeed;
			}
			set
			{
				_progressBarMarqueeAnimationSpeed = value;
				UpdateProgressBarMarqueeSpeed();
			}
		}

		[Description("The lower bound of the range of the task dialog's progress bar.")]
		[DefaultValue(0)]
		[Category("Behavior")]
		public int ProgressBarMinimum
		{
			get
			{
				return _progressBarMinimimum;
			}
			set
			{
				if (_progressBarMaximum <= value)
				{
					throw new ArgumentOutOfRangeException("value");
				}
				_progressBarMinimimum = value;
				UpdateProgressBarRange();
			}
		}

		[Category("Behavior")]
		[Description("The upper bound of the range of the task dialog's progress bar.")]
		[DefaultValue(100)]
		public int ProgressBarMaximum
		{
			get
			{
				return _progressBarMaximum;
			}
			set
			{
				if (value <= _progressBarMinimimum)
				{
					throw new ArgumentOutOfRangeException("value");
				}
				_progressBarMaximum = value;
				UpdateProgressBarRange();
			}
		}

		[Description("The current value of the task dialog's progress bar.")]
		[DefaultValue(0)]
		[Category("Behavior")]
		public int ProgressBarValue
		{
			get
			{
				return _progressBarValue;
			}
			set
			{
				if (value < ProgressBarMinimum || value > ProgressBarMaximum)
				{
					throw new ArgumentOutOfRangeException("value");
				}
				_progressBarValue = value;
				UpdateProgressBarValue();
			}
		}

		[DefaultValue(ProgressBarState.Normal)]
		[Category("Behavior")]
		[Description("The state of the task dialog's progress bar.")]
		public ProgressBarState ProgressBarState
		{
			get
			{
				return _progressBarState;
			}
			set
			{
				_progressBarState = value;
				UpdateProgressBarState();
			}
		}

		[Description("User-defined data about the component.")]
		[DefaultValue(null)]
		[Category("Data")]
		public object Tag
		{
			get
			{
				return _tag;
			}
			set
			{
				_tag = value;
			}
		}

		private bool IsDialogRunning => _handle != IntPtr.Zero;

		[Browsable(false)]
		public IntPtr Handle
		{
			get
			{
				CheckCrossThreadCall();
				return _handle;
			}
		}

		[Description("Event raised when the task dialog has been created.")]
		[Category("Behavior")]
		public event EventHandler Created;

		[Description("Event raised when the task dialog has been destroyed.")]
		[Category("Behavior")]
		public event EventHandler Destroyed;

		[Description("Event raised when the user clicks a button.")]
		[Category("Action")]
		public event EventHandler<TaskDialogItemClickedEventArgs> ButtonClicked;

		[Category("Action")]
		[Description("Event raised when the user clicks a button.")]
		public event EventHandler<TaskDialogItemClickedEventArgs> RadioButtonClicked;

		[Description("Event raised when the user clicks a hyperlink.")]
		[Category("Action")]
		public event EventHandler<HyperlinkClickedEventArgs> HyperlinkClicked;

		[Description("Event raised when the user clicks the verification check box.")]
		[Category("Action")]
		public event EventHandler VerificationClicked;

		[Description("Event raised periodically while the dialog is displayed.")]
		[Category("Behavior")]
		public event EventHandler<TimerEventArgs> Timer;

		[Description("Event raised when the user clicks the expand button on the task dialog.")]
		[Category("Action")]
		public event EventHandler<ExpandButtonClickedEventArgs> ExpandButtonClicked;

		[Description("Event raised when the user presses F1 while the dialog has focus.")]
		[Category("Action")]
		public event EventHandler HelpRequested;

		public TaskDialog()
		{
			InitializeComponent();
			_config.cbSize = (uint)Marshal.SizeOf((object)_config);
			_config.pfCallback = TaskDialogCallback;
		}

		public TaskDialog(IContainer container)
		{
			container?.Add(this);
			InitializeComponent();
			_config.cbSize = (uint)Marshal.SizeOf((object)_config);
			_config.pfCallback = TaskDialogCallback;
		}

		public TaskDialogButton Show()
		{
			return ShowDialog(IntPtr.Zero);
		}

		public TaskDialogButton ShowDialog()
		{
			return ShowDialog(null);
		}

		public TaskDialogButton ShowDialog(IWin32Window owner)
		{
			IntPtr owner2 = ((owner != null) ? owner.Handle : NativeMethods.GetActiveWindow());
			return ShowDialog(owner2);
		}

		public void ClickVerification(bool checkState, bool setFocus)
		{
			if (!IsDialogRunning)
			{
				throw new InvalidOperationException(Resources.TaskDialogNotRunningError);
			}
			NativeMethods.SendMessage(Handle, 1137, new IntPtr(checkState ? 1 : 0), new IntPtr(setFocus ? 1 : 0));
		}

		protected virtual void OnHyperlinkClicked(HyperlinkClickedEventArgs e)
		{
			if (this.HyperlinkClicked != null)
			{
				this.HyperlinkClicked(this, e);
			}
		}

		protected virtual void OnButtonClicked(TaskDialogItemClickedEventArgs e)
		{
			if (this.ButtonClicked != null)
			{
				this.ButtonClicked(this, e);
			}
		}

		protected virtual void OnRadioButtonClicked(TaskDialogItemClickedEventArgs e)
		{
			if (this.RadioButtonClicked != null)
			{
				this.RadioButtonClicked(this, e);
			}
		}

		protected virtual void OnVerificationClicked(EventArgs e)
		{
			if (this.VerificationClicked != null)
			{
				this.VerificationClicked(this, e);
			}
		}

		protected virtual void OnCreated(EventArgs e)
		{
			if (this.Created != null)
			{
				this.Created(this, e);
			}
		}

		protected virtual void OnTimer(TimerEventArgs e)
		{
			if (this.Timer != null)
			{
				this.Timer(this, e);
			}
		}

		protected virtual void OnDestroyed(EventArgs e)
		{
			if (this.Destroyed != null)
			{
				this.Destroyed(this, e);
			}
		}

		protected virtual void OnExpandButtonClicked(ExpandButtonClickedEventArgs e)
		{
			if (this.ExpandButtonClicked != null)
			{
				this.ExpandButtonClicked(this, e);
			}
		}

		protected virtual void OnHelpRequested(EventArgs e)
		{
			if (this.HelpRequested != null)
			{
				this.HelpRequested(this, e);
			}
		}

		internal void SetItemEnabled(TaskDialogItem item)
		{
			if (IsDialogRunning)
			{
				NativeMethods.SendMessage(Handle, (item is TaskDialogButton) ? 1135 : 1136, new IntPtr(item.Id), new IntPtr(item.Enabled ? 1 : 0));
			}
		}

		internal void SetButtonElevationRequired(TaskDialogButton button)
		{
			if (IsDialogRunning)
			{
				NativeMethods.SendMessage(Handle, 1139, new IntPtr(button.Id), new IntPtr(button.ElevationRequired ? 1 : 0));
			}
		}

		internal void ClickItem(TaskDialogItem item)
		{
			if (!IsDialogRunning)
			{
				throw new InvalidOperationException(Resources.TaskDialogNotRunningError);
			}
			NativeMethods.SendMessage(Handle, (item is TaskDialogButton) ? 1126 : 1134, new IntPtr(item.Id), IntPtr.Zero);
		}

		private TaskDialogButton ShowDialog(IntPtr owner)
		{
			if (!OSSupportsTaskDialogs)
			{
				throw new NotSupportedException(Resources.TaskDialogsNotSupportedError);
			}
			if (IsDialogRunning)
			{
				throw new InvalidOperationException(Resources.TaskDialogRunningError);
			}
			if (_buttons.Count == 0)
			{
				throw new InvalidOperationException(Resources.TaskDialogNoButtonsError);
			}
			_config.hwndParent = owner;
			_config.dwCommonButtons = (NativeMethods.TaskDialogCommonButtonFlags)0;
			_config.pButtons = IntPtr.Zero;
			_config.cButtons = 0u;
			List<NativeMethods.TASKDIALOG_BUTTON> buttons = SetupButtons();
			List<NativeMethods.TASKDIALOG_BUTTON> buttons2 = SetupRadioButtons();
			SetupIcon();
			try
			{
				MarshalButtons(buttons, out _config.pButtons, out _config.cButtons);
				MarshalButtons(buttons2, out _config.pRadioButtons, out _config.cRadioButtons);
				int pnButton;
				int pnRadioButton;
				bool pfVerificationFlagChecked;
				using (new ComCtlv6ActivationContext(enable: true))
				{
					NativeMethods.TaskDialogIndirect(ref _config, out pnButton, out pnRadioButton, out pfVerificationFlagChecked);
				}
				IsVerificationChecked = pfVerificationFlagChecked;
				if (_radioButtonsById.TryGetValue(pnRadioButton, out var value))
				{
					value.Checked = true;
				}
				if (_buttonsById.TryGetValue(pnButton, out var value2))
				{
					return value2;
				}
				return null;
			}
			finally
			{
				CleanUpButtons(ref _config.pButtons, ref _config.cButtons);
				CleanUpButtons(ref _config.pRadioButtons, ref _config.cRadioButtons);
			}
		}

		internal void UpdateDialog()
		{
			if (!IsDialogRunning)
			{
				return;
			}
			if (_inEventHandler > 0)
			{
				_updatePending = true;
				return;
			}
			_updatePending = false;
			CleanUpButtons(ref _config.pButtons, ref _config.cButtons);
			CleanUpButtons(ref _config.pRadioButtons, ref _config.cRadioButtons);
			_config.dwCommonButtons = (NativeMethods.TaskDialogCommonButtonFlags)0;
			List<NativeMethods.TASKDIALOG_BUTTON> buttons = SetupButtons();
			List<NativeMethods.TASKDIALOG_BUTTON> buttons2 = SetupRadioButtons();
			SetupIcon();
			MarshalButtons(buttons, out _config.pButtons, out _config.cButtons);
			MarshalButtons(buttons2, out _config.pRadioButtons, out _config.cRadioButtons);
			int cb = Marshal.SizeOf((object)_config);
			IntPtr intPtr = Marshal.AllocHGlobal(cb);
			try
			{
				Marshal.StructureToPtr((object)_config, intPtr, fDeleteOld: false);
				NativeMethods.SendMessage(Handle, 1125, IntPtr.Zero, intPtr);
			}
			finally
			{
				Marshal.DestroyStructure(intPtr, typeof(NativeMethods.TASKDIALOGCONFIG));
				Marshal.FreeHGlobal(intPtr);
			}
		}

		private void SetElementText(NativeMethods.TaskDialogElements element, string text)
		{
			if (!IsDialogRunning)
			{
				return;
			}
			IntPtr intPtr = Marshal.StringToHGlobalUni(text);
			try
			{
				NativeMethods.SendMessage(Handle, 1132, new IntPtr((int)element), intPtr);
			}
			finally
			{
				if (intPtr != IntPtr.Zero)
				{
					Marshal.FreeHGlobal(intPtr);
				}
			}
		}

		private void SetupIcon()
		{
			SetupIcon(MainIcon, CustomMainIcon, NativeMethods.TaskDialogFlags.UseHIconMain);
			SetupIcon(FooterIcon, CustomFooterIcon, NativeMethods.TaskDialogFlags.UseHIconFooter);
		}

		private void SetupIcon(TaskDialogIcon icon, Icon customIcon, NativeMethods.TaskDialogFlags flag)
		{
			SetFlag(flag, value: false);
			if (icon == TaskDialogIcon.Custom)
			{
				if (customIcon != null)
				{
					SetFlag(flag, value: true);
					if (flag == NativeMethods.TaskDialogFlags.UseHIconMain)
					{
						_config.hMainIcon = customIcon.Handle;
					}
					else
					{
						_config.hFooterIcon = customIcon.Handle;
					}
				}
			}
			else if (flag == NativeMethods.TaskDialogFlags.UseHIconMain)
			{
				_config.hMainIcon = new IntPtr((int)icon);
			}
			else
			{
				_config.hFooterIcon = new IntPtr((int)icon);
			}
		}

		private static void CleanUpButtons(ref IntPtr buttons, ref uint count)
		{
			if (buttons != IntPtr.Zero)
			{
				int num = Marshal.SizeOf(typeof(NativeMethods.TASKDIALOG_BUTTON));
				for (int i = 0; i < count; i++)
				{
					IntPtr ptr = new IntPtr(buttons.ToInt64() + i * num);
					Marshal.DestroyStructure(ptr, typeof(NativeMethods.TASKDIALOG_BUTTON));
				}
				Marshal.FreeHGlobal(buttons);
				buttons = IntPtr.Zero;
				count = 0u;
			}
		}

		private static void MarshalButtons(List<NativeMethods.TASKDIALOG_BUTTON> buttons, out IntPtr buttonsPtr, out uint count)
		{
			buttonsPtr = IntPtr.Zero;
			count = 0u;
			if (buttons.Count > 0)
			{
				int num = Marshal.SizeOf(typeof(NativeMethods.TASKDIALOG_BUTTON));
				buttonsPtr = Marshal.AllocHGlobal(num * buttons.Count);
				for (int i = 0; i < buttons.Count; i++)
				{
					Marshal.StructureToPtr(ptr: new IntPtr(buttonsPtr.ToInt64() + i * num), structure: (object)buttons[i], fDeleteOld: false);
				}
				count = (uint)buttons.Count;
			}
		}

		private List<NativeMethods.TASKDIALOG_BUTTON> SetupButtons()
		{
			_buttonsById = new Dictionary<int, TaskDialogButton>();
			List<NativeMethods.TASKDIALOG_BUTTON> list = new List<NativeMethods.TASKDIALOG_BUTTON>();
			_config.nDefaultButton = 0;
			foreach (TaskDialogButton button in Buttons)
			{
				if (button.Id < 1)
				{
					throw new InvalidOperationException(Resources.InvalidTaskDialogItemIdError);
				}
				_buttonsById.Add(button.Id, button);
				if (button.Default)
				{
					_config.nDefaultButton = button.Id;
				}
				if (button.ButtonType == ButtonType.Custom)
				{
					if (string.IsNullOrEmpty(button.Text))
					{
						throw new InvalidOperationException(Resources.TaskDialogEmptyButtonLabelError);
					}
					NativeMethods.TASKDIALOG_BUTTON item = default(NativeMethods.TASKDIALOG_BUTTON);
					item.nButtonID = button.Id;
					item.pszButtonText = button.Text;
					if (ButtonStyle == TaskDialogButtonStyle.CommandLinks || (ButtonStyle == TaskDialogButtonStyle.CommandLinksNoIcon && !string.IsNullOrEmpty(button.CommandLinkNote)))
					{
						item.pszButtonText = item.pszButtonText + "\n" + button.CommandLinkNote;
					}
					list.Add(item);
				}
				else
				{
					_config.dwCommonButtons |= button.ButtonFlag;
				}
			}
			return list;
		}

		private List<NativeMethods.TASKDIALOG_BUTTON> SetupRadioButtons()
		{
			_radioButtonsById = new Dictionary<int, TaskDialogRadioButton>();
			List<NativeMethods.TASKDIALOG_BUTTON> list = new List<NativeMethods.TASKDIALOG_BUTTON>();
			_config.nDefaultRadioButton = 0;
			foreach (TaskDialogRadioButton radioButton in RadioButtons)
			{
				if (string.IsNullOrEmpty(radioButton.Text))
				{
					throw new InvalidOperationException(Resources.TaskDialogEmptyButtonLabelError);
				}
				if (radioButton.Id < 1)
				{
					throw new InvalidOperationException(Resources.InvalidTaskDialogItemIdError);
				}
				_radioButtonsById.Add(radioButton.Id, radioButton);
				if (radioButton.Checked)
				{
					_config.nDefaultRadioButton = radioButton.Id;
				}
				NativeMethods.TASKDIALOG_BUTTON item = default(NativeMethods.TASKDIALOG_BUTTON);
				item.nButtonID = radioButton.Id;
				item.pszButtonText = radioButton.Text;
				list.Add(item);
			}
			SetFlag(NativeMethods.TaskDialogFlags.NoDefaultRadioButton, _config.nDefaultRadioButton == 0);
			return list;
		}

		private void SetFlag(NativeMethods.TaskDialogFlags flag, bool value)
		{
			if (value)
			{
				_config.dwFlags |= flag;
			}
			else
			{
				_config.dwFlags &= ~flag;
			}
		}

		private bool GetFlag(NativeMethods.TaskDialogFlags flag)
		{
			return (_config.dwFlags & flag) != 0;
		}

		private uint TaskDialogCallback(IntPtr hwnd, uint uNotification, IntPtr wParam, IntPtr lParam, IntPtr dwRefData)
		{
			Interlocked.Increment(ref _inEventHandler);
			try
			{
				switch ((NativeMethods.TaskDialogNotifications)uNotification)
				{
				case NativeMethods.TaskDialogNotifications.Created:
					_handle = hwnd;
					DialogCreated();
					OnCreated(EventArgs.Empty);
					break;
				case NativeMethods.TaskDialogNotifications.Destroyed:
					_handle = IntPtr.Zero;
					OnDestroyed(EventArgs.Empty);
					break;
				case NativeMethods.TaskDialogNotifications.Navigated:
					DialogCreated();
					break;
				case NativeMethods.TaskDialogNotifications.HyperlinkClicked:
				{
					string href = Marshal.PtrToStringUni(lParam);
					OnHyperlinkClicked(new HyperlinkClickedEventArgs(href));
					break;
				}
				case NativeMethods.TaskDialogNotifications.ButtonClicked:
				{
					if (_buttonsById.TryGetValue((int)wParam, out var value2))
					{
						TaskDialogItemClickedEventArgs taskDialogItemClickedEventArgs = new TaskDialogItemClickedEventArgs(value2);
						OnButtonClicked(taskDialogItemClickedEventArgs);
						if (taskDialogItemClickedEventArgs.Cancel)
						{
							return 1u;
						}
					}
					break;
				}
				case NativeMethods.TaskDialogNotifications.VerificationClicked:
					IsVerificationChecked = (int)wParam == 1;
					OnVerificationClicked(EventArgs.Empty);
					break;
				case NativeMethods.TaskDialogNotifications.RadioButtonClicked:
				{
					if (_radioButtonsById.TryGetValue((int)wParam, out var value))
					{
						value.Checked = true;
						TaskDialogItemClickedEventArgs e = new TaskDialogItemClickedEventArgs(value);
						OnRadioButtonClicked(e);
					}
					break;
				}
				case NativeMethods.TaskDialogNotifications.Timer:
				{
					TimerEventArgs timerEventArgs = new TimerEventArgs(wParam.ToInt32());
					OnTimer(timerEventArgs);
					return timerEventArgs.ResetTickCount ? 1u : 0u;
				}
				case NativeMethods.TaskDialogNotifications.ExpandoButtonClicked:
					OnExpandButtonClicked(new ExpandButtonClickedEventArgs(wParam.ToInt32() != 0));
					break;
				case NativeMethods.TaskDialogNotifications.Help:
					OnHelpRequested(EventArgs.Empty);
					break;
				}
				return 0u;
			}
			finally
			{
				Interlocked.Decrement(ref _inEventHandler);
				if (_updatePending)
				{
					UpdateDialog();
				}
			}
		}

		private void DialogCreated()
		{
			if (_config.hwndParent == IntPtr.Zero && _windowIcon != null)
			{
				NativeMethods.SendMessage(Handle, 128, new IntPtr(0), _windowIcon.Handle);
			}
			foreach (TaskDialogButton button in Buttons)
			{
				if (!button.Enabled)
				{
					SetItemEnabled(button);
				}
				if (button.ElevationRequired)
				{
					SetButtonElevationRequired(button);
				}
			}
			UpdateProgressBarStyle();
			UpdateProgressBarMarqueeSpeed();
			UpdateProgressBarRange();
			UpdateProgressBarValue();
			UpdateProgressBarState();
		}

		private void UpdateProgressBarStyle()
		{
			if (IsDialogRunning)
			{
				NativeMethods.SendMessage(Handle, 1127, new IntPtr((ProgressBarStyle == ProgressBarStyle.MarqueeProgressBar) ? 1 : 0), IntPtr.Zero);
			}
		}

		private void UpdateProgressBarMarqueeSpeed()
		{
			if (IsDialogRunning)
			{
				NativeMethods.SendMessage(Handle, 1131, new IntPtr((ProgressBarMarqueeAnimationSpeed > 0) ? 1 : 0), new IntPtr(ProgressBarMarqueeAnimationSpeed));
			}
		}

		private void UpdateProgressBarRange()
		{
			if (IsDialogRunning)
			{
				NativeMethods.SendMessage(Handle, 1129, IntPtr.Zero, new IntPtr((ProgressBarMaximum << 16) | ProgressBarMinimum));
			}
			if (ProgressBarValue < ProgressBarMinimum)
			{
				ProgressBarValue = ProgressBarMinimum;
			}
			if (ProgressBarValue > ProgressBarMaximum)
			{
				ProgressBarValue = ProgressBarMaximum;
			}
		}

		private void UpdateProgressBarValue()
		{
			if (IsDialogRunning)
			{
				NativeMethods.SendMessage(Handle, 1130, new IntPtr(ProgressBarValue), IntPtr.Zero);
			}
		}

		private void UpdateProgressBarState()
		{
			if (IsDialogRunning)
			{
				NativeMethods.SendMessage(Handle, 1128, new IntPtr((int)(ProgressBarState + 1)), IntPtr.Zero);
			}
		}

		private void CheckCrossThreadCall()
		{
			IntPtr handle = _handle;
			if (handle != IntPtr.Zero)
			{
				int lpdwProcessId;
				int windowThreadProcessId = NativeMethods.GetWindowThreadProcessId(handle, out lpdwProcessId);
				int currentThreadId = NativeMethods.GetCurrentThreadId();
				if (windowThreadProcessId != currentThreadId)
				{
					throw new InvalidOperationException(Resources.TaskDialogIllegalCrossThreadCallError);
				}
			}
		}

		protected override void Dispose(bool disposing)
		{
			try
			{
				if (!disposing)
				{
					return;
				}
				if (components != null)
				{
					components.Dispose();
					components = null;
				}
				if (_buttons != null)
				{
					foreach (TaskDialogButton button in _buttons)
					{
						button.Dispose();
					}
					_buttons.Clear();
				}
				if (_radioButtons == null)
				{
					return;
				}
				foreach (TaskDialogRadioButton radioButton in _radioButtons)
				{
					radioButton.Dispose();
				}
				_radioButtons.Clear();
			}
			finally
			{
				base.Dispose(disposing);
			}
		}

		private void InitializeComponent()
		{
			components = new Container();
		}
	}
	public class ExtendedForm : Form
	{
		private bool _useSystemFont;

		private Padding _glassMargin;

		private bool _allowGlassDragging = true;

		[DefaultValue(false)]
		[Description("Indicates whether or not the form automatically uses the system default font.")]
		[Category("Appearance")]
		public bool UseSystemFont
		{
			get
			{
				return _useSystemFont;
			}
			set
			{
				_useSystemFont = value;
			}
		}

		[Category("Appearance")]
		[Description("The glass margins of the form.")]
		public Padding GlassMargin
		{
			get
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				return _glassMargin;
			}
			set
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0010: Unknown result type (might be due to invalid IL or missing references)
				if (_glassMargin != value)
				{
					_glassMargin = value;
					EnableGlass();
				}
			}
		}

		[DefaultValue(true)]
		[Description("Indicates whether the form can be dragged by the glass areas inside the client area.")]
		[Category("Behavior")]
		public bool AllowGlassDragging
		{
			get
			{
				return _allowGlassDragging;
			}
			set
			{
				_allowGlassDragging = value;
			}
		}

		public event EventHandler DwmCompositionChanged;

		protected virtual void OnDwmCompositionChanged(EventArgs e)
		{
			this.DwmCompositionChanged?.Invoke(this, e);
		}

		protected override void OnLoad(EventArgs e)
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Expected O, but got Unknown
			if (!((Component)this).DesignMode && _useSystemFont)
			{
				((Control)this).Font = SystemFonts.IconTitleFont;
				SystemEvents.UserPreferenceChanged += new UserPreferenceChangedEventHandler(SystemEvents_UserPreferenceChanged);
			}
			((Form)this).OnLoad(e);
		}

		protected override void OnFormClosed(FormClosedEventArgs e)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Expected O, but got Unknown
			((Form)this).OnFormClosed(e);
			SystemEvents.UserPreferenceChanged -= new UserPreferenceChangedEventHandler(SystemEvents_UserPreferenceChanged);
		}

		protected override void OnPaintBackground(PaintEventArgs pevent)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Expected O, but got Unknown
			if (((Component)this).DesignMode || Glass.IsDwmCompositionEnabled)
			{
				if (((Component)this).DesignMode)
				{
					HatchBrush val = new HatchBrush((HatchStyle)51, Color.SkyBlue, ((Control)this).BackColor);
					try
					{
						PaintGlassArea(pevent, (Brush)(object)val);
						return;
					}
					finally
					{
						((IDisposable)val)?.Dispose();
					}
				}
				PaintGlassArea(pevent, Brushes.Black);
			}
			else
			{
				((ScrollableControl)this).OnPaintBackground(pevent);
			}
		}

		protected override void OnResize(EventArgs e)
		{
			((Form)this).OnResize(e);
			if (((Padding)(ref _glassMargin)).All != 0)
			{
				((Control)this).Invalidate();
			}
		}

		protected override void OnHandleCreated(EventArgs e)
		{
			EnableGlass();
			((Form)this).OnHandleCreated(e);
		}

		[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
		protected override void WndProc(ref Message m)
		{
			((Form)this).WndProc(ref m);
			switch (((Message)(ref m)).Msg)
			{
			case 132:
			{
				if (!_allowGlassDragging || !(((Message)(ref m)).Result == new IntPtr(1)) || !Glass.IsDwmCompositionEnabled)
				{
					break;
				}
				if (((Padding)(ref _glassMargin)).Left == -1 && ((Padding)(ref _glassMargin)).Top == -1 && ((Padding)(ref _glassMargin)).Right == -1 && ((Padding)(ref _glassMargin)).Bottom == -1)
				{
					((Message)(ref m)).Result = new IntPtr(2);
					break;
				}
				Point point = new Point((int)((Message)(ref m)).LParam & 0xFFFF, (int)((Message)(ref m)).LParam >> 16);
				point = ((Control)this).PointToClient(point);
				if (point.X < ((Padding)(ref _glassMargin)).Left || point.X > ((Form)this).ClientSize.Width - ((Padding)(ref _glassMargin)).Right || point.Y < ((Padding)(ref _glassMargin)).Top || point.Y > ((Form)this).ClientSize.Height - ((Padding)(ref _glassMargin)).Bottom)
				{
					((Message)(ref m)).Result = new IntPtr(2);
				}
				break;
			}
			case 798:
				if (((Padding)(ref _glassMargin)).All != 0)
				{
					EnableGlass();
				}
				OnDwmCompositionChanged(EventArgs.Empty);
				((Message)(ref m)).Result = IntPtr.Zero;
				break;
			}
		}

		protected override void ScaleControl(SizeF factor, BoundsSpecified specified)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			float width = factor.Width;
			Padding glassMargin = GlassMargin;
			if (width != 1f)
			{
				if (((Padding)(ref glassMargin)).Left > 0)
				{
					((Padding)(ref glassMargin)).Left = (int)Math.Round((float)((Padding)(ref glassMargin)).Left * width);
				}
				if (((Padding)(ref glassMargin)).Right > 0)
				{
					((Padding)(ref glassMargin)).Right = (int)Math.Round((float)((Padding)(ref glassMargin)).Right * width);
				}
			}
			float height = factor.Height;
			if (height != 1f)
			{
				if (((Padding)(ref glassMargin)).Top > 0)
				{
					((Padding)(ref glassMargin)).Top = (int)Math.Round((float)((Padding)(ref glassMargin)).Top * height);
				}
				if (((Padding)(ref glassMargin)).Bottom > 0)
				{
					((Padding)(ref glassMargin)).Bottom = (int)Math.Round((float)((Padding)(ref glassMargin)).Bottom * height);
				}
			}
			GlassMargin = glassMargin;
			((Form)this).ScaleControl(factor, specified);
		}

		private void EnableGlass()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			if (!((Component)this).DesignMode && Glass.IsDwmCompositionEnabled)
			{
				((IWin32Window)(object)this).ExtendFrameIntoClientArea(GlassMargin);
				((Control)this).Invalidate();
			}
		}

		private void PaintGlassArea(PaintEventArgs pevent, Brush brush)
		{
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Expected O, but got Unknown
			if (((Padding)(ref _glassMargin)).Left == -1 && ((Padding)(ref _glassMargin)).Top == -1 && ((Padding)(ref _glassMargin)).Right == -1 && ((Padding)(ref _glassMargin)).Bottom == -1)
			{
				pevent.Graphics.FillRectangle(brush, pevent.ClipRectangle);
				return;
			}
			Rectangle rectangle = new Rectangle(((Padding)(ref _glassMargin)).Left, ((Padding)(ref _glassMargin)).Top, ((Form)this).ClientSize.Width - ((Padding)(ref _glassMargin)).Right, ((Form)this).ClientSize.Height - ((Padding)(ref _glassMargin)).Bottom);
			pevent.Graphics.FillRectangle((Brush)new SolidBrush(((Control)this).BackColor), rectangle);
			if (((Padding)(ref _glassMargin)).Left != 0)
			{
				pevent.Graphics.FillRectangle(brush, new Rectangle(0, 0, ((Padding)(ref _glassMargin)).Left, ((Form)this).ClientSize.Height));
			}
			if (((Padding)(ref _glassMargin)).Right != 0)
			{
				pevent.Graphics.FillRectangle(brush, new Rectangle(((Form)this).ClientSize.Width - ((Padding)(ref _glassMargin)).Right, 0, ((Form)this).ClientSize.Width, ((Form)this).ClientSize.Height));
			}
			if (((Padding)(ref _glassMargin)).Top != 0)
			{
				pevent.Graphics.FillRectangle(brush, new Rectangle(0, 0, ((Form)this).ClientSize.Width, ((Padding)(ref _glassMargin)).Top));
			}
			if (((Padding)(ref _glassMargin)).Bottom != 0)
			{
				pevent.Graphics.FillRectangle(brush, new Rectangle(0, ((Form)this).ClientSize.Height - ((Padding)(ref _glassMargin)).Bottom, ((Form)this).ClientSize.Width, ((Form)this).ClientSize.Height));
			}
		}

		private void SystemEvents_UserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Invalid comparison between Unknown and I4
			if ((int)e.Category == 12 && _useSystemFont)
			{
				((Control)this).Font = SystemFonts.IconTitleFont;
			}
		}
	}
	internal class InputDialogForm : ExtendedForm
	{
		private SizeF _textMargin = new SizeF(12f, 9f);

		private string _mainInstruction;

		private string _content;

		private IContainer components;

		private Panel _primaryPanel;

		private Panel _secondaryPanel;

		private Button _cancelButton;

		private Button _okButton;

		private TextBox _inputTextBox;

		public string MainInstruction
		{
			get
			{
				return _mainInstruction;
			}
			set
			{
				_mainInstruction = value;
			}
		}

		[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
		public string Content
		{
			get
			{
				return _content;
			}
			set
			{
				_content = value;
			}
		}

		public string Input
		{
			get
			{
				return ((Control)_inputTextBox).Text;
			}
			set
			{
				((Control)_inputTextBox).Text = value;
			}
		}

		public int MaxLength
		{
			get
			{
				return ((TextBoxBase)_inputTextBox).MaxLength;
			}
			set
			{
				((TextBoxBase)_inputTextBox).MaxLength = value;
			}
		}

		public bool UsePasswordMasking
		{
			get
			{
				return _inputTextBox.UseSystemPasswordChar;
			}
			set
			{
				_inputTextBox.UseSystemPasswordChar = value;
			}
		}

		public event EventHandler<OkButtonClickedEventArgs> OkButtonClicked;

		public InputDialogForm()
		{
			InitializeComponent();
		}

		protected virtual void OnOkButtonClicked(OkButtonClickedEventArgs e)
		{
			if (this.OkButtonClicked != null)
			{
				this.OkButtonClicked(this, e);
			}
		}

		protected override void ScaleControl(SizeF factor, BoundsSpecified specified)
		{
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			_textMargin = new SizeF(_textMargin.Width * factor.Width, _textMargin.Height * factor.Height);
			base.ScaleControl(factor, specified);
		}

		private void SizeDialog()
		{
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Expected O, but got Unknown
			int horizontalSpacing = (int)_textMargin.Width * 2;
			int verticalSpacing = ((Form)this).ClientSize.Height - ((Control)_inputTextBox).Top + (int)_textMargin.Height * 3;
			Graphics val = ((Control)_primaryPanel).CreateGraphics();
			try
			{
				((Form)this).ClientSize = DialogHelper.SizeDialog((IDeviceContext)(object)val, MainInstruction, Content, Screen.FromControl((Control)(object)this), new Font(((Control)this).Font, (FontStyle)1), ((Control)this).Font, horizontalSpacing, verticalSpacing, ((Form)this).ClientSize.Width, 0);
			}
			finally
			{
				((IDisposable)val)?.Dispose();
			}
		}

		private static void DrawThemeBackground(IDeviceContext dc, VisualStyleElement element, Rectangle bounds, Rectangle clipRectangle)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Expected O, but got Unknown
			if (DialogHelper.IsTaskDialogThemeSupported)
			{
				VisualStyleRenderer val = new VisualStyleRenderer(element);
				val.DrawBackground(dc, bounds, clipRectangle);
			}
		}

		private void DrawText(IDeviceContext dc, ref Point location, bool measureOnly, int width)
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Expected O, but got Unknown
			DialogHelper.DrawText(dc, MainInstruction, Content, ref location, new Font(((Control)this).Font, (FontStyle)1), ((Control)this).Font, measureOnly, width);
		}

		private void _primaryPanel_Paint(object sender, PaintEventArgs e)
		{
			DrawThemeBackground((IDeviceContext)(object)e.Graphics, AdditionalVisualStyleElements.TaskDialog.PrimaryPanel, ((Control)_primaryPanel).ClientRectangle, e.ClipRectangle);
			Point location = new Point((int)_textMargin.Width, (int)_textMargin.Height);
			DrawText((IDeviceContext)(object)e.Graphics, ref location, measureOnly: false, ((Form)this).ClientSize.Width - (int)_textMargin.Width * 2);
		}

		private void _secondaryPanel_Paint(object sender, PaintEventArgs e)
		{
			DrawThemeBackground((IDeviceContext)(object)e.Graphics, AdditionalVisualStyleElements.TaskDialog.SecondaryPanel, ((Control)_secondaryPanel).ClientRectangle, e.ClipRectangle);
		}

		private void NewInputBoxForm_Load(object sender, EventArgs e)
		{
			SizeDialog();
			((Form)this).CenterToScreen();
		}

		private void _okButton_Click(object sender, EventArgs e)
		{
			OkButtonClickedEventArgs okButtonClickedEventArgs = new OkButtonClickedEventArgs(((Control)_inputTextBox).Text, (IWin32Window)(object)this);
			OnOkButtonClicked(okButtonClickedEventArgs);
			if (!okButtonClickedEventArgs.Cancel)
			{
				((Form)this).DialogResult = (DialogResult)1;
			}
		}

		protected override void Dispose(bool disposing)
		{
			if (disposing && components != null)
			{
				components.Dispose();
			}
			((Form)this).Dispose(disposing);
		}

		private void InitializeComponent()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Expected O, but got Unknown
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Expected O, but got Unknown
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Expected O, but got Unknown
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Expected O, but got Unknown
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Expected O, but got Unknown
			ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(InputDialogForm));
			_primaryPanel = new Panel();
			_inputTextBox = new TextBox();
			_secondaryPanel = new Panel();
			_cancelButton = new Button();
			_okButton = new Button();
			((Control)_primaryPanel).SuspendLayout();
			((Control)_secondaryPanel).SuspendLayout();
			((Control)this).SuspendLayout();
			((Control)_primaryPanel).Controls.Add((Control)(object)_inputTextBox);
			componentResourceManager.ApplyResources(_primaryPanel, "_primaryPanel");
			((Control)_primaryPanel).Name = "_primaryPanel";
			((Control)_primaryPanel).Paint += new PaintEventHandler(_primaryPanel_Paint);
			componentResourceManager.ApplyResources(_inputTextBox, "_inputTextBox");
			((Control)_inputTextBox).Name = "_inputTextBox";
			((Control)_secondaryPanel).Controls.Add((Control)(object)_cancelButton);
			((Control)_secondaryPanel).Controls.Add((Control)(object)_okButton);
			componentResourceManager.ApplyResources(_secondaryPanel, "_secondaryPanel");
			((Control)_secondaryPanel).Name = "_secondaryPanel";
			((Control)_secondaryPanel).Paint += new PaintEventHandler(_secondaryPanel_Paint);
			componentResourceManager.ApplyResources(_cancelButton, "_cancelButton");
			_cancelButton.DialogResult = (DialogResult)2;
			((Control)_cancelButton).Name = "_cancelButton";
			((ButtonBase)_cancelButton).UseVisualStyleBackColor = true;
			componentResourceManager.ApplyResources(_okButton, "_okButton");
			((Control)_okButton).Name = "_okButton";
			((ButtonBase)_okButton).UseVisualStyleBackColor = true;
			((Control)_okButton).Click += _okButton_Click;
			((Form)this).AcceptButton = (IButtonControl)(object)_okButton;
			componentResourceManager.ApplyResources(this, "$this");
			((ContainerControl)this).AutoScaleMode = (AutoScaleMode)1;
			((Form)this).CancelButton = (IButtonControl)(object)_cancelButton;
			((Control)this).Controls.Add((Control)(object)_primaryPanel);
			((Control)this).Controls.Add((Control)(object)_secondaryPanel);
			((Form)this).FormBorderStyle = (FormBorderStyle)3;
			((Form)this).MaximizeBox = false;
			((Form)this).MinimizeBox = false;
			((Control)this).Name = "InputDialogForm";
			((Form)this).ShowInTaskbar = false;
			base.UseSystemFont = true;
			((Form)this).Load += NewInputBoxForm_Load;
			((Control)_primaryPanel).ResumeLayout(false);
			((Control)_primaryPanel).PerformLayout();
			((Control)_secondaryPanel).ResumeLayout(false);
			((Control)this).ResumeLayout(false);
		}
	}
	[Serializable]
	public class CredentialException : Win32Exception
	{
		[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
		public CredentialException()
			: base(Resources.CredentialError)
		{
		}

		[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
		public CredentialException(int error)
			: base(error)
		{
		}

		[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
		public CredentialException(string message)
			: base(message)
		{
		}

		[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
		public CredentialException(int error, string message)
			: base(error, message)
		{
		}

		[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
		public CredentialException(string message, Exception innerException)
			: base(message, innerException)
		{
		}

		[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
		protected CredentialException(SerializationInfo info, StreamingContext context)
			: base(info, context)
		{
		}
	}
	[DefaultEvent("FileOk")]
	[DefaultProperty("FileName")]
	public abstract class VistaFileDialog : CommonDialog
	{
		internal const int HelpButtonId = 16385;

		private FileDialog _downlevelDialog;

		private NativeMethods.FOS _options;

		private string _filter;

		private int _filterIndex;

		private string[] _fileNames;

		private string _defaultExt;

		private bool _addExtension;

		private string _initialDirectory;

		private bool _showHelp;

		private string _title;

		private bool _supportMultiDottedExtensions;

		private IntPtr _hwndOwner;

		private static readonly object EventFileOk = new object();

		[Browsable(false)]
		public static bool IsVistaFileDialogSupported
		{
			get
			{
				if (Environment.OSVersion.Platform == PlatformID.Win32NT)
				{
					return Environment.OSVersion.Version.Major >= 6;
				}
				return false;
			}
		}

		[Category("Behavior")]
		[Description("A value indicating whether the dialog box automatically adds an extension to a file name if the user omits the extension.")]
		[DefaultValue(true)]
		public bool AddExtension
		{
			get
			{
				if (DownlevelDialog != null)
				{
					return DownlevelDialog.AddExtension;
				}
				return _addExtension;
			}
			set
			{
				if (DownlevelDialog != null)
				{
					DownlevelDialog.AddExtension = value;
				}
				else
				{
					_addExtension = value;
				}
			}
		}

		[Description("A value indicating whether the dialog box displays a warning if the user specifies a file name that does not exist.")]
		[Category("Behavior")]
		[DefaultValue(false)]
		public virtual bool CheckFileExists
		{
			get
			{
				if (DownlevelDialog != null)
				{
					return DownlevelDialog.CheckFileExists;
				}
				return GetOption(NativeMethods.FOS.FOS_FILEMUSTEXIST);
			}
			set
			{
				if (DownlevelDialog != null)
				{
					DownlevelDialog.CheckFileExists = value;
				}
				else
				{
					SetOption(NativeMethods.FOS.FOS_FILEMUSTEXIST, value);
				}
			}
		}

		[DefaultValue(true)]
		[Description("A value indicating whether the dialog box displays a warning if the user specifies a path that does not exist.")]
		[Category("Behavior")]
		public bool CheckPathExists
		{
			get
			{
				if (DownlevelDialog != null)
				{
					return DownlevelDialog.CheckPathExists;
				}
				return GetOption(NativeMethods.FOS.FOS_PATHMUSTEXIST);
			}
			set
			{
				if (DownlevelDialog != null)
				{
					DownlevelDialog.CheckPathExists = value;
				}
				else
				{
					SetOption(NativeMethods.FOS.FOS_PATHMUSTEXIST, value);
				}
			}
		}

		[Description("The default file name extension.")]
		[Category("Behavior")]
		[DefaultValue("")]
		public string DefaultExt
		{
			get
			{
				if (DownlevelDialog != null)
				{
					return DownlevelDialog.DefaultExt;
				}
				if (_defaultExt != null)
				{
					return _defaultExt;
				}
				return string.Empty;
			}
			set
			{
				if (DownlevelDialog != null)
				{
					DownlevelDialog.DefaultExt = value;
					return;
				}
				if (value != null)
				{
					if (value.StartsWith(".", StringComparison.Ordinal))
					{
						value = value.Substring(1);
					}
					else if (value.Length == 0)
					{
						value = null;
					}
				}
				_defaultExt = value;
			}
		}

		[DefaultValue(true)]
		[Description("A value indicating whether the dialog box returns the location of the file referenced by the shortcut or whether it returns the location of the shortcut (.lnk).")]
		[Category("Behavior")]
		public bool DereferenceLinks
		{
			get
			{
				if (DownlevelDialog != null)
				{
					return DownlevelDialog.DereferenceLinks;
				}
				return !GetOption(NativeMethods.FOS.FOS_NODEREFERENCELINKS);
			}
			set
			{
				if (DownlevelDialog != null)
				{
					DownlevelDialog.DereferenceLinks = value;
				}
				else
				{
					SetOption(NativeMethods.FOS.FOS_NODEREFERENCELINKS, !value);
				}
			}
		}

		[Description("A string containing the file name selected in the file dialog box.")]
		[Category("Data")]
		[DefaultValue("")]
		public string FileName
		{
			get
			{
				if (DownlevelDialog != null)
				{
					return DownlevelDialog.FileName;
				}
				if (_fileNames == null || _fileNames.Length == 0 || string.IsNullOrEmpty(_fileNames[0]))
				{
					return string.Empty;
				}
				return _fileNames[0];
			}
			set
			{
				if (DownlevelDialog != null)
				{
					DownlevelDialog.FileName = value;
				}
				_fileNames = new string[1];
				_fileNames[0] = value;
			}
		}

		[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
		[Description("The file names of all selected files in the dialog box.")]
		[Browsable(false)]
		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		public string[] FileNames
		{
			get
			{
				if (DownlevelDialog != null)
				{
					return DownlevelDialog.FileNames;
				}
				return FileNamesInternal;
			}
		}

		[Localizable(true)]
		[DefaultValue("")]
		[Category("Behavior")]
		[Description("The current file name filter string, which determines the choices that appear in the \"Save as file type\" or \"Files of type\" box in the dialog box.")]
		public string Filter
		{
			get
			{
				if (DownlevelDialog != null)
				{
					return DownlevelDialog.Filter;
				}
				return _filter;
			}
			set
			{
				if (DownlevelDialog != null)
				{
					DownlevelDialog.Filter = value;
				}
				else
				{
					if (!(value != _filter))
					{
						return;
					}
					if (!string.IsNullOrEmpty(value))
					{
						string[] array = value.Split(new char[1] { '|' });
						if (array == null || array.Length % 2 != 0)
						{
							throw new ArgumentException(Resources.InvalidFilterString);
						}
					}
					else
					{
						value = null;
					}
					_filter = value;
				}
			}
		}

		[Description("The index of the filter currently selected in the file dialog box.")]
		[Category("Behavior")]
		[DefaultValue(1)]
		public int FilterIndex
		{
			get
			{
				if (DownlevelDialog != null)
				{
					return DownlevelDialog.FilterIndex;
				}
				return _filterIndex;
			}
			set
			{
				if (DownlevelDialog != null)
				{
					DownlevelDialog.FilterIndex = value;
				}
				else
				{
					_filterIndex = value;
				}
			}
		}

		[Description("The initial directory displayed by the file dialog box.")]
		[Category("Data")]
		[DefaultValue("")]
		public string InitialDirectory
		{
			get
			{
				if (DownlevelDialog != null)
				{
					return DownlevelDialog.InitialDirectory;
				}
				if (_initialDirectory != null)
				{
					return _initialDirectory;
				}
				return string.Empty;
			}
			set
			{
				if (DownlevelDialog != null)
				{
					DownlevelDialog.InitialDirectory = value;
				}
				else
				{
					_initialDirectory = value;
				}
			}
		}

		[DefaultValue(false)]
		[Description("A value indicating whether the dialog box restores the current directory before closing.")]
		[Category("Behavior")]
		public bool RestoreDirectory
		{
			get
			{
				if (DownlevelDialog != null)
				{
					return DownlevelDialog.RestoreDirectory;
				}
				return GetOption(NativeMethods.FOS.FOS_NOCHANGEDIR);
			}
			set
			{
				if (DownlevelDialog != null)
				{
					DownlevelDialog.RestoreDirectory = value;
				}
				else
				{
					SetOption(NativeMethods.FOS.FOS_NOCHANGEDIR, value);
				}
			}
		}

		[Category("Behavior")]
		[Description("A value indicating whether the Help button is displayed in the file dialog box.")]
		[DefaultValue(false)]
		public bool ShowHelp
		{
			get
			{
				if (DownlevelDialog != null)
				{
					return DownlevelDialog.ShowHelp;
				}
				return _showHelp;
			}
			set
			{
				if (DownlevelDialog != null)
				{
					DownlevelDialog.ShowHelp = value;
				}
				else
				{
					_showHelp = value;
				}
			}
		}

		[Category("Appearance")]
		[DefaultValue("")]
		[Localizable(true)]
		[Description("The file dialog box title.")]
		public string Title
		{
			get
			{
				if (DownlevelDialog != null)
				{
					return DownlevelDialog.Title;
				}
				if (_title != null)
				{
					return _title;
				}
				return string.Empty;
			}
			set
			{
				if (DownlevelDialog != null)
				{
					DownlevelDialog.Title = value;
				}
				else
				{
					_title = value;
				}
			}
		}

		[Description("Indicates whether the dialog box supports displaying and saving files that have multiple file name extensions.")]
		[Category("Behavior")]
		[DefaultValue(false)]
		public bool SupportMultiDottedExtensions
		{
			get
			{
				if (DownlevelDialog != null)
				{
					return DownlevelDialog.SupportMultiDottedExtensions;
				}
				return _supportMultiDottedExtensions;
			}
			set
			{
				if (DownlevelDialog != null)
				{
					DownlevelDialog.SupportMultiDottedExtensions = value;
				}
				else
				{
					_supportMultiDottedExtensions = value;
				}
			}
		}

		[Description("A value indicating whether the dialog box accepts only valid Win32 file names.")]
		[Category("Behavior")]
		[DefaultValue(true)]
		public bool ValidateNames
		{
			get
			{
				if (DownlevelDialog != null)
				{
					return DownlevelDialog.ValidateNames;
				}
				return !GetOption(NativeMethods.FOS.FOS_NOVALIDATE);
			}
			set
			{
				if (DownlevelDialog != null)
				{
					DownlevelDialog.ValidateNames = value;
				}
				else
				{
					SetOption(NativeMethods.FOS.FOS_NOVALIDATE, !value);
				}
			}
		}

		[Browsable(false)]
		protected FileDialog DownlevelDialog
		{
			get
			{
				return _downlevelDialog;
			}
			set
			{
				_downlevelDialog = value;
				if (value != null)
				{
					((CommonDialog)value).HelpRequest += DownlevelDialog_HelpRequest;
					value.FileOk += DownlevelDialog_FileOk;
				}
			}
		}

		internal string[] FileNamesInternal
		{
			private get
			{
				if (_fileNames == null)
				{
					return new string[0];
				}
				return (string[])_fileNames.Clone();
			}
			set
			{
				_fileNames = value;
			}
		}

		public event CancelEventHandler FileOk
		{
			add
			{
				((Component)this).Events.AddHandler(EventFileOk, value);
			}
			remove
			{
				((Component)this).Events.RemoveHandler(EventFileOk, value);
			}
		}

		protected VistaFileDialog()
		{
			((CommonDialog)this).Reset();
		}

		public override void Reset()
		{
			if (DownlevelDialog != null)
			{
				((CommonDialog)DownlevelDialog).Reset();
				return;
			}
			_fileNames = null;
			_filter = null;
			_filterIndex = 1;
			_addExtension = true;
			_defaultExt = null;
			_options = (NativeMethods.FOS)0u;
			_showHelp = false;
			_title = null;
			_supportMultiDottedExtensions = false;
			CheckPathExists = true;
		}

		protected override bool RunDialog(IntPtr hwndOwner)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Invalid comparison between Unknown and I4
			if (DownlevelDialog != null)
			{
				return (int)((CommonDialog)DownlevelDialog).ShowDialog((IWin32Window)(object)((hwndOwner == IntPtr.Zero) ? null : new WindowHandleWrapper(hwndOwner))) == 1;
			}
			return RunFileDialog(hwndOwner);
		}

		internal void SetOption(NativeMethods.FOS option, bool value)
		{
			if (value)
			{
				_options |= option;
			}
			else
			{
				_options &= ~option;
			}
		}

		internal bool GetOption(NativeMethods.FOS option)
		{
			return (_options & option) != 0;
		}

		internal virtual void GetResult(IFileDialog dialog)
		{
			if (!GetOption(NativeMethods.FOS.FOS_ALLOWMULTISELECT))
			{
				_fileNames = new string[1];
				dialog.GetResult(out var ppsi);
				ppsi.GetDisplayName(NativeMethods.SIGDN.SIGDN_FILESYSPATH, out _fileNames[0]);
			}
		}

		protected virtual void OnFileOk(CancelEventArgs e)
		{
			((CancelEventHandler)((Component)this).Events[EventFileOk])?.Invoke(this, e);
		}

		protected override void Dispose(bool disposing)
		{
			try
			{
				if (disposing && DownlevelDialog != null)
				{
					((Component)(object)DownlevelDialog).Dispose();
				}
			}
			finally
			{
				((Component)this).Dispose(disposing);
			}
		}

		internal bool PromptUser(string text, MessageBoxButtons buttons, MessageBoxIcon icon)
		{
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Invalid comparison between Unknown and I4
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			string text2 = ((!string.IsNullOrEmpty(_title)) ? _title : ((this is VistaOpenFileDialog) ? ComDlgResources.LoadString(ComDlgResources.ComDlgResourceId.Open) : ComDlgResources.LoadString(ComDlgResources.ComDlgResourceId.ConfirmSaveAs)));
			IWin32Window val = (IWin32Window)(object)((_hwndOwner == IntPtr.Zero) ? null : new WindowHandleWrapper(_hwndOwner));
			MessageBoxOptions val2 = (MessageBoxOptions)0;
			if (Thread.CurrentThread.CurrentUICulture.TextInfo.IsRightToLeft)
			{
				val2 = (MessageBoxOptions)(val2 | 0x180000);
			}
			return (int)MessageBox.Show(val, text, text2, buttons, icon, (MessageBoxDefaultButton)0, val2) == 6;
		}

		internal virtual void SetDialogProperties(IFileDialog dialog)
		{
			dialog.Advise(new VistaFileDialogEvents(this), out var _);
			if (_fileNames != null && _fileNames.Length != 0 && !string.IsNullOrEmpty(_fileNames[0]))
			{
				string directoryName = Path.GetDirectoryName(_fileNames[0]);
				if (directoryName == null || !Directory.Exists(directoryName))
				{
					dialog.SetFileName(_fileNames[0]);
				}
				else
				{
					string fileName = Path.GetFileName(_fileNames[0]);
					dialog.SetFolder(NativeMethods.CreateItemFromParsingName(directoryName));
					dialog.SetFileName(fileName);
				}
			}
			if (!string.IsNullOrEmpty(_filter))
			{
				string[] array = _filter.Split(new char[1] { '|' });
				NativeMethods.COMDLG_FILTERSPEC[] array2 = new NativeMethods.COMDLG_FILTERSPEC[array.Length / 2];
				for (int i = 0; i < array.Length; i += 2)
				{
					array2[i / 2].pszName = array[i];
					array2[i / 2].pszSpec = array[i + 1];
				}
				dialog.SetFileTypes((uint)array2.Length, array2);
				if (_filterIndex > 0 && _filterIndex <= array2.Length)
				{
					dialog.SetFileTypeIndex((uint)_filterIndex);
				}
			}
			if (_addExtension && !string.IsNullOrEmpty(_defaultExt))
			{
				dialog.SetDefaultExtension(_defaultExt);
			}
			if (!string.IsNullOrEmpty(_initialDirectory))
			{
				IShellItem defaultFolder = NativeMethods.CreateItemFromParsingName(_initialDirectory);
				dialog.SetDefaultFolder(defaultFolder);
			}
			if (_showHelp)
			{
				IFileDialogCustomize fileDialogCustomize = (IFileDialogCustomize)dialog;
				fileDialogCustomize.AddPushButton(16385, Resources.Help);
			}
			if (!string.IsNullOrEmpty(_title))
			{
				dialog.SetTitle(_title);
			}
			dialog.SetOptions(_options | NativeMethods.FOS.FOS_FORCEFILESYSTEM);
		}

		internal abstract IFileDialog CreateFileDialog();

		internal void DoHelpRequest()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Expected O, but got Unknown
			((CommonDialog)this).OnHelpRequest((EventArgs)new HelpEventArgs(Cursor.Position));
		}

		internal bool DoFileOk(IFileDialog dialog)
		{
			GetResult(dialog);
			CancelEventArgs cancelEventArgs = new CancelEventArgs();
			OnFileOk(cancelEventArgs);
			return !cancelEventArgs.Cancel;
		}

		private bool RunFileDialog(IntPtr hwndOwner)
		{
			_hwndOwner = hwndOwner;
			IFileDialog fileDialog = null;
			try
			{
				fileDialog = CreateFileDialog();
				SetDialogProperties(fileDialog);
				int num = fileDialog.Show(hwndOwner);
				if (num < 0)
				{
					if (num == -2147023673)
					{
						return false;
					}
					throw Marshal.GetExceptionForHR(num);
				}
				return true;
			}
			finally
			{
				_hwndOwner = IntPtr.Zero;
				if (fileDialog != null)
				{
					Marshal.FinalReleaseComObject(fileDialog);
				}
			}
		}

		private void DownlevelDialog_HelpRequest(object sender, EventArgs e)
		{
			((CommonDialog)this).OnHelpRequest(e);
		}

		private void DownlevelDialog_FileOk(object sender, CancelEventArgs e)
		{
			OnFileOk(e);
		}
	}
	[Description("Prompts the user to open a file.")]
	[ToolboxBitmap(typeof(OpenFileDialog), "OpenFileDialog.bmp")]
	public class VistaOpenFileDialog : VistaFileDialog
	{
		private const int _openDropDownId = 16386;

		private const int _openItemId = 16387;

		private const int _readOnlyItemId = 16388;

		private bool _showReadOnly;

		private bool _readOnlyChecked;

		[DefaultValue(true)]
		[Description("A value indicating whether the dialog box displays a warning if the user specifies a file name that does not exist.")]
		public override bool CheckFileExists
		{
			get
			{
				return base.CheckFileExists;
			}
			set
			{
				base.CheckFileExists = value;
			}
		}

		[Description("A value indicating whether the dialog box allows multiple files to be selected.")]
		[DefaultValue(false)]
		[Category("Behavior")]
		public bool Multiselect
		{
			get
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				if (base.DownlevelDialog != null)
				{
					return ((OpenFileDialog)base.DownlevelDialog).Multiselect;
				}
				return GetOption(NativeMethods.FOS.FOS_ALLOWMULTISELECT);
			}
			set
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				if (base.DownlevelDialog != null)
				{
					((OpenFileDialog)base.DownlevelDialog).Multiselect = value;
				}
				SetOption(NativeMethods.FOS.FOS_ALLOWMULTISELECT, value);
			}
		}

		[Description("A value indicating whether the dialog box contains a read-only check box.")]
		[Category("Behavior")]
		[DefaultValue(false)]
		public bool ShowReadOnly
		{
			get
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				if (base.DownlevelDialog != null)
				{
					return ((OpenFileDialog)base.DownlevelDialog).ShowReadOnly;
				}
				return _showReadOnly;
			}
			set
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				if (base.DownlevelDialog != null)
				{
					((OpenFileDialog)base.DownlevelDialog).ShowReadOnly = value;
				}
				else
				{
					_showReadOnly = value;
				}
			}
		}

		[DefaultValue(false)]
		[Category("Behavior")]
		[Description("A value indicating whether the read-only check box is selected.")]
		public bool ReadOnlyChecked
		{
			get
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				if (base.DownlevelDialog != null)
				{
					return ((OpenFileDialog)base.DownlevelDialog).ReadOnlyChecked;
				}
				return _readOnlyChecked;
			}
			set
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				if (base.DownlevelDialog != null)
				{
					((OpenFileDialog)base.DownlevelDialog).ReadOnlyChecked = value;
				}
				else
				{
					_readOnlyChecked = value;
				}
			}
		}

		public VistaOpenFileDialog()
			: this(forceDownlevel: false)
		{
		}

		public VistaOpenFileDialog(bool forceDownlevel)
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			if (forceDownlevel || !VistaFileDialog.IsVistaFileDialogSupported)
			{
				base.DownlevelDialog = (FileDialog)new OpenFileDialog();
			}
		}

		public override void Reset()
		{
			base.Reset();
			if (base.DownlevelDialog == null)
			{
				CheckFileExists = true;
				_showReadOnly = false;
				_readOnlyChecked = false;
			}
		}

		public Stream OpenFile()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			if (base.DownlevelDialog != null)
			{
				return ((OpenFileDialog)base.DownlevelDialog).OpenFile();
			}
			string fileName = base.FileName;
			if (string.IsNullOrEmpty(fileName))
			{
				throw new ArgumentNullException("FileName");
			}
			return new FileStream(fileName, FileMode.Open, FileAccess.Read);
		}

		internal override IFileDialog CreateFileDialog()
		{
			return (NativeFileOpenDialog)new FileOpenDialogRCW();
		}

		internal override void SetDialogProperties(IFileDialog dialog)
		{
			base.SetDialogProperties(dialog);
			if (_showReadOnly)
			{
				IFileDialogCustomize fileDialogCustomize = (IFileDialogCustomize)dialog;
				fileDialogCustomize.EnableOpenDropDown(16386);
				fileDialogCustomize.AddControlItem(16386, 16387, ComDlgResources.LoadString(ComDlgResources.ComDlgResourceId.OpenButton));
				fileDialogCustomize.AddControlItem(16386, 16388, ComDlgResources.LoadString(ComDlgResources.ComDlgResourceId.ReadOnly));
			}
		}

		internal override void GetResult(IFileDialog dialog)
		{
			if (Multiselect)
			{
				((IFileOpenDialog)dialog).GetResults(out var ppenum);
				ppenum.GetCount(out var pdwNumItems);
				string[] array = new string[pdwNumItems];
				for (uint num = 0u; num < pdwNumItems; num++)
				{
					ppenum.GetItemAt(num, out var ppsi);
					ppsi.GetDisplayName(NativeMethods.SIGDN.SIGDN_FILESYSPATH, out var ppszName);
					array[num] = ppszName;
				}
				base.FileNamesInternal = array;
			}
			else
			{
				base.FileNamesInternal = null;
			}
			if (ShowReadOnly)
			{
				IFileDialogCustomize fileDialogCustomize = (IFileDialogCustomize)dialog;
				fileDialogCustomize.GetSelectedControlItem(16386, out var pdwIDItem);
				_readOnlyChecked = pdwIDItem == 16388;
			}
			base.GetResult(dialog);
		}
	}
}
namespace Ookii.Dialogs.Interop
{
	internal class Win32Resources : IDisposable
	{
		private const int _bufferSize = 500;

		private SafeModuleHandle _moduleHandle;

		public Win32Resources(string module)
		{
			_moduleHandle = NativeMethods.LoadLibraryEx(module, IntPtr.Zero, NativeMethods.LoadLibraryExFlags.LoadLibraryAsDatafile);
			if (_moduleHandle.IsInvalid)
			{
				throw new Win32Exception(Marshal.GetLastWin32Error());
			}
		}

		public string LoadString(uint id)
		{
			CheckDisposed();
			StringBuilder stringBuilder = new StringBuilder(500);
			if (NativeMethods.LoadString(_moduleHandle, id, stringBuilder, stringBuilder.Capacity + 1) == 0)
			{
				throw new Win32Exception(Marshal.GetLastWin32Error());
			}
			return stringBuilder.ToString();
		}

		public string FormatString(uint id, params string[] args)
		{
			CheckDisposed();
			IntPtr lpBuffer = IntPtr.Zero;
			string s = LoadString(id);
			NativeMethods.FormatMessageFlags dwFlags = NativeMethods.FormatMessageFlags.FORMAT_MESSAGE_ALLOCATE_BUFFER | NativeMethods.FormatMessageFlags.FORMAT_MESSAGE_FROM_STRING | NativeMethods.FormatMessageFlags.FORMAT_MESSAGE_ARGUMENT_ARRAY;
			IntPtr intPtr = Marshal.StringToHGlobalAuto(s);
			try
			{
				if (NativeMethods.FormatMessage(dwFlags, intPtr, id, 0u, ref lpBuffer, 0u, args) == 0)
				{
					throw new Win32Exception(Marshal.GetLastWin32Error());
				}
			}
			finally
			{
				Marshal.FreeHGlobal(intPtr);
			}
			string result = Marshal.PtrToStringAuto(lpBuffer);
			Marshal.FreeHGlobal(lpBuffer);
			return result;
		}

		protected virtual void Dispose(bool disposing)
		{
			if (disposing)
			{
				_moduleHandle.Dispose();
			}
		}

		private void CheckDisposed()
		{
			if (_moduleHandle.IsClosed)
			{
				throw new ObjectDisposedException("Win32Resources");
			}
		}

		public void Dispose()
		{
			Dispose(disposing: true);
			GC.SuppressFinalize(this);
		}
	}
}
namespace Ookii.Dialogs
{
	[DefaultProperty("MainInstruction")]
	[DefaultEvent("ButtonClicked")]
	[Description("A dialog that allows the user to input a single text value.")]
	public class InputDialog : Component, IBindableComponent, IComponent, IDisposable
	{
		private string _mainInstruction;

		private string _content;

		private string _windowTitle;

		private string _input;

		private int _maxLength = 32767;

		private bool _usePasswordMasking;

		private BindingContext _context;

		private ControlBindingsCollection _bindings;

		private IContainer components;

		[DefaultValue("")]
		[Localizable(true)]
		[Category("Appearance")]
		[Description("The dialog's main instruction.")]
		[Editor(typeof(MultilineStringEditor), typeof(UITypeEditor))]
		public string MainInstruction
		{
			get
			{
				return _mainInstruction ?? string.Empty;
			}
			set
			{
				_mainInstruction = (string.IsNullOrEmpty(value) ? null : value);
			}
		}

		[Localizable(true)]
		[Description("The dialog's primary content.")]
		[Editor(typeof(MultilineStringEditor), typeof(UITypeEditor))]
		[Category("Appearance")]
		[DefaultValue("")]
		public string Content
		{
			get
			{
				return _content ?? string.Empty;
			}
			set
			{
				_content = (string.IsNullOrEmpty(value) ? null : value);
			}
		}

		[Description("The window title of the task dialog.")]
		[Localizable(true)]
		[Category("Appearance")]
		[DefaultValue("")]
		public string WindowTitle
		{
			get
			{
				return _windowTitle ?? string.Empty;
			}
			set
			{
				_windowTitle = (string.IsNullOrEmpty(value) ? null : value);
			}
		}

		[Localizable(true)]
		[Category("Appearance")]
		[Description("The text specified by the user.")]
		[DefaultValue("")]
		public string Input
		{
			get
			{
				return _input ?? string.Empty;
			}
			set
			{
				_input = (value = (string.IsNullOrEmpty(value) ? null : value));
				OnInputChanged(EventArgs.Empty);
			}
		}

		[Category("Behavior")]
		[DefaultValue(32767)]
		[Localizable(true)]
		[Description("The maximum number of characters that can be entered into the input field of the dialog.")]
		public int MaxLength
		{
			get
			{
				return _maxLength;
			}
			set
			{
				_maxLength = value;
			}
		}

		[Description("Indicates whether the input will be masked using the system password character.")]
		[DefaultValue(false)]
		[Category("Behavior")]
		public bool UsePasswordMasking
		{
			get
			{
				return _usePasswordMasking;
			}
			set
			{
				_usePasswordMasking = value;
			}
		}

		[SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
		[Browsable(false)]
		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		[EditorBrowsable(EditorBrowsableState.Advanced)]
		public BindingContext BindingContext
		{
			get
			{
				//IL_000b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0010: Unknown result type (might be due to invalid IL or missing references)
				//IL_0012: Expected O, but got Unknown
				//IL_0017: Expected O, but got Unknown
				BindingContext obj = _context;
				if (obj == null)
				{
					BindingContext val = new BindingContext();
					BindingContext val2 = val;
					_context = val;
					obj = val2;
				}
				return obj;
			}
			set
			{
				_context = value;
			}
		}

		[RefreshProperties(RefreshProperties.All)]
		[ParenthesizePropertyName(true)]
		[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
		[Category("Data")]
		public ControlBindingsCollection DataBindings
		{
			get
			{
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0011: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Expected O, but got Unknown
				//IL_0018: Expected O, but got Unknown
				ControlBindingsCollection obj = _bindings;
				if (obj == null)
				{
					ControlBindingsCollection val = new ControlBindingsCollection((IBindableComponent)(object)this);
					ControlBindingsCollection val2 = val;
					_bindings = val;
					obj = val2;
				}
				return obj;
			}
		}

		[Category("Property Changed")]
		[Description("Event raised when the value of the Input property changes.")]
		public event EventHandler InputChanged;

		[Description("Event raised when the user clicks the OK button on the dialog.")]
		[Category("Action")]
		public event EventHandler<OkButtonClickedEventArgs> OkButtonClicked;

		public InputDialog()
		{
			InitializeComponent();
		}

		public InputDialog(IContainer container)
		{
			container?.Ad

Room Architect Tool_Data/Managed/System.ComponentModel.Composition.dll

Decompiled 3 months ago
using System;
using System.CodeDom.Compiler;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.Composition;
using System.ComponentModel.Composition.AttributedModel;
using System.ComponentModel.Composition.Diagnostics;
using System.ComponentModel.Composition.Hosting;
using System.ComponentModel.Composition.Primitives;
using System.ComponentModel.Composition.ReflectionModel;
using System.Diagnostics;
using System.Diagnostics.Contracts;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Reflection.Emit;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Security;
using System.Text;
using System.Threading;
using Microsoft.Internal;
using Microsoft.Internal.Collections;
using Microsoft.Internal.Runtime.Serialization;
using Unity;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("System.ComponentModel.Composition.dll")]
[assembly: AssemblyDescription("System.ComponentModel.Composition.dll")]
[assembly: AssemblyDefaultAlias("System.ComponentModel.Composition.dll")]
[assembly: AssemblyCompany("Mono development team")]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: SatelliteContractVersion("4.0.0.0")]
[assembly: AssemblyInformationalVersion("4.6.57.0")]
[assembly: AssemblyFileVersion("4.6.57.0")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: CLSCompliant(true)]
[assembly: AssemblyDelaySign(true)]
[assembly: SecurityCritical]
[assembly: AssemblyCopyright("(c) Microsoft Corporation. All rights reserved.")]
[assembly: AllowPartiallyTrustedCallers]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("4.0.0.0")]
internal static class Consts
{
	public const string MonoVersion = "5.11.0.0";

	public const string MonoCompany = "Mono development team";

	public const string MonoProduct = "Mono Common Language Infrastructure";

	public const string MonoCopyright = "(c) Various Mono authors";

	public const int MonoCorlibVersion = 1051100001;

	public const string FxVersion = "4.0.0.0";

	public const string FxFileVersion = "4.6.57.0";

	public const string EnvironmentVersion = "4.0.30319.42000";

	public const string VsVersion = "0.0.0.0";

	public const string VsFileVersion = "11.0.0.0";

	private const string PublicKeyToken = "b77a5c561934e089";

	public const string AssemblyI18N = "I18N, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMicrosoft_JScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMono_Http = "Mono.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Posix = "Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Security = "Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Messaging_RabbitMQ = "Mono.Messaging.RabbitMQ, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyCorlib = "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Data = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Design = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing_Design = "System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Messaging = "System.Messaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Security = "System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Web = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Core = "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string WindowsBase_3_0 = "WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
namespace Microsoft.Internal
{
	internal static class Assumes
	{
		[Serializable]
		private class InternalErrorException : Exception
		{
			public InternalErrorException(string message)
				: base(string.Format(CultureInfo.CurrentCulture, Strings.InternalExceptionMessage, message))
			{
			}

			[SecuritySafeCritical]
			protected InternalErrorException(SerializationInfo info, StreamingContext context)
				: base(info, context)
			{
			}
		}

		[DebuggerStepThrough]
		internal static void NotNull<T>(T value) where T : class
		{
			IsTrue(value != null);
		}

		[DebuggerStepThrough]
		internal static void NotNull<T1, T2>(T1 value1, T2 value2) where T1 : class where T2 : class
		{
			NotNull(value1);
			NotNull(value2);
		}

		[DebuggerStepThrough]
		internal static void NotNull<T1, T2, T3>(T1 value1, T2 value2, T3 value3) where T1 : class where T2 : class where T3 : class
		{
			NotNull(value1);
			NotNull(value2);
			NotNull(value3);
		}

		[DebuggerStepThrough]
		internal static void NotNullOrEmpty(string value)
		{
			NotNull(value);
			IsTrue(value.Length > 0);
		}

		[DebuggerStepThrough]
		internal static void IsTrue(bool condition)
		{
			if (!condition)
			{
				throw UncatchableException(null);
			}
		}

		[DebuggerStepThrough]
		internal static void IsTrue(bool condition, string message)
		{
			if (!condition)
			{
				throw UncatchableException(message);
			}
		}

		[DebuggerStepThrough]
		internal static T NotReachable<T>()
		{
			throw UncatchableException("Code path should never be reached!");
		}

		[DebuggerStepThrough]
		private static Exception UncatchableException(string message)
		{
			return new InternalErrorException(message);
		}
	}
	internal static class AttributeServices
	{
		public static T[] GetAttributes<T>(this ICustomAttributeProvider attributeProvider) where T : class
		{
			return (T[])attributeProvider.GetCustomAttributes(typeof(T), inherit: false);
		}

		public static T[] GetAttributes<T>(this ICustomAttributeProvider attributeProvider, bool inherit) where T : class
		{
			return (T[])attributeProvider.GetCustomAttributes(typeof(T), inherit);
		}

		public static T GetFirstAttribute<T>(this ICustomAttributeProvider attributeProvider) where T : class
		{
			return attributeProvider.GetAttributes<T>().FirstOrDefault();
		}

		public static T GetFirstAttribute<T>(this ICustomAttributeProvider attributeProvider, bool inherit) where T : class
		{
			return attributeProvider.GetAttributes<T>(inherit).FirstOrDefault();
		}

		public static bool IsAttributeDefined<T>(this ICustomAttributeProvider attributeProvider) where T : class
		{
			return attributeProvider.IsDefined(typeof(T), inherit: false);
		}

		public static bool IsAttributeDefined<T>(this ICustomAttributeProvider attributeProvider, bool inherit) where T : class
		{
			return attributeProvider.IsDefined(typeof(T), inherit);
		}
	}
	internal static class ContractServices
	{
		public static bool TryCast(Type contractType, object value, out object result)
		{
			if (value == null)
			{
				result = null;
				return true;
			}
			if (contractType.IsInstanceOfType(value))
			{
				result = value;
				return true;
			}
			if (typeof(Delegate).IsAssignableFrom(contractType) && value is ExportedDelegate exportedDelegate)
			{
				result = exportedDelegate.CreateDelegate(contractType.UnderlyingSystemType);
				return result != null;
			}
			result = null;
			return false;
		}
	}
	internal static class GenerationServices
	{
		private static readonly MethodInfo _typeGetTypeFromHandleMethod = typeof(Type).GetMethod("GetTypeFromHandle");

		private static readonly Type TypeType = typeof(Type);

		private static readonly Type StringType = typeof(string);

		private static readonly Type CharType = typeof(char);

		private static readonly Type BooleanType = typeof(bool);

		private static readonly Type ByteType = typeof(byte);

		private static readonly Type SByteType = typeof(sbyte);

		private static readonly Type Int16Type = typeof(short);

		private static readonly Type UInt16Type = typeof(ushort);

		private static readonly Type Int32Type = typeof(int);

		private static readonly Type UInt32Type = typeof(uint);

		private static readonly Type Int64Type = typeof(long);

		private static readonly Type UInt64Type = typeof(ulong);

		private static readonly Type DoubleType = typeof(double);

		private static readonly Type SingleType = typeof(float);

		private static readonly Type IEnumerableTypeofT = typeof(IEnumerable<>);

		private static readonly Type IEnumerableType = typeof(IEnumerable);

		private static readonly MethodInfo ExceptionGetData = typeof(Exception).GetProperty("Data").GetGetMethod();

		private static readonly MethodInfo DictionaryAdd = typeof(IDictionary).GetMethod("Add");

		private static readonly ConstructorInfo ObjectCtor = typeof(object).GetConstructor(Type.EmptyTypes);

		public static ILGenerator CreateGeneratorForPublicConstructor(this TypeBuilder typeBuilder, Type[] ctrArgumentTypes)
		{
			ILGenerator iLGenerator = typeBuilder.DefineConstructor(MethodAttributes.Public, CallingConventions.Standard, ctrArgumentTypes).GetILGenerator();
			iLGenerator.Emit(OpCodes.Ldarg_0);
			iLGenerator.Emit(OpCodes.Call, ObjectCtor);
			return iLGenerator;
		}

		public static void LoadValue(this ILGenerator ilGenerator, object value)
		{
			Assumes.NotNull(ilGenerator);
			if (value == null)
			{
				ilGenerator.LoadNull();
				return;
			}
			Type type = value.GetType();
			object obj = value;
			if (type.IsEnum)
			{
				obj = Convert.ChangeType(value, Enum.GetUnderlyingType(type), null);
				type = obj.GetType();
			}
			if (type == StringType)
			{
				ilGenerator.LoadString((string)obj);
				return;
			}
			if (TypeType.IsAssignableFrom(type))
			{
				ilGenerator.LoadTypeOf((Type)obj);
				return;
			}
			if (IEnumerableType.IsAssignableFrom(type))
			{
				ilGenerator.LoadEnumerable((IEnumerable)obj);
				return;
			}
			if (type == CharType || type == BooleanType || type == ByteType || type == SByteType || type == Int16Type || type == UInt16Type || type == Int32Type)
			{
				ilGenerator.LoadInt((int)Convert.ChangeType(obj, typeof(int), CultureInfo.InvariantCulture));
				return;
			}
			if (type == UInt32Type)
			{
				ilGenerator.LoadInt((int)(uint)obj);
				return;
			}
			if (type == Int64Type)
			{
				ilGenerator.LoadLong((long)obj);
				return;
			}
			if (type == UInt64Type)
			{
				ilGenerator.LoadLong((long)(ulong)obj);
				return;
			}
			if (type == SingleType)
			{
				ilGenerator.LoadFloat((float)obj);
				return;
			}
			if (type == DoubleType)
			{
				ilGenerator.LoadDouble((double)obj);
				return;
			}
			throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Strings.InvalidMetadataValue, value.GetType().FullName));
		}

		public static void AddItemToLocalDictionary(this ILGenerator ilGenerator, LocalBuilder dictionary, object key, object value)
		{
			Assumes.NotNull(ilGenerator);
			Assumes.NotNull(dictionary);
			Assumes.NotNull(key);
			Assumes.NotNull(value);
			ilGenerator.Emit(OpCodes.Ldloc, dictionary);
			ilGenerator.LoadValue(key);
			ilGenerator.LoadValue(value);
			ilGenerator.Emit(OpCodes.Callvirt, DictionaryAdd);
		}

		public static void AddLocalToLocalDictionary(this ILGenerator ilGenerator, LocalBuilder dictionary, object key, LocalBuilder value)
		{
			Assumes.NotNull(ilGenerator);
			Assumes.NotNull(dictionary);
			Assumes.NotNull(key);
			Assumes.NotNull(value);
			ilGenerator.Emit(OpCodes.Ldloc, dictionary);
			ilGenerator.LoadValue(key);
			ilGenerator.Emit(OpCodes.Ldloc, value);
			ilGenerator.Emit(OpCodes.Callvirt, DictionaryAdd);
		}

		public static void GetExceptionDataAndStoreInLocal(this ILGenerator ilGenerator, LocalBuilder exception, LocalBuilder dataStore)
		{
			Assumes.NotNull(ilGenerator);
			Assumes.NotNull(exception);
			Assumes.NotNull(dataStore);
			ilGenerator.Emit(OpCodes.Ldloc, exception);
			ilGenerator.Emit(OpCodes.Callvirt, ExceptionGetData);
			ilGenerator.Emit(OpCodes.Stloc, dataStore);
		}

		private static void LoadEnumerable(this ILGenerator ilGenerator, IEnumerable enumerable)
		{
			Assumes.NotNull(ilGenerator);
			Assumes.NotNull(enumerable);
			Type type = null;
			Type targetClosedInterfaceType = null;
			type = ((!ReflectionServices.TryGetGenericInterfaceType(enumerable.GetType(), IEnumerableTypeofT, out targetClosedInterfaceType)) ? typeof(object) : targetClosedInterfaceType.GetGenericArguments()[0]);
			Type localType = type.MakeArrayType();
			LocalBuilder local = ilGenerator.DeclareLocal(localType);
			ilGenerator.LoadInt(enumerable.Cast<object>().Count());
			ilGenerator.Emit(OpCodes.Newarr, type);
			ilGenerator.Emit(OpCodes.Stloc, local);
			int num = 0;
			foreach (object item in enumerable)
			{
				ilGenerator.Emit(OpCodes.Ldloc, local);
				ilGenerator.LoadInt(num);
				ilGenerator.LoadValue(item);
				if (IsBoxingRequiredForValue(item) && !type.IsValueType)
				{
					ilGenerator.Emit(OpCodes.Box, item.GetType());
				}
				ilGenerator.Emit(OpCodes.Stelem, type);
				num++;
			}
			ilGenerator.Emit(OpCodes.Ldloc, local);
		}

		private static bool IsBoxingRequiredForValue(object value)
		{
			return value?.GetType().IsValueType ?? false;
		}

		private static void LoadNull(this ILGenerator ilGenerator)
		{
			ilGenerator.Emit(OpCodes.Ldnull);
		}

		private static void LoadString(this ILGenerator ilGenerator, string s)
		{
			Assumes.NotNull(ilGenerator);
			if (s == null)
			{
				ilGenerator.LoadNull();
			}
			else
			{
				ilGenerator.Emit(OpCodes.Ldstr, s);
			}
		}

		private static void LoadInt(this ILGenerator ilGenerator, int value)
		{
			Assumes.NotNull(ilGenerator);
			ilGenerator.Emit(OpCodes.Ldc_I4, value);
		}

		private static void LoadLong(this ILGenerator ilGenerator, long value)
		{
			Assumes.NotNull(ilGenerator);
			ilGenerator.Emit(OpCodes.Ldc_I8, value);
		}

		private static void LoadFloat(this ILGenerator ilGenerator, float value)
		{
			Assumes.NotNull(ilGenerator);
			ilGenerator.Emit(OpCodes.Ldc_R4, value);
		}

		private static void LoadDouble(this ILGenerator ilGenerator, double value)
		{
			Assumes.NotNull(ilGenerator);
			ilGenerator.Emit(OpCodes.Ldc_R8, value);
		}

		private static void LoadTypeOf(this ILGenerator ilGenerator, Type type)
		{
			Assumes.NotNull(ilGenerator);
			ilGenerator.Emit(OpCodes.Ldtoken, type);
			ilGenerator.EmitCall(OpCodes.Call, _typeGetTypeFromHandleMethod, null);
		}
	}
	internal static class LazyServices
	{
		public static T GetNotNullValue<T>(this Lazy<T> lazy, string argument) where T : class
		{
			Assumes.NotNull(lazy);
			return lazy.Value ?? throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Strings.LazyServices_LazyResolvesToNull, typeof(T), argument));
		}
	}
	internal struct ReadLock : IDisposable
	{
		private readonly Lock _lock;

		private int _isDisposed;

		public ReadLock(Lock @lock)
		{
			_isDisposed = 0;
			_lock = @lock;
			_lock.EnterReadLock();
		}

		public void Dispose()
		{
			if (Interlocked.CompareExchange(ref _isDisposed, 1, 0) == 0)
			{
				_lock.ExitReadLock();
			}
		}
	}
	internal struct WriteLock : IDisposable
	{
		private readonly Lock _lock;

		private int _isDisposed;

		public WriteLock(Lock @lock)
		{
			_isDisposed = 0;
			_lock = @lock;
			_lock.EnterWriteLock();
		}

		public void Dispose()
		{
			if (Interlocked.CompareExchange(ref _isDisposed, 1, 0) == 0)
			{
				_lock.ExitWriteLock();
			}
		}
	}
	internal sealed class Lock : IDisposable
	{
		private ReaderWriterLockSlim _thisLock = new ReaderWriterLockSlim(LockRecursionPolicy.NoRecursion);

		private int _isDisposed;

		public void EnterReadLock()
		{
			_thisLock.EnterReadLock();
		}

		public void EnterWriteLock()
		{
			_thisLock.EnterWriteLock();
		}

		public void ExitReadLock()
		{
			_thisLock.ExitReadLock();
		}

		public void ExitWriteLock()
		{
			_thisLock.ExitWriteLock();
		}

		public void Dispose()
		{
			if (Interlocked.CompareExchange(ref _isDisposed, 1, 0) == 0)
			{
				_thisLock.Dispose();
			}
		}
	}
	internal static class ReflectionInvoke
	{
		public static object SafeCreateInstance(this Type type, params object[] arguments)
		{
			DemandMemberAccessIfNeeded(type);
			return Activator.CreateInstance(type, arguments);
		}

		public static object SafeInvoke(this ConstructorInfo constructor, params object[] arguments)
		{
			DemandMemberAccessIfNeeded(constructor);
			return constructor.Invoke(arguments);
		}

		public static object SafeInvoke(this MethodInfo method, object instance, params object[] arguments)
		{
			DemandMemberAccessIfNeeded(method);
			return method.Invoke(instance, arguments);
		}

		public static object SafeGetValue(this FieldInfo field, object instance)
		{
			DemandMemberAccessIfNeeded(field);
			return field.GetValue(instance);
		}

		public static void SafeSetValue(this FieldInfo field, object instance, object value)
		{
			DemandMemberAccessIfNeeded(field);
			field.SetValue(instance, value);
		}

		public static void DemandMemberAccessIfNeeded(MethodInfo method)
		{
		}

		private static void DemandMemberAccessIfNeeded(ConstructorInfo constructor)
		{
		}

		private static void DemandMemberAccessIfNeeded(FieldInfo field)
		{
		}

		public static void DemandMemberAccessIfNeeded(Type type)
		{
		}
	}
	internal static class ReflectionServices
	{
		public static Assembly Assembly(this MemberInfo member)
		{
			Type type = member as Type;
			if (type != null)
			{
				return type.Assembly;
			}
			return member.DeclaringType.Assembly;
		}

		public static bool IsVisible(this ConstructorInfo constructor)
		{
			if (constructor.DeclaringType.IsVisible)
			{
				return constructor.IsPublic;
			}
			return false;
		}

		public static bool IsVisible(this FieldInfo field)
		{
			if (field.DeclaringType.IsVisible)
			{
				return field.IsPublic;
			}
			return false;
		}

		public static bool IsVisible(this MethodInfo method)
		{
			if (!method.DeclaringType.IsVisible)
			{
				return false;
			}
			if (!method.IsPublic)
			{
				return false;
			}
			if (method.IsGenericMethod)
			{
				Type[] genericArguments = method.GetGenericArguments();
				for (int i = 0; i < genericArguments.Length; i++)
				{
					if (!genericArguments[i].IsVisible)
					{
						return false;
					}
				}
			}
			return true;
		}

		public static string GetDisplayName(Type declaringType, string name)
		{
			Assumes.NotNull(declaringType);
			return declaringType.GetDisplayName() + "." + name;
		}

		public static string GetDisplayName(this MemberInfo member)
		{
			Assumes.NotNull(member);
			MemberTypes memberType = member.MemberType;
			if (memberType == MemberTypes.TypeInfo || memberType == MemberTypes.NestedType)
			{
				return AttributedModelServices.GetTypeIdentity((Type)member);
			}
			return GetDisplayName(member.DeclaringType, member.Name);
		}

		internal static bool TryGetGenericInterfaceType(Type instanceType, Type targetOpenInterfaceType, out Type targetClosedInterfaceType)
		{
			Assumes.IsTrue(targetOpenInterfaceType.IsInterface);
			Assumes.IsTrue(targetOpenInterfaceType.IsGenericTypeDefinition);
			Assumes.IsTrue(!instanceType.IsGenericTypeDefinition);
			if (instanceType.IsInterface && instanceType.IsGenericType && instanceType.UnderlyingSystemType.GetGenericTypeDefinition() == targetOpenInterfaceType.UnderlyingSystemType)
			{
				targetClosedInterfaceType = instanceType;
				return true;
			}
			try
			{
				Type @interface = instanceType.GetInterface(targetOpenInterfaceType.Name, ignoreCase: false);
				if (@interface != null && @interface.UnderlyingSystemType.GetGenericTypeDefinition() == targetOpenInterfaceType.UnderlyingSystemType)
				{
					targetClosedInterfaceType = @interface;
					return true;
				}
			}
			catch (AmbiguousMatchException)
			{
			}
			targetClosedInterfaceType = null;
			return false;
		}

		internal static IEnumerable<PropertyInfo> GetAllProperties(this Type type)
		{
			return type.GetInterfaces().Concat(new Type[1] { type }).SelectMany((Type itf) => itf.GetProperties());
		}

		internal static IEnumerable<MethodInfo> GetAllMethods(this Type type)
		{
			IEnumerable<MethodInfo> declaredMethods = type.GetDeclaredMethods();
			Type baseType = type.BaseType;
			if (baseType.UnderlyingSystemType != typeof(object))
			{
				return declaredMethods.Concat(baseType.GetAllMethods());
			}
			return declaredMethods;
		}

		private static IEnumerable<MethodInfo> GetDeclaredMethods(this Type type)
		{
			MethodInfo[] methods = type.GetMethods(BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
			for (int i = 0; i < methods.Length; i++)
			{
				yield return methods[i];
			}
		}

		public static IEnumerable<FieldInfo> GetAllFields(this Type type)
		{
			IEnumerable<FieldInfo> declaredFields = type.GetDeclaredFields();
			Type baseType = type.BaseType;
			if (baseType.UnderlyingSystemType != typeof(object))
			{
				return declaredFields.Concat(baseType.GetAllFields());
			}
			return declaredFields;
		}

		private static IEnumerable<FieldInfo> GetDeclaredFields(this Type type)
		{
			FieldInfo[] fields = type.GetFields(BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
			for (int i = 0; i < fields.Length; i++)
			{
				yield return fields[i];
			}
		}
	}
	internal static class Requires
	{
		[DebuggerStepThrough]
		public static void NotNull<T>(T value, string parameterName) where T : class
		{
			if (value == null)
			{
				throw new ArgumentNullException(parameterName);
			}
		}

		[DebuggerStepThrough]
		public static void NotNullOrEmpty(string value, string parameterName)
		{
			NotNull(value, parameterName);
			if (value.Length == 0)
			{
				throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Strings.ArgumentException_EmptyString, parameterName), parameterName);
			}
		}

		[DebuggerStepThrough]
		public static void NotNullOrNullElements<T>(IEnumerable<T> values, string parameterName) where T : class
		{
			NotNull(values, parameterName);
			NotNullElements(values, parameterName);
		}

		[DebuggerStepThrough]
		public static void NullOrNotNullElements<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> values, string parameterName) where TKey : class where TValue : class
		{
			NotNullElements(values, parameterName);
		}

		[DebuggerStepThrough]
		public static void NullOrNotNullElements<T>(IEnumerable<T> values, string parameterName) where T : class
		{
			NotNullElements(values, parameterName);
		}

		private static void NotNullElements<T>(IEnumerable<T> values, string parameterName) where T : class
		{
			if (values != null && !Contract.ForAll(values, (T value) => value != null))
			{
				throw ExceptionBuilder.CreateContainsNullElement(parameterName);
			}
		}

		private static void NotNullElements<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> values, string parameterName) where TKey : class where TValue : class
		{
			if (values != null && !Contract.ForAll(values, (KeyValuePair<TKey, TValue> keyValue) => keyValue.Key != null && keyValue.Value != null))
			{
				throw ExceptionBuilder.CreateContainsNullElement(parameterName);
			}
		}

		[DebuggerStepThrough]
		public static void IsInMembertypeSet(MemberTypes value, string parameterName, MemberTypes enumFlagSet)
		{
			if ((value & enumFlagSet) != value || (value & (value - 1)) != 0)
			{
				throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Strings.ArgumentOutOfRange_InvalidEnumInSet, parameterName, value, enumFlagSet.ToString()), parameterName);
			}
		}
	}
	internal static class StringComparers
	{
		public static StringComparer ContractName => StringComparer.Ordinal;

		public static StringComparer MetadataKeyNames => StringComparer.Ordinal;
	}
	[GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
	[DebuggerNonUserCode]
	[CompilerGenerated]
	internal class Strings
	{
		private static ResourceManager resourceMan;

		private static CultureInfo resourceCulture;

		[EditorBrowsable(EditorBrowsableState.Advanced)]
		internal static ResourceManager ResourceManager
		{
			get
			{
				if (resourceMan == null)
				{
					resourceMan = new ResourceManager("Microsoft.Internal.Strings", typeof(Strings).Assembly);
				}
				return resourceMan;
			}
		}

		[EditorBrowsable(EditorBrowsableState.Advanced)]
		internal static CultureInfo Culture
		{
			get
			{
				return resourceCulture;
			}
			set
			{
				resourceCulture = value;
			}
		}

		internal static string Argument_AssemblyReflectionOnly => ResourceManager.GetString("Argument_AssemblyReflectionOnly", resourceCulture);

		internal static string Argument_ElementReflectionOnlyType => ResourceManager.GetString("Argument_ElementReflectionOnlyType", resourceCulture);

		internal static string Argument_ExportsEmpty => ResourceManager.GetString("Argument_ExportsEmpty", resourceCulture);

		internal static string Argument_ExportsTooMany => ResourceManager.GetString("Argument_ExportsTooMany", resourceCulture);

		internal static string Argument_NullElement => ResourceManager.GetString("Argument_NullElement", resourceCulture);

		internal static string Argument_ReflectionContextReturnsReflectionOnlyType => ResourceManager.GetString("Argument_ReflectionContextReturnsReflectionOnlyType", resourceCulture);

		internal static string ArgumentException_EmptyString => ResourceManager.GetString("ArgumentException_EmptyString", resourceCulture);

		internal static string ArgumentOutOfRange_InvalidEnum => ResourceManager.GetString("ArgumentOutOfRange_InvalidEnum", resourceCulture);

		internal static string ArgumentOutOfRange_InvalidEnumInSet => ResourceManager.GetString("ArgumentOutOfRange_InvalidEnumInSet", resourceCulture);

		internal static string ArgumentValueType => ResourceManager.GetString("ArgumentValueType", resourceCulture);

		internal static string AssemblyFileNotFoundOrWrongType => ResourceManager.GetString("AssemblyFileNotFoundOrWrongType", resourceCulture);

		internal static string AtomicComposition_AlreadyCompleted => ResourceManager.GetString("AtomicComposition_AlreadyCompleted", resourceCulture);

		internal static string AtomicComposition_AlreadyNested => ResourceManager.GetString("AtomicComposition_AlreadyNested", resourceCulture);

		internal static string AtomicComposition_PartOfAnotherAtomicComposition => ResourceManager.GetString("AtomicComposition_PartOfAnotherAtomicComposition", resourceCulture);

		internal static string CardinalityMismatch_NoExports => ResourceManager.GetString("CardinalityMismatch_NoExports", resourceCulture);

		internal static string CardinalityMismatch_TooManyExports => ResourceManager.GetString("CardinalityMismatch_TooManyExports", resourceCulture);

		internal static string CatalogMutation_Invalid => ResourceManager.GetString("CatalogMutation_Invalid", resourceCulture);

		internal static string CompositionElement_UnknownOrigin => ResourceManager.GetString("CompositionElement_UnknownOrigin", resourceCulture);

		internal static string CompositionException_ChangesRejected => ResourceManager.GetString("CompositionException_ChangesRejected", resourceCulture);

		internal static string CompositionException_ElementPrefix => ResourceManager.GetString("CompositionException_ElementPrefix", resourceCulture);

		internal static string CompositionException_ErrorPrefix => ResourceManager.GetString("CompositionException_ErrorPrefix", resourceCulture);

		internal static string CompositionException_MetadataViewInvalidConstructor => ResourceManager.GetString("CompositionException_MetadataViewInvalidConstructor", resourceCulture);

		internal static string CompositionException_MultipleErrorsWithMultiplePaths => ResourceManager.GetString("CompositionException_MultipleErrorsWithMultiplePaths", resourceCulture);

		internal static string CompositionException_OriginFormat => ResourceManager.GetString("CompositionException_OriginFormat", resourceCulture);

		internal static string CompositionException_OriginSeparator => ResourceManager.GetString("CompositionException_OriginSeparator", resourceCulture);

		internal static string CompositionException_PathsCountSeparator => ResourceManager.GetString("CompositionException_PathsCountSeparator", resourceCulture);

		internal static string CompositionException_ReviewErrorProperty => ResourceManager.GetString("CompositionException_ReviewErrorProperty", resourceCulture);

		internal static string CompositionException_SingleErrorWithMultiplePaths => ResourceManager.GetString("CompositionException_SingleErrorWithMultiplePaths", resourceCulture);

		internal static string CompositionException_SingleErrorWithSinglePath => ResourceManager.GetString("CompositionException_SingleErrorWithSinglePath", resourceCulture);

		internal static string CompositionTrace_Discovery_AssemblyLoadFailed => ResourceManager.GetString("CompositionTrace_Discovery_AssemblyLoadFailed", resourceCulture);

		internal static string CompositionTrace_Discovery_DefinitionContainsNoExports => ResourceManager.GetString("CompositionTrace_Discovery_DefinitionContainsNoExports", resourceCulture);

		internal static string CompositionTrace_Discovery_DefinitionMarkedWithPartNotDiscoverableAttribute => ResourceManager.GetString("CompositionTrace_Discovery_DefinitionMarkedWithPartNotDiscoverableAttribute", resourceCulture);

		internal static string CompositionTrace_Discovery_DefinitionMismatchedExportArity => ResourceManager.GetString("CompositionTrace_Discovery_DefinitionMismatchedExportArity", resourceCulture);

		internal static string CompositionTrace_Discovery_MemberMarkedWithMultipleImportAndImportMany => ResourceManager.GetString("CompositionTrace_Discovery_MemberMarkedWithMultipleImportAndImportMany", resourceCulture);

		internal static string CompositionTrace_Rejection_DefinitionRejected => ResourceManager.GetString("CompositionTrace_Rejection_DefinitionRejected", resourceCulture);

		internal static string CompositionTrace_Rejection_DefinitionResurrected => ResourceManager.GetString("CompositionTrace_Rejection_DefinitionResurrected", resourceCulture);

		internal static string ContractMismatch_ExportedValueCannotBeCastToT => ResourceManager.GetString("ContractMismatch_ExportedValueCannotBeCastToT", resourceCulture);

		internal static string ContractMismatch_InvalidCastOnMetadataField => ResourceManager.GetString("ContractMismatch_InvalidCastOnMetadataField", resourceCulture);

		internal static string ContractMismatch_MetadataViewImplementationCanNotBeNull => ResourceManager.GetString("ContractMismatch_MetadataViewImplementationCanNotBeNull", resourceCulture);

		internal static string ContractMismatch_MetadataViewImplementationDoesNotImplementViewInterface => ResourceManager.GetString("ContractMismatch_MetadataViewImplementationDoesNotImplementViewInterface", resourceCulture);

		internal static string ContractMismatch_NullReferenceOnMetadataField => ResourceManager.GetString("ContractMismatch_NullReferenceOnMetadataField", resourceCulture);

		internal static string DirectoryNotFound => ResourceManager.GetString("DirectoryNotFound", resourceCulture);

		internal static string Discovery_DuplicateMetadataNameValues => ResourceManager.GetString("Discovery_DuplicateMetadataNameValues", resourceCulture);

		internal static string Discovery_MetadataContainsValueWithInvalidType => ResourceManager.GetString("Discovery_MetadataContainsValueWithInvalidType", resourceCulture);

		internal static string Discovery_ReservedMetadataNameUsed => ResourceManager.GetString("Discovery_ReservedMetadataNameUsed", resourceCulture);

		internal static string ExportDefinitionNotOnThisComposablePart => ResourceManager.GetString("ExportDefinitionNotOnThisComposablePart", resourceCulture);

		internal static string ExportFactory_TooManyGenericParameters => ResourceManager.GetString("ExportFactory_TooManyGenericParameters", resourceCulture);

		internal static string ExportNotValidOnIndexers => ResourceManager.GetString("ExportNotValidOnIndexers", resourceCulture);

		internal static string ImportDefinitionNotOnThisComposablePart => ResourceManager.GetString("ImportDefinitionNotOnThisComposablePart", resourceCulture);

		internal static string ImportEngine_ComposeTookTooManyIterations => ResourceManager.GetString("ImportEngine_ComposeTookTooManyIterations", resourceCulture);

		internal static string ImportEngine_InvalidStateForRecomposition => ResourceManager.GetString("ImportEngine_InvalidStateForRecomposition", resourceCulture);

		internal static string ImportEngine_PartCannotActivate => ResourceManager.GetString("ImportEngine_PartCannotActivate", resourceCulture);

		internal static string ImportEngine_PartCannotGetExportedValue => ResourceManager.GetString("ImportEngine_PartCannotGetExportedValue", resourceCulture);

		internal static string ImportEngine_PartCannotSetImport => ResourceManager.GetString("ImportEngine_PartCannotSetImport", resourceCulture);

		internal static string ImportEngine_PartCycle => ResourceManager.GetString("ImportEngine_PartCycle", resourceCulture);

		internal static string ImportEngine_PreventedByExistingImport => ResourceManager.GetString("ImportEngine_PreventedByExistingImport", resourceCulture);

		internal static string ImportNotSetOnPart => ResourceManager.GetString("ImportNotSetOnPart", resourceCulture);

		internal static string ImportNotValidOnIndexers => ResourceManager.GetString("ImportNotValidOnIndexers", resourceCulture);

		internal static string InternalExceptionMessage => ResourceManager.GetString("InternalExceptionMessage", resourceCulture);

		internal static string InvalidArgument_ReflectionContext => ResourceManager.GetString("InvalidArgument_ReflectionContext", resourceCulture);

		internal static string InvalidMetadataValue => ResourceManager.GetString("InvalidMetadataValue", resourceCulture);

		internal static string InvalidMetadataView => ResourceManager.GetString("InvalidMetadataView", resourceCulture);

		internal static string InvalidOperation_DefinitionCannotBeRecomposed => ResourceManager.GetString("InvalidOperation_DefinitionCannotBeRecomposed", resourceCulture);

		internal static string InvalidOperation_GetExportedValueBeforePrereqImportSet => ResourceManager.GetString("InvalidOperation_GetExportedValueBeforePrereqImportSet", resourceCulture);

		internal static string InvalidOperationReentrantCompose => ResourceManager.GetString("InvalidOperationReentrantCompose", resourceCulture);

		internal static string InvalidPartCreationPolicyOnImport => ResourceManager.GetString("InvalidPartCreationPolicyOnImport", resourceCulture);

		internal static string InvalidPartCreationPolicyOnPart => ResourceManager.GetString("InvalidPartCreationPolicyOnPart", resourceCulture);

		internal static string InvalidSetterOnMetadataField => ResourceManager.GetString("InvalidSetterOnMetadataField", resourceCulture);

		internal static string LazyMemberInfo_AccessorsNull => ResourceManager.GetString("LazyMemberInfo_AccessorsNull", resourceCulture);

		internal static string LazyMemberInfo_InvalidAccessorOnSimpleMember => ResourceManager.GetString("LazyMemberInfo_InvalidAccessorOnSimpleMember", resourceCulture);

		internal static string LazyMemberinfo_InvalidEventAccessors_AccessorType => ResourceManager.GetString("LazyMemberinfo_InvalidEventAccessors_AccessorType", resourceCulture);

		internal static string LazyMemberInfo_InvalidEventAccessors_Cardinality => ResourceManager.GetString("LazyMemberInfo_InvalidEventAccessors_Cardinality", resourceCulture);

		internal static string LazyMemberinfo_InvalidPropertyAccessors_AccessorType => ResourceManager.GetString("LazyMemberinfo_InvalidPropertyAccessors_AccessorType", resourceCulture);

		internal static string LazyMemberInfo_InvalidPropertyAccessors_Cardinality => ResourceManager.GetString("LazyMemberInfo_InvalidPropertyAccessors_Cardinality", resourceCulture);

		internal static string LazyMemberInfo_NoAccessors => ResourceManager.GetString("LazyMemberInfo_NoAccessors", resourceCulture);

		internal static string LazyServices_LazyResolvesToNull => ResourceManager.GetString("LazyServices_LazyResolvesToNull", resourceCulture);

		internal static string MetadataItemNotSupported => ResourceManager.GetString("MetadataItemNotSupported", resourceCulture);

		internal static string NotImplemented_NotOverriddenByDerived => ResourceManager.GetString("NotImplemented_NotOverriddenByDerived", resourceCulture);

		internal static string NotSupportedCatalogChanges => ResourceManager.GetString("NotSupportedCatalogChanges", resourceCulture);

		internal static string NotSupportedInterfaceMetadataView => ResourceManager.GetString("NotSupportedInterfaceMetadataView", resourceCulture);

		internal static string NotSupportedReadOnlyDictionary => ResourceManager.GetString("NotSupportedReadOnlyDictionary", resourceCulture);

		internal static string ObjectAlreadyInitialized => ResourceManager.GetString("ObjectAlreadyInitialized", resourceCulture);

		internal static string ObjectMustBeInitialized => ResourceManager.GetString("ObjectMustBeInitialized", resourceCulture);

		internal static string ReentrantCompose => ResourceManager.GetString("ReentrantCompose", resourceCulture);

		internal static string ReflectionContext_Requires_DefaultConstructor => ResourceManager.GetString("ReflectionContext_Requires_DefaultConstructor", resourceCulture);

		internal static string ReflectionContext_Type_Required => ResourceManager.GetString("ReflectionContext_Type_Required", resourceCulture);

		internal static string ReflectionModel_ExportNotReadable => ResourceManager.GetString("ReflectionModel_ExportNotReadable", resourceCulture);

		internal static string ReflectionModel_ExportThrewException => ResourceManager.GetString("ReflectionModel_ExportThrewException", resourceCulture);

		internal static string ReflectionModel_ImportCollectionAddThrewException => ResourceManager.GetString("ReflectionModel_ImportCollectionAddThrewException", resourceCulture);

		internal static string ReflectionModel_ImportCollectionClearThrewException => ResourceManager.GetString("ReflectionModel_ImportCollectionClearThrewException", resourceCulture);

		internal static string ReflectionModel_ImportCollectionConstructionThrewException => ResourceManager.GetString("ReflectionModel_ImportCollectionConstructionThrewException", resourceCulture);

		internal static string ReflectionModel_ImportCollectionGetThrewException => ResourceManager.GetString("ReflectionModel_ImportCollectionGetThrewException", resourceCulture);

		internal static string ReflectionModel_ImportCollectionIsReadOnlyThrewException => ResourceManager.GetString("ReflectionModel_ImportCollectionIsReadOnlyThrewException", resourceCulture);

		internal static string ReflectionModel_ImportCollectionNotWritable => ResourceManager.GetString("ReflectionModel_ImportCollectionNotWritable", resourceCulture);

		internal static string ReflectionModel_ImportCollectionNull => ResourceManager.GetString("ReflectionModel_ImportCollectionNull", resourceCulture);

		internal static string ReflectionModel_ImportManyOnParameterCanOnlyBeAssigned => ResourceManager.GetString("ReflectionModel_ImportManyOnParameterCanOnlyBeAssigned", resourceCulture);

		internal static string ReflectionModel_ImportNotAssignableFromExport => ResourceManager.GetString("ReflectionModel_ImportNotAssignableFromExport", resourceCulture);

		internal static string ReflectionModel_ImportNotWritable => ResourceManager.GetString("ReflectionModel_ImportNotWritable", resourceCulture);

		internal static string ReflectionModel_ImportThrewException => ResourceManager.GetString("ReflectionModel_ImportThrewException", resourceCulture);

		internal static string ReflectionModel_InvalidExportDefinition => ResourceManager.GetString("ReflectionModel_InvalidExportDefinition", resourceCulture);

		internal static string ReflectionModel_InvalidImportDefinition => ResourceManager.GetString("ReflectionModel_InvalidImportDefinition", resourceCulture);

		internal static string ReflectionModel_InvalidMemberImportDefinition => ResourceManager.GetString("ReflectionModel_InvalidMemberImportDefinition", resourceCulture);

		internal static string ReflectionModel_InvalidParameterImportDefinition => ResourceManager.GetString("ReflectionModel_InvalidParameterImportDefinition", resourceCulture);

		internal static string ReflectionModel_InvalidPartDefinition => ResourceManager.GetString("ReflectionModel_InvalidPartDefinition", resourceCulture);

		internal static string ReflectionModel_PartConstructorMissing => ResourceManager.GetString("ReflectionModel_PartConstructorMissing", resourceCulture);

		internal static string ReflectionModel_PartConstructorThrewException => ResourceManager.GetString("ReflectionModel_PartConstructorThrewException", resourceCulture);

		internal static string ReflectionModel_PartOnImportsSatisfiedThrewException => ResourceManager.GetString("ReflectionModel_PartOnImportsSatisfiedThrewException", resourceCulture);

		internal static string TypeCatalog_DisplayNameFormat => ResourceManager.GetString("TypeCatalog_DisplayNameFormat", resourceCulture);

		internal static string TypeCatalog_Empty => ResourceManager.GetString("TypeCatalog_Empty", resourceCulture);

		internal Strings()
		{
		}
	}
}
namespace Microsoft.Internal.Runtime.Serialization
{
	internal static class SerializationServices
	{
		public static T GetValue<T>(this SerializationInfo info, string name)
		{
			Assumes.NotNull(info, name);
			return (T)info.GetValue(name, typeof(T));
		}
	}
}
namespace Microsoft.Internal.Collections
{
	internal static class CollectionServices
	{
		private class CollectionOfObjectList : ICollection<object>, IEnumerable<object>, IEnumerable
		{
			private readonly IList _list;

			public int Count => Assumes.NotReachable<int>();

			public bool IsReadOnly => _list.IsReadOnly;

			public CollectionOfObjectList(IList list)
			{
				_list = list;
			}

			public void Add(object item)
			{
				_list.Add(item);
			}

			public void Clear()
			{
				_list.Clear();
			}

			public bool Contains(object item)
			{
				return Assumes.NotReachable<bool>();
			}

			public void CopyTo(object[] array, int arrayIndex)
			{
				Assumes.NotReachable<object>();
			}

			public bool Remove(object item)
			{
				return Assumes.NotReachable<bool>();
			}

			public IEnumerator<object> GetEnumerator()
			{
				return Assumes.NotReachable<IEnumerator<object>>();
			}

			IEnumerator IEnumerable.GetEnumerator()
			{
				return Assumes.NotReachable<IEnumerator>();
			}
		}

		private class CollectionOfObject<T> : ICollection<object>, IEnumerable<object>, IEnumerable
		{
			private readonly ICollection<T> _collectionOfT;

			public int Count => Assumes.NotReachable<int>();

			public bool IsReadOnly => _collectionOfT.IsReadOnly;

			public CollectionOfObject(object collectionOfT)
			{
				_collectionOfT = (ICollection<T>)collectionOfT;
			}

			public void Add(object item)
			{
				_collectionOfT.Add((T)item);
			}

			public void Clear()
			{
				_collectionOfT.Clear();
			}

			public bool Contains(object item)
			{
				return Assumes.NotReachable<bool>();
			}

			public void CopyTo(object[] array, int arrayIndex)
			{
				Assumes.NotReachable<object>();
			}

			public bool Remove(object item)
			{
				return Assumes.NotReachable<bool>();
			}

			public IEnumerator<object> GetEnumerator()
			{
				return Assumes.NotReachable<IEnumerator<object>>();
			}

			IEnumerator IEnumerable.GetEnumerator()
			{
				return Assumes.NotReachable<IEnumerator>();
			}
		}

		private static readonly Type StringType = typeof(string);

		private static readonly Type IEnumerableType = typeof(IEnumerable);

		private static readonly Type IEnumerableOfTType = typeof(IEnumerable<>);

		private static readonly Type ICollectionOfTType = typeof(ICollection<>);

		public static ICollection<object> GetCollectionWrapper(Type itemType, object collectionObject)
		{
			Assumes.NotNull(itemType, collectionObject);
			Type underlyingSystemType = itemType.UnderlyingSystemType;
			if (underlyingSystemType == typeof(object))
			{
				return (ICollection<object>)collectionObject;
			}
			if (typeof(IList).IsAssignableFrom(collectionObject.GetType()))
			{
				return new CollectionOfObjectList((IList)collectionObject);
			}
			return (ICollection<object>)Activator.CreateInstance(typeof(CollectionOfObject<>).MakeGenericType(underlyingSystemType), collectionObject);
		}

		public static bool IsEnumerableOfT(Type type)
		{
			if (type.IsGenericType && type.GetGenericTypeDefinition().UnderlyingSystemType == IEnumerableOfTType)
			{
				return true;
			}
			return false;
		}

		public static Type GetEnumerableElementType(Type type)
		{
			if (type.UnderlyingSystemType == StringType || !IEnumerableType.IsAssignableFrom(type))
			{
				return null;
			}
			if (ReflectionServices.TryGetGenericInterfaceType(type, IEnumerableOfTType, out var targetClosedInterfaceType))
			{
				return targetClosedInterfaceType.GetGenericArguments()[0];
			}
			return null;
		}

		public static Type GetCollectionElementType(Type type)
		{
			if (ReflectionServices.TryGetGenericInterfaceType(type, ICollectionOfTType, out var targetClosedInterfaceType))
			{
				return targetClosedInterfaceType.GetGenericArguments()[0];
			}
			return null;
		}

		public static ReadOnlyCollection<T> ToReadOnlyCollection<T>(this IEnumerable<T> source)
		{
			Assumes.NotNull(source);
			return new ReadOnlyCollection<T>(source.AsArray());
		}

		public static IEnumerable<T> ConcatAllowingNull<T>(this IEnumerable<T> source, IEnumerable<T> second)
		{
			if (second == null || !second.FastAny())
			{
				return source;
			}
			if (source == null || !source.FastAny())
			{
				return second;
			}
			return source.Concat(second);
		}

		public static ICollection<T> ConcatAllowingNull<T>(this ICollection<T> source, ICollection<T> second)
		{
			if (second == null || second.Count == 0)
			{
				return source;
			}
			if (source == null || source.Count == 0)
			{
				return second;
			}
			List<T> list = new List<T>(source);
			list.AddRange(second);
			return list;
		}

		public static List<T> FastAppendToListAllowNulls<T>(this List<T> source, IEnumerable<T> second)
		{
			if (second == null)
			{
				return source;
			}
			if (source == null || source.Count == 0)
			{
				return second.AsList();
			}
			if (second is List<T> list)
			{
				if (list.Count == 0)
				{
					return source;
				}
				if (list.Count == 1)
				{
					source.Add(list[0]);
					return source;
				}
			}
			source.AddRange(second);
			return source;
		}

		public static void ForEach<T>(this IEnumerable<T> source, Action<T> action)
		{
			foreach (T item in source)
			{
				action(item);
			}
		}

		public static EnumerableCardinality GetCardinality<T>(this IEnumerable<T> source)
		{
			Assumes.NotNull(source);
			if (source is ICollection collection)
			{
				return collection.Count switch
				{
					0 => EnumerableCardinality.Zero, 
					1 => EnumerableCardinality.One, 
					_ => EnumerableCardinality.TwoOrMore, 
				};
			}
			using IEnumerator<T> enumerator = source.GetEnumerator();
			if (!enumerator.MoveNext())
			{
				return EnumerableCardinality.Zero;
			}
			if (!enumerator.MoveNext())
			{
				return EnumerableCardinality.One;
			}
			return EnumerableCardinality.TwoOrMore;
		}

		public static bool FastAny<T>(this IEnumerable<T> source)
		{
			if (source is ICollection collection)
			{
				return collection.Count > 0;
			}
			return source.Any();
		}

		public static Stack<T> Copy<T>(this Stack<T> stack)
		{
			Assumes.NotNull(stack);
			return new Stack<T>(stack.Reverse());
		}

		public static T[] AsArray<T>(this IEnumerable<T> enumerable)
		{
			if (enumerable is T[] result)
			{
				return result;
			}
			return enumerable.ToArray();
		}

		public static List<T> AsList<T>(this IEnumerable<T> enumerable)
		{
			if (enumerable is List<T> result)
			{
				return result;
			}
			return enumerable.ToList();
		}

		public static bool IsArrayEqual<T>(this T[] thisArray, T[] thatArray)
		{
			if (thisArray.Length != thatArray.Length)
			{
				return false;
			}
			for (int i = 0; i < thisArray.Length; i++)
			{
				if (!thisArray[i].Equals(thatArray[i]))
				{
					return false;
				}
			}
			return true;
		}

		public static bool IsCollectionEqual<T>(this IList<T> thisList, IList<T> thatList)
		{
			if (thisList.Count != thatList.Count)
			{
				return false;
			}
			for (int i = 0; i < thisList.Count; i++)
			{
				if (!thisList[i].Equals(thatList[i]))
				{
					return false;
				}
			}
			return true;
		}
	}
	internal enum EnumerableCardinality
	{
		Zero,
		One,
		TwoOrMore
	}
	internal class WeakReferenceCollection<T> where T : class
	{
		private readonly List<WeakReference> _items = new List<WeakReference>();

		public void Add(T item)
		{
			if (_items.Capacity == _items.Count)
			{
				CleanupDeadReferences();
			}
			_items.Add(new WeakReference(item));
		}

		public void Remove(T item)
		{
			int num = IndexOf(item);
			if (num != -1)
			{
				_items.RemoveAt(num);
			}
		}

		public bool Contains(T item)
		{
			return IndexOf(item) >= 0;
		}

		public void Clear()
		{
			_items.Clear();
		}

		private int IndexOf(T item)
		{
			int count = _items.Count;
			for (int i = 0; i < count; i++)
			{
				if (_items[i].Target == item)
				{
					return i;
				}
			}
			return -1;
		}

		private void CleanupDeadReferences()
		{
			_items.RemoveAll((WeakReference w) => !w.IsAlive);
		}

		public List<T> AliveItemsToList()
		{
			List<T> list = new List<T>();
			foreach (WeakReference item2 in _items)
			{
				if (item2.Target is T item)
				{
					list.Add(item);
				}
			}
			return list;
		}
	}
}
namespace System
{
	[Serializable]
	public class Lazy<T, TMetadata> : Lazy<T>
	{
		private TMetadata _metadata;

		public TMetadata Metadata => _metadata;

		public Lazy(Func<T> valueFactory, TMetadata metadata)
			: base(valueFactory)
		{
			_metadata = metadata;
		}

		public Lazy(TMetadata metadata)
		{
			_metadata = metadata;
		}

		public Lazy(TMetadata metadata, bool isThreadSafe)
			: base(isThreadSafe)
		{
			_metadata = metadata;
		}

		public Lazy(Func<T> valueFactory, TMetadata metadata, bool isThreadSafe)
			: base(valueFactory, isThreadSafe)
		{
			_metadata = metadata;
		}

		public Lazy(TMetadata metadata, LazyThreadSafetyMode mode)
			: base(mode)
		{
			_metadata = metadata;
		}

		public Lazy(Func<T> valueFactory, TMetadata metadata, LazyThreadSafetyMode mode)
			: base(valueFactory, mode)
		{
			_metadata = metadata;
		}
	}
}
namespace System.ComponentModel
{
	[Conditional("NOT_FEATURE_LEGACYCOMPONENTMODEL")]
	internal sealed class LocalizableAttribute : Attribute
	{
		public LocalizableAttribute(bool isLocalizable)
		{
		}
	}
}
namespace System.ComponentModel.Composition
{
	public static class AttributedModelServices
	{
		public static TMetadataView GetMetadataView<TMetadataView>(IDictionary<string, object> metadata)
		{
			Requires.NotNull(metadata, "metadata");
			return MetadataViewProvider.GetMetadataView<TMetadataView>(metadata);
		}

		public static ComposablePart CreatePart(object attributedPart)
		{
			Requires.NotNull(attributedPart, "attributedPart");
			return AttributedModelDiscovery.CreatePart(attributedPart);
		}

		public static ComposablePart CreatePart(object attributedPart, ReflectionContext reflectionContext)
		{
			Requires.NotNull(attributedPart, "attributedPart");
			Requires.NotNull(reflectionContext, "reflectionContext");
			return AttributedModelDiscovery.CreatePart(attributedPart, reflectionContext);
		}

		public static ComposablePart CreatePart(ComposablePartDefinition partDefinition, object attributedPart)
		{
			Requires.NotNull(partDefinition, "partDefinition");
			Requires.NotNull(attributedPart, "attributedPart");
			return AttributedModelDiscovery.CreatePart((partDefinition as ReflectionComposablePartDefinition) ?? throw ExceptionBuilder.CreateReflectionModelInvalidPartDefinition("partDefinition", partDefinition.GetType()), attributedPart);
		}

		public static ComposablePartDefinition CreatePartDefinition(Type type, ICompositionElement origin)
		{
			Requires.NotNull(type, "type");
			return CreatePartDefinition(type, origin, ensureIsDiscoverable: false);
		}

		public static ComposablePartDefinition CreatePartDefinition(Type type, ICompositionElement origin, bool ensureIsDiscoverable)
		{
			Requires.NotNull(type, "type");
			if (ensureIsDiscoverable)
			{
				return AttributedModelDiscovery.CreatePartDefinitionIfDiscoverable(type, origin);
			}
			return AttributedModelDiscovery.CreatePartDefinition(type, null, ignoreConstructorImports: false, origin);
		}

		public static string GetTypeIdentity(Type type)
		{
			Requires.NotNull(type, "type");
			return ContractNameServices.GetTypeIdentity(type);
		}

		public static string GetTypeIdentity(MethodInfo method)
		{
			Requires.NotNull(method, "method");
			return ContractNameServices.GetTypeIdentityFromMethod(method);
		}

		public static string GetContractName(Type type)
		{
			Requires.NotNull(type, "type");
			return GetTypeIdentity(type);
		}

		public static ComposablePart AddExportedValue<T>(this CompositionBatch batch, T exportedValue)
		{
			Requires.NotNull(batch, "batch");
			string contractName = GetContractName(typeof(T));
			return batch.AddExportedValue(contractName, exportedValue);
		}

		public static void ComposeExportedValue<T>(this CompositionContainer container, T exportedValue)
		{
			Requires.NotNull(container, "container");
			CompositionBatch batch = new CompositionBatch();
			batch.AddExportedValue(exportedValue);
			container.Compose(batch);
		}

		public static ComposablePart AddExportedValue<T>(this CompositionBatch batch, string contractName, T exportedValue)
		{
			Requires.NotNull(batch, "batch");
			string typeIdentity = GetTypeIdentity(typeof(T));
			IDictionary<string, object> dictionary = new Dictionary<string, object>();
			dictionary.Add("ExportTypeIdentity", typeIdentity);
			return batch.AddExport(new Export(contractName, dictionary, () => exportedValue));
		}

		public static void ComposeExportedValue<T>(this CompositionContainer container, string contractName, T exportedValue)
		{
			Requires.NotNull(container, "container");
			CompositionBatch batch = new CompositionBatch();
			batch.AddExportedValue(contractName, exportedValue);
			container.Compose(batch);
		}

		public static ComposablePart AddPart(this CompositionBatch batch, object attributedPart)
		{
			Requires.NotNull(batch, "batch");
			Requires.NotNull(attributedPart, "attributedPart");
			ComposablePart composablePart = CreatePart(attributedPart);
			batch.AddPart(composablePart);
			return composablePart;
		}

		public static void ComposeParts(this CompositionContainer container, params object[] attributedParts)
		{
			Requires.NotNull(container, "container");
			Requires.NotNullOrNullElements(attributedParts, "attributedParts");
			CompositionBatch batch = new CompositionBatch(attributedParts.Select((object attributedPart) => CreatePart(attributedPart)).ToArray(), Enumerable.Empty<ComposablePart>());
			container.Compose(batch);
		}

		public static ComposablePart SatisfyImportsOnce(this ICompositionService compositionService, object attributedPart)
		{
			Requires.NotNull(compositionService, "compositionService");
			Requires.NotNull(attributedPart, "attributedPart");
			ComposablePart composablePart = CreatePart(attributedPart);
			compositionService.SatisfyImportsOnce(composablePart);
			return composablePart;
		}

		public static ComposablePart SatisfyImportsOnce(this ICompositionService compositionService, object attributedPart, ReflectionContext reflectionContext)
		{
			Requires.NotNull(compositionService, "compositionService");
			Requires.NotNull(attributedPart, "attributedPart");
			Requires.NotNull(reflectionContext, "reflectionContext");
			ComposablePart composablePart = CreatePart(attributedPart, reflectionContext);
			compositionService.SatisfyImportsOnce(composablePart);
			return composablePart;
		}

		public static bool Exports(this ComposablePartDefinition part, Type contractType)
		{
			Requires.NotNull(part, "part");
			Requires.NotNull(contractType, "contractType");
			return part.Exports(GetContractName(contractType));
		}

		public static bool Exports<T>(this ComposablePartDefinition part)
		{
			Requires.NotNull(part, "part");
			return part.Exports(typeof(T));
		}

		public static bool Imports(this ComposablePartDefinition part, Type contractType)
		{
			Requires.NotNull(part, "part");
			Requires.NotNull(contractType, "contractType");
			return part.Imports(GetContractName(contractType));
		}

		public static bool Imports<T>(this ComposablePartDefinition part)
		{
			Requires.NotNull(part, "part");
			return part.Imports(typeof(T));
		}

		public static bool Imports(this ComposablePartDefinition part, Type contractType, ImportCardinality importCardinality)
		{
			Requires.NotNull(part, "part");
			Requires.NotNull(contractType, "contractType");
			return part.Imports(GetContractName(contractType), importCardinality);
		}

		public static bool Imports<T>(this ComposablePartDefinition part, ImportCardinality importCardinality)
		{
			Requires.NotNull(part, "part");
			return part.Imports(typeof(T), importCardinality);
		}
	}
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false, Inherited = true)]
	public class CatalogReflectionContextAttribute : Attribute
	{
		private Type _reflectionContextType;

		public CatalogReflectionContextAttribute(Type reflectionContextType)
		{
			Requires.NotNull(reflectionContextType, "reflectionContextType");
			_reflectionContextType = reflectionContextType;
		}

		public ReflectionContext CreateReflectionContext()
		{
			Assumes.NotNull(_reflectionContextType);
			ReflectionContext reflectionContext = null;
			try
			{
				return (ReflectionContext)Activator.CreateInstance(_reflectionContextType);
			}
			catch (InvalidCastException innerException)
			{
				throw new InvalidOperationException(Strings.ReflectionContext_Type_Required, innerException);
			}
			catch (MissingMethodException inner)
			{
				throw new MissingMethodException(Strings.ReflectionContext_Requires_DefaultConstructor, inner);
			}
		}
	}
	[Serializable]
	public class ChangeRejectedException : CompositionException
	{
		public override string Message => string.Format(CultureInfo.CurrentCulture, Strings.CompositionException_ChangesRejected, base.Message);

		public ChangeRejectedException()
			: this(null, null)
		{
		}

		public ChangeRejectedException(string message)
			: this(message, null)
		{
		}

		public ChangeRejectedException(string message, Exception innerException)
			: base(message, innerException, null)
		{
		}

		public ChangeRejectedException(IEnumerable<CompositionError> errors)
			: base(null, null, errors)
		{
		}
	}
	[Serializable]
	public class CompositionContractMismatchException : Exception
	{
		public CompositionContractMismatchException()
			: this(null, null)
		{
		}

		public CompositionContractMismatchException(string message)
			: this(message, null)
		{
		}

		public CompositionContractMismatchException(string message, Exception innerException)
			: base(message, innerException)
		{
		}

		[SecuritySafeCritical]
		protected CompositionContractMismatchException(SerializationInfo info, StreamingContext context)
			: base(info, context)
		{
		}
	}
	[Serializable]
	[DebuggerTypeProxy(typeof(CompositionErrorDebuggerProxy))]
	public class CompositionError
	{
		private readonly CompositionErrorId _id;

		private readonly string _description;

		private readonly Exception _exception;

		private readonly ICompositionElement _element;

		public ICompositionElement Element => _element;

		public string Description => _description;

		public Exception Exception => _exception;

		internal CompositionErrorId Id => _id;

		internal Exception InnerException => Exception;

		public CompositionError(string message)
			: this(CompositionErrorId.Unknown, message, null, null)
		{
		}

		public CompositionError(string message, ICompositionElement element)
			: this(CompositionErrorId.Unknown, message, element, null)
		{
		}

		public CompositionError(string message, Exception exception)
			: this(CompositionErrorId.Unknown, message, null, exception)
		{
		}

		public CompositionError(string message, ICompositionElement element, Exception exception)
			: this(CompositionErrorId.Unknown, message, element, exception)
		{
		}

		internal CompositionError(CompositionErrorId id, string description, ICompositionElement element, Exception exception)
		{
			_id = id;
			_description = description ?? string.Empty;
			_element = element;
			_exception = exception;
		}

		public override string ToString()
		{
			return Description;
		}

		internal static CompositionError Create(CompositionErrorId id, string format, params object[] parameters)
		{
			return Create(id, null, null, format, parameters);
		}

		internal static CompositionError Create(CompositionErrorId id, ICompositionElement element, string format, params object[] parameters)
		{
			return Create(id, element, null, format, parameters);
		}

		internal static CompositionError Create(CompositionErrorId id, ICompositionElement element, Exception exception, string format, params object[] parameters)
		{
			return new CompositionError(id, string.Format(CultureInfo.CurrentCulture, format, parameters), element, exception);
		}
	}
	internal class CompositionErrorDebuggerProxy
	{
		private readonly CompositionError _error;

		public string Description => _error.Description;

		public Exception Exception => _error.Exception;

		public ICompositionElement Element => _error.Element;

		public CompositionErrorDebuggerProxy(CompositionError error)
		{
			Requires.NotNull(error, "error");
			_error = error;
		}
	}
	internal enum CompositionErrorId
	{
		Unknown,
		InvalidExportMetadata,
		ImportNotSetOnPart,
		ImportEngine_ComposeTookTooManyIterations,
		ImportEngine_ImportCardinalityMismatch,
		ImportEngine_PartCycle,
		ImportEngine_PartCannotSetImport,
		ImportEngine_PartCannotGetExportedValue,
		ImportEngine_PartCannotActivate,
		ImportEngine_PreventedByExistingImport,
		ImportEngine_InvalidStateForRecomposition,
		ReflectionModel_ImportThrewException,
		ReflectionModel_ImportNotAssignableFromExport,
		ReflectionModel_ImportCollectionNull,
		ReflectionModel_ImportCollectionNotWritable,
		ReflectionModel_ImportCollectionConstructionThrewException,
		ReflectionModel_ImportCollectionGetThrewException,
		ReflectionModel_ImportCollectionIsReadOnlyThrewException,
		ReflectionModel_ImportCollectionClearThrewException,
		ReflectionModel_ImportCollectionAddThrewException,
		ReflectionModel_ImportManyOnParameterCanOnlyBeAssigned
	}
	[Serializable]
	[DebuggerDisplay("{Message}")]
	[DebuggerTypeProxy(typeof(CompositionExceptionDebuggerProxy))]
	public class CompositionException : Exception
	{
		[Serializable]
		private struct CompositionExceptionData : ISafeSerializationData
		{
			public CompositionError[] _errors;

			void ISafeSerializationData.CompleteDeserialization(object obj)
			{
				(obj as CompositionException)._errors = new ReadOnlyCollection<CompositionError>(_errors);
			}
		}

		private struct VisitContext
		{
			public Stack<CompositionError> Path;

			public Action<Stack<CompositionError>> LeafVisitor;
		}

		private const string ErrorsKey = "Errors";

		private ReadOnlyCollection<CompositionError> _errors;

		public ReadOnlyCollection<CompositionError> Errors => _errors;

		public override string Message
		{
			get
			{
				if (Errors.Count == 0)
				{
					return base.Message;
				}
				return BuildDefaultMessage();
			}
		}

		public ReadOnlyCollection<Exception> RootCauses
		{
			get
			{
				//IL_0007: Expected O, but got I4
				ThrowStub.ThrowNotSupportedException();
				return (ReadOnlyCollection<Exception>)0;
			}
		}

		public CompositionException()
			: this(null, null, null)
		{
		}

		public CompositionException(string message)
			: this(message, null, null)
		{
		}

		public CompositionException(string message, Exception innerException)
			: this(message, innerException, null)
		{
		}

		internal CompositionException(CompositionError error)
			: this(new CompositionError[1] { error })
		{
		}

		public CompositionException(IEnumerable<CompositionError> errors)
			: this(null, null, errors)
		{
		}

		internal CompositionException(string message, Exception innerException, IEnumerable<CompositionError> errors)
			: base(message, innerException)
		{
			Requires.NullOrNotNullElements(errors, "errors");
			base.SerializeObjectState += delegate(object exception, SafeSerializationEventArgs eventArgs)
			{
				CompositionExceptionData compositionExceptionData = default(CompositionExceptionData);
				if (_errors != null)
				{
					compositionExceptionData._errors = _errors.Select((CompositionError error) => new CompositionError(error.Id, error.Description, error.Element.ToSerializableElement(), error.Exception)).ToArray();
				}
				else
				{
					compositionExceptionData._errors = new CompositionError[0];
				}
				eventArgs.AddSerializedState(compositionExceptionData);
			};
			_errors = new ReadOnlyCollection<CompositionError>((errors == null) ? ((IList<CompositionError>)new CompositionError[0]) : ((IList<CompositionError>)errors.ToArray()));
		}

		private string BuildDefaultMessage()
		{
			IEnumerable<IEnumerable<CompositionError>> enumerable = CalculatePaths(this);
			StringBuilder stringBuilder = new StringBuilder();
			WriteHeader(stringBuilder, Errors.Count, enumerable.Count());
			WritePaths(stringBuilder, enumerable);
			return stringBuilder.ToString();
		}

		private static void WriteHeader(StringBuilder writer, int errorsCount, int pathCount)
		{
			if (errorsCount > 1 && pathCount > 1)
			{
				writer.AppendFormat(CultureInfo.CurrentCulture, Strings.CompositionException_MultipleErrorsWithMultiplePaths, pathCount);
			}
			else if (errorsCount == 1 && pathCount > 1)
			{
				writer.AppendFormat(CultureInfo.CurrentCulture, Strings.CompositionException_SingleErrorWithMultiplePaths, pathCount);
			}
			else
			{
				Assumes.IsTrue(errorsCount == 1);
				Assumes.IsTrue(pathCount == 1);
				writer.AppendFormat(CultureInfo.CurrentCulture, Strings.CompositionException_SingleErrorWithSinglePath, pathCount);
			}
			writer.Append(' ');
			writer.AppendLine(Strings.CompositionException_ReviewErrorProperty);
		}

		private static void WritePaths(StringBuilder writer, IEnumerable<IEnumerable<CompositionError>> paths)
		{
			int num = 0;
			foreach (IEnumerable<CompositionError> path in paths)
			{
				num++;
				WritePath(writer, path, num);
			}
		}

		private static void WritePath(StringBuilder writer, IEnumerable<CompositionError> path, int ordinal)
		{
			writer.AppendLine();
			writer.Append(ordinal.ToString(CultureInfo.CurrentCulture));
			writer.Append(Strings.CompositionException_PathsCountSeparator);
			writer.Append(' ');
			WriteError(writer, path.First());
			foreach (CompositionError item in path.Skip(1))
			{
				writer.AppendLine();
				writer.Append(Strings.CompositionException_ErrorPrefix);
				writer.Append(' ');
				WriteError(writer, item);
			}
		}

		private static void WriteError(StringBuilder writer, CompositionError error)
		{
			writer.AppendLine(error.Description);
			if (error.Element != null)
			{
				WriteElementGraph(writer, error.Element);
			}
		}

		private static void WriteElementGraph(StringBuilder writer, ICompositionElement element)
		{
			writer.AppendFormat(CultureInfo.CurrentCulture, Strings.CompositionException_ElementPrefix, element.DisplayName);
			while ((element = element.Origin) != null)
			{
				writer.AppendFormat(CultureInfo.CurrentCulture, Strings.CompositionException_OriginFormat, Strings.CompositionException_OriginSeparator, element.DisplayName);
			}
			writer.AppendLine();
		}

		private static IEnumerable<IEnumerable<CompositionError>> CalculatePaths(CompositionException exception)
		{
			List<IEnumerable<CompositionError>> paths = new List<IEnumerable<CompositionError>>();
			VisitContext context = default(VisitContext);
			context.Path = new Stack<CompositionError>();
			context.LeafVisitor = delegate(Stack<CompositionError> path)
			{
				paths.Add(path.Copy());
			};
			VisitCompositionException(exception, context);
			return paths;
		}

		private static void VisitCompositionException(CompositionException exception, VisitContext context)
		{
			foreach (CompositionError error in exception.Errors)
			{
				VisitError(error, context);
			}
			if (exception.InnerException != null)
			{
				VisitException(exception.InnerException, context);
			}
		}

		private static void VisitError(CompositionError error, VisitContext context)
		{
			context.Path.Push(error);
			if (error.Exception == null)
			{
				context.LeafVisitor(context.Path);
			}
			else
			{
				VisitException(error.Exception, context);
			}
			context.Path.Pop();
		}

		private static void VisitException(Exception exception, VisitContext context)
		{
			if (exception is CompositionException exception2)
			{
				VisitCompositionException(exception2, context);
			}
			else
			{
				VisitError(new CompositionError(exception.Message, exception.InnerException), context);
			}
		}
	}
	internal class CompositionExceptionDebuggerProxy
	{
		private readonly CompositionException _exception;

		public ReadOnlyCollection<Exception> Exceptions
		{
			get
			{
				List<Exception> list = new List<Exception>();
				foreach (CompositionError error in _exception.Errors)
				{
					if (error.Exception != null)
					{
						list.Add(error.Exception);
					}
				}
				return list.ToReadOnlyCollection();
			}
		}

		public string Message => _exception.Message;

		public ReadOnlyCollection<Exception> RootCauses
		{
			get
			{
				List<Exception> list = new List<Exception>();
				foreach (CompositionError error in _exception.Errors)
				{
					if (error.Exception == null)
					{
						continue;
					}
					if (error.Exception is CompositionException exception)
					{
						CompositionExceptionDebuggerProxy compositionExceptionDebuggerProxy = new CompositionExceptionDebuggerProxy(exception);
						if (compositionExceptionDebuggerProxy.RootCauses.Count > 0)
						{
							list.AddRange(compositionExceptionDebuggerProxy.RootCauses);
							continue;
						}
					}
					list.Add(error.Exception);
				}
				return list.ToReadOnlyCollection();
			}
		}

		public CompositionExceptionDebuggerProxy(CompositionException exception)
		{
			Requires.NotNull(exception, "exception");
			_exception = exception;
		}
	}
	internal struct CompositionResult
	{
		public static readonly CompositionResult SucceededResult;

		private readonly IEnumerable<CompositionError> _errors;

		public bool Succeeded
		{
			get
			{
				if (_errors != null)
				{
					return !_errors.FastAny();
				}
				return true;
			}
		}

		public IEnumerable<CompositionError> Errors => _errors ?? Enumerable.Empty<CompositionError>();

		public CompositionResult(params CompositionError[] errors)
			: this((IEnumerable<CompositionError>)errors)
		{
		}

		public CompositionResult(IEnumerable<CompositionError> errors)
		{
			_errors = errors;
		}

		public CompositionResult MergeResult(CompositionResult result)
		{
			if (Succeeded)
			{
				return result;
			}
			if (result.Succeeded)
			{
				return this;
			}
			return MergeErrors(result._errors);
		}

		public CompositionResult MergeError(CompositionError error)
		{
			return MergeErrors(new CompositionError[1] { error });
		}

		public CompositionResult MergeErrors(IEnumerable<CompositionError> errors)
		{
			return new CompositionResult(_errors.ConcatAllowingNull(errors));
		}

		public CompositionResult<T> ToResult<T>(T value)
		{
			return new CompositionResult<T>(value, _errors);
		}

		public void ThrowOnErrors()
		{
			ThrowOnErrors(null);
		}

		public void ThrowOnErrors(AtomicComposition atomicComposition)
		{
			if (!Succeeded)
			{
				if (atomicComposition == null)
				{
					throw new CompositionException(_errors);
				}
				throw new ChangeRejectedException(_errors);
			}
		}
	}
	internal struct CompositionResult<T>
	{
		private readonly IEnumerable<CompositionError> _errors;

		private readonly T _value;

		public bool Succeeded
		{
			get
			{
				if (_errors != null)
				{
					return !_errors.FastAny();
				}
				return true;
			}
		}

		public IEnumerable<CompositionError> Errors => _errors ?? Enumerable.Empty<CompositionError>();

		public T Value
		{
			get
			{
				ThrowOnErrors();
				return _value;
			}
		}

		public CompositionResult(T value)
			: this(value, null)
		{
		}

		public CompositionResult(params CompositionError[] errors)
			: this(default(T), errors)
		{
		}

		public CompositionResult(IEnumerable<CompositionError> errors)
			: this(default(T), errors)
		{
		}

		internal CompositionResult(T value, IEnumerable<CompositionError> errors)
		{
			_errors = errors;
			_value = value;
		}

		internal CompositionResult<TValue> ToResult<TValue>()
		{
			return new CompositionResult<TValue>(_errors);
		}

		internal CompositionResult ToResult()
		{
			return new CompositionResult(_errors);
		}

		private void ThrowOnErrors()
		{
			if (!Succeeded)
			{
				throw new CompositionException(_errors);
			}
		}
	}
	internal static class ConstraintServices
	{
		private static readonly PropertyInfo _exportDefinitionContractNameProperty = typeof(ExportDefinition).GetProperty("ContractName");

		private static readonly PropertyInfo _exportDefinitionMetadataProperty = typeof(ExportDefinition).GetProperty("Metadata");

		private static readonly MethodInfo _metadataContainsKeyMethod = typeof(IDictionary<string, object>).GetMethod("ContainsKey");

		private static readonly MethodInfo _metadataItemMethod = typeof(IDictionary<string, object>).GetMethod("get_Item");

		private static readonly MethodInfo _metadataEqualsMethod = typeof(object).GetMethod("Equals", new Type[1] { typeof(object) });

		private static readonly MethodInfo _typeIsInstanceOfTypeMethod = typeof(Type).GetMethod("IsInstanceOfType");

		public static Expression<Func<ExportDefinition, bool>> CreateConstraint(string contractName, string requiredTypeIdentity, IEnumerable<KeyValuePair<string, Type>> requiredMetadata, CreationPolicy requiredCreationPolicy)
		{
			ParameterExpression parameterExpression = Expression.Parameter(typeof(ExportDefinition), "exportDefinition");
			Expression expression = CreateContractConstraintBody(contractName, parameterExpression);
			if (!string.IsNullOrEmpty(requiredTypeIdentity))
			{
				Expression right = CreateTypeIdentityContraint(requiredTypeIdentity, parameterExpression);
				expression = Expression.AndAlso(expression, right);
			}
			if (requiredMetadata != null)
			{
				Expression expression2 = CreateMetadataConstraintBody(requiredMetadata, parameterExpression);
				if (expression2 != null)
				{
					expression = Expression.AndAlso(expression, expression2);
				}
			}
			if (requiredCreationPolicy != 0)
			{
				Expression right2 = CreateCreationPolicyContraint(requiredCreationPolicy, parameterExpression);
				expression = Expression.AndAlso(expression, right2);
			}
			return Expression.Lambda<Func<ExportDefinition, bool>>(expression, new ParameterExpression[1] { parameterExpression });
		}

		private static Expression CreateContractConstraintBody(string contractName, ParameterExpression parameter)
		{
			Assumes.NotNull(parameter);
			return Expression.Equal(Expression.Property(parameter, _exportDefinitionContractNameProperty), Expression.Constant(contractName ?? string.Empty, typeof(string)));
		}

		private static Expression CreateMetadataConstraintBody(IEnumerable<KeyValuePair<string, Type>> requiredMetadata, ParameterExpression parameter)
		{
			Assumes.NotNull(requiredMetadata);
			Assumes.NotNull(parameter);
			Expression expression = null;
			foreach (KeyValuePair<string, Type> requiredMetadatum in requiredMetadata)
			{
				Expression expression2 = CreateMetadataContainsKeyExpression(parameter, requiredMetadatum.Key);
				expression = ((expression != null) ? Expression.AndAlso(expression, expression2) : expression2);
				expression = Expression.AndAlso(expression, CreateMetadataOfTypeExpression(parameter, requiredMetadatum.Key, requiredMetadatum.Value));
			}
			return expression;
		}

		private static Expression CreateCreationPolicyContraint(CreationPolicy policy, ParameterExpression parameter)
		{
			Assumes.IsTrue(policy != CreationPolicy.Any);
			Assumes.NotNull(parameter);
			return Expression.MakeBinary(ExpressionType.OrElse, Expression.MakeBinary(ExpressionType.OrElse, Expression.Not(CreateMetadataContainsKeyExpression(parameter, "System.ComponentModel.Composition.CreationPolicy")), CreateMetadataValueEqualsExpression(parameter, CreationPolicy.Any, "System.ComponentModel.Composition.CreationPolicy")), CreateMetadataValueEqualsExpression(parameter, policy, "System.ComponentModel.Composition.CreationPolicy"));
		}

		private static Expression CreateTypeIdentityContraint(string requiredTypeIdentity, ParameterExpression parameter)
		{
			Assumes.NotNull(requiredTypeIdentity);
			Assumes.NotNull(parameter);
			return Expression.MakeBinary(ExpressionType.AndAlso, CreateMetadataContainsKeyExpression(parameter, "ExportTypeIdentity"), CreateMetadataValueEqualsExpression(parameter, requiredTypeIdentity, "ExportTypeIdentity"));
		}

		private static Expression CreateMetadataContainsKeyExpression(ParameterExpression parameter, string constantKey)
		{
			Assumes.NotNull(parameter, constantKey);
			return Expression.Call(Expression.Property(parameter, _exportDefinitionMetadataProperty), _metadataContainsKeyMethod, Expression.Constant(constantKey));
		}

		private static Expression CreateMetadataOfTypeExpression(ParameterExpression parameter, string constantKey, Type constantType)
		{
			Assumes.NotNull(parameter, constantKey);
			Assumes.NotNull(parameter, constantType);
			return Expression.Call(Expression.Constant(constantType, typeof(Type)), _typeIsInstanceOfTypeMethod, Expression.Call(Expression.Property(parameter, _exportDefinitionMetadataProperty), _metadataItemMethod, Expression.Constant(constantKey)));
		}

		private static Expression CreateMetadataValueEqualsExpression(ParameterExpression parameter, object constantValue, string metadataName)
		{
			Assumes.NotNull(parameter, constantValue);
			return Expression.Call(Expression.Constant(constantValue), _metadataEqualsMethod, Expression.Call(Expression.Property(parameter, _exportDefinitionMetadataProperty), _metadataItemMethod, Expression.Constant(metadataName)));
		}

		public static Expression<Func<ExportDefinition, bool>> CreatePartCreatorConstraint(Expression<Func<ExportDefinition, bool>> baseConstraint, ImportDefinition productImportDefinition)
		{
			ParameterExpression parameterExpression = baseConstraint.Parameters[0];
			Expression instance = Expression.Property(parameterExpression, _exportDefinitionMetadataProperty);
			Expression left = Expression.Call(instance, _metadataContainsKeyMethod, Expression.Constant("ProductDefinition"));
			Expression expression = Expression.Call(instance, _metadataItemMethod, Expression.Constant("ProductDefinition"));
			Expression right = Expression.Invoke(productImportDefinition.Constraint, Expression.Convert(expression, typeof(ExportDefinition)));
			return Expression.Lambda<Func<ExportDefinition, bool>>(Expression.AndAlso(baseConstraint.Body, Expression.AndAlso(left, right)), new ParameterExpression[1] { parameterExpression });
		}
	}
	internal static class ContractNameServices
	{
		private const char NamespaceSeparator = '.';

		private const char ArrayOpeningBracket = '[';

		private const char ArrayClosingBracket = ']';

		private const char ArraySeparator = ',';

		private const char PointerSymbol = '*';

		private const char ReferenceSymbol = '&';

		private const char GenericArityBackQuote = '`';

		private const char NestedClassSeparator = '+';

		private const char ContractNameGenericOpeningBracket = '(';

		private const char ContractNameGenericClosingBracket = ')';

		private const char ContractNameGenericArgumentSeparator = ',';

		private const char CustomModifiersSeparator = ' ';

		private const char GenericFormatOpeningBracket = '{';

		private const char GenericFormatClosingBracket = '}';

		[ThreadStatic]
		private static Dictionary<Type, string> typeIdentityCache;

		private static Dictionary<Type, string> TypeIdentityCache
		{
			get
			{
				Dictionary<Type, string> result = typeIdentityCache ?? new Dictionary<Type, string>();
				typeIdentityCache = result;
				return result;
			}
		}

		internal static string GetTypeIdentity(Type type)
		{
			return GetTypeIdentity(type, formatGenericName: true);
		}

		internal static string GetTypeIdentity(Type type, bool formatGenericName)
		{
			Assumes.NotNull(type);
			string value = null;
			if (!TypeIdentityCache.TryGetValue(type, out value))
			{
				if (!type.IsAbstract && type.IsSubclassOf(typeof(Delegate)))
				{
					value = GetTypeIdentityFromMethod(type.GetMethod("Invoke"));
				}
				else if (type.IsGenericParameter)
				{
					StringBuilder stringBuilder = new StringBuilder();
					WriteTypeArgument(stringBuilder, isDefinition: false, type, formatGenericName);
					stringBuilder.Remove(stringBuilder.Length - 1, 1);
					value = stringBuilder.ToString();
				}
				else
				{
					StringBuilder stringBuilder2 = new StringBuilder();
					WriteTypeWithNamespace(stringBuilder2, type, formatGenericName);
					value = stringBuilder2.ToString();
				}
				Assumes.IsTrue(!string.IsNullOrEmpty(value));
				TypeIdentityCache.Add(type, value);
			}
			return value;
		}

		internal static string GetTypeIdentityFromMethod(MethodInfo method)
		{
			return GetTypeIdentityFromMethod(method, formatGenericName: true);
		}

		internal static string GetTypeIdentityFromMethod(MethodInfo method, bool formatGenericName)
		{
			StringBuilder stringBuilder = new StringBuilder();
			WriteTypeWithNamespace(stringBuilder, method.ReturnType, formatGenericName);
			stringBuilder.Append("(");
			ParameterInfo[] parameters = method.GetParameters();
			for (int i = 0; i < parameters.Length; i++)
			{
				if (i != 0)
				{
					stringBuilder.Append(",");
				}
				WriteTypeWithNamespace(stringBuilder, parameters[i].ParameterType, formatGenericName);
			}
			stringBuilder.Append(")");
			return stringBuilder.ToString();
		}

		private static void WriteTypeWithNamespace(StringBuilder typeName, Type type, bool formatGenericName)
		{
			if (!string.IsNullOrEmpty(type.Namespace))
			{
				typeName.Append(type.Namespace);
				typeName.Append('.');
			}
			WriteType(typeName, type, formatGenericName);
		}

		private static void WriteType(StringBuilder typeName, Type type, bool formatGenericName)
		{
			if (type.IsGenericType)
			{
				Queue<Type> queue = new Queue<Type>(type.GetGenericArguments());
				WriteGenericType(typeName, type, type.IsGenericTypeDefinition, queue, formatGenericName);
				Assumes.IsTrue(queue.Count == 0, "Expecting genericTypeArguments queue to be empty.");
			}
			else
			{
				WriteNonGenericType(typeName, type, formatGenericName);
			}
		}

		private static void WriteNonGenericType(StringBuilder typeName, Type type, bool formatGenericName)
		{
			if (type.DeclaringType != null)
			{
				WriteType(typeName, type.DeclaringType, formatGenericName);
				typeName.Append('+');
			}
			if (type.IsArray)
			{
				WriteArrayType(typeName, type, formatGenericName);
			}
			else if (type.IsPointer)
			{
				WritePointerType(typeName, type, formatGenericName);
			}
			else if (type.IsByRef)
			{
				WriteByRefType(typeName, type, formatGenericName);
			}
			else
			{
				typeName.Append(type.Name);
			}
		}

		private static void WriteArrayType(StringBuilder typeName, Type type, bool formatGenericName)
		{
			Type type2 = FindArrayElementType(type);
			WriteType(typeName, type2, formatGenericName);
			Type type3 = type;
			do
			{
				WriteArrayTypeDimensions(typeName, type3);
			}
			while ((type3 = type3.GetElementType()) != null && type3.IsArray);
		}

		private static void WritePointerType(StringBuilder typeName, Type type, bool formatGenericName)
		{
			WriteType(typeName, type.GetElementType(), formatGenericName);
			typeName.Append('*');
		}

		private static void WriteByRefType(StringBuilder typeName, Type type, bool formatGenericName)
		{
			WriteType(typeName, type.GetElementType(), formatGenericName);
			typeName.Append('&');
		}

		private static void WriteArrayTypeDimensions(StringBuilder typeName, Type type)
		{
			typeName.Append('[');
			int arrayRank = type.GetArrayRank();
			for (int i = 1; i < arrayRank; i++)
			{
				typeName.Append(',');
			}
			typeName.Append(']');
		}

		private static void WriteGenericType(StringBuilder typeName, Type type, bool isDefinition, Queue<Type> genericTypeArguments, bool formatGenericName)
		{
			if (type.DeclaringType != null)
			{
				if (type.DeclaringType.IsGenericType)
				{
					WriteGenericType(typeName, type.DeclaringType, isDefinition, genericTypeArguments, formatGenericName);
				}
				else
				{
					WriteNonGenericType(typeName, type.DeclaringType, formatGenericName);
				}
				typeName.Append('+');
			}
			WriteGenericTypeName(typeName, type, isDefinition, genericTypeArguments, formatGenericName);
		}

		private static void WriteGenericTypeName(StringBuilder typeName, Type type, bool isDefinition, Queue<Type> genericTypeArguments, bool formatGenericName)
		{
			Assumes.IsTrue(type.IsGenericType, "Expecting type to be a generic type");
			int genericArity = GetGenericArity(type);
			string value = FindGenericTypeName(type.GetGenericTypeDefinition().Name);
			typeName.Append(value);
			WriteTypeArgumentsString(typeName, genericArity, isDefinition, genericTypeArguments, formatGenericName);
		}

		private static void WriteTypeArgumentsString(StringBuilder typeName, int argumentsCount, bool isDefinition, Queue<Type> genericTypeArguments, bool formatGenericName)
		{
			if (argumentsCount != 0)
			{
				typeName.Append('(');
				for (int i = 0; i < argumentsCount; i++)
				{
					Assumes.IsTrue(genericTypeArguments.Count > 0, "Expecting genericTypeArguments to contain at least one Type");
					Type genericTypeArgument = genericTypeArguments.Dequeue();
					WriteTypeArgument(typeName, isDefinition, genericTypeArgument, formatGenericName);
				}
				typeName.Remove(typeName.Length - 1, 1);
				typeName.Append(')');
			}
		}

		private static void WriteTypeArgument(StringBuilder typeName, bool isDefinition, Type genericTypeArgument, bool formatGenericName)
		{
			if (!isDefinition && !genericTypeArgument.IsGenericParameter)
			{
				WriteTypeWithNamespace(typeName, genericTypeArgument, formatGenericName);
			}
			if (formatGenericName && genericTypeArgument.IsGenericParameter)
			{
				typeName.Append('{');
				typeName.Append(genericTypeArgument.GenericParameterPosition);
				typeName.Append('}');
			}
			typeName.Append(',');
		}

		internal static void WriteCustomModifiers(StringBuilder typeName, string customKeyword, Type[] types, bool formatGenericName)
		{
			typeName.Append(' ');
			typeName.Append(customKeyword);
			Queue<Type> queue = new Queue<Type>(types);
			WriteTypeArgumentsString(typeName, types.Length, isDefinition: false, queue, formatGenericName);
			Assumes.IsTrue(queue.Count == 0, "Expecting genericTypeArguments queue to be empty.");
		}

		private static Type FindArrayElementType(Type type)
		{
			Type type2 = type;
			while ((type2 = type2.GetElementType()) != null && type2.IsArray)
			{
			}
			return type2;
		}

		private static string FindGenericTypeName(string genericName)
		{
			int num = genericName.IndexOf('`');
			if (num > -1)
			{
				genericName = genericName.Substring(0, num);
			}
			return genericName;
		}

		private static int GetGenericArity(Type type)
		{
			if (type.DeclaringType == null)
			{
				return type.GetGenericArguments().Length;
			}
			int num = type.DeclaringType.GetGenericArguments().Length;
			int num2 = type.GetGenericArguments().Length;
			Assumes.IsTrue(num2 >= num);
			return num2 - num;
		}
	}
	public enum CreationPolicy
	{
		Any,
		Shared,
		NonShared,
		NewScope
	}
	internal static class ErrorBuilder
	{
		public static CompositionError PreventedByExistingImport(ComposablePart part, ImportDefinition import)
		{
			return CompositionError.Create(CompositionErrorId.ImportEngine_PreventedByExistingImport, Strings.ImportEngine_PreventedByExistingImport, import.ToElement().DisplayName, part.ToElement().DisplayName);
		}

		public static CompositionError InvalidStateForRecompposition(ComposablePart part)
		{
			return CompositionError.Create(CompositionErrorId.ImportEngine_InvalidStateForRecomposition, Strings.ImportEngine_InvalidStateForRecomposition, part.ToElement().DisplayName);
		}

		public static CompositionError ComposeTookTooManyIterations(int maximumNumberOfCompositionIterations)
		{
			return CompositionError.Create(CompositionErrorId.ImportEngine_ComposeTookTooManyIterations, Strings.ImportEngine_ComposeTookTooManyIterations, maximumNumberOfCompositionIterations);
		}

		public static CompositionError CreateImportCardinalityMismatch(ImportCardinalityMismatchException exception, ImportDefinition definition)
		{
			Assumes.NotNull(exception, definition);
			return CompositionError.Create(CompositionErrorId.ImportEngine_ImportCardinalityMismatch, exception.Message, definition.ToElement(), null);
		}

		public static CompositionError CreatePartCannotActivate(ComposablePart part, Exception innerException)
		{
			Assumes.NotNull(part, innerException);
			ICompositionElement compositionElement = part.ToElement();
			return CompositionError.Create(CompositionErrorId.ImportEngine_PartCannotActivate, compositionElement, innerException, Strings.ImportEngine_PartCannotActivate, compositionElement.DisplayName);
		}

		public static CompositionError CreatePartCannotSetImport(ComposablePart part, ImportDefinition definition, Exception innerException)
		{
			Assumes.NotNull(part, definition, innerException);
			ICompositionElement compositionElement = definition.ToElement();
			return CompositionError.Create(CompositionErrorId.ImportEngine_PartCannotSetImport, compositionElement, innerException, Strings.ImportEngine_PartCannotSetImport, compositionElement.DisplayName, part.ToElement().DisplayName);
		}

		public static CompositionError CreateCannotGetExportedValue(ComposablePart part, ExportDefinition definition, Exception innerException)
		{
			Assumes.NotNull(part, definition, innerException);
			ICompositionElement compositionElement = definition.ToElement();
			return CompositionError.Create(CompositionErrorId.ImportEngine_PartCannotGetExportedValue, compositionElement, innerException, Strings.ImportEngine_PartCannotGetExportedValue, compositionElement.DisplayName, part.ToElement().DisplayName);
		}

		public static CompositionError CreatePartCycle(ComposablePart part)
		{
			Assumes.NotNull(part);
			ICompositionElement compositionElement = part.ToElement();
			return CompositionError.Create(CompositionErrorId.ImportEngine_PartCycle, compositionElement, Strings.ImportEngine_PartCycle, compositionElement.DisplayName);
		}
	}
	internal static class ExceptionBuilder
	{
		public static Exception CreateDiscoveryException(string messageFormat, params string[] arguments)
		{
			return new InvalidOperationException(Format(messageFormat, arguments));
		}

		public static ArgumentException CreateContainsNullElement(string parameterName)
		{
			Assumes.NotNull(parameterName);
			return new ArgumentException(Format(Strings.Argument_NullElement, parameterName), parameterName);
		}

		public static ObjectDisposedException CreateObjectDisposed(object instance)
		{
			Assumes.NotNull(instance);
			return new ObjectDisposedException(instance.GetType().ToString());
		}

		public static NotImplementedException CreateNotOverriddenByDerived(string memberName)
		{
			Assumes.NotNullOrEmpty(memberName);
			return new NotImplementedException(Format(Strings.NotImplemented_NotOverriddenByDerived, memberName));
		}

		public static ArgumentException CreateExportDefinitionNotOnThisComposablePart(string parameterName)
		{
			Assumes.NotNullOrEmpty(parameterName);
			return new ArgumentException(Format(Strings.ExportDefinitionNotOnThisComposablePart, parameterName), parameterName);
		}

		public static ArgumentException CreateImportDefinitionNotOnThisComposablePart(string parameterName)
		{
			Assumes.NotNullOrEmpty(parameterName);
			return new ArgumentException(Format(Strings.ImportDefinitionNotOnThisComposablePart, parameterName), parameterName);
		}

		public static CompositionException CreateCannotGetExportedValue(ComposablePart part, ExportDefinition definition, Exception innerException)
		{
			Assumes.NotNull(part, definition, innerException);
			return new CompositionException(ErrorBuilder.CreateCannotGetExportedValue(part, definition, innerException));
		}

		public static ArgumentException CreateReflectionModelInvalidPartDefinition(string parameterName, Type partDefinitionType)
		{
			Assumes.NotNullOrEmpty(parameterName);
			Assumes.NotNull(partDefinitionType);
			return new ArgumentException(string.Format(CultureInfo.CurrentCulture, Strings.ReflectionModel_InvalidPartDefinition, partDefinitionType), parameterName);
		}

		public static ArgumentException ExportFactory_TooManyGenericParameters(string typeName)
		{
			Assumes.NotNullOrEmpty(typeName);
			return new ArgumentException(Format(Strings.ExportFactory_TooManyGenericParameters, typeName), typeName);
		}

		private static string Format(string format, params string[] arguments)
		{
			return string.Format(CultureInfo.CurrentCulture, format, arguments);
		}
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = true, Inherited = false)]
	public class ExportAttribute : Attribute
	{
		public string ContractName { get; private set; }

		public Type ContractType { get; private set; }

		public ExportAttribute()
			: this(null, null)
		{
		}

		public ExportAttribute(Type contractType)
			: this(null, contractType)
		{
		}

		public ExportAttribute(string contractName)
			: this(contractName, null)
		{
		}

		public ExportAttribute(string contractName, Type contractType)
		{
			ContractName = contractName;
			ContractType = contractType;
		}
	}
	internal enum ExportCardinalityCheckResult
	{
		Match,
		NoExports,
		TooManyExports
	}
	public class ExportFactory<T>
	{
		private Func<Tuple<T, Action>> _exportLifetimeContextCreator;

		public ExportFactory(Func<Tuple<T, Action>> exportLifetimeContextCreator)
		{
			if (exportLifetimeContextCreator == null)
			{
				throw new ArgumentNullException("exportLifetimeContextCreator");
			}
			_exportLifetimeContextCreator = exportLifetimeContextCreator;
		}

		public ExportLifetimeContext<T> CreateExport()
		{
			Tuple<T, Action> tuple = _exportLifetimeContextCreator();
			return new ExportLifetimeContext<T>(tuple.Item1, tuple.Item2);
		}

		internal bool IncludeInScopedCatalog(ComposablePartDefinition composablePartDefinition)
		{
			return OnFilterScopedCatalog(composablePartDefinition);
		}

		protected virtual bool OnFilterScopedCatalog(ComposablePartDefinition composablePartDefinition)
		{
			return true;
		}
	}
	public class ExportFactory<T, TMetadata> : ExportFactory<T>
	{
		private readonly TMetadata _metadata;

		public TMetadata Metadata => _metadata;

		public ExportFactory(Func<Tuple<T, Action>> exportLifetimeContextCreator, TMetadata metadata)
			: base(exportLifetimeContextCreator)
		{
			_metadata = metadata;
		}
	}
	public sealed class ExportLifetimeContext<T> : IDisposable
	{
		private readonly T _value;

		private readonly Action _disposeAction;

		public T Value => _value;

		public ExportLifetimeContext(T value, Action disposeAction)
		{
			_value = value;
			_disposeAction = disposeAction;
		}

		public void Dispose()
		{
			if (_disposeAction != null)
			{
				_disposeAction();
			}
		}
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Interface, AllowMultiple = true, Inherited = false)]
	public sealed class ExportMetadataAttribute : Attribute
	{
		public string Name { get; private set; }

		public object Value { get; private set; }

		public bool IsMultiple { get; set; }

		public ExportMetadataAttribute(string name, object value)
		{
			Name = name ?? string.Empty;
			Value = value;
		}
	}
	internal static class ExportServices
	{
		private sealed class DisposableLazy<T, TMetadataView> : Lazy<T, TMetadataView>, IDisposable
		{
			private IDisposable _disposable;

			public DisposableLazy(Func<T> valueFactory, TMetadataView metadataView, IDisposable disposable, LazyThreadSafetyMode mode)
				: base(valueFactory, metadataView, mode)
			{
				Assumes.NotNull(disposable);
				_disposable = disposable;
			}

			void IDisposable.Dispose()
			{
				_disposable.Dispose();
			}
		}

		private sealed class DisposableLazy<T> : Lazy<T>, IDisposable
		{
			private IDisposable _disposable;

			public DisposableLazy(Func<T> valueFactory, IDisposable disposable, LazyThreadSafetyMode mode)
				: base(valueFactory, mode)
			{
				Assumes.NotNull(disposable);
				_disposable = disposable;
			}

			void IDisposable.Dispose()
			{
				_disposable.Dispose();
			}
		}

		private static readonly MethodInfo _createStronglyTypedLazyOfTM = typeof(ExportServices).GetMethod("CreateStronglyTypedLazyOfTM", BindingFlags.Static | BindingFlags.NonPublic);

		private static readonly MethodInfo _createStronglyTypedLazyOfT = typeof(ExportServices).GetMethod("CreateStronglyTypedLazyOfT", BindingFlags.Static | BindingFlags.NonPublic);

		private static readonly MethodInfo _createSemiStronglyTypedLazy = typeof(ExportServices).GetMethod("CreateSemiStronglyTypedLazy", BindingFlags.Static | BindingFlags.NonPublic);

		internal static readonly Type DefaultMetadataViewType = typeof(IDictionary<string, object>);

		internal static readonly Type DefaultExportedValueType = typeof(object);

		internal static bool IsDefaultMetadataViewType(Type metadataViewType)
		{
			Assumes.NotNull(metadataViewType);
			return metadataViewType.IsAssignableFrom(DefaultMetadataViewType);
		}

		internal static bool IsDictionaryConstructorViewType(Type metadataViewType)
		{
			Assumes.NotNull(metadataViewType);
			return metadataViewType.GetConstructor(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, Type.DefaultBinder, new Type[1] { typeof(IDictionary<string, object>) }, new ParameterModifier[0]) != null;
		}

		internal static Func<Export, object> CreateStronglyTypedLazyFactory(Type exportType, Type metadataViewType)
		{
			MethodInfo methodInfo = null;
			methodInfo = ((!(metadataViewType != null)) ? _createStronglyTypedLazyOfT.MakeGenericMethod(exportType ?? DefaultExportedValueType) : _createStronglyTypedLazyOfTM.MakeGenericMethod(exportType ?? DefaultExportedValueType, metadataViewType));
			Assumes.NotNull(methodInfo);
			return (Func<Export, object>)Delegate.CreateDelegate(typeof(Func<Export, object>), methodInfo);
		}

		internal static Func<Export, Lazy<object, object>> CreateSemiStronglyTypedLazyFactory(Type exportType, Type metadataViewType)
		{
			MethodInfo methodInfo = _createSemiStronglyTypedLazy.MakeGenericMethod(exportType ?? DefaultExportedValueType, metadataViewType ?? DefaultMetadataViewType);
			Assumes.NotNull(methodInfo);
			return (Func<Export, Lazy<object, object>>)Delegate.CreateDelegate(typeof(Func<Export, Lazy<object, object>>), methodInfo);
		}

		internal static Lazy<T, M> CreateS

Room Architect Tool_Data/Managed/System.ComponentModel.DataAnnotations.dll

Decompiled 3 months ago
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.ComponentModel.Design;
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.Serialization;
using System.Security;
using System.Text.RegularExpressions;

[assembly: AllowPartiallyTrustedCallers]
[assembly: ComVisible(false)]
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("System.ComponentModel.DataAnnotations.dll")]
[assembly: AssemblyDefaultAlias("System.ComponentModel.DataAnnotations.dll")]
[assembly: AssemblyCompany("Mono development team")]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright("(c) Various Mono authors")]
[assembly: SatelliteContractVersion("4.0.0.0")]
[assembly: AssemblyInformationalVersion("4.6.57.0")]
[assembly: AssemblyFileVersion("4.6.57.0")]
[assembly: AssemblyDescription("System.ComponentModel.DataAnnotations.dll")]
[assembly: AssemblyDelaySign(true)]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: CLSCompliant(true)]
[assembly: AssemblyVersion("4.0.0.0")]
internal static class Consts
{
	public const string MonoVersion = "5.11.0.0";

	public const string MonoCompany = "Mono development team";

	public const string MonoProduct = "Mono Common Language Infrastructure";

	public const string MonoCopyright = "(c) Various Mono authors";

	public const int MonoCorlibVersion = 1051100001;

	public const string FxVersion = "4.0.0.0";

	public const string FxFileVersion = "4.6.57.0";

	public const string EnvironmentVersion = "4.0.30319.42000";

	public const string VsVersion = "0.0.0.0";

	public const string VsFileVersion = "11.0.0.0";

	private const string PublicKeyToken = "b77a5c561934e089";

	public const string AssemblyI18N = "I18N, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMicrosoft_JScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMono_Http = "Mono.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Posix = "Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Security = "Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Messaging_RabbitMQ = "Mono.Messaging.RabbitMQ, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyCorlib = "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Data = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Design = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing_Design = "System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Messaging = "System.Messaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Security = "System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Web = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Core = "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string WindowsBase_3_0 = "WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
namespace System.ComponentModel.DataAnnotations
{
	internal static class AppSettings
	{
		internal static readonly bool DisableRegEx;
	}
	public class AssociatedMetadataTypeTypeDescriptionProvider : TypeDescriptionProvider
	{
		private Type _associatedMetadataType;

		public AssociatedMetadataTypeTypeDescriptionProvider(Type type)
			: base(TypeDescriptor.GetProvider(type))
		{
		}

		public AssociatedMetadataTypeTypeDescriptionProvider(Type type, Type associatedMetadataType)
			: this(type)
		{
			if (associatedMetadataType == null)
			{
				throw new ArgumentNullException("associatedMetadataType");
			}
			_associatedMetadataType = associatedMetadataType;
		}

		public override ICustomTypeDescriptor GetTypeDescriptor(Type objectType, object instance)
		{
			return new AssociatedMetadataTypeTypeDescriptor(base.GetTypeDescriptor(objectType, instance), objectType, _associatedMetadataType);
		}
	}
	internal class AssociatedMetadataTypeTypeDescriptor : CustomTypeDescriptor
	{
		private static class TypeDescriptorCache
		{
			private static readonly Attribute[] emptyAttributes = new Attribute[0];

			private static readonly ConcurrentDictionary<Type, Type> _metadataTypeCache = new ConcurrentDictionary<Type, Type>();

			private static readonly ConcurrentDictionary<Tuple<Type, string>, Attribute[]> _typeMemberCache = new ConcurrentDictionary<Tuple<Type, string>, Attribute[]>();

			private static readonly ConcurrentDictionary<Tuple<Type, Type>, bool> _validatedMetadataTypeCache = new ConcurrentDictionary<Tuple<Type, Type>, bool>();

			public static void ValidateMetadataType(Type type, Type associatedType)
			{
				Tuple<Type, Type> key = new Tuple<Type, Type>(type, associatedType);
				if (!_validatedMetadataTypeCache.ContainsKey(key))
				{
					CheckAssociatedMetadataType(type, associatedType);
					_validatedMetadataTypeCache.TryAdd(key, value: true);
				}
			}

			public static Type GetAssociatedMetadataType(Type type)
			{
				Type value = null;
				if (_metadataTypeCache.TryGetValue(type, out value))
				{
					return value;
				}
				MetadataTypeAttribute metadataTypeAttribute = (MetadataTypeAttribute)Attribute.GetCustomAttribute(type, typeof(MetadataTypeAttribute));
				if (metadataTypeAttribute != null)
				{
					value = metadataTypeAttribute.MetadataClassType;
				}
				_metadataTypeCache.TryAdd(type, value);
				return value;
			}

			private static void CheckAssociatedMetadataType(Type mainType, Type associatedMetadataType)
			{
				HashSet<string> other = new HashSet<string>(from p in mainType.GetProperties()
					select p.Name);
				IEnumerable<string> first = from f in associatedMetadataType.GetFields()
					select f.Name;
				IEnumerable<string> second = from p in associatedMetadataType.GetProperties()
					select p.Name;
				HashSet<string> hashSet = new HashSet<string>(first.Concat(second), StringComparer.Ordinal);
				if (!hashSet.IsSubsetOf(other))
				{
					hashSet.ExceptWith(other);
					throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "The associated metadata type for type '{0}' contains the following unknown properties or fields: {1}. Please make sure that the names of these members match the names of the properties on the main type.", mainType.FullName, string.Join(", ", hashSet.ToArray())));
				}
			}

			public static Attribute[] GetAssociatedMetadata(Type type, string memberName)
			{
				Tuple<Type, string> key = new Tuple<Type, string>(type, memberName);
				if (_typeMemberCache.TryGetValue(key, out var value))
				{
					return value;
				}
				MemberTypes type2 = MemberTypes.Field | MemberTypes.Property;
				BindingFlags bindingAttr = BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public;
				MemberInfo memberInfo = type.GetMember(memberName, type2, bindingAttr).FirstOrDefault();
				value = ((!(memberInfo != null)) ? emptyAttributes : Attribute.GetCustomAttributes(memberInfo, inherit: true));
				_typeMemberCache.TryAdd(key, value);
				return value;
			}
		}

		private Type AssociatedMetadataType { get; set; }

		private bool IsSelfAssociated { get; set; }

		public AssociatedMetadataTypeTypeDescriptor(ICustomTypeDescriptor parent, Type type, Type associatedMetadataType)
			: base(parent)
		{
			AssociatedMetadataType = associatedMetadataType ?? TypeDescriptorCache.GetAssociatedMetadataType(type);
			IsSelfAssociated = type == AssociatedMetadataType;
			if (AssociatedMetadataType != null)
			{
				TypeDescriptorCache.ValidateMetadataType(type, AssociatedMetadataType);
			}
		}

		public override PropertyDescriptorCollection GetProperties(Attribute[] attributes)
		{
			return GetPropertiesWithMetadata(base.GetProperties(attributes));
		}

		public override PropertyDescriptorCollection GetProperties()
		{
			return GetPropertiesWithMetadata(base.GetProperties());
		}

		private PropertyDescriptorCollection GetPropertiesWithMetadata(PropertyDescriptorCollection originalCollection)
		{
			if (AssociatedMetadataType == null)
			{
				return originalCollection;
			}
			bool flag = false;
			List<PropertyDescriptor> list = new List<PropertyDescriptor>();
			foreach (PropertyDescriptor item2 in originalCollection)
			{
				Attribute[] associatedMetadata = TypeDescriptorCache.GetAssociatedMetadata(AssociatedMetadataType, item2.Name);
				PropertyDescriptor item = item2;
				if (associatedMetadata.Length != 0)
				{
					item = new MetadataPropertyDescriptorWrapper(item2, associatedMetadata);
					flag = true;
				}
				list.Add(item);
			}
			if (flag)
			{
				return new PropertyDescriptorCollection(list.ToArray(), readOnly: true);
			}
			return originalCollection;
		}

		public override AttributeCollection GetAttributes()
		{
			AttributeCollection attributeCollection = base.GetAttributes();
			if (AssociatedMetadataType != null && !IsSelfAssociated)
			{
				Attribute[] newAttributes = TypeDescriptor.GetAttributes(AssociatedMetadataType).OfType<Attribute>().ToArray();
				attributeCollection = AttributeCollection.FromExisting(attributeCollection, newAttributes);
			}
			return attributeCollection;
		}
	}
	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
	public sealed class AssociationAttribute : Attribute
	{
		private string name;

		private string thisKey;

		private string otherKey;

		private bool isForeignKey;

		public string Name => name;

		public string ThisKey => thisKey;

		public string OtherKey => otherKey;

		public bool IsForeignKey
		{
			get
			{
				return isForeignKey;
			}
			set
			{
				isForeignKey = value;
			}
		}

		public IEnumerable<string> ThisKeyMembers => GetKeyMembers(ThisKey);

		public IEnumerable<string> OtherKeyMembers => GetKeyMembers(OtherKey);

		public AssociationAttribute(string name, string thisKey, string otherKey)
		{
			this.name = name;
			this.thisKey = thisKey;
			this.otherKey = otherKey;
		}

		private static string[] GetKeyMembers(string key)
		{
			return key.Replace(" ", string.Empty).Split(new char[1] { ',' });
		}
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum, AllowMultiple = false, Inherited = true)]
	public sealed class BindableTypeAttribute : Attribute
	{
		public bool IsBindable { get; set; }

		public BindableTypeAttribute()
		{
			IsBindable = true;
		}
	}
	[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
	public class CompareAttribute : ValidationAttribute
	{
		public string OtherProperty { get; private set; }

		public string OtherPropertyDisplayName { get; internal set; }

		public override bool RequiresValidationContext => true;

		public CompareAttribute(string otherProperty)
			: base("'{0}' and '{1}' do not match.")
		{
			if (otherProperty == null)
			{
				throw new ArgumentNullException("otherProperty");
			}
			OtherProperty = otherProperty;
		}

		public override string FormatErrorMessage(string name)
		{
			return string.Format(CultureInfo.CurrentCulture, base.ErrorMessageString, name, OtherPropertyDisplayName ?? OtherProperty);
		}

		protected override ValidationResult IsValid(object value, ValidationContext validationContext)
		{
			PropertyInfo property = validationContext.ObjectType.GetProperty(OtherProperty);
			if (property == null)
			{
				return new ValidationResult(string.Format(CultureInfo.CurrentCulture, "Could not find a property named {0}.", OtherProperty));
			}
			object value2 = property.GetValue(validationContext.ObjectInstance, null);
			if (!object.Equals(value, value2))
			{
				if (OtherPropertyDisplayName == null)
				{
					OtherPropertyDisplayName = GetDisplayNameForProperty(validationContext.ObjectType, OtherProperty);
				}
				return new ValidationResult(FormatErrorMessage(validationContext.DisplayName));
			}
			return null;
		}

		private static string GetDisplayNameForProperty(Type containerType, string propertyName)
		{
			IEnumerable<Attribute> source = (GetTypeDescriptor(containerType).GetProperties().Find(propertyName, ignoreCase: true) ?? throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "The property {0}.{1} could not be found.", containerType.FullName, propertyName))).Attributes.Cast<Attribute>();
			DisplayAttribute displayAttribute = source.OfType<DisplayAttribute>().FirstOrDefault();
			if (displayAttribute != null)
			{
				return displayAttribute.GetName();
			}
			DisplayNameAttribute displayNameAttribute = source.OfType<DisplayNameAttribute>().FirstOrDefault();
			if (displayNameAttribute != null)
			{
				return displayNameAttribute.DisplayName;
			}
			return propertyName;
		}

		private static ICustomTypeDescriptor GetTypeDescriptor(Type type)
		{
			return new AssociatedMetadataTypeTypeDescriptionProvider(type).GetTypeDescriptor(type);
		}
	}
	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
	public sealed class ConcurrencyCheckAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
	public sealed class CreditCardAttribute : DataTypeAttribute
	{
		public CreditCardAttribute()
			: base(DataType.CreditCard)
		{
			base.DefaultErrorMessage = "The {0} field is not a valid credit card number.";
		}

		public override bool IsValid(object value)
		{
			if (value == null)
			{
				return true;
			}
			if (!(value is string text))
			{
				return false;
			}
			string text2 = text.Replace("-", "");
			text2 = text2.Replace(" ", "");
			int num = 0;
			bool flag = false;
			foreach (char item in text2.Reverse())
			{
				if (item < '0' || item > '9')
				{
					return false;
				}
				int num2 = (item - 48) * ((!flag) ? 1 : 2);
				flag = !flag;
				while (num2 > 0)
				{
					num += num2 % 10;
					num2 /= 10;
				}
			}
			return num % 10 == 0;
		}
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = true)]
	public sealed class CustomValidationAttribute : ValidationAttribute
	{
		private Type _validatorType;

		private string _method;

		private MethodInfo _methodInfo;

		private bool _isSingleArgumentMethod;

		private string _lastMessage;

		private Type _valuesType;

		private Lazy<string> _malformedErrorMessage;

		private Tuple<string, Type> _typeId;

		public Type ValidatorType => _validatorType;

		public string Method => _method;

		public override object TypeId
		{
			get
			{
				if (_typeId == null)
				{
					_typeId = new Tuple<string, Type>(_method, _validatorType);
				}
				return _typeId;
			}
		}

		public CustomValidationAttribute(Type validatorType, string method)
			: base(() => "{0} is not valid.")
		{
			_validatorType = validatorType;
			_method = method;
			_malformedErrorMessage = new Lazy<string>(CheckAttributeWellFormed);
		}

		protected override ValidationResult IsValid(object value, ValidationContext validationContext)
		{
			ThrowIfAttributeNotWellFormed();
			MethodInfo methodInfo = _methodInfo;
			if (!TryConvertValue(value, out var convertedValue))
			{
				return new ValidationResult(string.Format(CultureInfo.CurrentCulture, "Could not convert the value of type '{0}' to '{1}' as expected by method {2}.{3}.", (value != null) ? value.GetType().ToString() : "null", _valuesType, _validatorType, _method));
			}
			try
			{
				object[] parameters = ((!_isSingleArgumentMethod) ? new object[2] { convertedValue, validationContext } : new object[1] { convertedValue });
				ValidationResult validationResult = (ValidationResult)methodInfo.Invoke(null, parameters);
				_lastMessage = null;
				if (validationResult != null)
				{
					_lastMessage = validationResult.ErrorMessage;
				}
				return validationResult;
			}
			catch (TargetInvocationException ex)
			{
				if (ex.InnerException != null)
				{
					throw ex.InnerException;
				}
				throw;
			}
		}

		public override string FormatErrorMessage(string name)
		{
			ThrowIfAttributeNotWellFormed();
			if (!string.IsNullOrEmpty(_lastMessage))
			{
				return string.Format(CultureInfo.CurrentCulture, _lastMessage, name);
			}
			return base.FormatErrorMessage(name);
		}

		private string CheckAttributeWellFormed()
		{
			return ValidateValidatorTypeParameter() ?? ValidateMethodParameter();
		}

		private string ValidateValidatorTypeParameter()
		{
			if (_validatorType == null)
			{
				return "The CustomValidationAttribute.ValidatorType was not specified.";
			}
			if (!_validatorType.IsVisible)
			{
				return string.Format(CultureInfo.CurrentCulture, "The custom validation type '{0}' must be public.", _validatorType.Name);
			}
			return null;
		}

		private string ValidateMethodParameter()
		{
			if (string.IsNullOrEmpty(_method))
			{
				return "The CustomValidationAttribute.Method was not specified.";
			}
			MethodInfo method = _validatorType.GetMethod(_method, BindingFlags.Static | BindingFlags.Public);
			if (method == null)
			{
				return string.Format(CultureInfo.CurrentCulture, "The CustomValidationAttribute method '{0}' does not exist in type '{1}' or is not public and static.", _method, _validatorType.Name);
			}
			if (method.ReturnType != typeof(ValidationResult))
			{
				return string.Format(CultureInfo.CurrentCulture, "The CustomValidationAttribute method '{0}' in type '{1}' must return System.ComponentModel.DataAnnotations.ValidationResult.  Use System.ComponentModel.DataAnnotations.ValidationResult.Success to represent success.", _method, _validatorType.Name);
			}
			ParameterInfo[] parameters = method.GetParameters();
			if (parameters.Length == 0 || parameters[0].ParameterType.IsByRef)
			{
				return string.Format(CultureInfo.CurrentCulture, "The CustomValidationAttribute method '{0}' in type '{1}' must match the expected signature: public static ValidationResult {0}(object value, ValidationContext context).  The value can be strongly typed.  The ValidationContext parameter is optional.", _method, _validatorType.Name);
			}
			_isSingleArgumentMethod = parameters.Length == 1;
			if (!_isSingleArgumentMethod && (parameters.Length != 2 || parameters[1].ParameterType != typeof(ValidationContext)))
			{
				return string.Format(CultureInfo.CurrentCulture, "The CustomValidationAttribute method '{0}' in type '{1}' must match the expected signature: public static ValidationResult {0}(object value, ValidationContext context).  The value can be strongly typed.  The ValidationContext parameter is optional.", _method, _validatorType.Name);
			}
			_methodInfo = method;
			_valuesType = parameters[0].ParameterType;
			return null;
		}

		private void ThrowIfAttributeNotWellFormed()
		{
			string value = _malformedErrorMessage.Value;
			if (value != null)
			{
				throw new InvalidOperationException(value);
			}
		}

		private bool TryConvertValue(object value, out object convertedValue)
		{
			convertedValue = null;
			Type valuesType = _valuesType;
			if (value == null)
			{
				if (valuesType.IsValueType && (!valuesType.IsGenericType || valuesType.GetGenericTypeDefinition() != typeof(Nullable<>)))
				{
					return false;
				}
				return true;
			}
			if (valuesType.IsAssignableFrom(value.GetType()))
			{
				convertedValue = value;
				return true;
			}
			try
			{
				convertedValue = Convert.ChangeType(value, valuesType, CultureInfo.CurrentCulture);
				return true;
			}
			catch (FormatException)
			{
				return false;
			}
			catch (InvalidCastException)
			{
				return false;
			}
			catch (NotSupportedException)
			{
				return false;
			}
		}
	}
	public enum DataType
	{
		Custom,
		DateTime,
		Date,
		Time,
		Duration,
		PhoneNumber,
		Currency,
		Text,
		Html,
		MultilineText,
		EmailAddress,
		Password,
		Url,
		ImageUrl,
		CreditCard,
		PostalCode,
		Upload
	}
	[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
	public class DataTypeAttribute : ValidationAttribute
	{
		private static string[] _dataTypeStrings = Enum.GetNames(typeof(DataType));

		public DataType DataType { get; private set; }

		public string CustomDataType { get; private set; }

		public DisplayFormatAttribute DisplayFormat { get; protected set; }

		public virtual string GetDataTypeName()
		{
			EnsureValidDataType();
			if (DataType == DataType.Custom)
			{
				return CustomDataType;
			}
			return _dataTypeStrings[(int)DataType];
		}

		public DataTypeAttribute(DataType dataType)
		{
			DataType = dataType;
			switch (dataType)
			{
			case DataType.Date:
				DisplayFormat = new DisplayFormatAttribute();
				DisplayFormat.DataFormatString = "{0:d}";
				DisplayFormat.ApplyFormatInEditMode = true;
				break;
			case DataType.Time:
				DisplayFormat = new DisplayFormatAttribute();
				DisplayFormat.DataFormatString = "{0:t}";
				DisplayFormat.ApplyFormatInEditMode = true;
				break;
			case DataType.Currency:
				DisplayFormat = new DisplayFormatAttribute();
				DisplayFormat.DataFormatString = "{0:C}";
				break;
			case DataType.Duration:
			case DataType.PhoneNumber:
				break;
			}
		}

		public DataTypeAttribute(string customDataType)
			: this(DataType.Custom)
		{
			CustomDataType = customDataType;
		}

		public override bool IsValid(object value)
		{
			EnsureValidDataType();
			return true;
		}

		private void EnsureValidDataType()
		{
			if (DataType == DataType.Custom && string.IsNullOrEmpty(CustomDataType))
			{
				throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "The custom DataType string cannot be null or empty."));
			}
		}
	}
	[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
	public sealed class DisplayAttribute : Attribute
	{
		private Type _resourceType;

		private LocalizableString _shortName = new LocalizableString("ShortName");

		private LocalizableString _name = new LocalizableString("Name");

		private LocalizableString _description = new LocalizableString("Description");

		private LocalizableString _prompt = new LocalizableString("Prompt");

		private LocalizableString _groupName = new LocalizableString("GroupName");

		private bool? _autoGenerateField;

		private bool? _autoGenerateFilter;

		private int? _order;

		public string ShortName
		{
			get
			{
				return _shortName.Value;
			}
			set
			{
				if (_shortName.Value != value)
				{
					_shortName.Value = value;
				}
			}
		}

		public string Name
		{
			get
			{
				return _name.Value;
			}
			set
			{
				if (_name.Value != value)
				{
					_name.Value = value;
				}
			}
		}

		public string Description
		{
			get
			{
				return _description.Value;
			}
			set
			{
				if (_description.Value != value)
				{
					_description.Value = value;
				}
			}
		}

		public string Prompt
		{
			get
			{
				return _prompt.Value;
			}
			set
			{
				if (_prompt.Value != value)
				{
					_prompt.Value = value;
				}
			}
		}

		public string GroupName
		{
			get
			{
				return _groupName.Value;
			}
			set
			{
				if (_groupName.Value != value)
				{
					_groupName.Value = value;
				}
			}
		}

		public Type ResourceType
		{
			get
			{
				return _resourceType;
			}
			set
			{
				if (_resourceType != value)
				{
					_resourceType = value;
					_shortName.ResourceType = value;
					_name.ResourceType = value;
					_description.ResourceType = value;
					_prompt.ResourceType = value;
					_groupName.ResourceType = value;
				}
			}
		}

		public bool AutoGenerateField
		{
			get
			{
				if (!_autoGenerateField.HasValue)
				{
					throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "The {0} property has not been set.  Use the {1} method to get the value.", "AutoGenerateField", "GetAutoGenerateField"));
				}
				return _autoGenerateField.Value;
			}
			set
			{
				_autoGenerateField = value;
			}
		}

		public bool AutoGenerateFilter
		{
			get
			{
				if (!_autoGenerateFilter.HasValue)
				{
					throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "The {0} property has not been set.  Use the {1} method to get the value.", "AutoGenerateFilter", "GetAutoGenerateFilter"));
				}
				return _autoGenerateFilter.Value;
			}
			set
			{
				_autoGenerateFilter = value;
			}
		}

		public int Order
		{
			get
			{
				if (!_order.HasValue)
				{
					throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "The {0} property has not been set.  Use the {1} method to get the value.", "Order", "GetOrder"));
				}
				return _order.Value;
			}
			set
			{
				_order = value;
			}
		}

		public string GetShortName()
		{
			return _shortName.GetLocalizableValue() ?? GetName();
		}

		public string GetName()
		{
			return _name.GetLocalizableValue();
		}

		public string GetDescription()
		{
			return _description.GetLocalizableValue();
		}

		public string GetPrompt()
		{
			return _prompt.GetLocalizableValue();
		}

		public string GetGroupName()
		{
			return _groupName.GetLocalizableValue();
		}

		public bool? GetAutoGenerateField()
		{
			return _autoGenerateField;
		}

		public bool? GetAutoGenerateFilter()
		{
			return _autoGenerateFilter;
		}

		public int? GetOrder()
		{
			return _order;
		}
	}
	[AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = false)]
	public class DisplayColumnAttribute : Attribute
	{
		public string DisplayColumn { get; private set; }

		public string SortColumn { get; private set; }

		public bool SortDescending { get; private set; }

		public DisplayColumnAttribute(string displayColumn)
			: this(displayColumn, null)
		{
		}

		public DisplayColumnAttribute(string displayColumn, string sortColumn)
			: this(displayColumn, sortColumn, sortDescending: false)
		{
		}

		public DisplayColumnAttribute(string displayColumn, string sortColumn, bool sortDescending)
		{
			DisplayColumn = displayColumn;
			SortColumn = sortColumn;
			SortDescending = sortDescending;
		}
	}
	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
	public class DisplayFormatAttribute : Attribute
	{
		public string DataFormatString { get; set; }

		public string NullDisplayText { get; set; }

		public bool ConvertEmptyStringToNull { get; set; }

		public bool ApplyFormatInEditMode { get; set; }

		public bool HtmlEncode { get; set; }

		public DisplayFormatAttribute()
		{
			ConvertEmptyStringToNull = true;
			HtmlEncode = true;
		}
	}
	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
	public sealed class EditableAttribute : Attribute
	{
		public bool AllowEdit { get; private set; }

		public bool AllowInitialValue { get; set; }

		public EditableAttribute(bool allowEdit)
		{
			AllowEdit = allowEdit;
			AllowInitialValue = allowEdit;
		}
	}
	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
	public sealed class EmailAddressAttribute : DataTypeAttribute
	{
		private static Regex _regex = CreateRegEx();

		public EmailAddressAttribute()
			: base(DataType.EmailAddress)
		{
			base.DefaultErrorMessage = "The {0} field is not a valid e-mail address.";
		}

		public override bool IsValid(object value)
		{
			if (value == null)
			{
				return true;
			}
			string text = value as string;
			if (_regex != null)
			{
				if (text != null)
				{
					return _regex.Match(text).Length > 0;
				}
				return false;
			}
			int num = 0;
			string text2 = text;
			for (int i = 0; i < text2.Length; i++)
			{
				if (text2[i] == '@')
				{
					num++;
				}
			}
			if (text != null && num == 1 && text[0] != '@')
			{
				return text[text.Length - 1] != '@';
			}
			return false;
		}

		private static Regex CreateRegEx()
		{
			if (AppSettings.DisableRegEx)
			{
				return null;
			}
			TimeSpan matchTimeout = TimeSpan.FromSeconds(2.0);
			try
			{
				if (AppDomain.CurrentDomain.GetData("REGEX_DEFAULT_MATCH_TIMEOUT") == null)
				{
					return new Regex("^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?$", RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture | RegexOptions.Compiled, matchTimeout);
				}
			}
			catch
			{
			}
			return new Regex("^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?$", RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture | RegexOptions.Compiled);
		}
	}
	[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
	public sealed class EnumDataTypeAttribute : DataTypeAttribute
	{
		public Type EnumType { get; private set; }

		public EnumDataTypeAttribute(Type enumType)
			: base("Enumeration")
		{
			EnumType = enumType;
		}

		public override bool IsValid(object value)
		{
			if (EnumType == null)
			{
				throw new InvalidOperationException("The type provided for EnumDataTypeAttribute cannot be null.");
			}
			if (!EnumType.IsEnum)
			{
				throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "The type '{0}' needs to represent an enumeration type.", EnumType.FullName));
			}
			if (value == null)
			{
				return true;
			}
			string text = value as string;
			if (text != null && string.IsNullOrEmpty(text))
			{
				return true;
			}
			Type type = value.GetType();
			if (type.IsEnum && EnumType != type)
			{
				return false;
			}
			if (!type.IsValueType && type != typeof(string))
			{
				return false;
			}
			if (type == typeof(bool) || type == typeof(float) || type == typeof(double) || type == typeof(decimal) || type == typeof(char))
			{
				return false;
			}
			object obj;
			if (type.IsEnum)
			{
				obj = value;
			}
			else
			{
				try
				{
					obj = ((text == null) ? Enum.ToObject(EnumType, value) : Enum.Parse(EnumType, text, ignoreCase: false));
				}
				catch (ArgumentException)
				{
					return false;
				}
			}
			if (IsEnumTypeInFlagsMode(EnumType))
			{
				string underlyingTypeValueString = GetUnderlyingTypeValueString(EnumType, obj);
				string value2 = obj.ToString();
				return !underlyingTypeValueString.Equals(value2);
			}
			return Enum.IsDefined(EnumType, obj);
		}

		private static bool IsEnumTypeInFlagsMode(Type enumType)
		{
			return enumType.GetCustomAttributes(typeof(FlagsAttribute), inherit: false).Length != 0;
		}

		private static string GetUnderlyingTypeValueString(Type enumType, object enumValue)
		{
			return Convert.ChangeType(enumValue, Enum.GetUnderlyingType(enumType), CultureInfo.InvariantCulture).ToString();
		}
	}
	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
	public sealed class FileExtensionsAttribute : DataTypeAttribute
	{
		private string _extensions;

		public string Extensions
		{
			get
			{
				if (!string.IsNullOrWhiteSpace(_extensions))
				{
					return _extensions;
				}
				return "png,jpg,jpeg,gif";
			}
			set
			{
				_extensions = value;
			}
		}

		private string ExtensionsFormatted => ExtensionsParsed.Aggregate((string left, string right) => left + ", " + right);

		private string ExtensionsNormalized => Extensions.Replace(" ", "").Replace(".", "").ToLowerInvariant();

		private IEnumerable<string> ExtensionsParsed => from e in ExtensionsNormalized.Split(new char[1] { ',' })
			select "." + e;

		public FileExtensionsAttribute()
			: base(DataType.Upload)
		{
			base.DefaultErrorMessage = "The {0} field only accepts files with the following extensions: {1}";
		}

		public override string FormatErrorMessage(string name)
		{
			return string.Format(CultureInfo.CurrentCulture, base.ErrorMessageString, name, ExtensionsFormatted);
		}

		public override bool IsValid(object value)
		{
			if (value == null)
			{
				return true;
			}
			if (value is string fileName)
			{
				return ValidateExtension(fileName);
			}
			return false;
		}

		private bool ValidateExtension(string fileName)
		{
			try
			{
				return ExtensionsParsed.Contains(Path.GetExtension(fileName).ToLowerInvariant());
			}
			catch (ArgumentException)
			{
				return false;
			}
		}
	}
	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
	public sealed class FilterUIHintAttribute : Attribute
	{
		private UIHintAttribute.UIHintImplementation _implementation;

		public string FilterUIHint => _implementation.UIHint;

		public string PresentationLayer => _implementation.PresentationLayer;

		public IDictionary<string, object> ControlParameters => _implementation.ControlParameters;

		public override object TypeId => this;

		public FilterUIHintAttribute(string filterUIHint)
			: this(filterUIHint, null, new object[0])
		{
		}

		public FilterUIHintAttribute(string filterUIHint, string presentationLayer)
			: this(filterUIHint, presentationLayer, new object[0])
		{
		}

		public FilterUIHintAttribute(string filterUIHint, string presentationLayer, params object[] controlParameters)
		{
			_implementation = new UIHintAttribute.UIHintImplementation(filterUIHint, presentationLayer, controlParameters);
		}

		public override int GetHashCode()
		{
			return _implementation.GetHashCode();
		}

		public override bool Equals(object obj)
		{
			if (!(obj is FilterUIHintAttribute filterUIHintAttribute))
			{
				return false;
			}
			return _implementation.Equals(filterUIHintAttribute._implementation);
		}
	}
	public interface IValidatableObject
	{
		IEnumerable<ValidationResult> Validate(ValidationContext validationContext);
	}
	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
	public sealed class KeyAttribute : Attribute
	{
	}
	internal class LocalizableString
	{
		private string _propertyName;

		private string _propertyValue;

		private Type _resourceType;

		private Func<string> _cachedResult;

		public string Value
		{
			get
			{
				return _propertyValue;
			}
			set
			{
				if (_propertyValue != value)
				{
					ClearCache();
					_propertyValue = value;
				}
			}
		}

		public Type ResourceType
		{
			get
			{
				return _resourceType;
			}
			set
			{
				if (_resourceType != value)
				{
					ClearCache();
					_resourceType = value;
				}
			}
		}

		public LocalizableString(string propertyName)
		{
			_propertyName = propertyName;
		}

		private void ClearCache()
		{
			_cachedResult = null;
		}

		public string GetLocalizableValue()
		{
			if (_cachedResult == null)
			{
				if (_propertyValue == null || _resourceType == null)
				{
					_cachedResult = () => _propertyValue;
				}
				else
				{
					PropertyInfo property = _resourceType.GetProperty(_propertyValue);
					bool flag = false;
					if (!_resourceType.IsVisible || property == null || property.PropertyType != typeof(string))
					{
						flag = true;
					}
					else
					{
						MethodInfo getMethod = property.GetGetMethod();
						if (getMethod == null || !getMethod.IsPublic || !getMethod.IsStatic)
						{
							flag = true;
						}
					}
					if (flag)
					{
						string exceptionMessage = string.Format(CultureInfo.CurrentCulture, "Cannot retrieve property '{0}' because localization failed.  Type '{1}' is not public or does not contain a public static string property with the name '{2}'.", _propertyName, _resourceType.FullName, _propertyValue);
						_cachedResult = delegate
						{
							throw new InvalidOperationException(exceptionMessage);
						};
					}
					else
					{
						_cachedResult = () => (string)property.GetValue(null, null);
					}
				}
			}
			return _cachedResult();
		}
	}
	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
	public class MaxLengthAttribute : ValidationAttribute
	{
		private const int MaxAllowableLength = -1;

		public int Length { get; private set; }

		private static string DefaultErrorMessageString => "The field {0} must be a string or array type with a maximum length of '{1}'.";

		public MaxLengthAttribute(int length)
			: base(() => DefaultErrorMessageString)
		{
			Length = length;
		}

		public MaxLengthAttribute()
			: base(() => DefaultErrorMessageString)
		{
			Length = -1;
		}

		public override bool IsValid(object value)
		{
			EnsureLegalLengths();
			int num = 0;
			if (value == null)
			{
				return true;
			}
			num = ((!(value is string text)) ? ((Array)value).Length : text.Length);
			if (-1 != Length)
			{
				return num <= Length;
			}
			return true;
		}

		public override string FormatErrorMessage(string name)
		{
			return string.Format(CultureInfo.CurrentCulture, base.ErrorMessageString, name, Length);
		}

		private void EnsureLegalLengths()
		{
			if (Length == 0 || Length < -1)
			{
				throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "MaxLengthAttribute must have a Length value that is greater than zero. Use MaxLength() without parameters to indicate that the string or array can have the maximum allowable length."));
			}
		}
	}
	internal class MetadataPropertyDescriptorWrapper : PropertyDescriptor
	{
		private PropertyDescriptor _descriptor;

		private bool _isReadOnly;

		public override Type ComponentType => _descriptor.ComponentType;

		public override bool IsReadOnly
		{
			get
			{
				if (!_isReadOnly)
				{
					return _descriptor.IsReadOnly;
				}
				return true;
			}
		}

		public override Type PropertyType => _descriptor.PropertyType;

		public override bool SupportsChangeEvents => _descriptor.SupportsChangeEvents;

		public MetadataPropertyDescriptorWrapper(PropertyDescriptor descriptor, Attribute[] newAttributes)
			: base(descriptor, newAttributes)
		{
			_descriptor = descriptor;
			_isReadOnly = newAttributes.OfType<ReadOnlyAttribute>().FirstOrDefault()?.IsReadOnly ?? false;
		}

		public override void AddValueChanged(object component, EventHandler handler)
		{
			_descriptor.AddValueChanged(component, handler);
		}

		public override bool CanResetValue(object component)
		{
			return _descriptor.CanResetValue(component);
		}

		public override object GetValue(object component)
		{
			return _descriptor.GetValue(component);
		}

		public override void RemoveValueChanged(object component, EventHandler handler)
		{
			_descriptor.RemoveValueChanged(component, handler);
		}

		public override void ResetValue(object component)
		{
			_descriptor.ResetValue(component);
		}

		public override void SetValue(object component, object value)
		{
			_descriptor.SetValue(component, value);
		}

		public override bool ShouldSerializeValue(object component)
		{
			return _descriptor.ShouldSerializeValue(component);
		}
	}
	[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
	public sealed class MetadataTypeAttribute : Attribute
	{
		private Type _metadataClassType;

		public Type MetadataClassType
		{
			get
			{
				if (_metadataClassType == null)
				{
					throw new InvalidOperationException("MetadataClassType cannot be null.");
				}
				return _metadataClassType;
			}
		}

		public MetadataTypeAttribute(Type metadataClassType)
		{
			_metadataClassType = metadataClassType;
		}
	}
	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
	public class MinLengthAttribute : ValidationAttribute
	{
		public int Length { get; private set; }

		public MinLengthAttribute(int length)
			: base("The field {0} must be a string or array type with a minimum length of '{1}'.")
		{
			Length = length;
		}

		public override bool IsValid(object value)
		{
			EnsureLegalLengths();
			int num = 0;
			if (value == null)
			{
				return true;
			}
			num = ((!(value is string text)) ? ((Array)value).Length : text.Length);
			return num >= Length;
		}

		public override string FormatErrorMessage(string name)
		{
			return string.Format(CultureInfo.CurrentCulture, base.ErrorMessageString, name, Length);
		}

		private void EnsureLegalLengths()
		{
			if (Length < 0)
			{
				throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "MinLengthAttribute must have a Length value that is zero or greater."));
			}
		}
	}
	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
	public sealed class PhoneAttribute : DataTypeAttribute
	{
		private static Regex _regex = CreateRegEx();

		private const string _additionalPhoneNumberCharacters = "-.()";

		public PhoneAttribute()
			: base(DataType.PhoneNumber)
		{
			base.DefaultErrorMessage = "The {0} field is not a valid phone number.";
		}

		public override bool IsValid(object value)
		{
			if (value == null)
			{
				return true;
			}
			string text = value as string;
			if (_regex != null)
			{
				if (text != null)
				{
					return _regex.Match(text).Length > 0;
				}
				return false;
			}
			if (text == null)
			{
				return false;
			}
			text = text.Replace("+", string.Empty).TrimEnd(Array.Empty<char>());
			text = RemoveExtension(text);
			bool flag = false;
			string text2 = text;
			for (int i = 0; i < text2.Length; i++)
			{
				if (char.IsDigit(text2[i]))
				{
					flag = true;
					break;
				}
			}
			if (!flag)
			{
				return false;
			}
			text2 = text;
			foreach (char c in text2)
			{
				if (!char.IsDigit(c) && !char.IsWhiteSpace(c) && "-.()".IndexOf(c) == -1)
				{
					return false;
				}
			}
			return true;
		}

		private static Regex CreateRegEx()
		{
			if (AppSettings.DisableRegEx)
			{
				return null;
			}
			TimeSpan matchTimeout = TimeSpan.FromSeconds(2.0);
			try
			{
				if (AppDomain.CurrentDomain.GetData("REGEX_DEFAULT_MATCH_TIMEOUT") == null)
				{
					return new Regex("^(\\+\\s?)?((?<!\\+.*)\\(\\+?\\d+([\\s\\-\\.]?\\d+)?\\)|\\d+)([\\s\\-\\.]?(\\(\\d+([\\s\\-\\.]?\\d+)?\\)|\\d+))*(\\s?(x|ext\\.?)\\s?\\d+)?$", RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture | RegexOptions.Compiled, matchTimeout);
				}
			}
			catch
			{
			}
			return new Regex("^(\\+\\s?)?((?<!\\+.*)\\(\\+?\\d+([\\s\\-\\.]?\\d+)?\\)|\\d+)([\\s\\-\\.]?(\\(\\d+([\\s\\-\\.]?\\d+)?\\)|\\d+))*(\\s?(x|ext\\.?)\\s?\\d+)?$", RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture | RegexOptions.Compiled);
		}

		private static string RemoveExtension(string potentialPhoneNumber)
		{
			int num = potentialPhoneNumber.LastIndexOf("ext.", StringComparison.InvariantCultureIgnoreCase);
			if (num >= 0 && MatchesExtension(potentialPhoneNumber.Substring(num + 4)))
			{
				return potentialPhoneNumber.Substring(0, num);
			}
			num = potentialPhoneNumber.LastIndexOf("ext", StringComparison.InvariantCultureIgnoreCase);
			if (num >= 0 && MatchesExtension(potentialPhoneNumber.Substring(num + 3)))
			{
				return potentialPhoneNumber.Substring(0, num);
			}
			num = potentialPhoneNumber.LastIndexOf("x", StringComparison.InvariantCultureIgnoreCase);
			if (num >= 0 && MatchesExtension(potentialPhoneNumber.Substring(num + 1)))
			{
				return potentialPhoneNumber.Substring(0, num);
			}
			return potentialPhoneNumber;
		}

		private static bool MatchesExtension(string potentialExtension)
		{
			potentialExtension = potentialExtension.TrimStart(Array.Empty<char>());
			if (potentialExtension.Length == 0)
			{
				return false;
			}
			string text = potentialExtension;
			for (int i = 0; i < text.Length; i++)
			{
				if (!char.IsDigit(text[i]))
				{
					return false;
				}
			}
			return true;
		}
	}
	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
	public class RangeAttribute : ValidationAttribute
	{
		public object Minimum { get; private set; }

		public object Maximum { get; private set; }

		public Type OperandType { get; private set; }

		private Func<object, object> Conversion { get; set; }

		public RangeAttribute(int minimum, int maximum)
			: this()
		{
			Minimum = minimum;
			Maximum = maximum;
			OperandType = typeof(int);
		}

		public RangeAttribute(double minimum, double maximum)
			: this()
		{
			Minimum = minimum;
			Maximum = maximum;
			OperandType = typeof(double);
		}

		public RangeAttribute(Type type, string minimum, string maximum)
			: this()
		{
			OperandType = type;
			Minimum = minimum;
			Maximum = maximum;
		}

		private RangeAttribute()
			: base(() => "The field {0} must be between {1} and {2}.")
		{
		}

		private void Initialize(IComparable minimum, IComparable maximum, Func<object, object> conversion)
		{
			if (minimum.CompareTo(maximum) > 0)
			{
				throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "The maximum value '{0}' must be greater than or equal to the minimum value '{1}'.", maximum, minimum));
			}
			Minimum = minimum;
			Maximum = maximum;
			Conversion = conversion;
		}

		public override bool IsValid(object value)
		{
			SetupConversion();
			if (value == null)
			{
				return true;
			}
			if (value is string value2 && string.IsNullOrEmpty(value2))
			{
				return true;
			}
			object obj = null;
			try
			{
				obj = Conversion(value);
			}
			catch (FormatException)
			{
				return false;
			}
			catch (InvalidCastException)
			{
				return false;
			}
			catch (NotSupportedException)
			{
				return false;
			}
			IComparable obj2 = (IComparable)Minimum;
			IComparable comparable = (IComparable)Maximum;
			if (obj2.CompareTo(obj) <= 0)
			{
				return comparable.CompareTo(obj) >= 0;
			}
			return false;
		}

		public override string FormatErrorMessage(string name)
		{
			SetupConversion();
			return string.Format(CultureInfo.CurrentCulture, base.ErrorMessageString, name, Minimum, Maximum);
		}

		private void SetupConversion()
		{
			if (Conversion != null)
			{
				return;
			}
			object minimum = Minimum;
			object maximum = Maximum;
			if (minimum == null || maximum == null)
			{
				throw new InvalidOperationException("The minimum and maximum values must be set.");
			}
			Type type2 = minimum.GetType();
			if (type2 == typeof(int))
			{
				Initialize((int)minimum, (int)maximum, (object v) => Convert.ToInt32(v, CultureInfo.InvariantCulture));
				return;
			}
			if (type2 == typeof(double))
			{
				Initialize((double)minimum, (double)maximum, (object v) => Convert.ToDouble(v, CultureInfo.InvariantCulture));
				return;
			}
			Type type = OperandType;
			if (type == null)
			{
				throw new InvalidOperationException("The OperandType must be set when strings are used for minimum and maximum values.");
			}
			Type typeFromHandle = typeof(IComparable);
			if (!typeFromHandle.IsAssignableFrom(type))
			{
				throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "The type {0} must implement {1}.", type.FullName, typeFromHandle.FullName));
			}
			TypeConverter converter = TypeDescriptor.GetConverter(type);
			IComparable minimum2 = (IComparable)converter.ConvertFromString((string)minimum);
			IComparable maximum2 = (IComparable)converter.ConvertFromString((string)maximum);
			Func<object, object> conversion = (object value) => (value == null || !(value.GetType() == type)) ? converter.ConvertFrom(value) : value;
			Initialize(minimum2, maximum2, conversion);
		}
	}
	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
	public class RegularExpressionAttribute : ValidationAttribute
	{
		private int _matchTimeoutInMilliseconds;

		private bool _matchTimeoutSet;

		public string Pattern { get; private set; }

		public int MatchTimeoutInMilliseconds
		{
			get
			{
				return _matchTimeoutInMilliseconds;
			}
			set
			{
				_matchTimeoutInMilliseconds = value;
				_matchTimeoutSet = true;
			}
		}

		private Regex Regex { get; set; }

		public RegularExpressionAttribute(string pattern)
			: base(() => "The field {0} must match the regular expression '{1}'.")
		{
			Pattern = pattern;
		}

		public override bool IsValid(object value)
		{
			SetupRegex();
			string text = Convert.ToString(value, CultureInfo.CurrentCulture);
			if (string.IsNullOrEmpty(text))
			{
				return true;
			}
			Match match = Regex.Match(text);
			if (match.Success && match.Index == 0)
			{
				return match.Length == text.Length;
			}
			return false;
		}

		public override string FormatErrorMessage(string name)
		{
			SetupRegex();
			return string.Format(CultureInfo.CurrentCulture, base.ErrorMessageString, name, Pattern);
		}

		private void SetupRegex()
		{
			if (Regex == null)
			{
				if (string.IsNullOrEmpty(Pattern))
				{
					throw new InvalidOperationException("The pattern must be set to a valid regular expression.");
				}
				if (!_matchTimeoutSet)
				{
					MatchTimeoutInMilliseconds = GetDefaultTimeout();
				}
				Regex regex3;
				if (MatchTimeoutInMilliseconds != -1)
				{
					Regex regex2 = (Regex = new Regex(Pattern, RegexOptions.None, TimeSpan.FromMilliseconds(MatchTimeoutInMilliseconds)));
					regex3 = regex2;
				}
				else
				{
					regex3 = new Regex(Pattern);
				}
				Regex = regex3;
			}
		}

		private static int GetDefaultTimeout()
		{
			return 2000;
		}
	}
	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
	public class RequiredAttribute : ValidationAttribute
	{
		public bool AllowEmptyStrings { get; set; }

		public RequiredAttribute()
			: base(() => "The {0} field is required.")
		{
		}

		public override bool IsValid(object value)
		{
			if (value == null)
			{
				return false;
			}
			if (value is string text && !AllowEmptyStrings)
			{
				return text.Trim().Length != 0;
			}
			return true;
		}
	}
	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
	public class ScaffoldColumnAttribute : Attribute
	{
		public bool Scaffold { get; private set; }

		public ScaffoldColumnAttribute(bool scaffold)
		{
			Scaffold = scaffold;
		}
	}
	[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
	public class ScaffoldTableAttribute : Attribute
	{
		public bool Scaffold { get; private set; }

		public ScaffoldTableAttribute(bool scaffold)
		{
			Scaffold = scaffold;
		}
	}
	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
	public class StringLengthAttribute : ValidationAttribute
	{
		public int MaximumLength { get; private set; }

		public int MinimumLength { get; set; }

		public StringLengthAttribute(int maximumLength)
			: base(() => "The field {0} must be a string with a maximum length of {1}.")
		{
			MaximumLength = maximumLength;
		}

		public override bool IsValid(object value)
		{
			EnsureLegalLengths();
			int num = ((value != null) ? ((string)value).Length : 0);
			if (value != null)
			{
				if (num >= MinimumLength)
				{
					return num <= MaximumLength;
				}
				return false;
			}
			return true;
		}

		public override string FormatErrorMessage(string name)
		{
			EnsureLegalLengths();
			string format = ((MinimumLength != 0 && !base.CustomErrorMessageSet) ? "The field {0} must be a string with a minimum length of {2} and a maximum length of {1}." : base.ErrorMessageString);
			return string.Format(CultureInfo.CurrentCulture, format, name, MaximumLength, MinimumLength);
		}

		private void EnsureLegalLengths()
		{
			if (MaximumLength < 0)
			{
				throw new InvalidOperationException("The maximum length must be a nonnegative integer.");
			}
			if (MaximumLength < MinimumLength)
			{
				throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "The maximum value '{0}' must be greater than or equal to the minimum value '{1}'.", MaximumLength, MinimumLength));
			}
		}
	}
	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
	public sealed class TimestampAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = true)]
	public class UIHintAttribute : Attribute
	{
		internal class UIHintImplementation
		{
			private IDictionary<string, object> _controlParameters;

			private object[] _inputControlParameters;

			public string UIHint { get; private set; }

			public string PresentationLayer { get; private set; }

			public IDictionary<string, object> ControlParameters
			{
				get
				{
					if (_controlParameters == null)
					{
						_controlParameters = BuildControlParametersDictionary();
					}
					return _controlParameters;
				}
			}

			public UIHintImplementation(string uiHint, string presentationLayer, params object[] controlParameters)
			{
				UIHint = uiHint;
				PresentationLayer = presentationLayer;
				if (controlParameters != null)
				{
					_inputControlParameters = new object[controlParameters.Length];
					Array.Copy(controlParameters, _inputControlParameters, controlParameters.Length);
				}
			}

			public override int GetHashCode()
			{
				string obj = UIHint ?? string.Empty;
				string text = PresentationLayer ?? string.Empty;
				return obj.GetHashCode() ^ text.GetHashCode();
			}

			public override bool Equals(object obj)
			{
				UIHintImplementation uIHintImplementation = (UIHintImplementation)obj;
				if (UIHint != uIHintImplementation.UIHint || PresentationLayer != uIHintImplementation.PresentationLayer)
				{
					return false;
				}
				IDictionary<string, object> controlParameters;
				IDictionary<string, object> controlParameters2;
				try
				{
					controlParameters = ControlParameters;
					controlParameters2 = uIHintImplementation.ControlParameters;
				}
				catch (InvalidOperationException)
				{
					return false;
				}
				if (controlParameters.Count != controlParameters2.Count)
				{
					return false;
				}
				return controlParameters.OrderBy((KeyValuePair<string, object> p) => p.Key).SequenceEqual(controlParameters2.OrderBy((KeyValuePair<string, object> p) => p.Key));
			}

			private IDictionary<string, object> BuildControlParametersDictionary()
			{
				IDictionary<string, object> dictionary = new Dictionary<string, object>();
				object[] inputControlParameters = _inputControlParameters;
				if (inputControlParameters == null || inputControlParameters.Length == 0)
				{
					return dictionary;
				}
				if (inputControlParameters.Length % 2 != 0)
				{
					throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "The number of control parameters must be even."));
				}
				for (int i = 0; i < inputControlParameters.Length; i += 2)
				{
					object obj = inputControlParameters[i];
					object value = inputControlParameters[i + 1];
					if (obj == null)
					{
						throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "The key parameter at position {0} is null. Every key control parameter must be a string.", i));
					}
					if (!(obj is string text))
					{
						throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "The key parameter at position {0} with value '{1}' is not a string. Every key control parameter must be a string.", i, inputControlParameters[i].ToString()));
					}
					if (dictionary.ContainsKey(text))
					{
						throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "The key parameter at position {0} with value '{1}' occurs more than once.", i, text));
					}
					dictionary[text] = value;
				}
				return dictionary;
			}
		}

		private UIHintImplementation _implementation;

		public string UIHint => _implementation.UIHint;

		public string PresentationLayer => _implementation.PresentationLayer;

		public IDictionary<string, object> ControlParameters => _implementation.ControlParameters;

		public override object TypeId => this;

		public UIHintAttribute(string uiHint)
			: this(uiHint, null, new object[0])
		{
		}

		public UIHintAttribute(string uiHint, string presentationLayer)
			: this(uiHint, presentationLayer, new object[0])
		{
		}

		public UIHintAttribute(string uiHint, string presentationLayer, params object[] controlParameters)
		{
			_implementation = new UIHintImplementation(uiHint, presentationLayer, controlParameters);
		}

		public override int GetHashCode()
		{
			return _implementation.GetHashCode();
		}

		public override bool Equals(object obj)
		{
			if (!(obj is UIHintAttribute uIHintAttribute))
			{
				return false;
			}
			return _implementation.Equals(uIHintAttribute._implementation);
		}
	}
	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
	public sealed class UrlAttribute : DataTypeAttribute
	{
		private static Regex _regex = CreateRegEx();

		public UrlAttribute()
			: base(DataType.Url)
		{
			base.DefaultErrorMessage = "The {0} field is not a valid fully-qualified http, https, or ftp URL.";
		}

		public override bool IsValid(object value)
		{
			if (value == null)
			{
				return true;
			}
			string text = value as string;
			if (_regex != null)
			{
				if (text != null)
				{
					return _regex.Match(text).Length > 0;
				}
				return false;
			}
			if (text != null)
			{
				if (!text.StartsWith("http://", StringComparison.InvariantCultureIgnoreCase) && !text.StartsWith("https://", StringComparison.InvariantCultureIgnoreCase))
				{
					return text.StartsWith("ftp://", StringComparison.InvariantCultureIgnoreCase);
				}
				return true;
			}
			return false;
		}

		private static Regex CreateRegEx()
		{
			if (AppSettings.DisableRegEx)
			{
				return null;
			}
			TimeSpan matchTimeout = TimeSpan.FromSeconds(2.0);
			try
			{
				if (AppDomain.CurrentDomain.GetData("REGEX_DEFAULT_MATCH_TIMEOUT") == null)
				{
					return new Regex("^(https?|ftp):\\/\\/(((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:)*@)?(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5]))|((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?)(:\\d*)?)(\\/((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)+(\\/(([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)*)*)?)?(\\?((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|[\\uE000-\\uF8FF]|\\/|\\?)*)?(\\#((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|\\/|\\?)*)?$", RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture | RegexOptions.Compiled, matchTimeout);
				}
			}
			catch
			{
			}
			return new Regex("^(https?|ftp):\\/\\/(((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:)*@)?(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5]))|((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?)(:\\d*)?)(\\/((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)+(\\/(([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)*)*)?)?(\\?((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|[\\uE000-\\uF8FF]|\\/|\\?)*)?(\\#((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|\\/|\\?)*)?$", RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture | RegexOptions.Compiled);
		}
	}
	public abstract class ValidationAttribute : Attribute
	{
		private string _errorMessage;

		private Func<string> _errorMessageResourceAccessor;

		private string _errorMessageResourceName;

		private Type _errorMessageResourceType;

		private string _defaultErrorMessage;

		private volatile bool _hasBaseIsValid;

		internal string DefaultErrorMessage
		{
			get
			{
				return _defaultErrorMessage;
			}
			set
			{
				_defaultErrorMessage = value;
				_errorMessageResourceAccessor = null;
				CustomErrorMessageSet = true;
			}
		}

		protected string ErrorMessageString
		{
			get
			{
				SetupResourceAccessor();
				return _errorMessageResourceAccessor();
			}
		}

		internal bool CustomErrorMessageSet { get; private set; }

		public virtual bool RequiresValidationContext => false;

		public string ErrorMessage
		{
			get
			{
				return _errorMessage ?? _defaultErrorMessage;
			}
			set
			{
				_errorMessage = value;
				_errorMessageResourceAccessor = null;
				CustomErrorMessageSet = true;
				if (value == null)
				{
					_defaultErrorMessage = null;
				}
			}
		}

		public string ErrorMessageResourceName
		{
			get
			{
				return _errorMessageResourceName;
			}
			set
			{
				_errorMessageResourceName = value;
				_errorMessageResourceAccessor = null;
				CustomErrorMessageSet = true;
			}
		}

		public Type ErrorMessageResourceType
		{
			get
			{
				return _errorMessageResourceType;
			}
			set
			{
				_errorMessageResourceType = value;
				_errorMessageResourceAccessor = null;
				CustomErrorMessageSet = true;
			}
		}

		protected ValidationAttribute()
			: this(() => "The field {0} is invalid.")
		{
		}

		protected ValidationAttribute(string errorMessage)
			: this(() => errorMessage)
		{
		}

		protected ValidationAttribute(Func<string> errorMessageAccessor)
		{
			_errorMessageResourceAccessor = errorMessageAccessor;
		}

		private void SetupResourceAccessor()
		{
			if (_errorMessageResourceAccessor != null)
			{
				return;
			}
			string localErrorMessage = ErrorMessage;
			bool flag = !string.IsNullOrEmpty(_errorMessageResourceName);
			bool flag2 = !string.IsNullOrEmpty(_errorMessage);
			bool num = _errorMessageResourceType != null;
			bool flag3 = !string.IsNullOrEmpty(_defaultErrorMessage);
			if ((flag && flag2) || !(flag || flag2 || flag3))
			{
				throw new InvalidOperationException("Either ErrorMessageString or ErrorMessageResourceName must be set, but not both.");
			}
			if (num != flag)
			{
				throw new InvalidOperationException("Both ErrorMessageResourceType and ErrorMessageResourceName need to be set on this attribute.");
			}
			if (flag)
			{
				SetResourceAccessorByPropertyLookup();
				return;
			}
			_errorMessageResourceAccessor = () => localErrorMessage;
		}

		private void SetResourceAccessorByPropertyLookup()
		{
			if (_errorMessageResourceType != null && !string.IsNullOrEmpty(_errorMessageResourceName))
			{
				PropertyInfo property = _errorMessageResourceType.GetProperty(_errorMessageResourceName, BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
				if (property != null)
				{
					MethodInfo getMethod = property.GetGetMethod(nonPublic: true);
					if (getMethod == null || (!getMethod.IsAssembly && !getMethod.IsPublic))
					{
						property = null;
					}
				}
				if (property == null)
				{
					throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "The resource type '{0}' does not have an accessible static property named '{1}'.", _errorMessageResourceType.FullName, _errorMessageResourceName));
				}
				if (property.PropertyType != typeof(string))
				{
					throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "The property '{0}' on resource type '{1}' is not a string type.", property.Name, _errorMessageResourceType.FullName));
				}
				_errorMessageResourceAccessor = () => (string)property.GetValue(null, null);
				return;
			}
			throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "Both ErrorMessageResourceType and ErrorMessageResourceName need to be set on this attribute."));
		}

		public virtual string FormatErrorMessage(string name)
		{
			return string.Format(CultureInfo.CurrentCulture, ErrorMessageString, name);
		}

		public virtual bool IsValid(object value)
		{
			if (!_hasBaseIsValid)
			{
				_hasBaseIsValid = true;
			}
			return IsValid(value, null) == null;
		}

		protected virtual ValidationResult IsValid(object value, ValidationContext validationContext)
		{
			if (_hasBaseIsValid)
			{
				throw new NotImplementedException("IsValid(object value) has not been implemented by this class.  The preferred entry point is GetValidationResult() and classes should override IsValid(object value, ValidationContext context).");
			}
			ValidationResult result = ValidationResult.Success;
			if (!IsValid(value))
			{
				string[] memberNames = ((validationContext.MemberName == null) ? null : new string[1] { validationContext.MemberName });
				result = new ValidationResult(FormatErrorMessage(validationContext.DisplayName), memberNames);
			}
			return result;
		}

		public ValidationResult GetValidationResult(object value, ValidationContext validationContext)
		{
			if (validationContext == null)
			{
				throw new ArgumentNullException("validationContext");
			}
			ValidationResult validationResult = IsValid(value, validationContext);
			if (validationResult != null && (validationResult == null || string.IsNullOrEmpty(validationResult.ErrorMessage)))
			{
				validationResult = new ValidationResult(FormatErrorMessage(validationContext.DisplayName), validationResult.MemberNames);
			}
			return validationResult;
		}

		public void Validate(object value, string name)
		{
			if (!IsValid(value))
			{
				throw new ValidationException(FormatErrorMessage(name), this, value);
			}
		}

		public void Validate(object value, ValidationContext validationContext)
		{
			if (validationContext == null)
			{
				throw new ArgumentNullException("validationContext");
			}
			ValidationResult validationResult = GetValidationResult(value, validationContext);
			if (validationResult != null)
			{
				throw new ValidationException(validationResult, this, value);
			}
		}
	}
	internal class ValidationAttributeStore
	{
		private abstract class StoreItem
		{
			private static IEnumerable<ValidationAttribute> _emptyValidationAttributeEnumerable = new ValidationAttribute[0];

			private IEnumerable<ValidationAttribute> _validationAttributes;

			internal IEnumerable<ValidationAttribute> ValidationAttributes => _validationAttributes;

			internal DisplayAttribute DisplayAttribute { get; set; }

			internal StoreItem(IEnumerable<Attribute> attributes)
			{
				_validationAttributes = attributes.OfType<ValidationAttribute>();
				DisplayAttribute = attributes.OfType<DisplayAttribute>().SingleOrDefault();
			}
		}

		private class TypeStoreItem : StoreItem
		{
			private object _syncRoot = new object();

			private Type _type;

			private Dictionary<string, PropertyStoreItem> _propertyStoreItems;

			internal TypeStoreItem(Type type, IEnumerable<Attribute> attributes)
				: base(attributes)
			{
				_type = type;
			}

			internal PropertyStoreItem GetPropertyStoreItem(string propertyName)
			{
				PropertyStoreItem item = null;
				if (!TryGetPropertyStoreItem(propertyName, out item))
				{
					throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "The type '{0}' does not contain a public property named '{1}'.", _type.Name, propertyName), "propertyName");
				}
				return item;
			}

			internal bool TryGetPropertyStoreItem(string propertyName, out PropertyStoreItem item)
			{
				if (string.IsNullOrEmpty(propertyName))
				{
					throw new ArgumentNullException("propertyName");
				}
				if (_propertyStoreItems == null)
				{
					lock (_syncRoot)
					{
						if (_propertyStoreItems == null)
						{
							_propertyStoreItems = CreatePropertyStoreItems();
						}
					}
				}
				if (!_propertyStoreItems.TryGetValue(propertyName, out item))
				{
					return false;
				}
				return true;
			}

			private Dictionary<string, PropertyStoreItem> CreatePropertyStoreItems()
			{
				Dictionary<string, PropertyStoreItem> dictionary = new Dictionary<string, PropertyStoreItem>();
				foreach (PropertyDescriptor property in TypeDescriptor.GetProperties(_type))
				{
					PropertyStoreItem value = new PropertyStoreItem(property.PropertyType, GetExplicitAttributes(property).Cast<Attribute>());
					dictionary[property.Name] = value;
				}
				return dictionary;
			}

			public static AttributeCollection GetExplicitAttributes(PropertyDescriptor propertyDescriptor)
			{
				List<Attribute> list = new List<Attribute>(propertyDescriptor.Attributes.Cast<Attribute>());
				IEnumerable<Attribute> enumerable = TypeDescriptor.GetAttributes(propertyDescriptor.PropertyType).Cast<Attribute>();
				bool flag = false;
				foreach (Attribute item in enumerable)
				{
					for (int num = list.Count - 1; num >= 0; num--)
					{
						if (item == list[num])
						{
							list.RemoveAt(num);
							flag = true;
						}
					}
				}
				if (!flag)
				{
					return propertyDescriptor.Attributes;
				}
				return new AttributeCollection(list.ToArray());
			}
		}

		private class PropertyStoreItem : StoreItem
		{
			private Type _propertyType;

			internal Type PropertyType => _propertyType;

			internal PropertyStoreItem(Type propertyType, IEnumerable<Attribute> attributes)
				: base(attributes)
			{
				_propertyType = propertyType;
			}
		}

		private static ValidationAttributeStore _singleton = new ValidationAttributeStore();

		private Dictionary<Type, TypeStoreItem> _typeStoreItems = new Dictionary<Type, TypeStoreItem>();

		internal static ValidationAttributeStore Instance => _singleton;

		internal IEnumerable<ValidationAttribute> GetTypeValidationAttributes(ValidationContext validationContext)
		{
			EnsureValidationContext(validationContext);
			return GetTypeStoreItem(validationContext.ObjectType).ValidationAttributes;
		}

		internal DisplayAttribute GetTypeDisplayAttribute(ValidationContext validationContext)
		{
			EnsureValidationContext(validationContext);
			return GetTypeStoreItem(validationContext.ObjectType).DisplayAttribute;
		}

		internal IEnumerable<ValidationAttribute> GetPropertyValidationAttributes(ValidationContext validationContext)
		{
			EnsureValidationContext(validationContext);
			return GetTypeStoreItem(validationContext.ObjectType).GetPropertyStoreItem(validationContext.MemberName).ValidationAttributes;
		}

		internal DisplayAttribute GetPropertyDisplayAttribute(ValidationContext validationContext)
		{
			EnsureValidationContext(validationContext);
			return GetTypeStoreItem(validationContext.ObjectType).GetPropertyStoreItem(validationContext.MemberName).DisplayAttribute;
		}

		internal Type GetPropertyType(ValidationContext validationContext)
		{
			EnsureValidationContext(validationContext);
			return GetTypeStoreItem(validationContext.ObjectType).GetPropertyStoreItem(validationContext.MemberName).PropertyType;
		}

		internal bool IsPropertyContext(ValidationContext validationContext)
		{
			EnsureValidationContext(validationContext);
			TypeStoreItem typeStoreItem = GetTypeStoreItem(validationContext.ObjectType);
			PropertyStoreItem item = null;
			return typeStoreItem.TryGetPropertyStoreItem(validationContext.MemberName, out item);
		}

		private TypeStoreItem GetTypeStoreItem(Type type)
		{
			if (type == null)
			{
				throw new ArgumentNullException("type");
			}
			lock (_typeStoreItems)
			{
				TypeStoreItem value = null;
				if (!_typeStoreItems.TryGetValue(type, out value))
				{
					IEnumerable<Attribute> attributes = TypeDescriptor.GetAttributes(type).Cast<Attribute>();
					value = new TypeStoreItem(type, attributes);
					_typeStoreItems[type] = value;
				}
				return value;
			}
		}

		private static void EnsureValidationContext(ValidationContext validationContext)
		{
			if (validationContext == null)
			{
				throw new ArgumentNullException("validationContext");
			}
		}
	}
	public sealed class ValidationContext : IServiceProvider
	{
		private class ValidationContextServiceContainer : IServiceContainer, IServiceProvider
		{
			private IServiceContainer _parentContainer;

			private Dictionary<Type, object> _services = new Dictionary<Type, object>();

			private readonly object _lock = new object();

			internal ValidationContextServiceContainer()
			{
			}

			internal ValidationContextServiceContainer(IServiceContainer parentContainer)
			{
				_parentContainer = parentContainer;
			}

			public void AddService(Type serviceType, ServiceCreatorCallback callback, bool promote)
			{
				if (promote && _parentContainer != null)
				{
					_parentContainer.AddService(serviceType, callback, promote);
					return;
				}
				lock (_lock)
				{
					if (_services.ContainsKey(serviceType))
					{
						throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "A service of type '{0}' already exists in the container.", serviceType), "serviceType");
					}
					_services.Add(serviceType, callback);
				}
			}

			public void AddService(Type serviceType, ServiceCreatorCallback callback)
			{
				AddService(serviceType, callback, promote: true);
			}

			public void AddService(Type serviceType, object serviceInstance, bool promote)
			{
				if (promote && _parentContainer != null)
				{
					_parentContainer.AddService(serviceType, serviceInstance, promote);
					return;
				}
				lock (_lock)
				{
					if (_services.ContainsKey(serviceType))
					{
						throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "A service of type '{0}' already exists in the container.", serviceType), "serviceType");
					}
					_services.Add(serviceType, serviceInstance);
				}
			}

			public void AddService(Type serviceType, object serviceInstance)
			{
				AddService(serviceType, serviceInstance, promote: true);
			}

			public void RemoveService(Type serviceType, bool promote)
			{
				lock (_lock)
				{
					if (_services.ContainsKey(serviceType))
					{
						_services.Remove(serviceType);
					}
				}
				if (promote && _parentContainer != null)
				{
					_parentContainer.RemoveService(serviceType);
				}
			}

			public void RemoveService(Type serviceType)
			{
				RemoveService(serviceType, promote: true);
			}

			public object GetService(Type serviceType)
			{
				if (serviceType == null)
				{
					throw new ArgumentNullException("serviceType");
				}
				object value = null;
				_services.TryGetValue(serviceType, out value);
				if (value == null && _parentContainer != null)
				{
					value = _parentContainer.GetService(serviceType);
				}
				if (value is ServiceCreatorCallback serviceCreatorCallback)
				{
					value = serviceCreatorCallback(this, serviceType);
				}
				return value;
			}
		}

		private Func<Type, object> _serviceProvider;

		private object _objectInstance;

		private string _memberName;

		private string _displayName;

		private Dictionary<object, object> _items;

		private IServiceContainer _serviceContainer;

		public object ObjectInstance => _objectInstance;

		public Type ObjectType => ObjectInstance.GetType();

		public string DisplayName
		{
			get
			{
				if (string.IsNullOrEmpty(_displayName))
				{
					_displayName = GetDisplayName();
					if (string.IsNullOrEmpty(_displayName))
					{
						_displayName = MemberName;
						if (string.IsNullOrEmpty(_displayName))
						{
							_displayName = ObjectType.Name;
						}
					}
				}
				return _displayName;
			}
			set
			{
				if (string.IsNullOrEmpty(value))
				{
					throw new ArgumentNullException("value");
				}
				_displayName = value;
			}
		}

		public string MemberName
		{
			get
			{
				return _memberName;
			}
			set
			{
				_memberName = value;
			}
		}

		public IDictionary<object, object> Items => _items;

		public IServiceContainer ServiceContainer
		{
			get
			{
				if (_serviceContainer == null)
				{
					_serviceContainer = new ValidationContextServiceContainer();
				}
				return _serviceContainer;
			}
		}

		public ValidationContext(object instance)
			: this(instance, null, null)
		{
		}

		public ValidationContext(object instance, IDictionary<object, object> items)
			: this(instance, null, items)
		{
		}

		public ValidationContext(object instance, IServiceProvider serviceProvider, IDictionary<object, object> items)
		{
			if (instance == null)
			{
				throw new ArgumentNullException("instance");
			}
			if (serviceProvider != null)
			{
				InitializeServiceProvider((Type serviceType) => serviceProvider.GetService(serviceType));
			}
			if (serviceProvider is IServiceContainer parentContainer)
			{
				_serviceContainer = new ValidationContextServiceContainer(parentContainer);
			}
			else
			{
				_serviceContainer = new ValidationContextServiceContainer();
			}
			if (items != null)
			{
				_items = new Dictionary<object, object>(items);
			}
			else
			{
				_items = new Dictionary<object, object>();
			}
			_objectInstance = instance;
		}

		private string GetDisplayName()
		{
			string text = null;
			ValidationAttributeStore instance = ValidationAttributeStore.Instance;
			DisplayAttribute displayAttribute = null;
			if (string.IsNullOrEmpty(_memberName))
			{
				displayAttribute = instance.GetTypeDisplayAttribute(this);
			}
			else if (instance.IsPropertyContext(this))
			{
				displayAttribute = instance.GetPropertyDisplayAttribute(this);
			}
			if (displayAttribute != null)
			{
				text = displayAttribute.GetName();
			}
			return text ?? MemberName;
		}

		public void InitializeServiceProvider(Func<Type, object> serviceProvider)
		{
			_serviceProvider = serviceProvider;
		}

		public object GetService(Type serviceType)
		{
			object obj = null;
			if (_serviceContainer != null)
			{
				obj = _serviceContainer.GetService(serviceType);
			}
			if (obj == null && _serviceProvider != null)
			{
				obj = _serviceProvider(serviceType);
			}
			return obj;
		}
	}
	[Serializable]
	public class ValidationException : Exception
	{
		private ValidationResult _validationResult;

		public ValidationAttribute ValidationAttribute { get; private set; }

		public ValidationResult ValidationResult
		{
			get
			{
				if (_validationResult == null)
				{
					_validationResult = new ValidationResult(Message);
				}
				return _validationResult;
			}
		}

		public object Value { get; private set; }

		public ValidationException(ValidationResult validationResult, ValidationAttribute validatingAttribute, object value)
			: this(validationResult.ErrorMessage, validatingAttribute, value)
		{
			_validationResult = validationResult;
		}

		public ValidationException(string errorMessage, ValidationAttribute validatingAttribute, object value)
			: base(errorMessage)
		{
			Value = value;
			ValidationAttribute = validatingAttribute;
		}

		public ValidationException()
		{
		}

		public ValidationException(string message)
			: base(message)
		{
		}

		public ValidationException(string message, Exception innerException)
			: base(message, innerException)
		{
		}

		protected ValidationException(SerializationInfo info, StreamingContext context)
			: base(info, context)
		{
		}
	}
	public class ValidationResult
	{
		private IEnumerable<string> _memberNames;

		private string _errorMessage;

		public static readonly ValidationResult Success;

		public IEnumerable<string> MemberNames => _memberNames;

		public string ErrorMessage
		{
			get
			{
				return _errorMessage;
			}
			set
			{
				_errorMessage = value;
			}
		}

		public ValidationResult(string errorMessage)
			: this(errorMessage, null)
		{
		}

		public ValidationResult(string errorMessage, IEnumerable<string> memberNames)
		{
			_errorMessage = errorMessage;
			_memberNames = memberNames ?? new string[0];
		}

		protected ValidationResult(ValidationResult validationResult)
		{
			if (validationResult == null)
			{
				throw new ArgumentNullException("validationResult");
			}
			_errorMessage = validationResult._errorMessage;
			_memberNames = validationResult._memberNames;
		}

		public override string ToString()
		{
			return ErrorMessage ?? base.ToString();
		}
	}
	public static class Validator
	{
		private class ValidationError
		{
			internal object Value { get; set; }

			internal ValidationAttribute ValidationAttribute { get; set; }

			internal ValidationResult ValidationResult { get; set; }

			internal ValidationError(ValidationAttribute validationAttribute, object value, ValidationResult validationResult)
			{
				ValidationAttribute = validationAttribute;
				ValidationResult = validationResult;
				Value = value;
			}

			internal void ThrowValidationException()
			{
				throw new ValidationException(ValidationResult, ValidationAttribute, Value);
			}
		}

		private static ValidationAttributeStore _store = ValidationAttributeStore.Instance;

		public static bool TryValidateProperty(object value, ValidationContext validationContext, ICollection<ValidationResult> validationResults)
		{
			Type propertyType = _store.GetPropertyType(validationContext);
			EnsureValidPropertyType(validationContext.MemberName, propertyType, value);
			bool result = true;
			bool breakOnFirstError = validationResults == null;
			IEnumerable<ValidationAttribute> propertyValidationAttributes = _store.GetPropertyValidationAttributes(validationContext);
			foreach (ValidationError validationError in GetValidationErrors(value, validationContext, propertyValidationAttributes, breakOnFirstError))
			{
				result = false;
				validationResults?.Add(validationError.ValidationResult);
			}
			return result;
		}

		public static bool TryValidateObject(object instance, ValidationContext validationContext, ICollection<ValidationResult> validationResults)
		{
			return TryValidateObject(instance, validationContext, validationResults, validateAllProperties: false);
		}

		public static bool TryValidateObject(object instance, ValidationContext validationContext, ICollection<ValidationResult> validationResults, bool validateAllProperties)
		{
			if (instance == null)
			{
				throw new ArgumentNullException("instance");
			}
			if (validationContext != null && instance != validationContext.ObjectInstance)
			{
				throw new ArgumentException("The instance provided must match the ObjectInstance on the ValidationContext supplied.", "instance");
			}
			bool result = true;
			bool breakOnFirstError = validationResults == null;
			foreach (ValidationError objectValidationError in GetObjectValidationErrors(instance, validationContext, validateAllProperties, breakOnFirstError))
			{
				result = false;
				validationResults?.Add(objectValidationError.ValidationResult);
			}
			return result;
		}

		public static bool TryValidateValue(object value, ValidationContext validationContext, ICollection<ValidationResult> validationResults, IEnumerable<ValidationAttribute> validationAttributes)
		{
			bool result = true;
			bool breakOnFirstError = validationResults == null;
			foreach (ValidationError validationError in GetValidationErrors(value, validationContext, validationAttributes, breakOnFirstError))
			{
				result = false;
				validationResults?.Add(validationError.ValidationResult);
			}
			return result;
		}

		public static void ValidateProperty(object value, ValidationContext validationContext)
		{
			Type propertyType = _store.GetPropertyType(validationContext);
			EnsureValidPropertyType(validationContext.MemberName, propertyType, value);
			IEnumerable<ValidationAttribute> propertyValidationAttributes = _store.GetPropertyValidationAttributes(validationContext);
			GetValidationErrors(value, validationContext, propertyValidationAttributes, breakOnFirstError: false).FirstOrDefault()?.ThrowValidationException();
		}

		public static void ValidateObject(object instance, ValidationContext validationContext)
		{
			ValidateObject(instance, validationContext, validateAllProperties: false);
		}

		public static void ValidateObject(object instance, ValidationContext validationContext, bool validateAllProperties)
		{
			if (instance == null)
			{
				throw new ArgumentNullException("instance");
			}
			if (validationContext == null)
			{
				throw new ArgumentNullException("validationContext");
			}
			if (instance != validationContext.ObjectInstance)
			{
				throw new ArgumentException("The instance provided must match the ObjectInstance on the ValidationContext supplied.", "instance");
			}
			GetObjectValidationErrors(instance, validationContext, validateAllProperties, breakOnFirstError: false).FirstOrDefault()?.ThrowValidationException();
		}

		public static void ValidateValue(object value, ValidationContext validationContext, IEnumerable<ValidationAttribute> validationAttributes)
		{
			if (validationContext == null)
			{
				throw new ArgumentNullException("validationContext");
			}
			GetValidationErrors(value, validationContext, validationAttributes, breakOnFirstError: false).FirstOrDefault()?.ThrowValidationException();
		}

		internal static ValidationContext CreateValidationContext(object instance, ValidationContext validationContext)
		{
			if (validationContext == null)
			{
				throw new ArgumentNullException("validationContext");
			}
			return new ValidationContext(instance, validationContext, validationContext.Items);
		}

		private static bool CanBeAssigned(Type destinationType, object value)
		{
			if (destinationType == null)
			{
				throw new ArgumentNullException("destinationType");
			}
			if (value == null)
			{
				if (destinationType.IsValueType)
				{
					if (destinationType.IsGenericType)
					{
						return destinationType.GetGenericTypeDefinition() == typeof(Nullable<>);
					}
					return false;
				}
				return true;
			}
			return destinationType.IsAssignableFrom(value.GetType());
		}

		private static void EnsureValidPropertyType(string propertyName, Type propertyType, object value)
		{
			if (!CanBeAssigned(propertyType, value))
			{
				throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "The value for property '{0}' must be of type '{1}'.", propertyName, propertyType), "value");
			}
		}

		private static IEnumerable<ValidationError> GetObjectValidationErrors(object instance, ValidationContext validationContext, bool validateAllProperties, bool breakOnFirstError)
		{
			if (instance == null)
			{
				throw new ArgumentNullException("instance");
			}
			if (validationContext == null)
			{
				throw new ArgumentNullException("validationContext");
			}
			List<ValidationError> list = new List<ValidationError>();
			list.AddRange(GetObjectPropertyValidationErrors(instance, validationContext, validateAllProperties, breakOnFirstError));
			if (list.Any())
			{
				return list;
			}
			IEnumerable<ValidationAttribute> typeValidationAttributes = _store.GetTypeValidationAttributes(validationContext);
			list.AddRange(GetValidationErrors(instance, validationContext, typeValidationAttributes, breakOnFirstError));
			if (list.Any())
			{
				return list;
			}
			if (instance is IValidatableObject validatableObject)
			{
				foreach (ValidationResult item in from r in validatableObject.Validate(validationContext)
					where r != ValidationResult.Success
					select r)
				{
					list.Add(new ValidationError(null, instance, item));
				}
			}
			return list;
		}

		private static IEnumerable<ValidationError> GetObjectPropertyValidationErrors(object instance, ValidationContext validationContext, bool validateAllProperties, bool breakOnFirstError)
		{
			ICollection<KeyValuePair<ValidationContext, object>> propertyValues = GetPropertyValues(instance, validationContext);
			List<ValidationError> list = new List<ValidationError>();
			foreach (KeyValuePair<ValidationContext, object> item in propertyValues)
			{
				IEnumerable<ValidationAttribute> propertyValidationAttributes = _store.GetPropertyValidationAttributes(item.Key);
				if (validateAllProperties)
				{
					list.AddRange(GetValidationErrors(item.Value, item.Key, propertyValidationAttributes, breakOnFirstError));
				}
				else if (propertyValidationAttributes.FirstOrDefault((ValidationAttribute a) => a is RequiredAttribute) is RequiredAttribute requiredAttribute)
				{
					ValidationResult validationResult = requiredAttribute.GetValidationResult(item.Value, item.Key);
					if (validationResult != ValidationResult.Success)
					{
						list.Add(new ValidationError(requiredAttribute, item.Value, validationResult));
					}
				}
				if (breakOnFirstError && list.Any())
				{
					break;
				}
			}
			return list;
		}

		private static ICollection<KeyValuePair<ValidationContext, object>> GetPropertyValues(object instance, ValidationContext validationContext)
		{
			PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(instance);
			List<KeyValuePair<ValidationContext, object>> list = new List<KeyValuePair<ValidationContext, object>>(properties.Count);
			foreach (PropertyDescriptor item in properties)
			{
				ValidationContext validationContext2 = CreateValidationContext(instance, validationContext);
				validationContext2.MemberName = item.Name;
				if (_store.GetPropertyValidationAttributes(validationContext2).Any())
				{
					list.Add(new KeyValuePair<ValidationContext, object>(validationContext2, item.GetValue(instance)));
				}
			}
			return list;
		}

		private static IEnumerable<ValidationError> GetValidationErrors(object value, ValidationContext validationContext, IEnumerable<ValidationAttribute> attributes, bool breakOnFirstError)
		{
			if (validationContext == null)
			{
				throw new ArgumentNullException("validationContext");
			}
			List<ValidationError> list = new List<ValidationError>();
			RequiredAttribute requiredAttribute = attributes.FirstOrDefault((ValidationAttribute a) => a is RequiredAttribute) as RequiredAttribute;
			if (requiredAttribute != null && !TryValidate(value, validationContext, requiredAttribute, out var validationError))
			{
				list.Add(validationError);
				return list;
			}
			foreach (ValidationAttribute attribute in attributes)
			{
				if (attribute != requiredAttribute && !TryValidate(value, validationContext, attribute, out validationError))
				{
					list.Add(validationError);
					if (breakOnFirstError)
					{
						break;
					}
				}
			}
			return list;
		}

		private static bool TryValidate(object value, ValidationContext validationContext, ValidationAttribute attribute, out ValidationError validationError)
		{
			if (validationContext == null)
			{
				throw new ArgumentNullException("validationContext");
			}
			ValidationResult validationResult = attribute.GetValidationResult(value, validationContext);
			if (validationResult != ValidationResult.Success)
			{
				validationError = new ValidationError(attribute, value, validationResult);
				return false;
			}
			validationError = null;
			return true;
		}
	}
}
namespace System.ComponentModel.DataAnnotations.Resources
{
	internal class DataAnnotationsResources
	{
		public const string AssociatedMetadataTypeTypeDescriptor_MetadataTypeContainsUnknownProperties = "The associated metadata type for type '{0}' contains the following unknown properties or fields: {1}. Please make sure that the names of these members match the names of the properties on the main type.";

		public const string AttributeStore_Type_Must_Be_Public = "The type '{0}' must be public.";

		public const string AttributeStore_Unknown_Method = "The type '{0}' does not contain a public method named '{1}'.";

		public const string AttributeStore_Unknown_Property = "The type '{0}' does not contain a public property named '{1}'.";

		public const string CustomValidationAttribute_Method_Must_Return_ValidationResult = "The CustomValidationAttribute method '{0}' in type '{1}' must return System.ComponentModel.DataAnnotations.ValidationResult.  Use System.ComponentModel.DataAnnotations.ValidationResult.Success to represent success.";

		public const string CustomValidationAttribute_Method_Not_Found = "The CustomValidationAttribute method '{0}' does not exist in type '{1}' or is not public and static.";

		public const string CustomValidationAttribute_Method_Required = "The CustomValidationAttribute.Method was not specified.";

		public const string CustomValidationAttribute_Method_Signature = "The CustomValidationAttribute method '{0}' in type '{1}' must match the expected signature: public static ValidationResult {0}(object value, ValidationContext context).  The value can be strongly typed.  The ValidationContext parameter is optional.";

		public const string CustomValidationAttribute_Type_Must_Be_Public = "The custom validation type '{0}' must be public.";

		public const string CustomValidationAttribute_ValidationError = "{0} is not valid.";

		public const string CustomValidationAttribute_ValidatorType_Required = "The CustomValidationAttribute.ValidatorType was not specified.";

		public const string DataTypeAttribute_EmptyDataTypeString = "The custom DataType string cannot be null or empty.";

		public const string LocalizableString_LocalizationFailed = "Cannot retrieve property '{0}' because localization failed.  Type '{1}' is not public or does not contain a public static string property with the name '{2}'.";

		public const string Validator_Property_Value_Wrong_Type = "The value for property '{0}' must be of type '{1}'.";

		public const string RangeAttribute_ArbitraryTypeNotIComparable = "The type {0} must implement {1}.";

		public const string RangeAttribute_MinGreaterThanMax = "The maximum value '{0}' must be greater than or equal to the minimum value '{1}'.";

		public const string RangeAttribute_Must_Set_Min_And_Max = "The minimum and maximum values must be set.";

		public const string RangeAttribute_Must_Set_Operand_Type = "The OperandType must be set when strings are used for minimum and maximum values.";

		public const string RangeAttribute_ValidationError = "The field {0} must be between {1} and {2}.";

		public const string RegexAttribute_ValidationError = "The field {0} must match the regular expression '{1}'.";

		public const string RegularExpressionAttribute_Empty_Pattern = "The pattern must be set to a valid regular expression.";

		public const string RequiredAttribute_ValidationError = "The {0} field is required.";

		public const string StringLengthAttribute_InvalidMaxLength = "The maximum length must be a nonnegative integer.";

		public const string StringLengthAttribute_ValidationError = "The field {0} must be a string with a maximum length of {1}.";

		public const string UIHintImplementation_ControlParameterKeyIsNotAString = "The key parameter at position {0} with value '{1}' is not a string. Every key control parameter must be a string.";

		public const string UIHintImplementation_ControlParameterKeyIsNull = "The key parameter at position {0} is null. Every key control parameter must be a string.";

		public const string UIHintImplementation_NeedEvenNumberOfControlParameters = "The number of control parameters must be even.";

		public const string UIHintImplementation_ControlParameterKeyOccursMoreThanOnce = "The key parameter at position {0} with value '{1}' occurs more than once.";

		public const string ValidationAttribute_Cannot_Set_ErrorMessage_And_Resource = "Either ErrorMessageString or ErrorMessageResourceName must be set, but not both.";

		public const string ValidationAttribute_NeedBothResourceTypeAndResourceName = "Both ErrorMessageResourceType and ErrorMessageResourceName need to be set on this attribute.";

		public const string ValidationAttribute_ResourcePropertyNotStringType = "The property '{0}' on resource type '{1}' is not a string type.";

		public const string ValidationAttribute_ResourceTypeDoesNotHaveProperty = "The resource type '{0}' does not have an accessible static property named '{1}'.";

		public const string ValidationAttribute_ValidationError = "The field {0} is invalid.";

		public const string ValidationContext_Must_Be_Method = "The ValidationContext for the type '{0}', member name '{1}' must provide the MethodInfo.";

		public const string EnumDataTypeAttribute_TypeNeedsToBeAnEnum = "The type '{0}' needs to represent an enumeration type.";

		public const string EnumDataTypeAttribute_TypeCannotBeNull = "The type provided for EnumDataTypeAttribute cannot be null.";

		public const string MetadataTypeAttribute_TypeCannotBeNull = "MetadataClassType cannot be null.";

		public const string DisplayAttribute_PropertyNotSet = "The {0} property has not been set.  Use the {1} method to get the value.";

		public const string ValidationContextServiceContainer_ItemAlreadyExists = "A service of type '{0}' already exists in the container.";

		public const string Validator_InstanceMustMatchValidationContextInstance = "The instance provided must match the ObjectInstance on the ValidationContext supplied.";

		public const string ValidationAttribute_IsVa

Room Architect Tool_Data/Managed/System.Configuration.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Configuration.Internal;
using System.Configuration.Provider;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Cryptography;
using System.Security.Cryptography.Xml;
using System.Security.Permissions;
using System.Text;
using System.Text.RegularExpressions;
using System.Xml;
using Unity;

[assembly: ComCompatibleVersion(1, 0, 3300, 0)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("System.Configuration.dll")]
[assembly: AssemblyDescription("System.Configuration.dll")]
[assembly: AssemblyDefaultAlias("System.Configuration.dll")]
[assembly: AssemblyCompany("Mono development team")]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: CompilationRelaxations(8)]
[assembly: AssemblyCopyright("(c) Various Mono authors")]
[assembly: AssemblyInformationalVersion("4.6.57.0")]
[assembly: CLSCompliant(true)]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: ComVisible(false)]
[assembly: AllowPartiallyTrustedCallers]
[assembly: AssemblyDelaySign(true)]
[assembly: InternalsVisibleTo("System.Web, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
[assembly: SatelliteContractVersion("4.0.0.0")]
[assembly: AssemblyFileVersion("4.6.57.0")]
[assembly: AssemblyVersion("4.0.0.0")]
internal static class Consts
{
	public const string MonoVersion = "5.11.0.0";

	public const string MonoCompany = "Mono development team";

	public const string MonoProduct = "Mono Common Language Infrastructure";

	public const string MonoCopyright = "(c) Various Mono authors";

	public const int MonoCorlibVersion = 1051100001;

	public const string FxVersion = "4.0.0.0";

	public const string FxFileVersion = "4.6.57.0";

	public const string EnvironmentVersion = "4.0.30319.42000";

	public const string VsVersion = "0.0.0.0";

	public const string VsFileVersion = "11.0.0.0";

	private const string PublicKeyToken = "b77a5c561934e089";

	public const string AssemblyI18N = "I18N, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMicrosoft_JScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMono_Http = "Mono.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Posix = "Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Security = "Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Messaging_RabbitMQ = "Mono.Messaging.RabbitMQ, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyCorlib = "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Data = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Design = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing_Design = "System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Messaging = "System.Messaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Security = "System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Web = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Core = "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string WindowsBase_3_0 = "WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
internal sealed class Locale
{
	private Locale()
	{
	}

	public static string GetText(string msg)
	{
		return msg;
	}

	public static string GetText(string fmt, params object[] args)
	{
		return string.Format(fmt, args);
	}
}
internal class ConfigXmlTextReader : XmlTextReader, IConfigErrorInfo
{
	private readonly string fileName;

	public string Filename => fileName;

	public ConfigXmlTextReader(Stream s, string fileName)
		: base(s)
	{
		if (fileName == null)
		{
			throw new ArgumentNullException("fileName");
		}
		this.fileName = fileName;
	}

	public ConfigXmlTextReader(TextReader input, string fileName)
		: base(input)
	{
		if (fileName == null)
		{
			throw new ArgumentNullException("fileName");
		}
		this.fileName = fileName;
	}
}
namespace System
{
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoTODOAttribute : Attribute
	{
		private string comment;

		public string Comment => comment;

		public MonoTODOAttribute()
		{
		}

		public MonoTODOAttribute(string comment)
		{
			this.comment = comment;
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoDocumentationNoteAttribute : MonoTODOAttribute
	{
		public MonoDocumentationNoteAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoExtensionAttribute : MonoTODOAttribute
	{
		public MonoExtensionAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoInternalNoteAttribute : MonoTODOAttribute
	{
		public MonoInternalNoteAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoLimitationAttribute : MonoTODOAttribute
	{
		public MonoLimitationAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoNotSupportedAttribute : MonoTODOAttribute
	{
		public MonoNotSupportedAttribute(string comment)
			: base(comment)
		{
		}
	}
}
namespace System.Configuration
{
	public sealed class AppSettingsSection : ConfigurationSection
	{
		private static ConfigurationPropertyCollection _properties;

		private static readonly ConfigurationProperty _propFile;

		private static readonly ConfigurationProperty _propSettings;

		[ConfigurationProperty("file", DefaultValue = "")]
		public string File
		{
			get
			{
				return (string)base[_propFile];
			}
			set
			{
				base[_propFile] = value;
			}
		}

		[ConfigurationProperty("", Options = ConfigurationPropertyOptions.IsDefaultCollection)]
		public KeyValueConfigurationCollection Settings => (KeyValueConfigurationCollection)base[_propSettings];

		protected internal override ConfigurationPropertyCollection Properties => _properties;

		static AppSettingsSection()
		{
			_propFile = new ConfigurationProperty("file", typeof(string), "", new StringConverter(), null, ConfigurationPropertyOptions.None);
			_propSettings = new ConfigurationProperty("", typeof(KeyValueConfigurationCollection), null, null, null, ConfigurationPropertyOptions.IsDefaultCollection);
			_properties = new ConfigurationPropertyCollection();
			_properties.Add(_propFile);
			_properties.Add(_propSettings);
		}

		protected internal override bool IsModified()
		{
			return Settings.IsModified();
		}

		[MonoInternalNote("file path?  do we use a System.Configuration api for opening it?  do we keep it open?  do we open it writable?")]
		protected internal override void DeserializeElement(XmlReader reader, bool serializeCollectionKey)
		{
			base.DeserializeElement(reader, serializeCollectionKey);
			if (!(File != ""))
			{
				return;
			}
			try
			{
				string text = File;
				if (!Path.IsPathRooted(text))
				{
					text = Path.Combine(Path.GetDirectoryName(base.Configuration.FilePath), text);
				}
				FileStream fileStream = System.IO.File.OpenRead(text);
				XmlReader reader2 = new ConfigXmlTextReader(fileStream, text);
				base.DeserializeElement(reader2, serializeCollectionKey);
				fileStream.Close();
			}
			catch
			{
			}
		}

		protected internal override void Reset(ConfigurationElement parentSection)
		{
			if (parentSection is AppSettingsSection appSettingsSection)
			{
				Settings.Reset(appSettingsSection.Settings);
			}
		}

		[MonoTODO]
		protected internal override string SerializeSection(ConfigurationElement parentElement, string name, ConfigurationSaveMode saveMode)
		{
			if (File == "")
			{
				return base.SerializeSection(parentElement, name, saveMode);
			}
			throw new NotImplementedException();
		}

		protected internal override object GetRuntimeObject()
		{
			KeyValueInternalCollection keyValueInternalCollection = new KeyValueInternalCollection();
			string[] allKeys = Settings.AllKeys;
			foreach (string key in allKeys)
			{
				KeyValueConfigurationElement keyValueConfigurationElement = Settings[key];
				keyValueInternalCollection.Add(keyValueConfigurationElement.Key, keyValueConfigurationElement.Value);
			}
			if (!ConfigurationManager.ConfigurationSystem.SupportsUserConfig)
			{
				keyValueInternalCollection.SetReadOnly();
			}
			return keyValueInternalCollection;
		}
	}
	public sealed class CallbackValidator : ConfigurationValidatorBase
	{
		private Type type;

		private ValidatorCallback callback;

		public CallbackValidator(Type type, ValidatorCallback callback)
		{
			this.type = type;
			this.callback = callback;
		}

		public override bool CanValidate(Type type)
		{
			return type == this.type;
		}

		public override void Validate(object value)
		{
			callback(value);
		}
	}
	[AttributeUsage(AttributeTargets.Property)]
	public sealed class CallbackValidatorAttribute : ConfigurationValidatorAttribute
	{
		private string callbackMethodName = "";

		private Type type;

		private ConfigurationValidatorBase instance;

		public string CallbackMethodName
		{
			get
			{
				return callbackMethodName;
			}
			set
			{
				callbackMethodName = value;
				instance = null;
			}
		}

		public Type Type
		{
			get
			{
				return type;
			}
			set
			{
				type = value;
				instance = null;
			}
		}

		public override ConfigurationValidatorBase ValidatorInstance => instance;
	}
	internal class ClientConfigurationSystem : IInternalConfigSystem
	{
		private Configuration cfg;

		private Configuration Configuration
		{
			get
			{
				if (cfg == null)
				{
					Assembly entryAssembly = Assembly.GetEntryAssembly();
					try
					{
						cfg = ConfigurationManager.OpenExeConfigurationInternal(ConfigurationUserLevel.None, entryAssembly, null);
					}
					catch (Exception inner)
					{
						throw new ConfigurationErrorsException("Error Initializing the configuration system.", inner);
					}
				}
				return cfg;
			}
		}

		bool IInternalConfigSystem.SupportsUserConfig => false;

		object IInternalConfigSystem.GetSection(string configKey)
		{
			return Configuration.GetSection(configKey)?.GetRuntimeObject();
		}

		void IInternalConfigSystem.RefreshConfig(string sectionName)
		{
		}
	}
	public sealed class CommaDelimitedStringCollection : StringCollection
	{
		private bool modified;

		private bool readOnly;

		private int originalStringHash;

		public bool IsModified
		{
			get
			{
				if (modified)
				{
					return true;
				}
				string text = ToString();
				if (text == null)
				{
					return false;
				}
				return text.GetHashCode() != originalStringHash;
			}
		}

		public new bool IsReadOnly => readOnly;

		public new string this[int index]
		{
			get
			{
				return base[index];
			}
			set
			{
				if (readOnly)
				{
					throw new ConfigurationErrorsException("The configuration is read only");
				}
				base[index] = value;
				modified = true;
			}
		}

		public new void Add(string value)
		{
			if (readOnly)
			{
				throw new ConfigurationErrorsException("The configuration is read only");
			}
			base.Add(value);
			modified = true;
		}

		public new void AddRange(string[] range)
		{
			if (readOnly)
			{
				throw new ConfigurationErrorsException("The configuration is read only");
			}
			base.AddRange(range);
			modified = true;
		}

		public new void Clear()
		{
			if (readOnly)
			{
				throw new ConfigurationErrorsException("The configuration is read only");
			}
			base.Clear();
			modified = true;
		}

		public CommaDelimitedStringCollection Clone()
		{
			CommaDelimitedStringCollection commaDelimitedStringCollection = new CommaDelimitedStringCollection();
			string[] array = new string[base.Count];
			CopyTo(array, 0);
			commaDelimitedStringCollection.AddRange(array);
			commaDelimitedStringCollection.originalStringHash = originalStringHash;
			return commaDelimitedStringCollection;
		}

		public new void Insert(int index, string value)
		{
			if (readOnly)
			{
				throw new ConfigurationErrorsException("The configuration is read only");
			}
			base.Insert(index, value);
			modified = true;
		}

		public new void Remove(string value)
		{
			if (readOnly)
			{
				throw new ConfigurationErrorsException("The configuration is read only");
			}
			base.Remove(value);
			modified = true;
		}

		public void SetReadOnly()
		{
			readOnly = true;
		}

		public override string ToString()
		{
			if (base.Count == 0)
			{
				return null;
			}
			string[] array = new string[base.Count];
			CopyTo(array, 0);
			return string.Join(",", array);
		}

		internal void UpdateStringHash()
		{
			string text = ToString();
			if (text == null)
			{
				originalStringHash = 0;
			}
			else
			{
				originalStringHash = text.GetHashCode();
			}
		}
	}
	public sealed class CommaDelimitedStringCollectionConverter : ConfigurationConverterBase
	{
		public override object ConvertFrom(ITypeDescriptorContext ctx, CultureInfo ci, object data)
		{
			CommaDelimitedStringCollection commaDelimitedStringCollection = new CommaDelimitedStringCollection();
			string[] array = ((string)data).Split(new char[1] { ',' });
			foreach (string text in array)
			{
				commaDelimitedStringCollection.Add(text.Trim());
			}
			commaDelimitedStringCollection.UpdateStringHash();
			return commaDelimitedStringCollection;
		}

		public override object ConvertTo(ITypeDescriptorContext ctx, CultureInfo ci, object value, Type type)
		{
			if (value == null)
			{
				return null;
			}
			if (!typeof(StringCollection).IsAssignableFrom(value.GetType()))
			{
				throw new ArgumentException();
			}
			return value.ToString();
		}
	}
	internal class ConfigNameValueCollection : NameValueCollection
	{
		private bool modified;

		public bool IsModified => modified;

		public ConfigNameValueCollection()
		{
		}

		public ConfigNameValueCollection(ConfigNameValueCollection col)
			: base(col.Count, col)
		{
		}

		public void ResetModified()
		{
			modified = false;
		}

		public override void Set(string name, string value)
		{
			base.Set(name, value);
			modified = true;
		}
	}
	internal abstract class ConfigInfo
	{
		public string Name;

		public string TypeName;

		protected Type Type;

		private string streamName;

		public ConfigInfo Parent;

		public IInternalConfigHost ConfigHost;

		public string XPath
		{
			get
			{
				StringBuilder stringBuilder = new StringBuilder(Name);
				for (ConfigInfo parent = Parent; parent != null; parent = parent.Parent)
				{
					stringBuilder.Insert(0, parent.Name + "/");
				}
				return stringBuilder.ToString();
			}
		}

		public string StreamName
		{
			get
			{
				return streamName;
			}
			set
			{
				streamName = value;
			}
		}

		public virtual object CreateInstance()
		{
			if (Type == null)
			{
				Type = ConfigHost.GetConfigType(TypeName, throwOnError: true);
			}
			return Activator.CreateInstance(Type, nonPublic: true);
		}

		public abstract bool HasConfigContent(Configuration cfg);

		public abstract bool HasDataContent(Configuration cfg);

		protected void ThrowException(string text, XmlReader reader)
		{
			throw new ConfigurationErrorsException(text, reader);
		}

		public abstract void ReadConfig(Configuration cfg, string streamName, XmlReader reader);

		public abstract void WriteConfig(Configuration cfg, XmlWriter writer, ConfigurationSaveMode mode);

		public abstract void ReadData(Configuration config, XmlReader reader, bool overrideAllowed);

		public abstract void WriteData(Configuration config, XmlWriter writer, ConfigurationSaveMode mode);

		internal abstract void Merge(ConfigInfo data);

		internal abstract bool HasValues(Configuration config, ConfigurationSaveMode mode);

		internal abstract void ResetModified(Configuration config);
	}
	internal class ConfigurationXmlDocument : XmlDocument
	{
		public override XmlElement CreateElement(string prefix, string localName, string namespaceURI)
		{
			if (namespaceURI == "http://schemas.microsoft.com/.NetConfiguration/v2.0")
			{
				return base.CreateElement(string.Empty, localName, string.Empty);
			}
			return base.CreateElement(prefix, localName, namespaceURI);
		}
	}
	public sealed class Configuration
	{
		private Configuration parent;

		private Hashtable elementData;

		private string streamName;

		private ConfigurationSectionGroup rootSectionGroup;

		private ConfigurationLocationCollection locations;

		private SectionGroupInfo rootGroup;

		private IConfigSystem system;

		private bool hasFile;

		private string rootNamespace;

		private string configPath;

		private string locationConfigPath;

		private string locationSubPath;

		private ContextInformation evaluationContext;

		internal Configuration Parent
		{
			get
			{
				return parent;
			}
			set
			{
				parent = value;
			}
		}

		internal string FileName => streamName;

		internal IInternalConfigHost ConfigHost => system.Host;

		internal string LocationConfigPath => locationConfigPath;

		internal string ConfigPath => configPath;

		public AppSettingsSection AppSettings => (AppSettingsSection)GetSection("appSettings");

		public ConnectionStringsSection ConnectionStrings => (ConnectionStringsSection)GetSection("connectionStrings");

		public string FilePath
		{
			get
			{
				if (streamName == null && parent != null)
				{
					return parent.FilePath;
				}
				return streamName;
			}
		}

		public bool HasFile => hasFile;

		public ContextInformation EvaluationContext
		{
			get
			{
				if (evaluationContext == null)
				{
					object ctx = system.Host.CreateConfigurationContext(configPath, GetLocationSubPath());
					evaluationContext = new ContextInformation(this, ctx);
				}
				return evaluationContext;
			}
		}

		public ConfigurationLocationCollection Locations
		{
			get
			{
				if (locations == null)
				{
					locations = new ConfigurationLocationCollection();
				}
				return locations;
			}
		}

		public bool NamespaceDeclared
		{
			get
			{
				return rootNamespace != null;
			}
			set
			{
				rootNamespace = (value ? "http://schemas.microsoft.com/.NetConfiguration/v2.0" : null);
			}
		}

		public ConfigurationSectionGroup RootSectionGroup
		{
			get
			{
				if (rootSectionGroup == null)
				{
					rootSectionGroup = new ConfigurationSectionGroup();
					rootSectionGroup.Initialize(this, rootGroup);
				}
				return rootSectionGroup;
			}
		}

		public ConfigurationSectionGroupCollection SectionGroups => RootSectionGroup.SectionGroups;

		public ConfigurationSectionCollection Sections => RootSectionGroup.Sections;

		public Func<string, string> AssemblyStringTransformer
		{
			get
			{
				//IL_0007: Expected O, but got I4
				ThrowStub.ThrowNotSupportedException();
				return (Func<string, string>)0;
			}
			[ConfigurationPermission(SecurityAction.Demand, Unrestricted = true)]
			set
			{
				ThrowStub.ThrowNotSupportedException();
			}
		}

		public FrameworkName TargetFramework
		{
			get
			{
				ThrowStub.ThrowNotSupportedException();
				return null;
			}
			[ConfigurationPermission(SecurityAction.Demand, Unrestricted = true)]
			set
			{
				ThrowStub.ThrowNotSupportedException();
			}
		}

		public Func<string, string> TypeStringTransformer
		{
			get
			{
				//IL_0007: Expected O, but got I4
				ThrowStub.ThrowNotSupportedException();
				return (Func<string, string>)0;
			}
			[ConfigurationPermission(SecurityAction.Demand, Unrestricted = true)]
			set
			{
				ThrowStub.ThrowNotSupportedException();
			}
		}

		internal static event ConfigurationSaveEventHandler SaveStart;

		internal static event ConfigurationSaveEventHandler SaveEnd;

		internal Configuration(Configuration parent, string locationSubPath)
		{
			elementData = new Hashtable();
			base..ctor();
			this.parent = parent;
			system = parent.system;
			rootGroup = parent.rootGroup;
			this.locationSubPath = locationSubPath;
			configPath = parent.ConfigPath;
		}

		internal Configuration(InternalConfigurationSystem system, string locationSubPath)
		{
			elementData = new Hashtable();
			base..ctor();
			hasFile = true;
			this.system = system;
			system.InitForConfiguration(ref locationSubPath, out configPath, out locationConfigPath);
			Configuration configuration = null;
			if (locationSubPath != null)
			{
				configuration = new Configuration(system, locationSubPath);
				if (locationConfigPath != null)
				{
					configuration = configuration.FindLocationConfiguration(locationConfigPath, configuration);
				}
			}
			Init(system, configPath, configuration);
		}

		internal Configuration FindLocationConfiguration(string relativePath, Configuration defaultConfiguration)
		{
			Configuration configuration = defaultConfiguration;
			if (!string.IsNullOrEmpty(LocationConfigPath))
			{
				Configuration parentWithFile = GetParentWithFile();
				if (parentWithFile != null)
				{
					string configPathFromLocationSubPath = system.Host.GetConfigPathFromLocationSubPath(configPath, relativePath);
					configuration = parentWithFile.FindLocationConfiguration(configPathFromLocationSubPath, defaultConfiguration);
				}
			}
			string text = configPath.Substring(1) + "/";
			if (relativePath.StartsWith(text, StringComparison.Ordinal))
			{
				relativePath = relativePath.Substring(text.Length);
			}
			ConfigurationLocation configurationLocation = Locations.FindBest(relativePath);
			if (configurationLocation == null)
			{
				return configuration;
			}
			configurationLocation.SetParentConfiguration(configuration);
			return configurationLocation.OpenConfiguration();
		}

		internal void Init(IConfigSystem system, string configPath, Configuration parent)
		{
			this.system = system;
			this.configPath = configPath;
			streamName = system.Host.GetStreamName(configPath);
			this.parent = parent;
			if (parent != null)
			{
				rootGroup = parent.rootGroup;
			}
			else
			{
				rootGroup = new SectionGroupInfo();
				rootGroup.StreamName = streamName;
			}
			try
			{
				if (streamName != null)
				{
					Load();
				}
			}
			catch (XmlException ex)
			{
				throw new ConfigurationErrorsException(ex.Message, ex, streamName, 0);
			}
		}

		internal Configuration GetParentWithFile()
		{
			Configuration configuration = Parent;
			while (configuration != null && !configuration.HasFile)
			{
				configuration = configuration.Parent;
			}
			return configuration;
		}

		internal string GetLocationSubPath()
		{
			Configuration configuration = parent;
			string text = null;
			while (configuration != null)
			{
				text = configuration.locationSubPath;
				if (!string.IsNullOrEmpty(text))
				{
					return text;
				}
				configuration = configuration.parent;
			}
			return text;
		}

		public ConfigurationSection GetSection(string sectionName)
		{
			string[] array = sectionName.Split(new char[1] { '/' });
			if (array.Length == 1)
			{
				return Sections[array[0]];
			}
			ConfigurationSectionGroup configurationSectionGroup = SectionGroups[array[0]];
			int num = 1;
			while (configurationSectionGroup != null && num < array.Length - 1)
			{
				configurationSectionGroup = configurationSectionGroup.SectionGroups[array[num]];
				num++;
			}
			return configurationSectionGroup?.Sections[array[^1]];
		}

		public ConfigurationSectionGroup GetSectionGroup(string sectionGroupName)
		{
			string[] array = sectionGroupName.Split(new char[1] { '/' });
			ConfigurationSectionGroup configurationSectionGroup = SectionGroups[array[0]];
			int num = 1;
			while (configurationSectionGroup != null && num < array.Length)
			{
				configurationSectionGroup = configurationSectionGroup.SectionGroups[array[num]];
				num++;
			}
			return configurationSectionGroup;
		}

		internal ConfigurationSection GetSectionInstance(SectionInfo config, bool createDefaultInstance)
		{
			object obj = elementData[config];
			ConfigurationSection configurationSection = obj as ConfigurationSection;
			if (configurationSection != null || !createDefaultInstance)
			{
				return configurationSection;
			}
			object obj2 = config.CreateInstance();
			configurationSection = obj2 as ConfigurationSection;
			if (configurationSection == null)
			{
				configurationSection = new DefaultSection
				{
					SectionHandler = (IConfigurationSectionHandler)((obj2 is IConfigurationSectionHandler) ? obj2 : null)
				};
			}
			configurationSection.Configuration = this;
			ConfigurationSection configurationSection2 = null;
			if (parent != null)
			{
				configurationSection2 = parent.GetSectionInstance(config, createDefaultInstance: true);
				configurationSection.SectionInformation.SetParentSection(configurationSection2);
			}
			configurationSection.SectionInformation.ConfigFilePath = FilePath;
			configurationSection.ConfigContext = system.Host.CreateDeprecatedConfigContext(configPath);
			string text2 = (configurationSection.RawXml = obj as string);
			configurationSection.Reset(configurationSection2);
			if (text2 != null)
			{
				XmlTextReader xmlTextReader = new ConfigXmlTextReader(new StringReader(text2), FilePath);
				configurationSection.DeserializeSection(xmlTextReader);
				xmlTextReader.Close();
				if (!string.IsNullOrEmpty(configurationSection.SectionInformation.ConfigSource) && !string.IsNullOrEmpty(FilePath))
				{
					configurationSection.DeserializeConfigSource(Path.GetDirectoryName(FilePath));
				}
			}
			elementData[config] = configurationSection;
			return configurationSection;
		}

		internal ConfigurationSectionGroup GetSectionGroupInstance(SectionGroupInfo group)
		{
			ConfigurationSectionGroup configurationSectionGroup = group.CreateInstance() as ConfigurationSectionGroup;
			configurationSectionGroup?.Initialize(this, group);
			return configurationSectionGroup;
		}

		internal void SetConfigurationSection(SectionInfo config, ConfigurationSection sec)
		{
			elementData[config] = sec;
		}

		internal void SetSectionXml(SectionInfo config, string data)
		{
			elementData[config] = data;
		}

		internal string GetSectionXml(SectionInfo config)
		{
			return elementData[config] as string;
		}

		internal void CreateSection(SectionGroupInfo group, string name, ConfigurationSection sec)
		{
			if (group.HasChild(name))
			{
				throw new ConfigurationErrorsException("Cannot add a ConfigurationSection. A section or section group already exists with the name '" + name + "'");
			}
			if (!HasFile && !sec.SectionInformation.AllowLocation)
			{
				throw new ConfigurationErrorsException("The configuration section <" + name + "> cannot be defined inside a <location> element.");
			}
			if (!system.Host.IsDefinitionAllowed(configPath, sec.SectionInformation.AllowDefinition, sec.SectionInformation.AllowExeDefinition))
			{
				object obj = ((sec.SectionInformation.AllowExeDefinition != ConfigurationAllowExeDefinition.MachineToApplication) ? ((object)sec.SectionInformation.AllowExeDefinition) : ((object)sec.SectionInformation.AllowDefinition));
				throw new ConfigurationErrorsException(string.Concat("The section <", name, "> can't be defined in this configuration file (the allowed definition context is '", obj, "')."));
			}
			if (sec.SectionInformation.Type == null)
			{
				sec.SectionInformation.Type = system.Host.GetConfigTypeName(sec.GetType());
			}
			SectionInfo sectionInfo = new SectionInfo(name, sec.SectionInformation);
			sectionInfo.StreamName = streamName;
			sectionInfo.ConfigHost = system.Host;
			group.AddChild(sectionInfo);
			elementData[sectionInfo] = sec;
			sec.Configuration = this;
		}

		internal void CreateSectionGroup(SectionGroupInfo parentGroup, string name, ConfigurationSectionGroup sec)
		{
			if (parentGroup.HasChild(name))
			{
				throw new ConfigurationErrorsException("Cannot add a ConfigurationSectionGroup. A section or section group already exists with the name '" + name + "'");
			}
			if (sec.Type == null)
			{
				sec.Type = system.Host.GetConfigTypeName(sec.GetType());
			}
			sec.SetName(name);
			SectionGroupInfo sectionGroupInfo = new SectionGroupInfo(name, sec.Type);
			sectionGroupInfo.StreamName = streamName;
			sectionGroupInfo.ConfigHost = system.Host;
			parentGroup.AddChild(sectionGroupInfo);
			elementData[sectionGroupInfo] = sec;
			sec.Initialize(this, sectionGroupInfo);
		}

		internal void RemoveConfigInfo(ConfigInfo config)
		{
			elementData.Remove(config);
		}

		public void Save()
		{
			Save(ConfigurationSaveMode.Modified, forceSaveAll: false);
		}

		public void Save(ConfigurationSaveMode saveMode)
		{
			Save(saveMode, forceSaveAll: false);
		}

		public void Save(ConfigurationSaveMode saveMode, bool forceSaveAll)
		{
			if (!forceSaveAll && saveMode != ConfigurationSaveMode.Full && !HasValues(saveMode))
			{
				ResetModified();
				return;
			}
			ConfigurationSaveEventHandler saveStart = Configuration.SaveStart;
			ConfigurationSaveEventHandler saveEnd = Configuration.SaveEnd;
			object writeContext = null;
			Exception ex = null;
			Stream stream = system.Host.OpenStreamForWrite(streamName, null, ref writeContext);
			try
			{
				saveStart?.Invoke(this, new ConfigurationSaveEventArgs(streamName, start: true, null, writeContext));
				Save(stream, saveMode, forceSaveAll);
				system.Host.WriteCompleted(streamName, success: true, writeContext);
			}
			catch (Exception ex2)
			{
				ex = ex2;
				system.Host.WriteCompleted(streamName, success: false, writeContext);
				throw;
			}
			finally
			{
				stream.Close();
				saveEnd?.Invoke(this, new ConfigurationSaveEventArgs(streamName, start: false, ex, writeContext));
			}
		}

		public void SaveAs(string filename)
		{
			SaveAs(filename, ConfigurationSaveMode.Modified, forceSaveAll: false);
		}

		public void SaveAs(string filename, ConfigurationSaveMode saveMode)
		{
			SaveAs(filename, saveMode, forceSaveAll: false);
		}

		[MonoInternalNote("Detect if file has changed")]
		public void SaveAs(string filename, ConfigurationSaveMode saveMode, bool forceSaveAll)
		{
			if (!forceSaveAll && saveMode != ConfigurationSaveMode.Full && !HasValues(saveMode))
			{
				ResetModified();
				return;
			}
			string directoryName = Path.GetDirectoryName(Path.GetFullPath(filename));
			if (!Directory.Exists(directoryName))
			{
				Directory.CreateDirectory(directoryName);
			}
			Save(new FileStream(filename, FileMode.OpenOrCreate, FileAccess.Write), saveMode, forceSaveAll);
		}

		private void Save(Stream stream, ConfigurationSaveMode mode, bool forceUpdateAll)
		{
			XmlTextWriter xmlTextWriter = new XmlTextWriter(new StreamWriter(stream));
			xmlTextWriter.Formatting = Formatting.Indented;
			try
			{
				xmlTextWriter.WriteStartDocument();
				if (rootNamespace != null)
				{
					xmlTextWriter.WriteStartElement("configuration", rootNamespace);
				}
				else
				{
					xmlTextWriter.WriteStartElement("configuration");
				}
				if (rootGroup.HasConfigContent(this))
				{
					rootGroup.WriteConfig(this, xmlTextWriter, mode);
				}
				foreach (ConfigurationLocation location in Locations)
				{
					if (location.OpenedConfiguration == null)
					{
						xmlTextWriter.WriteRaw("\n");
						xmlTextWriter.WriteRaw(location.XmlContent);
						continue;
					}
					xmlTextWriter.WriteStartElement("location");
					xmlTextWriter.WriteAttributeString("path", location.Path);
					if (!location.AllowOverride)
					{
						xmlTextWriter.WriteAttributeString("allowOverride", "false");
					}
					location.OpenedConfiguration.SaveData(xmlTextWriter, mode, forceUpdateAll);
					xmlTextWriter.WriteEndElement();
				}
				SaveData(xmlTextWriter, mode, forceUpdateAll);
				xmlTextWriter.WriteEndElement();
				ResetModified();
			}
			finally
			{
				xmlTextWriter.Flush();
				xmlTextWriter.Close();
			}
		}

		private void SaveData(XmlTextWriter tw, ConfigurationSaveMode mode, bool forceUpdateAll)
		{
			rootGroup.WriteRootData(tw, this, mode);
		}

		private bool HasValues(ConfigurationSaveMode mode)
		{
			foreach (ConfigurationLocation location in Locations)
			{
				if (location.OpenedConfiguration != null && location.OpenedConfiguration.HasValues(mode))
				{
					return true;
				}
			}
			return rootGroup.HasValues(this, mode);
		}

		private void ResetModified()
		{
			foreach (ConfigurationLocation location in Locations)
			{
				if (location.OpenedConfiguration != null)
				{
					location.OpenedConfiguration.ResetModified();
				}
			}
			rootGroup.ResetModified(this);
		}

		private bool Load()
		{
			if (string.IsNullOrEmpty(streamName))
			{
				return true;
			}
			Stream stream = null;
			try
			{
				stream = system.Host.OpenStreamForRead(streamName);
				if (stream == null)
				{
					return false;
				}
			}
			catch
			{
				return false;
			}
			using (XmlTextReader reader = new ConfigXmlTextReader(stream, streamName))
			{
				ReadConfigFile(reader, streamName);
			}
			ResetModified();
			return true;
		}

		private void ReadConfigFile(XmlReader reader, string fileName)
		{
			reader.MoveToContent();
			if (reader.NodeType != XmlNodeType.Element || reader.Name != "configuration")
			{
				ThrowException("Configuration file does not have a valid root element", reader);
			}
			if (reader.HasAttributes)
			{
				while (reader.MoveToNextAttribute())
				{
					if (reader.LocalName == "xmlns")
					{
						rootNamespace = reader.Value;
					}
					else
					{
						ThrowException($"Unrecognized attribute '{reader.LocalName}' in root element", reader);
					}
				}
			}
			reader.MoveToElement();
			if (reader.IsEmptyElement)
			{
				reader.Skip();
				return;
			}
			reader.ReadStartElement();
			reader.MoveToContent();
			if (reader.LocalName == "configSections")
			{
				if (reader.HasAttributes)
				{
					ThrowException("Unrecognized attribute in <configSections>.", reader);
				}
				rootGroup.ReadConfig(this, fileName, reader);
			}
			rootGroup.ReadRootData(reader, this, overrideAllowed: true);
		}

		internal void ReadData(XmlReader reader, bool allowOverride)
		{
			rootGroup.ReadData(this, reader, allowOverride);
		}

		private void ThrowException(string text, XmlReader reader)
		{
			throw new ConfigurationErrorsException(text, streamName, (reader as IXmlLineInfo)?.LineNumber ?? 0);
		}

		internal Configuration()
		{
			ThrowStub.ThrowNotSupportedException();
		}
	}
	public enum ConfigurationAllowDefinition
	{
		MachineOnly = 0,
		MachineToWebRoot = 100,
		MachineToApplication = 200,
		Everywhere = 300
	}
	public enum ConfigurationAllowExeDefinition
	{
		MachineOnly = 0,
		MachineToApplication = 100,
		MachineToLocalUser = 300,
		MachineToRoamingUser = 200
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property)]
	public sealed class ConfigurationCollectionAttribute : Attribute
	{
		private string addItemName = "add";

		private string clearItemsName = "clear";

		private string removeItemName = "remove";

		private ConfigurationElementCollectionType collectionType;

		private Type itemType;

		public string AddItemName
		{
			get
			{
				return addItemName;
			}
			set
			{
				addItemName = value;
			}
		}

		public string ClearItemsName
		{
			get
			{
				return clearItemsName;
			}
			set
			{
				clearItemsName = value;
			}
		}

		public string RemoveItemName
		{
			get
			{
				return removeItemName;
			}
			set
			{
				removeItemName = value;
			}
		}

		public ConfigurationElementCollectionType CollectionType
		{
			get
			{
				return collectionType;
			}
			set
			{
				collectionType = value;
			}
		}

		[MonoInternalNote("Do something with this in ConfigurationElementCollection")]
		public Type ItemType => itemType;

		public ConfigurationCollectionAttribute(Type itemType)
		{
			this.itemType = itemType;
		}
	}
	public abstract class ConfigurationConverterBase : TypeConverter
	{
		public override bool CanConvertFrom(ITypeDescriptorContext ctx, Type type)
		{
			if (type == typeof(string))
			{
				return true;
			}
			return base.CanConvertFrom(ctx, type);
		}

		public override bool CanConvertTo(ITypeDescriptorContext ctx, Type type)
		{
			if (type == typeof(string))
			{
				return true;
			}
			return base.CanConvertTo(ctx, type);
		}
	}
	public abstract class ConfigurationElement
	{
		private class SaveContext
		{
			public readonly ConfigurationElement Element;

			public readonly ConfigurationElement Parent;

			public readonly ConfigurationSaveMode Mode;

			public SaveContext(ConfigurationElement element, ConfigurationElement parent, ConfigurationSaveMode mode)
			{
				Element = element;
				Parent = parent;
				Mode = mode;
			}

			public bool HasValues()
			{
				if (Mode == ConfigurationSaveMode.Full)
				{
					return true;
				}
				return Element.HasValues(Parent, Mode);
			}

			public bool HasValue(PropertyInformation prop)
			{
				if (Mode == ConfigurationSaveMode.Full)
				{
					return true;
				}
				return Element.HasValue(Parent, prop, Mode);
			}
		}

		private string rawXml;

		private bool modified;

		private ElementMap map;

		private ConfigurationPropertyCollection keyProps;

		private ConfigurationElementCollection defaultCollection;

		private bool readOnly;

		private ElementInformation elementInfo;

		private ConfigurationElementProperty elementProperty;

		private Configuration _configuration;

		private bool elementPresent;

		private ConfigurationLockCollection lockAllAttributesExcept;

		private ConfigurationLockCollection lockAllElementsExcept;

		private ConfigurationLockCollection lockAttributes;

		private ConfigurationLockCollection lockElements;

		private bool lockItem;

		private SaveContext saveContext;

		internal Configuration Configuration
		{
			get
			{
				return _configuration;
			}
			set
			{
				_configuration = value;
			}
		}

		public ElementInformation ElementInformation
		{
			get
			{
				if (elementInfo == null)
				{
					elementInfo = new ElementInformation(this, null);
				}
				return elementInfo;
			}
		}

		internal string RawXml
		{
			get
			{
				return rawXml;
			}
			set
			{
				if (rawXml == null || value != null)
				{
					rawXml = value;
				}
			}
		}

		protected internal virtual ConfigurationElementProperty ElementProperty
		{
			get
			{
				if (elementProperty == null)
				{
					elementProperty = new ConfigurationElementProperty(ElementInformation.Validator);
				}
				return elementProperty;
			}
		}

		protected ContextInformation EvaluationContext
		{
			get
			{
				if (Configuration != null)
				{
					return Configuration.EvaluationContext;
				}
				throw new ConfigurationErrorsException("This element is not currently associated with any context.");
			}
		}

		public ConfigurationLockCollection LockAllAttributesExcept
		{
			get
			{
				if (lockAllAttributesExcept == null)
				{
					lockAllAttributesExcept = new ConfigurationLockCollection(this, ConfigurationLockType.Attribute | ConfigurationLockType.Exclude);
				}
				return lockAllAttributesExcept;
			}
		}

		public ConfigurationLockCollection LockAllElementsExcept
		{
			get
			{
				if (lockAllElementsExcept == null)
				{
					lockAllElementsExcept = new ConfigurationLockCollection(this, ConfigurationLockType.Element | ConfigurationLockType.Exclude);
				}
				return lockAllElementsExcept;
			}
		}

		public ConfigurationLockCollection LockAttributes
		{
			get
			{
				if (lockAttributes == null)
				{
					lockAttributes = new ConfigurationLockCollection(this, ConfigurationLockType.Attribute);
				}
				return lockAttributes;
			}
		}

		public ConfigurationLockCollection LockElements
		{
			get
			{
				if (lockElements == null)
				{
					lockElements = new ConfigurationLockCollection(this, ConfigurationLockType.Element);
				}
				return lockElements;
			}
		}

		public bool LockItem
		{
			get
			{
				return lockItem;
			}
			set
			{
				lockItem = value;
			}
		}

		protected internal object this[ConfigurationProperty prop]
		{
			get
			{
				return this[prop.Name];
			}
			set
			{
				this[prop.Name] = value;
			}
		}

		protected internal object this[string propertyName]
		{
			get
			{
				return (ElementInformation.Properties[propertyName] ?? throw new InvalidOperationException("Property '" + propertyName + "' not found in configuration element")).Value;
			}
			set
			{
				PropertyInformation propertyInformation = ElementInformation.Properties[propertyName];
				if (propertyInformation == null)
				{
					throw new InvalidOperationException("Property '" + propertyName + "' not found in configuration element");
				}
				SetPropertyValue(propertyInformation.Property, value, ignoreLocks: false);
				propertyInformation.Value = value;
				modified = true;
			}
		}

		protected internal virtual ConfigurationPropertyCollection Properties
		{
			get
			{
				if (map == null)
				{
					map = ElementMap.GetMap(GetType());
				}
				return map.Properties;
			}
		}

		internal bool IsElementPresent => elementPresent;

		public Configuration CurrentConfiguration
		{
			get
			{
				ThrowStub.ThrowNotSupportedException();
				return null;
			}
		}

		protected bool HasContext
		{
			get
			{
				ThrowStub.ThrowNotSupportedException();
				return default(bool);
			}
		}

		internal virtual void InitFromProperty(PropertyInformation propertyInfo)
		{
			elementInfo = new ElementInformation(this, propertyInfo);
			Init();
		}

		protected internal virtual void Init()
		{
		}

		[MonoTODO]
		protected virtual void ListErrors(IList errorList)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		protected void SetPropertyValue(ConfigurationProperty prop, object value, bool ignoreLocks)
		{
			try
			{
				if (value != null)
				{
					prop.Validate(value);
				}
			}
			catch (Exception inner)
			{
				throw new ConfigurationErrorsException($"The value for the property '{prop.Name}' on type {ElementInformation.Type} is not valid.", inner);
			}
		}

		internal ConfigurationPropertyCollection GetKeyProperties()
		{
			if (keyProps != null)
			{
				return keyProps;
			}
			ConfigurationPropertyCollection configurationPropertyCollection = new ConfigurationPropertyCollection();
			foreach (ConfigurationProperty property in Properties)
			{
				if (property.IsKey)
				{
					configurationPropertyCollection.Add(property);
				}
			}
			return keyProps = configurationPropertyCollection;
		}

		internal ConfigurationElementCollection GetDefaultCollection()
		{
			if (defaultCollection != null)
			{
				return defaultCollection;
			}
			ConfigurationProperty configurationProperty = null;
			foreach (ConfigurationProperty property in Properties)
			{
				if (property.IsDefaultCollection)
				{
					configurationProperty = property;
					break;
				}
			}
			if (configurationProperty != null)
			{
				defaultCollection = this[configurationProperty] as ConfigurationElementCollection;
			}
			return defaultCollection;
		}

		public override bool Equals(object compareTo)
		{
			if (!(compareTo is ConfigurationElement configurationElement))
			{
				return false;
			}
			if (GetType() != configurationElement.GetType())
			{
				return false;
			}
			foreach (ConfigurationProperty property in Properties)
			{
				if (!object.Equals(this[property], configurationElement[property]))
				{
					return false;
				}
			}
			return true;
		}

		public override int GetHashCode()
		{
			int num = 0;
			foreach (ConfigurationProperty property in Properties)
			{
				object obj = this[property];
				if (obj != null)
				{
					num += obj.GetHashCode();
				}
			}
			return num;
		}

		internal virtual bool HasLocalModifications()
		{
			foreach (PropertyInformation property in ElementInformation.Properties)
			{
				if (property.ValueOrigin == PropertyValueOrigin.SetHere && property.IsModified)
				{
					return true;
				}
			}
			return false;
		}

		protected internal virtual void DeserializeElement(XmlReader reader, bool serializeCollectionKey)
		{
			Hashtable hashtable = new Hashtable();
			reader.MoveToContent();
			elementPresent = true;
			while (reader.MoveToNextAttribute())
			{
				PropertyInformation propertyInformation = ElementInformation.Properties[reader.LocalName];
				if (propertyInformation == null || (serializeCollectionKey && !propertyInformation.IsKey))
				{
					if (reader.LocalName == "lockAllAttributesExcept")
					{
						LockAllAttributesExcept.SetFromList(reader.Value);
					}
					else if (reader.LocalName == "lockAllElementsExcept")
					{
						LockAllElementsExcept.SetFromList(reader.Value);
					}
					else if (reader.LocalName == "lockAttributes")
					{
						LockAttributes.SetFromList(reader.Value);
					}
					else if (reader.LocalName == "lockElements")
					{
						LockElements.SetFromList(reader.Value);
					}
					else if (reader.LocalName == "lockItem")
					{
						LockItem = reader.Value.ToLowerInvariant() == "true";
					}
					else if (!(reader.LocalName == "xmlns") && (!(this is ConfigurationSection) || !(reader.LocalName == "configSource")) && !OnDeserializeUnrecognizedAttribute(reader.LocalName, reader.Value))
					{
						throw new ConfigurationErrorsException("Unrecognized attribute '" + reader.LocalName + "'.", reader);
					}
					continue;
				}
				if (hashtable.ContainsKey(propertyInformation))
				{
					throw new ConfigurationErrorsException("The attribute '" + propertyInformation.Name + "' may only appear once in this element.", reader);
				}
				string text = null;
				try
				{
					text = reader.Value;
					ValidateValue(propertyInformation.Property, text);
					propertyInformation.SetStringValue(text);
				}
				catch (ConfigurationErrorsException)
				{
					throw;
				}
				catch (ConfigurationException)
				{
					throw;
				}
				catch (Exception ex2)
				{
					throw new ConfigurationErrorsException($"The value for the property '{propertyInformation.Name}' is not valid. The error is: {ex2.Message}", reader);
				}
				hashtable[propertyInformation] = propertyInformation.Name;
				if (reader is ConfigXmlTextReader configXmlTextReader)
				{
					propertyInformation.Source = configXmlTextReader.Filename;
					propertyInformation.LineNumber = configXmlTextReader.LineNumber;
				}
			}
			reader.MoveToElement();
			if (reader.IsEmptyElement)
			{
				reader.Skip();
			}
			else
			{
				int depth = reader.Depth;
				reader.ReadStartElement();
				reader.MoveToContent();
				do
				{
					if (reader.NodeType != XmlNodeType.Element)
					{
						reader.Skip();
						continue;
					}
					PropertyInformation propertyInformation2 = ElementInformation.Properties[reader.LocalName];
					if (propertyInformation2 == null || (serializeCollectionKey && !propertyInformation2.IsKey))
					{
						if (OnDeserializeUnrecognizedElement(reader.LocalName, reader))
						{
							continue;
						}
						if (propertyInformation2 == null)
						{
							ConfigurationElementCollection configurationElementCollection = GetDefaultCollection();
							if (configurationElementCollection != null && configurationElementCollection.OnDeserializeUnrecognizedElement(reader.LocalName, reader))
							{
								continue;
							}
						}
						throw new ConfigurationErrorsException("Unrecognized element '" + reader.LocalName + "'.", reader);
					}
					if (!propertyInformation2.IsElement)
					{
						throw new ConfigurationErrorsException("Property '" + propertyInformation2.Name + "' is not a ConfigurationElement.");
					}
					if (hashtable.Contains(propertyInformation2))
					{
						throw new ConfigurationErrorsException("The element <" + propertyInformation2.Name + "> may only appear once in this section.", reader);
					}
					((ConfigurationElement)propertyInformation2.Value).DeserializeElement(reader, serializeCollectionKey);
					hashtable[propertyInformation2] = propertyInformation2.Name;
					if (depth == reader.Depth)
					{
						reader.Read();
					}
				}
				while (depth < reader.Depth);
			}
			modified = false;
			foreach (PropertyInformation property in ElementInformation.Properties)
			{
				if (!string.IsNullOrEmpty(property.Name) && property.IsRequired && !hashtable.ContainsKey(property) && ElementInformation.Properties[property.Name] == null)
				{
					object obj = OnRequiredPropertyNotFound(property.Name);
					if (!object.Equals(obj, property.DefaultValue))
					{
						property.Value = obj;
						property.IsModified = false;
					}
				}
			}
			PostDeserialize();
		}

		protected virtual bool OnDeserializeUnrecognizedAttribute(string name, string value)
		{
			return false;
		}

		protected virtual bool OnDeserializeUnrecognizedElement(string elementName, XmlReader reader)
		{
			return false;
		}

		protected virtual object OnRequiredPropertyNotFound(string name)
		{
			throw new ConfigurationErrorsException("Required attribute '" + name + "' not found.");
		}

		protected virtual void PreSerialize(XmlWriter writer)
		{
		}

		protected virtual void PostDeserialize()
		{
		}

		protected internal virtual void InitializeDefault()
		{
		}

		protected internal virtual bool IsModified()
		{
			if (modified)
			{
				return true;
			}
			foreach (PropertyInformation property in ElementInformation.Properties)
			{
				if (property.IsElement && property.Value is ConfigurationElement configurationElement && configurationElement.IsModified())
				{
					modified = true;
					break;
				}
			}
			return modified;
		}

		protected internal virtual void SetReadOnly()
		{
			readOnly = true;
		}

		public virtual bool IsReadOnly()
		{
			return readOnly;
		}

		protected internal virtual void Reset(ConfigurationElement parentElement)
		{
			elementPresent = false;
			if (parentElement != null)
			{
				ElementInformation.Reset(parentElement.ElementInformation);
			}
			else
			{
				InitializeDefault();
			}
		}

		protected internal virtual void ResetModified()
		{
			modified = false;
			foreach (PropertyInformation property in ElementInformation.Properties)
			{
				property.IsModified = false;
				if (property.Value is ConfigurationElement configurationElement)
				{
					configurationElement.ResetModified();
				}
			}
		}

		protected internal virtual bool SerializeElement(XmlWriter writer, bool serializeCollectionKey)
		{
			PreSerialize(writer);
			if (serializeCollectionKey)
			{
				ConfigurationPropertyCollection keyProperties = GetKeyProperties();
				foreach (ConfigurationProperty item in keyProperties)
				{
					writer.WriteAttributeString(item.Name, item.ConvertToString(this[item.Name]));
				}
				return keyProperties.Count > 0;
			}
			bool flag = false;
			foreach (PropertyInformation property in ElementInformation.Properties)
			{
				if (!property.IsElement)
				{
					if (saveContext == null)
					{
						throw new InvalidOperationException();
					}
					if (saveContext.HasValue(property))
					{
						writer.WriteAttributeString(property.Name, property.GetStringValue());
						flag = true;
					}
				}
			}
			foreach (PropertyInformation property2 in ElementInformation.Properties)
			{
				if (property2.IsElement)
				{
					ConfigurationElement configurationElement = (ConfigurationElement)property2.Value;
					if (configurationElement != null)
					{
						flag = configurationElement.SerializeToXmlElement(writer, property2.Name) || flag;
					}
				}
			}
			return flag;
		}

		protected internal virtual bool SerializeToXmlElement(XmlWriter writer, string elementName)
		{
			if (saveContext == null)
			{
				throw new InvalidOperationException();
			}
			if (!saveContext.HasValues())
			{
				return false;
			}
			if (elementName != null && elementName != "")
			{
				writer.WriteStartElement(elementName);
			}
			bool result = SerializeElement(writer, serializeCollectionKey: false);
			if (elementName != null && elementName != "")
			{
				writer.WriteEndElement();
			}
			return result;
		}

		protected internal virtual void Unmerge(ConfigurationElement sourceElement, ConfigurationElement parentElement, ConfigurationSaveMode saveMode)
		{
			if (parentElement != null && sourceElement.GetType() != parentElement.GetType())
			{
				throw new ConfigurationErrorsException("Can't unmerge two elements of different type");
			}
			bool flag = saveMode == ConfigurationSaveMode.Minimal || saveMode == ConfigurationSaveMode.Modified;
			foreach (PropertyInformation property in sourceElement.ElementInformation.Properties)
			{
				if (property.ValueOrigin == PropertyValueOrigin.Default)
				{
					continue;
				}
				PropertyInformation propertyInformation2 = ElementInformation.Properties[property.Name];
				object value = property.Value;
				if (parentElement == null || !parentElement.HasValue(property.Name))
				{
					propertyInformation2.Value = value;
				}
				else
				{
					if (value == null)
					{
						continue;
					}
					object obj = parentElement[property.Name];
					if (!property.IsElement)
					{
						if (!object.Equals(value, obj) || saveMode == ConfigurationSaveMode.Full || (saveMode == ConfigurationSaveMode.Modified && property.ValueOrigin == PropertyValueOrigin.SetHere))
						{
							propertyInformation2.Value = value;
						}
						continue;
					}
					ConfigurationElement configurationElement = (ConfigurationElement)value;
					if (!flag || configurationElement.IsModified())
					{
						if (obj == null)
						{
							propertyInformation2.Value = value;
							continue;
						}
						ConfigurationElement parentElement2 = (ConfigurationElement)obj;
						((ConfigurationElement)propertyInformation2.Value).Unmerge(configurationElement, parentElement2, saveMode);
					}
				}
			}
		}

		internal bool HasValue(string propName)
		{
			PropertyInformation propertyInformation = ElementInformation.Properties[propName];
			if (propertyInformation != null)
			{
				return propertyInformation.ValueOrigin != PropertyValueOrigin.Default;
			}
			return false;
		}

		internal bool IsReadFromConfig(string propName)
		{
			PropertyInformation propertyInformation = ElementInformation.Properties[propName];
			if (propertyInformation != null)
			{
				return propertyInformation.ValueOrigin == PropertyValueOrigin.SetHere;
			}
			return false;
		}

		private void ValidateValue(ConfigurationProperty p, string value)
		{
			ConfigurationValidatorBase validator;
			if (p != null && (validator = p.Validator) != null)
			{
				if (!validator.CanValidate(p.Type))
				{
					throw new ConfigurationErrorsException($"Validator does not support type {p.Type}");
				}
				validator.Validate(p.ConvertFromString(value));
			}
		}

		internal bool HasValue(ConfigurationElement parent, PropertyInformation prop, ConfigurationSaveMode mode)
		{
			if (prop.ValueOrigin == PropertyValueOrigin.Default)
			{
				return false;
			}
			if (mode == ConfigurationSaveMode.Modified && prop.ValueOrigin == PropertyValueOrigin.SetHere && prop.IsModified)
			{
				return true;
			}
			object obj = ((parent != null && parent.HasValue(prop.Name)) ? parent[prop.Name] : prop.DefaultValue);
			if (!prop.IsElement)
			{
				return !object.Equals(prop.Value, obj);
			}
			ConfigurationElement obj2 = (ConfigurationElement)prop.Value;
			ConfigurationElement parent2 = (ConfigurationElement)obj;
			return obj2.HasValues(parent2, mode);
		}

		internal virtual bool HasValues(ConfigurationElement parent, ConfigurationSaveMode mode)
		{
			if (mode == ConfigurationSaveMode.Full)
			{
				return true;
			}
			if (modified && mode == ConfigurationSaveMode.Modified)
			{
				return true;
			}
			foreach (PropertyInformation property in ElementInformation.Properties)
			{
				if (HasValue(parent, property, mode))
				{
					return true;
				}
			}
			return false;
		}

		internal virtual void PrepareSave(ConfigurationElement parent, ConfigurationSaveMode mode)
		{
			saveContext = new SaveContext(this, parent, mode);
			foreach (PropertyInformation property in ElementInformation.Properties)
			{
				if (property.IsElement)
				{
					ConfigurationElement configurationElement = (ConfigurationElement)property.Value;
					if (parent == null || !parent.HasValue(property.Name))
					{
						configurationElement.PrepareSave(null, mode);
						continue;
					}
					ConfigurationElement parent2 = (ConfigurationElement)parent[property.Name];
					configurationElement.PrepareSave(parent2, mode);
				}
			}
		}

		protected virtual string GetTransformedAssemblyString(string assemblyName)
		{
			ThrowStub.ThrowNotSupportedException();
			return null;
		}

		protected virtual string GetTransformedTypeString(string typeName)
		{
			ThrowStub.ThrowNotSupportedException();
			return null;
		}
	}
	internal class ElementMap
	{
		private static readonly Hashtable elementMaps = Hashtable.Synchronized(new Hashtable());

		private readonly ConfigurationPropertyCollection properties;

		private readonly ConfigurationCollectionAttribute collectionAttribute;

		public ConfigurationCollectionAttribute CollectionAttribute => collectionAttribute;

		public bool HasProperties => properties.Count > 0;

		public ConfigurationPropertyCollection Properties => properties;

		public static ElementMap GetMap(Type t)
		{
			if (elementMaps[t] is ElementMap result)
			{
				return result;
			}
			ElementMap elementMap = new ElementMap(t);
			elementMaps[t] = elementMap;
			return elementMap;
		}

		public ElementMap(Type t)
		{
			properties = new ConfigurationPropertyCollection();
			collectionAttribute = Attribute.GetCustomAttribute(t, typeof(ConfigurationCollectionAttribute)) as ConfigurationCollectionAttribute;
			PropertyInfo[] array = t.GetProperties(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
			foreach (PropertyInfo propertyInfo in array)
			{
				if (Attribute.GetCustomAttribute(propertyInfo, typeof(ConfigurationPropertyAttribute)) is ConfigurationPropertyAttribute configurationPropertyAttribute)
				{
					string name = ((configurationPropertyAttribute.Name != null) ? configurationPropertyAttribute.Name : propertyInfo.Name);
					ConfigurationValidatorBase validator = ((Attribute.GetCustomAttribute(propertyInfo, typeof(ConfigurationValidatorAttribute)) is ConfigurationValidatorAttribute configurationValidatorAttribute) ? configurationValidatorAttribute.ValidatorInstance : null);
					TypeConverterAttribute typeConverterAttribute = (TypeConverterAttribute)Attribute.GetCustomAttribute(propertyInfo, typeof(TypeConverterAttribute));
					ConfigurationProperty property = new ConfigurationProperty(typeConverter: (typeConverterAttribute != null) ? ((TypeConverter)Activator.CreateInstance(Type.GetType(typeConverterAttribute.ConverterTypeName), nonPublic: true)) : null, name: name, type: propertyInfo.PropertyType, defaultValue: configurationPropertyAttribute.DefaultValue, validator: validator, options: configurationPropertyAttribute.Options)
					{
						CollectionAttribute = (Attribute.GetCustomAttribute(propertyInfo, typeof(ConfigurationCollectionAttribute)) as ConfigurationCollectionAttribute)
					};
					properties.Add(property);
				}
			}
		}
	}
	[DebuggerDisplay("Count = {Count}")]
	public abstract class ConfigurationElementCollection : ConfigurationElement, ICollection, IEnumerable
	{
		private sealed class ConfigurationRemoveElement : ConfigurationElement
		{
			private readonly ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection();

			private readonly ConfigurationElement _origElement;

			private readonly ConfigurationElementCollection _origCollection;

			internal object KeyValue
			{
				get
				{
					foreach (ConfigurationProperty property in Properties)
					{
						_origElement[property] = base[property];
					}
					return _origCollection.GetElementKey(_origElement);
				}
			}

			protected internal override ConfigurationPropertyCollection Properties => properties;

			internal ConfigurationRemoveElement(ConfigurationElement origElement, ConfigurationElementCollection origCollection)
			{
				_origElement = origElement;
				_origCollection = origCollection;
				foreach (ConfigurationProperty property in origElement.Properties)
				{
					if (property.IsKey)
					{
						properties.Add(property);
					}
				}
			}
		}

		private ArrayList list = new ArrayList();

		private ArrayList removed;

		private ArrayList inherited;

		private bool emitClear;

		private bool modified;

		private IComparer comparer;

		private int inheritedLimitIndex;

		private string addElementName = "add";

		private string clearElementName = "clear";

		private string removeElementName = "remove";

		public virtual ConfigurationElementCollectionType CollectionType => ConfigurationElementCollectionType.AddRemoveClearMap;

		private bool IsBasic
		{
			get
			{
				if (CollectionType != 0)
				{
					return CollectionType == ConfigurationElementCollectionType.BasicMapAlternate;
				}
				return true;
			}
		}

		private bool IsAlternate
		{
			get
			{
				if (CollectionType != ConfigurationElementCollectionType.AddRemoveClearMapAlternate)
				{
					return CollectionType == ConfigurationElementCollectionType.BasicMapAlternate;
				}
				return true;
			}
		}

		public int Count => list.Count;

		protected virtual string ElementName => string.Empty;

		public bool EmitClear
		{
			get
			{
				return emitClear;
			}
			set
			{
				emitClear = value;
			}
		}

		public bool IsSynchronized => false;

		public object SyncRoot => this;

		protected virtual bool ThrowOnDuplicate
		{
			get
			{
				if (CollectionType != ConfigurationElementCollectionType.AddRemoveClearMap && CollectionType != ConfigurationElementCollectionType.AddRemoveClearMapAlternate)
				{
					return false;
				}
				return true;
			}
		}

		protected internal string AddElementName
		{
			get
			{
				return addElementName;
			}
			set
			{
				addElementName = value;
			}
		}

		protected internal string ClearElementName
		{
			get
			{
				return clearElementName;
			}
			set
			{
				clearElementName = value;
			}
		}

		protected internal string RemoveElementName
		{
			get
			{
				return removeElementName;
			}
			set
			{
				removeElementName = value;
			}
		}

		protected ConfigurationElementCollection()
		{
		}

		protected ConfigurationElementCollection(IComparer comparer)
		{
			this.comparer = comparer;
		}

		internal override void InitFromProperty(PropertyInformation propertyInfo)
		{
			ConfigurationCollectionAttribute configurationCollectionAttribute = propertyInfo.Property.CollectionAttribute;
			if (configurationCollectionAttribute == null)
			{
				configurationCollectionAttribute = Attribute.GetCustomAttribute(propertyInfo.Type, typeof(ConfigurationCollectionAttribute)) as ConfigurationCollectionAttribute;
			}
			if (configurationCollectionAttribute != null)
			{
				addElementName = configurationCollectionAttribute.AddItemName;
				clearElementName = configurationCollectionAttribute.ClearItemsName;
				removeElementName = configurationCollectionAttribute.RemoveItemName;
			}
			base.InitFromProperty(propertyInfo);
		}

		protected virtual void BaseAdd(ConfigurationElement element)
		{
			BaseAdd(element, ThrowOnDuplicate);
		}

		protected void BaseAdd(ConfigurationElement element, bool throwIfExists)
		{
			if (IsReadOnly())
			{
				throw new ConfigurationErrorsException("Collection is read only.");
			}
			if (IsAlternate)
			{
				list.Insert(inheritedLimitIndex, element);
				inheritedLimitIndex++;
			}
			else
			{
				int num = IndexOfKey(GetElementKey(element));
				if (num >= 0)
				{
					if (element.Equals(list[num]))
					{
						return;
					}
					if (throwIfExists)
					{
						throw new ConfigurationErrorsException("Duplicate element in collection");
					}
					list.RemoveAt(num);
				}
				list.Add(element);
			}
			modified = true;
		}

		protected virtual void BaseAdd(int index, ConfigurationElement element)
		{
			if (ThrowOnDuplicate && BaseIndexOf(element) != -1)
			{
				throw new ConfigurationErrorsException("Duplicate element in collection");
			}
			if (IsReadOnly())
			{
				throw new ConfigurationErrorsException("Collection is read only.");
			}
			if (IsAlternate && index > inheritedLimitIndex)
			{
				throw new ConfigurationErrorsException("Can't insert new elements below the inherited elements.");
			}
			if (!IsAlternate && index <= inheritedLimitIndex)
			{
				throw new ConfigurationErrorsException("Can't insert new elements above the inherited elements.");
			}
			list.Insert(index, element);
			modified = true;
		}

		protected internal void BaseClear()
		{
			if (IsReadOnly())
			{
				throw new ConfigurationErrorsException("Collection is read only.");
			}
			list.Clear();
			modified = true;
		}

		protected internal ConfigurationElement BaseGet(int index)
		{
			return (ConfigurationElement)list[index];
		}

		protected internal ConfigurationElement BaseGet(object key)
		{
			int num = IndexOfKey(key);
			if (num != -1)
			{
				return (ConfigurationElement)list[num];
			}
			return null;
		}

		protected internal object[] BaseGetAllKeys()
		{
			object[] array = new object[list.Count];
			for (int i = 0; i < list.Count; i++)
			{
				array[i] = BaseGetKey(i);
			}
			return array;
		}

		protected internal object BaseGetKey(int index)
		{
			if (index < 0 || index >= list.Count)
			{
				throw new ConfigurationErrorsException($"Index {index} is out of range");
			}
			return GetElementKey((ConfigurationElement)list[index]).ToString();
		}

		protected int BaseIndexOf(ConfigurationElement element)
		{
			return list.IndexOf(element);
		}

		private int IndexOfKey(object key)
		{
			for (int i = 0; i < list.Count; i++)
			{
				if (CompareKeys(GetElementKey((ConfigurationElement)list[i]), key))
				{
					return i;
				}
			}
			return -1;
		}

		protected internal bool BaseIsRemoved(object key)
		{
			if (removed == null)
			{
				return false;
			}
			foreach (ConfigurationElement item in removed)
			{
				if (CompareKeys(GetElementKey(item), key))
				{
					return true;
				}
			}
			return false;
		}

		protected internal void BaseRemove(object key)
		{
			if (IsReadOnly())
			{
				throw new ConfigurationErrorsException("Collection is read only.");
			}
			int num = IndexOfKey(key);
			if (num != -1)
			{
				BaseRemoveAt(num);
				modified = true;
			}
		}

		protected internal void BaseRemoveAt(int index)
		{
			if (IsReadOnly())
			{
				throw new ConfigurationErrorsException("Collection is read only.");
			}
			ConfigurationElement configurationElement = (ConfigurationElement)list[index];
			if (!IsElementRemovable(configurationElement))
			{
				throw new ConfigurationErrorsException("Element can't be removed from element collection.");
			}
			if (inherited != null && inherited.Contains(configurationElement))
			{
				throw new ConfigurationErrorsException("Inherited items can't be removed.");
			}
			list.RemoveAt(index);
			if (IsAlternate && inheritedLimitIndex > 0)
			{
				inheritedLimitIndex--;
			}
			modified = true;
		}

		private bool CompareKeys(object key1, object key2)
		{
			if (comparer != null)
			{
				return comparer.Compare(key1, key2) == 0;
			}
			return object.Equals(key1, key2);
		}

		public void CopyTo(ConfigurationElement[] array, int index)
		{
			list.CopyTo(array, index);
		}

		protected abstract ConfigurationElement CreateNewElement();

		protected virtual ConfigurationElement CreateNewElement(string elementName)
		{
			return CreateNewElement();
		}

		private ConfigurationElement CreateNewElementInternal(string elementName)
		{
			ConfigurationElement configurationElement = ((elementName != null) ? CreateNewElement(elementName) : CreateNewElement());
			configurationElement.Init();
			return configurationElement;
		}

		public override bool Equals(object compareTo)
		{
			if (!(compareTo is ConfigurationElementCollection configurationElementCollection))
			{
				return false;
			}
			if (GetType() != configurationElementCollection.GetType())
			{
				return false;
			}
			if (Count != configurationElementCollection.Count)
			{
				return false;
			}
			for (int i = 0; i < Count; i++)
			{
				if (!BaseGet(i).Equals(configurationElementCollection.BaseGet(i)))
				{
					return false;
				}
			}
			return true;
		}

		protected abstract object GetElementKey(ConfigurationElement element);

		public override int GetHashCode()
		{
			int num = 0;
			for (int i = 0; i < Count; i++)
			{
				num += BaseGet(i).GetHashCode();
			}
			return num;
		}

		void ICollection.CopyTo(Array arr, int index)
		{
			list.CopyTo(arr, index);
		}

		public IEnumerator GetEnumerator()
		{
			return list.GetEnumerator();
		}

		protected virtual bool IsElementName(string elementName)
		{
			return false;
		}

		protected virtual bool IsElementRemovable(ConfigurationElement element)
		{
			return !IsReadOnly();
		}

		protected internal override bool IsModified()
		{
			if (modified)
			{
				return true;
			}
			for (int i = 0; i < list.Count; i++)
			{
				if (((ConfigurationElement)list[i]).IsModified())
				{
					modified = true;
					break;
				}
			}
			return modified;
		}

		[MonoTODO]
		public override bool IsReadOnly()
		{
			return base.IsReadOnly();
		}

		internal override void PrepareSave(ConfigurationElement parentElement, ConfigurationSaveMode mode)
		{
			ConfigurationElementCollection configurationElementCollection = (ConfigurationElementCollection)parentElement;
			base.PrepareSave(parentElement, mode);
			for (int i = 0; i < list.Count; i++)
			{
				ConfigurationElement configurationElement = (ConfigurationElement)list[i];
				object elementKey = GetElementKey(configurationElement);
				ConfigurationElement parent = configurationElementCollection?.BaseGet(elementKey);
				configurationElement.PrepareSave(parent, mode);
			}
		}

		internal override bool HasValues(ConfigurationElement parentElement, ConfigurationSaveMode mode)
		{
			ConfigurationElementCollection configurationElementCollection = (ConfigurationElementCollection)parentElement;
			if (mode == ConfigurationSaveMode.Full)
			{
				return list.Count > 0;
			}
			for (int i = 0; i < list.Count; i++)
			{
				ConfigurationElement configurationElement = (ConfigurationElement)list[i];
				object elementKey = GetElementKey(configurationElement);
				ConfigurationElement parent = configurationElementCollection?.BaseGet(elementKey);
				if (configurationElement.HasValues(parent, mode))
				{
					return true;
				}
			}
			return false;
		}

		protected internal override void Reset(ConfigurationElement parentElement)
		{
			bool isBasic = IsBasic;
			ConfigurationElementCollection configurationElementCollection = (ConfigurationElementCollection)parentElement;
			for (int i = 0; i < configurationElementCollection.Count; i++)
			{
				ConfigurationElement parentElement2 = configurationElementCollection.BaseGet(i);
				ConfigurationElement configurationElement = CreateNewElementInternal(null);
				configurationElement.Reset(parentElement2);
				BaseAdd(configurationElement);
				if (isBasic)
				{
					if (inherited == null)
					{
						inherited = new ArrayList();
					}
					inherited.Add(configurationElement);
				}
			}
			if (IsAlternate)
			{
				inheritedLimitIndex = 0;
			}
			else
			{
				inheritedLimitIndex = Count - 1;
			}
			modified = false;
		}

		protected internal override void ResetModified()
		{
			modified = false;
			for (int i = 0; i < list.Count; i++)
			{
				((ConfigurationElement)list[i]).ResetModified();
			}
		}

		[MonoTODO]
		protected internal override void SetReadOnly()
		{
			base.SetReadOnly();
		}

		protected internal override bool SerializeElement(XmlWriter writer, bool serializeCollectionKey)
		{
			if (serializeCollectionKey)
			{
				return base.SerializeElement(writer, serializeCollectionKey);
			}
			bool flag = false;
			if (IsBasic)
			{
				for (int i = 0; i < list.Count; i++)
				{
					ConfigurationElement configurationElement = (ConfigurationElement)list[i];
					flag = ((!(ElementName != string.Empty)) ? (configurationElement.SerializeElement(writer, serializeCollectionKey: false) || flag) : (configurationElement.SerializeToXmlElement(writer, ElementName) || flag));
				}
			}
			else
			{
				if (emitClear)
				{
					writer.WriteElementString(clearElementName, "");
					flag = true;
				}
				if (removed != null)
				{
					for (int j = 0; j < removed.Count; j++)
					{
						writer.WriteStartElement(removeElementName);
						((ConfigurationElement)removed[j]).SerializeElement(writer, serializeCollectionKey: true);
						writer.WriteEndElement();
					}
					flag = flag || removed.Count > 0;
				}
				for (int k = 0; k < list.Count; k++)
				{
					((ConfigurationElement)list[k]).SerializeToXmlElement(writer, addElementName);
				}
				flag = flag || list.Count > 0;
			}
			return flag;
		}

		protected override bool OnDeserializeUnrecognizedElement(string elementName, XmlReader reader)
		{
			if (IsBasic)
			{
				ConfigurationElement configurationElement = null;
				if (elementName == ElementName)
				{
					configurationElement = CreateNewElementInternal(null);
				}
				if (IsElementName(elementName))
				{
					configurationElement = CreateNewElementInternal(elementName);
				}
				if (configurationElement != null)
				{
					configurationElement.DeserializeElement(reader, serializeCollectionKey: false);
					BaseAdd(configurationElement);
					modified = false;
					return true;
				}
			}
			else
			{
				if (elementName == clearElementName)
				{
					reader.MoveToContent();
					if (reader.MoveToNextAttribute())
					{
						throw new ConfigurationErrorsException("Unrecognized attribute '" + reader.LocalName + "'.");
					}
					reader.MoveToElement();
					reader.Skip();
					BaseClear();
					emitClear = true;
					modified = false;
					return true;
				}
				if (elementName == removeElementName)
				{
					ConfigurationRemoveElement configurationRemoveElement = new ConfigurationRemoveElement(CreateNewElementInternal(null), this);
					configurationRemoveElement.DeserializeElement(reader, serializeCollectionKey: true);
					BaseRemove(configurationRemoveElement.KeyValue);
					modified = false;
					return true;
				}
				if (elementName == addElementName)
				{
					ConfigurationElement configurationElement2 = CreateNewElementInternal(null);
					configurationElement2.DeserializeElement(reader, serializeCollectionKey: false);
					BaseAdd(configurationElement2);
					modified = false;
					return true;
				}
			}
			return false;
		}

		protected internal override void Unmerge(ConfigurationElement sourceElement, ConfigurationElement parentElement, ConfigurationSaveMode saveMode)
		{
			ConfigurationElementCollection configurationElementCollection = (ConfigurationElementCollection)sourceElement;
			ConfigurationElementCollection configurationElementCollection2 = (ConfigurationElementCollection)parentElement;
			for (int i = 0; i < configurationElementCollection.Count; i++)
			{
				ConfigurationElement configurationElement = configurationElementCollection.BaseGet(i);
				object elementKey = configurationElementCollection.GetElementKey(configurationElement);
				ConfigurationElement configurationElement2 = configurationElementCollection2?.BaseGet(elementKey);
				ConfigurationElement configurationElement3 = CreateNewElementInternal(null);
				if (configurationElement2 != null && saveMode != ConfigurationSaveMode.Full)
				{
					configurationElement3.Unmerge(configurationElement, configurationElement2, saveMode);
					if (configurationElement3.HasValues(configurationElement2, saveMode))
					{
						BaseAdd(configurationElement3);
					}
				}
				else
				{
					configurationElement3.Unmerge(configurationElement, null, ConfigurationSaveMode.Full);
					BaseAdd(configurationElement3);
				}
			}
			if (saveMode == ConfigurationSaveMode.Full)
			{
				EmitClear = true;
			}
			else
			{
				if (configurationElementCollection2 == null)
				{
					return;
				}
				for (int j = 0; j < configurationElementCollection2.Count; j++)
				{
					ConfigurationElement configurationElement4 = configurationElementCollection2.BaseGet(j);
					object elementKey2 = configurationElementCollection2.GetElementKey(configurationElement4);
					if (configurationElementCollection.IndexOfKey(elementKey2) == -1)
					{
						if (removed == null)
						{
							removed = new ArrayList();
						}
						removed.Add(configurationElement4);
					}
				}
			}
		}
	}
	public enum ConfigurationElementCollectionType
	{
		BasicMap,
		AddRemoveClearMap,
		BasicMapAlternate,
		AddRemoveClearMapAlternate
	}
	public sealed class ConfigurationElementProperty
	{
		private ConfigurationValidatorBase validator;

		public ConfigurationValidatorBase Validator => validator;

		public ConfigurationElementProperty(ConfigurationValidatorBase validator)
		{
			this.validator = validator;
		}
	}
	[Serializable]
	public class ConfigurationErrorsException : ConfigurationException
	{
		private readonly string filename;

		private readonly int line;

		public override string BareMessage => ((ConfigurationException)this).BareMessage;

		public ICollection Errors
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		public override string Filename => filename;

		public override int Line => line;

		public override string Message
		{
			get
			{
				if (!string.IsNullOrEmpty(filename))
				{
					if (line != 0)
					{
						return ((ConfigurationException)this).BareMessage + " (" + filename + " line " + line + ")";
					}
					return ((ConfigurationException)this).BareMessage + " (" + filename + ")";
				}
				if (line != 0)
				{
					return ((ConfigurationException)this).BareMessage + " (line " + line + ")";
				}
				return ((ConfigurationException)this).BareMessage;
			}
		}

		public ConfigurationErrorsException()
		{
		}

		public ConfigurationErrorsException(string message)
			: base(message)
		{
		}

		protected ConfigurationErrorsException(SerializationInfo info, StreamingContext context)
			: base(info, context)
		{
			filename = info.GetString("ConfigurationErrors_Filename");
			line = info.GetInt32("ConfigurationErrors_Line");
		}

		public ConfigurationErrorsException(string message, Exception inner)
			: base(message, inner)
		{
		}

		public ConfigurationErrorsException(string message, XmlNode node)
			: this(message, null, GetFilename(node), GetLineNumber(node))
		{
		}

		public ConfigurationErrorsException(string message, Exception inner, XmlNode node)
			: this(message, inner, GetFilename(node), GetLineNumber(node))
		{
		}

		public ConfigurationErrorsException(string message, XmlReader reader)
			: this(message, null, GetFilename(reader), GetLineNumber(reader))
		{
		}

		public ConfigurationErrorsException(string message, Exception inner, XmlReader reader)
			: this(message, inner, GetFilename(reader), GetLineNumber(reader))
		{
		}

		public ConfigurationErrorsException(string message, string filename, int line)
			: this(message, null, filename, line)
		{
		}

		public ConfigurationErrorsException(string message, Exception inner, string filename, int line)
			: base(message, inner)
		{
			this.filename = filename;
			this.line = line;
		}

		public static string GetFilename(XmlReader reader)
		{
			if (reader is IConfigErrorInfo)
			{
				return ((IConfigErrorInfo)reader).Filename;
			}
			return reader?.BaseURI;
		}

		public static int GetLineNumber(XmlReader reader)
		{
			if (reader is IConfigErrorInfo)
			{
				return ((IConfigErrorInfo)reader).LineNumber;
			}
			if (!(reader is IXmlLineInfo xmlLineInfo))
			{
				return 0;
			}
			return xmlLineInfo.LineNumber;
		}

		public static string GetFilename(XmlNode node)
		{
			if (!(node is IConfigErrorInfo))
			{
				return null;
			}
			return ((IConfigErrorInfo)node).Filename;
		}

		public static int GetLineNumber(XmlNode node)
		{
			if (!(node is IConfigErrorInfo))
			{
				return 0;
			}
			return ((IConfigErrorInfo)node).LineNumber;
		}

		[SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
		public override void GetObjectData(SerializationInfo info, StreamingContext context)
		{
			((ConfigurationException)this).GetObjectData(info, context);
			info.AddValue("ConfigurationErrors_Filename", filename);
			info.AddValue("ConfigurationErrors_Line", line);
		}
	}
	public class ConfigurationFileMap : ICloneable
	{
		private string machineConfigFilename;

		public string MachineConfigFilename
		{
			get
			{
				return machineConfigFilename;
			}
			set
			{
				machineConfigFilename = value;
			}
		}

		public ConfigurationFileMap()
		{
			machineConfigFilename = RuntimeEnvironment.SystemConfigurationFile;
		}

		public ConfigurationFileMap(string machineConfigFilename)
		{
			this.machineConfigFilename = machineConfigFilename;
		}

		public virtual object Clone()
		{
			return new ConfigurationFileMap(machineConfigFilename);
		}
	}
	public class ConfigurationLocation
	{
		private static readonly char[] pathTrimChars = new char[1] { '/' };

		private string path;

		private Configuration configuration;

		private Configuration parent;

		private string xmlContent;

		private bool parentResolved;

		private bool allowOverride;

		public string Path => path;

		internal bool AllowOverride => allowOverride;

		internal string XmlContent => xmlContent;

		internal Configuration OpenedConfiguration => configuration;

		internal ConfigurationLocation()
		{
		}

		internal ConfigurationLocation(string path, string xmlContent, Configuration parent, bool allowOverride)
		{
			if (!string.IsNullOrEmpty(path))
			{
				switch (path[0])
				{
				case ' ':
				case '.':
				case '/':
				case '\\':
					throw new ConfigurationErrorsException("<location> path attribute must be a relative virtual path.  It cannot start with any of ' ' '.' '/' or '\\'.");
				}
				path = path.TrimEnd(pathTrimChars);
			}
			this.path = path;
			this.xmlContent = xmlContent;
			this.parent = parent;
			this.allowOverride = allowOverride;
		}

		public Configuration OpenConfiguration()
		{
			if (configuration == null)
			{
				if (!parentResolved)
				{
					Configuration parentWithFile = parent.GetParentWithFile();
					if (parentWithFile != null)
					{
						string configPathFromLocationSubPath = parent.ConfigHost.GetConfigPathFromLocationSubPath(parent.LocationConfigPath, path);
						parent = parentWithFile.FindLocationConfiguration(configPathFromLocationSubPath, parent);
					}
				}
				configuration = new Configuration(parent, path);
				using (XmlTextReader reader = new ConfigXmlTextReader(new StringReader(xmlContent), path))
				{
					configuration.ReadData(reader, allowOverride);
				}
				xmlContent = null;
			}
			return configuration;
		}

		internal void SetParentConfiguration(Configuration parent)
		{
			if (!parentResolved)
			{
				parentResolved = true;
				this.parent = parent;
				if (configuration != null)
				{
					configuration.Parent = parent;
				}
			}
		}
	}
	public class ConfigurationLocationCollection : ReadOnlyCollectionBase
	{
		public ConfigurationLocation this[int index] => base.InnerList[index] as ConfigurationLocation;

		internal ConfigurationLocationCollection()
		{
		}

		internal void Add(ConfigurationLocation loc)
		{
			base.InnerList.Add(loc);
		}

		internal ConfigurationLocation Find(string location)
		{
			foreach (ConfigurationLocation inner in base.InnerList)
			{
				if (string.Compare(inner.Path, location, StringComparison.OrdinalIgnoreCase) == 0)
				{
					return inner;
				}
			}
			return null;
		}

		internal ConfigurationLocation FindBest(string location)
		{
			if (string.IsNullOrEmpty(location))
			{
				return null;
			}
			ConfigurationLocation configurationLocation = null;
			int length = location.Length;
			int num = 0;
			foreach (ConfigurationLocation inner in base.InnerList)
			{
				string path = inner.Path;
				if (string.IsNullOrEmpty(path))
				{
					continue;
				}
				int length2 = path.Length;
				if (!location.StartsWith(path, StringComparison.OrdinalIgnoreCase))
				{
					continue;
				}
				if (length == length2)
				{
					return inner;
				}
				if (length <= length2 || location[length2] == '/')
				{
					if (configurationLocation == null)
					{
						configurationLocation = inner;
					}
					else if (num < length2)
					{
						configurationLocation = inner;
						num = length2;
					}
				}
			}
			return configurationLocation;
		}
	}
	[Flags]
	internal enum ConfigurationLockType
	{
		Attribute = 1,
		Element = 2,
		Exclude = 0x10
	}
	public sealed class ConfigurationLockCollection : ICollection, IEnumerable
	{
		private ArrayList names;

		private ConfigurationElement element;

		private ConfigurationLockType lockType;

		private bool is_modified;

		private Hashtable valid_name_hash;

		private string valid_names;

		public string AttributeList
		{
			get
			{
				string[] array = new string[names.Count];
				names.CopyTo(array, 0);
				return string.Join(",", array);
			}
		}

		public int Count => names.Count;

		[MonoTODO]
		public bool HasParentElements => false;

		[MonoTODO]
		public bool IsModified
		{
			get
			{
				return is_modified;
			}
			internal set
			{
				is_modified = value;
			}
		}

		[MonoTODO]
		public bool IsSynchronized => false;

		[MonoTODO]
		public object SyncRoot => this;

		internal ConfigurationLockCollection(ConfigurationElement element, ConfigurationLockType lockType)
		{
			names = new ArrayList();
			this.element = element;
			this.lockType = lockType;
		}

		private void CheckName(string name)
		{
			bool flag = (lockType & ConfigurationLockType.Attribute) == ConfigurationLockType.Attribute;
			if (valid_name_hash == null)
			{
				valid_name_hash = new Hashtable();
				foreach (ConfigurationProperty property in element.Properties)
				{
					if (flag != property.IsElement)
					{
						valid_name_hash.Add(property.Name, true);
					}
				}
				if (!flag)
				{
					ConfigurationElementCollection defaultCollection = element.GetDefaultCollection();
					valid_name_hash.Add(defaultCollection.AddElementName, true);
					valid_name_hash.Add(defaultCollection.ClearElementName, true);
					valid_name_hash.Add(defaultCollection.RemoveElementName, true);
				}
				string[] array = new string[valid_name_hash.Keys.Count];
				valid_name_hash.Keys.CopyTo(array, 0);
				valid_names = string.Join(",", array);
			}
			if (valid_name_hash[name] == null)
			{
				throw new ConfigurationErrorsException(string.Format("The {2} '{0}' is not valid in the locked list for this section.  The following {3} can be locked: '{1}'", name, valid_names, flag ? "attribute" : "element", flag ? "attributes" : "elements"));
			}
		}

		public void Add(string name)
		{
			CheckName(name);
			if (!names.Contains(name))
			{
				names.Add(name);
				is_modified = true;
			}
		}

		public void Clear()
		{
			names.Clear();
			is_modified = true;
		}

		public bool Contains(string name)
		{
			return names.Contains(name);
		}

		public void CopyTo(string[] array, int index)
		{
			names.CopyTo(array, index);
		}

		public IEnumerator GetEnumerator()
		{
			return names.GetEnumerator();
		}

		[MonoInternalNote("we can't possibly *always* return false here...")]
		public bool IsReadOnly(string name)
		{
			for (int i = 0; i < names.Count; i++)
			{
				if ((string)names[i] == name)
				{
					return false;
				}
			}
			throw new ConfigurationErrorsException($"The entry '{name}' is not in the collection.");
		}

		public void Remove(string name)
		{
			names.Remove(name);
			is_modified = true;
		}

		public void SetFromList(string attributeList)
		{
			Clear();
			char[] separator = new char[1] { ',' };
			string[] array = attributeList.Split(separator);
			foreach (string text in array)
			{
				Add(text.Trim());
			}
		}

		void ICollection.CopyTo(Array array, int index)
		{
			names.CopyTo(array, index);
		}

		internal ConfigurationLockCollection()
		{
			ThrowStub.ThrowNotSupportedException();
		}
	}
	public static class ConfigurationManager
	{
		private static InternalConfigurationFactory configFactory = new InternalConfigurationFactory();

		private static IInternalConfigSystem configSystem = new ClientConfigurationSystem();

		private static object lockobj = new object();

		internal static IInternalConfigConfigurationFactory ConfigurationFactory => configFactory;

		internal static IInternalConfigSystem ConfigurationSystem => configSystem;

		public static NameValueCollection AppSettings => (NameValueCollection)GetSection("appSettings");

		public static ConnectionStringSettingsCollection ConnectionStrings => ((ConnectionStringsSection)GetSection("connectionStrings")).ConnectionStrings;

		[MonoTODO("Evidence and version still needs work")]
		private static string GetAssemblyInfo(Assembly a)
		{
			object[] customAttributes = a.GetCustomAttributes(typeof(AssemblyProductAttribute), inherit: false);
			string arg = ((customAttributes == null || customAttributes.Length == 0) ? AppDomain.CurrentDomain.FriendlyName : ((AssemblyProductAttribute)customAttributes[0]).Product);
			StringBuilder stringBuilder = new StringBuilder();
			stringBuilder.Append("evidencehere");
			string arg2 = stringBuilder.ToString();
			customAttributes = a.GetCustomAttributes(typeof(AssemblyVersionAttribute), inherit: false);
			return Path.Combine(path2: (customAttributes == null || customAttributes.Length == 0) ? "1.0.0.0" : ((AssemblyVersionAttribute)customAttributes[0]).Version, path1: $"{arg}_{arg2}");
		}

		internal static Configuration OpenExeConfigurationInternal(ConfigurationUserLevel userLevel, Assembly calling_assembly, string exePath)
		{
			ExeConfigurationFileMap exeConfigurationFileMap = new ExeConfigurationFileMap();
			if (userLevel != 0)
			{
				if (userLevel != ConfigurationUserLevel.PerUserRoaming)
				{
					if (userLevel != ConfigurationUserLevel.PerUserRoamingAndLocal)
					{
						goto IL_00ea;
					}
					exeConfigurationFileMap.LocalUserConfigFilename = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), GetAssemblyInfo(calling_assembly));
					exeConfigurationFileMap.LocalUserConfigFilename = Path.Combine(exeConfigurationFileMap.LocalUserConfigFilename, "user.config");
				}
				exeConfigurationFileMap.RoamingUserConfigFilename = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), GetAssemblyInfo(calling_assembly));
				exeConfigurationFileMap.RoamingUserConfigFilename = Path.Combine(exeConfigurationFileMap.RoamingUserConfigFilename, "user.config");
			}
			if (exePath == null || exePath.Length == 0)
			{
				exeConfigurationFileMap.ExeConfigFilename = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile;
			}
			else
			{
				if (!Path.IsPathRooted(exePath))
				{
					exePath = Path.GetFullPath(exePath);
				}
				if (!File.Exists(exePath))
				{
					Exception inner = new ArgumentException("The specified path does not exist.", "exePath");
					throw new ConfigurationErrorsException("Error Initializing the configuration system:", inner);
				}
				exeConfigurationFileMap.ExeConfigFilename = exePath + ".config";
			}
			goto IL_00ea;
			IL_00ea:
			return ConfigurationFactory.Create(typeof(ExeConfigurationHost), exeConfigurationFileMap, userLevel);
		}

		public static Configuration OpenExeConfiguration(ConfigurationUserLevel userLevel)
		{
			return OpenExeConfigurationInternal(userLevel, Assembly.GetEntryAssembly() ?? Assembly.GetCallingAssembly(), null);
		}

		public static Configuration OpenExeConfiguration(string exePath)
		{
			return OpenExeConfigurationInternal(ConfigurationUserLevel.None, Assembly.GetEntryAssembly() ?? Assembly.GetCallingAssembly(), exePath);
		}

		[MonoLimitation("ConfigurationUserLevel parameter is not supported.")]
		public static Configuration OpenMappedExeConfiguration(ExeConfigurationFileMap fileMap, ConfigurationUserLevel userLevel)
		{
			return ConfigurationFactory.Create(typeof(ExeConfigurationHost), fileMap, userLevel);
		}

		public static Configuration OpenMachineConfiguration()
		{
			ConfigurationFileMap configurationFileMap = new ConfigurationFileMap();
			return ConfigurationFactory.Create(typeof(MachineConfigurationHost), configurationFileMap);
		}

		public static Configuration OpenMappedMachineConfiguration(ConfigurationFileMap fileMap)
		{
			return ConfigurationFactory.Create(typeof(MachineConfigurationHost), fileMap);
		}

		public static object GetSection(string sectionName)
		{
			object section = ConfigurationSystem.GetSection(sectionName);
			if (section is ConfigurationSection)
			{
				return ((ConfigurationSection)section).GetRuntimeObject();
			}
			return section;
		}

		public static void RefreshSection(string sectionName)
		{
			ConfigurationSystem.RefreshConfig(sectionName);
		}

		internal static IInternalConfigSystem ChangeConfigurationSystem(IInternalConfigSystem newSystem)
		{
			if (newSystem == null)
			{
				throw new ArgumentNullException("newSystem");
			}
			lock (lockobj)
			{
				IInternalConfigSystem result = configSystem;
				configSystem = newSystem;
				return result;
			}
		}

		public static Configuration OpenMappedExeConfiguration(ExeConfigurationFileMap fileMap, ConfigurationUserLevel userLevel, bool preLoad)
		{
			ThrowStub.ThrowNotSupportedException();
			return null;
		}
	}
	[Serializable]
	public sealed class ConfigurationPermission : CodeAccessPermission, IUnrestrictedPermission
	{
		private bool unrestricted;

		public ConfigurationPermission(PermissionState state)
		{
			unrestricted = state == PermissionState.Unrestricted;
		}

		public override IPermission Copy()
		{
			return (IPermission)(object)new ConfigurationPermission(unrestricted ? PermissionState.Unrestricted : PermissionState.None);
		}

		public override void FromXml(SecurityElement securityElement)
		{
			if (securityElement == null)
			{
				throw new ArgumentNullException("securityElement");
			}
			if (securityElement.Tag != "IPermission")
			{
				throw new ArgumentException("securityElement");
			}
			string text = securityElement.Attribute("Unrestricted");
			if (text != null)
			{
				unrestricted = string.Compare(text, "true", StringComparison.InvariantCultureIgnoreCase) == 0;
			}
		}

		public override IPermission Intersect(IPermission target)
		{
			if (target == null)
			{
				return null;
			}
			if (!(target is ConfigurationPermission configurationPermission))
			{
				throw new ArgumentException("target");
			}
			return (IPermission)(object)new ConfigurationPermission((unrestricted && configurationPermission.IsUnrestricted()) ? PermissionState.Unrestricted : PermissionState.None);
		}

		public override IPermission Union(IPermission target)
		{
			if (target == null)
			{
				return ((CodeAccessPermission)this).Copy();
			}
			if (!(target is ConfigurationPermission configurationPermission))
			{
				throw new ArgumentException("target");
			}
			return (IPermission)(object)new ConfigurationPermission((unrestricted || configurationPermission.IsUnrestricted()) ? PermissionState.Unrestricted : PermissionState.None);
		}

		public override bool IsSubsetOf(IPermission target)
		{
			if (target == null)
			{
				return !unrestricted;
			}
			if (!(target is ConfigurationPermission configurationPermission))
			{
				throw new ArgumentException("target");
			}
			if (unrestricted)
			{
				return configurationPermission.IsUnrestricted();
			}
			return true;
		}

		public bool IsUnrestricted()
		{
			return unrestricted;
		}

		public override SecurityElement ToXml()
		{
			SecurityElement securityElement = new SecurityElement("IPermission");
			securityElement.AddAttribute("class", ((object)this).GetType().AssemblyQualifiedName);
			securityElement.AddAttribute("version", "1");
			if (unrestricted)
			{
				securityElement.AddAttribute("Unrestricted", "true");
			}
			return securityElement;
		}
	}
	[Serializable]
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = false)]
	public sealed class ConfigurationPermissionAttribute : CodeAccessSecurityAttribute
	{
		public ConfigurationPermissionAttribute(SecurityAction action)
			: base(action)
		{
		}

		public override IPermission CreatePermission()
		{
			return (IPermission)(object)new ConfigurationPermission(base.Unrestricted ? PermissionState.Unrestricted : PermissionState.None);
		}
	}
	public sealed class ConfigurationProperty
	{
		internal static readonly object NoDefaultValue = new object();

		private string name;

		private Type type;

		private object default_value;

		private TypeConverter converter;

		private ConfigurationValidatorBase validation;

		private ConfigurationPropertyOptions flags;

		private string description;

		private ConfigurationCollectionAttribute collectionAttribute;

		public TypeConverter Converter => converter;

		public object DefaultValue => default_value;

		public bool IsKey => (flags & ConfigurationPropertyOptions.IsKey) != 0;

		public bool IsRequired => (flags & ConfigurationPropertyOptions.IsRequired) != 0;

		public bool IsDefaultCollection => (flags & ConfigurationPropertyOptions.IsDefaultCollection) != 0;

		public string Name => name;

		public string Description => description;

		public Type Type => type;

		public ConfigurationValidatorBase Validator => validation;

		internal bool IsElement => typeof(ConfigurationElement).IsAssignableFrom(type);

		internal ConfigurationCollectionAttribute CollectionAttribute
		{
			get
			{
				return collectionAttribute;
			}
			set
			{
				collectionAttribute = value;
			}
		}

		public bool IsAssemblyStringTransformationRequired
		{
			get
			{
				ThrowStub.ThrowNotSupportedException();
				return default(bool);
			}
		}

		public bool IsTypeStringTransformationRequired
		{
			get
			{
				ThrowStub.ThrowNotSupportedException();
				return default(bool);
			}
		}

		public bool IsVersionCheckRequired
		{
			get
			{
				ThrowStub.ThrowNotSupportedException();
				return default(bool);
			}
		}

		public ConfigurationProperty(string name, Type type)
			: this(name, type, NoDefaultValue, TypeDescriptor.GetConverter(type), new DefaultValidator(), ConfigurationPropertyOptions.None, null)
		{
		}

		public ConfigurationProperty(string name, Type type, object defaultValue)
			: this(name, type, defaultValue, TypeDescriptor.GetConverter(type), new DefaultValidator(), ConfigurationPropertyOptions.None, null)
		{
		}

		public ConfigurationProperty(string name, Type type, object defaultValue, ConfigurationPropertyOptions options)
			: this(name, type, defaultValue, TypeDescriptor.GetConverter(type), new DefaultValidator(), options, null)
		{
		}

		public ConfigurationProperty(string name, Type type, object defaultValue, TypeConverter typeConverter, ConfigurationValidatorBase validator, ConfigurationPropertyOptions options)
			: this(name, type, defaultValue, typeConverter, validator, options, null)
		{
		}

		public ConfigurationProperty(string name, Type type, object defaultValue, TypeConverter typeConverter, ConfigurationValidatorBase validator, ConfigurationPropertyOptions options, string description)
		{
			this.name = name;
			converter = ((typeConverter != null) ? typeConverter : TypeDescriptor.GetConverter(type));
			if (defaultValue != null)
			{
				if (defaultValue == NoDefaultValue)
				{
					defaultValue 

Room Architect Tool_Data/Managed/System.Core.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Tracing;
using System.Dynamic;
using System.Dynamic.Utils;
using System.Globalization;
using System.IO;
using System.IO.MemoryMappedFiles;
using System.Linq;
using System.Linq.Expressions;
using System.Linq.Expressions.Compiler;
using System.Linq.Parallel;
using System.Net;
using System.Reflection;
using System.Reflection.Emit;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Security;
using System.Security.AccessControl;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Security.Permissions;
using System.Security.Principal;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Win32.SafeHandles;
using Mono.Security.Cryptography;
using Mono.Unix.Native;
using Unity;

[assembly: SatelliteContractVersion("4.0.0.0")]
[assembly: AllowPartiallyTrustedCallers]
[assembly: DefaultDependency(LoadHint.Always)]
[assembly: SecurityCritical]
[assembly: CLSCompliant(true)]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: StringFreezing]
[assembly: ComVisible(false)]
[assembly: AssemblyFileVersion("4.6.57.0")]
[assembly: AssemblyInformationalVersion("4.6.57.0")]
[assembly: AssemblyKeyFile("../ecma.pub")]
[assembly: AssemblyCopyright("(c) Various Mono authors")]
[assembly: AssemblyCompany("Mono development team")]
[assembly: AssemblyDefaultAlias("System.Core.dll")]
[assembly: AssemblyDescription("System.Core.dll")]
[assembly: AssemblyTitle("System.Core.dll")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: CompilationRelaxations(8)]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: AssemblyDelaySign(true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("4.0.0.0")]
[assembly: TypeForwardedTo(typeof(Action))]
[assembly: TypeForwardedTo(typeof(Action<, >))]
[assembly: TypeForwardedTo(typeof(Action<, , >))]
[assembly: TypeForwardedTo(typeof(Action<, , , >))]
[assembly: TypeForwardedTo(typeof(Func<>))]
[assembly: TypeForwardedTo(typeof(Func<, >))]
[assembly: TypeForwardedTo(typeof(Func<, , >))]
[assembly: TypeForwardedTo(typeof(Func<, , , >))]
[assembly: TypeForwardedTo(typeof(Func<, , , , >))]
[assembly: TypeForwardedTo(typeof(InvalidTimeZoneException))]
[assembly: TypeForwardedTo(typeof(Lazy<>))]
[assembly: TypeForwardedTo(typeof(ExtensionAttribute))]
[assembly: TypeForwardedTo(typeof(Aes))]
[assembly: TypeForwardedTo(typeof(LazyThreadSafetyMode))]
[assembly: TypeForwardedTo(typeof(LockRecursionException))]
[assembly: TypeForwardedTo(typeof(TimeZoneInfo))]
[assembly: TypeForwardedTo(typeof(TimeZoneNotFoundException))]
[module: UnverifiableCode]
internal static class SR
{
	public const string ArgumentOutOfRange_NeedNonNegNum = "Non negative number is required.";

	public const string Argument_WrongAsyncResult = "IAsyncResult object did not come from the corresponding async method on this type.";

	public const string Argument_InvalidOffLen = "Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.";

	public const string Argument_NeedNonemptyPipeName = "pipeName cannot be an empty string.";

	public const string Argument_EmptyServerName = "serverName cannot be an empty string.  Use \".\" for current machine.";

	public const string Argument_NonContainerInvalidAnyFlag = "This flag may not be set on a pipe.";

	public const string Argument_InvalidHandle = "Invalid handle.";

	public const string ArgumentNull_Buffer = "Buffer cannot be null.";

	public const string ArgumentNull_ServerName = "serverName cannot be null. Use \".\" for current machine.";

	public const string ArgumentOutOfRange_AdditionalAccessLimited = "additionalAccessRights is limited to the PipeAccessRights.ChangePermissions, PipeAccessRights.TakeOwnership, and PipeAccessRights.AccessSystemSecurity flags when creating NamedPipeServerStreams.";

	public const string ArgumentOutOfRange_AnonymousReserved = "The pipeName \"anonymous\" is reserved.";

	public const string ArgumentOutOfRange_TransmissionModeByteOrMsg = "For named pipes, transmission mode can be TransmissionMode.Byte or PipeTransmissionMode.Message. For anonymous pipes, transmission mode can be TransmissionMode.Byte.";

	public const string ArgumentOutOfRange_DirectionModeInOrOut = "PipeDirection.In or PipeDirection.Out required.";

	public const string ArgumentOutOfRange_DirectionModeInOutOrInOut = "For named pipes, the pipe direction can be PipeDirection.In, PipeDirection.Out or PipeDirection.InOut. For anonymous pipes, the pipe direction can be PipeDirection.In or PipeDirection.Out.";

	public const string ArgumentOutOfRange_ImpersonationInvalid = "TokenImpersonationLevel.None, TokenImpersonationLevel.Anonymous, TokenImpersonationLevel.Identification, TokenImpersonationLevel.Impersonation or TokenImpersonationLevel.Delegation required.";

	public const string ArgumentOutOfRange_ImpersonationOptionsInvalid = "impersonationOptions contains an invalid flag.";

	public const string ArgumentOutOfRange_OptionsInvalid = "options contains an invalid flag.";

	public const string ArgumentOutOfRange_HandleInheritabilityNoneOrInheritable = "HandleInheritability.None or HandleInheritability.Inheritable required.";

	public const string ArgumentOutOfRange_InvalidPipeAccessRights = "Invalid PipeAccessRights flag.";

	public const string ArgumentOutOfRange_InvalidTimeout = "Timeout must be non-negative or equal to -1 (Timeout.Infinite)";

	public const string ArgumentOutOfRange_MaxNumServerInstances = "maxNumberOfServerInstances must either be a value between 1 and 254, or NamedPipeServerStream.MaxAllowedServerInstances (to obtain the maximum number allowed by system resources).";

	public const string ArgumentOutOfRange_NeedValidPipeAccessRights = "Need valid PipeAccessRights value.";

	public const string IndexOutOfRange_IORaceCondition = "Probable I/O race condition detected while copying memory. The I/O package is not thread safe by default unless stated otherwise. In multithreaded applications, access streams in a thread-safe way, such as a thread-safe wrapper returned by TextReader's or TextWriter's Synchronized methods. This also applies to classes like StreamWriter and StreamReader.";

	public const string InvalidOperation_EndReadCalledMultiple = "EndRead can only be called once for each asynchronous operation.";

	public const string InvalidOperation_EndWriteCalledMultiple = "EndWrite can only be called once for each asynchronous operation.";

	public const string InvalidOperation_EndWaitForConnectionCalledMultiple = "EndWaitForConnection can only be called once for each asynchronous operation.";

	public const string InvalidOperation_PipeNotYetConnected = "Pipe hasn't been connected yet.";

	public const string InvalidOperation_PipeDisconnected = "Pipe is in a disconnected state.";

	public const string InvalidOperation_PipeHandleNotSet = "Pipe handle has not been set.  Did your PipeStream implementation call InitializeHandle?";

	public const string InvalidOperation_PipeNotAsync = "Pipe is not opened in asynchronous mode.";

	public const string InvalidOperation_PipeReadModeNotMessage = "ReadMode is not of PipeTransmissionMode.Message.";

	public const string InvalidOperation_PipeMessageTypeNotSupported = "This pipe does not support message type transmission.";

	public const string InvalidOperation_PipeAlreadyConnected = "Already in a connected state.";

	public const string InvalidOperation_PipeAlreadyDisconnected = "Already in a disconnected state.";

	public const string InvalidOperation_PipeClosed = "Pipe is closed.";

	public const string IO_FileTooLongOrHandleNotSync = "IO operation will not work. Most likely the file will become too long or the handle was not opened to support synchronous IO operations.";

	public const string IO_EOF_ReadBeyondEOF = "Unable to read beyond the end of the stream.";

	public const string IO_FileNotFound = "Unable to find the specified file.";

	public const string IO_FileNotFound_FileName = "Could not find file '{0}'.";

	public const string IO_IO_AlreadyExists_Name = "Cannot create \"{0}\" because a file or directory with the same name already exists.";

	public const string IO_IO_BindHandleFailed = "BindHandle for ThreadPool failed on this handle.";

	public const string IO_IO_FileExists_Name = "The file '{0}' already exists.";

	public const string IO_IO_NoPermissionToDirectoryName = "<Path discovery permission to the specified directory was denied.>";

	public const string IO_IO_SharingViolation_File = "The process cannot access the file '{0}' because it is being used by another process.";

	public const string IO_IO_SharingViolation_NoFileName = "The process cannot access the file because it is being used by another process.";

	public const string IO_IO_PipeBroken = "Pipe is broken.";

	public const string IO_IO_InvalidPipeHandle = "Invalid pipe handle.";

	public const string IO_OperationAborted = "IO operation was aborted unexpectedly.";

	public const string IO_DriveNotFound_Drive = "Could not find the drive '{0}'. The drive might not be ready or might not be mapped.";

	public const string IO_PathNotFound_Path = "Could not find a part of the path '{0}'.";

	public const string IO_PathNotFound_NoPathName = "Could not find a part of the path.";

	public const string IO_PathTooLong = "The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.";

	public const string NotSupported_MemStreamNotExpandable = "Memory stream is not expandable.";

	public const string NotSupported_UnreadableStream = "Stream does not support reading.";

	public const string NotSupported_UnseekableStream = "Stream does not support seeking.";

	public const string NotSupported_UnwritableStream = "Stream does not support writing.";

	public const string NotSupported_AnonymousPipeUnidirectional = "Anonymous pipes can only be in one direction.";

	public const string NotSupported_AnonymousPipeMessagesNotSupported = "Anonymous pipes do not support PipeTransmissionMode.Message ReadMode.";

	public const string ObjectDisposed_FileClosed = "Cannot access a closed file.";

	public const string ObjectDisposed_PipeClosed = "Cannot access a closed pipe.";

	public const string ObjectDisposed_ReaderClosed = "Cannot read from a closed TextReader.";

	public const string ObjectDisposed_StreamClosed = "Cannot access a closed Stream.";

	public const string ObjectDisposed_WriterClosed = "Cannot write to a closed TextWriter.";

	public const string PlatformNotSupported_NamedPipeServers = "Named Pipe Servers are not supported on Windows 95/98/ME.";

	public const string UnauthorizedAccess_IODenied_Path = "Access to the path '{0}' is denied.";

	public const string UnauthorizedAccess_IODenied_NoPathName = "Access to the path is denied.";

	public const string TraceAsTraceSource = "Trace";

	public const string ArgumentOutOfRange_NeedValidLogRetention = "Need valid log retention option.";

	public const string ArgumentOutOfRange_NeedMaxFileSizeGEBufferSize = "Maximum file size value should be greater than or equal to bufferSize.";

	public const string ArgumentOutOfRange_NeedValidMaxNumFiles = "Maximum number of files value should be greater than or equal to '{0}' for this retention";

	public const string ArgumentOutOfRange_NeedValidId = "The ID parameter must be in the range {0} through {1}.";

	public const string ArgumentOutOfRange_MaxArgExceeded = "The total number of parameters must not exceed {0}.";

	public const string ArgumentOutOfRange_MaxStringsExceeded = "The number of String parameters must not exceed {0}.";

	public const string NotSupported_DownLevelVista = "This functionality is only supported in Windows Vista and above.";

	public const string Argument_NeedNonemptyDelimiter = "Delimiter cannot be an empty string.";

	public const string NotSupported_SetTextWriter = "Setting TextWriter is unsupported on this listener.";

	public const string Perflib_PlatformNotSupported = "Classes in System.Diagnostics.PerformanceData is only supported in Windows Vista and above.";

	public const string Perflib_Argument_CounterSetAlreadyRegister = "CounterSet '{0}' already registered.";

	public const string Perflib_Argument_InvalidCounterType = "CounterType '{0}' is not a valid CounterType.";

	public const string Perflib_Argument_InvalidCounterSetInstanceType = "CounterSetInstanceType '{0}' is not a valid CounterSetInstanceType.";

	public const string Perflib_Argument_InstanceAlreadyExists = "Instance '{0}' already exists in CounterSet '{1}'.";

	public const string Perflib_Argument_CounterAlreadyExists = "CounterId '{0}' already added to CounterSet '{1}'.";

	public const string Perflib_Argument_CounterNameAlreadyExists = "CounterName '{0}' already added to CounterSet '{1}'.";

	public const string Perflib_Argument_ProviderNotFound = "CounterSet provider '{0}' not found.";

	public const string Perflib_Argument_InvalidInstance = "Single instance type CounterSet '{0}' can only have 1 CounterSetInstance.";

	public const string Perflib_Argument_EmptyInstanceName = "Non-empty instanceName required.";

	public const string Perflib_Argument_EmptyCounterName = "Non-empty counterName required.";

	public const string Perflib_InsufficientMemory_InstanceCounterBlock = "Cannot allocate raw counter data for CounterSet '{0}' Instance '{1}'.";

	public const string Perflib_InsufficientMemory_CounterSetTemplate = "Cannot allocate memory for CounterSet '{0}' template with size '{1}'.";

	public const string Perflib_InvalidOperation_CounterRefValue = "Cannot locate raw counter data location for CounterSet '{0}', Counter '{1}, in Instance '{2}'.";

	public const string Perflib_InvalidOperation_CounterSetNotInstalled = "CounterSet '{0}' not installed yet.";

	public const string Perflib_InvalidOperation_InstanceNotFound = "Cannot find Instance '{0}' in CounterSet '{1}'.";

	public const string Perflib_InvalidOperation_AddCounterAfterInstance = "Cannot AddCounter to CounterSet '{0}' after CreateCounterSetInstance.";

	public const string Perflib_InvalidOperation_NoActiveProvider = "CounterSet provider '{0}' not active.";

	public const string Perflib_InvalidOperation_CounterSetContainsNoCounter = "CounterSet '{0}' does not include any counters.";

	public const string Arg_ArrayPlusOffTooSmall = "Destination array is not long enough to copy all the items in the collection. Check array index and length.";

	public const string Arg_HSCapacityOverflow = "HashSet capacity is too big.";

	public const string InvalidOperation_EnumFailedVersion = "Collection was modified; enumeration operation may not execute.";

	public const string InvalidOperation_EnumOpCantHappen = "Enumeration has either not started or has already finished.";

	public const string Serialization_MissingKeys = "The Keys for this dictionary are missing.";

	public const string LockRecursionException_RecursiveReadNotAllowed = "Recursive read lock acquisitions not allowed in this mode.";

	public const string LockRecursionException_RecursiveWriteNotAllowed = "Recursive write lock acquisitions not allowed in this mode.";

	public const string LockRecursionException_RecursiveUpgradeNotAllowed = "Recursive upgradeable lock acquisitions not allowed in this mode.";

	public const string LockRecursionException_ReadAfterWriteNotAllowed = "A read lock may not be acquired with the write lock held in this mode.";

	public const string LockRecursionException_WriteAfterReadNotAllowed = "Write lock may not be acquired with read lock held. This pattern is prone to deadlocks. Please ensure that read locks are released before taking a write lock. If an upgrade is necessary, use an upgrade lock in place of the read lock.";

	public const string LockRecursionException_UpgradeAfterReadNotAllowed = "Upgradeable lock may not be acquired with read lock held.";

	public const string LockRecursionException_UpgradeAfterWriteNotAllowed = "Upgradeable lock may not be acquired with write lock held in this mode. Acquiring Upgradeable lock gives the ability to read along with an option to upgrade to a writer.";

	public const string SynchronizationLockException_MisMatchedRead = "The read lock is being released without being held.";

	public const string SynchronizationLockException_MisMatchedWrite = "The write lock is being released without being held.";

	public const string SynchronizationLockException_MisMatchedUpgrade = "The upgradeable lock is being released without being held.";

	public const string SynchronizationLockException_IncorrectDispose = "The lock is being disposed while still being used. It either is being held by a thread and/or has active waiters waiting to acquire the lock.";

	public const string Cryptography_ArgECDHKeySizeMismatch = "The keys from both parties must be the same size to generate a secret agreement.";

	public const string Cryptography_ArgECDHRequiresECDHKey = "Keys used with the ECDiffieHellmanCng algorithm must have an algorithm group of ECDiffieHellman.";

	public const string Cryptography_ArgECDsaRequiresECDsaKey = "Keys used with the ECDsaCng algorithm must have an algorithm group of ECDsa.";

	public const string Cryptography_ArgExpectedECDiffieHellmanCngPublicKey = "DeriveKeyMaterial requires an ECDiffieHellmanCngPublicKey.";

	public const string Cryptography_ArgMustBeCngAlgorithm = "Object must be of type CngAlgorithm.";

	public const string Cryptography_ArgMustBeCngAlgorithmGroup = "Object must be of type CngAlgorithmGroup.";

	public const string Cryptography_ArgMustBeCngKeyBlobFormat = "Object must be of type CngKeyBlobFormat.";

	public const string Cryptography_ArgMustBeCngProvider = "Object must be of type CngProvider.";

	public const string Cryptography_DecryptWithNoKey = "Decrypting a value requires that a key be set on the algorithm object.";

	public const string Cryptography_ECXmlSerializationFormatRequired = "XML serialization of an elliptic curve key requires using an overload which specifies the XML format to be used.";

	public const string Cryptography_InvalidAlgorithmGroup = "The algorithm group '{0}' is invalid.";

	public const string Cryptography_InvalidAlgorithmName = "The algorithm name '{0}' is invalid.";

	public const string Cryptography_InvalidCipherMode = "The specified cipher mode is not valid for this algorithm.";

	public const string Cryptography_InvalidIVSize = "The specified initialization vector (IV) does not match the block size for this algorithm.";

	public const string Cryptography_InvalidKeyBlobFormat = "The key blob format '{0}' is invalid.";

	public const string Cryptography_InvalidKeySize = "The specified key is not a valid size for this algorithm.";

	public const string Cryptography_InvalidPadding = "Padding is invalid and cannot be removed.";

	public const string Cryptography_InvalidProviderName = "The provider name '{0}' is invalid.";

	public const string Cryptography_MissingDomainParameters = "Could not read the domain parameters from the XML string.";

	public const string Cryptography_MissingPublicKey = "Could not read the public key from the XML string.";

	public const string Cryptography_MissingIV = "The cipher mode specified requires that an initialization vector (IV) be used.";

	public const string Cryptography_MustTransformWholeBlock = "TransformBlock may only process bytes in block sized increments.";

	public const string Cryptography_NonCompliantFIPSAlgorithm = "This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.";

	public const string Cryptography_OpenInvalidHandle = "Cannot open an invalid handle.";

	public const string Cryptography_OpenEphemeralKeyHandleWithoutEphemeralFlag = "The CNG key handle being opened was detected to be ephemeral, but the EphemeralKey open option was not specified.";

	public const string Cryptography_PartialBlock = "The input data is not a complete block.";

	public const string Cryptography_PlatformNotSupported = "The specified cryptographic algorithm is not supported on this platform.";

	public const string Cryptography_TlsRequiresLabelAndSeed = "The TLS key derivation function requires both the label and seed properties to be set.";

	public const string Cryptography_TransformBeyondEndOfBuffer = "Attempt to transform beyond end of buffer.";

	public const string Cryptography_UnknownEllipticCurve = "Unknown elliptic curve.";

	public const string Cryptography_UnknownEllipticCurveAlgorithm = "Unknown elliptic curve algorithm.";

	public const string Cryptography_UnknownPaddingMode = "Unknown padding mode used.";

	public const string Cryptography_UnexpectedXmlNamespace = "The XML namespace '{0}' was unexpected, expected '{1}'.";

	public const string ArgumentException_RangeMinRangeMaxRangeType = "Cannot accept MinRange {0} because it is not the same type as MaxRange {1}. Verify that the MaxRange and MinRange values are of the same type and try again.";

	public const string ArgumentException_RangeNotIComparable = "Cannot accept MaxRange and MinRange because they are not IComparable.";

	public const string ArgumentException_RangeMaxRangeSmallerThanMinRange = "Cannot accept MaxRange because it is less than MinRange. Specify a MaxRange value that is greater than or equal to the MinRange value and try again.";

	public const string ArgumentException_CountMaxLengthSmallerThanMinLength = "MaxLength should be greater than MinLength.";

	public const string ArgumentException_LengthMaxLengthSmallerThanMinLength = "Cannot accept MaxLength value. Specify MaxLength value greater than the value of MinLength and try again.";

	public const string ArgumentException_UnregisteredParameterName = "Parameter {0} has not been added to this parser.";

	public const string ArgumentException_InvalidParameterName = "{0} is an invalid parameter name.";

	public const string ArgumentException_DuplicateName = "The name {0} is already in use.";

	public const string ArgumentException_DuplicatePosition = "The position {0} is already in use.";

	public const string ArgumentException_NoParametersFound = "The object has no parameters associated with it.";

	public const string ArgumentException_HelpMessageBaseNameNullOrEmpty = "Help message base name may not be null or empty.";

	public const string ArgumentException_HelpMessageResourceIdNullOrEmpty = "Help message resource id may not be null or empty.";

	public const string ArgumentException_HelpMessageNullOrEmpty = "Help message may not be null or empty.";

	public const string ArgumentException_RegexPatternNullOrEmpty = "The regular expression pattern may not be null or empty.";

	public const string ArgumentException_RequiredPositionalAfterOptionalPositional = "Optional positional parameter {0} cannot precede required positional parameter {1}.";

	public const string ArgumentException_DuplicateParameterAttribute = "Duplicate parameter attributes with the same parameter set on parameter {0}.";

	public const string ArgumentException_MissingBaseNameOrResourceId = "On parameter {0}, either both HelpMessageBaseName and HelpMessageResourceId must be set or neither can be set.";

	public const string ArgumentException_DuplicateRemainingArgumets = "Can not set {0} as the remaining arguments parameter for parameter set {1} because that parameter set already has a parameter set as the remaining arguments parameter.";

	public const string ArgumentException_TypeMismatchForRemainingArguments = "Parameter {0} must be an array of strings if it can have its value from the remaining arguments.";

	public const string ArgumentException_ValidationParameterTypeMismatch = "Validator {0} may not be applied to a parameter of type {1}.";

	public const string ArgumentException_ParserBuiltWithValueType = "The parameter toBind may not be an instance of a value type.";

	public const string InvalidOperationException_GetParameterTypeMismatch = "Parameter {0} may not retrieved with type {1} since it is of type {2}.";

	public const string InvalidOperationException_GetParameterValueBeforeParse = "Parse must be called before retrieving parameter values.";

	public const string InvalidOperationException_SetRemainingArgumentsParameterAfterParse = "AllowRemainingArguments may not be set after Parse has been called.";

	public const string InvalidOperationException_AddParameterAfterParse = "Parameters may not be added after Parse has been called.";

	public const string InvalidOperationException_BindAfterBind = "Parse may only be called once.";

	public const string InvalidOperationException_GetRemainingArgumentsNotAllowed = "GetRemainingArguments may not be called unless AllowRemainingArguments is set to true.";

	public const string InvalidOperationException_ParameterSetBeforeParse = "The SpecifiedParameterSet property may only be accessed after Parse has been called successfully.";

	public const string CommandLineParser_Aliases = "Aliases";

	public const string CommandLineParser_ErrorMessagePrefix = "Error";

	public const string CommandLineParser_HelpMessagePrefix = "Usage";

	public const string ParameterBindingException_AmbiguousParameterName = "Prefix {0} resolves to multiple parameters: {1}.  Use a more specific prefix for this parameter.";

	public const string ParameterBindingException_ParameterValueAlreadySpecified = "Parameter {0} already given value of {1}.";

	public const string ParameterBindingException_UnknownParameteName = "Unknown parameter {0}.";

	public const string ParameterBindingException_RequiredParameterMissingCommandLineValue = "Parameter {0} must be followed by a value.";

	public const string ParameterBindingException_UnboundCommandLineArguments = "Unbound parameters left on command line: {0}.";

	public const string ParameterBindingException_UnboundMandatoryParameter = "Values for required parameters missing: {0}.";

	public const string ParameterBindingException_ResponseFileException = "Could not open response file {0}: {1}";

	public const string ParameterBindingException_ValididationError = "Could not validate parameter {0}: {1}";

	public const string ParameterBindingException_TransformationError = "Could not convert {0} to type {1}.";

	public const string ParameterBindingException_AmbiguousParameterSet = "Named parameters specify an ambiguous parameter set.  Specify more parameters by name.";

	public const string ParameterBindingException_UnknownParameterSet = "No valid parameter set for named parameters.  Make sure all named parameters belong to the same parameter set.";

	public const string ParameterBindingException_NestedResponseFiles = "A response file may not contain references to other response files.";

	public const string ValidateMetadataException_RangeGreaterThanMaxRangeFailure = "The value {0} was greater than the maximum value {1}. Specify a value less than or equal to the maximum value and try again.";

	public const string ValidateMetadataException_RangeSmallerThanMinRangeFailure = "The value {0} was smaller than the minimum value {1}. Specify a value greater than or equal to the minimum value and try again.";

	public const string ValidateMetadataException_PatternFailure = "The value {0} does not match the pattern {1}.";

	public const string ValidateMetadataException_CountMinLengthFailure = "The number of values should be greater than or equal to {0} instead of {1}.";

	public const string ValidateMetadataException_CountMaxLengthFailure = "The number of values should be less than or equal to {0} instead of {1}.";

	public const string ValidateMetadataException_LengthMinLengthFailure = "The length should be greater than or equal to {0} instead of {1}.";

	public const string ValidateMetadataException_LengthMaxLengthFailure = "The length should be less than or equal to {0} instead of {1}.";

	public const string Argument_MapNameEmptyString = "Map name cannot be an empty string.";

	public const string Argument_EmptyFile = "A positive capacity must be specified for a Memory Mapped File backed by an empty file.";

	public const string Argument_NewMMFWriteAccessNotAllowed = "MemoryMappedFileAccess.Write is not permitted when creating new memory mapped files. Use MemoryMappedFileAccess.ReadWrite instead.";

	public const string Argument_ReadAccessWithLargeCapacity = "When specifying MemoryMappedFileAccess.Read access, the capacity must not be larger than the file size.";

	public const string Argument_NewMMFAppendModeNotAllowed = "FileMode.Append is not permitted when creating new memory mapped files. Instead, use MemoryMappedFileView to ensure write-only access within a specified region.";

	public const string ArgumentNull_MapName = "Map name cannot be null.";

	public const string ArgumentNull_FileStream = "fileStream cannot be null.";

	public const string ArgumentOutOfRange_CapacityLargerThanLogicalAddressSpaceNotAllowed = "The capacity cannot be greater than the size of the system's logical address space.";

	public const string ArgumentOutOfRange_NeedPositiveNumber = "A positive number is required.";

	public const string ArgumentOutOfRange_PositiveOrDefaultCapacityRequired = "The capacity must be greater than or equal to 0. 0 represents the the size of the file being mapped.";

	public const string ArgumentOutOfRange_PositiveOrDefaultSizeRequired = "The size must be greater than or equal to 0. If 0 is specified, the view extends from the specified offset to the end of the file mapping.";

	public const string ArgumentOutOfRange_PositionLessThanCapacityRequired = "The position may not be greater or equal to the capacity of the accessor.";

	public const string ArgumentOutOfRange_CapacityGEFileSizeRequired = "The capacity may not be smaller than the file size.";

	public const string IO_NotEnoughMemory = "Not enough memory to map view.";

	public const string InvalidOperation_CalledTwice = "Cannot call this operation twice.";

	public const string InvalidOperation_CantCreateFileMapping = "Cannot create file mapping.";

	public const string InvalidOperation_ViewIsNull = "The underlying MemoryMappedView object is null.";

	public const string NotSupported_DelayAllocateFileBackedNotAllowed = "The MemoryMappedFileOptions.DelayAllocatePages option is not supported with memory mapped files mapping files on disk.";

	public const string NotSupported_MMViewStreamsFixedLength = "MemoryMappedViewStreams are fixed length.";

	public const string ObjectDisposed_ViewAccessorClosed = "Cannot access a closed accessor.";

	public const string ObjectDisposed_StreamIsClosed = "Cannot access a closed Stream.";

	public const string NotSupported_Method = "Method not supported.";

	public const string NotSupported_SubclassOverride = "Method not supported. Derived class must override.";

	public const string Cryptography_ArgDSARequiresDSAKey = "Keys used with the DSACng algorithm must have an algorithm group of DSA.";

	public const string Cryptography_ArgRSAaRequiresRSAKey = "Keys used with the RSACng algorithm must have an algorithm group of RSA.";

	public const string Cryptography_CngKeyWrongAlgorithm = "This key is for algorithm '{0}'. Expected '{1}'.";

	public const string Cryptography_DSA_HashTooShort = "The supplied hash cannot be shorter in length than the DSA key's Q value.";

	public const string Cryptography_HashAlgorithmNameNullOrEmpty = "The hash algorithm name cannot be null or empty.";

	public const string Cryptography_InvalidDsaParameters_MissingFields = "The specified DSA parameters are not valid; P, Q, G and Y are all required.";

	public const string Cryptography_InvalidDsaParameters_MismatchedPGY = "The specified DSA parameters are not valid; P, G and Y must be the same length (the key size).";

	public const string Cryptography_InvalidDsaParameters_MismatchedQX = "The specified DSA parameters are not valid; Q and X (if present) must be the same length.";

	public const string Cryptography_InvalidDsaParameters_MismatchedPJ = "The specified DSA parameters are not valid; J (if present) must be shorter than P.";

	public const string Cryptography_InvalidDsaParameters_SeedRestriction_ShortKey = "The specified DSA parameters are not valid; Seed, if present, must be 20 bytes long for keys shorter than 1024 bits.";

	public const string Cryptography_InvalidDsaParameters_QRestriction_ShortKey = "The specified DSA parameters are not valid; Q must be 20 bytes long for keys shorter than 1024 bits.";

	public const string Cryptography_InvalidDsaParameters_QRestriction_LargeKey = "The specified DSA parameters are not valid; Q's length must be one of 20, 32 or 64 bytes.";

	public const string Cryptography_InvalidRsaParameters = "The specified RSA parameters are not valid; both Exponent and Modulus are required fields.";

	public const string Cryptography_InvalidSignatureAlgorithm = "The hash algorithm is not supported for signatures. Only MD5, SHA1, SHA256,SHA384, and SHA512 are supported at this time.";

	public const string Cryptography_KeyBlobParsingError = "Key Blob not in expected format.";

	public const string Cryptography_NotSupportedKeyAlgorithm = "Key Algorithm is not supported.";

	public const string Cryptography_NotValidPublicOrPrivateKey = "Key is not a valid public or private key.";

	public const string Cryptography_NotValidPrivateKey = "Key is not a valid private key.";

	public const string Cryptography_UnexpectedTransformTruncation = "CNG provider unexpectedly terminated encryption or decryption prematurely.";

	public const string Cryptography_UnsupportedPaddingMode = "The specified PaddingMode is not supported.";

	public const string Cryptography_WeakKey = "Specified key is a known weak key for this algorithm and cannot be used.";

	public const string Cryptography_CurveNotSupported = "The specified curve '{0}' or its parameters are not valid for this platform.";

	public const string Cryptography_InvalidCurve = "The specified curve '{0}' is not valid for this platform.";

	public const string Cryptography_InvalidCurveOid = "The specified Oid is not valid. The Oid.FriendlyName or Oid.Value property must be set.";

	public const string Cryptography_InvalidCurveKeyParameters = "The specified key parameters are not valid. Q.X and Q.Y are required fields. Q.X, Q.Y must be the same length. If D is specified it must be the same length as Q.X and Q.Y for named curves or the same length as Order for explicit curves.";

	public const string Cryptography_InvalidECCharacteristic2Curve = "The specified Characteristic2 curve parameters are not valid. Polynomial, A, B, G.X, G.Y, and Order are required. A, B, G.X, G.Y must be the same length, and the same length as Q.X, Q.Y and D if those are specified. Seed, Cofactor and Hash are optional. Other parameters are not allowed.";

	public const string Cryptography_InvalidECPrimeCurve = "The specified prime curve parameters are not valid. Prime, A, B, G.X, G.Y and Order are required and must be the same length, and the same length as Q.X, Q.Y and D if those are specified. Seed, Cofactor and Hash are optional. Other parameters are not allowed.";

	public const string Cryptography_InvalidECNamedCurve = "The specified named curve parameters are not valid. Only the Oid parameter must be set.";

	public const string Cryptography_UnknownHashAlgorithm = "'{0}' is not a known hash algorithm.";

	public const string ReducibleMustOverrideReduce = "reducible nodes must override Expression.Reduce()";

	public const string MustReduceToDifferent = "node cannot reduce to itself or null";

	public const string ReducedNotCompatible = "cannot assign from the reduced node type to the original node type";

	public const string SetterHasNoParams = "Setter must have parameters.";

	public const string PropertyCannotHaveRefType = "Property cannot have a managed pointer type.";

	public const string IndexesOfSetGetMustMatch = "Indexing parameters of getter and setter must match.";

	public const string AccessorsCannotHaveVarArgs = "Accessor method should not have VarArgs.";

	public const string AccessorsCannotHaveByRefArgs = "Accessor indexes cannot be passed ByRef.";

	public const string BoundsCannotBeLessThanOne = "Bounds count cannot be less than 1";

	public const string TypeMustNotBeByRef = "Type must not be ByRef";

	public const string TypeMustNotBePointer = "Type must not be a pointer type";

	public const string TypeDoesNotHaveConstructorForTheSignature = "Type doesn't have constructor with a given signature";

	public const string SetterMustBeVoid = "Setter should have void type.";

	public const string PropertyTypeMustMatchGetter = "Property type must match the value type of getter";

	public const string PropertyTypeMustMatchSetter = "Property type must match the value type of setter";

	public const string BothAccessorsMustBeStatic = "Both accessors must be static.";

	public const string OnlyStaticFieldsHaveNullInstance = "Static field requires null instance, non-static field requires non-null instance.";

	public const string OnlyStaticPropertiesHaveNullInstance = "Static property requires null instance, non-static property requires non-null instance.";

	public const string OnlyStaticMethodsHaveNullInstance = "Static method requires null instance, non-static method requires non-null instance.";

	public const string PropertyTypeCannotBeVoid = "Property cannot have a void type.";

	public const string InvalidUnboxType = "Can only unbox from an object or interface type to a value type.";

	public const string ExpressionMustBeWriteable = "Expression must be writeable";

	public const string ArgumentMustNotHaveValueType = "Argument must not have a value type.";

	public const string MustBeReducible = "must be reducible node";

	public const string AllTestValuesMustHaveSameType = "All test values must have the same type.";

	public const string AllCaseBodiesMustHaveSameType = "All case bodies and the default body must have the same type.";

	public const string DefaultBodyMustBeSupplied = "Default body must be supplied if case bodies are not System.Void.";

	public const string LabelMustBeVoidOrHaveExpression = "Label type must be System.Void if an expression is not supplied";

	public const string LabelTypeMustBeVoid = "Type must be System.Void for this label argument";

	public const string QuotedExpressionMustBeLambda = "Quoted expression must be a lambda";

	public const string VariableMustNotBeByRef = "Variable '{0}' uses unsupported type '{1}'. Reference types are not supported for variables.";

	public const string DuplicateVariable = "Found duplicate parameter '{0}'. Each ParameterExpression in the list must be a unique object.";

	public const string StartEndMustBeOrdered = "Start and End must be well ordered";

	public const string FaultCannotHaveCatchOrFinally = "fault cannot be used with catch or finally clauses";

	public const string TryMustHaveCatchFinallyOrFault = "try must have at least one catch, finally, or fault clause";

	public const string BodyOfCatchMustHaveSameTypeAsBodyOfTry = "Body of catch must have the same type as body of try.";

	public const string ExtensionNodeMustOverrideProperty = "Extension node must override the property {0}.";

	public const string UserDefinedOperatorMustBeStatic = "User-defined operator method '{0}' must be static.";

	public const string UserDefinedOperatorMustNotBeVoid = "User-defined operator method '{0}' must not be void.";

	public const string CoercionOperatorNotDefined = "No coercion operator is defined between types '{0}' and '{1}'.";

	public const string UnaryOperatorNotDefined = "The unary operator {0} is not defined for the type '{1}'.";

	public const string BinaryOperatorNotDefined = "The binary operator {0} is not defined for the types '{1}' and '{2}'.";

	public const string ReferenceEqualityNotDefined = "Reference equality is not defined for the types '{0}' and '{1}'.";

	public const string OperandTypesDoNotMatchParameters = "The operands for operator '{0}' do not match the parameters of method '{1}'.";

	public const string OverloadOperatorTypeDoesNotMatchConversionType = "The return type of overload method for operator '{0}' does not match the parameter type of conversion method '{1}'.";

	public const string ConversionIsNotSupportedForArithmeticTypes = "Conversion is not supported for arithmetic types without operator overloading.";

	public const string ArgumentMustBeArray = "Argument must be array";

	public const string ArgumentMustBeBoolean = "Argument must be boolean";

	public const string EqualityMustReturnBoolean = "The user-defined equality method '{0}' must return a boolean value.";

	public const string ArgumentMustBeFieldInfoOrPropertyInfo = "Argument must be either a FieldInfo or PropertyInfo";

	public const string ArgumentMustBeFieldInfoOrPropertyInfoOrMethod = "Argument must be either a FieldInfo, PropertyInfo or MethodInfo";

	public const string ArgumentMustBeInstanceMember = "Argument must be an instance member";

	public const string ArgumentMustBeInteger = "Argument must be of an integer type";

	public const string ArgumentMustBeArrayIndexType = "Argument for array index must be of type Int32";

	public const string ArgumentMustBeSingleDimensionalArrayType = "Argument must be single-dimensional, zero-based array type";

	public const string ArgumentTypesMustMatch = "Argument types do not match";

	public const string CannotAutoInitializeValueTypeElementThroughProperty = "Cannot auto initialize elements of value type through property '{0}', use assignment instead";

	public const string CannotAutoInitializeValueTypeMemberThroughProperty = "Cannot auto initialize members of value type through property '{0}', use assignment instead";

	public const string IncorrectTypeForTypeAs = "The type used in TypeAs Expression must be of reference or nullable type, {0} is neither";

	public const string CoalesceUsedOnNonNullType = "Coalesce used with type that cannot be null";

	public const string ExpressionTypeCannotInitializeArrayType = "An expression of type '{0}' cannot be used to initialize an array of type '{1}'";

	public const string ArgumentTypeDoesNotMatchMember = " Argument type '{0}' does not match the corresponding member type '{1}'";

	public const string ArgumentMemberNotDeclOnType = " The member '{0}' is not declared on type '{1}' being created";

	public const string ExpressionTypeDoesNotMatchReturn = "Expression of type '{0}' cannot be used for return type '{1}'";

	public const string ExpressionTypeDoesNotMatchAssignment = "Expression of type '{0}' cannot be used for assignment to type '{1}'";

	public const string ExpressionTypeDoesNotMatchLabel = "Expression of type '{0}' cannot be used for label of type '{1}'";

	public const string ExpressionTypeNotInvocable = "Expression of type '{0}' cannot be invoked";

	public const string FieldNotDefinedForType = "Field '{0}' is not defined for type '{1}'";

	public const string InstanceFieldNotDefinedForType = "Instance field '{0}' is not defined for type '{1}'";

	public const string FieldInfoNotDefinedForType = "Field '{0}.{1}' is not defined for type '{2}'";

	public const string IncorrectNumberOfIndexes = "Incorrect number of indexes";

	public const string IncorrectNumberOfLambdaDeclarationParameters = "Incorrect number of parameters supplied for lambda declaration";

	public const string IncorrectNumberOfMembersForGivenConstructor = " Incorrect number of members for constructor";

	public const string IncorrectNumberOfArgumentsForMembers = "Incorrect number of arguments for the given members ";

	public const string LambdaTypeMustBeDerivedFromSystemDelegate = "Lambda type parameter must be derived from System.MulticastDelegate";

	public const string MemberNotFieldOrProperty = "Member '{0}' not field or property";

	public const string MethodContainsGenericParameters = "Method {0} contains generic parameters";

	public const string MethodIsGeneric = "Method {0} is a generic method definition";

	public const string MethodNotPropertyAccessor = "The method '{0}.{1}' is not a property accessor";

	public const string PropertyDoesNotHaveGetter = "The property '{0}' has no 'get' accessor";

	public const string PropertyDoesNotHaveSetter = "The property '{0}' has no 'set' accessor";

	public const string PropertyDoesNotHaveAccessor = "The property '{0}' has no 'get' or 'set' accessors";

	public const string NotAMemberOfType = "'{0}' is not a member of type '{1}'";

	public const string NotAMemberOfAnyType = "'{0}' is not a member of any type";

	public const string ExpressionNotSupportedForType = "The expression '{0}' is not supported for type '{1}'";

	public const string UnsupportedExpressionType = "The expression type '{0}' is not supported";

	public const string ParameterExpressionNotValidAsDelegate = "ParameterExpression of type '{0}' cannot be used for delegate parameter of type '{1}'";

	public const string PropertyNotDefinedForType = "Property '{0}' is not defined for type '{1}'";

	public const string InstancePropertyNotDefinedForType = "Instance property '{0}' is not defined for type '{1}'";

	public const string InstancePropertyWithoutParameterNotDefinedForType = "Instance property '{0}' that takes no argument is not defined for type '{1}'";

	public const string InstancePropertyWithSpecifiedParametersNotDefinedForType = "Instance property '{0}{1}' is not defined for type '{2}'";

	public const string InstanceAndMethodTypeMismatch = "Method '{0}' declared on type '{1}' cannot be called with instance of type '{2}'";

	public const string TypeContainsGenericParameters = "Type {0} contains generic parameters";

	public const string TypeIsGeneric = "Type {0} is a generic type definition";

	public const string TypeMissingDefaultConstructor = "Type '{0}' does not have a default constructor";

	public const string ElementInitializerMethodNotAdd = "Element initializer method must be named 'Add'";

	public const string ElementInitializerMethodNoRefOutParam = "Parameter '{0}' of element initializer method '{1}' must not be a pass by reference parameter";

	public const string ElementInitializerMethodWithZeroArgs = "Element initializer method must have at least 1 parameter";

	public const string ElementInitializerMethodStatic = "Element initializer method must be an instance method";

	public const string TypeNotIEnumerable = "Type '{0}' is not IEnumerable";

	public const string UnexpectedCoalesceOperator = "Unexpected coalesce operator.";

	public const string InvalidCast = "Cannot cast from type '{0}' to type '{1}";

	public const string UnhandledBinary = "Unhandled binary: {0}";

	public const string UnhandledBinding = "Unhandled binding ";

	public const string UnhandledBindingType = "Unhandled Binding Type: {0}";

	public const string UnhandledConvert = "Unhandled convert: {0}";

	public const string UnhandledUnary = "Unhandled unary: {0}";

	public const string UnknownBindingType = "Unknown binding type";

	public const string UserDefinedOpMustHaveConsistentTypes = "The user-defined operator method '{1}' for operator '{0}' must have identical parameter and return types.";

	public const string UserDefinedOpMustHaveValidReturnType = "The user-defined operator method '{1}' for operator '{0}' must return the same type as its parameter or a derived type.";

	public const string LogicalOperatorMustHaveBooleanOperators = "The user-defined operator method '{1}' for operator '{0}' must have associated boolean True and False operators.";

	public const string MethodWithArgsDoesNotExistOnType = "No method '{0}' on type '{1}' is compatible with the supplied arguments.";

	public const string GenericMethodWithArgsDoesNotExistOnType = "No generic method '{0}' on type '{1}' is compatible with the supplied type arguments and arguments. No type arguments should be provided if the method is non-generic. ";

	public const string MethodWithMoreThanOneMatch = "More than one method '{0}' on type '{1}' is compatible with the supplied arguments.";

	public const string PropertyWithMoreThanOneMatch = "More than one property '{0}' on type '{1}' is compatible with the supplied arguments.";

	public const string IncorrectNumberOfTypeArgsForFunc = "An incorrect number of type arguments were specified for the declaration of a Func type.";

	public const string IncorrectNumberOfTypeArgsForAction = "An incorrect number of type arguments were specified for the declaration of an Action type.";

	public const string ArgumentCannotBeOfTypeVoid = "Argument type cannot be System.Void.";

	public const string OutOfRange = "{0} must be greater than or equal to {1}";

	public const string LabelTargetAlreadyDefined = "Cannot redefine label '{0}' in an inner block.";

	public const string LabelTargetUndefined = "Cannot jump to undefined label '{0}'.";

	public const string ControlCannotLeaveFinally = "Control cannot leave a finally block.";

	public const string ControlCannotLeaveFilterTest = "Control cannot leave a filter test.";

	public const string AmbiguousJump = "Cannot jump to ambiguous label '{0}'.";

	public const string ControlCannotEnterTry = "Control cannot enter a try block.";

	public const string ControlCannotEnterExpression = "Control cannot enter an expression--only statements can be jumped into.";

	public const string NonLocalJumpWithValue = "Cannot jump to non-local label '{0}' with a value. Only jumps to labels defined in outer blocks can pass values.";

	public const string ExtensionNotReduced = "Extension should have been reduced.";

	public const string CannotCompileConstant = "CompileToMethod cannot compile constant '{0}' because it is a non-trivial value, such as a live object. Instead, create an expression tree that can construct this value.";

	public const string CannotCompileDynamic = "Dynamic expressions are not supported by CompileToMethod. Instead, create an expression tree that uses System.Runtime.CompilerServices.CallSite.";

	public const string InvalidLvalue = "Invalid lvalue for assignment: {0}.";

	public const string UnknownLiftType = "unknown lift type: '{0}'.";

	public const string UndefinedVariable = "variable '{0}' of type '{1}' referenced from scope '{2}', but it is not defined";

	public const string CannotCloseOverByRef = "Cannot close over byref parameter '{0}' referenced in lambda '{1}'";

	public const string UnexpectedVarArgsCall = "Unexpected VarArgs call to method '{0}'";

	public const string RethrowRequiresCatch = "Rethrow statement is valid only inside a Catch block.";

	public const string TryNotAllowedInFilter = "Try expression is not allowed inside a filter body.";

	public const string MustRewriteToSameNode = "When called from '{0}', rewriting a node of type '{1}' must return a non-null value of the same type. Alternatively, override '{2}' and change it to not visit children of this type.";

	public const string MustRewriteChildToSameType = "Rewriting child expression from type '{0}' to type '{1}' is not allowed, because it would change the meaning of the operation. If this is intentional, override '{2}' and change it to allow this rewrite.";

	public const string MustRewriteWithoutMethod = "Rewritten expression calls operator method '{0}', but the original node had no operator method. If this is intentional, override '{1}' and change it to allow this rewrite.";

	public const string InvalidNullValue = "The value null is not of type '{0}' and cannot be used in this collection.";

	public const string InvalidObjectType = "The value '{0}' is not of type '{1}' and cannot be used in this collection.";

	public const string TryNotSupportedForMethodsWithRefArgs = "TryExpression is not supported as an argument to method '{0}' because it has an argument with by-ref type. Construct the tree so the TryExpression is not nested inside of this expression.";

	public const string TryNotSupportedForValueTypeInstances = "TryExpression is not supported as a child expression when accessing a member on type '{0}' because it is a value type. Construct the tree so the TryExpression is not nested inside of this expression.";

	public const string EnumerationIsDone = "Enumeration has either not started or has already finished.";

	public const string TestValueTypeDoesNotMatchComparisonMethodParameter = "Test value of type '{0}' cannot be used for the comparison method parameter of type '{1}'";

	public const string SwitchValueTypeDoesNotMatchComparisonMethodParameter = "Switch value of type '{0}' cannot be used for the comparison method parameter of type '{1}'";

	public const string PdbGeneratorNeedsExpressionCompiler = "DebugInfoGenerator created by CreatePdbGenerator can only be used with LambdaExpression.CompileToMethod.";

	public const string InvalidArgumentValue = "Invalid argument value";

	public const string NonEmptyCollectionRequired = "Non-empty collection required";

	public const string CollectionModifiedWhileEnumerating = "Collection was modified; enumeration operation may not execute.";

	public const string ExpressionMustBeReadable = "Expression must be readable";

	public const string ExpressionTypeDoesNotMatchMethodParameter = "Expression of type '{0}' cannot be used for parameter of type '{1}' of method '{2}'";

	public const string ExpressionTypeDoesNotMatchParameter = "Expression of type '{0}' cannot be used for parameter of type '{1}'";

	public const string ExpressionTypeDoesNotMatchConstructorParameter = "Expression of type '{0}' cannot be used for constructor parameter of type '{1}'";

	public const string IncorrectNumberOfMethodCallArguments = "Incorrect number of arguments supplied for call to method '{0}'";

	public const string IncorrectNumberOfLambdaArguments = "Incorrect number of arguments supplied for lambda invocation";

	public const string IncorrectNumberOfConstructorArguments = "Incorrect number of arguments for constructor";

	public const string OperatorNotImplementedForType = "The operator '{0}' is not implemented for type '{1}'";

	public const string NonStaticConstructorRequired = "The constructor should not be static";

	public const string NonAbstractConstructorRequired = "Can't compile a NewExpression with a constructor declared on an abstract class";

	public const string FirstArgumentMustBeCallSite = "First argument of delegate must be CallSite";

	public const string NoOrInvalidRuleProduced = "No or Invalid rule produced";

	public const string TypeMustBeDerivedFromSystemDelegate = "Type must be derived from System.Delegate";

	public const string TypeParameterIsNotDelegate = "Type parameter is {0}. Expected a delegate.";

	public const string ArgumentTypeCannotBeVoid = "Argument type cannot be void";

	public const string ArgCntMustBeGreaterThanNameCnt = "Argument count must be greater than number of named arguments.";

	public const string BinderNotCompatibleWithCallSite = "The result type '{0}' of the binder '{1}' is not compatible with the result type '{2}' expected by the call site.";

	public const string BindingCannotBeNull = "Bind cannot return null.";

	public const string DynamicBinderResultNotAssignable = "The result type '{0}' of the dynamic binding produced by binder '{1}' is not compatible with the result type '{2}' expected by the call site.";

	public const string DynamicBindingNeedsRestrictions = "The result of the dynamic binding produced by the object with type '{0}' for the binder '{1}' needs at least one restriction.";

	public const string DynamicObjectResultNotAssignable = "The result type '{0}' of the dynamic binding produced by the object with type '{1}' for the binder '{2}' is not compatible with the result type '{3}' expected by the call site.";

	public const string InvalidMetaObjectCreated = "An IDynamicMetaObjectProvider {0} created an invalid DynamicMetaObject instance.";

	public const string AmbiguousMatchInExpandoObject = "More than one key matching '{0}' was found in the ExpandoObject.";

	public const string CollectionReadOnly = "Collection is read-only.";

	public const string KeyDoesNotExistInExpando = "The specified key '{0}' does not exist in the ExpandoObject.";

	public const string SameKeyExistsInExpando = "An element with the same key '{0}' already exists in the ExpandoObject.";

	public const string EmptyEnumerable = "Enumeration yielded no results";

	public const string MoreThanOneElement = "Sequence contains more than one element";

	public const string MoreThanOneMatch = "Sequence contains more than one matching element";

	public const string NoElements = "Sequence contains no elements";

	public const string NoMatch = "Sequence contains no matching element";

	public const string ParallelPartitionable_NullReturn = "The return value must not be null.";

	public const string ParallelPartitionable_IncorretElementCount = "The returned array's length must equal the number of partitions requested.";

	public const string ParallelPartitionable_NullElement = "Elements returned must not be null.";

	public const string PLINQ_CommonEnumerator_Current_NotStarted = "Enumeration has not started. MoveNext must be called to initiate enumeration.";

	public const string PLINQ_ExternalCancellationRequested = "The query has been canceled via the token supplied to WithCancellation.";

	public const string PLINQ_DisposeRequested = "The query enumerator has been disposed.";

	public const string ParallelQuery_DuplicateTaskScheduler = "The WithTaskScheduler operator may be used at most once in a query.";

	public const string ParallelQuery_DuplicateDOP = "The WithDegreeOfParallelism operator may be used at most once in a query.";

	public const string ParallelQuery_DuplicateExecutionMode = "The WithExecutionMode operator may be used at most once in a query.";

	public const string PartitionerQueryOperator_NullPartitionList = "Partitioner returned null instead of a list of partitions.";

	public const string PartitionerQueryOperator_WrongNumberOfPartitions = "Partitioner returned a wrong number of partitions.";

	public const string PartitionerQueryOperator_NullPartition = "Partitioner returned a null partition.";

	public const string ParallelQuery_DuplicateWithCancellation = "The WithCancellation operator may by used at most once in a query.";

	public const string ParallelQuery_DuplicateMergeOptions = "The WithMergeOptions operator may be used at most once in a query.";

	public const string PLINQ_EnumerationPreviouslyFailed = "The query enumerator previously threw an exception.";

	public const string ParallelQuery_PartitionerNotOrderable = "AsOrdered may not be used with a partitioner that is not orderable.";

	public const string ParallelQuery_InvalidAsOrderedCall = "AsOrdered may only be called on the result of AsParallel, ParallelEnumerable.Range, or ParallelEnumerable.Repeat.";

	public const string ParallelQuery_InvalidNonGenericAsOrderedCall = "Non-generic AsOrdered may only be called on the result of the non-generic AsParallel.";

	public const string ParallelEnumerable_BinaryOpMustUseAsParallel = "The second data source of a binary operator must be of type System.Linq.ParallelQuery<T> rather than System.Collections.Generic.IEnumerable<T>. To fix this problem, use the AsParallel() extension method to convert the right data source to System.Linq.ParallelQuery<T>.";

	public const string ParallelEnumerable_WithQueryExecutionMode_InvalidMode = "The executionMode argument contains an invalid value.";

	public const string ParallelEnumerable_WithMergeOptions_InvalidOptions = "The mergeOptions argument contains an invalid value.";

	public const string ArgumentNotIEnumerableGeneric = "{0} is not IEnumerable<>";

	public const string ArgumentNotValid = "Argument {0} is not valid";

	public const string NoMethodOnType = "There is no method '{0}' on type '{1}'";

	public const string NoMethodOnTypeMatchingArguments = "There is no method '{0}' on type '{1}' that matches the specified arguments";

	public const string EnumeratingNullEnumerableExpression = "Cannot enumerate a query created from a null IEnumerable<>";

	public const string MethodBuilderDoesNotHaveTypeBuilder = "MethodBuilder does not have a valid TypeBuilder";

	internal static string GetString(string name, params object[] args)
	{
		return GetString(CultureInfo.InvariantCulture, name, args);
	}

	internal static string GetString(CultureInfo culture, string name, params object[] args)
	{
		return string.Format(culture, name, args);
	}

	internal static string GetString(string name)
	{
		return name;
	}

	internal static string GetString(CultureInfo culture, string name)
	{
		return name;
	}

	internal static string Format(string resourceFormat, params object[] args)
	{
		if (args != null)
		{
			return string.Format(CultureInfo.InvariantCulture, resourceFormat, args);
		}
		return resourceFormat;
	}

	internal static string Format(string resourceFormat, object p1)
	{
		return string.Format(CultureInfo.InvariantCulture, resourceFormat, p1);
	}

	internal static string Format(string resourceFormat, object p1, object p2)
	{
		return string.Format(CultureInfo.InvariantCulture, resourceFormat, p1, p2);
	}

	internal static string Format(string resourceFormat, object p1, object p2, object p3)
	{
		return string.Format(CultureInfo.InvariantCulture, resourceFormat, p1, p2, p3);
	}
}
namespace Microsoft.Win32.SafeHandles
{
	public sealed class SafeMemoryMappedFileHandle : SafeHandleZeroOrMinusOneIsInvalid
	{
		public SafeMemoryMappedFileHandle(IntPtr preexistingHandle, bool ownsHandle)
			: base(ownsHandle)
		{
			handle = preexistingHandle;
		}

		protected override bool ReleaseHandle()
		{
			MemoryMapImpl.CloseMapping(handle);
			handle = IntPtr.Zero;
			return true;
		}

		internal SafeMemoryMappedFileHandle()
		{
			ThrowStub.ThrowNotSupportedException();
		}
	}
	public sealed class SafeMemoryMappedViewHandle : SafeBuffer
	{
		private IntPtr mmap_handle;

		internal SafeMemoryMappedViewHandle(IntPtr mmap_handle, IntPtr base_address, long size)
			: base(ownsHandle: true)
		{
			this.mmap_handle = mmap_handle;
			handle = base_address;
			Initialize((ulong)size);
		}

		internal void Flush()
		{
			MemoryMapImpl.Flush(mmap_handle);
		}

		protected override bool ReleaseHandle()
		{
			if (handle != (IntPtr)(-1))
			{
				return MemoryMapImpl.Unmap(mmap_handle);
			}
			throw new NotImplementedException();
		}

		internal SafeMemoryMappedViewHandle()
		{
			ThrowStub.ThrowNotSupportedException();
		}
	}
	public abstract class SafeNCryptHandle : SafeHandleZeroOrMinusOneIsInvalid
	{
		public override bool IsInvalid
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		protected SafeNCryptHandle()
			: base(ownsHandle: true)
		{
		}

		protected SafeNCryptHandle(IntPtr handle, SafeHandle parentHandle)
			: base(ownsHandle: false)
		{
			throw new NotImplementedException();
		}

		protected override bool ReleaseHandle()
		{
			return false;
		}

		protected abstract bool ReleaseNativeHandle();
	}
	public sealed class SafeNCryptKeyHandle : SafeNCryptHandle
	{
		public SafeNCryptKeyHandle()
		{
		}

		public SafeNCryptKeyHandle(IntPtr handle, SafeHandle parentHandle)
			: base(handle, parentHandle)
		{
		}

		protected override bool ReleaseNativeHandle()
		{
			return false;
		}
	}
	public sealed class SafeNCryptProviderHandle : SafeNCryptHandle
	{
		protected override bool ReleaseNativeHandle()
		{
			return false;
		}
	}
	public sealed class SafeNCryptSecretHandle : SafeNCryptHandle
	{
		protected override bool ReleaseNativeHandle()
		{
			return false;
		}
	}
	[HostProtection(SecurityAction.LinkDemand, MayLeakOnAbort = true)]
	[SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode = true)]
	public sealed class SafePipeHandle : SafeHandleZeroOrMinusOneIsInvalid
	{
		public SafePipeHandle(IntPtr preexistingHandle, bool ownsHandle)
			: base(ownsHandle)
		{
			handle = preexistingHandle;
		}

		protected override bool ReleaseHandle()
		{
			MonoIOError val = default(MonoIOError);
			return MonoIO.Close(handle, ref val);
		}
	}
}
namespace System
{
	internal static class NotImplemented
	{
		internal static Exception ByDesign => new NotImplementedException();

		internal static Exception ByDesignWithMessage(string message)
		{
			return new NotImplementedException(message);
		}

		internal static Exception ActiveIssue(string issue)
		{
			return new NotImplementedException();
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoTODOAttribute : Attribute
	{
		private string comment;

		public string Comment => comment;

		public MonoTODOAttribute()
		{
		}

		public MonoTODOAttribute(string comment)
		{
			this.comment = comment;
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoDocumentationNoteAttribute : MonoTODOAttribute
	{
		public MonoDocumentationNoteAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoExtensionAttribute : MonoTODOAttribute
	{
		public MonoExtensionAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoInternalNoteAttribute : MonoTODOAttribute
	{
		public MonoInternalNoteAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoLimitationAttribute : MonoTODOAttribute
	{
		public MonoLimitationAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoNotSupportedAttribute : MonoTODOAttribute
	{
		public MonoNotSupportedAttribute(string comment)
			: base(comment)
		{
		}
	}
	public delegate void Action<in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8, in T9>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9);
	public delegate void Action<in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8, in T9, in T10>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10);
	public delegate void Action<in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8, in T9, in T10, in T11>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11);
	public delegate void Action<in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8, in T9, in T10, in T11, in T12>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12);
	public delegate void Action<in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8, in T9, in T10, in T11, in T12, in T13>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13);
	public delegate void Action<in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8, in T9, in T10, in T11, in T12, in T13, in T14>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14);
	public delegate void Action<in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8, in T9, in T10, in T11, in T12, in T13, in T14, in T15>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15);
	public delegate void Action<in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8, in T9, in T10, in T11, in T12, in T13, in T14, in T15, in T16>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15, T16 arg16);
	public delegate TResult Func<in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8, in T9, out TResult>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9);
	public delegate TResult Func<in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8, in T9, in T10, out TResult>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10);
	public delegate TResult Func<in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8, in T9, in T10, in T11, out TResult>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11);
	public delegate TResult Func<in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8, in T9, in T10, in T11, in T12, out TResult>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12);
	public delegate TResult Func<in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8, in T9, in T10, in T11, in T12, in T13, out TResult>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13);
	public delegate TResult Func<in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8, in T9, in T10, in T11, in T12, in T13, in T14, out TResult>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14);
	public delegate TResult Func<in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8, in T9, in T10, in T11, in T12, in T13, in T14, in T15, out TResult>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15);
	public delegate TResult Func<in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8, in T9, in T10, in T11, in T12, in T13, in T14, in T15, in T16, out TResult>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15, T16 arg16);
	internal static class MonoUtil
	{
		public static readonly bool IsUnix;

		static MonoUtil()
		{
			int platform = (int)Environment.OSVersion.Platform;
			IsUnix = platform == 4 || platform == 128 || platform == 6;
		}
	}
}
namespace System.Threading
{
	public enum LockRecursionPolicy
	{
		NoRecursion,
		SupportsRecursion
	}
	internal class ReaderWriterCount
	{
		public long lockID;

		public int readercount;

		public int writercount;

		public int upgradecount;

		public System.Threading.ReaderWriterCount next;
	}
	[HostProtection(SecurityAction.LinkDemand, MayLeakOnAbort = true)]
	public class ReaderWriterLockSlim : IDisposable
	{
		private struct TimeoutTracker
		{
			private int m_total;

			private int m_start;

			public int RemainingMilliseconds
			{
				get
				{
					if (m_total == -1 || m_total == 0)
					{
						return m_total;
					}
					int num = Environment.TickCount - m_start;
					if (num < 0 || num >= m_total)
					{
						return 0;
					}
					return m_total - num;
				}
			}

			public bool IsExpired => RemainingMilliseconds == 0;

			public TimeoutTracker(TimeSpan timeout)
			{
				long num = (long)timeout.TotalMilliseconds;
				if (num < -1 || num > int.MaxValue)
				{
					throw new ArgumentOutOfRangeException("timeout");
				}
				m_total = (int)num;
				if (m_total != -1 && m_total != 0)
				{
					m_start = Environment.TickCount;
				}
				else
				{
					m_start = 0;
				}
			}

			public TimeoutTracker(int millisecondsTimeout)
			{
				if (millisecondsTimeout < -1)
				{
					throw new ArgumentOutOfRangeException("millisecondsTimeout");
				}
				m_total = millisecondsTimeout;
				if (m_total != -1 && m_total != 0)
				{
					m_start = Environment.TickCount;
				}
				else
				{
					m_start = 0;
				}
			}
		}

		private bool fIsReentrant;

		private int myLock;

		private const int LockSpinCycles = 20;

		private const int LockSpinCount = 10;

		private const int LockSleep0Count = 5;

		private uint numWriteWaiters;

		private uint numReadWaiters;

		private uint numWriteUpgradeWaiters;

		private uint numUpgradeWaiters;

		private bool fNoWaiters;

		private int upgradeLockOwnerId;

		private int writeLockOwnerId;

		private EventWaitHandle writeEvent;

		private EventWaitHandle readEvent;

		private EventWaitHandle upgradeEvent;

		private EventWaitHandle waitUpgradeEvent;

		private static long s_nextLockID;

		private long lockID;

		[ThreadStatic]
		private static System.Threading.ReaderWriterCount t_rwc;

		private bool fUpgradeThreadHoldingRead;

		private const int MaxSpinCount = 20;

		private uint owners;

		private const uint WRITER_HELD = 2147483648u;

		private const uint WAITING_WRITERS = 1073741824u;

		private const uint WAITING_UPGRADER = 536870912u;

		private const uint MAX_READER = 268435454u;

		private const uint READER_MASK = 268435455u;

		private bool fDisposed;

		public bool IsReadLockHeld
		{
			get
			{
				if (RecursiveReadCount > 0)
				{
					return true;
				}
				return false;
			}
		}

		public bool IsUpgradeableReadLockHeld
		{
			get
			{
				if (RecursiveUpgradeCount > 0)
				{
					return true;
				}
				return false;
			}
		}

		public bool IsWriteLockHeld
		{
			get
			{
				if (RecursiveWriteCount > 0)
				{
					return true;
				}
				return false;
			}
		}

		public LockRecursionPolicy RecursionPolicy
		{
			get
			{
				if (fIsReentrant)
				{
					return LockRecursionPolicy.SupportsRecursion;
				}
				return LockRecursionPolicy.NoRecursion;
			}
		}

		public int CurrentReadCount
		{
			get
			{
				int numReaders = (int)GetNumReaders();
				if (upgradeLockOwnerId != -1)
				{
					return numReaders - 1;
				}
				return numReaders;
			}
		}

		public int RecursiveReadCount
		{
			get
			{
				int result = 0;
				System.Threading.ReaderWriterCount threadRWCount = GetThreadRWCount(dontAllocate: true);
				if (threadRWCount != null)
				{
					result = threadRWCount.readercount;
				}
				return result;
			}
		}

		public int RecursiveUpgradeCount
		{
			get
			{
				if (fIsReentrant)
				{
					int result = 0;
					System.Threading.ReaderWriterCount threadRWCount = GetThreadRWCount(dontAllocate: true);
					if (threadRWCount != null)
					{
						result = threadRWCount.upgradecount;
					}
					return result;
				}
				if (Thread.CurrentThread.ManagedThreadId == upgradeLockOwnerId)
				{
					return 1;
				}
				return 0;
			}
		}

		public int RecursiveWriteCount
		{
			get
			{
				if (fIsReentrant)
				{
					int result = 0;
					System.Threading.ReaderWriterCount threadRWCount = GetThreadRWCount(dontAllocate: true);
					if (threadRWCount != null)
					{
						result = threadRWCount.writercount;
					}
					return result;
				}
				if (Thread.CurrentThread.ManagedThreadId == writeLockOwnerId)
				{
					return 1;
				}
				return 0;
			}
		}

		public int WaitingReadCount => (int)numReadWaiters;

		public int WaitingUpgradeCount => (int)numUpgradeWaiters;

		public int WaitingWriteCount => (int)numWriteWaiters;

		private void InitializeThreadCounts()
		{
			upgradeLockOwnerId = -1;
			writeLockOwnerId = -1;
		}

		public ReaderWriterLockSlim()
			: this(LockRecursionPolicy.NoRecursion)
		{
		}

		public ReaderWriterLockSlim(LockRecursionPolicy recursionPolicy)
		{
			if (recursionPolicy == LockRecursionPolicy.SupportsRecursion)
			{
				fIsReentrant = true;
			}
			InitializeThreadCounts();
			fNoWaiters = true;
			lockID = Interlocked.Increment(ref s_nextLockID);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		private static bool IsRWEntryEmpty(System.Threading.ReaderWriterCount rwc)
		{
			if (rwc.lockID == 0L)
			{
				return true;
			}
			if (rwc.readercount == 0 && rwc.writercount == 0 && rwc.upgradecount == 0)
			{
				return true;
			}
			return false;
		}

		private bool IsRwHashEntryChanged(System.Threading.ReaderWriterCount lrwc)
		{
			return lrwc.lockID != lockID;
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		private System.Threading.ReaderWriterCount GetThreadRWCount(bool dontAllocate)
		{
			System.Threading.ReaderWriterCount next = t_rwc;
			System.Threading.ReaderWriterCount readerWriterCount = null;
			while (next != null)
			{
				if (next.lockID == lockID)
				{
					return next;
				}
				if (!dontAllocate && readerWriterCount == null && IsRWEntryEmpty(next))
				{
					readerWriterCount = next;
				}
				next = next.next;
			}
			if (dontAllocate)
			{
				return null;
			}
			if (readerWriterCount == null)
			{
				readerWriterCount = new System.Threading.ReaderWriterCount();
				readerWriterCount.next = t_rwc;
				t_rwc = readerWriterCount;
			}
			readerWriterCount.lockID = lockID;
			return readerWriterCount;
		}

		public void EnterReadLock()
		{
			TryEnterReadLock(-1);
		}

		public bool TryEnterReadLock(TimeSpan timeout)
		{
			return TryEnterReadLock(new TimeoutTracker(timeout));
		}

		public bool TryEnterReadLock(int millisecondsTimeout)
		{
			return TryEnterReadLock(new TimeoutTracker(millisecondsTimeout));
		}

		private bool TryEnterReadLock(TimeoutTracker timeout)
		{
			return TryEnterReadLockCore(timeout);
		}

		private bool TryEnterReadLockCore(TimeoutTracker timeout)
		{
			if (fDisposed)
			{
				throw new ObjectDisposedException(null);
			}
			System.Threading.ReaderWriterCount readerWriterCount = null;
			int managedThreadId = Thread.CurrentThread.ManagedThreadId;
			if (!fIsReentrant)
			{
				if (managedThreadId == writeLockOwnerId)
				{
					throw new LockRecursionException(SR.GetString("A read lock may not be acquired with the write lock held in this mode."));
				}
				EnterMyLock();
				readerWriterCount = GetThreadRWCount(dontAllocate: false);
				if (readerWriterCount.readercount > 0)
				{
					ExitMyLock();
					throw new LockRecursionException(SR.GetString("Recursive read lock acquisitions not allowed in this mode."));
				}
				if (managedThreadId == upgradeLockOwnerId)
				{
					readerWriterCount.readercount++;
					owners++;
					ExitMyLock();
					return true;
				}
			}
			else
			{
				EnterMyLock();
				readerWriterCount = GetThreadRWCount(dontAllocate: false);
				if (readerWriterCount.readercount > 0)
				{
					readerWriterCount.readercount++;
					ExitMyLock();
					return true;
				}
				if (managedThreadId == upgradeLockOwnerId)
				{
					readerWriterCount.readercount++;
					owners++;
					ExitMyLock();
					fUpgradeThreadHoldingRead = true;
					return true;
				}
				if (managedThreadId == writeLockOwnerId)
				{
					readerWriterCount.readercount++;
					owners++;
					ExitMyLock();
					return true;
				}
			}
			bool flag = true;
			int num = 0;
			while (true)
			{
				if (owners < 268435454)
				{
					owners++;
					readerWriterCount.readercount++;
					ExitMyLock();
					return flag;
				}
				if (num < 20)
				{
					ExitMyLock();
					if (timeout.IsExpired)
					{
						return false;
					}
					num++;
					SpinWait(num);
					EnterMyLock();
					if (IsRwHashEntryChanged(readerWriterCount))
					{
						readerWriterCount = GetThreadRWCount(dontAllocate: false);
					}
				}
				else if (readEvent == null)
				{
					LazyCreateEvent(ref readEvent, makeAutoResetEvent: false);
					if (IsRwHashEntryChanged(readerWriterCount))
					{
						readerWriterCount = GetThreadRWCount(dontAllocate: false);
					}
				}
				else
				{
					flag = WaitOnEvent(readEvent, ref numReadWaiters, timeout, isWriteWaiter: false);
					if (!flag)
					{
						break;
					}
					if (IsRwHashEntryChanged(readerWriterCount))
					{
						readerWriterCount = GetThreadRWCount(dontAllocate: false);
					}
				}
			}
			return false;
		}

		public void EnterWriteLock()
		{
			TryEnterWriteLock(-1);
		}

		public bool TryEnterWriteLock(TimeSpan timeout)
		{
			return TryEnterWriteLock(new TimeoutTracker(timeout));
		}

		public bool TryEnterWriteLock(int millisecondsTimeout)
		{
			return TryEnterWriteLock(new TimeoutTracker(millisecondsTimeout));
		}

		private bool TryEnterWriteLock(TimeoutTracker timeout)
		{
			return TryEnterWriteLockCore(timeout);
		}

		private bool TryEnterWriteLockCore(TimeoutTracker timeout)
		{
			if (fDisposed)
			{
				throw new ObjectDisposedException(null);
			}
			int managedThreadId = Thread.CurrentThread.ManagedThreadId;
			bool flag = false;
			System.Threading.ReaderWriterCount threadRWCount;
			if (!fIsReentrant)
			{
				if (managedThreadId == writeLockOwnerId)
				{
					throw new LockRecursionException(SR.GetString("Recursive write lock acquisitions not allowed in this mode."));
				}
				if (managedThreadId == upgradeLockOwnerId)
				{
					flag = true;
				}
				EnterMyLock();
				threadRWCount = GetThreadRWCount(dontAllocate: true);
				if (threadRWCount != null && threadRWCount.readercount > 0)
				{
					ExitMyLock();
					throw new LockRecursionException(SR.GetString("Write lock may not be acquired with read lock held. This pattern is prone to deadlocks. Please ensure that read locks are released before taking a write lock. If an upgrade is necessary, use an upgrade lock in place of the read lock."));
				}
			}
			else
			{
				EnterMyLock();
				threadRWCount = GetThreadRWCount(dontAllocate: false);
				if (managedThreadId == writeLockOwnerId)
				{
					threadRWCount.writercount++;
					ExitMyLock();
					return true;
				}
				if (managedThreadId == upgradeLockOwnerId)
				{
					flag = true;
				}
				else if (threadRWCount.readercount > 0)
				{
					ExitMyLock();
					throw new LockRecursionException(SR.GetString("Write lock may not be acquired with read lock held. This pattern is prone to deadlocks. Please ensure that read locks are released before taking a write lock. If an upgrade is necessary, use an upgrade lock in place of the read lock."));
				}
			}
			int num = 0;
			while (true)
			{
				if (IsWriterAcquired())
				{
					SetWriterAcquired();
					break;
				}
				if (flag)
				{
					uint numReaders = GetNumReaders();
					if (numReaders == 1)
					{
						SetWriterAcquired();
						break;
					}
					if (numReaders == 2 && threadRWCount != null)
					{
						if (IsRwHashEntryChanged(threadRWCount))
						{
							threadRWCount = GetThreadRWCount(dontAllocate: false);
						}
						if (threadRWCount.readercount > 0)
						{
							SetWriterAcquired();
							break;
						}
					}
				}
				if (num < 20)
				{
					ExitMyLock();
					if (timeout.IsExpired)
					{
						return false;
					}
					num++;
					SpinWait(num);
					EnterMyLock();
				}
				else if (flag)
				{
					if (waitUpgradeEvent == null)
					{
						LazyCreateEvent(ref waitUpgradeEvent, makeAutoResetEvent: true);
					}
					else if (!WaitOnEvent(waitUpgradeEvent, ref numWriteUpgradeWaiters, timeout, isWriteWaiter: true))
					{
						return false;
					}
				}
				else if (writeEvent == null)
				{
					LazyCreateEvent(ref writeEvent, makeAutoResetEvent: true);
				}
				else if (!WaitOnEvent(writeEvent, ref numWriteWaiters, timeout, isWriteWaiter: true))
				{
					return false;
				}
			}
			if (fIsReentrant)
			{
				if (IsRwHashEntryChanged(threadRWCount))
				{
					threadRWCount = GetThreadRWCount(dontAllocate: false);
				}
				threadRWCount.writercount++;
			}
			ExitMyLock();
			writeLockOwnerId = managedThreadId;
			return true;
		}

		public void EnterUpgradeableReadLock()
		{
			TryEnterUpgradeableReadLock(-1);
		}

		public bool TryEnterUpgradeableReadLock(TimeSpan timeout)
		{
			return TryEnterUpgradeableReadLock(new TimeoutTracker(timeout));
		}

		public bool TryEnterUpgradeableReadLock(int millisecondsTimeout)
		{
			return TryEnterUpgradeableReadLock(new TimeoutTracker(millisecondsTimeout));
		}

		private bool TryEnterUpgradeableReadLock(TimeoutTracker timeout)
		{
			return TryEnterUpgradeableReadLockCore(timeout);
		}

		private bool TryEnterUpgradeableReadLockCore(TimeoutTracker timeout)
		{
			if (fDisposed)
			{
				throw new ObjectDisposedException(null);
			}
			int managedThreadId = Thread.CurrentThread.ManagedThreadId;
			System.Threading.ReaderWriterCount threadRWCount;
			if (!fIsReentrant)
			{
				if (managedThreadId == upgradeLockOwnerId)
				{
					throw new LockRecursionException(SR.GetString("Recursive upgradeable lock acquisitions not allowed in this mode."));
				}
				if (managedThreadId == writeLockOwnerId)
				{
					throw new LockRecursionException(SR.GetString("Upgradeable lock may not be acquired with write lock held in this mode. Acquiring Upgradeable lock gives the ability to read along with an option to upgrade to a writer."));
				}
				EnterMyLock();
				threadRWCount = GetThreadRWCount(dontAllocate: true);
				if (threadRWCount != null && threadRWCount.readercount > 0)
				{
					ExitMyLock();
					throw new LockRecursionException(SR.GetString("Upgradeable lock may not be acquired with read lock held."));
				}
			}
			else
			{
				EnterMyLock();
				threadRWCount = GetThreadRWCount(dontAllocate: false);
				if (managedThreadId == upgradeLockOwnerId)
				{
					threadRWCount.upgradecount++;
					ExitMyLock();
					return true;
				}
				if (managedThreadId == writeLockOwnerId)
				{
					owners++;
					upgradeLockOwnerId = managedThreadId;
					threadRWCount.upgradecount++;
					if (threadRWCount.readercount > 0)
					{
						fUpgradeThreadHoldingRead = true;
					}
					ExitMyLock();
					return true;
				}
				if (threadRWCount.readercount > 0)
				{
					ExitMyLock();
					throw new LockRecursionException(SR.GetString("Upgradeable lock may not be acquired with read lock held."));
				}
			}
			int num = 0;
			while (true)
			{
				if (upgradeLockOwnerId == -1 && owners < 268435454)
				{
					owners++;
					upgradeLockOwnerId = managedThreadId;
					if (fIsReentrant)
					{
						if (IsRwHashEntryChanged(threadRWCount))
						{
							threadRWCount = GetThreadRWCount(dontAllocate: false);
						}
						threadRWCount.upgradecount++;
					}
					break;
				}
				if (num < 20)
				{
					ExitMyLock();
					if (timeout.IsExpired)
					{
						return false;
					}
					num++;
					SpinWait(num);
					EnterMyLock();
				}
				else if (upgradeEvent == null)
				{
					LazyCreateEvent(ref upgradeEvent, makeAutoResetEvent: true);
				}
				else if (!WaitOnEvent(upgradeEvent, ref numUpgradeWaiters, timeout, isWriteWaiter: false))
				{
					return false;
				}
			}
			ExitMyLock();
			return true;
		}

		public void ExitReadLock()
		{
			System.Threading.ReaderWriterCount readerWriterCount = null;
			EnterMyLock();
			readerWriterCount = GetThreadRWCount(dontAllocate: true);
			if (readerWriterCount == null || readerWriterCount.readercount < 1)
			{
				ExitMyLock();
				throw new SynchronizationLockException(SR.GetString("The read lock is being released without being held."));
			}
			if (fIsReentrant)
			{
				if (readerWriterCount.readercount > 1)
				{
					readerWriterCount.readercount--;
					ExitMyLock();
					return;
				}
				if (Thread.CurrentThread.ManagedThreadId == upgradeLockOwnerId)
				{
					fUpgradeThreadHoldingRead = false;
				}
			}
			owners--;
			readerWriterCount.readercount--;
			ExitAndWakeUpAppropriateWaiters();
		}

		public void ExitWriteLock()
		{
			if (!fIsReentrant)
			{
				if (Thread.CurrentThread.ManagedThreadId != writeLockOwnerId)
				{
					throw new SynchronizationLockException(SR.GetString("The write lock is being released without being held."));
				}
				EnterMyLock();
			}
			else
			{
				EnterMyLock();
				System.Threading.ReaderWriterCount threadRWCount = GetThreadRWCount(dontAllocate: false);
				if (threadRWCount == null)
				{
					ExitMyLock();
					throw new SynchronizationLockException(SR.GetString("The write lock is being released without being held."));
				}
				if (threadRWCount.writercount < 1)
				{
					ExitMyLock();
					throw new SynchronizationLockException(SR.GetString("The write lock is being released without being held."));
				}
				threadRWCount.writercount--;
				if (threadRWCount.writercount > 0)
				{
					ExitMyLock();
					return;
				}
			}
			ClearWriterAcquired();
			writeLockOwnerId = -1;
			ExitAndWakeUpAppropriateWaiters();
		}

		public void ExitUpgradeableReadLock()
		{
			if (!fIsReentrant)
			{
				if (Thread.CurrentThread.ManagedThreadId != upgradeLockOwnerId)
				{
					throw new SynchronizationLockException(SR.GetString("The upgradeable lock is being released without being held."));
				}
				EnterMyLock();
			}
			else
			{
				EnterMyLock();
				System.Threading.ReaderWriterCount threadRWCount = GetThreadRWCount(dontAllocate: true);
				if (threadRWCount == null)
				{
					ExitMyLock();
					throw new SynchronizationLockException(SR.GetString("The upgradeable lock is being released without being held."));
				}
				if (threadRWCount.upgradecount < 1)
				{
					ExitMyLock();
					throw new SynchronizationLockException(SR.GetString("The upgradeable lock is being released without being held."));
				}
				threadRWCount.upgradecount--;
				if (threadRWCount.upgradecount > 0)
				{
					ExitMyLock();
					return;
				}
				fUpgradeThreadHoldingRead = false;
			}
			owners--;
			upgradeLockOwnerId = -1;
			ExitAndWakeUpAppropriateWaiters();
		}

		private void LazyCreateEvent(ref EventWaitHandle waitEvent, bool makeAutoResetEvent)
		{
			ExitMyLock();
			EventWaitHandle eventWaitHandle = ((!makeAutoResetEvent) ? ((EventWaitHandle)new ManualResetEvent(initialState: false)) : ((EventWaitHandle)new AutoResetEvent(initialState: false)));
			EnterMyLock();
			if (waitEvent == null)
			{
				waitEvent = eventWaitHandle;
			}
			else
			{
				eventWaitHandle.Close();
			}
		}

		private bool WaitOnEvent(EventWaitHandle waitEvent, ref uint numWaiters, TimeoutTracker timeout, bool isWriteWaiter)
		{
			waitEvent.Reset();
			numWaiters++;
			fNoWaiters = false;
			if (numWriteWaiters == 1)
			{
				SetWritersWaiting();
			}
			if (numWriteUpgradeWaiters == 1)
			{
				SetUpgraderWaiting();
			}
			bool flag = false;
			ExitMyLock();
			try
			{
				flag = waitEvent.WaitOne(timeout.RemainingMilliseconds);
			}
			finally
			{
				EnterMyLock();
				numWaiters--;
				if (numWriteWaiters == 0 && numWriteUpgradeWaiters == 0 && numUpgradeWaiters == 0 && numReadWaiters == 0)
				{
					fNoWaiters = true;
				}
				if (numWriteWaiters == 0)
				{
					ClearWritersWaiting();
				}
				if (numWriteUpgradeWaiters == 0)
				{
					ClearUpgraderWaiting();
				}
				if (!flag)
				{
					if (isWriteWaiter)
					{
						ExitAndWakeUpAppropriateReadWaiters();
					}
					else
					{
						ExitMyLock();
					}
				}
			}
			return flag;
		}

		private void ExitAndWakeUpAppropriateWaiters()
		{
			if (fNoWaiters)
			{
				ExitMyLock();
			}
			else
			{
				ExitAndWakeUpAppropriateWaitersPreferringWriters();
			}
		}

		private void ExitAndWakeUpAppropriateWaitersPreferringWriters()
		{
			uint numReaders = GetNumReaders();
			if (fIsReentrant && numWriteUpgradeWaiters != 0 && fUpgradeThreadHoldingRead && numReaders == 2)
			{
				ExitMyLock();
				waitUpgradeEvent.Set();
			}
			else if (numReaders == 1 && numWriteUpgradeWaiters != 0)
			{
				ExitMyLock();
				waitUpgradeEvent.Set();
			}
			else if (numReaders == 0 && numWriteWaiters != 0)
			{
				ExitMyLock();
				writeEvent.Set();
			}
			else
			{
				ExitAndWakeUpAppropriateReadWaiters();
			}
		}

		private void ExitAndWakeUpAppropriateReadWaiters()
		{
			if (numWriteWaiters != 0 || numWriteUpgradeWaiters != 0 || fNoWaiters)
			{
				ExitMyLock();
				return;
			}
			bool flag = numReadWaiters != 0;
			bool num = numUpgradeWaiters != 0 && upgradeLockOwnerId == -1;
			ExitMyLock();
			if (flag)
			{
				readEvent.Set();
			}
			if (num)
			{
				upgradeEvent.Set();
			}
		}

		private bool IsWriterAcquired()
		{
			return (owners & 0xBFFFFFFFu) == 0;
		}

		private void SetWriterAcquired()
		{
			owners |= 2147483648u;
		}

		private void ClearWriterAcquired()
		{
			owners &= 2147483647u;
		}

		private void SetWritersWaiting()
		{
			owners |= 1073741824u;
		}

		private void ClearWritersWaiting()
		{
			owners &= 3221225471u;
		}

		private void SetUpgraderWaiting()
		{
			owners |= 536870912u;
		}

		private void ClearUpgraderWaiting()
		{
			owners &= 3758096383u;
		}

		private uint GetNumReaders()
		{
			return owners & 0xFFFFFFFu;
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		private void EnterMyLock()
		{
			if (Interlocked.CompareExchange(ref myLock, 1, 0) != 0)
			{
				EnterMyLockSpin();
			}
		}

		private void EnterMyLockSpin()
		{
			int processorCount = Environment.ProcessorCount;
			int num = 0;
			while (true)
			{
				if (num < 10 && processorCount > 1)
				{
					Thread.SpinWait(20 * (num + 1));
				}
				else if (num < 15)
				{
					Thread.Sleep(0);
				}
				else
				{
					Thread.Sleep(1);
				}
				if (myLock == 0 && Interlocked.CompareExchange(ref myLock, 1, 0) == 0)
				{
					break;
				}
				num++;
			}
		}

		private void ExitMyLock()
		{
			Volatile.Write(ref myLock, 0);
		}

		private static void SpinWait(int SpinCount)
		{
			if (SpinCount < 5 && Environment.ProcessorCount > 1)
			{
				Thread.SpinWait(20 * SpinCount);
			}
			else if (SpinCount < 17)
			{
				Thread.Sleep(0);
			}
			else
			{
				Thread.Sleep(1);
			}
		}

		public void Dispose()
		{
			Dispose(disposing: true);
		}

		private void Dispose(bool disposing)
		{
			if (disposing && !fDisposed)
			{
				if (WaitingReadCount > 0 || WaitingUpgradeCount > 0 || WaitingWriteCount > 0)
				{
					throw new SynchronizationLockException(SR.GetString("The lock is being disposed while still being used. It either is being held by a thread and/or has active waiters waiting to acquire the lock."));
				}
				if (IsReadLockHeld || IsUpgradeableReadLockHeld || IsWriteLockHeld)
				{
					throw new SynchronizationLockException(SR.GetString("The lock is being disposed while still being used. It either is being held by a thread and/or has active waiters waiting to acquire the lock."));
				}
				if (writeEvent != null)
				{
					writeEvent.Close();
					writeEvent = null;
				}
				if (readEvent != null)
				{
					readEvent.Close();
					readEvent = null;
				}
				if (upgradeEvent != null)
				{
					upgradeEvent.Close();
					upgradeEvent = null;
				}
				if (waitUpgradeEvent != null)
				{
					waitUpgradeEvent.Close();
					waitUpgradeEvent = null;
				}
				fDisposed = true;
			}
		}
	}
}
namespace System.Threading.Tasks
{
	public static class TaskExtensions
	{
		[StructLayout(LayoutKind.Sequential, Size = 1)]
		private struct VoidResult
		{
		}

		public static Task Unwrap(this Task<Task> task)
		{
			if (task == null)
			{
				throw new ArgumentNullException("task");
			}
			return Task.CreateUnwrapPromise<VoidResult>((Task)task, lookForOce: false);
		}

		public static Task<TResult> Unwrap<TResult>(this Task<Task<TResult>> task)
		{
			if (task == null)
			{
				throw new ArgumentNullException("task");
			}
			return Task.CreateUnwrapPromise<TResult>((Task)task, lookForOce: false);
		}
	}
}
namespace System.IO
{
	[Serializable]
	public enum HandleInheritability
	{
		None,
		Inheritable
	}
}
namespace System.IO.Pipes
{
	[MonoTODO("Anonymous pipes are not working even on win32, due to some access authorization issue")]
	[HostProtection(SecurityAction.LinkDemand, MayLeakOnAbort = true)]
	public sealed class AnonymousPipeClientStream : PipeStream
	{
		public override PipeTransmissionMode ReadMode
		{
			set
			{
				if (value == PipeTransmissionMode.Message)
				{
					throw new NotSupportedException();
				}
			}
		}

		public override PipeTransmissionMode TransmissionMode => PipeTransmissionMode.Byte;

		private static SafePipeHandle ToSafePipeHandle(string pipeHandleAsString)
		{
			if (pipeHandleAsString == null)
			{
				throw new ArgumentNullException("pipeHandleAsString");
			}
			return new SafePipeHandle(new IntPtr(long.Parse(pipeHandleAsString, NumberFormatInfo.InvariantInfo)), ownsHandle: false);
		}

		public AnonymousPipeClientStream(string pipeHandleAsString)
			: this(PipeDirection.In, pipeHandleAsString)
		{
		}

		public AnonymousPipeClientStream(PipeDirection direction, string pipeHandleAsString)
			: this(direction, ToSafePipeHandle(pipeHandleAsString))
		{
		}

		public AnonymousPipeClientStream(PipeDirection direction, SafePipeHandle safePipeHandle)
			: base(direction, 1024)
		{
			InitializeHandle(safePipeHandle, isExposed: false, isAsync: false);
			base.IsConnected = true;
		}

		~AnonymousPipeClientStream()
		{
		}
	}
	[MonoTODO("Anonymous pipes are not working even on win32, due to some access authorization issue")]
	[HostProtection(SecurityAction.LinkDemand, MayLeakOnAbort = true)]
	public sealed class AnonymousPipeServerStream : PipeStream
	{
		private IAnonymousPipeServer impl;

		[MonoTODO]
		public SafePipeHandle ClientSafePipeHandle { get; private set; }

		public override PipeTransmissionMode ReadMode
		{
			set
			{
				if (value == PipeTransmissionMode.Message)
				{
					throw new NotSupportedException();
				}
			}
		}

		public override PipeTransmissionMode TransmissionMode => PipeTransmissionMode.Byte;

		public AnonymousPipeServerStream()
			: this(PipeDirection.Out)
		{
		}

		public AnonymousPipeServerStream(PipeDirection direction)
			: this(direction, HandleInheritability.None)
		{
		}

		public AnonymousPipeServerStream(PipeDirection direction, HandleInheritability inheritability)
			: this(direction, inheritability, 1024)
		{
		}

		public AnonymousPipeServerStream(PipeDirection direction, HandleInheritability inheritability, int bufferSize)
			: this(direction, inheritability, bufferSize, null)
		{
		}

		public AnonymousPipeServerStream(PipeDirection direction, HandleInheritability inheritability, int bufferSize, PipeSecurity pipeSecurity)
			: base(direction, bufferSize)
		{
			if (direction == PipeDirection.InOut)
			{
				throw new NotSupportedException("Anonymous pipe direction can only be either in or out.");
			}
			if (PipeStream.IsWindows)
			{
				impl = new Win32AnonymousPipeServer(this, direction, inheritability, bufferSize, pipeSecurity);
			}
			else
			{
				impl = new UnixAnonymousPipeServer(this, direction, inheritability, bufferSize);
			}
			InitializeHandle(impl.Handle, isExposed: false, isAsync: false);
			base.IsConnected = true;
		}

		[MonoTODO]
		public AnonymousPipeServerStream(PipeDirection direction, SafePipeHandle serverSafePipeHandle, SafePipeHandle clientSafePipeHandle)
			: base(direction, 1024)
		{
			if (serverSafePipeHandle == null)
			{
				throw new ArgumentNullException("serverSafePipeHandle");
			}
			if (clientSafePipeHandle == null)
			{
				throw new ArgumentNullException("clientSafePipeHandle");
			}
			if (direction == PipeDirection.InOut)
			{
				throw new NotSupportedException("Anonymous pipe direction can only be either in or out.");
			}
			if (PipeStream.IsWindows)
			{
				impl = new Win32AnonymousPipeServer(this, serverSafePipeHandle, clientSafePipeHandle);
			}
			else
			{
				impl = new UnixAnonymousPipeServer(this, serverSafePipeHandle, clientSafePipeHandle);
			}
			InitializeHandle(serverSafePipeHandle, isExposed: true, isAsync: false);
			base.IsConnected = true;
			ClientSafePipeHandle = clientSafePipeHandle;
		}

		~AnonymousPipeServerStream()
		{
		}

		[MonoTODO]
		public void DisposeLocalCopyOfClientHandle()
		{
			impl.DisposeLocalCopyOfClientHandle();
		}

		public string GetClientHandleAsString()
		{
			return impl.Handle.DangerousGetHandle().ToInt64().ToString(NumberFormatInfo.InvariantInfo);
		}
	}
	[MonoTODO("working only on win32 right now")]
	[HostProtection(SecurityAction.LinkDemand, MayLeakOnAbort = true)]
	public sealed class NamedPipeClientStream : PipeStream
	{
		private INamedPipeClient impl;

		public int NumberOfServerInstances
		{
			get
			{
				CheckPipePropertyOperations();
				return impl.NumberOfServerInstances;
			}
		}

		public NamedPipeClientStream(string pipeName)
			: this(".", pipeName)
		{
		}

		public NamedPipeClientStream(string serverName, string pipeName)
			: this(serverName, pipeName, PipeDirection.InOut)
		{
		}

		public NamedPipeClientStream(string serverName, string pipeName, PipeDirection direction)
			: this(serverName, pipeName, direction, PipeOptions.None)
		{
		}

		public NamedPipeClientStream(string serverName, string pipeName, PipeDirection direction, PipeOptions options)
			: this(serverName, pipeName, direction, options, TokenImpersonationLevel.None)
		{
		}

		public NamedPipeClientStream(string serverName, string pipeName, PipeDirection direction, PipeOptions options, TokenImpersonationLevel impersonationLevel)
			: this(serverName, pipeName, direction, options, impersonationLevel, HandleInheritability.None)
		{
		}

		public NamedPipeClientStream(string serverName, string pipeName, PipeDirection direction, PipeOptions options, TokenImpersonationLevel impersonationLevel, HandleInheritability inheritability)
			: this(serverName, pipeName, PipeStream.ToAccessRights(direction), options, impersonationLevel, inheritability)
		{
		}

		public NamedPipeClientStream(PipeDirection direction, bool isAsync, bool isConnected, SafePipeHandle safePipeHandle)
			: base(direction, 1024)
		{
			if (PipeStream.IsWindows)
			{
				impl = new Win32NamedPipeClient(this, safePipeHandle);
			}
			else
			{
				impl = new UnixNamedPipeClient(this, safePipeHandle);
			}
			base.IsConnected = isConnected;
			InitializeHandle(safePipeHandle, isExposed: true, isAsync);
		}

		public NamedPipeClientStream(string serverName, string pipeName, PipeAccessRights desiredAccessRights, PipeOptions options, TokenImpersonationLevel impersonationLevel, HandleInheritability inheritability)
			: base(PipeStream.ToDirection(desiredAccessRights), 1024)
		{
			if (impersonationLevel != 0 || inheritability != 0)
			{
				throw ThrowACLException();
			}
			if (PipeStream.IsWindows)
			{
				impl = new Win32NamedPipeClient(this, serverName, pipeName, desiredAccessRights, options, inheritability);
			}
			else
			{
				impl = new UnixNamedPipeClient(this, serverName, pipeName, desiredAccessRights, options, inheritability);
			}
		}

		~NamedPipeClientStream()
		{
			Dispose(disposing: false);
		}

		public void Connect()
		{
			impl.Connect();
			InitializeHandle(impl.Handle, isExposed: false, impl.IsAsync);
			base.IsConnected = true;
		}

		public void Connect(int timeout)
		{
			impl.Connect(timeout);
			InitializeHandle(impl.Handle, isExposed: false, impl.IsAsync);
			base.IsConnected = true;
		}

		public Task ConnectAs

Room Architect Tool_Data/Managed/System.Data.dll

Decompiled 3 months ago
using System;
using System.CodeDom;
using System.CodeDom.Compiler;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.ComponentModel;
using System.ComponentModel.Design.Serialization;
using System.Configuration;
using System.Data;
using System.Data.Common;
using System.Data.Odbc;
using System.Data.OleDb;
using System.Data.ProviderBase;
using System.Data.Sql;
using System.Data.SqlClient;
using System.Data.SqlClient.SNI;
using System.Data.SqlTypes;
using System.Diagnostics;
using System.Diagnostics.Tracing;
using System.Dynamic;
using System.EnterpriseServices;
using System.Globalization;
using System.IO;
using System.IO.Pipes;
using System.Linq;
using System.Net;
using System.Net.Security;
using System.Net.Sockets;
using System.Numerics;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
using System.Runtime.ExceptionServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.Security;
using System.Security.Authentication;
using System.Security.Authentication.ExtendedProtection;
using System.Security.Cryptography.X509Certificates;
using System.Security.Permissions;
using System.Security.Principal;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using System.Transactions;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;
using System.Xml.Serialization.Advanced;
using System.Xml.XPath;
using Microsoft.SqlServer.Server;
using Microsoft.Win32.SafeHandles;
using Unity;

[assembly: AssemblyCompany("Mono development team")]
[assembly: AssemblyDelaySign(true)]
[assembly: AllowPartiallyTrustedCallers]
[assembly: ComVisible(false)]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: CLSCompliant(true)]
[assembly: AssemblyInformationalVersion("4.6.57.0")]
[assembly: SatelliteContractVersion("4.0.0.0")]
[assembly: AssemblyCopyright("(c) Various Mono authors")]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: AssemblyFileVersion("4.6.57.0")]
[assembly: AssemblyDefaultAlias("System.Data.dll")]
[assembly: AssemblyTitle("System.Data.dll")]
[assembly: SecurityTransparent]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: CompilationRelaxations(8)]
[assembly: InternalsVisibleTo("System.Web, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
[assembly: AssemblyDescription("System.Data.dll")]
[assembly: InternalsVisibleTo("System.Design, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("4.0.0.0")]
[module: UnverifiableCode]
internal static class Interop
{
	private static class Libraries
	{
		internal const string SystemNative = "System.Native";

		internal const string HttpNative = "System.Net.Http.Native";

		internal const string NetSecurityNative = "System.Net.Security.Native";

		internal const string CryptoNative = "System.Security.Cryptography.Native.OpenSsl";

		internal const string GlobalizationNative = "System.Globalization.Native";

		internal const string CompressionNative = "System.IO.Compression.Native";

		internal const string Libdl = "libdl";
	}

	internal static class NetSecurityNative
	{
		internal sealed class GssApiException : Exception
		{
			private readonly Status _minorStatus;

			public Status MinorStatus => _minorStatus;

			public GssApiException(string message)
				: base(message)
			{
			}

			public GssApiException(Status majorStatus, Status minorStatus)
				: base(GetGssApiDisplayStatus(majorStatus, minorStatus))
			{
				base.HResult = (int)majorStatus;
				_minorStatus = minorStatus;
			}

			private static string GetGssApiDisplayStatus(Status majorStatus, Status minorStatus)
			{
				string gssApiDisplayStatus = GetGssApiDisplayStatus(majorStatus, isMinor: false);
				string gssApiDisplayStatus2 = GetGssApiDisplayStatus(minorStatus, isMinor: true);
				if (gssApiDisplayStatus == null || gssApiDisplayStatus2 == null)
				{
					return SR.Format("GSSAPI operation failed with status: {0} (Minor status: {1}).", majorStatus.ToString("x"), minorStatus.ToString("x"));
				}
				return SR.Format("GSSAPI operation failed with error - {0} ({1}).", gssApiDisplayStatus, gssApiDisplayStatus2);
			}

			private static string GetGssApiDisplayStatus(Status status, bool isMinor)
			{
				GssBuffer buffer = default(GssBuffer);
				try
				{
					Status minorStatus;
					return ((isMinor ? DisplayMinorStatus(out minorStatus, status, ref buffer) : DisplayMajorStatus(out minorStatus, status, ref buffer)) != 0) ? null : Marshal.PtrToStringAnsi(buffer._data);
				}
				finally
				{
					buffer.Dispose();
				}
			}
		}

		internal struct GssBuffer : IDisposable
		{
			internal ulong _length;

			internal IntPtr _data;

			internal int Copy(byte[] destination, int offset)
			{
				if (_data == IntPtr.Zero || _length == 0L)
				{
					return 0;
				}
				int num = Convert.ToInt32(_length);
				int num2 = destination.Length - offset;
				if (num > num2)
				{
					throw new GssApiException(SR.Format("Insufficient buffer space. Required: {0} Actual: {1}.", num, num2));
				}
				Marshal.Copy(_data, destination, offset, num);
				return num;
			}

			internal byte[] ToByteArray()
			{
				if (_data == IntPtr.Zero || _length == 0L)
				{
					return Array.Empty<byte>();
				}
				int num = Convert.ToInt32(_length);
				byte[] array = new byte[num];
				Marshal.Copy(_data, array, 0, num);
				return array;
			}

			public void Dispose()
			{
				if (_data != IntPtr.Zero)
				{
					ReleaseGssBuffer(_data, _length);
					_data = IntPtr.Zero;
				}
				_length = 0uL;
			}
		}

		internal enum Status : uint
		{
			GSS_S_COMPLETE,
			GSS_S_CONTINUE_NEEDED
		}

		[Flags]
		internal enum GssFlags : uint
		{
			GSS_C_DELEG_FLAG = 1u,
			GSS_C_MUTUAL_FLAG = 2u,
			GSS_C_REPLAY_FLAG = 4u,
			GSS_C_SEQUENCE_FLAG = 8u,
			GSS_C_CONF_FLAG = 0x10u,
			GSS_C_INTEG_FLAG = 0x20u,
			GSS_C_ANON_FLAG = 0x40u,
			GSS_C_PROT_READY_FLAG = 0x80u,
			GSS_C_TRANS_FLAG = 0x100u,
			GSS_C_DCE_STYLE = 0x1000u,
			GSS_C_IDENTIFY_FLAG = 0x2000u,
			GSS_C_EXTENDED_ERROR_FLAG = 0x4000u,
			GSS_C_DELEG_POLICY_FLAG = 0x8000u
		}

		[DllImport("System.Net.Security.Native", EntryPoint = "NetSecurityNative_ReleaseGssBuffer")]
		internal static extern void ReleaseGssBuffer(IntPtr bufferPtr, ulong length);

		[DllImport("System.Net.Security.Native", EntryPoint = "NetSecurityNative_DisplayMinorStatus")]
		internal static extern Status DisplayMinorStatus(out Status minorStatus, Status statusValue, ref GssBuffer buffer);

		[DllImport("System.Net.Security.Native", EntryPoint = "NetSecurityNative_DisplayMajorStatus")]
		internal static extern Status DisplayMajorStatus(out Status minorStatus, Status statusValue, ref GssBuffer buffer);

		[DllImport("System.Net.Security.Native", EntryPoint = "NetSecurityNative_ImportUserName")]
		internal static extern Status ImportUserName(out Status minorStatus, string inputName, int inputNameByteCount, out Microsoft.Win32.SafeHandles.SafeGssNameHandle outputName);

		[DllImport("System.Net.Security.Native", EntryPoint = "NetSecurityNative_ImportPrincipalName")]
		internal static extern Status ImportPrincipalName(out Status minorStatus, string inputName, int inputNameByteCount, out Microsoft.Win32.SafeHandles.SafeGssNameHandle outputName);

		[DllImport("System.Net.Security.Native", EntryPoint = "NetSecurityNative_ReleaseName")]
		internal static extern Status ReleaseName(out Status minorStatus, ref IntPtr inputName);

		[DllImport("System.Net.Security.Native", EntryPoint = "NetSecurityNative_InitiateCredSpNego")]
		internal static extern Status InitiateCredSpNego(out Status minorStatus, Microsoft.Win32.SafeHandles.SafeGssNameHandle desiredName, out Microsoft.Win32.SafeHandles.SafeGssCredHandle outputCredHandle);

		[DllImport("System.Net.Security.Native", EntryPoint = "NetSecurityNative_InitiateCredWithPassword")]
		internal static extern Status InitiateCredWithPassword(out Status minorStatus, bool isNtlm, Microsoft.Win32.SafeHandles.SafeGssNameHandle desiredName, string password, int passwordLen, out Microsoft.Win32.SafeHandles.SafeGssCredHandle outputCredHandle);

		[DllImport("System.Net.Security.Native", EntryPoint = "NetSecurityNative_ReleaseCred")]
		internal static extern Status ReleaseCred(out Status minorStatus, ref IntPtr credHandle);

		[DllImport("System.Net.Security.Native", EntryPoint = "NetSecurityNative_InitSecContext")]
		internal static extern Status InitSecContext(out Status minorStatus, Microsoft.Win32.SafeHandles.SafeGssCredHandle initiatorCredHandle, ref Microsoft.Win32.SafeHandles.SafeGssContextHandle contextHandle, bool isNtlmOnly, Microsoft.Win32.SafeHandles.SafeGssNameHandle targetName, uint reqFlags, byte[] inputBytes, int inputLength, ref GssBuffer token, out uint retFlags, out int isNtlmUsed);

		[DllImport("System.Net.Security.Native", EntryPoint = "NetSecurityNative_AcceptSecContext")]
		internal static extern Status AcceptSecContext(out Status minorStatus, ref Microsoft.Win32.SafeHandles.SafeGssContextHandle acceptContextHandle, byte[] inputBytes, int inputLength, ref GssBuffer token);

		[DllImport("System.Net.Security.Native", EntryPoint = "NetSecurityNative_DeleteSecContext")]
		internal static extern Status DeleteSecContext(out Status minorStatus, ref IntPtr contextHandle);

		[DllImport("System.Net.Security.Native", EntryPoint = "NetSecurityNative_Wrap")]
		private static extern Status Wrap(out Status minorStatus, Microsoft.Win32.SafeHandles.SafeGssContextHandle contextHandle, bool isEncrypt, byte[] inputBytes, int offset, int count, ref GssBuffer outBuffer);

		[DllImport("System.Net.Security.Native", EntryPoint = "NetSecurityNative_Unwrap")]
		private static extern Status Unwrap(out Status minorStatus, Microsoft.Win32.SafeHandles.SafeGssContextHandle contextHandle, byte[] inputBytes, int offset, int count, ref GssBuffer outBuffer);

		internal static Status WrapBuffer(out Status minorStatus, Microsoft.Win32.SafeHandles.SafeGssContextHandle contextHandle, bool isEncrypt, byte[] inputBytes, int offset, int count, ref GssBuffer outBuffer)
		{
			return Wrap(out minorStatus, contextHandle, isEncrypt, inputBytes, offset, count, ref outBuffer);
		}

		internal static Status UnwrapBuffer(out Status minorStatus, Microsoft.Win32.SafeHandles.SafeGssContextHandle contextHandle, byte[] inputBytes, int offset, int count, ref GssBuffer outBuffer)
		{
			return Unwrap(out minorStatus, contextHandle, inputBytes, offset, count, ref outBuffer);
		}
	}
}
internal class SqlDependencyProcessDispatcher : MarshalByRefObject
{
	private class SqlConnectionContainer
	{
		private SqlConnection _con;

		private SqlCommand _com;

		private SqlParameter _conversationGuidParam;

		private SqlParameter _timeoutParam;

		private SqlConnectionContainerHashHelper _hashHelper;

		private string _queue;

		private string _receiveQuery;

		private string _beginConversationQuery;

		private string _endConversationQuery;

		private string _concatQuery;

		private readonly int _defaultWaitforTimeout = 60000;

		private string _escapedQueueName;

		private string _sprocName;

		private string _dialogHandle;

		private string _cachedServer;

		private string _cachedDatabase;

		private volatile bool _errorState;

		private volatile bool _stop;

		private volatile bool _stopped;

		private volatile bool _serviceQueueCreated;

		private int _startCount;

		private Timer _retryTimer;

		private Dictionary<string, int> _appDomainKeyHash;

		internal string Database
		{
			get
			{
				if (_cachedDatabase == null)
				{
					_cachedDatabase = _con.Database;
				}
				return _cachedDatabase;
			}
		}

		internal SqlConnectionContainerHashHelper HashHelper => _hashHelper;

		internal bool InErrorState => _errorState;

		internal string Queue => _queue;

		internal string Server => _cachedServer;

		internal SqlConnectionContainer(SqlConnectionContainerHashHelper hashHelper, string appDomainKey, bool useDefaults)
		{
			bool flag = false;
			try
			{
				_hashHelper = hashHelper;
				string text = null;
				if (useDefaults)
				{
					text = Guid.NewGuid().ToString();
					_queue = "SqlQueryNotificationService-" + text;
					_hashHelper.ConnectionStringBuilder.ApplicationName = _queue;
				}
				else
				{
					_queue = _hashHelper.Queue;
				}
				_con = new SqlConnection(_hashHelper.ConnectionStringBuilder.ConnectionString);
				_ = (SqlConnectionString)_con.ConnectionOptions;
				_con.Open();
				_cachedServer = _con.DataSource;
				_escapedQueueName = SqlConnection.FixupDatabaseTransactionName(_queue);
				_appDomainKeyHash = new Dictionary<string, int>();
				_com = new SqlCommand
				{
					Connection = _con,
					CommandText = "select is_broker_enabled from sys.databases where database_id=db_id()"
				};
				if (!(bool)_com.ExecuteScalar())
				{
					throw SQL.SqlDependencyDatabaseBrokerDisabled();
				}
				_conversationGuidParam = new SqlParameter("@p1", SqlDbType.UniqueIdentifier);
				_timeoutParam = new SqlParameter("@p2", SqlDbType.Int)
				{
					Value = 0
				};
				_com.Parameters.Add(_timeoutParam);
				flag = true;
				_receiveQuery = "WAITFOR(RECEIVE TOP (1) message_type_name, conversation_handle, cast(message_body AS XML) as message_body from " + _escapedQueueName + "), TIMEOUT @p2;";
				if (useDefaults)
				{
					_sprocName = SqlConnection.FixupDatabaseTransactionName("SqlQueryNotificationStoredProcedure-" + text);
					CreateQueueAndService(restart: false);
				}
				else
				{
					_com.CommandText = _receiveQuery;
					_endConversationQuery = "END CONVERSATION @p1; ";
					_concatQuery = _endConversationQuery + _receiveQuery;
				}
				IncrementStartCount(appDomainKey, out var _);
				SynchronouslyQueryServiceBrokerQueue();
				_timeoutParam.Value = _defaultWaitforTimeout;
				AsynchronouslyQueryServiceBrokerQueue();
			}
			catch (Exception e)
			{
				if (!ADP.IsCatchableExceptionType(e))
				{
					throw;
				}
				ADP.TraceExceptionWithoutRethrow(e);
				if (flag)
				{
					TearDownAndDispose();
				}
				else
				{
					if (_com != null)
					{
						_com.Dispose();
						_com = null;
					}
					if (_con != null)
					{
						_con.Dispose();
						_con = null;
					}
				}
				throw;
			}
		}

		internal bool AppDomainUnload(string appDomainKey)
		{
			lock (_appDomainKeyHash)
			{
				if (_appDomainKeyHash.ContainsKey(appDomainKey))
				{
					int num = _appDomainKeyHash[appDomainKey];
					bool appDomainStop = false;
					while (num > 0)
					{
						Stop(appDomainKey, out appDomainStop);
						num--;
					}
				}
			}
			return _stopped;
		}

		private void AsynchronouslyQueryServiceBrokerQueue()
		{
			AsyncCallback callback = AsyncResultCallback;
			_com.BeginExecuteReader(CommandBehavior.Default, callback, null);
		}

		private void AsyncResultCallback(IAsyncResult asyncResult)
		{
			try
			{
				using (SqlDataReader reader = _com.EndExecuteReader(asyncResult))
				{
					ProcessNotificationResults(reader);
				}
				if (!_stop)
				{
					AsynchronouslyQueryServiceBrokerQueue();
				}
				else
				{
					TearDownAndDispose();
				}
			}
			catch (Exception e)
			{
				if (!ADP.IsCatchableExceptionType(e))
				{
					_errorState = true;
					throw;
				}
				if (!_stop)
				{
					ADP.TraceExceptionWithoutRethrow(e);
				}
				if (_stop)
				{
					TearDownAndDispose();
					return;
				}
				_errorState = true;
				Restart(null);
			}
		}

		private void CreateQueueAndService(bool restart)
		{
			SqlCommand sqlCommand = new SqlCommand
			{
				Connection = _con
			};
			SqlTransaction sqlTransaction = null;
			try
			{
				sqlTransaction = (sqlCommand.Transaction = _con.BeginTransaction());
				string text = SqlServerEscapeHelper.MakeStringLiteral(_queue);
				sqlCommand.CommandText = "CREATE PROCEDURE " + _sprocName + " AS BEGIN BEGIN TRANSACTION; RECEIVE TOP(0) conversation_handle FROM " + _escapedQueueName + "; IF (SELECT COUNT(*) FROM " + _escapedQueueName + " WHERE message_type_name = 'http://schemas.microsoft.com/SQL/ServiceBroker/DialogTimer') > 0 BEGIN if ((SELECT COUNT(*) FROM sys.services WHERE name = " + text + ") > 0)   DROP SERVICE " + _escapedQueueName + "; if (OBJECT_ID(" + text + ", 'SQ') IS NOT NULL)   DROP QUEUE " + _escapedQueueName + "; DROP PROCEDURE " + _sprocName + "; END COMMIT TRANSACTION; END";
				if (!restart)
				{
					sqlCommand.ExecuteNonQuery();
				}
				else
				{
					try
					{
						sqlCommand.ExecuteNonQuery();
					}
					catch (Exception e)
					{
						if (!ADP.IsCatchableExceptionType(e))
						{
							throw;
						}
						ADP.TraceExceptionWithoutRethrow(e);
						try
						{
							if (sqlTransaction != null)
							{
								sqlTransaction.Rollback();
								sqlTransaction = null;
							}
						}
						catch (Exception e2)
						{
							if (!ADP.IsCatchableExceptionType(e2))
							{
								throw;
							}
							ADP.TraceExceptionWithoutRethrow(e2);
						}
					}
					if (sqlTransaction == null)
					{
						sqlTransaction = (sqlCommand.Transaction = _con.BeginTransaction());
					}
				}
				sqlCommand.CommandText = "IF OBJECT_ID(" + text + ", 'SQ') IS NULL BEGIN CREATE QUEUE " + _escapedQueueName + " WITH ACTIVATION (PROCEDURE_NAME=" + _sprocName + ", MAX_QUEUE_READERS=1, EXECUTE AS OWNER); END; IF (SELECT COUNT(*) FROM sys.services WHERE NAME=" + text + ") = 0 BEGIN CREATE SERVICE " + _escapedQueueName + " ON QUEUE " + _escapedQueueName + " ([http://schemas.microsoft.com/SQL/Notifications/PostQueryNotification]); IF (SELECT COUNT(*) FROM sys.database_principals WHERE name='sql_dependency_subscriber' AND type='R') <> 0 BEGIN GRANT SEND ON SERVICE::" + _escapedQueueName + " TO sql_dependency_subscriber; END;  END; BEGIN DIALOG @dialog_handle FROM SERVICE " + _escapedQueueName + " TO SERVICE " + text;
				SqlParameter sqlParameter = new SqlParameter
				{
					ParameterName = "@dialog_handle",
					DbType = DbType.Guid,
					Direction = ParameterDirection.Output
				};
				sqlCommand.Parameters.Add(sqlParameter);
				sqlCommand.ExecuteNonQuery();
				_dialogHandle = ((Guid)sqlParameter.Value).ToString();
				_beginConversationQuery = "BEGIN CONVERSATION TIMER ('" + _dialogHandle + "') TIMEOUT = 120; " + _receiveQuery;
				_com.CommandText = _beginConversationQuery;
				_endConversationQuery = "END CONVERSATION @p1; ";
				_concatQuery = _endConversationQuery + _com.CommandText;
				sqlTransaction.Commit();
				sqlTransaction = null;
				_serviceQueueCreated = true;
			}
			finally
			{
				if (sqlTransaction != null)
				{
					try
					{
						sqlTransaction.Rollback();
						sqlTransaction = null;
					}
					catch (Exception e3)
					{
						if (!ADP.IsCatchableExceptionType(e3))
						{
							throw;
						}
						ADP.TraceExceptionWithoutRethrow(e3);
					}
				}
			}
		}

		internal void IncrementStartCount(string appDomainKey, out bool appDomainStart)
		{
			appDomainStart = false;
			Interlocked.Increment(ref _startCount);
			lock (_appDomainKeyHash)
			{
				if (_appDomainKeyHash.ContainsKey(appDomainKey))
				{
					_appDomainKeyHash[appDomainKey] += 1;
					return;
				}
				_appDomainKeyHash[appDomainKey] = 1;
				appDomainStart = true;
			}
		}

		private void ProcessNotificationResults(SqlDataReader reader)
		{
			Guid guid = Guid.Empty;
			try
			{
				if (_stop)
				{
					return;
				}
				while (reader.Read())
				{
					string @string = reader.GetString(0);
					guid = reader.GetGuid(1);
					if (string.Compare(@string, "http://schemas.microsoft.com/SQL/Notifications/QueryNotification", StringComparison.OrdinalIgnoreCase) == 0)
					{
						SqlXml sqlXml = reader.GetSqlXml(2);
						if (sqlXml == null)
						{
							continue;
						}
						SqlNotification sqlNotification = SqlNotificationParser.ProcessMessage(sqlXml);
						if (sqlNotification == null)
						{
							continue;
						}
						string key = sqlNotification.Key;
						int num = key.IndexOf(';');
						if (num < 0)
						{
							continue;
						}
						string key2 = key.Substring(0, num);
						SqlDependencyPerAppDomainDispatcher sqlDependencyPerAppDomainDispatcher;
						lock (s_staticInstance._sqlDependencyPerAppDomainDispatchers)
						{
							sqlDependencyPerAppDomainDispatcher = s_staticInstance._sqlDependencyPerAppDomainDispatchers[key2];
						}
						if (sqlDependencyPerAppDomainDispatcher == null)
						{
							continue;
						}
						try
						{
							sqlDependencyPerAppDomainDispatcher.InvalidateCommandID(sqlNotification);
						}
						catch (Exception e)
						{
							if (!ADP.IsCatchableExceptionType(e))
							{
								throw;
							}
							ADP.TraceExceptionWithoutRethrow(e);
						}
					}
					else
					{
						guid = Guid.Empty;
					}
				}
			}
			finally
			{
				if (guid == Guid.Empty)
				{
					_com.CommandText = _beginConversationQuery ?? _receiveQuery;
					if (_com.Parameters.Count > 1)
					{
						_com.Parameters.Remove(_conversationGuidParam);
					}
				}
				else
				{
					_com.CommandText = _concatQuery;
					_conversationGuidParam.Value = guid;
					if (_com.Parameters.Count == 1)
					{
						_com.Parameters.Add(_conversationGuidParam);
					}
				}
			}
		}

		private void Restart(object unused)
		{
			try
			{
				lock (this)
				{
					if (!_stop)
					{
						try
						{
							_con.Close();
						}
						catch (Exception e)
						{
							if (!ADP.IsCatchableExceptionType(e))
							{
								throw;
							}
							ADP.TraceExceptionWithoutRethrow(e);
						}
					}
				}
				lock (this)
				{
					if (!_stop)
					{
						_con.Open();
					}
				}
				lock (this)
				{
					if (!_stop && _serviceQueueCreated)
					{
						bool flag = false;
						try
						{
							CreateQueueAndService(restart: true);
						}
						catch (Exception e2)
						{
							if (!ADP.IsCatchableExceptionType(e2))
							{
								throw;
							}
							ADP.TraceExceptionWithoutRethrow(e2);
							flag = true;
						}
						if (flag)
						{
							s_staticInstance.Invalidate(Server, new SqlNotification(SqlNotificationInfo.Error, SqlNotificationSource.Client, SqlNotificationType.Change, null));
						}
					}
				}
				lock (this)
				{
					if (!_stop)
					{
						_timeoutParam.Value = 0;
						SynchronouslyQueryServiceBrokerQueue();
						_timeoutParam.Value = _defaultWaitforTimeout;
						AsynchronouslyQueryServiceBrokerQueue();
						_errorState = false;
						_retryTimer = null;
					}
				}
				if (_stop)
				{
					TearDownAndDispose();
				}
			}
			catch (Exception e3)
			{
				if (!ADP.IsCatchableExceptionType(e3))
				{
					throw;
				}
				ADP.TraceExceptionWithoutRethrow(e3);
				try
				{
					s_staticInstance.Invalidate(Server, new SqlNotification(SqlNotificationInfo.Error, SqlNotificationSource.Client, SqlNotificationType.Change, null));
				}
				catch (Exception e4)
				{
					if (!ADP.IsCatchableExceptionType(e4))
					{
						throw;
					}
					ADP.TraceExceptionWithoutRethrow(e4);
				}
				try
				{
					_con.Close();
				}
				catch (Exception e5)
				{
					if (!ADP.IsCatchableExceptionType(e5))
					{
						throw;
					}
					ADP.TraceExceptionWithoutRethrow(e5);
				}
				if (!_stop)
				{
					_retryTimer = new Timer(Restart, null, _defaultWaitforTimeout, -1);
				}
			}
		}

		internal bool Stop(string appDomainKey, out bool appDomainStop)
		{
			appDomainStop = false;
			if (appDomainKey != null)
			{
				lock (_appDomainKeyHash)
				{
					if (_appDomainKeyHash.ContainsKey(appDomainKey))
					{
						int num = _appDomainKeyHash[appDomainKey];
						if (num > 0)
						{
							_appDomainKeyHash[appDomainKey] = num - 1;
						}
						if (1 == num)
						{
							_appDomainKeyHash.Remove(appDomainKey);
							appDomainStop = true;
						}
					}
				}
			}
			if (Interlocked.Decrement(ref _startCount) == 0)
			{
				lock (this)
				{
					try
					{
						_com.Cancel();
					}
					catch (Exception e)
					{
						if (!ADP.IsCatchableExceptionType(e))
						{
							throw;
						}
						ADP.TraceExceptionWithoutRethrow(e);
					}
					_stop = true;
				}
				Stopwatch stopwatch = Stopwatch.StartNew();
				while (true)
				{
					lock (this)
					{
						if (!_stopped)
						{
							if (!_errorState && stopwatch.Elapsed.Seconds < 30)
							{
								goto IL_0127;
							}
							Timer retryTimer = _retryTimer;
							_retryTimer = null;
							retryTimer?.Dispose();
							TearDownAndDispose();
						}
					}
					break;
					IL_0127:
					Thread.Sleep(1);
				}
			}
			return _stopped;
		}

		private void SynchronouslyQueryServiceBrokerQueue()
		{
			using SqlDataReader reader = _com.ExecuteReader();
			ProcessNotificationResults(reader);
		}

		private void TearDownAndDispose()
		{
			lock (this)
			{
				try
				{
					if (_con.State == ConnectionState.Closed || ConnectionState.Broken == _con.State)
					{
						return;
					}
					if (_com.Parameters.Count > 1)
					{
						try
						{
							_com.CommandText = _endConversationQuery;
							_com.Parameters.Remove(_timeoutParam);
							_com.ExecuteNonQuery();
						}
						catch (Exception e)
						{
							if (!ADP.IsCatchableExceptionType(e))
							{
								throw;
							}
							ADP.TraceExceptionWithoutRethrow(e);
						}
					}
					if (!_serviceQueueCreated || _errorState)
					{
						return;
					}
					_com.CommandText = "BEGIN TRANSACTION; DROP SERVICE " + _escapedQueueName + "; DROP QUEUE " + _escapedQueueName + "; DROP PROCEDURE " + _sprocName + "; COMMIT TRANSACTION;";
					try
					{
						_com.ExecuteNonQuery();
					}
					catch (Exception e2)
					{
						if (!ADP.IsCatchableExceptionType(e2))
						{
							throw;
						}
						ADP.TraceExceptionWithoutRethrow(e2);
					}
				}
				finally
				{
					_stopped = true;
					_con.Dispose();
				}
			}
		}
	}

	private class SqlNotificationParser
	{
		[Flags]
		private enum MessageAttributes
		{
			None = 0,
			Type = 1,
			Source = 2,
			Info = 4,
			All = 7
		}

		private const string RootNode = "QueryNotification";

		private const string MessageNode = "Message";

		private const string InfoAttribute = "info";

		private const string SourceAttribute = "source";

		private const string TypeAttribute = "type";

		internal static SqlNotification ProcessMessage(SqlXml xmlMessage)
		{
			using XmlReader xmlReader = xmlMessage.CreateReader();
			_ = string.Empty;
			MessageAttributes messageAttributes = MessageAttributes.None;
			SqlNotificationType type = SqlNotificationType.Unknown;
			SqlNotificationInfo info = SqlNotificationInfo.Unknown;
			SqlNotificationSource source = SqlNotificationSource.Unknown;
			string key = string.Empty;
			xmlReader.Read();
			if (XmlNodeType.Element == xmlReader.NodeType && "QueryNotification" == xmlReader.LocalName && 3 <= xmlReader.AttributeCount)
			{
				while (MessageAttributes.All != messageAttributes && xmlReader.MoveToNextAttribute())
				{
					try
					{
						switch (xmlReader.LocalName)
						{
						case "type":
							try
							{
								SqlNotificationType sqlNotificationType = (SqlNotificationType)Enum.Parse(typeof(SqlNotificationType), xmlReader.Value, ignoreCase: true);
								if (Enum.IsDefined(typeof(SqlNotificationType), sqlNotificationType))
								{
									type = sqlNotificationType;
								}
							}
							catch (Exception e2)
							{
								if (!ADP.IsCatchableExceptionType(e2))
								{
									throw;
								}
								ADP.TraceExceptionWithoutRethrow(e2);
							}
							messageAttributes |= MessageAttributes.Type;
							break;
						case "source":
							try
							{
								SqlNotificationSource sqlNotificationSource = (SqlNotificationSource)Enum.Parse(typeof(SqlNotificationSource), xmlReader.Value, ignoreCase: true);
								if (Enum.IsDefined(typeof(SqlNotificationSource), sqlNotificationSource))
								{
									source = sqlNotificationSource;
								}
							}
							catch (Exception e3)
							{
								if (!ADP.IsCatchableExceptionType(e3))
								{
									throw;
								}
								ADP.TraceExceptionWithoutRethrow(e3);
							}
							messageAttributes |= MessageAttributes.Source;
							break;
						case "info":
							try
							{
								string value = xmlReader.Value;
								switch (value)
								{
								case "set options":
									info = SqlNotificationInfo.Options;
									break;
								case "previous invalid":
									info = SqlNotificationInfo.PreviousFire;
									break;
								case "query template limit":
									info = SqlNotificationInfo.TemplateLimit;
									break;
								default:
								{
									SqlNotificationInfo sqlNotificationInfo = (SqlNotificationInfo)Enum.Parse(typeof(SqlNotificationInfo), value, ignoreCase: true);
									if (Enum.IsDefined(typeof(SqlNotificationInfo), sqlNotificationInfo))
									{
										info = sqlNotificationInfo;
									}
									break;
								}
								}
							}
							catch (Exception e)
							{
								if (!ADP.IsCatchableExceptionType(e))
								{
									throw;
								}
								ADP.TraceExceptionWithoutRethrow(e);
							}
							messageAttributes |= MessageAttributes.Info;
							break;
						}
					}
					catch (ArgumentException e4)
					{
						ADP.TraceExceptionWithoutRethrow(e4);
						return null;
					}
				}
				if (MessageAttributes.All != messageAttributes)
				{
					return null;
				}
				if (!xmlReader.Read())
				{
					return null;
				}
				if (XmlNodeType.Element != xmlReader.NodeType || string.Compare(xmlReader.LocalName, "Message", StringComparison.OrdinalIgnoreCase) != 0)
				{
					return null;
				}
				if (!xmlReader.Read())
				{
					return null;
				}
				if (xmlReader.NodeType != XmlNodeType.Text)
				{
					return null;
				}
				using (XmlTextReader xmlTextReader = new XmlTextReader(xmlReader.Value, XmlNodeType.Element, null))
				{
					if (!xmlTextReader.Read())
					{
						return null;
					}
					if (xmlTextReader.NodeType != XmlNodeType.Text)
					{
						return null;
					}
					key = xmlTextReader.Value;
					xmlTextReader.Close();
				}
				return new SqlNotification(info, source, type, key);
			}
			return null;
		}
	}

	private class SqlConnectionContainerHashHelper
	{
		private DbConnectionPoolIdentity _identity;

		private string _connectionString;

		private string _queue;

		private SqlConnectionStringBuilder _connectionStringBuilder;

		internal SqlConnectionStringBuilder ConnectionStringBuilder => _connectionStringBuilder;

		internal DbConnectionPoolIdentity Identity => _identity;

		internal string Queue => _queue;

		internal SqlConnectionContainerHashHelper(DbConnectionPoolIdentity identity, string connectionString, string queue, SqlConnectionStringBuilder connectionStringBuilder)
		{
			_identity = identity;
			_connectionString = connectionString;
			_queue = queue;
			_connectionStringBuilder = connectionStringBuilder;
		}

		public override bool Equals(object value)
		{
			SqlConnectionContainerHashHelper sqlConnectionContainerHashHelper = (SqlConnectionContainerHashHelper)value;
			bool flag = false;
			if (sqlConnectionContainerHashHelper == null)
			{
				return false;
			}
			if (this == sqlConnectionContainerHashHelper)
			{
				return true;
			}
			if ((_identity != null && sqlConnectionContainerHashHelper._identity == null) || (_identity == null && sqlConnectionContainerHashHelper._identity != null))
			{
				return false;
			}
			if (_identity == null && sqlConnectionContainerHashHelper._identity == null)
			{
				if (sqlConnectionContainerHashHelper._connectionString == _connectionString && string.Equals(sqlConnectionContainerHashHelper._queue, _queue, StringComparison.OrdinalIgnoreCase))
				{
					return true;
				}
				return false;
			}
			if (sqlConnectionContainerHashHelper._identity.Equals(_identity) && sqlConnectionContainerHashHelper._connectionString == _connectionString && string.Equals(sqlConnectionContainerHashHelper._queue, _queue, StringComparison.OrdinalIgnoreCase))
			{
				return true;
			}
			return false;
		}

		public override int GetHashCode()
		{
			int num = 0;
			if (_identity != null)
			{
				num = _identity.GetHashCode();
			}
			if (_queue != null)
			{
				return _connectionString.GetHashCode() + _queue.GetHashCode() + num;
			}
			return _connectionString.GetHashCode() + num;
		}
	}

	private static SqlDependencyProcessDispatcher s_staticInstance = new SqlDependencyProcessDispatcher(null);

	private Dictionary<SqlConnectionContainerHashHelper, SqlConnectionContainer> _connectionContainers;

	private Dictionary<string, SqlDependencyPerAppDomainDispatcher> _sqlDependencyPerAppDomainDispatchers;

	internal static SqlDependencyProcessDispatcher SingletonProcessDispatcher => s_staticInstance;

	private SqlDependencyProcessDispatcher(object dummyVariable)
	{
		_connectionContainers = new Dictionary<SqlConnectionContainerHashHelper, SqlConnectionContainer>();
		_sqlDependencyPerAppDomainDispatchers = new Dictionary<string, SqlDependencyPerAppDomainDispatcher>();
	}

	public SqlDependencyProcessDispatcher()
	{
	}

	private static SqlConnectionContainerHashHelper GetHashHelper(string connectionString, out SqlConnectionStringBuilder connectionStringBuilder, out DbConnectionPoolIdentity identity, out string user, string queue)
	{
		connectionStringBuilder = new SqlConnectionStringBuilder(connectionString)
		{
			Pooling = false,
			Enlist = false,
			ConnectRetryCount = 0
		};
		if (queue != null)
		{
			connectionStringBuilder.ApplicationName = queue;
		}
		if (connectionStringBuilder.IntegratedSecurity)
		{
			identity = DbConnectionPoolIdentity.GetCurrent();
			user = null;
		}
		else
		{
			identity = null;
			user = connectionStringBuilder.UserID;
		}
		return new SqlConnectionContainerHashHelper(identity, connectionStringBuilder.ConnectionString, queue, connectionStringBuilder);
	}

	public override object InitializeLifetimeService()
	{
		return null;
	}

	private void Invalidate(string server, SqlNotification sqlNotification)
	{
		lock (_sqlDependencyPerAppDomainDispatchers)
		{
			foreach (KeyValuePair<string, SqlDependencyPerAppDomainDispatcher> sqlDependencyPerAppDomainDispatcher in _sqlDependencyPerAppDomainDispatchers)
			{
				SqlDependencyPerAppDomainDispatcher value = sqlDependencyPerAppDomainDispatcher.Value;
				try
				{
					value.InvalidateServer(server, sqlNotification);
				}
				catch (Exception e)
				{
					if (!ADP.IsCatchableExceptionType(e))
					{
						throw;
					}
					ADP.TraceExceptionWithoutRethrow(e);
				}
			}
		}
	}

	internal void QueueAppDomainUnloading(string appDomainKey)
	{
		ThreadPool.QueueUserWorkItem(AppDomainUnloading, appDomainKey);
	}

	private void AppDomainUnloading(object state)
	{
		string text = (string)state;
		lock (_connectionContainers)
		{
			List<SqlConnectionContainerHashHelper> list = new List<SqlConnectionContainerHashHelper>();
			foreach (KeyValuePair<SqlConnectionContainerHashHelper, SqlConnectionContainer> connectionContainer in _connectionContainers)
			{
				SqlConnectionContainer value = connectionContainer.Value;
				if (value.AppDomainUnload(text))
				{
					list.Add(value.HashHelper);
				}
			}
			foreach (SqlConnectionContainerHashHelper item in list)
			{
				_connectionContainers.Remove(item);
			}
		}
		lock (_sqlDependencyPerAppDomainDispatchers)
		{
			_sqlDependencyPerAppDomainDispatchers.Remove(text);
		}
	}

	internal bool StartWithDefault(string connectionString, out string server, out DbConnectionPoolIdentity identity, out string user, out string database, ref string service, string appDomainKey, SqlDependencyPerAppDomainDispatcher dispatcher, out bool errorOccurred, out bool appDomainStart)
	{
		return Start(connectionString, out server, out identity, out user, out database, ref service, appDomainKey, dispatcher, out errorOccurred, out appDomainStart, useDefaults: true);
	}

	internal bool Start(string connectionString, string queue, string appDomainKey, SqlDependencyPerAppDomainDispatcher dispatcher)
	{
		string server;
		DbConnectionPoolIdentity identity;
		bool errorOccurred;
		return Start(connectionString, out server, out identity, out server, out server, ref queue, appDomainKey, dispatcher, out errorOccurred, out errorOccurred, useDefaults: false);
	}

	private bool Start(string connectionString, out string server, out DbConnectionPoolIdentity identity, out string user, out string database, ref string queueService, string appDomainKey, SqlDependencyPerAppDomainDispatcher dispatcher, out bool errorOccurred, out bool appDomainStart, bool useDefaults)
	{
		server = null;
		identity = null;
		user = null;
		database = null;
		errorOccurred = false;
		appDomainStart = false;
		lock (_sqlDependencyPerAppDomainDispatchers)
		{
			if (!_sqlDependencyPerAppDomainDispatchers.ContainsKey(appDomainKey))
			{
				_sqlDependencyPerAppDomainDispatchers[appDomainKey] = dispatcher;
			}
		}
		SqlConnectionStringBuilder connectionStringBuilder;
		SqlConnectionContainerHashHelper hashHelper = GetHashHelper(connectionString, out connectionStringBuilder, out identity, out user, queueService);
		bool result = false;
		SqlConnectionContainer sqlConnectionContainer = null;
		lock (_connectionContainers)
		{
			if (!_connectionContainers.ContainsKey(hashHelper))
			{
				sqlConnectionContainer = new SqlConnectionContainer(hashHelper, appDomainKey, useDefaults);
				_connectionContainers.Add(hashHelper, sqlConnectionContainer);
				result = true;
				appDomainStart = true;
			}
			else
			{
				sqlConnectionContainer = _connectionContainers[hashHelper];
				if (sqlConnectionContainer.InErrorState)
				{
					errorOccurred = true;
				}
				else
				{
					sqlConnectionContainer.IncrementStartCount(appDomainKey, out appDomainStart);
				}
			}
		}
		if (useDefaults && !errorOccurred)
		{
			server = sqlConnectionContainer.Server;
			database = sqlConnectionContainer.Database;
			queueService = sqlConnectionContainer.Queue;
		}
		return result;
	}

	internal bool Stop(string connectionString, out string server, out DbConnectionPoolIdentity identity, out string user, out string database, ref string queueService, string appDomainKey, out bool appDomainStop)
	{
		server = null;
		identity = null;
		user = null;
		database = null;
		appDomainStop = false;
		SqlConnectionStringBuilder connectionStringBuilder;
		SqlConnectionContainerHashHelper hashHelper = GetHashHelper(connectionString, out connectionStringBuilder, out identity, out user, queueService);
		bool result = false;
		lock (_connectionContainers)
		{
			if (_connectionContainers.ContainsKey(hashHelper))
			{
				SqlConnectionContainer sqlConnectionContainer = _connectionContainers[hashHelper];
				server = sqlConnectionContainer.Server;
				database = sqlConnectionContainer.Database;
				queueService = sqlConnectionContainer.Queue;
				if (sqlConnectionContainer.Stop(appDomainKey, out appDomainStop))
				{
					result = true;
					_connectionContainers.Remove(hashHelper);
				}
			}
		}
		return result;
	}
}
internal static class AssemblyRef
{
	internal const string SystemConfiguration = "System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	internal const string System = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string EcmaPublicKey = "b77a5c561934e089";

	public const string FrameworkPublicKeyFull = "00000000000000000400000000000000";

	public const string FrameworkPublicKeyFull2 = "00000000000000000400000000000000";

	public const string MicrosoftPublicKey = "b03f5f7f11d50a3a";

	public const string MicrosoftJScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string MicrosoftVSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string SystemData = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string SystemDesign = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string SystemDrawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string SystemWeb = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string SystemWebExtensions = "System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string SystemWindowsForms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
internal static class Consts
{
	public const string MonoVersion = "5.11.0.0";

	public const string MonoCompany = "Mono development team";

	public const string MonoProduct = "Mono Common Language Infrastructure";

	public const string MonoCopyright = "(c) Various Mono authors";

	public const int MonoCorlibVersion = 1051100001;

	public const string FxVersion = "4.0.0.0";

	public const string FxFileVersion = "4.6.57.0";

	public const string EnvironmentVersion = "4.0.30319.42000";

	public const string VsVersion = "0.0.0.0";

	public const string VsFileVersion = "11.0.0.0";

	private const string PublicKeyToken = "b77a5c561934e089";

	public const string AssemblyI18N = "I18N, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMicrosoft_JScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMono_Http = "Mono.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Posix = "Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Security = "Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Messaging_RabbitMQ = "Mono.Messaging.RabbitMQ, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyCorlib = "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Data = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Design = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing_Design = "System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Messaging = "System.Messaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Security = "System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Web = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Core = "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string WindowsBase_3_0 = "WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
internal sealed class Locale
{
	private Locale()
	{
	}

	public static string GetText(string msg)
	{
		return msg;
	}

	public static string GetText(string fmt, params object[] args)
	{
		return string.Format(fmt, args);
	}
}
internal static class SR
{
	public const string ADP_CollectionIndexString = "An {0} with {1} '{2}' is not contained by this {3}.";

	public const string ADP_CollectionInvalidType = "The {0} only accepts non-null {1} type objects, not {2} objects.";

	public const string ADP_CollectionIsNotParent = "The {0} is already contained by another {1}.";

	public const string ADP_CollectionNullValue = "The {0} only accepts non-null {1} type objects.";

	public const string ADP_CollectionRemoveInvalidObject = "Attempted to remove an {0} that is not contained by this {1}.";

	public const string ADP_CollectionUniqueValue = "The {0}.{1} is required to be unique, '{2}' already exists in the collection.";

	public const string ADP_ConnectionStateMsg_Closed = "The connection's current state is closed.";

	public const string ADP_ConnectionStateMsg_Connecting = "The connection's current state is connecting.";

	public const string ADP_ConnectionStateMsg_Open = "The connection's current state is open.";

	public const string ADP_ConnectionStateMsg_OpenExecuting = "The connection's current state is executing.";

	public const string ADP_ConnectionStateMsg_OpenFetching = "The connection's current state is fetching.";

	public const string ADP_ConnectionStateMsg = "The connection's current state: {0}.";

	public const string ADP_ConnectionStringSyntax = "Format of the initialization string does not conform to specification starting at index {0}.";

	public const string ADP_DataReaderClosed = "Invalid attempt to call {0} when reader is closed.";

	public const string ADP_EmptyString = "Expecting non-empty string for '{0}' parameter.";

	public const string ADP_InvalidEnumerationValue = "The {0} enumeration value, {1}, is invalid.";

	public const string ADP_InvalidKey = "Invalid keyword, contain one or more of 'no characters', 'control characters', 'leading or trailing whitespace' or 'leading semicolons'.";

	public const string ADP_InvalidValue = "The value contains embedded nulls (\\\\u0000).";

	public const string Xml_SimpleTypeNotSupported = "DataSet doesn't support 'union' or 'list' as simpleType.";

	public const string Xml_MissingAttribute = "Invalid {0} syntax: missing required '{1}' attribute.";

	public const string Xml_ValueOutOfRange = "Value '{1}' is invalid for attribute '{0}'.";

	public const string Xml_AttributeValues = "The value of attribute '{0}' should be '{1}' or '{2}'.";

	public const string Xml_RelationParentNameMissing = "Parent table name is missing in relation '{0}'.";

	public const string Xml_RelationChildNameMissing = "Child table name is missing in relation '{0}'.";

	public const string Xml_RelationTableKeyMissing = "Parent table key is missing in relation '{0}'.";

	public const string Xml_RelationChildKeyMissing = "Child table key is missing in relation '{0}'.";

	public const string Xml_UndefinedDatatype = "Undefined data type: '{0}'.";

	public const string Xml_DatatypeNotDefined = "Data type not defined.";

	public const string Xml_InvalidField = "Invalid XPath selection inside field node. Cannot find: {0}.";

	public const string Xml_InvalidSelector = "Invalid XPath selection inside selector node: {0}.";

	public const string Xml_InvalidKey = "Invalid 'Key' node inside constraint named: {0}.";

	public const string Xml_DuplicateConstraint = "The constraint name {0} is already used in the schema.";

	public const string Xml_CannotConvert = " Cannot convert '{0}' to type '{1}'.";

	public const string Xml_MissingRefer = "Missing '{0}' part in '{1}' constraint named '{2}'.";

	public const string Xml_MismatchKeyLength = "Invalid Relation definition: different length keys.";

	public const string Xml_CircularComplexType = "DataSet doesn't allow the circular reference in the ComplexType named '{0}'.";

	public const string Xml_CannotInstantiateAbstract = "DataSet cannot instantiate an abstract ComplexType for the node {0}.";

	public const string Xml_MultipleTargetConverterError = "An error occurred with the multiple target converter while writing an Xml Schema.  See the inner exception for details.";

	public const string Xml_MultipleTargetConverterEmpty = "An error occurred with the multiple target converter while writing an Xml Schema.  A null or empty string was returned.";

	public const string Xml_MergeDuplicateDeclaration = "Duplicated declaration '{0}'.";

	public const string Xml_MissingTable = "Cannot load diffGram. Table '{0}' is missing in the destination dataset.";

	public const string Xml_MissingSQL = "Cannot load diffGram. The 'sql' node is missing.";

	public const string Xml_ColumnConflict = "Column name '{0}' is defined for different mapping types.";

	public const string Xml_InvalidPrefix = "Prefix '{0}' is not valid, because it contains special characters.";

	public const string Xml_NestedCircular = "Circular reference in self-nested table '{0}'.";

	public const string Xml_FoundEntity = "DataSet cannot expand entities. Use XmlValidatingReader and set the EntityHandling property accordingly.";

	public const string Xml_PolymorphismNotSupported = "Type '{0}' does not implement IXmlSerializable interface therefore can not proceed with serialization.";

	public const string Xml_CanNotDeserializeObjectType = "Unable to proceed with deserialization. Data does not implement IXMLSerializable, therefore polymorphism is not supported.";

	public const string Xml_DataTableInferenceNotSupported = "DataTable does not support schema inference from Xml.";

	public const string Xml_MultipleParentRows = "Cannot proceed with serializing DataTable '{0}'. It contains a DataRow which has multiple parent rows on the same Foreign Key.";

	public const string Xml_IsDataSetAttributeMissingInSchema = "IsDataSet attribute is missing in input Schema.";

	public const string Xml_TooManyIsDataSetAtributeInSchema = "Cannot determine the DataSet Element. IsDataSet attribute exist more than once.";

	public const string Xml_DynamicWithoutXmlSerializable = "DataSet will not serialize types that implement IDynamicMetaObjectProvider but do not also implement IXmlSerializable.";

	public const string Expr_NYI = "The feature not implemented. {0}.";

	public const string Expr_MissingOperand = "Syntax error: Missing operand after '{0}' operator.";

	public const string Expr_TypeMismatch = "Type mismatch in expression '{0}'.";

	public const string Expr_ExpressionTooComplex = "Expression is too complex.";

	public const string Expr_UnboundName = "Cannot find column [{0}].";

	public const string Expr_InvalidString = "The expression contains an invalid string constant: {0}.";

	public const string Expr_UndefinedFunction = "The expression contains undefined function call {0}().";

	public const string Expr_Syntax = "Syntax error in the expression.";

	public const string Expr_FunctionArgumentCount = "Invalid number of arguments: function {0}().";

	public const string Expr_MissingRightParen = "The expression is missing the closing parenthesis.";

	public const string Expr_UnknownToken = "Cannot interpret token '{0}' at position {1}.";

	public const string Expr_UnknownToken1 = "Expected {0}, but actual token at the position {2} is {1}.";

	public const string Expr_DatatypeConvertion = "Cannot convert from {0} to {1}.";

	public const string Expr_DatavalueConvertion = "Cannot convert value '{0}' to Type: {1}.";

	public const string Expr_InvalidName = "Invalid column name [{0}].";

	public const string Expr_InvalidDate = "The expression contains invalid date constant '{0}'.";

	public const string Expr_NonConstantArgument = "Only constant expressions are allowed in the expression list for the IN operator.";

	public const string Expr_InvalidPattern = "Error in Like operator: the string pattern '{0}' is invalid.";

	public const string Expr_InWithoutParentheses = "Syntax error: The items following the IN keyword must be separated by commas and be enclosed in parentheses.";

	public const string Expr_ArgumentType = "Type mismatch in function argument: {0}(), argument {1}, expected {2}.";

	public const string Expr_ArgumentTypeInteger = "Type mismatch in function argument: {0}(), argument {1}, expected one of the Integer types.";

	public const string Expr_TypeMismatchInBinop = "Cannot perform '{0}' operation on {1} and {2}.";

	public const string Expr_AmbiguousBinop = "Operator '{0}' is ambiguous on operands of type '{1}' and '{2}'. Cannot mix signed and unsigned types. Please use explicit Convert() function.";

	public const string Expr_InWithoutList = "Syntax error: The IN keyword must be followed by a non-empty list of expressions separated by commas, and also must be enclosed in parentheses.";

	public const string Expr_UnsupportedOperator = "The expression contains unsupported operator '{0}'.";

	public const string Expr_InvalidNameBracketing = "The expression contains invalid name: '{0}'.";

	public const string Expr_MissingOperandBefore = "Syntax error: Missing operand before '{0}' operator.";

	public const string Expr_TooManyRightParentheses = "The expression has too many closing parentheses.";

	public const string Expr_UnresolvedRelation = "The table [{0}] involved in more than one relation. You must explicitly mention a relation name in the expression '{1}'.";

	public const string Expr_AggregateArgument = "Syntax error in aggregate argument: Expecting a single column argument with possible 'Child' qualifier.";

	public const string Expr_AggregateUnbound = "Unbound reference in the aggregate expression '{0}'.";

	public const string Expr_EvalNoContext = "Cannot evaluate non-constant expression without current row.";

	public const string Expr_ExpressionUnbound = "Unbound reference in the expression '{0}'.";

	public const string Expr_ComputeNotAggregate = "Cannot evaluate. Expression '{0}' is not an aggregate.";

	public const string Expr_FilterConvertion = "Filter expression '{0}' does not evaluate to a Boolean term.";

	public const string Expr_InvalidType = "Invalid type name '{0}'.";

	public const string Expr_LookupArgument = "Syntax error in Lookup expression: Expecting keyword 'Parent' followed by a single column argument with possible relation qualifier: Parent[(<relation_name>)].<column_name>.";

	public const string Expr_InvokeArgument = "Need a row or a table to Invoke DataFilter.";

	public const string Expr_ArgumentOutofRange = "{0}() argument is out of range.";

	public const string Expr_IsSyntax = "Syntax error: Invalid usage of 'Is' operator. Correct syntax: <expression> Is [Not] Null.";

	public const string Expr_Overflow = "Value is either too large or too small for Type '{0}'.";

	public const string Expr_BindFailure = "Cannot find the parent relation '{0}'.";

	public const string Expr_InvalidHoursArgument = "'hours' argument is out of range. Value must be between -14 and +14.";

	public const string Expr_InvalidMinutesArgument = "'minutes' argument is out of range. Value must be between -59 and +59.";

	public const string Expr_InvalidTimeZoneRange = "Provided range for time one exceeds total of 14 hours.";

	public const string Expr_MismatchKindandTimeSpan = "Kind property of provided DateTime argument, does not match 'hours' and 'minutes' arguments.";

	public const string Expr_UnsupportedType = "A DataColumn of type '{0}' does not support expression.";

	public const string Data_EnforceConstraints = "Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.";

	public const string Data_CannotModifyCollection = "Collection itself is not modifiable.";

	public const string Data_CaseInsensitiveNameConflict = "The given name '{0}' matches at least two names in the collection object with different cases, but does not match either of them with the same case.";

	public const string Data_NamespaceNameConflict = "The given name '{0}' matches at least two names in the collection object with different namespaces.";

	public const string Data_InvalidOffsetLength = "Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.";

	public const string Data_ArgumentOutOfRange = "'{0}' argument is out of range.";

	public const string Data_ArgumentNull = "'{0}' argument cannot be null.";

	public const string Data_ArgumentContainsNull = "'{0}' argument contains null value.";

	public const string DataColumns_OutOfRange = "Cannot find column {0}.";

	public const string DataColumns_Add1 = "Column '{0}' already belongs to this DataTable.";

	public const string DataColumns_Add2 = "Column '{0}' already belongs to another DataTable.";

	public const string DataColumns_Add3 = "Cannot have more than one SimpleContent columns in a DataTable.";

	public const string DataColumns_Add4 = "Cannot add a SimpleContent column to a table containing element columns or nested relations.";

	public const string DataColumns_AddDuplicate = "A column named '{0}' already belongs to this DataTable.";

	public const string DataColumns_AddDuplicate2 = "Cannot add a column named '{0}': a nested table with the same name already belongs to this DataTable.";

	public const string DataColumns_AddDuplicate3 = "A column named '{0}' already belongs to this DataTable: cannot set a nested table name to the same name.";

	public const string DataColumns_Remove = "Cannot remove a column that doesn't belong to this table.";

	public const string DataColumns_RemovePrimaryKey = "Cannot remove this column, because it's part of the primary key.";

	public const string DataColumns_RemoveChildKey = "Cannot remove this column, because it is part of the parent key for relationship {0}.";

	public const string DataColumns_RemoveConstraint = "Cannot remove this column, because it is a part of the constraint {0} on the table {1}.";

	public const string DataColumn_AutoIncrementAndExpression = "Cannot set AutoIncrement property for a computed column.";

	public const string DataColumn_AutoIncrementAndDefaultValue = "Cannot set AutoIncrement property for a column with DefaultValue set.";

	public const string DataColumn_DefaultValueAndAutoIncrement = "Cannot set a DefaultValue on an AutoIncrement column.";

	public const string DataColumn_AutoIncrementSeed = "AutoIncrementStep must be a non-zero value.";

	public const string DataColumn_NameRequired = "ColumnName is required when it is part of a DataTable.";

	public const string DataColumn_ChangeDataType = "Cannot change DataType of a column once it has data.";

	public const string DataColumn_NullDataType = "Column requires a valid DataType.";

	public const string DataColumn_DefaultValueDataType = "The DefaultValue for column {0} is of type {1} and cannot be converted to {2}.";

	public const string DataColumn_DefaultValueDataType1 = "The DefaultValue for the column is of type {0} and cannot be converted to {1}.";

	public const string DataColumn_DefaultValueColumnDataType = "The DefaultValue for column {0} is of type {1}, but the column is of type {2}.";

	public const string DataColumn_ReadOnlyAndExpression = "Cannot change ReadOnly property for the expression column.";

	public const string DataColumn_UniqueAndExpression = "Cannot change Unique property for the expression column.";

	public const string DataColumn_ExpressionAndUnique = "Cannot create an expression on a column that has AutoIncrement or Unique.";

	public const string DataColumn_ExpressionAndReadOnly = "Cannot set expression because column cannot be made ReadOnly.";

	public const string DataColumn_ExpressionAndConstraint = "Cannot set Expression property on column {0}, because it is a part of a constraint.";

	public const string DataColumn_ExpressionInConstraint = "Cannot create a constraint based on Expression column {0}.";

	public const string DataColumn_ExpressionCircular = "Cannot set Expression property due to circular reference in the expression.";

	public const string DataColumn_NullKeyValues = "Column '{0}' has null values in it.";

	public const string DataColumn_NullValues = "Column '{0}' does not allow nulls.";

	public const string DataColumn_ReadOnly = "Column '{0}' is read only.";

	public const string DataColumn_NonUniqueValues = "Column '{0}' contains non-unique values.";

	public const string DataColumn_NotInTheTable = "Column '{0}' does not belong to table {1}.";

	public const string DataColumn_NotInAnyTable = "Column must belong to a table.";

	public const string DataColumn_SetFailed = "Couldn't store <{0}> in {1} Column.  Expected type is {2}.";

	public const string DataColumn_CannotSetToNull = "Cannot set Column '{0}' to be null. Please use DBNull instead.";

	public const string DataColumn_LongerThanMaxLength = "Cannot set column '{0}'. The value violates the MaxLength limit of this column.";

	public const string DataColumn_HasToBeStringType = "MaxLength applies to string data type only. You cannot set Column '{0}' property MaxLength to be non-negative number.";

	public const string DataColumn_CannotSetMaxLength = "Cannot set Column '{0}' property MaxLength to '{1}'. There is at least one string in the table longer than the new limit.";

	public const string DataColumn_CannotSetMaxLength2 = "Cannot set Column '{0}' property MaxLength. The Column is SimpleContent.";

	public const string DataColumn_CannotSimpleContentType = "Cannot set Column '{0}' property DataType to {1}. The Column is SimpleContent.";

	public const string DataColumn_CannotSimpleContent = "Cannot set Column '{0}' property MappingType to SimpleContent. The Column DataType is {1}.";

	public const string DataColumn_ExceedMaxLength = "Column '{0}' exceeds the MaxLength limit.";

	public const string DataColumn_NotAllowDBNull = "Column '{0}' does not allow DBNull.Value.";

	public const string DataColumn_CannotChangeNamespace = "Cannot change the Column '{0}' property Namespace. The Column is SimpleContent.";

	public const string DataColumn_AutoIncrementCannotSetIfHasData = "Cannot change AutoIncrement of a DataColumn with type '{0}' once it has data.";

	public const string DataColumn_NotInTheUnderlyingTable = "Column '{0}' does not belong to underlying table '{1}'.";

	public const string DataColumn_InvalidDataColumnMapping = "DataColumn with type '{0}' is a complexType. Can not serialize value of a complex type as Attribute";

	public const string DataColumn_CannotSetDateTimeModeForNonDateTimeColumns = "The DateTimeMode can be set only on DataColumns of type DateTime.";

	public const string DataColumn_DateTimeMode = "Cannot change DateTimeMode from '{0}' to '{1}' once the table has data.";

	public const string DataColumn_INullableUDTwithoutStaticNull = "Type '{0}' does not contain static Null property or field.";

	public const string DataColumn_UDTImplementsIChangeTrackingButnotIRevertible = "Type '{0}' does not implement IRevertibleChangeTracking; therefore can not proceed with RejectChanges().";

	public const string DataColumn_SetAddedAndModifiedCalledOnNonUnchanged = "SetAdded and SetModified can only be called on DataRows with Unchanged DataRowState.";

	public const string DataColumn_OrdinalExceedMaximun = "Ordinal '{0}' exceeds the maximum number.";

	public const string DataColumn_NullableTypesNotSupported = "DataSet does not support System.Nullable<>.";

	public const string DataConstraint_NoName = "Cannot change the name of a constraint to empty string when it is in the ConstraintCollection.";

	public const string DataConstraint_Violation = "Cannot enforce constraints on constraint {0}.";

	public const string DataConstraint_ViolationValue = "Column '{0}' is constrained to be unique.  Value '{1}' is already present.";

	public const string DataConstraint_NotInTheTable = "Constraint '{0}' does not belong to this DataTable.";

	public const string DataConstraint_OutOfRange = "Cannot find constraint {0}.";

	public const string DataConstraint_Duplicate = "Constraint matches constraint named {0} already in collection.";

	public const string DataConstraint_DuplicateName = "A Constraint named '{0}' already belongs to this DataTable.";

	public const string DataConstraint_UniqueViolation = "These columns don't currently have unique values.";

	public const string DataConstraint_ForeignTable = "These columns don't point to this table.";

	public const string DataConstraint_ParentValues = "This constraint cannot be enabled as not all values have corresponding parent values.";

	public const string DataConstraint_AddFailed = "This constraint cannot be added since ForeignKey doesn't belong to table {0}.";

	public const string DataConstraint_RemoveFailed = "Cannot remove a constraint that doesn't belong to this table.";

	public const string DataConstraint_NeededForForeignKeyConstraint = "Cannot remove unique constraint '{0}'. Remove foreign key constraint '{1}' first.";

	public const string DataConstraint_CascadeDelete = "Cannot delete this row because constraints are enforced on relation {0}, and deleting this row will strand child rows.";

	public const string DataConstraint_CascadeUpdate = "Cannot make this change because constraints are enforced on relation {0}, and changing this value will strand child rows.";

	public const string DataConstraint_ClearParentTable = "Cannot clear table {0} because ForeignKeyConstraint {1} enforces constraints and there are child rows in {2}.";

	public const string DataConstraint_ForeignKeyViolation = "ForeignKeyConstraint {0} requires the child key values ({1}) to exist in the parent table.";

	public const string DataConstraint_BadObjectPropertyAccess = "Property not accessible because '{0}'.";

	public const string DataConstraint_RemoveParentRow = "Cannot remove this row because it has child rows, and constraints on relation {0} are enforced.";

	public const string DataConstraint_AddPrimaryKeyConstraint = "Cannot add primary key constraint since primary key is already set for the table.";

	public const string DataConstraint_CantAddConstraintToMultipleNestedTable = "Cannot add constraint to DataTable '{0}' which is a child table in two nested relations.";

	public const string DataKey_TableMismatch = "Cannot create a Key from Columns that belong to different tables.";

	public const string DataKey_NoColumns = "Cannot have 0 columns.";

	public const string DataKey_TooManyColumns = "Cannot have more than {0} columns.";

	public const string DataKey_DuplicateColumns = "Cannot create a Key when the same column is listed more than once: '{0}'";

	public const string DataKey_RemovePrimaryKey = "Cannot remove unique constraint since it's the primary key of a table.";

	public const string DataKey_RemovePrimaryKey1 = "Cannot remove unique constraint since it's the primary key of table {0}.";

	public const string DataRelation_ColumnsTypeMismatch = "Parent Columns and Child Columns don't have type-matching columns.";

	public const string DataRelation_KeyColumnsIdentical = "ParentKey and ChildKey are identical.";

	public const string DataRelation_KeyLengthMismatch = "ParentColumns and ChildColumns should be the same length.";

	public const string DataRelation_KeyZeroLength = "ParentColumns and ChildColumns must not be zero length.";

	public const string DataRelation_ForeignRow = "The row doesn't belong to the same DataSet as this relation.";

	public const string DataRelation_NoName = "RelationName is required when it is part of a DataSet.";

	public const string DataRelation_ForeignTable = "GetChildRows requires a row whose Table is {0}, but the specified row's Table is {1}.";

	public const string DataRelation_ForeignDataSet = "This relation should connect two tables in this DataSet to be added to this DataSet.";

	public const string DataRelation_GetParentRowTableMismatch = "GetParentRow requires a row whose Table is {0}, but the specified row's Table is {1}.";

	public const string DataRelation_SetParentRowTableMismatch = "SetParentRow requires a child row whose Table is {0}, but the specified row's Table is {1}.";

	public const string DataRelation_DataSetMismatch = "Cannot have a relationship between tables in different DataSets.";

	public const string DataRelation_TablesInDifferentSets = "Cannot create a relation between tables in different DataSets.";

	public const string DataRelation_AlreadyExists = "A relation already exists for these child columns.";

	public const string DataRelation_DoesNotExist = "This relation doesn't belong to this relation collection.";

	public const string DataRelation_AlreadyInOtherDataSet = "This relation already belongs to another DataSet.";

	public const string DataRelation_AlreadyInTheDataSet = "This relation already belongs to this DataSet.";

	public const string DataRelation_DuplicateName = "A Relation named '{0}' already belongs to this DataSet.";

	public const string DataRelation_NotInTheDataSet = "Relation {0} does not belong to this DataSet.";

	public const string DataRelation_OutOfRange = "Cannot find relation {0}.";

	public const string DataRelation_TableNull = "Cannot create a collection on a null table.";

	public const string DataRelation_TableWasRemoved = "The table this collection displays relations for has been removed from its DataSet.";

	public const string DataRelation_ChildTableMismatch = "Cannot add a relation to this table's ParentRelation collection where this table isn't the child table.";

	public const string DataRelation_ParentTableMismatch = "Cannot add a relation to this table's ChildRelation collection where this table isn't the parent table.";

	public const string DataRelation_RelationNestedReadOnly = "Cannot set the 'Nested' property to false for this relation.";

	public const string DataRelation_TableCantBeNestedInTwoTables = "The same table '{0}' cannot be the child table in two nested relations.";

	public const string DataRelation_LoopInNestedRelations = "The table ({0}) cannot be the child table to itself in nested relations.";

	public const string DataRelation_CaseLocaleMismatch = "Cannot add a DataRelation or Constraint that has different Locale or CaseSensitive settings between its parent and child tables.";

	public const string DataRelation_ParentOrChildColumnsDoNotHaveDataSet = "Cannot create a DataRelation if Parent or Child Columns are not in a DataSet.";

	public const string DataRelation_InValidNestedRelation = "Nested table '{0}' which inherits its namespace cannot have multiple parent tables in different namespaces.";

	public const string DataRelation_InValidNamespaceInNestedRelation = "Nested table '{0}' with empty namespace cannot have multiple parent tables in different namespaces.";

	public const string DataRow_NotInTheDataSet = "The row doesn't belong to the same DataSet as this relation.";

	public const string DataRow_NotInTheTable = "Cannot perform this operation on a row not in the table.";

	public const string DataRow_ParentRowNotInTheDataSet = "This relation and child row don't belong to same DataSet.";

	public const string DataRow_EditInRowChanging = "Cannot change a proposed value in the RowChanging event.";

	public const string DataRow_EndEditInRowChanging = "Cannot call EndEdit() inside an OnRowChanging event.";

	public const string DataRow_BeginEditInRowChanging = "Cannot call BeginEdit() inside the RowChanging event.";

	public const string DataRow_CancelEditInRowChanging = "Cannot call CancelEdit() inside an OnRowChanging event.  Throw an exception to cancel this update.";

	public const string DataRow_DeleteInRowDeleting = "Cannot call Delete inside an OnRowDeleting event.  Throw an exception to cancel this delete.";

	public const string DataRow_ValuesArrayLength = "Input array is longer than the number of columns in this table.";

	public const string DataRow_NoCurrentData = "There is no Current data to access.";

	public const string DataRow_NoOriginalData = "There is no Original data to access.";

	public const string DataRow_NoProposedData = "There is no Proposed data to access.";

	public const string DataRow_RemovedFromTheTable = "This row has been removed from a table and does not have any data.  BeginEdit() will allow creation of new data in this row.";

	public const string DataRow_DeletedRowInaccessible = "Deleted row information cannot be accessed through the row.";

	public const string DataRow_InvalidVersion = "Version must be Original, Current, or Proposed.";

	public const string DataRow_OutOfRange = "There is no row at position {0}.";

	public const string DataRow_RowInsertOutOfRange = "The row insert position {0} is invalid.";

	public const string DataRow_RowInsertMissing = "Values are missing in the rowOrder sequence for table '{0}'.";

	public const string DataRow_RowOutOfRange = "The given DataRow is not in the current DataRowCollection.";

	public const string DataRow_AlreadyInOtherCollection = "This row already belongs to another table.";

	public const string DataRow_AlreadyInTheCollection = "This row already belongs to this table.";

	public const string DataRow_AlreadyDeleted = "Cannot delete this row since it's already deleted.";

	public const string DataRow_Empty = "This row is empty.";

	public const string DataRow_AlreadyRemoved = "Cannot remove a row that's already been removed.";

	public const string DataRow_MultipleParents = "A child row has multiple parents.";

	public const string DataRow_InvalidRowBitPattern = "Unrecognized row state bit pattern.";

	public const string DataSet_SetNameToEmpty = "Cannot change the name of the DataSet to an empty string.";

	public const string DataSet_SetDataSetNameConflicting = "The name '{0}' is invalid. A DataSet cannot have the same name of the DataTable.";

	public const string DataSet_UnsupportedSchema = "The schema namespace is invalid. Please use this one instead: {0}.";

	public const string DataSet_CannotChangeCaseLocale = "Cannot change CaseSensitive or Locale property. This change would lead to at least one DataRelation or Constraint to have different Locale or CaseSensitive settings between its related tables.";

	public const string DataSet_CannotChangeSchemaSerializationMode = "SchemaSerializationMode property can be set only if it is overridden by derived DataSet.";

	public const string DataTable_ForeignPrimaryKey = "PrimaryKey columns do not belong to this table.";

	public const string DataTable_CannotAddToSimpleContent = "Cannot add a nested relation or an element column to a table containing a SimpleContent column.";

	public const string DataTable_NoName = "TableName is required when it is part of a DataSet.";

	public const string DataTable_MultipleSimpleContentColumns = "DataTable already has a simple content column.";

	public const string DataTable_MissingPrimaryKey = "Table doesn't have a primary key.";

	public const string DataTable_InvalidSortString = " {0} isn't a valid Sort string entry.";

	public const string DataTable_CanNotSerializeDataTableHierarchy = "Cannot serialize the DataTable. A DataTable being used in one or more DataColumn expressions is not a descendant of current DataTable.";

	public const string DataTable_CanNotRemoteDataTable = "This DataTable can only be remoted as part of DataSet. One or more Expression Columns has reference to other DataTable(s).";

	public const string DataTable_CanNotSetRemotingFormat = "Cannot have different remoting format property value for DataSet and DataTable.";

	public const string DataTable_CanNotSerializeDataTableWithEmptyName = "Cannot serialize the DataTable. DataTable name is not set.";

	public const string DataTable_DuplicateName = "A DataTable named '{0}' already belongs to this DataSet.";

	public const string DataTable_DuplicateName2 = "A DataTable named '{0}' with the same Namespace '{1}' already belongs to this DataSet.";

	public const string DataTable_SelfnestedDatasetConflictingName = "The table ({0}) cannot be the child table to itself in a nested relation: the DataSet name conflicts with the table name.";

	public const string DataTable_DatasetConflictingName = "The name '{0}' is invalid. A DataTable cannot have the same name of the DataSet.";

	public const string DataTable_AlreadyInOtherDataSet = "DataTable already belongs to another DataSet.";

	public const string DataTable_AlreadyInTheDataSet = "DataTable already belongs to this DataSet.";

	public const string DataTable_NotInTheDataSet = "Table {0} does not belong to this DataSet.";

	public const string DataTable_OutOfRange = "Cannot find table {0}.";

	public const string DataTable_InRelation = "Cannot remove a table that has existing relations.  Remove relations first.";

	public const string DataTable_InConstraint = "Cannot remove table {0}, because it referenced in ForeignKeyConstraint {1}.  Remove the constraint first.";

	public const string DataTable_TableNotFound = "DataTable '{0}' does not match to any DataTable in source.";

	public const string DataMerge_MissingDefinition = "Target DataSet missing definition for {0}.";

	public const string DataMerge_MissingConstraint = "Target DataSet missing {0} {1}.";

	public const string DataMerge_DataTypeMismatch = "<target>.{0} and <source>.{0} have conflicting properties: DataType property mismatch.";

	public const string DataMerge_PrimaryKeyMismatch = "<target>.PrimaryKey and <source>.PrimaryKey have different Length.";

	public const string DataMerge_PrimaryKeyColumnsMismatch = "Mismatch columns in the PrimaryKey : <target>.{0} versus <source>.{1}.";

	public const string DataMerge_ReltionKeyColumnsMismatch = "Relation {0} cannot be merged, because keys have mismatch columns.";

	public const string DataMerge_MissingColumnDefinition = "Target table {0} missing definition for column {1}.";

	public const string DataIndex_RecordStateRange = "The RowStates parameter must be set to a valid combination of values from the DataViewRowState enumeration.";

	public const string DataIndex_FindWithoutSortOrder = "Find finds a row based on a Sort order, and no Sort order is specified.";

	public const string DataIndex_KeyLength = "Expecting {0} value(s) for the key being indexed, but received {1} value(s).";

	public const string DataStorage_AggregateException = "Invalid usage of aggregate function {0}() and Type: {1}.";

	public const string DataStorage_InvalidStorageType = "Invalid storage type: {0}.";

	public const string DataStorage_ProblematicChars = "The DataSet Xml persistency does not support the value '{0}' as Char value, please use Byte storage instead.";

	public const string DataStorage_SetInvalidDataType = "Type of value has a mismatch with column type";

	public const string DataStorage_IComparableNotDefined = " Type '{0}' does not implement IComparable interface. Comparison cannot be done.";

	public const string DataView_SetFailed = "Cannot set {0}.";

	public const string DataView_SetDataSetFailed = "Cannot change DataSet on a DataViewManager that's already the default view for a DataSet.";

	public const string DataView_SetRowStateFilter = "RowStateFilter cannot show ModifiedOriginals and ModifiedCurrents at the same time.";

	public const string DataView_SetTable = "Cannot change Table property on a DefaultView or a DataView coming from a DataViewManager.";

	public const string DataView_CanNotSetDataSet = "Cannot change DataSet property once it is set.";

	public const string DataView_CanNotUseDataViewManager = "DataSet must be set prior to using DataViewManager.";

	public const string DataView_CanNotSetTable = "Cannot change Table property once it is set.";

	public const string DataView_CanNotUse = "DataTable must be set prior to using DataView.";

	public const string DataView_CanNotBindTable = "Cannot bind to DataTable with no name.";

	public const string DataView_SetIListObject = "Cannot set an object into this list.";

	public const string DataView_AddNewNotAllowNull = "Cannot call AddNew on a DataView where AllowNew is false.";

	public const string DataView_NotOpen = "DataView is not open.";

	public const string DataView_CreateChildView = "The relation is not parented to the table to which this DataView points.";

	public const string DataView_CanNotDelete = "Cannot delete on a DataSource where AllowDelete is false.";

	public const string DataView_CanNotEdit = "Cannot edit on a DataSource where AllowEdit is false.";

	public const string DataView_GetElementIndex = "Index {0} is either negative or above rows count.";

	public const string DataView_AddExternalObject = "Cannot add external objects to this list.";

	public const string DataView_CanNotClear = "Cannot clear this list.";

	public const string DataView_InsertExternalObject = "Cannot insert external objects to this list.";

	public const string DataView_RemoveExternalObject = "Cannot remove objects not in the list.";

	public const string DataROWView_PropertyNotFound = "{0} is neither a DataColumn nor a DataRelation for table {1}.";

	public const string Range_Argument = "Min ({0}) must be less than or equal to max ({1}) in a Range object.";

	public const string Range_NullRange = "This is a null range.";

	public const string RecordManager_MinimumCapacity = "MinimumCapacity must be non-negative.";

	public const string SqlConvert_ConvertFailed = " Cannot convert object of type '{0}' to object of type '{1}'.";

	public const string DataSet_DefaultDataException = "Data Exception.";

	public const string DataSet_DefaultConstraintException = "Constraint Exception.";

	public const string DataSet_DefaultDeletedRowInaccessibleException = "Deleted rows inaccessible.";

	public const string DataSet_DefaultDuplicateNameException = "Duplicate name not allowed.";

	public const string DataSet_DefaultInRowChangingEventException = "Operation not supported in the RowChanging event.";

	public const string DataSet_DefaultInvalidConstraintException = "Invalid constraint.";

	public const string DataSet_DefaultMissingPrimaryKeyException = "Missing primary key.";

	public const string DataSet_DefaultNoNullAllowedException = "Null not allowed.";

	public const string DataSet_DefaultReadOnlyException = "Column is marked read only.";

	public const string DataSet_DefaultRowNotInTableException = "Row not found in table.";

	public const string DataSet_DefaultVersionNotFoundException = "Version not found.";

	public const string Load_ReadOnlyDataModified = "ReadOnly Data is Modified.";

	public const string DataTableReader_InvalidDataTableReader = "DataTableReader is invalid for current DataTable '{0}'.";

	public const string DataTableReader_SchemaInvalidDataTableReader = "Schema of current DataTable '{0}' in DataTableReader has changed, DataTableReader is invalid.";

	public const string DataTableReader_CannotCreateDataReaderOnEmptyDataSet = "DataTableReader Cannot be created. There is no DataTable in DataSet.";

	public const string DataTableReader_DataTableReaderArgumentIsEmpty = "Cannot create DataTableReader. Argument is Empty.";

	public const string DataTableReader_ArgumentContainsNullValue = "Cannot create DataTableReader. Arguments contain null value.";

	public const string DataTableReader_InvalidRowInDataTableReader = "Current DataRow is either in Deleted or Detached state.";

	public const string DataTableReader_DataTableCleared = "Current DataTable '{0}' is empty. There is no DataRow in DataTable.";

	public const string RbTree_InvalidState = "DataTable internal index is corrupted: '{0}'.";

	public const string RbTree_EnumerationBroken = "Collection was modified; enumeration operation might not execute.";

	public const string NamedSimpleType_InvalidDuplicateNamedSimpleTypeDelaration = "Simple type '{0}' has already be declared with different '{1}'.";

	public const string DataDom_Foliation = "Invalid foliation.";

	public const string DataDom_TableNameChange = "Cannot change the table name once the associated DataSet is mapped to a loaded XML document.";

	public const string DataDom_TableNamespaceChange = "Cannot change the table namespace once the associated DataSet is mapped to a loaded XML document.";

	public const string DataDom_ColumnNameChange = "Cannot change the column name once the associated DataSet is mapped to a loaded XML document.";

	public const string DataDom_ColumnNamespaceChange = "Cannot change the column namespace once the associated DataSet is mapped to a loaded XML document.";

	public const string DataDom_ColumnMappingChange = "Cannot change the ColumnMapping property once the associated DataSet is mapped to a loaded XML document.";

	public const string DataDom_TableColumnsChange = "Cannot add or remove columns from the table once the DataSet is mapped to a loaded XML document.";

	public const string DataDom_DataSetTablesChange = "Cannot add or remove tables from the DataSet once the DataSet is mapped to a loaded XML document.";

	public const string DataDom_DataSetNestedRelationsChange = "Cannot add, remove, or change Nested relations from the DataSet once the DataSet is mapped to a loaded XML document.";

	public const string DataDom_DataSetNull = "The DataSet parameter is invalid. It cannot be null.";

	public const string DataDom_DataSetNameChange = "Cannot change the DataSet name once the DataSet is mapped to a loaded XML document.";

	public const string DataDom_CloneNode = "This type of node cannot be cloned: {0}.";

	public const string DataDom_MultipleLoad = "Cannot load XmlDataDocument if it already contains data. Please use a new XmlDataDocument.";

	public const string DataDom_MultipleDataSet = "DataSet can be associated with at most one XmlDataDocument. Cannot associate the DataSet with the current XmlDataDocument because the DataSet is already associated with another XmlDataDocument.";

	public const string DataDom_NotSupport_GetElementById = "GetElementById() is not supported on DataDocument.";

	public const string DataDom_NotSupport_EntRef = "Cannot create entity references on DataDocument.";

	public const string DataDom_NotSupport_Clear = "Clear function on DateSet and DataTable is not supported on XmlDataDocument.";

	public const string ADP_EmptyArray = "Expecting non-empty array for '{0}' parameter.";

	public const string SQL_WrongType = "Expecting argument of type {1}, but received type {0}.";

	public const string ADP_InvalidConnectionOptionValue = "Invalid value for key '{0}'.";

	public const string ADP_KeywordNotSupported = "Keyword not supported: '{0}'.";

	public const string ADP_InternalProviderError = "Internal .Net Framework Data Provider error {0}.";

	public const string ADP_NoQuoteChange = "The QuotePrefix and QuoteSuffix properties cannot be changed once an Insert, Update, or Delete command has been generated.";

	public const string ADP_MissingSourceCommand = "The DataAdapter.SelectCommand property needs to be initialized.";

	public const string ADP_MissingSourceCommandConnection = "The DataAdapter.SelectCommand.Connection property needs to be initialized;";

	public const string ADP_InvalidMultipartName = "{0} \"{1}\".";

	public const string ADP_InvalidMultipartNameQuoteUsage = "{0} \"{1}\", incorrect usage of quotes.";

	public const string ADP_InvalidMultipartNameToManyParts = "{0} \"{1}\", the current limit of \"{2}\" is insufficient.";

	public const string ADP_ColumnSchemaExpression = "The column mapping from SourceColumn '{0}' failed because the DataColumn '{1}' is a computed column.";

	public const string ADP_ColumnSchemaMismatch = "Inconvertible type mismatch between SourceColumn '{0}' of {1} and the DataColumn '{2}' of {3}.";

	public const string ADP_ColumnSchemaMissing1 = "Missing the DataColumn '{0}' for the SourceColumn '{2}'.";

	public const string ADP_ColumnSchemaMissing2 = "Missing the DataColumn '{0}' in the DataTable '{1}' for the SourceColumn '{2}'.";

	public const string ADP_InvalidSourceColumn = "SourceColumn is required to be a non-empty string.";

	public const string ADP_MissingColumnMapping = "Missing SourceColumn mapping for '{0}'.";

	public const string ADP_NotSupportedEnumerationValue = "The {0} enumeration value, {1}, is not supported by the {2} method.";

	public const string ADP_MissingTableSchema = "Missing the '{0}' DataTable for the '{1}' SourceTable.";

	public const string ADP_InvalidSourceTable = "SourceTable is required to be a non-empty string";

	public const string ADP_MissingTableMapping = "Missing SourceTable mapping: '{0}'";

	public const string ADP_ConnectionRequired_Insert = "Update requires the InsertCommand to have a connection object. The Connection property of the InsertCommand has not been initialized.";

	public const string ADP_ConnectionRequired_Update = "Update requires the UpdateCommand to have a connection object. The Connection property of the UpdateCommand has not been initialized.";

	public const string ADP_ConnectionRequired_Delete = "Update requires the DeleteCommand to have a connection object. The Connection property of the DeleteCommand has not been initialized.";

	public const string ADP_ConnectionRequired_Batch = "Update requires a connection object.  The Connection property has not been initialized.";

	public const string ADP_ConnectionRequired_Clone = "Update requires the command clone to have a connection object. The Connection property of the command clone has not been initialized.";

	public const string ADP_OpenConnectionRequired_Insert = "Update requires the {0}Command to have an open connection object. {1}";

	public const string ADP_OpenConnectionRequired_Update = "Update requires the {0}Command to have an open connection object. {1}";

	public const string ADP_OpenConnectionRequired_Delete = "Update requires the {0}Command to have an open connection object. {1}";

	public const string ADP_OpenConnectionRequired_Clone = "Update requires the updating command to have an open connection object. {1}";

	public const string ADP_MissingSelectCommand = "The SelectCommand property has not been initialized before calling '{0}'.";

	public const string ADP_UnwantedStatementType = "The StatementType {0} is not expected here.";

	public const string ADP_FillSchemaRequiresSourceTableName = "FillSchema: expected a non-empty string for the SourceTable name.";

	public const string ADP_FillRequiresSourceTableName = "Fill: expected a non-empty string for the SourceTable name.";

	public const string ADP_FillChapterAutoIncrement = "Hierarchical chapter columns must map to an AutoIncrement DataColumn.";

	public const string ADP_MissingDataReaderFieldType = "DataReader.GetFieldType({0}) returned null.";

	public const string ADP_OnlyOneTableForStartRecordOrMaxRecords = "Only specify one item in the dataTables array when using non-zero values for startRecords or maxRecords.";

	public const string ADP_UpdateRequiresSourceTable = "Update unable to find TableMapping['{0}'] or DataTable '{0}'.";

	public const string ADP_UpdateRequiresSourceTableName = "Update: expected a non-empty SourceTable name.";

	public const string ADP_UpdateRequiresCommandClone = "Update requires the command clone to be valid.";

	public const string ADP_UpdateRequiresCommandSelect = "Auto SQL generation during Update requires a valid SelectCommand.";

	public const string ADP_UpdateRequiresCommandInsert = "Update requires a valid InsertCommand when passed DataRow collection with new rows.";

	public const string ADP_UpdateRequiresCommandUpdate = "Update requires a valid UpdateCommand when passed DataRow collection with modified rows.";

	public const string ADP_UpdateRequiresCommandDelete = "Update requires a valid DeleteCommand when passed DataRow collection with deleted rows.";

	public const string ADP_UpdateMismatchRowTable = "DataRow[{0}] is from a different DataTable than DataRow[0].";

	public const string ADP_RowUpdatedErrors = "RowUpdatedEvent: Errors occurred; no additional is information available.";

	public const string ADP_RowUpdatingErrors = "RowUpdatingEvent: Errors occurred; no additional is information available.";

	public const string ADP_ResultsNotAllowedDuringBatch = "When batching, the command's UpdatedRowSource property value of UpdateRowSource.FirstReturnedRecord or UpdateRowSource.Both is invalid.";

	public const string ADP_UpdateConcurrencyViolation_Update = "Concurrency violation: the UpdateCommand affected {0} of the expected {1} records.";

	public const string ADP_UpdateConcurrencyViolation_Delete = "Concurrency violation: the DeleteCommand affected {0} of the expected {1} records.";

	public const string ADP_UpdateConcurrencyViolation_Batch = "Concurrency violation: the batched command affected {0} of the expected {1} records.";

	public const string ADP_InvalidSourceBufferIndex = "Invalid source buffer (size of {0}) offset: {1}";

	public const string ADP_InvalidDestinationBufferIndex = "Invalid destination buffer (size of {0}) offset: {1}";

	public const string ADP_StreamClosed = "Invalid attempt to {0} when stream is closed.";

	public const string ADP_InvalidSeekOrigin = "Specified SeekOrigin value is invalid.";

	public const string ADP_DynamicSQLJoinUnsupported = "Dynamic SQL generation is not supported against multiple base tables.";

	public const string ADP_DynamicSQLNoTableInfo = "Dynamic SQL generation is not supported against a SelectCommand that does not return any base table information.";

	public const string ADP_DynamicSQLNoKeyInfoDelete = "Dynamic SQL generation for the DeleteCommand is not supported against a SelectCommand that does not return any key column information.";

	public const string ADP_DynamicSQLNoKeyInfoUpdate = "Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information.";

	public const string ADP_DynamicSQLNoKeyInfoRowVersionDelete = "Dynamic SQL generation for the DeleteCommand is not supported against a SelectCommand that does not contain a row version column.";

	public const string ADP_DynamicSQLNoKeyInfoRowVersionUpdate = "Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not contain a row version column.";

	public const string ADP_DynamicSQLNestedQuote = "Dynamic SQL generation not supported against table names '{0}' that contain the QuotePrefix or QuoteSuffix character '{1}'.";

	public const string SQL_InvalidBufferSizeOrIndex = "Buffer offset '{1}' plus the bytes available '{0}' is greater than the length of the passed in buffer.";

	public const string SQL_InvalidDataLength = "Data length '{0}' is less than 0.";

	public const string SqlMisc_NullString = "Null";

	public const string SqlMisc_MessageString = "Message";

	public const string SqlMisc_ArithOverflowMessage = "Arithmetic Overflow.";

	public const string SqlMisc_DivideByZeroMessage = "Divide by zero error encountered.";

	public const string SqlMisc_NullValueMessage = "Data is Null. This method or property cannot be called on Null values.";

	public const string SqlMisc_TruncationMessage = "Numeric arithmetic causes truncation.";

	public const string SqlMisc_DateTimeOverflowMessage = "SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.";

	public const string SqlMisc_ConcatDiffCollationMessage = "Two strings to be concatenated have different collation.";

	public const string SqlMisc_CompareDiffCollationMessage = "Two strings to be compared have different collation.";

	public const string SqlMisc_InvalidFlagMessage = "Invalid flag value.";

	public const string SqlMisc_NumeToDecOverflowMessage = "Conversion from SqlDecimal to Decimal overflows.";

	public const string SqlMisc_ConversionOverflowMessage = "Conversion overflows.";

	public const string SqlMisc_InvalidDateTimeMessage = "Invalid SqlDateTime.";

	public const string SqlMisc_TimeZoneSpecifiedMessage = "A time zone was specified. SqlDateTime does not support time zones.";

	public const string SqlMisc_InvalidArraySizeMessage = "Invalid array size.";

	public const string SqlMisc_InvalidPrecScaleMessage = "Invalid numeric precision/scale.";

	public const string SqlMisc_FormatMessage = "The input wasn't in a correct format.";

	public const string SqlMisc_SqlTypeMessage = "SqlType error.";

	public const string SqlMisc_NoBufferMessage = "There is no buffer. Read or write operation failed.";

	public const string SqlMisc_BufferInsufficientMessage = "The buffer is insufficient. Read or write operation failed.";

	public const string SqlMisc_WriteNonZeroOffsetOnNullMessage = "Cannot write to non-zero offset, because current value is Null.";

	public const string SqlMisc_WriteOffsetLargerThanLenMessage = "Cannot write from an offset that is larger than current length. It would leave uninitialized data in the buffer.";

	public const string SqlMisc_NotFilledMessage = "SQL Type has not been loaded with data.";

	public const string SqlMisc_AlreadyFilledMessage = "SQL Type has already been loaded with data.";

	public const string SqlMisc_ClosedXmlReaderMessage = "Invalid attempt to access a closed XmlReader.";

	public const string SqlMisc_InvalidOpStreamClosed = "Invalid attempt to call {0} when the stream is closed.";

	public const string SqlMisc_InvalidOpStreamNonWritable = "Invalid attempt to call {0} when the stream non-writable.";

	public const string SqlMisc_InvalidOpStreamNonReadable = "Invalid attempt to call {0} when the stream non-readable.";

	public const string SqlMisc_InvalidOpStreamNonSeekable = "Invalid attempt to call {0} when the stream is non-seekable.";

	public const string ADP_DBConcurrencyExceptionMessage = "DB concurrency violation.";

	public const string ADP_InvalidMaxRecords = "The MaxRecords value of {0} is invalid; the value must be >= 0.";

	public const string ADP_CollectionIndexInt32 = "Invalid index {0} for this {1} with Count={2}.";

	public const string ADP_MissingTableMappingDestination = "Missing TableMapping when TableMapping.DataSetTable='{0}'.";

	public const string ADP_InvalidStartRecord = "The StartRecord value of {0} is invalid; the value must be >= 0.";

	public const string DataDom_EnforceConstraintsShouldBeOff = "Please set DataSet.EnforceConstraints == false before trying to edit XmlDataDocument using XML operations.";

	public const string DataColumns_RemoveExpression = "Cannot remove this column, because it is part of an expression: {0} = {1}.";

	public const string DataRow_RowInsertTwice = "The rowOrder value={0} has been found twice for table named '{1}'.";

	public const string Xml_ElementTypeNotFound = "Cannot find ElementType name='{0}'.";

	public const string ADP_ConnectionAlreadyOpen = "The connection was not closed. {0}";

	public const string ADP_InternalConnectionError = "Internal DbConnection Error: {0}";

	public const string ADP_InvalidOffsetValue = "Invalid parameter Offset value '{0}'. The value must be greater than or equal to 0.";

	public const string ADP_TransactionPresent = "Connection currently has transaction enlisted.  Finish current transaction and retry.";

	public const string ADP_LocalTransactionPresent = "Cannot enlist in the transaction because a local transaction is in progress on the connection.  Finish local transaction and retry.";

	public const string ADP_NoConnectionString = "The ConnectionString property has not been initialized.";

	public const string ADP_OpenConnectionPropertySet = "Not allowed to change the '{0}' property. {1}";

	public const string ADP_PendingAsyncOperation = "Can not start another operation while there is an asynchronous operation pending.";

	public const string ADP_PooledOpenTimeout = "Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached.";

	public const string ADP_NonPooledOpenTimeout = "Timeout attempting to open the connection.  The time period elapsed prior to attempting to open the connection has been exceeded.  This may have occurred because of too many simultaneous non-pooled connection attempts.";

	public const string ADP_SingleValuedProperty = "The only acceptable value for the property '{0}' is '{1}'.";

	public const string ADP_DoubleValuedProperty = "The acceptable values for the property '{0}' are '{1}' or '{2}'.";

	public const string ADP_InvalidPrefixSuffix = "Specified QuotePrefix and QuoteSuffix values do not match.";

	p

Room Architect Tool_Data/Managed/System.Design.dll

Decompiled 3 months ago
using System;
using System.CodeDom;
using System.CodeDom.Compiler;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.ComponentModel.Design.Data;
using System.ComponentModel.Design.Serialization;
using System.Configuration;
using System.Data;
using System.Data.Common;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Design;
using System.Drawing.Drawing2D;
using System.Globalization;
using System.IO;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Web.Compilation;
using System.Web.Configuration;
using System.Web.UI.WebControls;
using System.Windows.Forms;
using System.Windows.Forms.Design;
using System.Windows.Forms.Design.Behavior;
using System.Windows.Forms.Layout;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;
using System.Xml.Serialization.Advanced;
using Unity;

[assembly: InternalsVisibleTo("System.Web.Extensions.Design, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("System.Design.dll")]
[assembly: AssemblyDescription("System.Design.dll")]
[assembly: AssemblyDefaultAlias("System.Design.dll")]
[assembly: AssemblyCompany("Mono development team")]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright("(c) Various Mono authors")]
[assembly: SatelliteContractVersion("4.0.0.0")]
[assembly: AssemblyInformationalVersion("4.6.57.0")]
[assembly: CLSCompliant(true)]
[assembly: ComCompatibleVersion(1, 0, 3300, 0)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: CompilationRelaxations(8)]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: ComVisible(false)]
[assembly: AssemblyDelaySign(true)]
[assembly: AssemblyFileVersion("4.6.57.0")]
[assembly: AssemblyVersion("4.0.0.0")]
namespace System.Windows.Forms.Design
{
	public sealed class AnchorEditor : UITypeEditor
	{
		public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			IWindowsFormsEditorService val = null;
			if (provider != null)
			{
				object? service = provider.GetService(typeof(IWindowsFormsEditorService));
				val = (IWindowsFormsEditorService)((service is IWindowsFormsEditorService) ? service : null);
			}
			if (val != null)
			{
				AnchorSelector anchorSelector = new AnchorSelector(val, (AnchorStyles)value);
				val.DropDownControl((Control)(object)anchorSelector);
				value = anchorSelector.AnchorStyles;
			}
			return value;
		}

		public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
		{
			return (UITypeEditorEditStyle)3;
		}
	}
	internal class AnchorSelector : UserControl
	{
		private IContainer components;

		private AnchorStyles styles;

		public AnchorStyles AnchorStyles => styles;

		protected override void Dispose(bool disposing)
		{
			if (disposing && components != null)
			{
				components.Dispose();
			}
			((ContainerControl)this).Dispose(disposing);
		}

		private void InitializeComponent()
		{
			((Control)this).SuspendLayout();
			((Control)this).Name = "AnchorSelector";
			((Control)this).Size = new Size(150, 120);
			((Control)this).ResumeLayout(false);
		}

		public AnchorSelector(IWindowsFormsEditorService editor_service, AnchorStyles startup)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			styles = startup;
			InitializeComponent();
			((Control)this).BackColor = Color.White;
		}

		private void PaintState(Graphics g, int x1, int y1, int x2, int y2, AnchorStyles v)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			if ((styles & v) != 0)
			{
				g.DrawLine(SystemPens.MenuText, x1, y1, x2, y2);
				return;
			}
			int num = ((x1 == x2) ? 10 : 0);
			int num2 = ((y1 == y2) ? 10 : 0);
			g.DrawBezier(SystemPens.MenuText, new Point(x1, y1), new Point((x1 + x2) / 2 + num, (y1 + y2) / 2 - num2), new Point((x1 + x2) / 2 - num, (y1 + y2) / 2 + num2), new Point(x2, y2));
		}

		protected override void OnPaint(PaintEventArgs e)
		{
			Graphics graphics = e.Graphics;
			int num = ((Control)this).Width / 3;
			int num2 = ((Control)this).Height / 3;
			int num3 = ((Control)this).Width / 2;
			int num4 = ((Control)this).Height / 2;
			graphics.FillRectangle(Brushes.Black, new Rectangle(num, num2, num, num2));
			PaintState(graphics, 0, num4, num, num4, (AnchorStyles)4);
			PaintState(graphics, num * 2, num4, ((Control)this).Width, num4, (AnchorStyles)8);
			PaintState(graphics, num3, 0, num3, num2, (AnchorStyles)1);
			PaintState(graphics, num3, num2 * 2, num3, ((Control)this).Height, (AnchorStyles)2);
		}

		protected override void OnClick(EventArgs ee)
		{
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			Point point = ((Control)this).PointToClient(Control.MousePosition);
			int num = ((Control)this).Width / 3;
			int num2 = ((Control)this).Height / 3;
			if (point.X <= num && point.Y > num2 && point.Y < num2 * 2)
			{
				styles = (AnchorStyles)(styles ^ 4);
			}
			else if (point.Y < num2 && point.X > num && point.X < num * 2)
			{
				styles = (AnchorStyles)(styles ^ 1);
			}
			else if (point.X > num * 2 && point.Y > num2 && point.Y < num2 * 2)
			{
				styles = (AnchorStyles)(styles ^ 8);
			}
			else if (point.Y > num2 * 2 && point.X > num && point.X < num * 2)
			{
				styles = (AnchorStyles)(styles ^ 2);
			}
			else
			{
				((Control)this).OnClick(ee);
			}
			((Control)this).Invalidate();
		}

		protected override void OnDoubleClick(EventArgs ee)
		{
			((Control)this).OnClick(ee);
		}
	}
	[MonoTODO]
	public class AxImporter
	{
		public sealed class Options
		{
			[MonoTODO]
			public bool delaySign;

			[MonoTODO]
			public bool genSources;

			[MonoTODO]
			public string keyContainer;

			[MonoTODO]
			public string keyFile;

			[MonoTODO]
			public StrongNameKeyPair keyPair;

			[MonoTODO]
			public bool noLogo;

			[MonoTODO]
			public string outputDirectory;

			[MonoTODO]
			public string outputName;

			[MonoTODO]
			public bool overwriteRCW;

			[MonoTODO]
			public byte[] publicKey;

			[MonoTODO]
			public IReferenceResolver references;

			[MonoTODO]
			public bool silentMode;

			[MonoTODO]
			public bool verboseMode;

			[MonoTODO]
			public bool msBuildErrors;

			public bool ignoreRegisteredOcx;
		}

		public interface IReferenceResolver
		{
			string ResolveActiveXReference(UCOMITypeLib typeLib);

			string ResolveComReference(AssemblyName name);

			string ResolveComReference(UCOMITypeLib typeLib);

			string ResolveManagedReference(string assemName);
		}

		internal Options options;

		[MonoTODO]
		public string[] GeneratedAssemblies
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public string[] GeneratedSources
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public TYPELIBATTR[] GeneratedTypeLibAttributes
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public AxImporter(Options options)
		{
			this.options = options;
		}

		[MonoTODO]
		public string GenerateFromFile(FileInfo file)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public string GenerateFromTypeLibrary(UCOMITypeLib typeLib)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public string GenerateFromTypeLibrary(UCOMITypeLib typeLib, Guid clsid)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static string GetFileOfTypeLib(ref TYPELIBATTR tlibattr)
		{
			throw new NotImplementedException();
		}
	}
	public class AxParameterData
	{
		private bool isByRef;

		private bool isIn;

		private bool isOptional;

		private bool isOut;

		private string name;

		private Type type;

		public FieldDirection Direction
		{
			get
			{
				if (!IsOut)
				{
					if (!IsByRef)
					{
						return (FieldDirection)0;
					}
					return (FieldDirection)2;
				}
				return (FieldDirection)1;
			}
		}

		public bool IsByRef => isByRef;

		public bool IsIn => isIn;

		public bool IsOptional => isOptional;

		public bool IsOut => isOut;

		public string Name
		{
			get
			{
				return name;
			}
			[MonoTODO]
			set
			{
				throw new NotImplementedException();
			}
		}

		public Type ParameterType => type;

		[MonoTODO]
		public string TypeName
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public AxParameterData(ParameterInfo info)
			: this(info, ignoreByRefs: false)
		{
		}

		[MonoTODO]
		public AxParameterData(ParameterInfo info, bool ignoreByRefs)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public AxParameterData(string inname, string typeName)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public AxParameterData(string inname, Type type)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static AxParameterData[] Convert(ParameterInfo[] infos)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static AxParameterData[] Convert(ParameterInfo[] infos, bool ignoreByRefs)
		{
			throw new NotImplementedException();
		}
	}
	public class AxWrapperGen
	{
		[MonoTODO]
		public static ArrayList GeneratedSources = new ArrayList();

		[MonoTODO]
		public AxWrapperGen(Type axType)
		{
			throw new NotImplementedException();
		}
	}
	[SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)]
	public class BorderSidesEditor : UITypeEditor
	{
		[MonoTODO]
		public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
		{
			throw new NotImplementedException();
		}
	}
	public class ComponentDocumentDesigner : ComponentDesigner, IRootDesigner, IDesigner, IDisposable, IToolboxUser, ITypeDescriptorFilterService, IOleDragClient
	{
		ViewTechnology[] IRootDesigner.SupportedTechnologies => new ViewTechnology[1] { ViewTechnology.WindowsForms };

		bool IOleDragClient.CanModifyComponents => true;

		[MonoTODO]
		IComponent IOleDragClient.Component
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public Control Control
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		public bool TrayAutoArrange
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public bool TrayLargeIcon
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public ComponentDocumentDesigner()
		{
		}

		[MonoTODO]
		object IRootDesigner.GetView(ViewTechnology technology)
		{
			throw new NotImplementedException();
		}

		bool IToolboxUser.GetToolSupported(ToolboxItem tool)
		{
			return true;
		}

		[MonoTODO]
		void IToolboxUser.ToolPicked(ToolboxItem tool)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		bool ITypeDescriptorFilterService.FilterAttributes(IComponent component, IDictionary attributes)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		bool ITypeDescriptorFilterService.FilterEvents(IComponent component, IDictionary events)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		bool ITypeDescriptorFilterService.FilterProperties(IComponent component, IDictionary properties)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		bool IOleDragClient.AddComponent(IComponent component, string name, bool firstAdd)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		Control IOleDragClient.GetControlForComponent(object component)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		Control IOleDragClient.GetDesignerControl()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		bool IOleDragClient.IsDropOk(IComponent component)
		{
			return true;
		}

		[MonoTODO]
		public override void Initialize(IComponent component)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		protected override void Dispose(bool disposing)
		{
			throw new NotImplementedException();
		}

		protected virtual bool GetToolSupported(ToolboxItem tool)
		{
			return true;
		}

		[MonoTODO]
		protected override void PreFilterProperties(IDictionary properties)
		{
			throw new NotImplementedException();
		}
	}
	[ProvideProperty("Location", typeof(IComponent))]
	[ToolboxItem(false)]
	[DesignTimeVisible(false)]
	public class ComponentTray : ScrollableControl, IExtenderProvider
	{
		private IServiceProvider _serviceProvider;

		private IDesigner _mainDesigner;

		private bool _showLargeIcons;

		private bool _autoArrange;

		public bool AutoArrange
		{
			get
			{
				return _autoArrange;
			}
			set
			{
				_autoArrange = value;
			}
		}

		[MonoTODO]
		public int ComponentCount => 0;

		public bool ShowLargeIcons
		{
			get
			{
				return _showLargeIcons;
			}
			set
			{
				_showLargeIcons = value;
			}
		}

		public ComponentTray(IDesigner mainDesigner, IServiceProvider serviceProvider)
		{
			if (mainDesigner == null)
			{
				throw new ArgumentNullException("mainDesigner");
			}
			if (serviceProvider == null)
			{
				throw new ArgumentNullException("serviceProvider");
			}
			_mainDesigner = mainDesigner;
			_serviceProvider = serviceProvider;
		}

		[MonoTODO]
		public virtual void AddComponent(IComponent component)
		{
		}

		protected virtual bool CanCreateComponentFromTool(ToolboxItem tool)
		{
			return true;
		}

		protected virtual bool CanDisplayComponent(IComponent component)
		{
			return false;
		}

		[MonoTODO]
		public void CreateComponentFromTool(ToolboxItem tool)
		{
		}

		[MonoTODO]
		protected void DisplayError(Exception e)
		{
		}

		protected override void Dispose(bool disposing)
		{
		}

		[Browsable(false)]
		[Category("Layout")]
		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		[DesignOnly(true)]
		[Localizable(false)]
		[MonoTODO]
		public Point GetLocation(IComponent receiver)
		{
			return new Point(0, 0);
		}

		[MonoTODO]
		public void SetLocation(IComponent receiver, Point location)
		{
		}

		[MonoTODO]
		public IComponent GetNextComponent(IComponent component, bool forward)
		{
			throw new NotImplementedException();
		}

		[Localizable(false)]
		[DesignOnly(true)]
		[Category("Layout")]
		[MonoTODO]
		[Browsable(false)]
		public Point GetTrayLocation(IComponent receiver)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public bool IsTrayComponent(IComponent comp)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void SetTrayLocation(IComponent receiver, Point location)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		protected override void OnMouseDoubleClick(MouseEventArgs e)
		{
		}

		[MonoTODO]
		protected override void OnDragDrop(DragEventArgs de)
		{
		}

		[MonoTODO]
		protected override void OnDragEnter(DragEventArgs de)
		{
		}

		[MonoTODO]
		protected override void OnDragLeave(EventArgs e)
		{
		}

		[MonoTODO]
		protected override void OnDragOver(DragEventArgs de)
		{
		}

		[MonoTODO]
		protected override void OnGiveFeedback(GiveFeedbackEventArgs gfevent)
		{
		}

		[MonoTODO]
		protected override void OnLayout(LayoutEventArgs levent)
		{
		}

		[MonoTODO]
		protected virtual void OnLostCapture()
		{
		}

		[MonoTODO]
		protected override void OnMouseDown(MouseEventArgs e)
		{
		}

		[MonoTODO]
		protected override void OnMouseMove(MouseEventArgs e)
		{
		}

		[MonoTODO]
		protected override void OnMouseUp(MouseEventArgs e)
		{
		}

		[MonoTODO]
		protected override void OnPaint(PaintEventArgs pe)
		{
		}

		[MonoTODO]
		protected virtual void OnSetCursor()
		{
		}

		[MonoTODO]
		public virtual void RemoveComponent(IComponent component)
		{
		}

		[MonoTODO]
		protected override void WndProc(ref Message m)
		{
			((ScrollableControl)this).WndProc(ref m);
		}

		bool IExtenderProvider.CanExtend(object component)
		{
			return false;
		}

		protected override object GetService(Type serviceType)
		{
			if (_serviceProvider != null)
			{
				return _serviceProvider.GetService(serviceType);
			}
			return null;
		}
	}
	internal class ControlBindingsConverter : TypeConverter
	{
		[MonoTODO]
		private class DataBindingPropertyDescriptor : PropertyDescriptor
		{
			private bool _readOnly;

			[MonoTODO]
			public override Type PropertyType => typeof(DataBindingPropertyDescriptor);

			[MonoTODO]
			public override TypeConverter Converter => null;

			public override Type ComponentType => typeof(ControlBindingsCollection);

			public override bool IsReadOnly => _readOnly;

			[MonoTODO]
			public DataBindingPropertyDescriptor(PropertyDescriptor property, Attribute[] attrs, bool readOnly)
				: base(property.Name, attrs)
			{
				_readOnly = readOnly;
			}

			[MonoTODO]
			public override object GetValue(object component)
			{
				return null;
			}

			[MonoTODO]
			public override void SetValue(object component, object value)
			{
			}

			[MonoTODO]
			public override void ResetValue(object component)
			{
				throw new NotImplementedException();
			}

			[MonoTODO]
			public override bool CanResetValue(object component)
			{
				return false;
			}

			public override bool ShouldSerializeValue(object component)
			{
				return false;
			}
		}

		[MonoTODO]
		public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes)
		{
			PropertyDescriptorCollection propertyDescriptorCollection = new PropertyDescriptorCollection(new PropertyDescriptor[0]);
			object obj = ((value is ControlBindingsCollection) ? value : null);
			object bindableComponent = ((ControlBindingsCollection)obj).BindableComponent;
			if (obj != null && bindableComponent != null)
			{
				foreach (PropertyDescriptor property in TypeDescriptor.GetProperties(bindableComponent, attributes))
				{
					if (((BindableAttribute)property.Attributes[typeof(BindableAttribute)]).Bindable)
					{
						propertyDescriptorCollection.Add(new DataBindingPropertyDescriptor(property, attributes, readOnly: true));
					}
				}
			}
			return propertyDescriptorCollection;
		}

		public override bool GetPropertiesSupported(ITypeDescriptorContext context)
		{
			return true;
		}

		public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
		{
			if (destinationType == typeof(string))
			{
				return true;
			}
			return base.CanConvertTo(context, destinationType);
		}

		public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
		{
			if (destinationType == typeof(string))
			{
				return string.Empty;
			}
			return base.ConvertTo(context, culture, value, destinationType);
		}
	}
	internal class ControlCodeDomSerializer : ComponentCodeDomSerializer
	{
		public override object Serialize(IDesignerSerializationManager manager, object value)
		{
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Expected O, but got Unknown
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Expected O, but got Unknown
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: Expected O, but got Unknown
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Expected O, but got Unknown
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Expected O, but got Unknown
			if (value == null)
			{
				throw new ArgumentNullException("value");
			}
			if (manager == null)
			{
				throw new ArgumentNullException("manager");
			}
			if (!(value is Control))
			{
				throw new InvalidOperationException("value is not a Control");
			}
			object obj = base.Serialize(manager, value);
			CodeStatementCollection val = (CodeStatementCollection)((obj is CodeStatementCollection) ? obj : null);
			if (val != null && (TypeDescriptor.GetProperties(value)["Controls"].GetValue(value) as ICollection).Count > 0)
			{
				CodeExpression expression = GetExpression(manager, value);
				CodeStatement val2 = (CodeStatement)new CodeExpressionStatement((CodeExpression)new CodeMethodInvokeExpression(expression, "SuspendLayout", Array.Empty<CodeExpression>()));
				((CodeObject)val2).UserData["statement-order"] = "begin";
				val.Add(val2);
				val2 = (CodeStatement)new CodeExpressionStatement((CodeExpression)new CodeMethodInvokeExpression(expression, "ResumeLayout", (CodeExpression[])(object)new CodeExpression[1] { (CodeExpression)new CodePrimitiveExpression((object)false) }));
				((CodeObject)val2).UserData["statement-order"] = "end";
				val.Add(val2);
				obj = val;
			}
			return obj;
		}
	}
	internal class ControlCollectionCodeDomSerializaer : CollectionCodeDomSerializer
	{
	}
	internal class ControlDataObject : IDataObject
	{
		private object _data;

		private string _format;

		public ControlDataObject()
		{
			_data = null;
			_format = null;
		}

		public ControlDataObject(Control control)
		{
			SetData(control);
		}

		public ControlDataObject(Control[] controls)
		{
			SetData(controls);
		}

		public object GetData(Type format)
		{
			return GetData(format.ToString());
		}

		public object GetData(string format)
		{
			return GetData(format, autoConvert: true);
		}

		public object GetData(string format, bool autoConvert)
		{
			if (format == _format)
			{
				return _data;
			}
			return null;
		}

		public bool GetDataPresent(Type format)
		{
			return GetDataPresent(format.ToString());
		}

		public bool GetDataPresent(string format)
		{
			return GetDataPresent(format, autoConvert: true);
		}

		public bool GetDataPresent(string format, bool autoConvert)
		{
			if (format == _format)
			{
				return true;
			}
			return false;
		}

		public string[] GetFormats()
		{
			return GetFormats(autoConvert: true);
		}

		public string[] GetFormats(bool autoConvert)
		{
			return new string[2]
			{
				typeof(Control).ToString(),
				typeof(Control[]).ToString()
			};
		}

		public void SetData(object data)
		{
			if (data is Control)
			{
				SetData(typeof(Control), data);
			}
			else if (data is Control[])
			{
				SetData(typeof(Control[]), data);
			}
		}

		public void SetData(Type format, object data)
		{
			SetData(format.ToString(), data);
		}

		public void SetData(string format, object data)
		{
			SetData(format, autoConvert: true, data);
		}

		public void SetData(string format, bool autoConvert, object data)
		{
			if (ValidateFormat(format))
			{
				_data = data;
				_format = format;
			}
		}

		private bool ValidateFormat(string format)
		{
			bool result = false;
			string[] formats = GetFormats();
			for (int i = 0; i < formats.Length; i++)
			{
				if (formats[i] == format)
				{
					result = true;
					break;
				}
			}
			return result;
		}
	}
	public class ControlDesigner : ComponentDesigner, IMessageReceiver
	{
		[ComVisible(true)]
		public class ControlDesignerAccessibleObject : AccessibleObject
		{
			[MonoTODO]
			public override Rectangle Bounds
			{
				get
				{
					throw new NotImplementedException();
				}
			}

			[MonoTODO]
			public override string DefaultAction
			{
				get
				{
					throw new NotImplementedException();
				}
			}

			[MonoTODO]
			public override string Description
			{
				get
				{
					throw new NotImplementedException();
				}
			}

			[MonoTODO]
			public override string Name
			{
				get
				{
					throw new NotImplementedException();
				}
			}

			[MonoTODO]
			public override AccessibleObject Parent
			{
				get
				{
					throw new NotImplementedException();
				}
			}

			[MonoTODO]
			public override AccessibleRole Role
			{
				get
				{
					throw new NotImplementedException();
				}
			}

			[MonoTODO]
			public override AccessibleStates State
			{
				get
				{
					throw new NotImplementedException();
				}
			}

			[MonoTODO]
			public override string Value
			{
				get
				{
					throw new NotImplementedException();
				}
			}

			[MonoTODO]
			public ControlDesignerAccessibleObject(ControlDesigner designer, Control control)
			{
				throw new NotImplementedException();
			}

			[MonoTODO]
			public override AccessibleObject GetChild(int index)
			{
				throw new NotImplementedException();
			}

			[MonoTODO]
			public override int GetChildCount()
			{
				throw new NotImplementedException();
			}

			[MonoTODO]
			public override AccessibleObject GetFocused()
			{
				throw new NotImplementedException();
			}

			[MonoTODO]
			public override AccessibleObject GetSelected()
			{
				throw new NotImplementedException();
			}

			[MonoTODO]
			public override AccessibleObject HitTest(int x, int y)
			{
				throw new NotImplementedException();
			}
		}

		private WndProcRouter _messageRouter;

		private bool _locked;

		private bool _mouseDown;

		private bool _mouseMoveAfterMouseDown;

		private bool _mouseDownFirstMove;

		private bool _firstMouseMoveInClient = true;

		protected static readonly Point InvalidPoint = new Point(int.MinValue, int.MinValue);

		protected AccessibleObject accessibilityObj;

		private MouseButtons _mouseButtonDown;

		protected internal BehaviorService BehaviorService
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		public virtual Control Control => (Control)base.Component;

		protected virtual bool EnableDragRect => true;

		public virtual SelectionRules SelectionRules
		{
			get
			{
				//IL_004d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0052: Unknown result type (might be due to invalid IL or missing references)
				//IL_0053: Unknown result type (might be due to invalid IL or missing references)
				//IL_0055: Unknown result type (might be due to invalid IL or missing references)
				//IL_006f: Expected I4, but got Unknown
				if (Control == null)
				{
					return SelectionRules.None;
				}
				SelectionRules selectionRules = SelectionRules.Visible;
				if ((bool)GetValue(base.Component, "Locked"))
				{
					selectionRules |= SelectionRules.Locked;
				}
				else
				{
					DockStyle val = (DockStyle)GetValue(base.Component, "Dock", typeof(DockStyle));
					switch (val - 1)
					{
					case 0:
						selectionRules |= SelectionRules.BottomSizeable;
						break;
					case 2:
						selectionRules |= SelectionRules.RightSizeable;
						break;
					case 3:
						selectionRules |= SelectionRules.LeftSizeable;
						break;
					case 1:
						selectionRules |= SelectionRules.TopSizeable;
						break;
					default:
						selectionRules |= SelectionRules.Moveable;
						selectionRules |= SelectionRules.AllSizeable;
						break;
					case 4:
						break;
					}
				}
				return selectionRules;
			}
		}

		public override ICollection AssociatedComponents
		{
			get
			{
				//IL_001f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0025: Expected O, but got Unknown
				ArrayList arrayList = new ArrayList();
				foreach (Control item in (ArrangedElementCollection)Control.Controls)
				{
					Control val = item;
					if (((Component)(object)val).Site != null)
					{
						arrayList.Add(val);
					}
				}
				return arrayList;
			}
		}

		protected override IComponent ParentComponent
		{
			get
			{
				object value = GetValue(Control, "Parent");
				return (IComponent)((value is Control) ? value : null);
			}
		}

		public virtual AccessibleObject AccessibilityObject
		{
			get
			{
				//IL_0009: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Expected O, but got Unknown
				if (accessibilityObj == null)
				{
					accessibilityObj = new AccessibleObject();
				}
				return accessibilityObj;
			}
		}

		internal MouseButtons MouseButtonDown => _mouseButtonDown;

		private bool Visible
		{
			get
			{
				return (bool)base.ShadowProperties["Visible"];
			}
			set
			{
				base.ShadowProperties["Visible"] = value;
			}
		}

		private bool Enabled
		{
			get
			{
				return (bool)base.ShadowProperties["Enabled"];
			}
			set
			{
				base.ShadowProperties["Enabled"] = value;
			}
		}

		private bool Locked
		{
			get
			{
				return _locked;
			}
			set
			{
				_locked = value;
			}
		}

		private bool AllowDrop
		{
			get
			{
				return (bool)base.ShadowProperties["AllowDrop"];
			}
			set
			{
				base.ShadowProperties["AllowDrop"] = value;
			}
		}

		private string Name
		{
			get
			{
				return base.Component.Site.Name;
			}
			set
			{
				base.Component.Site.Name = value;
			}
		}

		private ContextMenu ContextMenu
		{
			get
			{
				//IL_0010: Unknown result type (might be due to invalid IL or missing references)
				//IL_0016: Expected O, but got Unknown
				return (ContextMenu)base.ShadowProperties["ContextMenu"];
			}
			set
			{
				base.ShadowProperties["ContextMenu"] = value;
			}
		}

		private Point Location
		{
			get
			{
				return Control.Location;
			}
			set
			{
				Control.Location = value;
			}
		}

		[MonoTODO]
		protected override InheritanceAttribute InheritanceAttribute
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public virtual IList SnapLines
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public virtual bool ParticipatesWithSnapLines
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public bool AutoResizeHandles
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public override void Initialize(IComponent component)
		{
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Expected O, but got Unknown
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Expected O, but got Unknown
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Expected O, but got Unknown
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Expected O, but got Unknown
			base.Initialize(component);
			if (!(component is Control))
			{
				throw new ArgumentException("Component is not a Control.");
			}
			Control.Text = component.Site.Name;
			_messageRouter = new WndProcRouter((Control)component, this);
			Control.WindowTarget = (IWindowTarget)(object)_messageRouter;
			Visible = true;
			Enabled = true;
			Locked = false;
			AllowDrop = false;
			Control.Enabled = true;
			Control.Visible = true;
			Control.AllowDrop = false;
			Control.DragDrop += new DragEventHandler(OnDragDrop);
			Control.DragEnter += new DragEventHandler(OnDragEnter);
			Control.DragLeave += OnDragLeave;
			Control.DragOver += new DragEventHandler(OnDragOver);
			if (Control.IsHandleCreated)
			{
				OnCreateHandle();
			}
		}

		public override void OnSetComponentDefaults()
		{
			if (base.Component != null && base.Component.Site != null)
			{
				PropertyDescriptor propertyDescriptor = TypeDescriptor.GetProperties(base.Component)["Text"];
				if (propertyDescriptor != null && !propertyDescriptor.IsReadOnly && propertyDescriptor.PropertyType == typeof(string))
				{
					propertyDescriptor.SetValue(base.Component, base.Component.Site.Name);
				}
			}
		}

		protected void DefWndProc(ref Message m)
		{
			_messageRouter.ToControl(ref m);
		}

		protected void BaseWndProc(ref Message m)
		{
			_messageRouter.ToSystem(ref m);
		}

		void IMessageReceiver.WndProc(ref Message m)
		{
			WndProc(ref m);
		}

		protected virtual void WndProc(ref Message m)
		{
			//IL_01e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e6: Expected O, but got Unknown
			//IL_0274: Unknown result type (might be due to invalid IL or missing references)
			//IL_020c: Unknown result type (might be due to invalid IL or missing references)
			//IL_028e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0226: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0240: Unknown result type (might be due to invalid IL or missing references)
			//IL_044f: Unknown result type (might be due to invalid IL or missing references)
			if (((Message)(ref m)).Msg >= 256 && ((Message)(ref m)).Msg <= 264)
			{
				return;
			}
			if (IsMouseMessage((Native.Msg)((Message)(ref m)).Msg) && GetHitTest(new Point(Native.LoWord((int)((Message)(ref m)).LParam), Native.HiWord((int)((Message)(ref m)).LParam))))
			{
				DefWndProc(ref m);
				return;
			}
			switch ((Native.Msg)((Message)(ref m)).Msg)
			{
			case Native.Msg.WM_CREATE:
				DefWndProc(ref m);
				if (((Message)(ref m)).HWnd == Control.Handle)
				{
					OnCreateHandle();
				}
				break;
			case Native.Msg.WM_CONTEXTMENU:
				OnContextMenu(Native.LoWord((int)((Message)(ref m)).LParam), Native.HiWord((int)((Message)(ref m)).LParam));
				break;
			case Native.Msg.WM_SETCURSOR:
				if (GetHitTest(new Point(Native.LoWord((int)((Message)(ref m)).LParam), Native.HiWord((int)((Message)(ref m)).LParam))))
				{
					DefWndProc(ref m);
				}
				else
				{
					OnSetCursor();
				}
				break;
			case Native.Msg.WM_SETFOCUS:
				DefWndProc(ref m);
				break;
			case Native.Msg.WM_PAINT:
			{
				DefWndProc(ref m);
				Graphics obj = Graphics.FromHwnd(((Message)(ref m)).HWnd);
				PaintEventArgs val2 = new PaintEventArgs(obj, Control.Bounds);
				OnPaintAdornments(val2);
				obj.Dispose();
				val2.Dispose();
				break;
			}
			case Native.Msg.WM_LBUTTONDBLCLK:
			case Native.Msg.WM_RBUTTONDBLCLK:
			case Native.Msg.WM_MBUTTONDBLCLK:
				if (((Message)(ref m)).Msg == 515)
				{
					_mouseButtonDown = (MouseButtons)1048576;
				}
				else if (((Message)(ref m)).Msg == 518)
				{
					_mouseButtonDown = (MouseButtons)2097152;
				}
				else if (((Message)(ref m)).Msg == 521)
				{
					_mouseButtonDown = (MouseButtons)4194304;
				}
				OnMouseDoubleClick();
				BaseWndProc(ref m);
				break;
			case Native.Msg.WM_MOUSEHOVER:
				OnMouseHover();
				break;
			case Native.Msg.WM_LBUTTONDOWN:
			case Native.Msg.WM_RBUTTONDOWN:
			case Native.Msg.WM_MBUTTONDOWN:
				_mouseMoveAfterMouseDown = true;
				if (((Message)(ref m)).Msg == 513)
				{
					_mouseButtonDown = (MouseButtons)1048576;
				}
				else if (((Message)(ref m)).Msg == 516)
				{
					_mouseButtonDown = (MouseButtons)2097152;
				}
				else if (((Message)(ref m)).Msg == 519)
				{
					_mouseButtonDown = (MouseButtons)4194304;
				}
				if (_firstMouseMoveInClient)
				{
					OnMouseEnter();
					_firstMouseMoveInClient = false;
				}
				OnMouseDown(Native.LoWord((int)((Message)(ref m)).LParam), Native.HiWord((int)((Message)(ref m)).LParam));
				BaseWndProc(ref m);
				break;
			case Native.Msg.WM_MOUSELEAVE:
				_firstMouseMoveInClient = false;
				OnMouseLeave();
				BaseWndProc(ref m);
				break;
			case Native.Msg.WM_CANCELMODE:
				OnMouseDragEnd(cancel: true);
				DefWndProc(ref m);
				break;
			case Native.Msg.WM_NCLBUTTONUP:
			case Native.Msg.WM_NCRBUTTONUP:
			case Native.Msg.WM_NCMBUTTONUP:
			case Native.Msg.WM_LBUTTONUP:
			case Native.Msg.WM_RBUTTONUP:
			case Native.Msg.WM_MBUTTONUP:
				_mouseMoveAfterMouseDown = false;
				OnMouseUp();
				BaseWndProc(ref m);
				break;
			case Native.Msg.WM_MOUSEFIRST:
			{
				if (_mouseMoveAfterMouseDown)
				{
					_mouseMoveAfterMouseDown = false;
					BaseWndProc(ref m);
					break;
				}
				IUISelectionService iUISelectionService = GetService(typeof(IUISelectionService)) as IUISelectionService;
				ISelectionService selectionService = GetService(typeof(ISelectionService)) as ISelectionService;
				IDesignerHost designerHost = GetService(typeof(IDesignerHost)) as IDesignerHost;
				if (iUISelectionService != null && selectionService != null && designerHost != null)
				{
					object primarySelection = selectionService.PrimarySelection;
					Control val = (Control)((primarySelection is Control) ? primarySelection : null);
					Point point = new Point(Native.LoWord((int)((Message)(ref m)).LParam), Native.HiWord((int)((Message)(ref m)).LParam));
					if (iUISelectionService.SelectionInProgress && base.Component != designerHost.RootComponent && base.Component != selectionService.PrimarySelection)
					{
						point = val.PointToClient(Control.PointToScreen(point));
						Native.SendMessage(val.Handle, (Native.Msg)((Message)(ref m)).Msg, ((Message)(ref m)).WParam, Native.LParam(point.X, point.Y));
					}
					else if (iUISelectionService.ResizeInProgress && Control.Parent == ((Control)selectionService.PrimarySelection).Parent)
					{
						point = Control.Parent.PointToClient(Control.PointToScreen(point));
						Native.SendMessage(Control.Parent.Handle, (Native.Msg)((Message)(ref m)).Msg, ((Message)(ref m)).WParam, Native.LParam(point.X, point.Y));
					}
					else
					{
						OnMouseMove(point.X, point.Y);
					}
				}
				else
				{
					OnMouseMove(Native.LoWord((int)((Message)(ref m)).LParam), Native.HiWord((int)((Message)(ref m)).LParam));
				}
				BaseWndProc(ref m);
				break;
			}
			default:
				DefWndProc(ref m);
				break;
			case Native.Msg.WM_NCLBUTTONDOWN:
			case Native.Msg.WM_NCLBUTTONDBLCLK:
			case Native.Msg.WM_NCRBUTTONDOWN:
			case Native.Msg.WM_NCRBUTTONDBLCLK:
			case Native.Msg.WM_NCMBUTTONDOWN:
				break;
			}
		}

		protected virtual bool GetHitTest(Point point)
		{
			return false;
		}

		private bool IsMouseMessage(Native.Msg msg)
		{
			if (msg >= Native.Msg.WM_MOUSEFIRST && msg <= Native.Msg.WM_MOUSEWHEEL)
			{
				return true;
			}
			if (msg >= Native.Msg.WM_NCLBUTTONDOWN && msg <= Native.Msg.WM_NCMBUTTONDBLCLK)
			{
				return true;
			}
			if (msg == Native.Msg.WM_MOUSEHOVER || msg == Native.Msg.WM_MOUSELEAVE)
			{
				return true;
			}
			return false;
		}

		protected virtual void OnSetCursor()
		{
		}

		private void OnMouseDoubleClick()
		{
			try
			{
				base.DoDefaultAction();
			}
			catch (Exception e)
			{
				DisplayError(e);
			}
		}

		internal virtual void OnMouseDown(int x, int y)
		{
			_mouseDown = true;
			_mouseDownFirstMove = true;
			if ((!(GetService(typeof(IUISelectionService)) is IUISelectionService iUISelectionService) || !iUISelectionService.AdornmentsHitTest(Control, x, y)) && GetService(typeof(ISelectionService)) is ISelectionService selectionService)
			{
				selectionService.SetSelectedComponents(new IComponent[1] { base.Component });
			}
		}

		internal virtual void OnMouseMove(int x, int y)
		{
			if (_mouseDown)
			{
				if (_mouseDownFirstMove)
				{
					OnMouseDragBegin(x, y);
					_mouseDownFirstMove = false;
				}
				else
				{
					OnMouseDragMove(x, y);
				}
			}
		}

		internal virtual void OnMouseUp()
		{
			IUISelectionService iUISelectionService = GetService(typeof(IUISelectionService)) as IUISelectionService;
			if (_mouseDown)
			{
				OnMouseDragEnd(cancel: false);
				if (iUISelectionService != null && (iUISelectionService.SelectionInProgress || iUISelectionService.ResizeInProgress))
				{
					iUISelectionService.MouseDragEnd(cancel: false);
				}
				_mouseDown = false;
			}
			else if (iUISelectionService != null && (iUISelectionService.SelectionInProgress || iUISelectionService.ResizeInProgress))
			{
				iUISelectionService.MouseDragEnd(cancel: false);
			}
		}

		protected virtual void OnContextMenu(int x, int y)
		{
			if (GetService(typeof(IMenuCommandService)) is IMenuCommandService menuCommandService)
			{
				menuCommandService.ShowContextMenu(MenuCommands.SelectionMenu, x, y);
			}
		}

		protected virtual void OnMouseEnter()
		{
		}

		protected virtual void OnMouseHover()
		{
		}

		protected virtual void OnMouseLeave()
		{
		}

		protected virtual void OnCreateHandle()
		{
		}

		protected virtual void OnPaintAdornments(PaintEventArgs pe)
		{
		}

		protected virtual void OnMouseDragBegin(int x, int y)
		{
			if (GetService(typeof(IUISelectionService)) is IUISelectionService iUISelectionService && (SelectionRules & SelectionRules.Moveable) == SelectionRules.Moveable)
			{
				iUISelectionService.DragBegin();
			}
		}

		protected virtual void OnMouseDragMove(int x, int y)
		{
		}

		protected virtual void OnMouseDragEnd(bool cancel)
		{
		}

		protected void HookChildControls(Control firstChild)
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Expected O, but got Unknown
			if (firstChild == null)
			{
				return;
			}
			foreach (Control item in (ArrangedElementCollection)firstChild.Controls)
			{
				item.WindowTarget = (IWindowTarget)(object)new WndProcRouter(item, this);
			}
		}

		protected void UnhookChildControls(Control firstChild)
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Expected O, but got Unknown
			if (firstChild == null)
			{
				return;
			}
			foreach (Control item in (ArrangedElementCollection)firstChild.Controls)
			{
				Control val = item;
				if (val.WindowTarget is WndProcRouter)
				{
					((WndProcRouter)(object)val.WindowTarget).Dispose();
				}
			}
		}

		public virtual bool CanBeParentedTo(IDesigner parentDesigner)
		{
			IDesignerHost designerHost = GetService(typeof(IDesignerHost)) as IDesignerHost;
			if (parentDesigner is ParentControlDesigner && base.Component != designerHost.RootComponent && !Control.Controls.Contains(((ParentControlDesigner)parentDesigner).Control))
			{
				return true;
			}
			return false;
		}

		protected void DisplayError(Exception e)
		{
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			if (e == null)
			{
				return;
			}
			object service = GetService(typeof(IUIService));
			IUIService val = (IUIService)((service is IUIService) ? service : null);
			if (val != null)
			{
				val.ShowError(e);
				return;
			}
			string text = e.Message;
			if (text == null || text == string.Empty)
			{
				text = e.ToString();
			}
			MessageBox.Show((IWin32Window)(object)Control, text, "Error", (MessageBoxButtons)0, (MessageBoxIcon)48);
		}

		protected void EnableDragDrop(bool value)
		{
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Expected O, but got Unknown
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Expected O, but got Unknown
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Expected O, but got Unknown
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0104: Expected O, but got Unknown
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Expected O, but got Unknown
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Expected O, but got Unknown
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Expected O, but got Unknown
			if (Control != null)
			{
				if (value)
				{
					Control.DragDrop += new DragEventHandler(OnDragDrop);
					Control.DragOver += new DragEventHandler(OnDragOver);
					Control.DragEnter += new DragEventHandler(OnDragEnter);
					Control.DragLeave += OnDragLeave;
					Control.GiveFeedback += new GiveFeedbackEventHandler(OnGiveFeedback);
					Control.AllowDrop = true;
				}
				else
				{
					Control.DragDrop -= new DragEventHandler(OnDragDrop);
					Control.DragOver -= new DragEventHandler(OnDragOver);
					Control.DragEnter -= new DragEventHandler(OnDragEnter);
					Control.DragLeave -= OnDragLeave;
					Control.GiveFeedback -= new GiveFeedbackEventHandler(OnGiveFeedback);
					Control.AllowDrop = false;
				}
			}
		}

		private void OnGiveFeedback(object sender, GiveFeedbackEventArgs e)
		{
			OnGiveFeedback(e);
		}

		private void OnDragDrop(object sender, DragEventArgs e)
		{
			OnDragDrop(e);
		}

		private void OnDragEnter(object sender, DragEventArgs e)
		{
			OnDragEnter(e);
		}

		private void OnDragLeave(object sender, EventArgs e)
		{
			OnDragLeave(e);
		}

		private void OnDragOver(object sender, DragEventArgs e)
		{
			OnDragOver(e);
		}

		protected virtual void OnGiveFeedback(GiveFeedbackEventArgs e)
		{
			e.UseDefaultCursors = false;
		}

		protected virtual void OnDragDrop(DragEventArgs de)
		{
		}

		protected virtual void OnDragEnter(DragEventArgs de)
		{
		}

		protected virtual void OnDragLeave(EventArgs e)
		{
		}

		protected virtual void OnDragOver(DragEventArgs de)
		{
		}

		protected override void PreFilterProperties(IDictionary properties)
		{
			base.PreFilterProperties(properties);
			string[] array = new string[6] { "Visible", "Enabled", "ContextMenu", "AllowDrop", "Location", "Name" };
			Attribute[][] array2 = new Attribute[6][]
			{
				new Attribute[1]
				{
					new DefaultValueAttribute(value: true)
				},
				new Attribute[1]
				{
					new DefaultValueAttribute(value: true)
				},
				new Attribute[1]
				{
					new DefaultValueAttribute(null)
				},
				new Attribute[1]
				{
					new DefaultValueAttribute(value: false)
				},
				new Attribute[1]
				{
					new DefaultValueAttribute(typeof(Point), "0, 0")
				},
				new Attribute[0]
			};
			PropertyDescriptor propertyDescriptor = null;
			for (int i = 0; i < array.Length; i++)
			{
				if (properties[array[i]] is PropertyDescriptor oldPropertyDescriptor)
				{
					properties[array[i]] = TypeDescriptor.CreateProperty(typeof(ControlDesigner), oldPropertyDescriptor, array2[i]);
				}
			}
			properties["Locked"] = TypeDescriptor.CreateProperty(typeof(ControlDesigner), "Locked", typeof(bool), DesignOnlyAttribute.Yes, BrowsableAttribute.Yes, CategoryAttribute.Design, new DefaultValueAttribute(value: false), new DescriptionAttribute("The Locked property determines if we can move or resize the control."));
		}

		internal object GetValue(object component, string propertyName)
		{
			return GetValue(component, propertyName, null);
		}

		internal object GetValue(object component, string propertyName, Type propertyType)
		{
			PropertyDescriptor propertyDescriptor = TypeDescriptor.GetProperties(component)[propertyName];
			if (propertyDescriptor == null)
			{
				throw new InvalidOperationException("Property \"" + propertyName + "\" is missing on " + component.GetType().AssemblyQualifiedName);
			}
			if (propertyType != null && !propertyType.IsAssignableFrom(propertyDescriptor.PropertyType))
			{
				throw new InvalidOperationException("Types do not match: " + propertyDescriptor.PropertyType.AssemblyQualifiedName + " : " + propertyType.AssemblyQualifiedName);
			}
			return propertyDescriptor.GetValue(component);
		}

		internal void SetValue(object component, string propertyName, object value)
		{
			PropertyDescriptor propertyDescriptor = TypeDescriptor.GetProperties(component)[propertyName];
			if (propertyDescriptor == null)
			{
				throw new InvalidOperationException("Property \"" + propertyName + "\" is missing on " + component.GetType().AssemblyQualifiedName);
			}
			if (!propertyDescriptor.PropertyType.IsAssignableFrom(value.GetType()))
			{
				throw new InvalidOperationException("Types do not match: " + value.GetType().AssemblyQualifiedName + " : " + propertyDescriptor.PropertyType.AssemblyQualifiedName);
			}
			if (!propertyDescriptor.IsReadOnly)
			{
				propertyDescriptor.SetValue(component, value);
			}
		}

		protected override void Dispose(bool disposing)
		{
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Expected O, but got Unknown
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Expected O, but got Unknown
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Expected O, but got Unknown
			if (disposing && Control != null)
			{
				UnhookChildControls(Control);
				OnMouseDragEnd(cancel: true);
				_messageRouter.Dispose();
				Control.DragDrop -= new DragEventHandler(OnDragDrop);
				Control.DragEnter -= new DragEventHandler(OnDragEnter);
				Control.DragLeave -= OnDragLeave;
				Control.DragOver -= new DragEventHandler(OnDragOver);
			}
			base.Dispose(disposing: true);
		}

		public virtual ControlDesigner InternalControlDesigner(int internalControlIndex)
		{
			return null;
		}

		public virtual int NumberOfInternalControlDesigners()
		{
			return 0;
		}

		protected bool EnableDesignMode(Control child, string name)
		{
			if (name == null)
			{
				throw new ArgumentNullException("name");
			}
			if (child == null)
			{
				throw new ArgumentNullException("child");
			}
			bool result = false;
			if (GetService(typeof(INestedContainer)) is INestedContainer nestedContainer)
			{
				nestedContainer.Add((IComponent?)child, name);
				result = true;
			}
			return result;
		}

		[MonoTODO]
		protected virtual ControlBodyGlyph GetControlGlyph(GlyphSelectionType selectionType)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public virtual GlyphCollection GetGlyphs(GlyphSelectionType selectionType)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public override void InitializeExistingComponent(IDictionary defaultValues)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public override void InitializeNewComponent(IDictionary defaultValues)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		protected virtual void OnDragComplete(DragEventArgs de)
		{
			throw new NotImplementedException();
		}
	}
	internal class DataMemberFieldConverter : TypeConverter
	{
	}
	[MonoTODO]
	internal sealed class DataMemberFieldEditor : UITypeEditor
	{
	}
	[MonoTODO]
	internal sealed class DataMemberListEditor : UITypeEditor
	{
	}
	internal class DataSourceConverter : TypeConverter
	{
	}
	internal sealed class DefaultMenuCommands
	{
		private IServiceProvider _serviceProvider;

		private const string DT_DATA_FORMAT = "DT_DATA_FORMAT";

		private object _clipboard;

		public DefaultMenuCommands(IServiceProvider serviceProvider)
		{
			if (serviceProvider == null)
			{
				throw new ArgumentNullException("serviceProvider");
			}
			_serviceProvider = serviceProvider;
		}

		public void AddTo(IMenuCommandService commands)
		{
			commands.AddCommand(new MenuCommand(Copy, StandardCommands.Copy));
			commands.AddCommand(new MenuCommand(Cut, StandardCommands.Cut));
			commands.AddCommand(new MenuCommand(Paste, StandardCommands.Paste));
			commands.AddCommand(new MenuCommand(Delete, StandardCommands.Delete));
			commands.AddCommand(new MenuCommand(SelectAll, StandardCommands.SelectAll));
		}

		private void Copy(object sender, EventArgs args)
		{
			IDesignerSerializationService designerSerializationService = GetService(typeof(IDesignerSerializationService)) as IDesignerSerializationService;
			IDesignerHost designerHost = GetService(typeof(IDesignerHost)) as IDesignerHost;
			ISelectionService selectionService = GetService(typeof(ISelectionService)) as ISelectionService;
			if (designerHost == null || designerSerializationService == null || selectionService == null)
			{
				return;
			}
			ICollection selectedComponents = selectionService.GetSelectedComponents();
			ArrayList arrayList = new ArrayList();
			foreach (object item in selectedComponents)
			{
				if (item != designerHost.RootComponent)
				{
					arrayList.Add(item);
					if (designerHost.GetDesigner((IComponent)item) is ComponentDesigner componentDesigner && componentDesigner.AssociatedComponents != null)
					{
						arrayList.AddRange(componentDesigner.AssociatedComponents);
					}
				}
			}
			object clipboard = designerSerializationService.Serialize(arrayList);
			_clipboard = clipboard;
		}

		private void Paste(object sender, EventArgs args)
		{
			IDesignerSerializationService designerSerializationService = GetService(typeof(IDesignerSerializationService)) as IDesignerSerializationService;
			ISelectionService selectionService = GetService(typeof(ISelectionService)) as ISelectionService;
			IDesignerHost designerHost = GetService(typeof(IDesignerHost)) as IDesignerHost;
			IComponentChangeService componentChangeService = GetService(typeof(IComponentChangeService)) as IComponentChangeService;
			if (designerHost == null || designerSerializationService == null || _clipboard == null)
			{
				return;
			}
			DesignerTransaction designerTransaction = designerHost.CreateTransaction("Paste");
			foreach (object item in designerSerializationService.Deserialize(_clipboard))
			{
				Control val = (Control)((item is Control) ? item : null);
				if (val == null)
				{
					continue;
				}
				PropertyDescriptor propertyDescriptor = TypeDescriptor.GetProperties(val)["Parent"];
				if (val.Parent != null)
				{
					if (componentChangeService != null)
					{
						componentChangeService.OnComponentChanging(val, propertyDescriptor);
						componentChangeService.OnComponentChanged(val, propertyDescriptor, null, val.Parent);
					}
					continue;
				}
				ParentControlDesigner parentControlDesigner = null;
				if (selectionService != null && selectionService.PrimarySelection != null)
				{
					parentControlDesigner = designerHost.GetDesigner((IComponent)selectionService.PrimarySelection) as ParentControlDesigner;
				}
				if (parentControlDesigner == null)
				{
					parentControlDesigner = designerHost.GetDesigner(designerHost.RootComponent) as DocumentDesigner;
				}
				if (parentControlDesigner != null && parentControlDesigner.CanParent(val))
				{
					propertyDescriptor.SetValue(val, parentControlDesigner.Control);
				}
			}
			_clipboard = null;
			designerTransaction.Commit();
			((IDisposable)designerTransaction).Dispose();
		}

		private void Cut(object sender, EventArgs args)
		{
			if (!(GetService(typeof(IDesignerHost)) is IDesignerHost designerHost))
			{
				return;
			}
			using DesignerTransaction designerTransaction = designerHost.CreateTransaction("Cut");
			Copy(this, EventArgs.Empty);
			Delete(this, EventArgs.Empty);
			designerTransaction.Commit();
		}

		private void Delete(object sender, EventArgs args)
		{
			IDesignerHost designerHost = GetService(typeof(IDesignerHost)) as IDesignerHost;
			ISelectionService selectionService = GetService(typeof(ISelectionService)) as ISelectionService;
			if (designerHost == null || selectionService == null)
			{
				return;
			}
			ICollection selectedComponents = selectionService.GetSelectedComponents();
			string description = "Delete " + ((selectedComponents.Count > 1) ? (selectedComponents.Count + " controls") : ((IComponent)selectionService.PrimarySelection).Site.Name);
			DesignerTransaction designerTransaction = designerHost.CreateTransaction(description);
			foreach (object item in selectedComponents)
			{
				if (item == designerHost.RootComponent)
				{
					continue;
				}
				if (designerHost.GetDesigner((IComponent)item) is ComponentDesigner componentDesigner && componentDesigner.AssociatedComponents != null)
				{
					foreach (object associatedComponent in componentDesigner.AssociatedComponents)
					{
						designerHost.DestroyComponent((IComponent)associatedComponent);
					}
				}
				designerHost.DestroyComponent((IComponent)item);
			}
			selectionService.SetSelectedComponents(selectedComponents, SelectionTypes.Remove);
			designerTransaction.Commit();
		}

		private void SelectAll(object sender, EventArgs args)
		{
			IDesignerHost designerHost = GetService(typeof(IDesignerHost)) as IDesignerHost;
			ISelectionService selectionService = GetService(typeof(ISelectionService)) as ISelectionService;
			if (designerHost != null)
			{
				selectionService?.SetSelectedComponents(designerHost.Container.Components, SelectionTypes.Replace);
			}
		}

		private object GetService(Type serviceType)
		{
			if (_serviceProvider != null)
			{
				return _serviceProvider.GetService(serviceType);
			}
			return null;
		}
	}
	public class DesignerOptions
	{
		[MonoTODO]
		[Browsable(false)]
		public virtual bool EnableInSituEditing
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public virtual Size GridSize
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public virtual bool ObjectBoundSmartTagAutoShow
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public virtual bool ShowGrid
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public virtual bool SnapToGrid
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public virtual bool UseOptimizedCodeGeneration
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public virtual bool UseSmartTags
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public virtual bool UseSnapLines
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}
	}
	public sealed class DockEditor : UITypeEditor
	{
		private class DockEditorControl : UserControl
		{
			private CheckBox buttonNone;

			private Panel panel1;

			private CheckBox buttonBottom;

			private CheckBox buttonTop;

			private Panel panel2;

			private CheckBox buttonLeft;

			private CheckBox buttonRight;

			private CheckBox buttonFill;

			private IWindowsFormsEditorService editorService;

			private DockStyle dockStyle;

			public DockStyle DockStyle
			{
				get
				{
					//IL_0001: Unknown result type (might be due to invalid IL or missing references)
					return dockStyle;
				}
				set
				{
					//IL_0001: Unknown result type (might be due to invalid IL or missing references)
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0050: Unknown result type (might be due to invalid IL or missing references)
					//IL_0055: Unknown result type (might be due to invalid IL or missing references)
					//IL_0056: Unknown result type (might be due to invalid IL or missing references)
					//IL_0074: Expected I4, but got Unknown
					dockStyle = value;
					buttonNone.Checked = false;
					buttonBottom.Checked = false;
					buttonTop.Checked = false;
					buttonLeft.Checked = false;
					buttonRight.Checked = false;
					buttonFill.Checked = false;
					DockStyle val = DockStyle;
					switch ((int)val)
					{
					case 5:
						buttonFill.CheckState = (CheckState)1;
						break;
					case 0:
						buttonNone.CheckState = (CheckState)1;
						break;
					case 3:
						buttonLeft.CheckState = (CheckState)1;
						break;
					case 4:
						buttonRight.CheckState = (CheckState)1;
						break;
					case 1:
						buttonTop.CheckState = (CheckState)1;
						break;
					case 2:
						buttonBottom.CheckState = (CheckState)1;
						break;
					}
				}
			}

			public DockEditorControl(IWindowsFormsEditorService editorService)
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_0011: Expected O, but got Unknown
				//IL_0012: Unknown result type (might be due to invalid IL or missing references)
				//IL_001c: Expected O, but got Unknown
				//IL_001d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0027: Expected O, but got Unknown
				//IL_0028: Unknown result type (might be due to invalid IL or missing references)
				//IL_0032: Expected O, but got Unknown
				//IL_0033: Unknown result type (might be due to invalid IL or missing references)
				//IL_003d: Expected O, but got Unknown
				//IL_003e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0048: Expected O, but got Unknown
				//IL_0049: Unknown result type (might be due to invalid IL or missing references)
				//IL_0053: Expected O, but got Unknown
				//IL_0054: Unknown result type (might be due to invalid IL or missing references)
				//IL_005e: Expected O, but got Unknown
				//IL_0489: Unknown result type (might be due to invalid IL or missing references)
				buttonNone = new CheckBox();
				panel1 = new Panel();
				buttonBottom = new CheckBox();
				buttonTop = new CheckBox();
				panel2 = new Panel();
				buttonLeft = new CheckBox();
				buttonRight = new CheckBox();
				buttonFill = new CheckBox();
				((Control)panel1).SuspendLayout();
				((Control)panel2).SuspendLayout();
				((Control)this).SuspendLayout();
				buttonNone.Appearance = (Appearance)1;
				((Control)buttonNone).Dock = (DockStyle)2;
				((Control)buttonNone).Location = new Point(0, 92);
				((Control)buttonNone).Size = new Size(150, 23);
				((Control)buttonNone).TabIndex = 5;
				((Control)buttonNone).Text = "None";
				((ButtonBase)buttonNone).TextAlign = (ContentAlignment)16;
				((Control)buttonNone).Click += buttonClick;
				((Control)panel1).Controls.Add((Control)(object)panel2);
				((Control)panel1).Controls.Add((Control)(object)buttonTop);
				((Control)panel1).Controls.Add((Control)(object)buttonBottom);
				((Control)panel1).Dock = (DockStyle)5;
				((Control)panel1).Location = new Point(0, 0);
				((Control)panel1).Name = "panel1";
				((Control)panel1).Size = new Size(150, 92);
				panel1.TabStop = false;
				buttonBottom.Appearance = (Appearance)1;
				((Control)buttonBottom).Dock = (DockStyle)2;
				((Control)buttonBottom).Location = new Point(0, 69);
				((Control)buttonBottom).Name = "buttonBottom";
				((Control)buttonBottom).Size = new Size(150, 23);
				((Control)buttonBottom).TabIndex = 5;
				((Control)buttonBottom).Click += buttonClick;
				buttonTop.Appearance = (Appearance)1;
				((Control)buttonTop).Dock = (DockStyle)1;
				((Control)buttonTop).Location = new Point(0, 0);
				((Control)buttonTop).Name = "buttonTop";
				((Control)buttonTop).Size = new Size(150, 23);
				((Control)buttonTop).TabIndex = 1;
				((Control)buttonTop).Click += buttonClick;
				((Control)panel2).Controls.Add((Control)(object)buttonFill);
				((Control)panel2).Controls.Add((Control)(object)buttonRight);
				((Control)panel2).Controls.Add((Control)(object)buttonLeft);
				((Control)panel2).Dock = (DockStyle)5;
				((Control)panel2).Location = new Point(0, 23);
				((Control)panel2).Size = new Size(150, 46);
				((Control)panel2).TabIndex = 2;
				panel2.TabStop = false;
				buttonLeft.Appearance = (Appearance)1;
				((Control)buttonLeft).Dock = (DockStyle)3;
				((Control)buttonLeft).Location = new Point(0, 0);
				((Control)buttonLeft).Size = new Size(24, 46);
				((Control)buttonLeft).TabIndex = 2;
				((Control)buttonLeft).Click += buttonClick;
				buttonRight.Appearance = (Appearance)1;
				((Control)buttonRight).Dock = (DockStyle)4;
				((Control)buttonRight).Location = new Point(126, 0);
				((Control)buttonRight).Size = new Size(24, 46);
				((Control)buttonRight).TabIndex = 4;
				((Control)buttonRight).Click += buttonClick;
				buttonFill.Appearance = (Appearance)1;
				((Control)buttonFill).Dock = (DockStyle)5;
				((Control)buttonFill).Location = new Point(24, 0);
				((Control)buttonFill).Size = new Size(102, 46);
				((Control)buttonFill).TabIndex = 3;
				((Control)buttonFill).Click += buttonClick;
				((Control)this).Controls.Add((Control)(object)panel1);
				((Control)this).Controls.Add((Control)(object)buttonNone);
				((Control)this).Size = new Size(150, 115);
				((Control)panel1).ResumeLayout(false);
				((Control)panel2).ResumeLayout(false);
				((Control)this).ResumeLayout(false);
				this.editorService = editorService;
				dockStyle = (DockStyle)0;
			}

			private void buttonClick(object sender, EventArgs e)
			{
				//IL_000b: Unknown result type (might be due to invalid IL or missing references)
				//IL_001d: Unknown result type (might be due to invalid IL or missing references)
				//IL_002f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0041: Unknown result type (might be due to invalid IL or missing references)
				//IL_0053: Unknown result type (might be due to invalid IL or missing references)
				//IL_0065: Unknown result type (might be due to invalid IL or missing references)
				if (sender == buttonNone)
				{
					dockStyle = (DockStyle)0;
				}
				else if (sender == buttonFill)
				{
					dockStyle = (DockStyle)5;
				}
				else if (sender == buttonLeft)
				{
					dockStyle = (DockStyle)3;
				}
				else if (sender == buttonRight)
				{
					dockStyle = (DockStyle)4;
				}
				else if (sender == buttonTop)
				{
					dockStyle = (DockStyle)1;
				}
				else if (sender == buttonBottom)
				{
					dockStyle = (DockStyle)2;
				}
				editorService.CloseDropDown();
			}
		}

		public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			if (context != null && provider != null)
			{
				IWindowsFormsEditorService val = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
				if (val != null)
				{
					DockEditorControl dockEditorControl = new DockEditorControl(val);
					dockEditorControl.DockStyle = (DockStyle)value;
					val.DropDownControl((Control)(object)dockEditorControl);
					return dockEditorControl.DockStyle;
				}
			}
			return ((UITypeEditor)this).EditValue(context, provider, value);
		}

		public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
		{
			return (UITypeEditorEditStyle)3;
		}
	}
	[ToolboxItemFilter("System.Windows.Forms")]
	public class DocumentDesigner : ScrollableControlDesigner, IRootDesigner, IDesigner, IDisposable, IToolboxUser
	{
		public class DesignerViewFrame : UserControl
		{
			private Panel DesignerPanel;

			private Splitter splitter1;

			private Panel ComponentTrayPanel;

			private ComponentTray _componentTray;

			private Control _designedControl;

			private bool _mouseDown;

			private bool _firstMove;

			public ComponentTray ComponentTray
			{
				get
				{
					return _componentTray;
				}
				set
				{
					((Control)this).SuspendLayout();
					((Control)ComponentTrayPanel).Controls.Remove((Control)(object)_componentTray);
					((Control)ComponentTrayPanel).Controls.Add((Control)(object)value);
					((Control)this).ResumeLayout();
					_componentTray = value;
					((Control)_componentTray).Visible = false;
				}
			}

			public Control DesignedControl
			{
				get
				{
					return _designedControl;
				}
				set
				{
				}
			}

			public DesignerViewFrame(Control designedControl, ComponentTray tray)
			{
				if (designedControl == null)
				{
					throw new ArgumentNullException("designedControl");
				}
				if (tray == null)
				{
					throw new ArgumentNullException("tray");
				}
				InitializeComponent();
				_designedControl = designedControl;
				((Control)this).SuspendLayout();
				((Control)DesignerPanel).Controls.Add(designedControl);
				((Control)this).ResumeLayout();
				ComponentTray = tray;
			}

			private void InitializeComponent()
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_000b: Expected O, but got Unknown
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0016: Expected O, but got Unknown
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				//IL_0021: Expected O, but got Unknown
				//IL_0181: Unknown result type (might be due to invalid IL or missing references)
				//IL_018b: Expected O, but got Unknown
				//IL_0198: Unknown result type (might be due to invalid IL or missing references)
				//IL_01a2: Expected O, but got Unknown
				//IL_01af: Unknown result type (might be due to invalid IL or missing references)
				//IL_01b9: Expected O, but got Unknown
				//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
				//IL_01d0: Expected O, but got Unknown
				ComponentTrayPanel = new Panel();
				splitter1 = new Splitter();
				DesignerPanel = new Panel();
				((Control)this).SuspendLayout();
				((Control)ComponentTrayPanel).BackColor = Color.LemonChiffon;
				((Control)ComponentTrayPanel).Dock = (DockStyle)2;
				((Control)ComponentTrayPanel).Location = new Point(0, 194);
				((Control)ComponentTrayPanel).Name = "ComponentTrayPanel";
				((Control)ComponentTrayPanel).Size = new Size(292, 72);
				((Control)ComponentTrayPanel).TabIndex = 1;
				((Control)ComponentTrayPanel).Visible = false;
				((Control)splitter1).Dock = (DockStyle)2;
				((Control)splitter1).Location = new Point(0, 186);
				((Control)splitter1).Name = "splitter1";
				((Control)splitter1).Size = new Size(292, 8);
				((Control)splitter1).TabIndex = 2;
				splitter1.TabStop = false;
				((Control)splitter1).Visible = false;
				((ScrollableControl)DesignerPanel).AutoScroll = true;
				((Control)DesignerPanel).BackColor = Color.White;
				((Control)DesignerPanel).Dock = (DockStyle)5;
				((Control)DesignerPanel).Location = new Point(0, 0);
				((Control)DesignerPanel).Name = "DesignerPanel";
				((Control)DesignerPanel).Size = new Size(292, 266);
				((Control)DesignerPanel).TabIndex = 0;
				((Control)DesignerPanel).MouseUp += new MouseEventHandler(DesignerPanel_MouseUp);
				((Control)DesignerPanel).MouseMove += new MouseEventHandler(DesignerPanel_MouseMove);
				((Control)DesignerPanel).MouseDown += new MouseEventHandler(DesignerPanel_MouseDown);
				((Control)DesignerPanel).Paint += new PaintEventHandler(DesignerPanel_Paint);
				((Control)this).Controls.Add((Control)(object)splitter1);
				((Control)this).Controls.Add((Control)(object)ComponentTrayPanel);
				((Control)this).Controls.Add((Control)(object)DesignerPanel);
				((Control)this).Name = "UserControl1";
				((Control)this).Size = new Size(292, 266);
				((Control)this).Dock = (DockStyle)5;
				((Control)this).ResumeLayout(false);
			}

			private void DesignerPanel_Paint(object sender, PaintEventArgs e)
			{
				if (((Component)(object)DesignedControl).Site.GetService(typeof(IUISelectionService)) is IUISelectionService iUISelectionService)
				{
					iUISelectionService.PaintAdornments((Control)(object)DesignerPanel, e.Graphics);
				}
			}

			private void DesignerPanel_MouseDown(object sender, MouseEventArgs e)
			{
				_mouseDown = true;
				_firstMove = true;
			}

			private void DesignerPanel_MouseMove(object sender, MouseEventArgs e)
			{
				if (!(((Component)(object)DesignedControl).Site.GetService(typeof(IUISelectionService)) is IUISelectionService iUISelectionService))
				{
					return;
				}
				iUISelectionService.SetCursor(e.X, e.Y);
				if (_mouseDown)
				{
					if (_firstMove)
					{
						iUISelectionService.MouseDragBegin((Control)(object)DesignerPanel, e.X, e.Y);
						_firstMove = false;
					}
					else
					{
						iUISelectionService.MouseDragMove(e.X, e.Y);
					}
				}
				else if (iUISelectionService.SelectionInProgress)
				{
					iUISelectionService.MouseDragMove(e.X, e.Y);
				}
			}

			private void DesignerPanel_MouseUp(object sender, MouseEventArgs e)
			{
				IUISelectionService iUISelectionService = ((Component)(object)DesignedControl).Site.GetService(typeof(IUISelectionService)) as IUISelectionService;
				if (_mouseDown)
				{
					iUISelectionService?.MouseDragEnd(cancel: false);
					_mouseDown = false;
				}
				else if (iUISelectionService.SelectionInProgress)
				{
					iUISelectionService.MouseDragEnd(cancel: false);
				}
			}

			public void ShowComponentTray()
			{
				if (!((Control)ComponentTray).Visible)
				{
					((Control)ComponentTrayPanel).Visible = true;
					((Control)ComponentTray).Visible = true;
					((Control)splitter1).Visible = true;
				}
			}

			public void HideComponentTray()
			{
				if (!((Control)ComponentTray).Visible)
				{
					((Control)ComponentTrayPanel).Visible = true;
					((Control)ComponentTray).Visible = true;
					((Control)splitter1).Visible = true;
				}
			}

			protected override void Dispose(bool disposing)
			{
				if (_designedControl != null)
				{
					((Control)DesignerPanel).Controls.Remove(_designedControl);
					_designedControl = null;
				}
				if (_componentTray != null)
				{
					((Control)ComponentTrayPanel).Controls.Remove((Control)(object)_componentTray);
					((Component)(object)_componentTray).Dispose();
					_componentTray = null;
				}
				((ContainerControl)this).Dispose(disposing);
			}
		}

		private DesignerViewFrame _designerViewFrame;

		protected IMenuEditorService menuEditorService;

		private DesignerViewFrame View => _designerViewFrame;

		ViewTechnology[] IRootDesigner.SupportedTechnologies => new ViewTechnology[1] { ViewTechnology.Default };

		public override SelectionRules SelectionRules => SelectionRules.BottomSizeable | SelectionRules.RightSizeable | SelectionRules.Visible;

		private Color BackColor
		{
			get
			{
				return (Color)base.ShadowProperties["BackColor"];
			}
			set
			{
				base.ShadowProperties["BackColor"] = value;
				Control.BackColor = value;
			}
		}

		private Point Location
		{
			get
			{
				return (Point)base.ShadowProperties["Location"];
			}
			set
			{
				base.ShadowProperties["Location"] = value;
			}
		}

		public override void Initialize(IComponent component)
		{
			base.Initialize(component);
			_designerViewFrame = new DesignerViewFrame(Control, new ComponentTray(this, component.Site));
			_designerViewFrame.DesignedControl.Location = new Point(15, 15);
			SetValue(base.Component, "Location", new Point(0, 0));
			if (GetService(typeof(IComponentChangeService)) is IComponentChangeService componentChangeService)
			{
				componentChangeService.ComponentAdded += OnComponentAdded;
				componentChangeService.ComponentRemoved += OnComponentRemoved;
			}
			IMenuCommandService menuCommandService = GetService(typeof(IMenuCommandService)) as IMenuCommandService;
			IServiceContainer serviceContainer = GetService(typeof(IServiceContainer)) as IServiceContainer;
			if (menuCommandService != null && serviceContainer != null)
			{
				new DefaultMenuCommands(serviceContainer).AddTo(menuCommandService);
			}
			InitializeSelectionService();
		}

		private void InitializeSelectionService()
		{
			if (!(GetService(typeof(IUISelectionService)) is IUISelectionService))
			{
				IServiceContainer serviceContainer = GetService(typeof(IServiceContainer)) as IServiceContainer;
				serviceContainer.AddService(typeof(IUISelectionService), new UISelectionService(serviceContainer));
			}
			(GetService(typeof(ISelectionService)) as ISelectionService).SetSelectedComponents(new IComponent[1] { base.Component });
		}

		protected override void Dispose(bool disposing)
		{
			if (disposing)
			{
				if (_designerViewFrame != null)
				{
					((Component)(object)_designerViewFrame).Dispose();
					_designerViewFrame = null;
				}
				if (GetService(typeof(IComponentChangeService)) is IComponentChangeService componentChangeService)
				{
					componentChangeService.ComponentAdded -= OnComponentAdded;
					componentChangeService.ComponentRemoved -= OnComponentRemoved;
				}
			}
			base.Dispose(disposing);
		}

		public override GlyphCollection GetGlyphs(GlyphSelectionType selectionType)
		{
			return base.GetGlyphs(selectionType);
		}

		protected override void WndProc(ref Message m)
		{
			base.WndProc(ref m);
		}

		protected override void OnContextMenu(int x, int y)
		{
			base.OnContextMenu(x, y);
		}

		protected override void OnCreateHandle()
		{
			base.OnCreateHandle();
		}

		private void OnComponentAdded(object sender, ComponentEventArgs args)
		{
			if (!(args.Component is Control))
			{
				View.ComponentTray.AddComponent(args.Component);
				if (View.ComponentTray.ComponentCount > 0 && !((Control)View.ComponentTray).Visible)
				{
					View.ShowComponentTray();
				}
			}
		}

		private void OnComponentRemoved(object sender, ComponentEventArgs args)
		{
			if (!(args.Component is Control))
			{
				View.ComponentTray.RemoveComponent(args.Component);
				if (View.ComponentTray.ComponentCount == 0 && ((Control)View.ComponentTray).Visible)
				{
					View.HideComponentTray();
				}
			}
		}

		object IRootDesigner.GetView(ViewTechnology technology)
		{
			if (technology != ViewTechnology.Default)
			{
				throw new ArgumentException("Only ViewTechnology.WindowsForms is supported.");
			}
			return _designerViewFrame;
		}

		bool IToolboxUser.GetToolSupported(ToolboxItem tool)
		{
			return GetToolSupported(tool);
		}

		protected virtual bool GetToolSupported(ToolboxItem tool)
		{
			return true;
		}

		void IToolboxUser.ToolPicked(ToolboxItem tool)
		{
			ToolPicked(tool);
		}

		protected virtual void ToolPicked(ToolboxItem tool)
		{
			ISelectionService selectionService = GetService(typeof(ISelectionService)) as ISelectionService;
			IDesignerHost designerHost = GetService(typeof(IDesignerHost)) as IDesignerHost;
			if (selectionService != null && designerHost != null)
			{
				IDesigner designer = designerHost.GetDesigner((IComponent)selectionService.PrimarySelection);
				if (designer is ParentControlDesigner)
				{
					ParentControlDesigner.InvokeCreateTool((ParentControlDesigner)designer, tool);
				}
				else
				{
					CreateTool(tool);
				}
			}
			else
			{
				CreateTool(tool);
			}
			object service = GetService(typeof(IToolboxService));
			((IToolboxService)((service is IToolboxService) ? service : null)).SelectedToolboxItemUsed();
		}

		protected override void PreFilterProperties(IDictionary properties)
		{
			base.PreFilterProperties(properties);
			if (properties["BackColor"] is PropertyDescriptor oldPropertyDescriptor)
			{
				properties["BackColor"] = TypeDescriptor.CreateProperty(typeof(DocumentDesigner), oldPropertyDescriptor, new DefaultValueAttribute(SystemColors.Control));
			}
			if (properties["Location"] is PropertyDescriptor oldPropertyDescriptor2)
			{
				properties["Location"] = TypeDescriptor.CreateProperty(typeof(DocumentDesigner), oldPropertyDescriptor2, new DefaultValueAttribute(typeof(Point), "0, 0"));
			}
		}

		protected virtual void EnsureMenuEditorService(IComponent c)
		{
			if (menuEditorService == null && c is ContextMenu)
			{
				menuEditorService = (IMenuEditorService)GetService(typeof(IMenuEditorService));
			}
		}
	}
	public sealed class EventHandlerService
	{
		private readonly Control _focusWnd;

		public Control FocusWindow => _focusWnd;

		public event EventHandler EventHandlerChanged;

		public EventHandlerService(Control focusWnd)
		{
			_focusWnd = focusWnd;
		}

		[MonoTODO]
		public object GetHandler(Type handlerType)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void PopHandler(object handler)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void PushHandler(object handler)
		{
			throw new NotImplementedException();
		}
	}
	public class FileNameEditor : UITypeEditor
	{
		[MonoTODO]
		public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
		{
			throw new NotImplementedException();
		}

		public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
		{
			return (UITypeEditorEditStyle)2;
		}

		[MonoTODO]
		protected virtual void InitializeDialog(OpenFileDialog openFileDialog)
		{
			throw new NotImplementedException();
		}
	}
	[MonoTODO]
	public class FolderNameEditor : UITypeEditor
	{
		protected enum FolderBrowserFolder
		{
			Desktop = 0,
			Favorites = 6,
			MyComputer = 17,
			MyDocuments = 5,
			MyPictures = 39,
			NetAndDialUpConnections = 49,
			NetworkNeighborhood = 18,
			Printers = 4,
			Recent = 8,
			SendTo = 9,
			StartMenu = 11,
			Templates = 21
		}

		[Flags]
		protected enum FolderBrowserStyles
		{
			BrowseForComputer = 0x1000,
			BrowseForEverything = 0x4000,
			BrowseForPrinter = 0x2000,
			RestrictToDomain = 2,
			RestrictToFilesystem = 1,
			RestrictToSubfolders = 8,
			ShowTextBox = 0x10
		}

		protected sealed class FolderBrowser : Component
		{
			private string descriptionText;

			private string directoryPath;

			private FolderBrowserStyles publicOptions;

			private FolderBrowserFolder startLocation;

			public string Description
			{
				get
				{
					return descriptionText;
				}
				set
				{
					descriptionText = ((value == null) ? string.Empty : value);
				}
			}

			public string DirectoryPath => directoryPath;

			public FolderBrowserFolder StartLocation
			{
				get
				{
					return startLocation;
				}
				set
				{
					startLocation = value;
				}
			}

			public FolderBrowserStyles Style
			{
				get
				{
					return publicOptions;
				}
				set
				{
					publicOptions = value;
				}
			}

			[MonoTODO]
			public FolderBrowser()
			{
				startLocation = FolderBrowserFolder.Desktop;
				publicOptions = FolderBrowserStyles.RestrictToFilesystem;
				descriptionText = string.Empty;
				directoryPath = string.Empty;
			}

			[MonoTODO]
			public DialogResult ShowDialog()
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				return ShowDialog(null);
			}

			[MonoTODO]
			public DialogResult ShowDialog(IWin32Window owner)
			{
				throw new NotImplementedException();
			}
		}

		private FolderBrowser folderBrowser;

		public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Invalid comparison between Unknown and I4
			if (folderBrowser == null)
			{
				folderBrowser = new FolderBrowser();
				InitializeDialog(folderBrowser);
			}
			if ((int)folderBrowser.ShowDialog() != 1)
			{
				return value;
			}
			return folderBrowser.DirectoryPath;
		}

		public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
		{
			return (UITypeEditorEditStyle)2;
		}

		protected virtual void InitializeDialog(FolderBrowser folderBrowser)
		{
		}
	}
	internal class FormDocumentDesigner : DocumentDesigner
	{
		public override void Initialize(IComponent component)
		{
			IComponent obj = ((component is Form) ? component : null) ?? throw new NotSupportedException("FormDocumentDesigner can be initialized only with Forms");
			((Form)obj).TopLevel = false;
			((Control)obj).Visible = true;
			base.Initialize(component);
		}

		public override bool CanParent(Control control)
		{
			if (control is Form)
			{
				return false;
			}
			return base.CanParent(control);
		}

		protected override void WndProc(ref Message m)
		{
			switch ((Native.Msg)((Message)(ref m)).Msg)
			{
			case Native.Msg.WM_NCLBUTTONDOWN:
			case Native.Msg.WM_NCLBUTTONDBLCLK:
			case Native.Msg.WM_NCRBUTTONDOWN:
			case Native.Msg.WM_NCRBUTTONDBLCLK:
			case Native.Msg.WM_NCMBUTTONDOWN:
			case Native.Msg.WM_NCMBUTTONDBLCLK:
				if (GetService(typeof(ISelectionService)) is ISelectionService selectionService)
				{
					selectionService.SetSelectedComponents(new object[1] { base.Component });
				}
				break;
			default:
				base.WndProc(ref m);
				break;
			}
		}
	}
	[MonoTODO]
	internal sealed class FormatStringEditor : UITypeEditor
	{
	}
	public interface IMenuEditorService
	{
		Menu GetMenu();

		bool IsActive();

		bool MessageFilter(ref Message m);

		void SetMenu(Menu menu);

		void SetSelection(MenuItem item);
	}
	internal interface IMessageReceiver
	{
		void WndProc(ref Message m);
	}
	internal interface IOleDragClient
	{
		bool CanModifyComponents { get; }

		IComponent Component { get; }

		bool AddComponent(IComponent component, string name, bool firstAdd);

		Control GetControlForComponent(object component);

		Control GetDesignerControl();

		bool IsDropOk(IComponent component);
	}
	internal interface ISelectionUIHandler
	{
		bool BeginDrag(object[] components, SelectionRules rules, int initialX, int initialY);

		void DragMoved(object[] components, Rectangle offset);

		void EndDrag(object[] components, bool cancel);

		Rectangle GetComponentBounds(object component);

		SelectionRules GetComponentRules(object component);

		Rectangle GetSelectionClipRect(object component);

		void OleDragDrop(DragEventArgs de);

		void OleDragEnter(DragEventArgs de);

		void OleDragLeave();

		void OleDragOver(DragEventArgs de);

		void OnSelectionDoubleClick(IComponent component);

		bool QueryBeginDrag(object[] components, SelectionRules rules, int initialX, int initialY);

		void ShowContextMenu(IComponent component);
	}
	internal interface IUISelectionService
	{
		bool SelectionInProgress { get; }

		bool DragDropInProgress { get; }

		bool ResizeInProgress { get; }

		Rectangle SelectionBounds { get; }

		void MouseDragBegin(Control container, int x, int y);

		void MouseDragMove(int x, int y);

		void MouseDragEnd(bool cancel);

		void DragBegin();

		void DragOver(Control container, int x, int y);

		void DragDrop(bool cancel, Control container, int x, int y);

		void PaintAdornments(Control container, Graphics gfx);

		bool SetCursor(int x, int y);

		bool AdornmentsHitTest(Control control, int x, int y);
	}
	internal class ImageCollectionEditor : CollectionEditor
	{
		public ImageCollectionEditor(Type type)
			: base(type)
		{
		}
	}
	[MonoTODO]
	internal sealed class ImageIndexEditor : UITypeEditor
	{
	}
	public class ImageListCodeDomSerializer : CodeDomSerializer
	{
		[MonoTODO]
		public override object Deserialize(IDesignerSerializationManager manager, object codeObject)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public override object Serialize(IDesignerSerializationManager manager, object value)
		{
			throw new NotImplementedException();
		}
	}
	internal sealed class ListControlStringCollectionEditor : StringCollectionEditor
	{
		public ListControlStringCollectionEditor(Type type)
			: base(type)
		{
		}
	}
	public abstract class MaskDescriptor
	{
		[MonoTODO]
		public virtual CultureInfo Culture
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		public abstract string Mask { get; }

		public abstract string Name { get; }

		public abstract string Sample { get; }

		public abstract Type ValidatingType { get; }

		[MonoTODO]
		public override bool Equals(object maskDescriptor)
		{
			return base.Equals(maskDescriptor);
		}

		[MonoTODO]
		public override int GetHashCode()
		{
			return base.GetHashCode();
		}

		[MonoTODO]
		public static bool IsValidMaskDescriptor(MaskDescriptor maskDescriptor)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static bool IsValidMaskDescriptor(MaskDescriptor maskDescriptor, out string validationErrorDescription)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public override string ToString()
		{
			return base.ToString();
		}
	}
	public sealed class MenuCommands : StandardCommands
	{
		public static readonly CommandID ComponentTrayMenu;

		public static readonly CommandID ContainerMenu;

		public static readonly CommandID DesignerProperties;

		public static readonly CommandID KeyCancel;

		public static readonly CommandID KeyDefaultAction;

		public static readonly CommandID KeyMoveDown;

		public static readonly CommandID KeyMoveLeft;

		public static readonly CommandID KeyMoveRight;

		public static readonly CommandID KeyMoveUp;

		public static readonly CommandID KeyNudgeDown;

		public static readonly CommandID KeyNudgeHeightDecrease;

		public static readonly CommandID KeyNudgeHeightIncrease;

		public static readonly CommandID KeyNudgeLeft;

		public static readonly CommandID KeyNudgeRight;

		public static readonly CommandID KeyNudgeUp;

		public static readonly CommandID KeyNudgeWidthDecrease;

		public static readonly CommandID KeyNudgeWidthIncrease;

		public static readonly CommandID KeyReverseCancel;

		public static readonly CommandID KeySelectNext;

		public static readonly CommandID KeySelectPrevious;

		public static readonly CommandID KeySizeHeightDecrease;

		public static readonly CommandID KeySizeHeightIncrease;

		public static readonly CommandID KeySizeWidthDecrease;

		public static readonly CommandID KeySizeWidthIncrease;

		public static readonly CommandID KeyTabOrderSelect;

		public static readonly CommandID SelectionMenu;

		public static readonly CommandID TraySelectionMenu;

		public static readonly CommandID EditLabel;

		public static readonly CommandID KeyEnd;

		public static readonly CommandID KeyHome;

		public static readonly CommandID KeyInvokeSmartTag;

		public static readonly CommandID KeyShiftEnd;

		public static readonly CommandID KeyShiftHome;

		public static readonly CommandID SetStatusRectangle;

		public static readonly CommandID SetStatusText;

		private static readonly Guid guidVSStd97;

		private static readonly Guid guidVSStd2K;

		private static readonly Guid wfCommandSet;

		private static readonly Guid wfMenuGroup;

		static MenuCommands()
		{
			wfMenuGroup = new Guid("{74D21312-2AEE-11d1-8BFB-00A0C90F26F7}");
			wfCommandSet = new Guid("{74D21313-2AEE-11d1-8BFB-00A0C90F26F7}");
			guidVSStd2K = new Guid("{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}");
			guidVSStd97 = new Guid("{5efc7975-14bc-11cf-9b2b-00aa00573819}");
			SelectionMenu = new CommandID(wfMenuGroup, 1280);
			ContainerMenu = new CommandID(wfMenuGroup, 1281);
			TraySelectionMenu = new CommandID(wfMenuGroup, 1283);
			ComponentTrayMenu = new CommandID(wfMenuGroup, 1286);
			DesignerProperties = new CommandID(wfCommandSet, 4097);
			KeyCancel = new CommandID(guidVSStd2K, 103);
			KeyReverseCancel = new CommandID(wfCommandSet, 16385);
			KeyDefaultAction = new CommandID(guidVSStd2K, 3);
			KeyMoveUp = new CommandID(guidVSStd2K, 11);
			KeyMoveDown = new CommandID(guidVSStd2K, 13);
			KeyMoveLeft = new CommandID(guidVSStd2K, 7);
			KeyMoveRight = new CommandID(guidVSStd2K, 9);
			KeyNudgeUp = new CommandID(guidVSStd2K, 1227);
			KeyNudgeDown = new CommandID(guidVSStd2K, 1225);
			KeyNudgeLeft = new CommandID(guidVSStd2K, 1224);
			KeyNudgeRight = new CommandID(guidVSStd2K, 1226);
			KeySizeWidthIncrease = new CommandID(guidVSStd2K, 10);
			KeySizeHeightIncrease = new CommandID(guidVSStd2K, 12);
			KeySizeWidthDecrease = new CommandID(guidVSStd2K, 8);
			KeySizeHeightDecrease = new CommandID(guidVSStd2K, 14);
			KeyNudgeWidthIncrease = new CommandID(guidVSStd2K, 1231);
			KeyNudgeHeightIncrease = new CommandID(guidVSStd2K, 1228);
			KeyNudgeWidthDecrease = new CommandID(guidVSStd2K, 1230);
			KeyNudgeHeightDecrease = new CommandID(guidVSStd2K, 1229);
			KeySelectNext = new CommandID(guidVSStd2K, 4);
			KeySelectPrevious = new CommandID(guidVSStd2K, 5);
			KeyTabOrderSelect = new CommandID(wfCommandSet, 16405);
			KeyHome = new CommandID(guidVSStd2K, 15);
			KeyShiftHome = new CommandID(guidVSStd2K, 16);
			KeyEnd = new CommandID(guidVSStd2K, 17);
			KeyShiftEnd = new CommandID(guidVSStd2K, 18);
			KeyInvokeSmartTag = new CommandID(guidVSStd2K, 147);
			EditLabel = new CommandID(guidVSStd97, 338);
			SetStatusText = new CommandID(wfCommandSet, 16387);
			SetStatusRectangle = new CommandID(wfCommandSet, 16388);
		}
	}
	internal class Native
	{
		public enum Msg
		{
			WM_CREATE = 1,
			WM_SETFOCUS = 7,
			WM_PAINT = 15,
			WM_CANCELMODE = 31,
			WM_SETCURSOR = 32,
			WM_CONTEXTMENU = 123,
			WM_NCHITTEST = 132,
			WM_GETOBJECT = 61,
			WM_MOUSEFIRST = 512,
			WM_MOUSEMOVE = 512,
			WM_LBUTTONDOWN = 513,
			WM_LBUTTONUP = 514,
			WM_LBUTTONDBLCLK = 515,
			WM_RBUTTONDOWN = 516,
			WM_RBUTTONUP = 517,
			WM_RBUTTONDBLCLK = 518,
			WM_MBUTTONDOWN = 519,
			WM_MBUTTONUP = 520,
			WM_MBUTTONDBLCLK = 521,
			WM_MOUSEWHEEL = 522,
			WM_MOUSELAST = 522,
			WM_NCMOUSEHOVER = 672,
			WM_MOUSEHOVER = 673,
			WM_NCMOUSELEAVE = 674,
			WM_MOUSELEAVE = 675,
			WM_NCMOUSEMOVE = 160,
			WM_NCLBUTTONDOWN = 161,
			WM_NCLBUTTONUP = 162,
			WM_NCLBUTTONDBLCLK = 163,
			WM_NCRBUTTONDOWN = 164,
			WM_NCRBUTTONUP = 165,
			WM_NCRBUTTONDBLCLK = 166,
			WM_NCMBUTTONDOWN = 167,
			WM_NCMBUTTONUP = 168,
			WM_NCMBUTTONDBLCLK = 169,
			WM_KEYFIRST = 256,
			WM_KEYDOWN = 256,
			WM_KEYUP = 257,
			WM_CHAR = 258,
			WM_DEADCHAR = 259,
			WM_SYSKEYDOWN = 260,
			WM_SYSKEYUP = 261,
			WM_SYS1CHAR = 262,
			WM_SYSDEADCHAR = 263,
			WM_KEYLAST = 264,
			WM_HSCROLL = 276,
			WM_VSCROLL = 277,
			WM_IME_SETCONTEXT = 641,
			WM_IME_NOTIFY = 642,
			WM_IME_CONTROL = 643,
			WM_IME_COMPOSITIONFULL = 644,
			WM_IME_SELECT = 645,
			WM_IME_CHAR = 646,
			WM_IME_REQUEST = 648,
			WM_IME_KEYDOWN = 656,
			WM_IME_KEYUP = 657,
			WM_MOUSE_ENTER = 1025
		}

		private static Type _xplatuiType;

		static Native()
		{
			Assembly assembly = Assembly.Load("System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089");
			if (assembly == null)
			{
				throw new InvalidOperationException("Can't load System.Windows.Forms assembly.");
			}
			_xplatuiType = assembly.GetType("System.Windows.Forms.XplatUI");
			if (_xplatuiType == null)
			{
				throw new InvalidOperationException("Can't find the System.Windows.Forms.XplatUI type.");
			}
		}

		private static object InvokeMethod(string methodName, object[] args)
		{
			return InvokeMethod(methodName, args, null);
		}

		private static object InvokeMethod(string methodName, object[] args, Type[] types)
		{
			MethodInfo methodInfo = null;
			methodInfo = ((types == null) ? _xplatuiType.GetMethod(methodName, BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.InvokeMethod) : _xplatuiType.GetMethod(methodName, BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, types, null));
			if (methodInfo == null)
			{
				throw new InvalidOperationException(methodName + " not found!");
			}
			return methodInfo.Invoke(null, args);
		}

		public static void DefWndProc(ref Message m)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			object[] array = new object[1] { m };
			((Message)(ref m)).Result = (IntPtr)InvokeMethod("DefWndProc", array);
			m = (Message)array[0];
		}

		public static IntPtr SendMessage(IntPtr hwnd, Msg message, IntPtr wParam, IntPtr lParam)
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			Type type = Assembly.Load("System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089").GetType("System.Windows.Forms.Message&");
			object[] array = new object[1] { Message.Create(hwnd, (int)message, wParam, lParam) };
			InvokeMethod("SendMessage", array, new Type[1] { type });
			Message val = (Message)array[0];
			return ((Message)(ref val)).Result;
		}

		public static Point PointToClient(Control control, Point point)
		{
			if (control == null)
			{
				throw new ArgumentNullException("control");
			}
			object[] array = new object[3] { control.Handle, point.X, point.Y };
			InvokeMethod("ScreenToClient", array);
			return new Point((int)array[1], (int)array[2]);
		}

		public static IntPtr SetParent(IntPtr childHandle, IntPtr parentHandle)
		{
			return (IntPtr)InvokeMethod("SetParent", new object[2] { childHandle, parentHandle });
		}

		public static int HiWord(int dword)
		{
			return (dword >> 16) & 0xFFFF;
		}

		public static int LoWord(int dword)
		{
			return dword & 0xFFFF;
		}

		public static IntPtr LParam(int hiword, int loword)
		{
			return (IntPtr)((loword << 16) | (hiword & 0xFFFF));
		}
	}
	internal class PanelDesigner : ParentControlDesigner
	{
		public override void Initialize(IComponent component)
		{
			base.Initialize(component);
		}

		protected override void OnPaintAdornments(PaintEventArgs pe)
		{
			base.OnPaintAdornments(pe);
			GraphicsState val = pe.Graphics.Save();
			pe.Graphics.TranslateTransform((float)Control.ClientRectangle.X, (float)Control.ClientRectangle.Y);
			ControlPaint.DrawBorder(pe.Graphics, Control.ClientRectangle, SystemColors.ControlDarkDark, (ButtonBorderStyle)2);
			pe.Graphics.Restore(val);
		}
	}
	public class ParentControlDesigner : ControlDesigner
	{
		private bool _defaultDrawGrid;

		private bool _defaultSnapToGrid;

		private Size _defaultGridSize;

		private bool _drawGrid;

		private bool _snapToGrid;

		private Size _gridSize;

		private Point _mouseDownPoint = Point.Empty;

		protected virtual Point DefaultControlLocation => new Point(0, 0);

		protected override bool EnableDragRect => true;

		protected virtual bool DrawGrid
		{
			get
			{
				return _drawGrid;
			}
			set
			{
				_drawGrid = value;
				if (!value)
				{
					SetValue(base.Component, "SnapToGrid", false);
				}
				PopulateGridProperties();
			}
		}

		private bool SnapToGrid
		{
			get
			{
				return _snapToGrid;
			}
			set
			{
				_snapToGrid = value;
				PopulateGridProperties();
			}
		}

		protected Size GridSize
		{
			get
			{
				return _gridSize;
			}
			set
			{
				_gridSize = value;
				PopulateGridProperties();
			}
		}

		[MonoTODO]
		protected virtual bool AllowControlLasso => false;

		[MonoTODO]
		protected virtual bool AllowGenericDragBox => false;

		[MonoTODO]
		protected internal virtual bool AllowSetChildIndexOnDrop => false;

		[MonoTODO]
		public override IList SnapLines => new object[0];

		[MonoTODO]
		protected ToolboxItem MouseDragTool => null;

		public override void Initialize(IComponent component)
		{
			base.Initialize(component);
			Control.AllowDrop = true;
			_defaultDrawGrid = true;
			_defaultSnapToGrid = true;
			_defaultGridSize = new Size(8, 8);
			if (Control.Parent != null)
			{
				ParentControlDesigner parentControlDesignerOf = GetParentControlDesignerOf(Control.Parent);
				if (parentControlDesignerOf != null)
				{
					_defaultDrawGrid = (bool)GetValue(parentControlDesignerOf.Component, "DrawGrid");
					_defaultSnapToGrid = (bool)GetValue(parentControlDesignerOf.Component, "SnapToGrid");
					_defaultGridSize = (Size)GetValue(parentControlDesignerOf.Component, "GridSize");
				}
			}
			else if (GetService(typeof(IDesignerOptionService)) is IDesignerOptionService designerOptionService)
			{
				object obj = null;
				obj = designerOptionService.GetOptionValue("WindowsFormsDesigner\\General", "DrawGrid");
				if (obj is bool)
				{
					_defaultDrawGrid = (bool)obj;
				}
				obj = designerOptionService.GetOptionValue("WindowsFormsDesigner\\General", "SnapToGrid");
				if (obj is bool)
				{
					_defaultSnapToGrid = (bool)obj;
				}
				obj = designerOptionService.GetOptionValue("WindowsFormsDesigner\\General", "GridSize");
				if (obj is Size)
				{
					_defaultGridSize = (Size)obj;
				}
			}
			if (GetService(typeof(IComponentChangeService)) is IComponentChangeService componentChangeService)
			{
				componentChangeService.ComponentRemoving += OnComponentRemoving;
				componentChangeService.ComponentRemoved += OnComponentRemoved;
			}
			_drawGrid = _defaultDrawGrid;
			_snapToGrid = _defaultSnapToGrid;
			_gridSize = _defaultGridSize;
		}

		protected override void Dispose(bool disposing)
		{
			if (disposing)
			{
				EnableDragDrop(value: false);
				OnMouseDragEnd(cancel: true);
			}
			base.Dispose(disposing);
		}

		protected static void InvokeCreateTool(ParentControlDesigner toInvoke, ToolboxItem tool)
		{
			toInvoke?.CreateTool(tool);
		}

		protected void CreateTool(ToolboxItem tool)
		{
			CreateToolCore(tool, DefaultControlLocation.X, DefaultControlLocation.Y, 0, 0, hasLocation: true, hasSize: false);
		}

		protected void CreateTool(ToolboxItem tool, Point location)
		{
			CreateToolCo

Room Architect Tool_Data/Managed/System.Diagnostics.StackTrace.dll

Decompiled 3 months ago
using System.Diagnostics;
using System.Diagnostics.SymbolStore;
using System.Reflection;
using System.Runtime.CompilerServices;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("System.Diagnostics.StackTrace")]
[assembly: AssemblyDescription("System.Diagnostics.StackTrace")]
[assembly: AssemblyDefaultAlias("System.Diagnostics.StackTrace")]
[assembly: AssemblyCompany("Mono development team")]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright("(c) Various Mono authors")]
[assembly: AssemblyInformationalVersion("4.0.0.0")]
[assembly: AssemblyFileVersion("4.0.0.0")]
[assembly: AssemblyVersion("4.1.1.0")]
[assembly: TypeForwardedTo(typeof(StackFrame))]
[assembly: TypeForwardedTo(typeof(StackTrace))]
[assembly: TypeForwardedTo(typeof(ISymbolBinder))]
[assembly: TypeForwardedTo(typeof(ISymbolBinder1))]
[assembly: TypeForwardedTo(typeof(ISymbolDocument))]
[assembly: TypeForwardedTo(typeof(ISymbolDocumentWriter))]
[assembly: TypeForwardedTo(typeof(ISymbolMethod))]
[assembly: TypeForwardedTo(typeof(ISymbolNamespace))]
[assembly: TypeForwardedTo(typeof(ISymbolReader))]
[assembly: TypeForwardedTo(typeof(ISymbolScope))]
[assembly: TypeForwardedTo(typeof(ISymbolVariable))]
[assembly: TypeForwardedTo(typeof(ISymbolWriter))]
[assembly: TypeForwardedTo(typeof(SymAddressKind))]
[assembly: TypeForwardedTo(typeof(SymbolToken))]
[assembly: TypeForwardedTo(typeof(SymDocumentType))]
[assembly: TypeForwardedTo(typeof(SymLanguageType))]
[assembly: TypeForwardedTo(typeof(SymLanguageVendor))]
namespace System
{
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoTODOAttribute : Attribute
	{
		private string comment;

		public string Comment => comment;

		public MonoTODOAttribute()
		{
		}

		public MonoTODOAttribute(string comment)
		{
			this.comment = comment;
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoDocumentationNoteAttribute : MonoTODOAttribute
	{
		public MonoDocumentationNoteAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoExtensionAttribute : MonoTODOAttribute
	{
		public MonoExtensionAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoInternalNoteAttribute : MonoTODOAttribute
	{
		public MonoInternalNoteAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoLimitationAttribute : MonoTODOAttribute
	{
		public MonoLimitationAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoNotSupportedAttribute : MonoTODOAttribute
	{
		public MonoNotSupportedAttribute(string comment)
			: base(comment)
		{
		}
	}
}
namespace System.Diagnostics
{
	public static class StackFrameExtensions
	{
		[MonoTODO]
		public static IntPtr GetNativeImageBase(this StackFrame stackFrame)
		{
			if (stackFrame == null)
			{
				throw new ArgumentNullException("stackFrame");
			}
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static IntPtr GetNativeIP(this StackFrame stackFrame)
		{
			if (stackFrame == null)
			{
				throw new ArgumentNullException("stackFrame");
			}
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static bool HasNativeImage(this StackFrame stackFrame)
		{
			if (stackFrame == null)
			{
				throw new ArgumentNullException("stackFrame");
			}
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static bool HasMethod(this StackFrame stackFrame)
		{
			if (stackFrame == null)
			{
				throw new ArgumentNullException("stackFrame");
			}
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static bool HasILOffset(this StackFrame stackFrame)
		{
			if (stackFrame == null)
			{
				throw new ArgumentNullException("stackFrame");
			}
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static bool HasSource(this StackFrame stackFrame)
		{
			if (stackFrame == null)
			{
				throw new ArgumentNullException("stackFrame");
			}
			throw new NotImplementedException();
		}
	}
}

Room Architect Tool_Data/Managed/System.DirectoryServices.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Configuration;
using System.Diagnostics;
using System.DirectoryServices.Design;
using System.Net;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Security;
using System.Security.AccessControl;
using System.Security.Permissions;
using System.Security.Principal;
using Novell.Directory.Ldap;
using Novell.Directory.Ldap.Utilclass;
using Unity;

[assembly: AllowPartiallyTrustedCallers]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("System.DirectoryServices.dll")]
[assembly: AssemblyDescription("System.DirectoryServices.dll")]
[assembly: AssemblyDefaultAlias("System.DirectoryServices.dll")]
[assembly: AssemblyCompany("Mono development team")]
[assembly: CompilationRelaxations(8)]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: SatelliteContractVersion("4.0.0.0")]
[assembly: AssemblyInformationalVersion("4.6.57.0")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: ComVisible(false)]
[assembly: CLSCompliant(true)]
[assembly: AssemblyDelaySign(true)]
[assembly: AssemblyCopyright("(c) Various Mono authors")]
[assembly: AssemblyFileVersion("4.6.57.0")]
[assembly: AssemblyVersion("4.0.0.0")]
internal static class Consts
{
	public const string MonoVersion = "5.11.0.0";

	public const string MonoCompany = "Mono development team";

	public const string MonoProduct = "Mono Common Language Infrastructure";

	public const string MonoCopyright = "(c) Various Mono authors";

	public const int MonoCorlibVersion = 1051100001;

	public const string FxVersion = "4.0.0.0";

	public const string FxFileVersion = "4.6.57.0";

	public const string EnvironmentVersion = "4.0.30319.42000";

	public const string VsVersion = "0.0.0.0";

	public const string VsFileVersion = "11.0.0.0";

	private const string PublicKeyToken = "b77a5c561934e089";

	public const string AssemblyI18N = "I18N, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMicrosoft_JScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMono_Http = "Mono.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Posix = "Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Security = "Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Messaging_RabbitMQ = "Mono.Messaging.RabbitMQ, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyCorlib = "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Data = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Design = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing_Design = "System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Messaging = "System.Messaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Security = "System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Web = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Core = "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string WindowsBase_3_0 = "WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
internal sealed class Locale
{
	private Locale()
	{
	}

	public static string GetText(string msg)
	{
		return msg;
	}

	public static string GetText(string fmt, params object[] args)
	{
		return string.Format(fmt, args);
	}
}
namespace System
{
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoTODOAttribute : Attribute
	{
		private string comment;

		public string Comment => comment;

		public MonoTODOAttribute()
		{
		}

		public MonoTODOAttribute(string comment)
		{
			this.comment = comment;
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoDocumentationNoteAttribute : MonoTODOAttribute
	{
		public MonoDocumentationNoteAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoExtensionAttribute : MonoTODOAttribute
	{
		public MonoExtensionAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoInternalNoteAttribute : MonoTODOAttribute
	{
		public MonoInternalNoteAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoLimitationAttribute : MonoTODOAttribute
	{
		public MonoLimitationAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoNotSupportedAttribute : MonoTODOAttribute
	{
		public MonoNotSupportedAttribute(string comment)
			: base(comment)
		{
		}
	}
}
namespace System.DirectoryServices
{
	public class ActiveDirectorySecurity : DirectoryObjectSecurity
	{
		public override Type AccessRightType
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		public override Type AccessRuleType
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		public override Type AuditRuleType
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		public void AddAccessRule(ActiveDirectoryAccessRule rule)
		{
			throw new NotImplementedException();
		}

		public void SetAccessRule(ActiveDirectoryAccessRule rule)
		{
			throw new NotImplementedException();
		}

		public void ResetAccessRule(ActiveDirectoryAccessRule rule)
		{
			throw new NotImplementedException();
		}

		public void RemoveAccess(IdentityReference identity, AccessControlType type)
		{
			throw new NotImplementedException();
		}

		public bool RemoveAccessRule(ActiveDirectoryAccessRule rule)
		{
			throw new NotImplementedException();
		}

		public void RemoveAccessRuleSpecific(ActiveDirectoryAccessRule rule)
		{
			throw new NotImplementedException();
		}

		public override bool ModifyAccessRule(AccessControlModification modification, AccessRule rule, out bool modified)
		{
			throw new NotImplementedException();
		}

		public override void PurgeAccessRules(IdentityReference identity)
		{
			throw new NotImplementedException();
		}

		public void AddAuditRule(ActiveDirectoryAuditRule rule)
		{
			throw new NotImplementedException();
		}

		public void SetAuditRule(ActiveDirectoryAuditRule rule)
		{
			throw new NotImplementedException();
		}

		public void RemoveAudit(IdentityReference identity)
		{
			throw new NotImplementedException();
		}

		public bool RemoveAuditRule(ActiveDirectoryAuditRule rule)
		{
			throw new NotImplementedException();
		}

		public void RemoveAuditRuleSpecific(ActiveDirectoryAuditRule rule)
		{
			throw new NotImplementedException();
		}

		public override bool ModifyAuditRule(AccessControlModification modification, AuditRule rule, out bool modified)
		{
			throw new NotImplementedException();
		}

		public override void PurgeAuditRules(IdentityReference identity)
		{
			throw new NotImplementedException();
		}

		public sealed override AccessRule AccessRuleFactory(IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type)
		{
			throw new NotImplementedException();
		}

		public sealed override AccessRule AccessRuleFactory(IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type, Guid objectGuid, Guid inheritedObjectGuid)
		{
			throw new NotImplementedException();
		}

		public sealed override AuditRule AuditRuleFactory(IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags)
		{
			throw new NotImplementedException();
		}

		public sealed override AuditRule AuditRuleFactory(IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags, Guid objectGuid, Guid inheritedObjectGuid)
		{
			throw new NotImplementedException();
		}
	}
	[DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true)]
	public class DirectoryEntryConfiguration
	{
		public ReferralChasingOption Referral
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public SecurityMasks SecurityMasks
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public int PageSize
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public int PasswordPort
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public PasswordEncodingMethod PasswordEncoding
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public string GetCurrentServerName()
		{
			throw new NotImplementedException();
		}

		public bool IsMutuallyAuthenticated()
		{
			throw new NotImplementedException();
		}

		public void SetUserNameQueryQuota(string accountName)
		{
			throw new NotImplementedException();
		}
	}
	[Flags]
	public enum SecurityMasks
	{
		None = 0,
		Owner = 1,
		Group = 2,
		Dacl = 4,
		Sacl = 8
	}
	public class ActiveDirectoryAccessRule : ObjectAccessRule
	{
		public ActiveDirectoryRights ActiveDirectoryRights
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		public ActiveDirectorySecurityInheritance InheritanceType
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		public ActiveDirectoryAccessRule(IdentityReference identity, ActiveDirectoryRights adRights, AccessControlType type)
			: this(identity, (int)adRights, type, Guid.Empty, isInherited: false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
		{
		}

		public ActiveDirectoryAccessRule(IdentityReference identity, ActiveDirectoryRights adRights, AccessControlType type, Guid objectType)
			: this(identity, (int)adRights, type, objectType, isInherited: false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
		{
		}

		public ActiveDirectoryAccessRule(IdentityReference identity, ActiveDirectoryRights adRights, AccessControlType type, ActiveDirectorySecurityInheritance inheritanceType)
			: this(identity, (int)adRights, type, Guid.Empty, isInherited: false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
		{
		}

		public ActiveDirectoryAccessRule(IdentityReference identity, ActiveDirectoryRights adRights, AccessControlType type, Guid objectType, ActiveDirectorySecurityInheritance inheritanceType)
			: this(identity, (int)adRights, type, objectType, isInherited: false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
		{
		}

		public ActiveDirectoryAccessRule(IdentityReference identity, ActiveDirectoryRights adRights, AccessControlType type, ActiveDirectorySecurityInheritance inheritanceType, Guid inheritedObjectType)
			: this(identity, (int)adRights, type, Guid.Empty, isInherited: false, InheritanceFlags.None, PropagationFlags.None, inheritedObjectType)
		{
		}

		public ActiveDirectoryAccessRule(IdentityReference identity, ActiveDirectoryRights adRights, AccessControlType type, Guid objectType, ActiveDirectorySecurityInheritance inheritanceType, Guid inheritedObjectType)
			: this(identity, (int)adRights, type, objectType, isInherited: false, InheritanceFlags.None, PropagationFlags.None, inheritedObjectType)
		{
		}

		internal ActiveDirectoryAccessRule(IdentityReference identity, int accessMask, AccessControlType type, Guid objectType, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, Guid inheritedObjectType)
			: base(identity, accessMask, isInherited, inheritanceFlags, propagationFlags, objectType, inheritedObjectType, type)
		{
		}
	}
	public class ActiveDirectoryAuditRule : ObjectAuditRule
	{
		public ActiveDirectoryRights ActiveDirectoryRights
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		public ActiveDirectorySecurityInheritance InheritanceType
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		public ActiveDirectoryAuditRule(IdentityReference identity, ActiveDirectoryRights adRights, AuditFlags auditFlags)
			: this(identity, (int)adRights, auditFlags, Guid.Empty, isInherited: false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
		{
		}

		public ActiveDirectoryAuditRule(IdentityReference identity, ActiveDirectoryRights adRights, AuditFlags auditFlags, Guid objectType)
			: this(identity, (int)adRights, auditFlags, objectType, isInherited: false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
		{
		}

		public ActiveDirectoryAuditRule(IdentityReference identity, ActiveDirectoryRights adRights, AuditFlags auditFlags, ActiveDirectorySecurityInheritance inheritanceType)
			: this(identity, (int)adRights, auditFlags, Guid.Empty, isInherited: false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
		{
		}

		public ActiveDirectoryAuditRule(IdentityReference identity, ActiveDirectoryRights adRights, AuditFlags auditFlags, Guid objectType, ActiveDirectorySecurityInheritance inheritanceType)
			: this(identity, (int)adRights, auditFlags, objectType, isInherited: false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
		{
		}

		public ActiveDirectoryAuditRule(IdentityReference identity, ActiveDirectoryRights adRights, AuditFlags auditFlags, ActiveDirectorySecurityInheritance inheritanceType, Guid inheritedObjectType)
			: this(identity, (int)adRights, auditFlags, Guid.Empty, isInherited: false, InheritanceFlags.None, PropagationFlags.None, inheritedObjectType)
		{
		}

		public ActiveDirectoryAuditRule(IdentityReference identity, ActiveDirectoryRights adRights, AuditFlags auditFlags, Guid objectType, ActiveDirectorySecurityInheritance inheritanceType, Guid inheritedObjectType)
			: this(identity, (int)adRights, auditFlags, objectType, isInherited: false, InheritanceFlags.None, PropagationFlags.None, inheritedObjectType)
		{
		}

		internal ActiveDirectoryAuditRule(IdentityReference identity, int accessMask, AuditFlags auditFlags, Guid objectGuid, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, Guid inheritedObjectType)
			: base(identity, accessMask, isInherited, inheritanceFlags, propagationFlags, objectGuid, inheritedObjectType, auditFlags)
		{
		}
	}
	[Flags]
	public enum ActiveDirectoryRights
	{
		Delete = 0x10000,
		ReadControl = 0x20000,
		WriteDacl = 0x40000,
		WriteOwner = 0x80000,
		Synchronize = 0x100000,
		AccessSystemSecurity = 0x1000000,
		GenericRead = 0x20094,
		GenericWrite = 0x20028,
		GenericExecute = 0x20004,
		GenericAll = 0xF01FF,
		CreateChild = 1,
		DeleteChild = 2,
		ListChildren = 4,
		Self = 8,
		ReadProperty = 0x10,
		WriteProperty = 0x20,
		DeleteTree = 0x40,
		ListObject = 0x80,
		ExtendedRight = 0x100
	}
	public enum ActiveDirectorySecurityInheritance
	{
		None,
		All,
		Descendents,
		SelfAndChildren,
		Children
	}
	[Serializable]
	[Flags]
	public enum AuthenticationTypes
	{
		Anonymous = 0x10,
		Delegation = 0x100,
		Encryption = 2,
		FastBind = 0x20,
		None = 0,
		ReadonlyServer = 4,
		Sealing = 0x80,
		Secure = 1,
		SecureSocketsLayer = 2,
		ServerBind = 0x200,
		Signing = 0x40
	}
	[AttributeUsage(AttributeTargets.All)]
	public class DSDescriptionAttribute : DescriptionAttribute
	{
		public override string Description => base.Description;

		public DSDescriptionAttribute(string description)
			: base(description)
		{
		}
	}
	public class DirectoryEntries : IEnumerable
	{
		private LdapConnection _Conn;

		private string _Bpath;

		private string _Buser;

		private string _Bpass;

		private string _Basedn;

		private ArrayList m_oValues;

		internal string Basedn
		{
			get
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				if (_Basedn == null)
				{
					string dN = new LdapUrl(_Bpath).getDN();
					if (dN != null)
					{
						_Basedn = dN;
					}
					else
					{
						_Basedn = "";
					}
				}
				return _Basedn;
			}
		}

		internal string Bpath
		{
			get
			{
				return _Bpath;
			}
			set
			{
				_Bpath = value;
			}
		}

		internal LdapConnection Conn
		{
			get
			{
				if (_Conn == null)
				{
					InitBlock();
				}
				return _Conn;
			}
			set
			{
				_Conn = value;
			}
		}

		public SchemaNameCollection SchemaFilter
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException("System.DirectoryServices.DirectoryEntries.SchemaFilter");
			}
		}

		private void InitBlock()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Expected O, but got Unknown
			try
			{
				LdapUrl val = new LdapUrl(_Bpath);
				_Conn = new LdapConnection();
				_Conn.Connect(val.Host, val.Port);
				_Conn.Bind(_Buser, _Bpass);
			}
			catch (LdapException val2)
			{
				throw val2;
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}

		internal DirectoryEntries(string path, string uname, string passwd)
		{
			_Bpath = path;
			_Buser = uname;
			_Bpass = passwd;
		}

		internal DirectoryEntries(string path, LdapConnection lc)
		{
			_Bpath = path;
			_Conn = lc;
		}

		public IEnumerator GetEnumerator()
		{
			//IL_003a: 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)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Expected O, but got Unknown
			m_oValues = new ArrayList();
			string[] array = new string[1] { "objectClass" };
			LdapSearchResults val = Conn.Search(Basedn, 1, "objectClass=*", array, false);
			LdapUrl val2 = new LdapUrl(_Bpath);
			string host = val2.Host;
			int port = val2.Port;
			while (val.hasMore())
			{
				LdapEntry val3 = null;
				try
				{
					val3 = val.next();
				}
				catch (LdapException)
				{
					continue;
				}
				DirectoryEntry directoryEntry = new DirectoryEntry(Conn);
				string dN = val3.DN;
				LdapUrl val5 = new LdapUrl(host, port, dN);
				directoryEntry.Path = ((object)val5).ToString();
				m_oValues.Add(directoryEntry);
			}
			return m_oValues.GetEnumerator();
		}

		public DirectoryEntry Add(string name, string schemaClassName)
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Expected O, but got Unknown
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Expected O, but got Unknown
			DirectoryEntry directoryEntry = new DirectoryEntry(Conn);
			LdapUrl val = new LdapUrl(_Bpath);
			string dN = val.getDN();
			string text = ((dN != null && dN.Length != 0) ? (name + "," + dN) : name);
			LdapUrl val2 = new LdapUrl(val.Host, val.Port, text);
			directoryEntry.Path = ((object)val2).ToString();
			directoryEntry.Nflag = true;
			return directoryEntry;
		}

		public void Remove(DirectoryEntry entry)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			LdapUrl val = new LdapUrl(_Bpath);
			string text = entry.Name + "," + val.getDN();
			Conn.Delete(text);
		}

		public DirectoryEntry Find(string name)
		{
			return CheckEntry(name);
		}

		public DirectoryEntry Find(string name, string schemaClassName)
		{
			DirectoryEntry directoryEntry = CheckEntry(name);
			if (directoryEntry != null)
			{
				if (directoryEntry.Properties["objectclass"].ContainsCaselessStringValue(schemaClassName))
				{
					return directoryEntry;
				}
				throw new SystemException("An unknown directory object was requested");
			}
			return directoryEntry;
		}

		private DirectoryEntry CheckEntry(string rdn)
		{
			//IL_008f: Expected O, but got Unknown
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Expected O, but got Unknown
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Expected O, but got Unknown
			string text = null;
			DirectoryEntry directoryEntry = null;
			text = rdn + "," + Basedn;
			string[] array = new string[1] { "objectClass" };
			try
			{
				LdapSearchResults val = Conn.Search(text, 0, "objectClass=*", array, false);
				if (val.hasMore())
				{
					try
					{
						val.next();
						directoryEntry = new DirectoryEntry(Conn);
						LdapUrl val2 = new LdapUrl(_Bpath);
						LdapUrl val3 = new LdapUrl(val2.Host, val2.Port, text);
						directoryEntry.Path = ((object)val3).ToString();
					}
					catch (LdapException val4)
					{
						throw val4;
					}
				}
			}
			catch (LdapException val5)
			{
				LdapException val6 = val5;
				if (val6.ResultCode == 32)
				{
					return null;
				}
				throw val6;
			}
			catch (Exception ex)
			{
				throw ex;
			}
			return directoryEntry;
		}

		internal DirectoryEntries()
		{
			ThrowStub.ThrowNotSupportedException();
		}
	}
	[TypeConverter(typeof(DirectoryEntryConverter))]
	public class DirectoryEntry : Component
	{
		private static readonly string DEFAULT_LDAP_HOST = "System.DirectoryServices.DefaultLdapHost";

		private static readonly string DEFAULT_LDAP_PORT = "System.DirectoryServices.DefaultLdapPort";

		private LdapConnection _conn;

		private AuthenticationTypes _AuthenticationType;

		private DirectoryEntries _Children;

		private string _Fdn;

		private string _Path = "";

		private string _Name;

		private DirectoryEntry _Parent;

		private string _Username;

		private string _Password;

		private PropertyCollection _Properties;

		private string _SchemaClassName;

		private bool _Nflag;

		private bool _usePropertyCache = true;

		private bool _inPropertiesLoading;

		internal string Fdn
		{
			get
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				if (_Fdn == null)
				{
					string dN = new LdapUrl(ADsPath).getDN();
					if (dN != null)
					{
						_Fdn = dN;
					}
					else
					{
						_Fdn = string.Empty;
					}
				}
				return _Fdn;
			}
		}

		internal LdapConnection conn
		{
			get
			{
				if (_conn == null)
				{
					InitBlock();
				}
				return _conn;
			}
			set
			{
				_conn = value;
			}
		}

		internal bool Nflag
		{
			get
			{
				return _Nflag;
			}
			set
			{
				_Nflag = value;
			}
		}

		[DSDescription("Type of authentication to use while Binding to Ldap server")]
		[DefaultValue(AuthenticationTypes.None)]
		public AuthenticationTypes AuthenticationType
		{
			get
			{
				return _AuthenticationType;
			}
			set
			{
				_AuthenticationType = value;
			}
		}

		[DSDescription("Child entries of this node")]
		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		[Browsable(false)]
		public DirectoryEntries Children
		{
			get
			{
				_Children = new DirectoryEntries(ADsPath, conn);
				return _Children;
			}
		}

		[Browsable(false)]
		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		[DSDescription("A globally unique identifier for this DirectoryEntry")]
		[MonoTODO]
		public Guid Guid
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		[DSDescription("The name of the object as named with the underlying directory")]
		[Browsable(false)]
		public string Name
		{
			get
			{
				if (_Name == null)
				{
					if (!CheckEntry(conn, ADsPath))
					{
						throw new SystemException("There is no such object on the server");
					}
					InitEntry();
				}
				return _Name;
			}
		}

		[DSDescription("This entry's parent in the Ldap Directory hierarchy.")]
		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		[Browsable(false)]
		public DirectoryEntry Parent
		{
			get
			{
				if (_Parent == null)
				{
					if (!CheckEntry(conn, ADsPath))
					{
						throw new SystemException("There is no such object on the server");
					}
					InitEntry();
				}
				return _Parent;
			}
		}

		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		[Browsable(false)]
		[DSDescription("The globally unique identifier of the DirectoryEntry, as returned from the provider")]
		[MonoTODO]
		public string NativeGuid
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		[DSDescription("The native Active Directory Service Interfaces (ADSI) object.")]
		[Browsable(false)]
		public object NativeObject
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		[DSDescription("An ActiveDirectorySecurity object that represents the security descriptor for this directory entry.")]
		[Browsable(false)]
		public ActiveDirectorySecurity ObjectSecurity
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
			[MonoTODO]
			set
			{
				throw new NotImplementedException();
			}
		}

		[DefaultValue(true)]
		[DSDescription("Determines if a cache should be used.")]
		public bool UsePropertyCache
		{
			get
			{
				return _usePropertyCache;
			}
			set
			{
				_usePropertyCache = value;
			}
		}

		[DSDescription("The provider-specific options for this entry.")]
		[Browsable(false)]
		[MonoTODO]
		public DirectoryEntryConfiguration Options
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		[DSDescription("The password to use when authenticating the client.")]
		[DefaultValue(null)]
		[Browsable(false)]
		public string Password
		{
			get
			{
				return _Password;
			}
			set
			{
				_Password = value;
			}
		}

		[Browsable(false)]
		[DSDescription("The user name to use when authenticating the client.")]
		[DefaultValue(null)]
		[TypeConverter("System.Diagnostics.Design.StringValueConverter, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
		public string Username
		{
			get
			{
				return _Username;
			}
			set
			{
				_Username = value;
			}
		}

		[TypeConverter("System.Diagnostics.Design.StringValueConverter, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
		[RecommendedAsConfigurable(true)]
		[DefaultValue("")]
		[DSDescription("The path for this DirectoryEntry.")]
		public string Path
		{
			get
			{
				return _Path;
			}
			set
			{
				if (value == null)
				{
					_Path = string.Empty;
				}
				else
				{
					_Path = value;
				}
			}
		}

		internal string ADsPath
		{
			get
			{
				//IL_006e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0078: Expected O, but got Unknown
				if (Path == null || Path == string.Empty)
				{
					DirectoryEntry directoryEntry = new DirectoryEntry();
					directoryEntry.InitToRootDse(null, -1);
					string text = (string)directoryEntry.Properties["defaultNamingContext"].Value;
					if (text == null)
					{
						text = (string)directoryEntry.Properties["namingContexts"].Value;
					}
					return ((object)new LdapUrl(DefaultHost, DefaultPort, text)).ToString();
				}
				return Path;
			}
		}

		[Browsable(false)]
		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		[DSDescription("Properties set on this object.")]
		public PropertyCollection Properties => GetProperties(forceLoad: true);

		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		[Browsable(false)]
		[DSDescription("The name of the schema used for this DirectoryEntry.")]
		public string SchemaClassName
		{
			get
			{
				if (_SchemaClassName == null)
				{
					_SchemaClassName = FindAttrValue("structuralObjectClass");
				}
				return _SchemaClassName;
			}
		}

		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		[Browsable(false)]
		[DSDescription("The current schema directory entry.")]
		public DirectoryEntry SchemaEntry
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		private string DefaultHost
		{
			get
			{
				string text = (string)AppDomain.CurrentDomain.GetData(DEFAULT_LDAP_HOST);
				if (text == null)
				{
					NameValueCollection nameValueCollection = (NameValueCollection)ConfigurationSettings.GetConfig("mainsoft.directoryservices/settings");
					if (nameValueCollection != null)
					{
						text = nameValueCollection["servername"];
					}
					if (text == null)
					{
						text = "localhost";
					}
					AppDomain.CurrentDomain.SetData(DEFAULT_LDAP_HOST, text);
				}
				return text;
			}
		}

		private int DefaultPort
		{
			get
			{
				string text = (string)AppDomain.CurrentDomain.GetData(DEFAULT_LDAP_PORT);
				if (text == null)
				{
					NameValueCollection nameValueCollection = (NameValueCollection)ConfigurationSettings.GetConfig("mainsoft.directoryservices/settings");
					if (nameValueCollection != null)
					{
						text = nameValueCollection["port"];
					}
					if (text == null)
					{
						text = "389";
					}
					AppDomain.CurrentDomain.SetData(DEFAULT_LDAP_PORT, text);
				}
				return int.Parse(text);
			}
		}

		private void InitBlock()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Expected O, but got Unknown
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Expected O, but got Unknown
			try
			{
				_conn = new LdapConnection();
				LdapUrl val = new LdapUrl(ADsPath);
				_conn.Connect(val.Host, val.Port);
				_conn.Bind(Username, Password, (AuthenticationTypes)AuthenticationType);
			}
			catch (LdapException val2)
			{
				throw val2;
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}

		private void InitEntry()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Expected O, but got Unknown
			LdapUrl val = new LdapUrl(ADsPath);
			string dN = val.getDN();
			if (dN != null)
			{
				if (string.Compare(dN, "rootDSE", ignoreCase: true) == 0)
				{
					InitToRootDse(val.Host, val.Port);
					return;
				}
				DN val2 = new DN(dN);
				string[] array = val2.explodeDN(false);
				_Name = array[0];
				_Parent = new DirectoryEntry(conn);
				_Parent.Path = GetLdapUrlString(val.Host, val.Port, ((object)val2.Parent).ToString());
			}
			else
			{
				_Name = val.Host + ":" + val.Port;
				_Parent = new DirectoryEntry(conn);
				_Parent.Path = "Ldap:";
			}
		}

		public DirectoryEntry()
		{
		}

		public DirectoryEntry(object adsObject)
		{
			throw new NotImplementedException();
		}

		public DirectoryEntry(string path)
		{
			_Path = path;
		}

		public DirectoryEntry(string path, string username, string password)
		{
			_Path = path;
			_Username = username;
			_Password = password;
		}

		public DirectoryEntry(string path, string username, string password, AuthenticationTypes authenticationType)
		{
			_Path = path;
			_Username = username;
			_Password = password;
			_AuthenticationType = authenticationType;
		}

		internal DirectoryEntry(LdapConnection lconn)
		{
			conn = lconn;
		}

		private void InitToRootDse(string host, int port)
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			if (host == null)
			{
				host = DefaultHost;
			}
			if (port < 0)
			{
				port = DefaultPort;
			}
			LdapUrl val = new LdapUrl(host, port, string.Empty);
			string[] propertiesToLoad = new string[2] { "+", "*" };
			SearchResult searchResult = new DirectorySearcher(new DirectoryEntry(((object)val).ToString(), Username, Password, AuthenticationType), null, propertiesToLoad, SearchScope.Base).FindOne();
			PropertyCollection propertyCollection = new PropertyCollection();
			foreach (string propertyName in searchResult.Properties.PropertyNames)
			{
				IEnumerator enumerator2 = searchResult.Properties[propertyName].GetEnumerator();
				if (enumerator2 == null)
				{
					continue;
				}
				while (enumerator2.MoveNext())
				{
					if (string.Compare(propertyName, "ADsPath", ignoreCase: true) != 0)
					{
						propertyCollection[propertyName].Add(enumerator2.Current);
					}
				}
			}
			SetProperties(propertyCollection);
			_Name = "rootDSE";
		}

		private void SetProperties(PropertyCollection pcoll)
		{
			_Properties = pcoll;
		}

		private PropertyCollection GetProperties(bool forceLoad)
		{
			if (_Properties == null)
			{
				PropertyCollection properties = new PropertyCollection(this);
				if (forceLoad && !Nflag)
				{
					LoadProperties(properties, null);
				}
				_Properties = properties;
			}
			return _Properties;
		}

		private void LoadProperties(PropertyCollection properties, string[] propertyNames)
		{
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Expected O, but got Unknown
			_inPropertiesLoading = true;
			try
			{
				LdapSearchResults val = conn.Search(Fdn, 0, "objectClass=*", propertyNames, false);
				if (!val.hasMore())
				{
					return;
				}
				LdapEntry val2 = val.next();
				string[] array = null;
				int num = 0;
				if (propertyNames != null)
				{
					num = propertyNames.Length;
					array = new string[num];
					for (int i = 0; i < num; i++)
					{
						array[i] = propertyNames[i].ToLower();
					}
				}
				foreach (LdapAttribute item in (ArrayList)(object)val2.getAttributeSet())
				{
					LdapAttribute val3 = item;
					string name = val3.Name;
					if (propertyNames == null || Array.IndexOf(array, name.ToLower()) != -1)
					{
						properties[name].Value = null;
						properties[name].AddRange(val3.StringValueArray);
						properties[name].Mbit = false;
					}
				}
			}
			finally
			{
				_inPropertiesLoading = false;
			}
		}

		private string FindAttrValue(string attrName)
		{
			string result = null;
			string[] array = new string[1] { attrName };
			LdapSearchResults val = conn.Search(Fdn, 0, "objectClass=*", array, false);
			if (val.hasMore())
			{
				LdapEntry val2 = null;
				try
				{
					val2 = val.next();
				}
				catch (LdapException val3)
				{
					throw val3;
				}
				result = val2.getAttribute(attrName).StringValue;
			}
			return result;
		}

		private void ModEntry(LdapModification[] mods)
		{
			try
			{
				conn.Modify(Fdn, mods);
			}
			catch (LdapException val)
			{
				throw val;
			}
		}

		private static bool CheckEntry(LdapConnection lconn, string epath)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Expected O, but got Unknown
			string text = new LdapUrl(epath).getDN();
			if (text == null)
			{
				text = string.Empty;
			}
			else if (string.Compare(text, "rootDSE", ignoreCase: true) == 0)
			{
				return true;
			}
			string[] array = new string[1] { "objectClass" };
			try
			{
				LdapSearchResults val = lconn.Search(text, 0, "objectClass=*", array, false);
				if (val.hasMore())
				{
					try
					{
						val.next();
					}
					catch (LdapException val2)
					{
						throw val2;
					}
				}
			}
			catch (LdapException val3)
			{
				LdapException val4 = val3;
				if (val4.ResultCode == 32)
				{
					return false;
				}
				throw val4;
			}
			catch (Exception ex)
			{
				throw ex;
			}
			return true;
		}

		public void Close()
		{
			if (_conn != null && _conn.Connected)
			{
				_conn.Disconnect();
			}
		}

		[MonoTODO]
		public DirectoryEntry CopyTo(DirectoryEntry newParent)
		{
			throw new NotImplementedException();
		}

		public void DeleteTree()
		{
			IEnumerator enumerator = Children.GetEnumerator();
			while (enumerator.MoveNext())
			{
				DirectoryEntry directoryEntry = (DirectoryEntry)enumerator.Current;
				conn.Delete(directoryEntry.Fdn);
			}
			conn.Delete(Fdn);
		}

		public static bool Exists(string path)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Expected O, but got Unknown
			LdapConnection val = new LdapConnection();
			LdapUrl val2 = new LdapUrl(path);
			val.Connect(val2.Host, val2.Port);
			val.Bind("", "");
			if (CheckEntry(val, path))
			{
				return true;
			}
			return false;
		}

		public void MoveTo(DirectoryEntry newParent)
		{
			string fdn = Parent.Fdn;
			conn.Rename(Fdn, Name, newParent.Fdn, true);
			Path = Path.Replace(fdn, newParent.Fdn);
			RefreshEntry();
		}

		public void MoveTo(DirectoryEntry newParent, string newName)
		{
			string fdn = Parent.Fdn;
			conn.Rename(Fdn, newName, newParent.Fdn, true);
			Path = Path.Replace(fdn, newParent.Fdn).Replace(Name, newName);
			RefreshEntry();
		}

		public void Rename(string newName)
		{
			string name = Name;
			conn.Rename(Fdn, newName, true);
			Path = Path.Replace(name, newName);
			RefreshEntry();
		}

		[MonoTODO]
		public object Invoke(string methodName, params object[] args)
		{
			throw new NotImplementedException();
		}

		[ComVisible(false)]
		[MonoNotSupported("")]
		public object InvokeGet(string propertyName)
		{
			throw new NotImplementedException();
		}

		[ComVisible(false)]
		[MonoNotSupported("")]
		public void InvokeSet(string propertyName, params object[] args)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public DirectoryEntry CopyTo(DirectoryEntry newParent, string newName)
		{
			throw new NotImplementedException();
		}

		public void CommitChanges()
		{
			if (UsePropertyCache)
			{
				CommitEntry();
			}
		}

		private void CommitEntry()
		{
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_0177: Expected O, but got Unknown
			//IL_020e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0218: Expected O, but got Unknown
			//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c9: Expected O, but got Unknown
			//IL_0242: Unknown result type (might be due to invalid IL or missing references)
			//IL_0249: Expected O, but got Unknown
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Expected O, but got Unknown
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Expected O, but got Unknown
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Expected O, but got Unknown
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Expected O, but got Unknown
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Expected O, but got Unknown
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0104: Expected O, but got Unknown
			PropertyCollection properties = GetProperties(forceLoad: false);
			if (!Nflag)
			{
				ArrayList arrayList = new ArrayList();
				foreach (string propertyName in properties.PropertyNames)
				{
					LdapAttribute val = null;
					if (properties[propertyName].Mbit)
					{
						switch (properties[propertyName].Count)
						{
						case 0:
							val = new LdapAttribute(propertyName, new string[0]);
							arrayList.Add((object?)new LdapModification(1, val));
							break;
						case 1:
						{
							string text2 = (string)properties[propertyName].Value;
							val = new LdapAttribute(propertyName, text2);
							arrayList.Add((object?)new LdapModification(2, val));
							break;
						}
						default:
						{
							object[] sourceArray = (object[])properties[propertyName].Value;
							string[] array = new string[properties[propertyName].Count];
							Array.Copy(sourceArray, 0, array, 0, properties[propertyName].Count);
							val = new LdapAttribute(propertyName, array);
							arrayList.Add((object?)new LdapModification(2, val));
							break;
						}
						}
						properties[propertyName].Mbit = false;
					}
				}
				if (arrayList.Count > 0)
				{
					LdapModification[] array2 = (LdapModification[])(object)new LdapModification[arrayList.Count];
					Type typeFromHandle = typeof(LdapModification);
					array2 = (LdapModification[])arrayList.ToArray(typeFromHandle);
					ModEntry(array2);
				}
				return;
			}
			LdapAttributeSet val2 = new LdapAttributeSet();
			foreach (string propertyName2 in properties.PropertyNames)
			{
				if (properties[propertyName2].Count == 1)
				{
					string text4 = (string)properties[propertyName2].Value;
					((SetSupport)val2).Add((object)new LdapAttribute(propertyName2, text4));
					continue;
				}
				object[] sourceArray2 = (object[])properties[propertyName2].Value;
				string[] array3 = new string[properties[propertyName2].Count];
				Array.Copy(sourceArray2, 0, array3, 0, properties[propertyName2].Count);
				((SetSupport)val2).Add((object)new LdapAttribute(propertyName2, array3));
			}
			LdapEntry val3 = new LdapEntry(Fdn, val2);
			conn.Add(val3);
			Nflag = false;
		}

		internal void CommitDeferred()
		{
			if (!_inPropertiesLoading && !UsePropertyCache && !Nflag)
			{
				CommitEntry();
			}
		}

		private void RefreshEntry()
		{
			_Properties = null;
			_Fdn = null;
			_Name = null;
			_Parent = null;
			_SchemaClassName = null;
			InitEntry();
		}

		public void RefreshCache()
		{
			PropertyCollection properties = new PropertyCollection();
			LoadProperties(properties, null);
			SetProperties(properties);
		}

		public void RefreshCache(string[] propertyNames)
		{
			LoadProperties(GetProperties(forceLoad: false), propertyNames);
		}

		protected override void Dispose(bool disposing)
		{
			if (disposing)
			{
				Close();
			}
			base.Dispose(disposing);
		}

		internal static string GetLdapUrlString(string host, int port, string dn)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			LdapUrl val = ((port != 389) ? new LdapUrl(host, port, dn) : new LdapUrl(host, 0, dn));
			return ((object)val).ToString();
		}
	}
	public class DirectorySearcher : Component
	{
		private static readonly TimeSpan DefaultTimeSpan = new TimeSpan(-10000000L);

		private DirectoryEntry _SearchRoot;

		private bool _CacheResults = true;

		private TimeSpan _ClientTimeout = DefaultTimeSpan;

		private string _Filter = "(objectClass=*)";

		private int _PageSize;

		private StringCollection _PropertiesToLoad = new StringCollection();

		private bool _PropertyNamesOnly;

		private ReferralChasingOption _ReferralChasing = ReferralChasingOption.External;

		private SearchScope _SearchScope = SearchScope.Subtree;

		private TimeSpan _ServerPageTimeLimit = DefaultTimeSpan;

		private TimeSpan _serverTimeLimit = DefaultTimeSpan;

		private int _SizeLimit;

		private LdapConnection _conn;

		private string _Host;

		private int _Port = 389;

		private SearchResultCollection _SrchColl;

		internal SearchResultCollection SrchColl
		{
			get
			{
				if (_SrchColl == null)
				{
					_SrchColl = new SearchResultCollection();
					DoSearch();
				}
				return _SrchColl;
			}
		}

		[DefaultValue(true)]
		[DSDescription("The cacheability of results.")]
		public bool CacheResults
		{
			get
			{
				return _CacheResults;
			}
			set
			{
				_CacheResults = value;
			}
		}

		[DSDescription("The maximum amount of time that the client waits for the server to return results.")]
		public TimeSpan ClientTimeout
		{
			get
			{
				return _ClientTimeout;
			}
			set
			{
				_ClientTimeout = value;
			}
		}

		[DefaultValue("(objectClass=*)")]
		[DSDescription("The Lightweight Directory Access Protocol (Ldap) format filter string.")]
		[RecommendedAsConfigurable(true)]
		[TypeConverter("System.Diagnostics.Design.StringValueConverter, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
		public string Filter
		{
			get
			{
				return _Filter;
			}
			set
			{
				_Filter = value;
				ClearCachedResults();
			}
		}

		[DefaultValue(0)]
		[DSDescription("The page size in a paged search.")]
		public int PageSize
		{
			get
			{
				return _PageSize;
			}
			set
			{
				_PageSize = value;
			}
		}

		[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
		[DSDescription("The set of properties retrieved during the search.")]
		[Editor("System.Windows.Forms.Design.StringCollectionEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
		public StringCollection PropertiesToLoad => _PropertiesToLoad;

		[DefaultValue(false)]
		[DSDescription("A value indicating whether the search retrieves only the names of attributes to which values have been assigned.")]
		public bool PropertyNamesOnly
		{
			get
			{
				return _PropertyNamesOnly;
			}
			set
			{
				_PropertyNamesOnly = value;
			}
		}

		[DSDescription("How referrals are chased.")]
		[DefaultValue(ReferralChasingOption.External)]
		public ReferralChasingOption ReferralChasing
		{
			get
			{
				return _ReferralChasing;
			}
			set
			{
				_ReferralChasing = value;
			}
		}

		[DSDescription("The node in the Ldap Directory hierarchy where the search starts.")]
		[DefaultValue(null)]
		public DirectoryEntry SearchRoot
		{
			get
			{
				return _SearchRoot;
			}
			set
			{
				_SearchRoot = value;
				ClearCachedResults();
			}
		}

		[DSDescription("The scope of the search that is observed by the server.")]
		[RecommendedAsConfigurable(true)]
		[DefaultValue(SearchScope.Subtree)]
		public SearchScope SearchScope
		{
			get
			{
				return _SearchScope;
			}
			set
			{
				_SearchScope = value;
				ClearCachedResults();
			}
		}

		[DSDescription("The time limit the server should observe to search an individual page of results.")]
		public TimeSpan ServerPageTimeLimit
		{
			get
			{
				return _ServerPageTimeLimit;
			}
			set
			{
				_ServerPageTimeLimit = value;
			}
		}

		[DSDescription("The time limit the server should observe to search.")]
		public TimeSpan ServerTimeLimit
		{
			[MonoTODO]
			get
			{
				return _serverTimeLimit;
			}
			[MonoTODO]
			set
			{
				_serverTimeLimit = value;
			}
		}

		[DSDescription("The maximum number of objects the server returns in a search.")]
		[DefaultValue(0)]
		public int SizeLimit
		{
			get
			{
				return _SizeLimit;
			}
			set
			{
				if (value < 0)
				{
					throw new ArgumentException();
				}
				_SizeLimit = value;
			}
		}

		[TypeConverter(typeof(ExpandableObjectConverter))]
		[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
		[DSDescription("An object that defines how the data should be sorted.")]
		public SortOption Sort
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
			[MonoTODO]
			set
			{
				throw new NotImplementedException();
			}
		}

		public bool Asynchronous
		{
			get
			{
				ThrowStub.ThrowNotSupportedException();
				return default(bool);
			}
			set
			{
				ThrowStub.ThrowNotSupportedException();
			}
		}

		public string AttributeScopeQuery
		{
			get
			{
				ThrowStub.ThrowNotSupportedException();
				return null;
			}
			set
			{
				ThrowStub.ThrowNotSupportedException();
			}
		}

		public DereferenceAlias DerefAlias
		{
			get
			{
				ThrowStub.ThrowNotSupportedException();
				return default(DereferenceAlias);
			}
			set
			{
				ThrowStub.ThrowNotSupportedException();
			}
		}

		public DirectorySynchronization DirectorySynchronization
		{
			get
			{
				ThrowStub.ThrowNotSupportedException();
				return null;
			}
			set
			{
				ThrowStub.ThrowNotSupportedException();
			}
		}

		public ExtendedDN ExtendedDN
		{
			get
			{
				ThrowStub.ThrowNotSupportedException();
				return default(ExtendedDN);
			}
			set
			{
				ThrowStub.ThrowNotSupportedException();
			}
		}

		public SecurityMasks SecurityMasks
		{
			get
			{
				ThrowStub.ThrowNotSupportedException();
				return default(SecurityMasks);
			}
			set
			{
				ThrowStub.ThrowNotSupportedException();
			}
		}

		public bool Tombstone
		{
			get
			{
				ThrowStub.ThrowNotSupportedException();
				return default(bool);
			}
			set
			{
				ThrowStub.ThrowNotSupportedException();
			}
		}

		public DirectoryVirtualListView VirtualListView
		{
			get
			{
				ThrowStub.ThrowNotSupportedException();
				return null;
			}
			set
			{
				ThrowStub.ThrowNotSupportedException();
			}
		}

		private void InitBlock()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Expected O, but got Unknown
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			_conn = new LdapConnection();
			LdapUrl val = new LdapUrl(SearchRoot.ADsPath);
			_Host = val.Host;
			_Port = val.Port;
			_conn.Connect(_Host, _Port);
			_conn.Bind(SearchRoot.Username, SearchRoot.Password, (AuthenticationTypes)SearchRoot.AuthenticationType);
		}

		public DirectorySearcher()
		{
		}

		public DirectorySearcher(DirectoryEntry searchRoot)
		{
			_SearchRoot = searchRoot;
		}

		public DirectorySearcher(string filter)
		{
			_Filter = filter;
		}

		public DirectorySearcher(DirectoryEntry searchRoot, string filter)
		{
			_SearchRoot = searchRoot;
			_Filter = filter;
		}

		public DirectorySearcher(string filter, string[] propertiesToLoad)
		{
			_Filter = filter;
			PropertiesToLoad.AddRange(propertiesToLoad);
		}

		public DirectorySearcher(DirectoryEntry searchRoot, string filter, string[] propertiesToLoad)
		{
			_SearchRoot = searchRoot;
			_Filter = filter;
			PropertiesToLoad.AddRange(propertiesToLoad);
		}

		public DirectorySearcher(string filter, string[] propertiesToLoad, SearchScope scope)
		{
			_SearchScope = scope;
			_Filter = filter;
			PropertiesToLoad.AddRange(propertiesToLoad);
		}

		public DirectorySearcher(DirectoryEntry searchRoot, string filter, string[] propertiesToLoad, SearchScope scope)
		{
			_SearchRoot = searchRoot;
			_SearchScope = scope;
			_Filter = filter;
			PropertiesToLoad.AddRange(propertiesToLoad);
		}

		public SearchResult FindOne()
		{
			if (SrchColl.Count == 0)
			{
				return null;
			}
			return SrchColl[0];
		}

		public SearchResultCollection FindAll()
		{
			return SrchColl;
		}

		private void DoSearch()
		{
			//IL_00d4: Expected O, but got Unknown
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_0147: Expected O, but got Unknown
			InitBlock();
			string[] array = new string[PropertiesToLoad.Count];
			PropertiesToLoad.CopyTo(array, 0);
			LdapSearchConstraints searchConstraints = _conn.SearchConstraints;
			if (SizeLimit > 0)
			{
				searchConstraints.MaxResults = SizeLimit;
			}
			if (ServerTimeLimit != DefaultTimeSpan)
			{
				searchConstraints.ServerTimeLimit = (int)ServerTimeLimit.TotalSeconds;
			}
			int num = 2;
			num = _SearchScope switch
			{
				SearchScope.Base => 0, 
				SearchScope.OneLevel => 1, 
				SearchScope.Subtree => 2, 
				_ => 2, 
			};
			LdapSearchResults val = _conn.Search(SearchRoot.Fdn, num, Filter, array, PropertyNamesOnly, searchConstraints);
			while (val.hasMore())
			{
				LdapEntry val2 = null;
				try
				{
					val2 = val.next();
				}
				catch (LdapException val3)
				{
					LdapException val4 = val3;
					int resultCode = val4.ResultCode;
					if ((uint)(resultCode - 3) <= 1u || resultCode == 10)
					{
						continue;
					}
					throw val4;
				}
				DirectoryEntry directoryEntry = new DirectoryEntry(_conn);
				PropertyCollection propertyCollection = new PropertyCollection();
				directoryEntry.Path = DirectoryEntry.GetLdapUrlString(_Host, _Port, val2.DN);
				IEnumerator enumerator = ((ArrayList)(object)val2.getAttributeSet()).GetEnumerator();
				if (enumerator != null)
				{
					while (enumerator.MoveNext())
					{
						LdapAttribute val5 = (LdapAttribute)enumerator.Current;
						string name = val5.Name;
						propertyCollection[name].AddRange(val5.StringValueArray);
					}
				}
				if (!propertyCollection.Contains("ADsPath"))
				{
					propertyCollection["ADsPath"].Add(directoryEntry.Path);
				}
				_SrchColl.Add(new SearchResult(directoryEntry, propertyCollection));
			}
		}

		[MonoTODO]
		protected override void Dispose(bool disposing)
		{
			if (disposing && _conn != null && _conn.Connected)
			{
				_conn.Disconnect();
			}
			base.Dispose(disposing);
		}

		private void ClearCachedResults()
		{
			_SrchColl = null;
		}
	}
	[Serializable]
	public class DirectoryServicesCOMException : COMException, ISerializable
	{
		public int ExtendedError
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		public string ExtendedErrorMessage
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		public DirectoryServicesCOMException()
		{
		}

		public DirectoryServicesCOMException(string message)
			: base(message)
		{
		}

		public DirectoryServicesCOMException(string message, Exception inner)
			: base(message, inner)
		{
		}

		protected DirectoryServicesCOMException(SerializationInfo info, StreamingContext context)
			: base(info, context)
		{
		}

		[SecurityPermission(SecurityAction.LinkDemand, SerializationFormatter = true)]
		[SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
		public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext)
		{
			throw new NotImplementedException();
		}
	}
	[Serializable]
	public sealed class DirectoryServicesPermission : ResourcePermissionBase
	{
		private DirectoryServicesPermissionEntryCollection innerCollection;

		public DirectoryServicesPermissionEntryCollection PermissionEntries
		{
			get
			{
				if (innerCollection == null)
				{
					innerCollection = new DirectoryServicesPermissionEntryCollection(this);
				}
				return innerCollection;
			}
		}

		public DirectoryServicesPermission()
		{
			SetUp();
		}

		public DirectoryServicesPermission(DirectoryServicesPermissionEntry[] permissionAccessEntries)
		{
			SetUp();
			innerCollection = new DirectoryServicesPermissionEntryCollection(this);
			innerCollection.AddRange(permissionAccessEntries);
		}

		public DirectoryServicesPermission(PermissionState state)
			: base(state)
		{
			SetUp();
		}

		public DirectoryServicesPermission(DirectoryServicesPermissionAccess permissionAccess, string path)
		{
			SetUp();
			innerCollection = new DirectoryServicesPermissionEntryCollection(this);
			innerCollection.Add(new DirectoryServicesPermissionEntry(permissionAccess, path));
		}

		private void SetUp()
		{
			((ResourcePermissionBase)this).PermissionAccessType = typeof(DirectoryServicesPermissionAccess);
			((ResourcePermissionBase)this).TagNames = new string[1] { "Path" };
		}

		internal ResourcePermissionBaseEntry[] GetEntries()
		{
			return ((ResourcePermissionBase)this).GetPermissionEntries();
		}

		internal void ClearEntries()
		{
			((ResourcePermissionBase)this).Clear();
		}

		internal void Add(object obj)
		{
			DirectoryServicesPermissionEntry directoryServicesPermissionEntry = obj as DirectoryServicesPermissionEntry;
			((ResourcePermissionBase)this).AddPermissionAccess(directoryServicesPermissionEntry.GetBaseEntry());
		}

		internal void Remove(object obj)
		{
			DirectoryServicesPermissionEntry directoryServicesPermissionEntry = obj as DirectoryServicesPermissionEntry;
			((ResourcePermissionBase)this).RemovePermissionAccess(directoryServicesPermissionEntry.GetBaseEntry());
		}
	}
	[Serializable]
	[Flags]
	public enum DirectoryServicesPermissionAccess
	{
		None = 0,
		Browse = 2,
		Write = 6
	}
	[Serializable]
	[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Event, AllowMultiple = true, Inherited = false)]
	public class DirectoryServicesPermissionAttribute : CodeAccessSecurityAttribute
	{
		private string path;

		private DirectoryServicesPermissionAccess access;

		public string Path
		{
			get
			{
				return path;
			}
			set
			{
				if (value == null)
				{
					throw new ArgumentNullException("Path");
				}
				path = value;
			}
		}

		public DirectoryServicesPermissionAccess PermissionAccess
		{
			get
			{
				return access;
			}
			set
			{
				access = value;
			}
		}

		public DirectoryServicesPermissionAttribute(SecurityAction action)
			: base(action)
		{
			path = "*";
			access = DirectoryServicesPermissionAccess.Browse;
		}

		public override IPermission CreatePermission()
		{
			if (base.Unrestricted)
			{
				return (IPermission)(object)new DirectoryServicesPermission(PermissionState.Unrestricted);
			}
			return (IPermission)(object)new DirectoryServicesPermission(access, path);
		}
	}
	[Serializable]
	public class DirectoryServicesPermissionEntry
	{
		private DirectoryServicesPermissionAccess permissionAccess;

		private string path;

		public string Path => path;

		public DirectoryServicesPermissionAccess PermissionAccess => permissionAccess;

		public DirectoryServicesPermissionEntry(DirectoryServicesPermissionAccess permissionAccess, string path)
		{
			this.permissionAccess = permissionAccess;
			this.path = path;
		}

		internal ResourcePermissionBaseEntry GetBaseEntry()
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			return new ResourcePermissionBaseEntry((int)permissionAccess, new string[1] { path });
		}
	}
	[Serializable]
	[MonoTODO("Fix serialization compatibility with MS.NET")]
	public class DirectoryServicesPermissionEntryCollection : CollectionBase
	{
		private DirectoryServicesPermission owner;

		public DirectoryServicesPermissionEntry this[int index]
		{
			get
			{
				return base.List[index] as DirectoryServicesPermissionEntry;
			}
			set
			{
				base.List[index] = value;
			}
		}

		internal DirectoryServicesPermissionEntryCollection(DirectoryServicesPermission owner)
		{
			this.owner = owner;
			ResourcePermissionBaseEntry[] entries = owner.GetEntries();
			if (entries.Length != 0)
			{
				ResourcePermissionBaseEntry[] array = entries;
				foreach (ResourcePermissionBaseEntry val in array)
				{
					DirectoryServicesPermissionEntry value = new DirectoryServicesPermissionEntry((DirectoryServicesPermissionAccess)val.PermissionAccess, val.PermissionAccessPath[0]);
					base.InnerList.Add(value);
				}
			}
		}

		public int Add(DirectoryServicesPermissionEntry value)
		{
			return base.List.Add(value);
		}

		public void AddRange(DirectoryServicesPermissionEntry[] value)
		{
			foreach (DirectoryServicesPermissionEntry value2 in value)
			{
				Add(value2);
			}
		}

		public void AddRange(DirectoryServicesPermissionEntryCollection value)
		{
			foreach (DirectoryServicesPermissionEntry item in value)
			{
				Add(item);
			}
		}

		public void CopyTo(DirectoryServicesPermissionEntry[] array, int index)
		{
			foreach (DirectoryServicesPermissionEntry item in base.List)
			{
				array[index++] = item;
			}
		}

		public bool Contains(DirectoryServicesPermissionEntry value)
		{
			return base.List.Contains(value);
		}

		public int IndexOf(DirectoryServicesPermissionEntry value)
		{
			return base.List.IndexOf(value);
		}

		public void Insert(int index, DirectoryServicesPermissionEntry value)
		{
			base.List.Insert(index, value);
		}

		public void Remove(DirectoryServicesPermissionEntry value)
		{
			base.List.Remove(value);
		}

		protected override void OnClear()
		{
			owner.ClearEntries();
		}

		protected override void OnInsert(int index, object value)
		{
			owner.Add(value);
		}

		protected override void OnRemove(int index, object value)
		{
			owner.Remove(value);
		}

		protected override void OnSet(int index, object oldValue, object newValue)
		{
			owner.Remove(oldValue);
			owner.Add(newValue);
		}

		internal DirectoryServicesPermissionEntryCollection()
		{
			ThrowStub.ThrowNotSupportedException();
		}
	}
	public class DirectorySynchronization
	{
		[DefaultValue(DirectorySynchronizationOptions.None)]
		[DSDescription("DSDirectorySynchronizationFlag")]
		public DirectorySynchronizationOptions Option
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public DirectorySynchronization()
		{
		}

		public DirectorySynchronization(DirectorySynchronizationOptions option)
		{
		}

		public DirectorySynchronization(DirectorySynchronization sync)
		{
		}

		public DirectorySynchronization(byte[] cookie)
		{
		}

		public DirectorySynchronization(DirectorySynchronizationOptions option, byte[] cookie)
		{
		}

		public byte[] GetDirectorySynchronizationCookie()
		{
			throw new NotImplementedException();
		}

		public void ResetDirectorySynchronizationCookie()
		{
		}

		public void ResetDirectorySynchronizationCookie(byte[] cookie)
		{
			throw new NotImplementedException();
		}

		public DirectorySynchronization Copy()
		{
			throw new NotImplementedException();
		}
	}
	[Flags]
	public enum DirectorySynchronizationOptions : long
	{
		None = 0L,
		ObjectSecurity = 1L,
		ParentsFirst = 0x800L,
		PublicDataOnly = 0x2000L,
		IncrementalValues = 0x80000000L
	}
	public class DirectoryVirtualListView
	{
		[DefaultValue(0)]
		[DSDescription("DSBeforeCount")]
		public int BeforeCount
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[DSDescription("DSAfterCount")]
		[DefaultValue(0)]
		public int AfterCount
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[DSDescription("DSOffset")]
		[DefaultValue(0)]
		public int Offset
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[DefaultValue(0)]
		[DSDescription("DSTargetPercentage")]
		public int TargetPercentage
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[DSDescription("DSTarget")]
		[DefaultValue("")]
		[TypeConverter("System.Diagnostics.Design.StringValueConverter, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
		public string Target
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[DSDescription("DSApproximateTotal")]
		[DefaultValue(0)]
		public int ApproximateTotal
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[DefaultValue(null)]
		[DSDescription("DSDirectoryVirtualListViewContext")]
		public DirectoryVirtualListViewContext DirectoryVirtualListViewContext
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public DirectoryVirtualListView()
		{
		}

		public DirectoryVirtualListView(int afterCount)
		{
		}

		public DirectoryVirtualListView(int beforeCount, int afterCount, int offset)
		{
		}

		public DirectoryVirtualListView(int beforeCount, int afterCount, string target)
		{
		}

		public DirectoryVirtualListView(int beforeCount, int afterCount, int offset, DirectoryVirtualListViewContext context)
		{
		}

		public DirectoryVirtualListView(int beforeCount, int afterCount, string target, DirectoryVirtualListViewContext context)
		{
		}
	}
	public class DirectoryVirtualListViewContext
	{
		public DirectoryVirtualListViewContext Copy()
		{
			throw new NotImplementedException();
		}
	}
	public enum ExtendedDN
	{
		None = -1,
		HexString,
		Standard
	}
	public sealed class ExtendedRightAccessRule : ActiveDirectoryAccessRule
	{
		public ExtendedRightAccessRule(IdentityReference identity, AccessControlType type)
			: base(identity, 256, type, Guid.Empty, isInherited: false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
		{
		}

		public ExtendedRightAccessRule(IdentityReference identity, AccessControlType type, Guid extendedRightType)
			: base(identity, 256, type, extendedRightType, isInherited: false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
		{
		}

		public ExtendedRightAccessRule(IdentityReference identity, AccessControlType type, ActiveDirectorySecurityInheritance inheritanceType)
			: base(identity, 256, type, Guid.Empty, isInherited: false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
		{
		}

		public ExtendedRightAccessRule(IdentityReference identity, AccessControlType type, Guid extendedRightType, ActiveDirectorySecurityInheritance inheritanceType)
			: base(identity, 256, type, extendedRightType, isInherited: false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
		{
		}

		public ExtendedRightAccessRule(IdentityReference identity, AccessControlType type, ActiveDirectorySecurityInheritance inheritanceType, Guid inheritedObjectType)
			: base(identity, 256, type, Guid.Empty, isInherited: false, InheritanceFlags.None, PropagationFlags.None, inheritedObjectType)
		{
		}

		public ExtendedRightAccessRule(IdentityReference identity, AccessControlType type, Guid extendedRightType, ActiveDirectorySecurityInheritance inheritanceType, Guid inheritedObjectType)
			: base(identity, 256, type, extendedRightType, isInherited: false, InheritanceFlags.None, PropagationFlags.None, inheritedObjectType)
		{
		}
	}
	public sealed class ListChildrenAccessRule : ActiveDirectoryAccessRule
	{
		public ListChildrenAccessRule(IdentityReference identity, AccessControlType type)
			: base(identity, 4, type, Guid.Empty, isInherited: false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
		{
		}

		public ListChildrenAccessRule(IdentityReference identity, AccessControlType type, ActiveDirectorySecurityInheritance inheritanceType)
			: base(identity, 4, type, Guid.Empty, isInherited: false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
		{
		}

		public ListChildrenAccessRule(IdentityReference identity, AccessControlType type, ActiveDirectorySecurityInheritance inheritanceType, Guid inheritedObjectType)
			: base(identity, 4, type, Guid.Empty, isInherited: false, InheritanceFlags.None, PropagationFlags.None, inheritedObjectType)
		{
		}
	}
	public enum PasswordEncodingMethod
	{
		PasswordEncodingSsl,
		PasswordEncodingClear
	}
	public enum PropertyAccess
	{
		Read,
		Write
	}
	public sealed class PropertyAccessRule : ActiveDirectoryAccessRule
	{
		public PropertyAccessRule(IdentityReference identity, AccessControlType type, PropertyAccess access)
			: base(identity, 0, type, Guid.Empty, isInherited: false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
		{
		}

		public PropertyAccessRule(IdentityReference identity, AccessControlType type, PropertyAccess access, Guid propertyType)
			: base(identity, 0, type, propertyType, isInherited: false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
		{
		}

		public PropertyAccessRule(IdentityReference identity, AccessControlType type, PropertyAccess access, ActiveDirectorySecurityInheritance inheritanceType)
			: base(identity, 0, type, Guid.Empty, isInherited: false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
		{
		}

		public PropertyAccessRule(IdentityReference identity, AccessControlType type, PropertyAccess access, Guid propertyType, ActiveDirectorySecurityInheritance inheritanceType)
			: base(identity, 0, type, propertyType, isInherited: false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
		{
		}

		public PropertyAccessRule(IdentityReference identity, AccessControlType type, PropertyAccess access, ActiveDirectorySecurityInheritance inheritanceType, Guid inheritedObjectType)
			: base(identity, 0, type, Guid.Empty, isInherited: false, InheritanceFlags.None, PropagationFlags.None, inheritedObjectType)
		{
		}

		public PropertyAccessRule(IdentityReference identity, AccessControlType type, PropertyAccess access, Guid propertyType, ActiveDirectorySecurityInheritance inheritanceType, Guid inheritedObjectType)
			: base(identity, 0, type, propertyType, isInherited: false, InheritanceFlags.None, PropagationFlags.None, inheritedObjectType)
		{
		}
	}
	public class PropertyCollection : IDictionary, ICollection, IEnumerable
	{
		private ArrayList m_oKeys = new ArrayList();

		private Hashtable m_oValues = new Hashtable();

		private DirectoryEntry _parent;

		public int Count => m_oValues.Count;

		bool ICollection.IsSynchronized => m_oValues.IsSynchronized;

		object ICollection.SyncRoot => m_oValues.SyncRoot;

		bool IDictionary.IsFixedSize => m_oKeys.IsFixedSize;

		bool IDictionary.IsReadOnly => m_oKeys.IsReadOnly;

		ICollection IDictionary.Keys => m_oValues.Keys;

		public ICollection PropertyNames => m_oValues.Keys;

		object IDictionary.this[object oKey]
		{
			get
			{
				return m_oValues[oKey];
			}
			set
			{
				m_oValues[oKey] = value;
			}
		}

		public ICollection Values => m_oValues.Values;

		public PropertyValueCollection this[string propertyName]
		{
			get
			{
				if (Contains(propertyName))
				{
					return (PropertyValueCollection)m_oValues[propertyName.ToLower()];
				}
				PropertyValueCollection propertyValueCollection = new PropertyValueCollection(_parent);
				Add(propertyName.ToLower(), propertyValueCollection);
				return propertyValueCollection;
			}
		}

		internal PropertyCollection()
			: this(null)
		{
		}

		internal PropertyCollection(DirectoryEntry parent)
		{
			_parent = parent;
		}

		private void ICopyTo(Array oArray, int iArrayIndex)
		{
			m_oValues.CopyTo(oArray, iArrayIndex);
		}

		void ICollection.CopyTo(Array oArray, int iArrayIndex)
		{
			ICopyTo(oArray, iArrayIndex);
		}

		public void CopyTo(PropertyValueCollection[] array, int index)
		{
			ICopyTo(array, index);
		}

		private void Add(object oKey, object oValue)
		{
			m_oKeys.Add(oKey);
			m_oValues.Add(oKey, oValue);
		}

		void IDictionary.Add(object oKey, object oValue)
		{
			Add(oKey, oValue);
		}

		void IDictionary.Clear()
		{
			m_oValues.Clear();
			m_oKeys.Clear();
		}

		private bool IContains(object oKey)
		{
			return m_oValues.Contains(oKey);
		}

		bool IDictionary.Contains(object oKey)
		{
			return IContains(oKey);
		}

		public bool Contains(string propertyName)
		{
			return IContains(propertyName.ToLower());
		}

		public IDictionaryEnumerator GetEnumerator()
		{
			return m_oValues.GetEnumerator();
		}

		void IDictionary.Remove(object oKey)
		{
			m_oValues.Remove(oKey);
			m_oKeys.Remove(oKey);
		}

		IEnumerator IEnumerable.GetEnumerator()
		{
			return m_oValues.GetEnumerator();
		}
	}
	public sealed class PropertySetAccessRule : ActiveDirectoryAccessRule
	{
		public PropertySetAccessRule(IdentityReference identity, AccessControlType type, PropertyAccess access, Guid propertySetType)
			: base(identity, 0, type, propertySetType, isInherited: false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
		{
		}

		public PropertySetAccessRule(IdentityReference identity, AccessControlType type, PropertyAccess access, Guid propertySetType, ActiveDirectorySecurityInheritance inheritanceType)
			: base(identity, 0, type, propertySetType, isInherited: false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
		{
		}

		public PropertySetAccessRule(IdentityReference identity, AccessControlType type, PropertyAccess access, Guid propertySetType, ActiveDirectorySecurityInheritance inheritanceType, Guid inheritedObjectType)
			: base(identity, 0, type, propertySetType, isInherited: false, InheritanceFlags.None, PropagationFlags.None, inheritedObjectType)
		{
		}
	}
	public class PropertyValueCollection : CollectionBase
	{
		private bool _Mbit;

		private DirectoryEntry _parent;

		internal bool Mbit
		{
			get
			{
				return _Mbit;
			}
			set
			{
				_Mbit = value;
			}
		}

		public object this[int index]
		{
			get
			{
				return base.List[index];
			}
			set
			{
				base.List[index] = value;
				_Mbit = true;
			}
		}

		[MonoTODO]
		public string PropertyName => string.Empty;

		public object Value
		{
			get
			{
				switch (base.Count)
				{
				case 0:
					return null;
				case 1:
					return base.List[0];
				default:
				{
					Array array = new object[base.Count];
					for (int i = array.GetLowerBound(0); i <= array.GetUpperBound(0); i++)
					{
						array.SetValue(base.List[i], i);
					}
					return array;
				}
				}
			}
			set
			{
				if (value != null || base.List.Count != 0)
				{
					base.List.Clear();
					if (value != null)
					{
						Add(value);
					}
					_Mbit = true;
				}
			}
		}

		internal PropertyValueCollection(DirectoryEntry parent)
		{
			_Mbit = false;
			_parent = parent;
		}

		public int Add(object value)
		{
			if (Contains(value))
			{
				return -1;
			}
			_Mbit = true;
			return base.List.Add(value);
		}

		public void AddRange(object[] value)
		{
			foreach (object value2 in value)
			{
				Add(value2);
			}
		}

		public void AddRange(PropertyValueCollection value)
		{
			foreach (object item in value)
			{
				Add(item);
			}
		}

		public int IndexOf(object value)
		{
			return base.List.IndexOf(value);
		}

		public void Insert(int index, object value)
		{
			base.List.Insert(index, value);
			_Mbit = true;
		}

		public void Remove(object value)
		{
			base.List.Remove(value);
			_Mbit = true;
		}

		public bool Contains(object value)
		{
			return base.List.Contains(value);
		}

		internal bool ContainsCaselessStringValue(string value)
		{
			for (int i = 0; i < base.Count; i++)
			{
				string strB = (string)base.List[i];
				if (string.Compare(value, strB, ignoreCase: true) == 0)
				{
					return true;
				}
			}
			return false;
		}

		public void CopyTo(object[] array, int index)
		{
			foreach (object item in base.List)
			{
				array[index++] = item;
			}
		}

		[MonoTODO]
		protected override void OnClearComplete()
		{
			if (_parent != null)
			{
				_parent.CommitDeferred();
			}
		}

		[MonoTODO]
		protected override void OnInsertComplete(int index, object value)
		{
			if (_parent != null)
			{
				_parent.CommitDeferred();
			}
		}

		[MonoTODO]
		protected override void OnRemoveComplete(int index, object value)
		{
			if (_parent != null)
			{
				_parent.CommitDeferred();
			}
		}

		[MonoTODO]
		protected override void OnSetComplete(int index, object oldValue, object newValue)
		{
			if (_parent != null)
			{
				_parent.CommitDeferred();
			}
		}

		internal PropertyValueCollection()
		{
			ThrowStub.ThrowNotSupportedException();
		}
	}
	[Serializable]
	public enum ReferralChasingOption
	{
		All = 96,
		External = 64,
		None = 0,
		Subordinate = 32
	}
	public class ResultPropertyCollection : DictionaryBase
	{
		public ResultPropertyValueCollection this[string name] => (ResultPropertyValueCollection)base.Dictionary[name.ToLower()];

		public ICollection PropertyNames => base.Dictionary.Keys;

		public ICollection Values => base.Dictionary.Values;

		internal ResultPropertyCollection()
		{
		}

		internal void Add(string key, ResultPropertyValueCollection rpcoll)
		{
			base.Dictionary.Add(key.ToLower(), rpcoll);
		}

		public bool Contains(string propertyName)
		{
			return base.Dictionary.Contains(propertyName.ToLower());
		}

		public void CopyTo(ResultPropertyValueCollection[] array, int index)
		{
			foreach (ResultPropertyValueCollection value in Values)
			{
				array[index++] = value;
			}
		}
	}
	public class ResultPropertyValueCollection : ReadOnlyCollectionBase
	{
		public virtual object this[int index] => base.InnerList[index];

		internal ResultPropertyValueCollection()
		{
		}

		internal void Add(object component)
		{
			base.InnerList.Add(component);
		}

		internal void AddRange(object[] components)
		{
			base.InnerList.AddRange(components);
		}

		public bool Contains(object value)
		{
			return base.InnerList.Contains(value);
		}

		public void CopyTo(object[] values, int index)
		{
			base.InnerList.CopyTo(values, index);
		}

		public int IndexOf(object value)
		{
			return base.InnerList.IndexOf(value);
		}
	}
	public class SchemaNameCollection : IList, ICollection, IEnumerable
	{
		bool IList.IsFixedSize => true;

		bool IList.IsReadOnly => true;

		object IList.this[int recordIndex]
		{
			[MonoTODO]
			get
			{
				throw new InvalidOperationException();
			}
			[MonoTODO]
			set
			{
				throw new InvalidOperationException();
			}
		}

		public string this[int index]
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
			[MonoTODO]
			set
			{
				throw new NotImplementedException();
			}
		}

		public int Count => 0;

		bool ICollection.IsSynchronized
		{
			[MonoTODO]
			get
			{
				return true;
			}
		}

		object ICollection.SyncRoot
		{
			[MonoTODO]
			get
			{
				return this;
			}
		}

		internal SchemaNameCollection()
		{
		}

		[MonoTODO]
		int IList.Add(object avalue)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public int Add(string value)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void Clear()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		bool IList.Contains(object cvalue)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		int IList.IndexOf(object ivalue)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		void IList.Insert(int index, object ivalue)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		void IList.Remove(object rvalue)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void RemoveAt(int index)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public IEnumerator GetEnumerator()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void AddRange(SchemaNameCollection value)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void AddRange(string[] value)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public bool Contains(string value)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		void ICollection.CopyTo(Array arr, int pos)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void CopyTo(string[] stringArray, int index)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public int IndexOf(string value)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void Insert(int index, string value)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void Remove(string value)
		{
			throw new NotImplementedException();
		}
	}
	public class SearchResult
	{
		private string _Path;

		private ResultPropertyCollection _Properties;

		private DirectoryEntry _Entry;

		private StringCollection _PropsToLoad;

		private bool ispropnull;

		private PropertyCollection _Rproperties;

		internal PropertyCollection Rproperties => _Rproperties;

		internal StringCollection PropsToLoad
		{
			get
			{
				if (_PropsToLoad != null)
				{
					return _PropsToLoad;
				}
				return null;
			}
		}

		public ResultPropertyCollection Properties
		{
			get
			{
				if (ispropnull)
				{
					_Properties = new ResultPropertyCollection();
					IDictionaryEnumerator enumerator = Rproperties.GetEnumerator();
					while (enumerator.MoveNext())
					{
						string text = (string)enumerator.Key;
						ResultPropertyValueCollection resultPropertyValueCollection = new ResultPropertyValueCollection();
						if (Rproperties[text].Count == 1)
						{
							string component = (string)Rproperties[text].Value;
							resultPropertyValueCollection.Add(component);
						}
						else if (Rproperties[text].Count > 1)
						{
							object[] components = (object[])Rproperties[text].Value;
							resultPropertyValueCollection.AddRange(components);
						}
						_Properties.Add(text, resultPropertyValueCollection);
					}
					ispropnull = false;
				}
				return _Properties;
			}
		}

		public string Path => _Path;

		private void InitBlock()
		{
			_Properties = null;
			_Entry = null;
			_PropsToLoad = null;
			ispropnull = true;
			_Rproperties = null;
		}

		internal SearchResult(DirectoryEntry entry)
		{
			ispropnull = true;
			base..ctor();
			InitBlock();
			_Entry = entry;
			_Path = entry.Path;
		}

		internal SearchResult(DirectoryEntry entry, PropertyCollection props)
		{
			ispropnull = true;
			base..ctor();
			InitBlock();
			_Entry = entry;
			_Path = entry.Path;
			_Rproperties = props;
		}

		public DirectoryEntry GetDirectoryEntry()
		{
			return _Entry;
		}

		internal SearchResult()
		{
			ThrowStub.ThrowNotSupportedException();
		}
	}
	public class SearchResultCollection : MarshalByRefObject, ICollection, IEnumerable, IDisposable
	{
		private ArrayList sValues = new ArrayList();

		public int Count => sValues.Count;

		bool ICollection.IsSynchronized => sValues.IsSynchronized;

		object ICollection.SyncRoot => sValues.SyncRoot;

		public SearchResult this[int index] => (SearchResult)sValues[index];

		public string[] PropertiesLoaded
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		public IntPtr Handle
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		internal SearchResultCollection()
		{
		}

		void ICollection.CopyTo(Array oArray, int iArrayIndex)
		{
			sValues.CopyTo(oArray, iArrayIndex);
		}

		public void CopyTo(SearchResult[] results, int index)
		{
			((ICollection)this).CopyTo((Array)results, index);
		}

		internal void Add(object oValue)
		{
			sValues.Add(oValue);
		}

		private bool Contains(object oValues)
		{
			return sValues.Contains(oValues);
		}

		public bool Contains(SearchResult result)
		{
			return sValues.Contains(result);
		}

		public int IndexOf(SearchResult result)
		{
			return sValues.IndexOf(result);
		}

		public IEnumerator GetEnumerator()
		{
			return sValues.GetEnumerator();
		}

		public void Dispose()
		{
			Dispose(disposing: true);
			GC.SuppressFinalize(this);
		}

		[MonoTODO]
		protected virtual void Dispose(bool disposing)
		{
		}

		~SearchResultCollection()
		{
			Dispose(disposing: false);
		}
	}
	[Serializable]
	public enum SearchScope
	{
		Base,
		OneLevel,
		Subtree
	}
	[Serializable]
	public enum SortDirection
	{
		Ascending,
		Descending
	}
	[TypeConverter(typeof(ExpandableObjectConverter))]
	public class SortOption
	{
		private string propertyName;

		private SortDirection direction;

		[DSDescription("Name of propertion to be sorted on")]
		[DefaultValue(null)]
		public string PropertyName
		{
			get
			{
				return propertyName;
			}
			set
			{
				if (value == null)
				{
					throw new ArgumentNullException("value");
				}
				propertyName = value;
			}
		}

		[DSDescription("Whether the sort is ascending or descending")]
		[DefaultValue(SortDirection.Ascending)]
		public SortDirection Direction
		{
			get
			{
				return direction;
			}
			set
			{
				direction = value;
			}
		}

		public SortOption()
		{
		}

		public SortOption(string propertyName, SortDirection direction)
		{
			this.propertyName = propertyName;
			this.direction = direction;
		}
	}
}
namespace System.DirectoryServices.Design
{
	internal class DirectoryEntryConverter : TypeConverter
	{
	}
}
namespace System.DirectoryServices.ActiveDirectory
{
	[Serializable]
	public class ActiveDirectoryObjectNotFoundException : Exception, ISerializable
	{
		public string Name
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		public Type Type
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public ActiveDirectoryObjectNotFoundException(string message, Type type, string name)
			: base(message)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public ActiveDirectoryObjectNotFoundException(string message, Exception inner)
			: base(message, inner)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public ActiveDirectoryObjectNotFoundException(string message)
			: base(message)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public ActiveDirectoryObjectNotFoundException()
			: base("DSUnknownFailure")
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		protected ActiveDirectoryObjectNotFoundException(SerializationInfo info, StreamingContext context)
			: base(info, context)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		[SecurityPermission(SecurityAction.LinkDemand, SerializationFormatter = true)]
		[SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
		public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext)
		{
			throw new NotImplementedException();
		}
	}
	[Serializable]
	public class ActiveDirectoryOperationException : Exception, ISerializable
	{
		public int ErrorCode
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		public ActiveDirectoryOperationException(string message, Exception inner, int errorCode)
			: base(message, inner)
		{
			throw new NotImplementedException();
		}

		public ActiveDirectoryOperationException(string message, int errorCode)
			: base(message)
		{
			throw new NotImplementedException();
		}

		public ActiveDirectoryOperationException(string message, Exception inner)
			: base(message, inner)
		{
			throw new NotImplementedException();
		}

		public ActiveDirectoryOperationException(string message)
			: base(message)
		{
			throw new NotImplementedException();
		}

		public ActiveDirectoryOperationException()
			: base("DSUnknownFailure")
		{
			throw new NotImplementedException();
		}

		protected ActiveDirectoryOperationException(SerializationInfo info, StreamingContext context)
			: base(info, context)
		{
			throw new NotImplementedException();
		}

		[SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
		[SecurityPermission(SecurityAction.LinkDemand, SerializationFormatter = true)]
		public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext)
		{
			throw new NotImplementedException();
		}
	}
	public abstract class ActiveDirectoryPartition : IDisposable
	{
		public string Name
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		public void Dispose()
		{
		}

		protected virtual void Dispose(bool disposing)
		{
		}

		public override string ToString()
		{
			throw new NotImplementedException();
		}

		[DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true)]
		public abstract DirectoryEntry GetDirectoryEntry();
	}
	public class ActiveDirectoryReplicationMetadata : DictionaryBase
	{
		public AttributeMetadata this[string name]
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		public ReadOnlyStringCollection AttributeNames
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		public AttributeMetadataCollection Values
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		public bool Contains(string attributeName)
		{
			throw new NotImplementedException();
		}

		public void CopyTo(AttributeMetadata[] array, int index)
		{
			throw new NotImplementedException();
		}
	}
	public enum ActiveDirectoryRole
	{
		SchemaRole,
		NamingRole,
		PdcRole,
		RidRole,
		InfrastructureRole
	}
	public class ActiveDirectoryRoleCollection : ReadOnlyCollectionBase
	{
		public ActiveDirectoryRole this[int index]
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		public bool Contains(ActiveDirectoryRole role)
		{
			throw new NotImplementedException();
		}

		public int IndexOf(ActiveDirectoryRole role)
		{
			throw new NotImplementedException();
		}

		public void CopyTo(ActiveDirectoryRole[] roles, int index)
		{
			throw new NotImplementedException();
		}
	}
	public class ActiveDirectorySchedule
	{
		public bool[,,] RawSchedule
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public ActiveDirectorySchedule()
		{
			throw new NotImplementedException();
		}

		public ActiveDirectorySchedule(ActiveDirectorySchedule schedule)
			: this()
		{
			throw new NotImplementedException();
		}

		public void SetSchedule(DayOfWeek day, HourOfDay fromHour, MinuteOfHour fromMinute, HourOfDay toHour, MinuteOfHour toMinute)
		{
			throw new NotImplementedException();
		}

		public void SetSchedule(DayOfWeek[] days, HourOfDay fromHour, MinuteOfHour fromMinute, HourOfDay toHour, MinuteOfHour toMinute)
		{
			throw new NotImplementedException();
		}

		public void SetDailySchedule(HourOfDay fromHour, MinuteOfHour fromMinute, HourOfDay toHour, MinuteOfHour toMinute)
		{
			throw new NotImplementedException();
		}

		public void ResetSchedule()
		{
			throw new NotImplementedException();
		}
	}
	[DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true)]
	public class ActiveDirectorySchema : ActiveDirectoryPartition
	{
		public DirectoryServer SchemaRoleOwner
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		protected override void Dispose(bool disposing)
		{
		}

		public static ActiveDirectorySchema GetSchema(DirectoryContext context)
		{
			throw new NotImplementedException();
		}

		public void RefreshSchema()
		{
			throw new NotImplementedException();
		}

		public ActiveDirectorySchemaClass FindClass(string ldapDisplayName)
		{
			throw new NotImplementedException();
		}

		public ActiveDirectorySchemaClass FindDefunctClass(string commonName)
		{
			throw new NotImplementedException();
		}

		public ReadOnlyActiveDirectorySchemaClassCollection FindAllClasses()
		{
			throw new NotImplementedException();
		}

		public ReadOnlyActiveDirectorySchemaClassCollection FindAllClasses(SchemaClassType type)
		{
			throw new NotImplementedException();
		}

		public ReadOnlyActiveDirectorySchemaClassCollection FindAllDefunctClasses()
		{
			throw new NotImplementedException();
		}

		public ActiveDirectorySchemaProperty FindProperty(string ldapDisplayName)
		{
			throw new NotImplementedException();
		}

		public ActiveDirectorySchemaProperty FindDefunctProperty(string commonName)
		{
			throw new NotImplementedException();
		}

		public ReadOnlyActiveDirectorySchemaPropertyCollection FindAllProperties()
		{
			throw new NotImplementedException();
		}

		public ReadOnlyActiveDirectorySchemaPropertyCollection FindAllProperties(PropertyTypes type)
		{
			throw new NotImplementedException();
		}

		public ReadOnlyActiveDirectorySchemaPropertyCollection FindAllDefunctProperties()
		{
			throw new NotImplementedException();
		}

		[DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true)]
		[DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
		public override DirectoryEntry GetDirectoryEntry()
		{
			throw new NotImplementedException();
		}

		public static ActiveDirectorySchema GetCurrentSchema()
		{
			throw new NotImplementedException();
		}
	}
	[DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true)]
	public class ActiveDirectorySchemaClass : IDisposable
	{
		public string Name
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		public string CommonName
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public string Oid
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public string Description
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public bool IsDefunct
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public ActiveDirectorySchemaClassCollection PossibleSuperiors
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		public ReadOnlyActiveDirectorySchemaClassCollection PossibleInferiors
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		public ActiveDirectorySchemaPropertyCollection MandatoryProperties
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		public ActiveDirectorySchemaPropertyCollection OptionalProperties
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		public ActiveDirectorySchemaClassCollection AuxiliaryClasses
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		public ActiveDirectorySchemaClass SubClassOf
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public SchemaClassType Type
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public Guid SchemaGuid
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public ActiveDirectorySecurity DefaultObjectSecurityDescriptor
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public ActiveDirectorySchemaClass(DirectoryContext context, string ldapDisplayName)
		{
			throw new NotImplementedException();
		}

		public void Dispose()
		{
		}

		protected virtual void Dispose(bool disposing)
		{
		}

		public static ActiveDirectorySchemaClass FindByName(DirectoryContext context, string ldapDisplayName)
		{
			throw new NotImplementedException();
		}

		public ReadOnlyActiveDirectorySchemaPropertyCollection GetAllProperties()
		{
			throw new NotImplementedException();
		}

		public void Save()
		{
			throw new NotImplementedException();
		}

		public override string ToString()
		{
			throw new NotImplementedException();
		}

		public DirectoryEntry GetDirectoryEntry()
		{
			throw new NotImplementedException();
		}
	}
	public class ActiveDirectorySchemaClassCollection : CollectionBase
	{
		public ActiveDirectorySchemaClass this[int index]
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public int Add(ActiveDirectorySchemaClass schemaClass)
		{
			throw new NotImplementedException();
		}

		public void AddRange(ActiveDirectorySchemaClass[] schemaClasses)
		{
			throw new NotImplementedException();
		}

		public void AddRange(ActiveDirectorySchemaClassCollection schemaClasses)
		{
			throw new NotImplementedException();
		}

		public void AddRange(ReadOnlyActiveDirectorySchemaClassCollection schemaClasses)
		{
			throw new NotImplementedException();
		}

		public void Remove(ActiveDirectorySchemaClass schemaClass)
		{
			throw new NotImplementedException();
		}

		public void Insert(int index, ActiveDirectorySchemaClass schemaClass)
		{
			throw new NotImplementedException();
		}

		public bool Contains(ActiveDirectorySchemaClass schemaClass)
		{
			throw new NotImplementedException();
		}

		public void CopyTo(ActiveDirectorySchemaClass[] schemaClasses, int index)
		{
			throw new NotImplementedException();
		}

		public int IndexOf(ActiveDirectorySchemaClass schemaClass)
		{
			throw new NotImplementedException();
		}

		protected override void OnClearComplete()
		{
			throw new NotImplementedException();
		}

		protected override void OnInsertComplete(int index, object value)
		{
			throw new NotImplementedException();
		}

		protected override void OnRemoveComplete(int index, object value)
		{
			throw new NotImplementedException();
		}

		protected override void OnSetComplete(int index, object oldValue, object newValue)
		{
			throw new NotImplementedException();
		}

		protected override void OnValidate(object value)
		{
			throw new NotImplementedException();
		}
	}
	[DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true)]
	public class ActiveDirectorySchemaProperty : IDisposable
	{
		public string Name
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		public string CommonName
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public string Oid
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public ActiveDirectorySyntax Syntax
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public string Description
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public bool IsSingleValued
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public bool IsIndexed
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public bool IsIndexedOverContainer
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public bool IsInAnr
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public bool IsOnTombstonedObject
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public bool IsTupleIndexed
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public bool IsInGlobalCatalog
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public int RangeLower
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public int RangeUpper
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public bool IsDefunct
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public ActiveDirectorySchemaProperty Link
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		public int? LinkId
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public Guid SchemaGuid
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public ActiveDirectorySchemaProperty(DirectoryContext context, string ldapDisplayName)
		{
			throw new NotImplementedException();
		}

		public void Dispose()
		{
		}

		protected virtual void Dispose(bool disposing)
		{
		}

		public

Room Architect Tool_Data/Managed/System.dll

Decompiled 3 months ago
using System;
using System.Buffers;
using System.CodeDom;
using System.CodeDom.Compiler;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.ComponentModel.Design.Serialization;
using System.Configuration;
using System.Configuration.Internal;
using System.Configuration.Provider;
using System.Diagnostics;
using System.Diagnostics.Tracing;
using System.Globalization;
using System.IO;
using System.IO.Compression;
using System.IO.Ports;
using System.Net;
using System.Net.Cache;
using System.Net.Configuration;
using System.Net.Mail;
using System.Net.Mime;
using System.Net.NetworkInformation;
using System.Net.NetworkInformation.MacOsStructs;
using System.Net.Security;
using System.Net.Sockets;
using System.Net.WebSockets;
using System.Reflection;
using System.Reflection.Emit;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
using System.Runtime.ExceptionServices;
using System.Runtime.InteropServices;
using System.Runtime.Remoting.Messaging;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.Security;
using System.Security.AccessControl;
using System.Security.Authentication;
using System.Security.Authentication.ExtendedProtection;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Security.Permissions;
using System.Security.Policy;
using System.Security.Principal;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using System.Timers;
using System.Xml;
using System.Xml.Serialization;
using System.Xml.XPath;
using Microsoft.CSharp;
using Microsoft.VisualBasic;
using Microsoft.Win32;
using Microsoft.Win32.SafeHandles;
using Mono;
using Mono.Audio;
using Mono.Http;
using Mono.Net;
using Mono.Net.Dns;
using Mono.Net.Security;
using Mono.Net.Security.Private;
using Mono.Security;
using Mono.Security.Authenticode;
using Mono.Security.Cryptography;
using Mono.Security.Interface;
using Mono.Security.Protocol.Ntlm;
using Mono.Security.Protocol.Tls;
using Mono.Security.X509;
using Mono.Security.X509.Extensions;
using Mono.Unity;
using Mono.Util;
using ObjCRuntimeInternal;
using Unity;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("System.dll")]
[assembly: AssemblyDescription("System.dll")]
[assembly: AssemblyDefaultAlias("System.dll")]
[assembly: AssemblyCompany("Mono development team")]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright("(c) Various Mono authors")]
[assembly: AssemblyFileVersion("4.6.57.0")]
[assembly: SatelliteContractVersion("4.0.0.0")]
[assembly: AssemblyInformationalVersion("4.6.57.0")]
[assembly: CLSCompliant(true)]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: ComVisible(false)]
[assembly: AllowPartiallyTrustedCallers]
[assembly: AssemblyDelaySign(true)]
[assembly: AssemblyKeyFile("../ecma.pub")]
[assembly: InternalsVisibleTo("System.ComponentModel.DataAnnotations, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("System.Net.Http, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
[assembly: InternalsVisibleTo("Mono.Btls.Interface, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")]
[assembly: InternalsVisibleTo("Mono.Security, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("4.0.0.0")]
[module: UnverifiableCode]
internal static class SR
{
	public const string RTL = "RTL_False";

	public const string ContinueButtonText = "Continue";

	public const string DebugMessageTruncated = "{0}...\n<truncated>";

	public const string DebugAssertTitleShort = "Assertion Failed";

	public const string DebugAssertTitle = "Assertion Failed: Cancel=Debug, OK=Continue";

	public const string NotSupported = "This operation is not supported.";

	public const string DebugLaunchFailed = "Cannot launch the debugger.  Make sure that a Microsoft (R) .NET Framework debugger is properly installed.";

	public const string DebugLaunchFailedTitle = "Microsoft .NET Framework Debug Launch Failure";

	public const string ObjectDisposed = "Object {0} has been disposed and can no longer be used.";

	public const string ExceptionOccurred = "An exception occurred writing trace output to log file '{0}'. {1}";

	public const string MustAddListener = "Only TraceListeners can be added to a TraceListenerCollection.";

	public const string ToStringNull = "(null)";

	public const string EnumConverterInvalidValue = "The value '{0}' is not a valid value for the enum '{1}'.";

	public const string ConvertFromException = "{0} cannot convert from {1}.";

	public const string ConvertToException = "'{0}' is unable to convert '{1}' to '{2}'.";

	public const string ConvertInvalidPrimitive = "{0} is not a valid value for {1}.";

	public const string ErrorMissingPropertyAccessors = "Accessor methods for the {0} property are missing.";

	public const string ErrorInvalidPropertyType = "Invalid type for the {0} property.";

	public const string ErrorMissingEventAccessors = "Accessor methods for the {0} event are missing.";

	public const string ErrorInvalidEventHandler = "Invalid event handler for the {0} event.";

	public const string ErrorInvalidEventType = "Invalid type for the {0} event.";

	public const string InvalidMemberName = "Invalid member name.";

	public const string ErrorBadExtenderType = "The {0} extender provider is not compatible with the {1} type.";

	public const string NullableConverterBadCtorArg = "The specified type is not a nullable type.";

	public const string TypeDescriptorExpectedElementType = "Expected types in the collection to be of type {0}.";

	public const string TypeDescriptorSameAssociation = "Cannot create an association when the primary and secondary objects are the same.";

	public const string TypeDescriptorAlreadyAssociated = "The primary and secondary objects are already associated with each other.";

	public const string TypeDescriptorProviderError = "The type description provider {0} has returned null from {1} which is illegal.";

	public const string TypeDescriptorUnsupportedRemoteObject = "The object {0} is being remoted by a proxy that does not support interface discovery.  This type of remoted object is not supported.";

	public const string TypeDescriptorArgsCountMismatch = "The number of elements in the Type and Object arrays must match.";

	public const string ErrorCreateSystemEvents = "Failed to create system events window thread.";

	public const string ErrorCreateTimer = "Cannot create timer.";

	public const string ErrorKillTimer = "Cannot end timer.";

	public const string ErrorSystemEventsNotSupported = "System event notifications are not supported under the current context. Server processes, for example, may not support global system event notifications.";

	public const string ErrorGetTempPath = "Cannot get temporary file name";

	public const string CHECKOUTCanceled = "The checkout was canceled by the user.";

	public const string ErrorInvalidServiceInstance = "The service instance must derive from or implement {0}.";

	public const string ErrorServiceExists = "The service {0} already exists in the service container.";

	public const string Argument_InvalidNumberStyles = "An undefined NumberStyles value is being used.";

	public const string Argument_InvalidHexStyle = "With the AllowHexSpecifier bit set in the enum bit field, the only other valid bits that can be combined into the enum value must be a subset of those in HexNumber.";

	public const string Argument_ByteArrayLengthMustBeAMultipleOf4 = "The Byte[] length must be a multiple of 4.";

	public const string Argument_InvalidCharactersInString = "The string contained an invalid character.";

	public const string Argument_ParsedStringWasInvalid = "The parsed string was invalid.";

	public const string Argument_MustBeBigInt = "The parameter must be a BigInteger.";

	public const string Format_InvalidFormatSpecifier = "Format specifier was invalid.";

	public const string Format_TooLarge = "The value is too large to be represented by this format specifier.";

	public const string ArgumentOutOfRange_MustBeLessThanUInt32MaxValue = "The value must be less than UInt32.MaxValue (2^32).";

	public const string ArgumentOutOfRange_MustBeNonNeg = "The number must be greater than or equal to zero.";

	public const string NotSupported_NumberStyle = "The NumberStyle option is not supported.";

	public const string Overflow_BigIntInfinity = "BigInteger cannot represent infinity.";

	public const string Overflow_NotANumber = "The value is not a number.";

	public const string Overflow_ParseBigInteger = "The value could not be parsed.";

	public const string Overflow_Int32 = "Value was either too large or too small for an Int32.";

	public const string Overflow_Int64 = "Value was either too large or too small for an Int64.";

	public const string Overflow_UInt32 = "Value was either too large or too small for a UInt32.";

	public const string Overflow_UInt64 = "Value was either too large or too small for a UInt64.";

	public const string Overflow_Decimal = "Value was either too large or too small for a Decimal.";

	public const string Argument_FrameworkNameTooShort = "FrameworkName cannot have less than two components or more than three components.";

	public const string Argument_FrameworkNameInvalid = "FrameworkName is invalid.";

	public const string Argument_FrameworkNameInvalidVersion = "FrameworkName version component is invalid.";

	public const string Argument_FrameworkNameMissingVersion = "FrameworkName version component is missing.";

	public const string ArgumentNull_Key = "Key cannot be null.";

	public const string Argument_InvalidValue = "Argument {0} should be larger than {1}.";

	public const string Arg_MultiRank = "Multi dimension array is not supported on this operation.";

	public const string Barrier_ctor_ArgumentOutOfRange = "The participantCount argument must be non-negative and less than or equal to 32767.";

	public const string Barrier_AddParticipants_NonPositive_ArgumentOutOfRange = "The participantCount argument must be a positive value.";

	public const string Barrier_AddParticipants_Overflow_ArgumentOutOfRange = "Adding participantCount participants would result in the number of participants exceeding the maximum number allowed.";

	public const string Barrier_InvalidOperation_CalledFromPHA = "This method may not be called from within the postPhaseAction.";

	public const string Barrier_RemoveParticipants_NonPositive_ArgumentOutOfRange = "The participantCount argument must be a positive value.";

	public const string Barrier_RemoveParticipants_ArgumentOutOfRange = "The participantCount argument must be less than or equal the number of participants.";

	public const string Barrier_RemoveParticipants_InvalidOperation = "The participantCount argument is greater than the number of participants that haven't yet arrived at the barrier in this phase.";

	public const string Barrier_SignalAndWait_ArgumentOutOfRange = "The specified timeout must represent a value between -1 and Int32.MaxValue, inclusive.";

	public const string Barrier_SignalAndWait_InvalidOperation_ZeroTotal = "The barrier has no registered participants.";

	public const string Barrier_SignalAndWait_InvalidOperation_ThreadsExceeded = "The number of threads using the barrier exceeded the total number of registered participants.";

	public const string Barrier_Dispose = "The barrier has been disposed.";

	public const string BarrierPostPhaseException = "The postPhaseAction failed with an exception.";

	public const string UriTypeConverter_ConvertFrom_CannotConvert = "{0} cannot convert from {1}.";

	public const string UriTypeConverter_ConvertTo_CannotConvert = "{0} cannot convert {1} to {2}.";

	public const string ISupportInitializeDescr = "Specifies support for transacted initialization.";

	public const string CantModifyListSortDescriptionCollection = "Once a ListSortDescriptionCollection has been created it can't be modified.";

	public const string Argument_NullComment = "The 'Comment' property of the CodeCommentStatement '{0}' cannot be null.";

	public const string InvalidPrimitiveType = "Invalid Primitive Type: {0}. Consider using CodeObjectCreateExpression.";

	public const string Cannot_Specify_Both_Compiler_Path_And_Version = "Cannot specify both the '{0}' and '{1}' CodeDom provider options to choose a compiler. Please remove one of them.";

	public const string CodeGenOutputWriter = "The output writer for code generation and the writer supplied don't match and cannot be used. This is generally caused by a bad implementation of a CodeGenerator derived class.";

	public const string CodeGenReentrance = "This code generation API cannot be called while the generator is being used to generate something else.";

	public const string InvalidLanguageIdentifier = "The identifier:\"{0}\" on the property:\"{1}\" of type:\"{2}\" is not a valid language-independent identifier name. Check to see if CodeGenerator.IsValidLanguageIndependentIdentifier allows the identifier name.";

	public const string InvalidTypeName = "The type name:\"{0}\" on the property:\"{1}\" of type:\"{2}\" is not a valid language-independent type name.";

	public const string Empty_attribute = "The '{0}' attribute cannot be an empty string.";

	public const string Invalid_nonnegative_integer_attribute = "The '{0}' attribute must be a non-negative integer.";

	public const string CodeDomProvider_NotDefined = "There is no CodeDom provider defined for the language.";

	public const string Language_Names_Cannot_Be_Empty = "You need to specify a non-empty String for a language name in the CodeDom configuration section.";

	public const string Extension_Names_Cannot_Be_Empty_Or_Non_Period_Based = "An extension name in the CodeDom configuration section must be a non-empty string which starts with a period.";

	public const string Unable_To_Locate_Type = "The CodeDom provider type \"{0}\" could not be located.";

	public const string NotSupported_CodeDomAPI = "This CodeDomProvider does not support this method.";

	public const string ArityDoesntMatch = "The total arity specified in '{0}' does not match the number of TypeArguments supplied.  There were '{1}' TypeArguments supplied.";

	public const string PartialTrustErrorTextReplacement = "<The original value of this property potentially contains file system information and has been suppressed.>";

	public const string PartialTrustIllegalProvider = "When used in partial trust, langID must be C#, VB, J#, or JScript, and the language provider must be in the global assembly cache.";

	public const string IllegalAssemblyReference = "Assembly references cannot begin with '-', or contain a '/' or '\\'.";

	public const string NullOrEmpty_Value_in_Property = "The '{0}' property cannot contain null or empty strings.";

	public const string AutoGen_Comment_Line1 = "auto-generated>";

	public const string AutoGen_Comment_Line2 = "This code was generated by a tool.";

	public const string AutoGen_Comment_Line3 = "Runtime Version:";

	public const string AutoGen_Comment_Line4 = "Changes to this file may cause incorrect behavior and will be lost if";

	public const string AutoGen_Comment_Line5 = "the code is regenerated.";

	public const string CantContainNullEntries = "Array '{0}' cannot contain null entries.";

	public const string InvalidPathCharsInChecksum = "The CodeChecksumPragma file name '{0}' contains invalid path characters.";

	public const string InvalidRegion = "The region directive '{0}' contains invalid characters.  RegionText cannot contain any new line characters.";

	public const string Provider_does_not_support_options = "This CodeDomProvider type does not have a constructor that takes providerOptions - \"{0}\"";

	public const string MetaExtenderName = "{0} on {1}";

	public const string InvalidEnumArgument = "The value of argument '{0}' ({1}) is invalid for Enum type '{2}'.";

	public const string InvalidArgument = "'{1}' is not a valid value for '{0}'.";

	public const string InvalidNullArgument = "Null is not a valid value for {0}.";

	public const string LicExceptionTypeOnly = "A valid license cannot be granted for the type {0}. Contact the manufacturer of the component for more information.";

	public const string LicExceptionTypeAndInstance = "An instance of type '{1}' was being created, and a valid license could not be granted for the type '{0}'. Please,  contact the manufacturer of the component for more information.";

	public const string LicMgrContextCannotBeChanged = "The CurrentContext property of the LicenseManager is currently locked and cannot be changed.";

	public const string LicMgrAlreadyLocked = "The CurrentContext property of the LicenseManager is already locked by another user.";

	public const string LicMgrDifferentUser = "The CurrentContext property of the LicenseManager can only be unlocked with the same contextUser.";

	public const string InvalidElementType = "Element type {0} is not supported.";

	public const string InvalidIdentifier = "Identifier '{0}' is not valid.";

	public const string ExecFailedToCreate = "Failed to create file {0}.";

	public const string ExecTimeout = "Timed out waiting for a program to execute. The command being executed was {0}.";

	public const string ExecBadreturn = "An invalid return code was encountered waiting for a program to execute. The command being executed was {0}.";

	public const string ExecCantGetRetCode = "Unable to get the return code for a program being executed. The command that was being executed was '{0}'.";

	public const string ExecCantExec = "Cannot execute a program. The command being executed was {0}.";

	public const string ExecCantRevert = "Cannot execute a program. Impersonation failed.";

	public const string CompilerNotFound = "Compiler executable file {0} cannot be found.";

	public const string DuplicateFileName = "The file name '{0}' was already in the collection.";

	public const string CollectionReadOnly = "Collection is read-only.";

	public const string BitVectorFull = "Bit vector is full.";

	public const string ArrayConverterText = "{0} Array";

	public const string CollectionConverterText = "(Collection)";

	public const string MultilineStringConverterText = "(Text)";

	public const string CultureInfoConverterDefaultCultureString = "(Default)";

	public const string CultureInfoConverterInvalidCulture = "The {0} culture cannot be converted to a CultureInfo object on this computer.";

	public const string InvalidPrimitive = "The text {0} is not a valid {1}.";

	public const string TimerInvalidInterval = "'{0}' is not a valid value for 'Interval'. 'Interval' must be greater than {1}.";

	public const string TraceSwitchLevelTooHigh = "Attempted to set {0} to a value that is too high.  Setting level to TraceLevel.Verbose";

	public const string TraceSwitchLevelTooLow = "Attempted to set {0} to a value that is too low.  Setting level to TraceLevel.Off";

	public const string TraceSwitchInvalidLevel = "The Level must be set to a value in the enumeration TraceLevel.";

	public const string TraceListenerIndentSize = "The IndentSize property must be non-negative.";

	public const string TraceListenerFail = "Fail:";

	public const string TraceAsTraceSource = "Trace";

	public const string InvalidLowBoundArgument = "'{1}' is not a valid value for '{0}'. '{0}' must be greater than {2}.";

	public const string DuplicateComponentName = "Duplicate component name '{0}'.  Component names must be unique and case-insensitive.";

	public const string NotImplemented = "{0}: Not implemented";

	public const string OutOfMemory = "Could not allocate needed memory.";

	public const string EOF = "End of data stream encountered.";

	public const string IOError = "Unknown input/output failure.";

	public const string BadChar = "Unexpected Character: '{0}'.";

	public const string toStringNone = "(none)";

	public const string toStringUnknown = "(unknown)";

	public const string InvalidEnum = "{0} is not a valid {1} value.";

	public const string IndexOutOfRange = "Index {0} is out of range.";

	public const string ErrorPropertyAccessorException = "Property accessor '{0}' on object '{1}' threw the following exception:'{2}'";

	public const string InvalidOperation = "Invalid operation.";

	public const string EmptyStack = "Stack has no items in it.";

	public const string PerformanceCounterDesc = "Represents a Windows performance counter component.";

	public const string PCCategoryName = "Category name of the performance counter object.";

	public const string PCCounterName = "Counter name of the performance counter object.";

	public const string PCInstanceName = "Instance name of the performance counter object.";

	public const string PCMachineName = "Specifies the machine from where to read the performance data.";

	public const string PCInstanceLifetime = "Specifies the lifetime of the instance.";

	public const string PropertyCategoryAction = "Action";

	public const string PropertyCategoryAppearance = "Appearance";

	public const string PropertyCategoryAsynchronous = "Asynchronous";

	public const string PropertyCategoryBehavior = "Behavior";

	public const string PropertyCategoryData = "Data";

	public const string PropertyCategoryDDE = "DDE";

	public const string PropertyCategoryDesign = "Design";

	public const string PropertyCategoryDragDrop = "Drag Drop";

	public const string PropertyCategoryFocus = "Focus";

	public const string PropertyCategoryFont = "Font";

	public const string PropertyCategoryFormat = "Format";

	public const string PropertyCategoryKey = "Key";

	public const string PropertyCategoryList = "List";

	public const string PropertyCategoryLayout = "Layout";

	public const string PropertyCategoryDefault = "Misc";

	public const string PropertyCategoryMouse = "Mouse";

	public const string PropertyCategoryPosition = "Position";

	public const string PropertyCategoryText = "Text";

	public const string PropertyCategoryScale = "Scale";

	public const string PropertyCategoryWindowStyle = "Window Style";

	public const string PropertyCategoryConfig = "Configurations";

	public const string ArgumentNull_ArrayWithNullElements = "The array cannot contain null elements.";

	public const string OnlyAllowedOnce = "This operation is only allowed once per object.";

	public const string BeginIndexNotNegative = "Start index cannot be less than 0 or greater than input length.";

	public const string LengthNotNegative = "Length cannot be less than 0 or exceed input length.";

	public const string UnimplementedState = "Unimplemented state.";

	public const string UnexpectedOpcode = "Unexpected opcode in regular expression generation: {0}.";

	public const string NoResultOnFailed = "Result cannot be called on a failed Match.";

	public const string UnterminatedBracket = "Unterminated [] set.";

	public const string TooManyParens = "Too many )'s.";

	public const string NestedQuantify = "Nested quantifier {0}.";

	public const string QuantifyAfterNothing = "Quantifier {x,y} following nothing.";

	public const string InternalError = "Internal error in ScanRegex.";

	public const string IllegalRange = "Illegal {x,y} with x > y.";

	public const string NotEnoughParens = "Not enough )'s.";

	public const string BadClassInCharRange = "Cannot include class \\{0} in character range.";

	public const string ReversedCharRange = "[x-y] range in reverse order.";

	public const string UndefinedReference = "(?({0}) ) reference to undefined group.";

	public const string MalformedReference = "(?({0}) ) malformed.";

	public const string UnrecognizedGrouping = "Unrecognized grouping construct.";

	public const string UnterminatedComment = "Unterminated (?#...) comment.";

	public const string IllegalEndEscape = "Illegal \\ at end of pattern.";

	public const string MalformedNameRef = "Malformed \\k<...> named back reference.";

	public const string UndefinedBackref = "Reference to undefined group number {0}.";

	public const string UndefinedNameRef = "Reference to undefined group name {0}.";

	public const string TooFewHex = "Insufficient hexadecimal digits.";

	public const string MissingControl = "Missing control character.";

	public const string UnrecognizedControl = "Unrecognized control character.";

	public const string UnrecognizedEscape = "Unrecognized escape sequence \\{0}.";

	public const string IllegalCondition = "Illegal conditional (?(...)) expression.";

	public const string TooManyAlternates = "Too many | in (?()|).";

	public const string MakeException = "parsing \"{0}\" - {1}";

	public const string IncompleteSlashP = "Incomplete \\p{X} character escape.";

	public const string MalformedSlashP = "Malformed \\p{X} character escape.";

	public const string InvalidGroupName = "Invalid group name: Group names must begin with a word character.";

	public const string CapnumNotZero = "Capture number cannot be zero.";

	public const string AlternationCantCapture = "Alternation conditions do not capture and cannot be named.";

	public const string AlternationCantHaveComment = "Alternation conditions cannot be comments.";

	public const string CaptureGroupOutOfRange = "Capture group numbers must be less than or equal to Int32.MaxValue.";

	public const string SubtractionMustBeLast = "A subtraction must be the last element in a character class.";

	public const string UnknownProperty = "Unknown property '{0}'.";

	public const string ReplacementError = "Replacement pattern error.";

	public const string CountTooSmall = "Count cannot be less than -1.";

	public const string EnumNotStarted = "Enumeration has either not started or has already finished.";

	public const string Arg_InvalidArrayType = "Target array type is not compatible with the type of items in the collection.";

	public const string RegexMatchTimeoutException_Occurred = "The RegEx engine has timed out while trying to match a pattern to an input string. This can occur for many reasons, including very large inputs or excessive backtracking caused by nested quantifiers, back-references and other factors.";

	public const string IllegalDefaultRegexMatchTimeoutInAppDomain = "AppDomain data '{0}' contains an invalid value or object for specifying a default matching timeout for System.Text.RegularExpressions.Regex.";

	public const string FileObject_AlreadyOpen = "The file is already open.  Call Close before trying to open the FileObject again.";

	public const string FileObject_Closed = "The FileObject is currently closed.  Try opening it.";

	public const string FileObject_NotWhileWriting = "File information cannot be queried while open for writing.";

	public const string FileObject_FileDoesNotExist = "File information cannot be queried if the file does not exist.";

	public const string FileObject_MustBeClosed = "This operation can only be done when the FileObject is closed.";

	public const string FileObject_MustBeFileName = "You must specify a file name, not a relative or absolute path.";

	public const string FileObject_InvalidInternalState = "FileObject's open mode wasn't set to a valid value.  This FileObject is corrupt.";

	public const string FileObject_PathNotSet = "The path has not been set, or is an empty string.  Please ensure you specify some path.";

	public const string FileObject_Reading = "The file is currently open for reading.  Close the file and reopen it before attempting this.";

	public const string FileObject_Writing = "The file is currently open for writing.  Close the file and reopen it before attempting this.";

	public const string FileObject_InvalidEnumeration = "Enumerator is positioned before the first line or after the last line of the file.";

	public const string FileObject_NoReset = "Reset is not supported on a FileLineEnumerator.";

	public const string DirectoryObject_MustBeDirName = "You must specify a directory name, not a relative or absolute path.";

	public const string DirectoryObjectPathDescr = "The fully qualified, or relative path to the directory you wish to read from. E.g., \"c:\\temp\".";

	public const string FileObjectDetectEncodingDescr = "Determines whether the file will be parsed to see if it has a byte order mark indicating its encoding.  If it does, this will be used rather than the current specified encoding.";

	public const string FileObjectEncodingDescr = "The encoding to use when reading the file. UTF-8 is the default.";

	public const string FileObjectPathDescr = "The fully qualified, or relative path to the file you wish to read from. E.g., \"myfile.txt\".";

	public const string Arg_EnumIllegalVal = "Illegal enum value: {0}.";

	public const string Arg_OutOfRange_NeedNonNegNum = "Non-negative number required.";

	public const string Argument_InvalidPermissionState = "Invalid permission state.";

	public const string Argument_InvalidOidValue = "The OID value was invalid.";

	public const string Argument_WrongType = "Operation on type '{0}' attempted with target of incorrect type.";

	public const string Arg_EmptyOrNullString = "String cannot be empty or null.";

	public const string Arg_EmptyOrNullArray = "Array cannot be empty or null.";

	public const string Argument_InvalidClassAttribute = "The value of \"class\" attribute is invalid.";

	public const string Argument_InvalidNameType = "The value of \"nameType\" is invalid.";

	public const string InvalidOperation_DuplicateItemNotAllowed = "Duplicate items are not allowed in the collection.";

	public const string Cryptography_Asn_MismatchedOidInCollection = "The AsnEncodedData object does not have the same OID for the collection.";

	public const string Cryptography_Cms_Envelope_Empty_Content = "Cannot create CMS enveloped for empty content.";

	public const string Cryptography_Cms_Invalid_Recipient_Info_Type = "The recipient info type {0} is not valid.";

	public const string Cryptography_Cms_Invalid_Subject_Identifier_Type = "The subject identifier type {0} is not valid.";

	public const string Cryptography_Cms_Invalid_Subject_Identifier_Type_Value_Mismatch = "The subject identifier type {0} does not match the value data type {1}.";

	public const string Cryptography_Cms_Key_Agree_Date_Not_Available = "The Date property is not available for none KID key agree recipient.";

	public const string Cryptography_Cms_Key_Agree_Other_Key_Attribute_Not_Available = "The OtherKeyAttribute property is not available for none KID key agree recipient.";

	public const string Cryptography_Cms_MessageNotSigned = "The CMS message is not signed.";

	public const string Cryptography_Cms_MessageNotSignedByNoSignature = "The CMS message is not signed by NoSignature.";

	public const string Cryptography_Cms_MessageNotEncrypted = "The CMS message is not encrypted.";

	public const string Cryptography_Cms_Not_Supported = "The Cryptographic Message Standard (CMS) is not supported on this platform.";

	public const string Cryptography_Cms_RecipientCertificateNotFound = "The recipient certificate is not specified.";

	public const string Cryptography_Cms_Sign_Empty_Content = "Cannot create CMS signature for empty content.";

	public const string Cryptography_Cms_Sign_No_Signature_First_Signer = "CmsSigner has to be the first signer with NoSignature.";

	public const string Cryptography_DpApi_InvalidMemoryLength = "The length of the data should be a multiple of 16 bytes.";

	public const string Cryptography_InvalidHandle = "{0} is an invalid handle.";

	public const string Cryptography_InvalidContextHandle = "The chain context handle is invalid.";

	public const string Cryptography_InvalidStoreHandle = "The store handle is invalid.";

	public const string Cryptography_Oid_InvalidValue = "The OID value is invalid.";

	public const string Cryptography_Pkcs9_ExplicitAddNotAllowed = "The PKCS 9 attribute cannot be explicitly added to the collection.";

	public const string Cryptography_Pkcs9_InvalidOid = "The OID does not represent a valid PKCS 9 attribute.";

	public const string Cryptography_Pkcs9_MultipleSigningTimeNotAllowed = "Cannot add multiple PKCS 9 signing time attributes.";

	public const string Cryptography_Pkcs9_AttributeMismatch = "The parameter should be a PKCS 9 attribute.";

	public const string Cryptography_X509_AddFailed = "Adding certificate with index '{0}' failed.";

	public const string Cryptography_X509_BadEncoding = "Input data cannot be coded as a valid certificate.";

	public const string Cryptography_X509_ExportFailed = "The certificate export operation failed.";

	public const string Cryptography_X509_ExtensionMismatch = "The parameter should be an X509Extension.";

	public const string Cryptography_X509_InvalidFindType = "Invalid find type.";

	public const string Cryptography_X509_InvalidFindValue = "Invalid find value.";

	public const string Cryptography_X509_InvalidEncodingFormat = "Invalid encoding format.";

	public const string Cryptography_X509_InvalidContentType = "Invalid content type.";

	public const string Cryptography_X509_KeyMismatch = "The public key of the certificate does not match the value specified.";

	public const string Cryptography_X509_RemoveFailed = "Removing certificate with index '{0}' failed.";

	public const string Cryptography_X509_StoreNotOpen = "The X509 certificate store has not been opened.";

	public const string Environment_NotInteractive = "The current session is not interactive.";

	public const string NotSupported_InvalidKeyImpl = "Only asymmetric keys that implement ICspAsymmetricAlgorithm are supported.";

	public const string NotSupported_KeyAlgorithm = "The certificate key algorithm is not supported.";

	public const string NotSupported_PlatformRequiresNT = "This operation is only supported on Windows 2000, Windows XP, and higher.";

	public const string NotSupported_UnreadableStream = "Stream does not support reading.";

	public const string Security_InvalidValue = "The {0} value was invalid.";

	public const string Unknown_Error = "Unknown error.";

	public const string security_ServiceNameCollection_EmptyServiceName = "A service name must not be null or empty.";

	public const string security_ExtendedProtectionPolicy_UseDifferentConstructorForNever = "To construct a policy with PolicyEnforcement.Never, the single-parameter constructor must be used.";

	public const string security_ExtendedProtectionPolicy_NoEmptyServiceNameCollection = "The ServiceNameCollection must contain at least one service name.";

	public const string security_ExtendedProtection_NoOSSupport = "This operation requires OS support for extended protection.";

	public const string net_nonClsCompliantException = "A non-CLS Compliant Exception (i.e. an object that does not derive from System.Exception) was thrown.";

	public const string net_illegalConfigWith = "The '{0}' attribute cannot appear when '{1}' is present.";

	public const string net_illegalConfigWithout = "The '{0}' attribute can only appear when '{1}' is present.";

	public const string net_baddate = "The value of the date string in the header is invalid.";

	public const string net_writestarted = "This property cannot be set after writing has started.";

	public const string net_reqsubmitted = "This operation cannot be performed after the request has been submitted.";

	public const string net_ftp_no_http_cmd = "The requested FTP command is not supported when using HTTP proxy.";

	public const string net_ftp_invalid_method_name = "FTP Method names cannot be null or empty.";

	public const string net_ftp_invalid_renameto = "The RenameTo filename cannot be null or empty.";

	public const string net_ftp_no_defaultcreds = "Default credentials are not supported on an FTP request.";

	public const string net_ftpnoresponse = "This type of FTP request does not return a response stream.";

	public const string net_ftp_response_invalid_format = "The response string '{0}' has invalid format.";

	public const string net_ftp_no_offsetforhttp = "Offsets are not supported when sending an FTP request over an HTTP proxy.";

	public const string net_ftp_invalid_uri = "The requested URI is invalid for this FTP command.";

	public const string net_ftp_invalid_status_response = "The status response ({0}) is not expected in response to '{1}' command.";

	public const string net_ftp_server_failed_passive = "The server failed the passive mode request with status response ({0}).";

	public const string net_ftp_active_address_different = "The data connection was made from an address that is different than the address to which the FTP connection was made.";

	public const string net_ftp_proxy_does_not_support_ssl = "SSL cannot be enabled when using a proxy.";

	public const string net_ftp_invalid_response_filename = "The server returned the filename ({0}) which is not valid.";

	public const string net_ftp_unsupported_method = "This method is not supported.";

	public const string net_resubmitcanceled = "An error occurred on an automatic resubmission of the request.";

	public const string net_redirect_perm = "WebPermission demand failed for redirect URI.";

	public const string net_resubmitprotofailed = "Cannot handle redirect from HTTP/HTTPS protocols to other dissimilar ones.";

	public const string net_needchunked = "TransferEncoding requires the SendChunked property to be set to true.";

	public const string net_connarg = "Keep-Alive and Close may not be set using this property.";

	public const string net_no100 = "100-Continue may not be set using this property.";

	public const string net_fromto = "The From parameter cannot be less than To.";

	public const string net_rangetoosmall = "The From or To parameter cannot be less than 0.";

	public const string net_invalidversion = "This protocol version is not supported.";

	public const string net_toosmall = "The specified value must be greater than 0.";

	public const string net_toolong = "The size of {0} is too long. It cannot be longer than {1} characters.";

	public const string net_connclosed = "The underlying connection was closed: {0}.";

	public const string net_servererror = "The remote server returned an error: {0}.";

	public const string net_nouploadonget = "Cannot send a content-body with this verb-type.";

	public const string net_mutualauthfailed = "The requirement for mutual authentication was not met by the remote server.";

	public const string net_invasync = "Cannot block a call on this socket while an earlier asynchronous call is in progress.";

	public const string net_inasync = "An asynchronous call is already in progress. It must be completed or canceled before you can call this method.";

	public const string net_mustbeuri = "The {0} parameter must represent a valid Uri (see inner exception).";

	public const string net_format_shexp = "The shell expression '{0}' could not be parsed because it is formatted incorrectly.";

	public const string net_cannot_load_proxy_helper = "Failed to load the proxy script runtime environment from the Microsoft.JScript assembly.";

	public const string net_invalid_host = "The specified value is not a valid Host header string.";

	public const string net_repcall = "Cannot re-call BeginGetRequestStream/BeginGetResponse while a previous call is still in progress.";

	public const string net_badmethod = "Cannot set null or blank methods on request.";

	public const string net_io_timeout_use_ge_zero = "Timeout can be only be set to 'System.Threading.Timeout.Infinite' or a value >= 0.";

	public const string net_io_timeout_use_gt_zero = "Timeout can be only be set to 'System.Threading.Timeout.Infinite' or a value > 0.";

	public const string net_io_no_0timeouts = "NetworkStream does not support a 0 millisecond timeout, use a value greater than zero for the timeout instead.";

	public const string net_requestaborted = "The request was aborted: {0}.";

	public const string net_tooManyRedirections = "Too many automatic redirections were attempted.";

	public const string net_authmodulenotregistered = "The supplied authentication module is not registered.";

	public const string net_authschemenotregistered = "There is no registered module for this authentication scheme.";

	public const string net_proxyschemenotsupported = "The ServicePointManager does not support proxies with the {0} scheme.";

	public const string net_maxsrvpoints = "The maximum number of service points was exceeded.";

	public const string net_unknown_prefix = "The URI prefix is not recognized.";

	public const string net_notconnected = "The operation is not allowed on non-connected sockets.";

	public const string net_notstream = "The operation is not allowed on non-stream oriented sockets.";

	public const string net_timeout = "The operation has timed out.";

	public const string net_nocontentlengthonget = "Content-Length or Chunked Encoding cannot be set for an operation that does not write data.";

	public const string net_contentlengthmissing = "When performing a write operation with AllowWriteStreamBuffering set to false, you must either set ContentLength to a non-negative number or set SendChunked to true.";

	public const string net_nonhttpproxynotallowed = "The URI scheme for the supplied IWebProxy has the illegal value '{0}'. Only 'http' is supported.";

	public const string net_nottoken = "The supplied string is not a valid HTTP token.";

	public const string net_rangetype = "A different range specifier has already been added to this request.";

	public const string net_need_writebuffering = "This request requires buffering data to succeed.";

	public const string net_securityprotocolnotsupported = "The requested security protocol is not supported.";

	public const string net_nodefaultcreds = "Default credentials cannot be supplied for the {0} authentication scheme.";

	public const string net_stopped = "Not listening. You must call the Start() method before calling this method.";

	public const string net_udpconnected = "Cannot send packets to an arbitrary host while connected.";

	public const string net_no_concurrent_io_allowed = "The stream does not support concurrent IO read or write operations.";

	public const string net_needmorethreads = "There were not enough free threads in the ThreadPool to complete the operation.";

	public const string net_MethodNotSupportedException = "This method is not supported by this class.";

	public const string net_PropertyNotSupportedException = "This property is not supported by this class.";

	public const string net_ProtocolNotSupportedException = "The '{0}' protocol is not supported by this class.";

	public const string net_SelectModeNotSupportedException = "The '{0}' select mode is not supported by this class.";

	public const string net_InvalidSocketHandle = "The socket handle is not valid.";

	public const string net_InvalidAddressFamily = "The AddressFamily {0} is not valid for the {1} end point, use {2} instead.";

	public const string net_InvalidEndPointAddressFamily = "The supplied EndPoint of AddressFamily {0} is not valid for this Socket, use {1} instead.";

	public const string net_InvalidSocketAddressSize = "The supplied {0} is an invalid size for the {1} end point.";

	public const string net_invalidAddressList = "None of the discovered or specified addresses match the socket address family.";

	public const string net_invalidPingBufferSize = "The buffer length must not exceed 65500 bytes.";

	public const string net_cant_perform_during_shutdown = "This operation cannot be performed while the AppDomain is shutting down.";

	public const string net_cant_create_environment = "Unable to create another web proxy script environment at this time.";

	public const string net_completed_result = "This operation cannot be performed on a completed asynchronous result object.";

	public const string net_protocol_invalid_family = "'{0}' Client can only accept InterNetwork or InterNetworkV6 addresses.";

	public const string net_protocol_invalid_multicast_family = "Multicast family is not the same as the family of the '{0}' Client.";

	public const string net_empty_osinstalltype = "The Registry value '{0}' was either empty or not a string type.";

	public const string net_unknown_osinstalltype = "Unknown Windows installation type '{0}'.";

	public const string net_cant_determine_osinstalltype = "Can't determine OS installation type: Can't read key '{0}'. Exception message: {1}";

	public const string net_osinstalltype = "Current OS installation type is '{0}'.";

	public const string net_entire_body_not_written = "You must write ContentLength bytes to the request stream before calling [Begin]GetResponse.";

	public const string net_must_provide_request_body = "You must provide a request body if you set ContentLength>0 or SendChunked==true.  Do this by calling [Begin]GetRequestStream before [Begin]GetResponse.";

	public const string net_sockets_zerolist = "The parameter {0} must contain one or more elements.";

	public const string net_sockets_blocking = "The operation is not allowed on a non-blocking Socket.";

	public const string net_sockets_useblocking = "Use the Blocking property to change the status of the Socket.";

	public const string net_sockets_select = "The operation is not allowed on objects of type {0}. Use only objects of type {1}.";

	public const string net_sockets_toolarge_select = "The {0} list contains too many items; a maximum of {1} is allowed.";

	public const string net_sockets_empty_select = "All lists are either null or empty.";

	public const string net_sockets_mustbind = "You must call the Bind method before performing this operation.";

	public const string net_sockets_mustlisten = "You must call the Listen method before performing this operation.";

	public const string net_sockets_mustnotlisten = "You may not perform this operation after calling the Listen method.";

	public const string net_sockets_mustnotbebound = "The socket must not be bound or connected.";

	public const string net_sockets_namedmustnotbebound = "{0}: The socket must not be bound or connected.";

	public const string net_sockets_invalid_socketinformation = "The specified value for the socket information is invalid.";

	public const string net_sockets_invalid_ipaddress_length = "The number of specified IP addresses has to be greater than 0.";

	public const string net_sockets_invalid_optionValue = "The specified value is not a valid '{0}'.";

	public const string net_sockets_invalid_optionValue_all = "The specified value is not valid.";

	public const string net_sockets_invalid_dnsendpoint = "The parameter {0} must not be of type DnsEndPoint.";

	public const string net_sockets_disconnectedConnect = "Once the socket has been disconnected, you can only reconnect again asynchronously, and only to a different EndPoint.  BeginConnect must be called on a thread that won't exit until the operation has been completed.";

	public const string net_sockets_disconnectedAccept = "Once the socket has been disconnected, you can only accept again asynchronously.  BeginAccept must be called on a thread that won't exit until the operation has been completed.";

	public const string net_tcplistener_mustbestopped = "The TcpListener must not be listening before performing this operation.";

	public const string net_sockets_no_duplicate_async = "BeginConnect cannot be called while another asynchronous operation is in progress on the same Socket.";

	public const string net_socketopinprogress = "An asynchronous socket operation is already in progress using this SocketAsyncEventArgs instance.";

	public const string net_buffercounttoosmall = "The Buffer space specified by the Count property is insufficient for the AcceptAsync method.";

	public const string net_multibuffernotsupported = "Multiple buffers cannot be used with this method.";

	public const string net_ambiguousbuffers = "Buffer and BufferList properties cannot both be non-null.";

	public const string net_sockets_ipv6only = "This operation is only valid for IPv6 Sockets.";

	public const string net_perfcounter_initialized_success = "System.Net performance counters initialization completed successful.";

	public const string net_perfcounter_initialized_error = "System.Net performance counters initialization completed with errors. See System.Net trace file for more information.";

	public const string net_perfcounter_nocategory = "Performance counter category '{0}' doesn't exist. No System.Net performance counter values available.";

	public const string net_perfcounter_initialization_started = "System.Net performance counter initialization started.";

	public const string net_perfcounter_cant_queue_workitem = "Can't queue counter initialization logic on a thread pool thread. System.Net performance counters will not be available.";

	public const string net_config_proxy = "Error creating the Web Proxy specified in the 'system.net/defaultProxy' configuration section.";

	public const string net_config_proxy_module_not_public = "The specified proxy module type is not public.";

	public const string net_config_authenticationmodules = "Error creating the modules specified in the 'system.net/authenticationModules' configuration section.";

	public const string net_config_webrequestmodules = "Error creating the modules specified in the 'system.net/webRequestModules' configuration section.";

	public const string net_config_requestcaching = "Error creating the Web Request caching policy specified in the 'system.net/requestCaching' configuration section.";

	public const string net_config_section_permission = "Insufficient permissions for setting the configuration section '{0}'.";

	public const string net_config_element_permission = "Insufficient permissions for setting the configuration element '{0}'.";

	public const string net_config_property_permission = "Insufficient permissions for setting the configuration property '{0}'.";

	public const string net_WebResponseParseError_InvalidHeaderName = "Header name is invalid";

	public const string net_WebResponseParseError_InvalidContentLength = "'Content-Length' header value is invalid";

	public const string net_WebResponseParseError_IncompleteHeaderLine = "Invalid header name";

	public const string net_WebResponseParseError_CrLfError = "CR must be followed by LF";

	public const string net_WebResponseParseError_InvalidChunkFormat = "Response chunk format is invalid";

	public const string net_WebResponseParseError_UnexpectedServerResponse = "Unexpected server response received";

	public const string net_webstatus_Success = "Status success";

	public const string net_webstatus_NameResolutionFailure = "The remote name could not be resolved";

	public const string net_webstatus_ConnectFailure = "Unable to connect to the remote server";

	public const string net_webstatus_ReceiveFailure = "An unexpected error occurred on a receive";

	public const string net_webstatus_SendFailure = "An unexpected error occurred on a send";

	public const string net_webstatus_PipelineFailure = "A pipeline failure occurred";

	public const string net_webstatus_RequestCanceled = "The request was canceled";

	public const string net_webstatus_ConnectionClosed = "The connection was closed unexpectedly";

	public const string net_webstatus_TrustFailure = "Could not establish trust relationship for the SSL/TLS secure channel";

	public const string net_webstatus_SecureChannelFailure = "Could not create SSL/TLS secure channel";

	public const string net_webstatus_ServerProtocolViolation = "The server committed a protocol violation";

	public const string net_webstatus_KeepAliveFailure = "A connection that was expected to be kept alive was closed by the server";

	public const string net_webstatus_ProxyNameResolutionFailure = "The proxy name could not be resolved";

	public const string net_webstatus_MessageLengthLimitExceeded = "The message length limit was exceeded";

	public const string net_webstatus_CacheEntryNotFound = "The request cache-only policy does not allow a network request and the response is not found in cache";

	public const string net_webstatus_RequestProhibitedByCachePolicy = "The request could not be satisfied using a cache-only policy";

	public const string net_webstatus_Timeout = "The operation has timed out";

	public const string net_webstatus_RequestProhibitedByProxy = "The IWebProxy object associated with the request did not allow the request to proceed";

	public const string net_InvalidStatusCode = "The server returned a status code outside the valid range of 100-599.";

	public const string net_ftpstatuscode_ServiceNotAvailable = "Service not available, closing control connection";

	public const string net_ftpstatuscode_CantOpenData = "Can't open data connection";

	public const string net_ftpstatuscode_ConnectionClosed = "Connection closed; transfer aborted";

	public const string net_ftpstatuscode_ActionNotTakenFileUnavailableOrBusy = "File unavailable (e.g., file busy)";

	public const string net_ftpstatuscode_ActionAbortedLocalProcessingError = "Local error in processing";

	public const string net_ftpstatuscode_ActionNotTakenInsufficentSpace = "Insufficient storage space in system";

	public const string net_ftpstatuscode_CommandSyntaxError = "Syntax error, command unrecognized";

	public const string net_ftpstatuscode_ArgumentSyntaxError = "Syntax error in parameters or arguments";

	public const string net_ftpstatuscode_CommandNotImplemented = "Command not implemented";

	public const string net_ftpstatuscode_BadCommandSequence = "Bad sequence of commands";

	public const string net_ftpstatuscode_NotLoggedIn = "Not logged in";

	public const string net_ftpstatuscode_AccountNeeded = "Need account for storing files";

	public const string net_ftpstatuscode_ActionNotTakenFileUnavailable = "File unavailable (e.g., file not found, no access)";

	public const string net_ftpstatuscode_ActionAbortedUnknownPageType = "Page type unknown";

	public const string net_ftpstatuscode_FileActionAborted = "Exceeded storage allocation (for current directory or data set)";

	public const string net_ftpstatuscode_ActionNotTakenFilenameNotAllowed = "File name not allowed";

	public const string net_httpstatuscode_NoContent = "No Content";

	public const string net_httpstatuscode_NonAuthoritativeInformation = "Non Authoritative Information";

	public const string net_httpstatuscode_ResetContent = "Reset Content";

	public const string net_httpstatuscode_PartialContent = "Partial Content";

	public const string net_httpstatuscode_MultipleChoices = "Multiple Choices Redirect";

	public const string net_httpstatuscode_Ambiguous = "Ambiguous Redirect";

	public const string net_httpstatuscode_MovedPermanently = "Moved Permanently Redirect";

	public const string net_httpstatuscode_Moved = "Moved Redirect";

	public const string net_httpstatuscode_Found = "Found Redirect";

	public const string net_httpstatuscode_Redirect = "Redirect";

	public const string net_httpstatuscode_SeeOther = "See Other";

	public const string net_httpstatuscode_RedirectMethod = "Redirect Method";

	public const string net_httpstatuscode_NotModified = "Not Modified";

	public const string net_httpstatuscode_UseProxy = "Use Proxy Redirect";

	public const string net_httpstatuscode_TemporaryRedirect = "Temporary Redirect";

	public const string net_httpstatuscode_RedirectKeepVerb = "Redirect Keep Verb";

	public const string net_httpstatuscode_BadRequest = "Bad Request";

	public const string net_httpstatuscode_Unauthorized = "Unauthorized";

	public const string net_httpstatuscode_PaymentRequired = "Payment Required";

	public const string net_httpstatuscode_Forbidden = "Forbidden";

	public const string net_httpstatuscode_NotFound = "Not Found";

	public const string net_httpstatuscode_MethodNotAllowed = "Method Not Allowed";

	public const string net_httpstatuscode_NotAcceptable = "Not Acceptable";

	public const string net_httpstatuscode_ProxyAuthenticationRequired = "Proxy Authentication Required";

	public const string net_httpstatuscode_RequestTimeout = "Request Timeout";

	public const string net_httpstatuscode_Conflict = "Conflict";

	public const string net_httpstatuscode_Gone = "Gone";

	public const string net_httpstatuscode_LengthRequired = "Length Required";

	public const string net_httpstatuscode_InternalServerError = "Internal Server Error";

	public const string net_httpstatuscode_NotImplemented = "Not Implemented";

	public const string net_httpstatuscode_BadGateway = "Bad Gateway";

	public const string net_httpstatuscode_ServiceUnavailable = "Server Unavailable";

	public const string net_httpstatuscode_GatewayTimeout = "Gateway Timeout";

	public const string net_httpstatuscode_HttpVersionNotSupported = "Http Version Not Supported";

	public const string net_emptystringset = "This property cannot be set to an empty string.";

	public const string net_emptystringcall = "The parameter '{0}' cannot be an empty string.";

	public const string net_headers_req = "This collection holds response headers and cannot contain the specified request header.";

	public const string net_headers_rsp = "This collection holds request headers and cannot contain the specified response header.";

	public const string net_headers_toolong = "Header values cannot be longer than {0} characters.";

	public const string net_WebHeaderInvalidCRLFChars = "Specified value has invalid CRLF characters.";

	public const string net_WebHeaderInvalidHeaderChars = "Specified value has invalid HTTP Header characters.";

	public const string net_WebHeaderInvalidNonAsciiChars = "Specified value has invalid non-ASCII characters.";

	public const string net_WebHeaderMissingColon = "Specified value does not have a ':' separator.";

	public const string net_headerrestrict = "The '{0}' header must be modified using the appropriate property or method.";

	public const string net_io_completionportwasbound = "The socket has already been bound to an io completion port.";

	public const string net_io_writefailure = "Unable to write data to the transport connection: {0}.";

	public const string net_io_readfailure = "Unable to read data from the transport connection: {0}.";

	public const string net_io_connectionclosed = "The connection was closed";

	public const string net_io_transportfailure = "Unable to create a transport connection.";

	public const string net_io_internal_bind = "Internal Error: A socket handle could not be bound to a completion port.";

	public const string net_io_invalidnestedcall = "The {0} method cannot be called when another {1} operation is pending.";

	public const string net_io_must_be_rw_stream = "The stream has to be read/write.";

	public const string net_io_header_id = "Found a wrong header field {0} read = {1}, expected = {2}.";

	public const string net_io_out_range = "The byte count must not exceed {0} bytes for this stream type.";

	public const string net_io_encrypt = "The encryption operation failed, see inner exception.";

	public const string net_io_decrypt = "The decryption operation failed, see inner exception.";

	public const string net_io_read = "The read operation failed, see inner exception.";

	public const string net_io_write = "The write operation failed, see inner exception.";

	public const string net_io_eof = "Received an unexpected EOF or 0 bytes from the transport stream.";

	public const string net_io_async_result = "The parameter: {0} is not valid. Use the object returned from corresponding Begin async call.";

	public const string net_tls_version = "The SSL version is not supported.";

	public const string net_perm_target = "Cannot cast target permission type.";

	public const string net_perm_both_regex = "Cannot subset Regex. Only support if both patterns are identical.";

	public const string net_perm_none = "There are no permissions to check.";

	public const string net_perm_attrib_count = "The value for '{0}' must be specified.";

	public const string net_perm_invalid_val = "The parameter value '{0}={1}' is invalid.";

	public const string net_perm_attrib_multi = "The permission '{0}={1}' cannot be added. Add a separate Attribute statement.";

	public const string net_perm_epname = "The argument value '{0}' is invalid for creating a SocketPermission object.";

	public const string net_perm_invalid_val_in_element = "The '{0}' element contains one or more invalid values.";

	public const string net_invalid_ip_addr = "IPv4 address 0.0.0.0 and IPv6 address ::0 are unspecified addresses that cannot be used as a target address.";

	public const string dns_bad_ip_address = "An invalid IP address was specified.";

	public const string net_bad_mac_address = "An invalid physical address was specified.";

	public const string net_ping = "An exception occurred during a Ping request.";

	public const string net_bad_ip_address_prefix = "An invalid IP address prefix was specified.";

	public const string net_max_ip_address_list_length_exceeded = "Too many addresses to sort. The maximum number of addresses allowed are {0}.";

	public const string net_ipv4_not_installed = "IPv4 is not installed.";

	public const string net_ipv6_not_installed = "IPv6 is not installed.";

	public const string net_webclient = "An exception occurred during a WebClient request.";

	public const string net_webclient_ContentType = "The Content-Type header cannot be changed from its default value for this request.";

	public const string net_webclient_Multipart = "The Content-Type header cannot be set to a multipart type for this request.";

	public const string net_webclient_no_concurrent_io_allowed = "WebClient does not support concurrent I/O operations.";

	public const string net_webclient_invalid_baseaddress = "The specified value is not a valid base address.";

	public const string net_container_add_cookie = "An error occurred when adding a cookie to the container.";

	public const string net_cookie_invalid = "Invalid contents for cookie = '{0}'.";

	public const string net_cookie_size = "The value size of the cookie is '{0}'. This exceeds the configured maximum size, which is '{1}'.";

	public const string net_cookie_parse_header = "An error occurred when parsing the Cookie header for Uri '{0}'.";

	public const string net_cookie_attribute = "The '{0}'='{1}' part of the cookie is invalid.";

	public const string net_cookie_format = "Cookie format error.";

	public const string net_cookie_capacity_range = "'{0}' has to be greater than '{1}' and less than '{2}'.";

	public const string net_set_token = "Failed to impersonate a thread doing authentication of a Web Request.";

	public const string net_revert_token = "Failed to revert the thread token after authenticating a Web Request.";

	public const string net_ssl_io_async_context = "Async context creation failed.";

	public const string net_ssl_io_encrypt = "The encryption operation failed, see inner exception.";

	public const string net_ssl_io_decrypt = "The decryption operation failed, see inner exception.";

	public const string net_ssl_io_context_expired = "The security context has expired.";

	public const string net_ssl_io_handshake_start = "The handshake failed. The remote side has dropped the stream.";

	public const string net_ssl_io_handshake = "The handshake failed, see inner exception.";

	public const string net_ssl_io_frame = "The handshake failed due to an unexpected packet format.";

	public const string net_ssl_io_corrupted = "The stream is corrupted due to an invalid SSL version number in the SSL protocol header.";

	public const string net_ssl_io_cert_validation = "The remote certificate is invalid according to the validation procedure.";

	public const string net_ssl_io_invalid_end_call = "{0} can only be called once for each asynchronous operation.";

	public const string net_ssl_io_invalid_begin_call = "{0} cannot be called when another {1} operation is pending.";

	public const string net_ssl_io_no_server_cert = "The server mode SSL must use a certificate with the associated private key.";

	public const string net_auth_bad_client_creds = "The server has rejected the client credentials.";

	public const string net_auth_bad_client_creds_or_target_mismatch = "Either the target name is incorrect or the server has rejected the client credentials.";

	public const string net_auth_context_expectation = "A security requirement was not fulfilled during authentication. Required: {0}, negotiated: {1}.";

	public const string net_auth_context_expectation_remote = "A remote side security requirement was not fulfilled during authentication. Try increasing the ProtectionLevel and/or ImpersonationLevel.";

	public const string net_auth_supported_impl_levels = "The supported values are Identification, Impersonation or Delegation.";

	public const string net_auth_no_anonymous_support = "The TokenImpersonationLevel.Anonymous level is not supported for authentication.";

	public const string net_auth_reauth = "This operation is not allowed on a security context that has already been authenticated.";

	public const string net_auth_noauth = "This operation is only allowed using a successfully authenticated context.";

	public const string net_auth_client_server = "Once authentication is attempted as the client or server, additional authentication attempts must use the same client or server role.";

	public const string net_auth_noencryption = "This authenticated context does not support data encryption.";

	public const string net_auth_SSPI = "A call to SSPI failed, see inner exception.";

	public const string net_auth_failure = "Authentication failed, see inner exception.";

	public const string net_auth_eof = "Authentication failed because the remote party has closed the transport stream.";

	public const string net_auth_alert = "Authentication failed on the remote side (the stream might still be available for additional authentication attempts).";

	public const string net_auth_ignored_reauth = "Re-authentication failed because the remote party continued to encrypt more than {0} bytes before answering re-authentication.";

	public const string net_auth_empty_read = "Protocol error: cannot proceed with SSPI handshake because an empty blob was received.";

	public const string net_auth_must_specify_extended_protection_scheme = "An extended protection policy must specify either a custom channel binding or a custom service name collection.";

	public const string net_frame_size = "Received an invalid authentication frame. The message size is limited to {0} bytes, attempted to read {1} bytes.";

	public const string net_frame_read_io = "Received incomplete authentication message. Remote party has probably closed the connection.";

	public const string net_frame_read_size = "Cannot determine the frame size or a corrupted frame was received.";

	public const string net_frame_max_size = "The payload size is limited to {0}, attempted set it to {1}.";

	public const string net_jscript_load = "The proxy JScript file threw an exception while being initialized: {0}.";

	public const string net_proxy_not_gmt = "The specified value is not a valid GMT time.";

	public const string net_proxy_invalid_dayofweek = "The specified value is not a valid day of the week.";

	public const string net_proxy_invalid_url_format = "The system proxy settings contain an invalid proxy server setting: '{0}'.";

	public const string net_param_not_string = "Argument must be a string instead of {0}.";

	public const string net_value_cannot_be_negative = "The specified value cannot be negative.";

	public const string net_invalid_offset = "Value of offset cannot be negative or greater than the length of the buffer.";

	public const string net_offset_plus_count = "Sum of offset and count cannot be greater than the length of the buffer.";

	public const string net_cannot_be_false = "The specified value cannot be false.";

	public const string net_cache_shadowstream_not_writable = "Shadow stream must be writable.";

	public const string net_cache_validator_fail = "The validation method {0}() returned a failure for this request.";

	public const string net_cache_access_denied = "For this RequestCache object, {0} access is denied.";

	public const string net_cache_validator_result = "The validation method {0}() returned the unexpected status: {1}.";

	public const string net_cache_retrieve_failure = "Cache retrieve failed: {0}.";

	public const string net_cache_not_supported_body = "The cached response is not supported for a request with a content body.";

	public const string net_cache_not_supported_command = "The cached response is not supported for a request with the specified request method.";

	public const string net_cache_not_accept_response = "The cache protocol refused the server response. To allow automatic request retrying, set request.AllowAutoRedirect to true.";

	public const string net_cache_method_failed = "The request (Method = {0}) cannot be served from the cache and will fail because of the effective CachePolicy: {1}.";

	public const string net_cache_key_failed = "The request failed because no cache entry (CacheKey = {0}) was found and the effective CachePolicy is {1}.";

	public const string net_cache_no_stream = "The cache protocol returned a cached response but the cache entry is invalid because it has a null stream. (Cache Key = {0}).";

	public const string net_cache_unsupported_partial_stream = "A partial content stream does not support this operation or some method argument is out of range.";

	public const string net_cache_not_configured = "No cache protocol is available for this request.";

	public const string net_cache_non_seekable_stream_not_supported = "The transport stream instance passed in the RangeStream constructor is not seekable and therefore is not supported.";

	public const string net_invalid_cast = "Invalid cast from {0} to {1}.";

	public const string net_collection_readonly = "The collection is read-only.";

	public const string net_not_ipermission = "Specified value does not contain 'IPermission' as its tag.";

	public const string net_no_classname = "Specified value does not contain a 'class' attribute.";

	public const string net_no_typename = "The value class attribute is not valid.";

	public const string net_servicePointAddressNotSupportedInHostMode = "This property is not supported for protocols that do not use URI.";

	public const string net_Websockets_WebSocketBaseFaulted = "An exception caused the WebSocket to enter the Aborted state. Please see the InnerException, if present, for more details.";

	public const string net_WebSockets_Generic = "An internal WebSocket error occurred. Please see the innerException, if present, for more details.";

	public const string net_WebSockets_NotAWebSocket_Generic = "A WebSocket operation was called on a request or response that is not a WebSocket.";

	public const string net_WebSockets_UnsupportedWebSocketVersion_Generic = "Unsupported WebSocket version.";

	public const string net_WebSockets_HeaderError_Generic = "The WebSocket request or response contained unsupported header(s).";

	public const string net_WebSockets_UnsupportedProtocol_Generic = "The WebSocket request or response operation was called with unsupported protocol(s).";

	public const string net_WebSockets_ClientSecWebSocketProtocolsBlank = "The WebSocket client sent a blank '{0}' header; this is not allowed by the WebSocket protocol specification. The client should omit the header if the client is not negotiating any sub-protocols.";

	public const string net_WebSockets_InvalidState_Generic = "The WebSocket instance cannot be used for communication because it has been transitioned into an invalid state.";

	public const string net_WebSockets_InvalidMessageType_Generic = "The received  message type is invalid after calling {0}. {0} should only be used if no more data is expected from the remote endpoint. Use '{1}' instead to keep being able to receive data but close the output channel.";

	public const string net_WebSockets_ConnectionClosedPrematurely_Generic = "The remote party closed the WebSocket connection without completing the close handshake.";

	public const string net_WebSockets_Scheme = "Only Uris starting with 'ws://' or 'wss://' are supported.";

	public const string net_WebSockets_AlreadyStarted = "The WebSocket has already been started.";

	public const string net_WebSockets_Connect101Expected = "The server returned status code '{0}' when status code '101' was expected.";

	public const string net_WebSockets_InvalidResponseHeader = "The '{0}' header value '{1}' is invalid.";

	public const string net_WebSockets_NotConnected = "The WebSocket is not connected.";

	public const string net_WebSockets_InvalidRegistration = "The WebSocket schemes must be registered with the HttpWebRequest class.";

	public const string net_WebSockets_NoDuplicateProtocol = "Duplicate protocols are not allowed: '{0}'.";

	public const string net_log_exception = "Exception in {0}::{1} - {2}.";

	public const string net_log_sspi_enumerating_security_packages = "Enumerating security packages:";

	public const string net_log_sspi_security_package_not_found = "Security package '{0}' was not found.";

	public const string net_log_sspi_security_context_input_buffer = "{0}(In-Buffer length={1}, Out-Buffer length={2}, returned code={3}).";

	public const string net_log_sspi_security_context_input_buffers = "{0}(In-Buffers count={1}, Out-Buffer length={2}, returned code={3}).";

	public const string net_log_sspi_selected_cipher_suite = "{0}(Protocol={1}, Cipher={2} {3} bit strength, Hash={4} {5} bit strength, Key Exchange={6} {7} bit strength).";

	public const string net_log_remote_certificate = "Remote certificate: {0}.";

	public const string net_log_locating_private_key_for_certificate = "Locating the private key for the certificate: {0}.";

	public const string net_log_cert_is_of_type_2 = "Certificate is of type X509Certificate2 and contains the private key.";

	public const string net_log_found_cert_in_store = "Found the certificate in the {0} store.";

	public const string net_log_did_not_find_cert_in_store = "Cannot find the certificate in either the LocalMachine store or the CurrentUser store.";

	public const string net_log_open_store_failed = "Opening Certificate store {0} failed, exception: {1}.";

	public const string net_log_got_certificate_from_delegate = "Got a certificate from the client delegate.";

	public const string net_log_no_delegate_and_have_no_client_cert = "Client delegate did not provide a certificate; and there are not other user-provided certificates. Need to attempt a session restart.";

	public const string net_log_no_delegate_but_have_client_cert = "Client delegate did not provide a certificate; but there are other user-provided certificates\".";

	public const string net_log_attempting_restart_using_cert = "Attempting to restart the session using the user-provided certificate: {0}.";

	public const string net_log_no_issuers_try_all_certs = "We have user-provided certificates. The server has not specified any issuers, so try all the certificates.";

	public const string net_log_server_issuers_look_for_matching_certs = "We have user-provided certificates. The server has specified {0} issuer(s). Looking for certificates that match any of the issuers.";

	public const string net_log_selected_cert = "Selected certificate: {0}.";

	public const string net_log_n_certs_after_filtering = "Left with {0} client certificates to choose from.";

	public const string net_log_finding_matching_certs = "Trying to find a matching certificate in the certificate store.";

	public const string net_log_using_cached_credential = "Using the cached credential handle.";

	public const string net_log_remote_cert_user_declared_valid = "Remote certificate was verified as valid by the user.";

	public const string net_log_remote_cert_user_declared_invalid = "Remote certificate was verified as invalid by the user.";

	public const string net_log_remote_cert_has_no_errors = "Remote certificate has no errors.";

	public const string net_log_remote_cert_has_errors = "Remote certificate has errors:";

	public const string net_log_remote_cert_not_available = "The remote server did not provide a certificate.";

	public const string net_log_remote_cert_name_mismatch = "Certificate name mismatch.";

	public const string net_log_proxy_autodetect_script_location_parse_error = "WebProxy failed to parse the auto-detected location of a proxy script:\"{0}\" into a Uri.";

	public const string net_log_proxy_autodetect_failed = "WebProxy failed to autodetect a Uri for a proxy script.";

	public const string net_log_proxy_script_execution_error = "WebProxy caught an exception while executing the ScriptReturn script: {0}.";

	public const string net_log_proxy_script_download_compile_error = "WebProxy caught an exception while  downloading/compiling the proxy script: {0}.";

	public const string net_log_proxy_system_setting_update = "ScriptEngine was notified of a potential change in the system's proxy settings and will update WebProxy settings.";

	public const string net_log_proxy_update_due_to_ip_config_change = "ScriptEngine was notified of a change in the IP configuration and will update WebProxy settings.";

	public const string net_log_proxy_called_with_null_parameter = "{0} was called with a null '{1}' parameter.";

	public const string net_log_proxy_called_with_invalid_parameter = "{0} was called with an invalid parameter.";

	public const string net_log_proxy_ras_supported = "RAS supported: {0}";

	public const string net_log_proxy_ras_notsupported_exception = "RAS is not supported. Can't create RasHelper instance.";

	public const string net_log_proxy_winhttp_cant_open_session = "Can't open WinHttp session. Error code: {0}.";

	public const string net_log_proxy_winhttp_getproxy_failed = "Can't retrieve proxy settings for Uri '{0}'. Error code: {1}.";

	public const string net_log_proxy_winhttp_timeout_error = "Can't specify proxy discovery timeout. Error code: {0}.";

	public const string net_log_cache_validation_failed_resubmit = "Resubmitting this request because cache cannot validate the response.";

	public const string net_log_cache_refused_server_response = "Caching protocol has refused the server response. To allow automatic request retrying set request.AllowAutoRedirect=true.";

	public const string net_log_cache_ftp_proxy_doesnt_support_partial = "This FTP request is configured to use a proxy through HTTP protocol. Cache revalidation and partially cached responses are not supported.";

	public const string net_log_cache_ftp_method = "FTP request method={0}.";

	public const string net_log_cache_ftp_supports_bin_only = "Caching is not supported for non-binary FTP request mode.";

	public const string net_log_cache_replacing_entry_with_HTTP_200 = "Replacing cache entry metadata with 'HTTP/1.1 200 OK' status line to satisfy HTTP cache protocol logic.";

	public const string net_log_cache_now_time = "[Now Time (UTC)] = {0}.";

	public const string net_log_cache_max_age_absolute = "[MaxAge] Absolute time expiration check (sensitive to clock skew), cache Expires: {0}.";

	public const string net_log_cache_age1 = "[Age1] Now - LastSynchronized = [Age1] Now - LastSynchronized = {0}, Last Synchronized: {1}.";

	public const string net_log_cache_age1_date_header = "[Age1] NowTime-Date Header = {0}, Date Header: {1}.";

	public const string net_log_cache_age1_last_synchronized = "[Age1] Now - LastSynchronized + AgeHeader = {0}, Last Synchronized: {1}.";

	public const string net_log_cache_age1_last_synchronized_age_header = "[Age1] Now - LastSynchronized + AgeHeader = {0}, Last Synchronized: {1}, Age Header: {2}.";

	public const string net_log_cache_age2 = "[Age2] AgeHeader = {0}.";

	public const string net_log_cache_max_age_cache_s_max_age = "[MaxAge] Cache s_MaxAge = {0}.";

	public const string net_log_cache_max_age_expires_date = "[MaxAge] Cache Expires - Date = {0}, Expires: {1}.";

	public const string net_log_cache_max_age_cache_max_age = "[MaxAge] Cache MaxAge = {0}.";

	public const string net_log_cache_no_max_age_use_10_percent = "[MaxAge] Cannot compute Cache MaxAge, use 10% since LastModified: {0}, LastModified: {1}.";

	public const string net_log_cache_no_max_age_use_default = "[MaxAge] Cannot compute Cache MaxAge, using default RequestCacheValidator.UnspecifiedMaxAge: {0}.";

	public const string net_log_cache_validator_invalid_for_policy = "This validator should not be called for policy : {0}.";

	public const string net_log_cache_response_last_modified = "Response LastModified={0},  ContentLength= {1}.";

	public const string net_log_cache_cache_last_modified = "Cache    LastModified={0},  ContentLength= {1}.";

	public const string net_log_cache_partial_and_non_zero_content_offset = "A Cache Entry is partial and the user request has non zero ContentOffset = {0}. A restart from cache is not supported for partial cache entries.";

	public const string net_log_cache_response_valid_based_on_policy = "Response is valid based on Policy = {0}.";

	public const string net_log_cache_null_response_failure = "Response is null so this Request should fail.";

	public const string net_log_cache_ftp_response_status = "FTP Response Status={0}, {1}.";

	public const string net_log_cache_resp_valid_based_on_retry = "Accept this response as valid based on the retry count = {0}.";

	public const string net_log_cache_no_update_based_on_method = "Cache is not updated based on the request Method = {0}.";

	public const string net_log_cache_removed_existing_invalid_entry = "Existing entry is removed because it was found invalid.";

	public const string net_log_cache_not_updated_based_on_policy = "Cache is not updated based on Policy = {0}.";

	public const string net_log_cache_not_updated_because_no_response = "Cache is not updated because there is no response associated with the request.";

	public const string net_log_cache_removed_existing_based_on_method = "Existing cache entry is removed based on the request Method = {0}.";

	public const string net_log_cache_existing_not_removed_because_unexpected_response_status = "Existing cache entry should but cannot be removed due to unexpected response Status = ({0}) {1}.";

	public const string net_log_cache_removed_existing_based_on_policy = "Existing cache entry is removed based on Policy = {0}.";

	public const string net_log_cache_not_updated_based_on_ftp_response_status = "Cache is not updated based on the FTP response status. Expected = {0}, actual = {1}.";

	public const string net_log_cache_update_not_supported_for_ftp_restart = "Cache update is not supported for restarted FTP responses. Restart offset = {0}.";

	public const string net_log_cache_removed_entry_because_ftp_restart_response_changed = "Existing cache entry is removed since a restarted response was changed on the server, cache LastModified date = {0}, new LastModified date = {1}.";

	public const string net_log_cache_last_synchronized = "The cache entry last synchronized time = {0}.";

	public const string net_log_cache_suppress_update_because_synched_last_minute = "Suppressing cache update since the entry was synchronized within the last minute.";

	public const string net_log_cache_updating_last_synchronized = "Updating cache entry last synchronized time = {0}.";

	public const string net_log_cache_cannot_remove = "{0} Cannot Remove (throw): Key = {1}, Error = {2}.";

	public const string net_log_cache_key_status = "{0}, Key = {1}, -> Status = {2}.";

	public const string net_log_cache_key_remove_failed_status = "{0}, Key = {1}, Remove operation failed -> Status = {2}.";

	public const string net_log_cache_usecount_file = "{0}, UseCount = {1}, File = {2}.";

	public const string net_log_cache_stream = "{0}, stream = {1}.";

	public const string net_log_cache_filename = "{0} -> Filename = {1}, Status = {2}.";

	public const string net_log_cache_lookup_failed = "{0}, Lookup operation failed -> {1}.";

	public const string net_log_cache_exception = "{0}, Exception = {1}.";

	public const string net_log_cache_expected_length = "Expected length (0=none)= {0}.";

	public const string net_log_cache_last_modified = "LastModified    (0=none)= {0}.";

	public const string net_log_cache_expires = "Expires         (0=none)= {0}.";

	public const string net_log_cache_max_stale = "MaxStale (sec)          = {0}.";

	public const string net_log_cache_dumping_metadata = "...Dumping Metadata...";

	public const string net_log_cache_create_failed = "Create operation failed -> {0}.";

	public const string net_log_cache_set_expires = "Set Expires               ={0}.";

	public const string net_log_cache_set_last_modified = "Set LastModified          ={0}.";

	public const string net_log_cache_set_last_synchronized = "Set LastSynchronized      ={0}.";

	public const string net_log_cache_enable_max_stale = "Enable MaxStale (sec) ={0}.";

	public const string net_log_cache_disable_max_stale = "Disable MaxStale (set to 0).";

	public const string net_log_cache_set_new_metadata = "Set new Metadata.";

	public const string net_log_cache_dumping = "...Dumping...";

	public const string net_log_cache_key = "{0}, Key = {1}.";

	public const string net_log_cache_no_commit = "{0}, Nothing was written to the stream, do not commit that cache entry.";

	public const string net_log_cache_error_deleting_filename = "{0}, Error deleting a Filename = {1}.";

	public const string net_log_cache_update_failed = "{0}, Key = {1}, Update operation failed -> {2}.";

	public const string net_log_cache_delete_failed = "{0}, Key = {1}, Delete operation failed -> {2}.";

	public const string net_log_cache_commit_failed = "{0}, Key = {1}, Commit operation failed -> {2}.";

	public const string net_log_cache_committed_as_partial = "{0}, Key = {1}, Committed entry as partial, not cached bytes count = {2}.";

	public const string net_log_cache_max_stale_and_update_status = "{0}, MaxStale = {1}, Update Status = {2}.";

	public const string net_log_cache_failing_request_with_exception = "Failing request with the WebExceptionStatus = {0}.";

	public const string net_log_cache_request_method = "Request Method = {0}.";

	public const string net_log_cache_http_status_parse_failure = "Cannot Parse Cache HTTP Status Line: {0}.";

	public const string net_log_cache_http_status_line = "Entry Status Line = HTTP/{0} {1} {2}.";

	public const string net_log_cache_cache_control = "Cache Cache-Control = {0}.";

	public const string net_log_cache_invalid_http_version = "The cached version is invalid, assuming HTTP 1.0.";

	public const string net_log_cache_no_http_response_header = "This Cache Entry does not carry HTTP response headers.";

	public const string net_log_cache_http_header_parse_error = "Cannot parse HTTP headers in entry metadata, offending string: {0}.";

	public const string net_log_cache_metadata_name_value_parse_error = "Cannot parse all strings in system metadata as \"name:value\", offending string: {0}.";

	public const string net_log_cache_content_range_error = "Invalid format of Response Content-Range:{0}.";

	public const string net_log_cache_cache_control_error = "Invalid CacheControl header = {0}.";

	public const string net_log_cache_unexpected_status = "The cache protocol method {0} has returned unexpected status: {1}.";

	public const string net_log_cache_object_and_exception = "{0} exception: {1}.";

	public const string net_log_cache_revalidation_not_needed = "{0}, No cache entry revalidation is needed.";

	public const string net_log_cache_not_updated_based_on_cache_protocol_status = "{0}, Cache is not updated based on the current cache protocol status = {1}.";

	public const string net_log_cache_closing_cache_stream = "{0}: {1} Closing effective cache stream, type = {2}, cache entry key = {3}.";

	public const string net_log_cache_exception_ignored = "{0}: an exception (ignored) on {1} = {2}.";

	public const string net_log_cache_no_cache_entry = "{0} has requested a cache response but the entry does not exist (Stream.Null).";

	public const string net_log_cache_null_cached_stream = "{0} has requested a cache response but the cached stream is null.";

	public const string net_log_cache_requested_combined_but_null_cached_stream = "{0} has requested a combined response but the cached stream is null.";

	public const string net_log_cache_returned_range_cache = "{0} has returned a range cache stream, Offset = {1}, Length = {2}.";

	public const string net_log_cache_entry_not_found_freshness_undefined = "{0}, Cache Entry not found, freshness result = Undefined.";

	public const string net_log_cache_dumping_cache_context = "...Dumping Cache Context...";

	public const string net_log_cache_result = "{0}, result = {1}.";

	public const string net_log_cache_uri_with_query_has_no_expiration = "Request Uri has a Query, and no explicit expiration time is provided.";

	public const string net_log_cache_uri_with_query_and_cached_resp_from_http_10 = "Request Uri has a Query, and cached response is from HTTP 1.0 server.";

	public const string net_log_cache_valid_as_fresh_or_because_policy = "Valid as fresh or because of Cache Policy = {0}.";

	public const string net_log_cache_accept_based_on_retry_count = "Accept this response base on the retry count = {0}.";

	public const string net_log_cache_date_header_older_than_cache_entry = "Response Date header value is older than that of the cache entry.";

	public const string net_log_cache_server_didnt_satisfy_range = "Server did not satisfy the range: {0}.";

	public const string net_log_cache_304_received_on_unconditional_request = "304 response was received on an unconditional request.";

	public const string net_log_cache_304_received_on_unconditional_request_expected_200_206 = "304 response was received on an unconditional request, but expected response code is 200 or 206.";

	public const string net_log_cache_last_modified_header_older_than_cache_entry = "HTTP 1.0 Response Last-Modified header value is older than that of the cache entry.";

	public const string net_log_cache_freshness_outside_policy_limits = "Response freshness is not within the specified policy limits.";

	public const string net_log_cache_need_to_remove_invalid_cache_entry_304 = "Need to remove an invalid cache entry with status code == 304(NotModified).";

	public const string net_log_cache_resp_status = "Response Status = {0}.";

	public const string net_log_cache_resp_304_or_request_head = "Response==304 or Request was HEAD, updating cache entry.";

	public const string net_log_cache_dont_update_cached_headers = "Do not update Cached Headers.";

	public const string net_log_cache_update_cached_headers = "Update Cached Headers.";

	public const string net_log_cache_partial_resp_not_combined_with_existing_entry = "A partial response is not combined with existing cache entry, Cache Stream Size = {0}, response Range Start = {1}.";

	public const string net_log_cache_request_contains_conditional_header = "User Request contains a conditional header.";

	public const string net_log_cache_not_a_get_head_post = "This was Not a GET, HEAD or POST request.";

	public const string net_log_cache_cannot_update_cache_if_304 = "Cannot update cache if Response status == 304 and a cache entry was not found.";

	public const string net_log_cache_cannot_update_cache_with_head_resp = "Cannot update cache with HEAD response if the cache entry does not exist.";

	public const string net_log_cache_http_resp_is_null = "HttpWebResponse is null.";

	public const string net_log_cache_resp_cache_control_is_no_store = "Response Cache-Control = no-store.";

	public const string net_log_cache_resp_cache_control_is_public = "Response Cache-Control = public.";

	public const string net_log_cache_resp_cache_control_is_private = "Response Cache-Control = private, and Cache is public.";

	public const string net_log_cache_resp_cache_control_is_private_plus_headers = "Response Cache-Control = private+Headers, removing those headers.";

	public const string net_log_cache_resp_older_than_cache = "HttpWebResponse date is older than of the cached one.";

	public const string net_log_cache_revalidation_required = "Response revalidation is always required but neither Last-Modified nor ETag header is set on the response.";

	public const string net_log_cache_needs_revalidation = "Response can be cached although it will always require revalidation.";

	public const string net_log_cache_resp_allows_caching = "Response explicitly allows caching = Cache-Control: {0}.";

	public const string net_log_cache_auth_header_and_no_s_max_age = "Request carries Authorization Header and no s-maxage, proxy-revalidate or public directive found.";

	public const string net_log_cache_post_resp_without_cache_control_or_expires = "POST Response without Cache-Control or Expires headers.";

	public const string net_log_cache_valid_based_on_status_code = "Valid based on Status Code: {0}.";

	public const string net_log_cache_resp_no_cache_control = "Response with no CacheControl and Status Code = {0}.";

	public const string net_log_cache_age = "Cache Age = {0}, Cache MaxAge = {1}.";

	public const string net_log_cache_policy_min_fresh = "Client Policy MinFresh = {0}.";

	public const string net_log_cache_policy_max_age = "Client Policy MaxAge = {0}.";

	public const string net_log_cache_policy_cache_sync_date = "Client Policy CacheSyncDate (UTC) = {0}, Cache LastSynchronizedUtc = {1}.";

	public const string net_log_cache_policy_max_stale = "Client Policy MaxStale = {0}.";

	public const string net_log_cache_control_no_cache = "Cached CacheControl = no-cache.";

	public const string net_log_cache_control_no_cache_removing_some_headers = "Cached CacheControl = no-cache, Removing some headers.";

	public const string net_log_cache_control_must_revalidate = "Cached CacheControl = must-revalidate and Cache is not fresh.";

	public const string net_log_cache_cached_auth_header = "The cached entry has Authorization Header and cache is not fresh.";

	public const string net_log_cache_cached_auth_header_no_control_directive = "The cached entry has Authorization Header and no Cache-Control directive present that would allow to use that entry.";

	public const string net_log_cache_after_validation = "After Response Cache Validation.";

	public const string net_log_cache_resp_status_304 = "Response status == 304 but the cache entry does not exist.";

	public const string net_log_cache_head_resp_has_different_content_length = "A response resulted from a HEAD request has different Content-Length header.";

	public const string net_log_cache_head_resp_has_different_content_md5 = "A response resulted from a HEAD request has different Content-MD5 header.";

	public const string net_log_cache_head_resp_has_different_etag = "A response resulted from a HEAD request has different ETag header.";

	public const string net_log_cache_304_head_resp_has_different_last_modified = "A 304 response resulted from a HEAD request has different Last-Modified header.";

	public const string net_log_cache_existing_entry_has_to_be_discarded = "An existing cache entry has to be discarded.";

	public const string net_log_cache_existing_entry_should_be_discarded = "An existing cache entry should be discarded.";

	public const string net_log_cache_206_resp_non_matching_entry = "A 206 Response has been received and either ETag or Last-Modified header value does not match cache entry.";

	public const string net_log_cache_206_resp_starting_position_not_adjusted = "The starting position for 206 Response is not adjusted to the end of cache entry.";

	public const string net_log_cache_combined_resp_requested = "Creation of a combined response has been requested from the cache protocol.";

	public const string net_log_cache_updating_headers_on_304 = "Updating headers on 304 response.";

	public const string net_log_cache_suppressing_headers_update_on_304 = "Suppressing cache headers update on 304, new headers don't add anything.";

	public const string net_log_cache_status_code_not_304_206 = "A Response Status Code is not 304 or 206.";

	public const string net_log_cache_sxx_resp_cache_only = "A 5XX Response and Cache-Only like policy, serving from cache.";

	public const string net_log_cache_sxx_resp_can_be_replaced = "A 5XX Response that can be replaced by existing cache entry.";

	public const string net_log_cache_vary_header_empty = "Cache entry Vary header is empty.";

	public const string net_log_cache_vary_header_contains_asterisks = "Cache entry Vary header contains '*'.";

	public const string net_log_cache_no_headers_in_metadata = "No request headers are found in cached metadata to test based on the cached response Vary header.";

	public const string net_log_cache_vary_header_mismatched_count = "Vary header: Request and cache header fields count does not match, header name = {0}.";

	public const string net_log_cache_vary_header_mismatched_field = "Vary header: A Cache header field mismatch the request one, header name = {0}, cache field = {1}, request field = {2}.";

	public const string net_log_cache_vary_header_match = "All required Request headers match based on cached Vary response header.";

	public const string net_log_cache_range = "Request Range (not in Cache yet) = Range:{0}.";

	public const string net_log_cache_range_invalid_format = "Invalid format of Request Range:{0}.";

	public const string net_log_cache_range_not_in_cache = "Cannot serve from Cache, Range:{0}.";

	public const string net_log_cache_range_in_cache = "Serving Request Range from cache, Range:{0}.";

	public const string net_log_cache_partial_resp = "Serving Partial Response (206) from cache, Content-Range:{0}.";

	public const string net_log_cache_range_request_range = "Range Request (user specified), Range: {0}.";

	public const string net_log_cache_could_be_partial = "Could be a Partial Cached Response, Size = {0}, Response Content Length = {1}.";

	public const string net_log_cache_condition_if_none_match = "Request Condition = If-None-Match:{0}.";

	public const string net_log_cache_condition_if_modified_since = "Request Condition = If-Modified-Since:{0}.";

	public const string net_log_cache_cannot_construct_conditional_request = "A Conditional Request cannot be constructed.";

	public const string net_log_cache_cannot_construct_conditional_range_request = "A Conditional Range request cannot be constructed.";

	public const string net_log_cache_entry_size_too_big = "Cached Entry Size = {0} is too big, cannot do a range request.";

	public const string net_log_cache_condition_if_range = "Request Condition = If-Range:{0}.";

	public const string net_log_cache_conditional_range_not_implemented_on_http_10 = "A Conditional Range request on Http <= 1.0 is not implemented.";

	public const string net_log_cache_saving_request_headers = "Saving Request Headers, Vary: {0}.";

	public const string net_log_cache_only_byte_range_implemented = "Ranges other than bytes are not implemented.";

	public const string net_log_cache_multiple_complex_range_not_implemented = "Multiple/complexe ranges are not implemented.";

	public const string net_log_digest_hash_algorithm_not_supported = "The hash algorithm is not supported by Digest authentication: {0}.";

	public const string net_log_digest_qop_not_supported = "The Quality of Protection value is not supported by Digest authentication: {0}.";

	public const string net_log_digest_requires_nonce = "A nonce parameter required for Digest authentication was not found or was preceded by an invalid parameter.";

	public const string net_log_auth_invalid_challenge = "The challenge string is not valid for this authentication module: {0}";

	public const string net_log_unknown = "unknown";

	public const string net_log_operation_returned_something = "{0} returned {1}.";

	public const string net_log_buffered_n_bytes = "Buffered {0} bytes.";

	public const string net_log_method_equal = "Method={0}.";

	public const string net_log_releasing_connection = "Releasing FTP connection#{0}.";

	public const string net_log_unexpected_exception = "Unexpected exception in {0}.";

	public const string net_log_server_response_error_code = "Error code {0} was received from server response.";

	public const string net_log_resubmitting_request = "Resubmitting request.";

	public const string net_log_retrieving_localhost_exception = "An unexpected exception while retrieving the local address list: {0}.";

	public const string net_log_resolved_servicepoint_may_not_be_remote_server = "A resolved ServicePoint host could be wrongly considered as a remote server.";

	public const string net_log_closed_idle = "{0}#{1} - Closed as idle.";

	public const string net_log_received_status_line = "Received status line: Version={0}, StatusCode={1}, StatusDescription={2}.";

	public const string net_log_sending_headers = "Sending headers\r\n{{\r

Room Architect Tool_Data/Managed/System.Drawing.Design.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Diagnostics;
using System.Drawing.Imaging;
using System.IO;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Security;
using System.Text;
using System.Windows.Forms;
using System.Windows.Forms.Design;

[assembly: CompilationRelaxations(CompilationRelaxations.NoStringInterning)]
[assembly: AssemblyDelaySign(true)]
[assembly: CLSCompliant(true)]
[assembly: ComVisible(false)]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: AssemblyInformationalVersion("4.6.57.0")]
[assembly: SatelliteContractVersion("4.0.0.0")]
[assembly: AssemblyCopyright("(c) Various Mono authors")]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: AssemblyCompany("Mono development team")]
[assembly: AssemblyDefaultAlias("System.Drawing.Design.dll")]
[assembly: AssemblyDescription("System.Drawing.Design.dll")]
[assembly: AssemblyTitle("System.Drawing.Design.dll")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: AssemblyFileVersion("4.6.57.0")]
[assembly: AssemblyVersion("4.0.0.0")]
internal static class Consts
{
	public const string MonoVersion = "5.11.0.0";

	public const string MonoCompany = "Mono development team";

	public const string MonoProduct = "Mono Common Language Infrastructure";

	public const string MonoCopyright = "(c) Various Mono authors";

	public const int MonoCorlibVersion = 1051100001;

	public const string FxVersion = "4.0.0.0";

	public const string FxFileVersion = "4.6.57.0";

	public const string EnvironmentVersion = "4.0.30319.42000";

	public const string VsVersion = "0.0.0.0";

	public const string VsFileVersion = "11.0.0.0";

	private const string PublicKeyToken = "b77a5c561934e089";

	public const string AssemblyI18N = "I18N, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMicrosoft_JScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMono_Http = "Mono.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Posix = "Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Security = "Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Messaging_RabbitMQ = "Mono.Messaging.RabbitMQ, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyCorlib = "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Data = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Design = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing_Design = "System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Messaging = "System.Messaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Security = "System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Web = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Core = "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string WindowsBase_3_0 = "WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
internal sealed class Locale
{
	private Locale()
	{
	}

	public static string GetText(string msg)
	{
		return msg;
	}

	public static string GetText(string fmt, params object[] args)
	{
		return string.Format(fmt, args);
	}
}
namespace System
{
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoTODOAttribute : Attribute
	{
		private string comment;

		public string Comment => comment;

		public MonoTODOAttribute()
		{
		}

		public MonoTODOAttribute(string comment)
		{
			this.comment = comment;
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoDocumentationNoteAttribute : MonoTODOAttribute
	{
		public MonoDocumentationNoteAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoExtensionAttribute : MonoTODOAttribute
	{
		public MonoExtensionAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoInternalNoteAttribute : MonoTODOAttribute
	{
		public MonoInternalNoteAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoLimitationAttribute : MonoTODOAttribute
	{
		public MonoLimitationAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoNotSupportedAttribute : MonoTODOAttribute
	{
		public MonoNotSupportedAttribute(string comment)
			: base(comment)
		{
		}
	}
}
namespace System.Drawing.Design
{
	public class BitmapEditor : ImageEditor
	{
		protected override string[] GetExtensions()
		{
			return new string[6] { "*.bmp", "*.gif", "*.jpg", "*.jpeg", "*.png", "*.ico" };
		}

		protected override string GetFileDialogDescription()
		{
			return Locale.GetText("All bitmap files");
		}

		protected override Image LoadFromStream(Stream stream)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			return (Image)new Bitmap(stream);
		}
	}
	public class ColorEditor : UITypeEditor
	{
		private class ColorListBox : ListBox
		{
			public ColorListBox()
			{
				((ListBox)this).DrawMode = (DrawMode)1;
				((ListBox)this).Sorted = true;
				((ListBox)this).ItemHeight = 14;
				((ListBox)this).BorderStyle = (BorderStyle)1;
			}

			protected override void OnDrawItem(DrawItemEventArgs e)
			{
				//IL_001e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0024: Expected O, but got Unknown
				//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
				e.DrawBackground();
				Color color = (Color)((ListBox)this).Items[e.Index];
				SolidBrush val = new SolidBrush(color);
				try
				{
					e.Graphics.FillRectangle((Brush)(object)val, 2, e.Bounds.Top + 2, 21, 9);
				}
				finally
				{
					((IDisposable)val)?.Dispose();
				}
				e.Graphics.DrawRectangle(SystemPens.WindowText, 2, e.Bounds.Top + 2, 21, 9);
				e.Graphics.DrawString(color.Name, ((Control)this).Font, SystemBrushes.WindowText, 26f, (float)e.Bounds.Top);
				if ((e.State & 1) != 0)
				{
					e.DrawFocusRectangle();
				}
				((ListBox)this).OnDrawItem(e);
			}
		}

		private class SystemColorCompare : IComparer
		{
			public int Compare(object x, object y)
			{
				Color color = (Color)x;
				Color color2 = (Color)y;
				return string.Compare(color.Name, color2.Name);
			}
		}

		private class WebColorCompare : IComparer
		{
			public int Compare(object x, object y)
			{
				Color color = (Color)x;
				Color color2 = (Color)y;
				return string.Compare(color.Name, color2.Name);
			}
		}

		private class CustomColorPicker : UserControl
		{
			private Color[,] colors;

			private bool highlighting;

			private int x;

			private int y;

			public event EventHandler ColorChanged;

			public CustomColorPicker()
			{
				colors = new Color[8, 8];
				colors[0, 0] = Color.White;
				colors[1, 0] = Color.FromArgb(224, 224, 224);
				colors[2, 0] = Color.Silver;
				colors[3, 0] = Color.Gray;
				colors[4, 0] = Color.FromArgb(64, 64, 64);
				colors[5, 0] = Color.Black;
				colors[6, 0] = Color.White;
				colors[7, 0] = Color.White;
				colors[0, 1] = Color.FromArgb(255, 192, 192);
				colors[1, 1] = Color.FromArgb(255, 128, 128);
				colors[2, 1] = Color.Red;
				colors[3, 1] = Color.FromArgb(192, 0, 0);
				colors[4, 1] = Color.Maroon;
				colors[5, 1] = Color.FromArgb(64, 0, 0);
				colors[6, 1] = Color.White;
				colors[7, 1] = Color.White;
				colors[0, 2] = Color.FromArgb(255, 224, 192);
				colors[1, 2] = Color.FromArgb(255, 192, 128);
				colors[2, 2] = Color.FromArgb(255, 128, 0);
				colors[3, 2] = Color.FromArgb(192, 64, 0);
				colors[4, 2] = Color.FromArgb(128, 64, 0);
				colors[5, 2] = Color.FromArgb(128, 64, 64);
				colors[6, 2] = Color.White;
				colors[7, 2] = Color.White;
				colors[0, 3] = Color.FromArgb(255, 255, 192);
				colors[1, 3] = Color.FromArgb(255, 255, 128);
				colors[2, 3] = Color.Yellow;
				colors[3, 3] = Color.FromArgb(192, 192, 0);
				colors[4, 3] = Color.Olive;
				colors[5, 3] = Color.FromArgb(64, 64, 0);
				colors[6, 3] = Color.White;
				colors[7, 3] = Color.White;
				colors[0, 4] = Color.FromArgb(192, 255, 192);
				colors[1, 4] = Color.FromArgb(128, 255, 128);
				colors[2, 4] = Color.Lime;
				colors[3, 4] = Color.FromArgb(0, 192, 0);
				colors[4, 4] = Color.Green;
				colors[5, 4] = Color.FromArgb(0, 64, 0);
				colors[6, 4] = Color.White;
				colors[7, 4] = Color.White;
				colors[0, 5] = Color.FromArgb(192, 255, 255);
				colors[1, 5] = Color.FromArgb(128, 255, 255);
				colors[2, 5] = Color.Cyan;
				colors[3, 5] = Color.FromArgb(0, 192, 192);
				colors[4, 5] = Color.Teal;
				colors[5, 5] = Color.FromArgb(0, 64, 64);
				colors[6, 5] = Color.White;
				colors[7, 5] = Color.White;
				colors[0, 6] = Color.FromArgb(192, 192, 255);
				colors[1, 6] = Color.FromArgb(128, 128, 255);
				colors[2, 6] = Color.Blue;
				colors[3, 6] = Color.FromArgb(0, 0, 192);
				colors[4, 6] = Color.Navy;
				colors[5, 6] = Color.FromArgb(0, 0, 64);
				colors[6, 6] = Color.White;
				colors[7, 6] = Color.White;
				colors[0, 7] = Color.FromArgb(255, 192, 255);
				colors[1, 7] = Color.FromArgb(255, 128, 255);
				colors[2, 7] = Color.Fuchsia;
				colors[3, 7] = Color.FromArgb(192, 0, 192);
				colors[4, 7] = Color.Purple;
				colors[5, 7] = Color.FromArgb(64, 0, 64);
				colors[6, 7] = Color.White;
				colors[7, 7] = Color.White;
			}

			protected override void OnPaint(PaintEventArgs e)
			{
				for (int i = 0; i < 8; i++)
				{
					for (int j = 0; j < 8; j++)
					{
						DrawRect(e.Graphics, colors[i, j], j * 24, i * 24);
					}
				}
				if (highlighting)
				{
					int num = x / 24;
					int num2 = y / 24;
					ControlPaint.DrawFocusRectangle(e.Graphics, new Rectangle(num * 24 - 2, num2 * 24 - 2, 24, 24));
				}
				((Control)this).OnPaint(e);
			}

			private void DrawRect(Graphics g, Color color, int x, int y)
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Expected O, but got Unknown
				SolidBrush val = new SolidBrush(color);
				try
				{
					g.FillRectangle((Brush)(object)val, x, y, 20, 20);
				}
				finally
				{
					((IDisposable)val)?.Dispose();
				}
				ControlPaint.DrawBorder3D(g, x, y, 20, 20);
			}

			protected override void OnMouseDown(MouseEventArgs e)
			{
				if (e.X % 24 < 20 && e.Y % 24 < 20)
				{
					x = e.X;
					y = e.Y;
					highlighting = true;
					((Control)this).Invalidate();
				}
				((UserControl)this).OnMouseDown(e);
			}

			protected override void OnMouseUp(MouseEventArgs e)
			{
				if (highlighting && ((Control)this).ClientRectangle.Contains(e.X, e.Y))
				{
					if (this.ColorChanged != null)
					{
						this.ColorChanged(colors[y / 24, x / 24], EventArgs.Empty);
					}
					highlighting = false;
				}
				((Control)this).OnMouseUp(e);
			}

			protected override void OnMouseMove(MouseEventArgs e)
			{
				//IL_0067: Unknown result type (might be due to invalid IL or missing references)
				//IL_006d: Expected O, but got Unknown
				if (highlighting)
				{
					int num = x;
					int num2 = y;
					x = e.X;
					y = e.Y;
					if ((num / 24 != x / 24 || num2 / 24 != y / 24) && x / 24 < 8 && y / 24 < 8)
					{
						Region val = new Region();
						val.Union(new Rectangle(num - 2, num2 - 2, 24, 24));
						val.Union(new Rectangle(x - 2, y - 2, 24, 24));
						((Control)this).Invalidate(val);
					}
				}
				((Control)this).OnMouseMove(e);
			}
		}

		private IWindowsFormsEditorService editorService;

		private Color selected_color;

		private bool color_chosen;

		private Control editor_control;

		public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Expected O, but got Unknown
			if (context != null && provider != null)
			{
				editorService = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
				if (editorService != null)
				{
					if (editor_control == null)
					{
						editor_control = GetEditorControl(value);
					}
					editorService.DropDownControl(editor_control);
					if (color_chosen)
					{
						return selected_color;
					}
					return null;
				}
			}
			return ((UITypeEditor)this).EditValue(context, provider, value);
		}

		private Control GetEditorControl(object value)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Expected O, but got Unknown
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Expected O, but got Unknown
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Expected O, but got Unknown
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Expected O, but got Unknown
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Expected O, but got Unknown
			//IL_0194: Unknown result type (might be due to invalid IL or missing references)
			//IL_019e: Expected O, but got Unknown
			TabControl val = new TabControl();
			((Control)val).Dock = (DockStyle)5;
			TabPage val2 = new TabPage("Custom");
			TabPage val3 = new TabPage("Web");
			TabPage val4 = new TabPage("System");
			ColorListBox colorListBox = new ColorListBox();
			ColorListBox colorListBox2 = new ColorListBox();
			((Control)colorListBox).Dock = (DockStyle)5;
			((Control)colorListBox2).Dock = (DockStyle)5;
			((Control)val3).Controls.Add((Control)(object)colorListBox);
			((Control)val4).Controls.Add((Control)(object)colorListBox2);
			SystemColorCompare comparer = new SystemColorCompare();
			ArrayList arrayList = new ArrayList();
			PropertyInfo[] properties = typeof(SystemColors).GetProperties(BindingFlags.Static | BindingFlags.Public);
			for (int i = 0; i < properties.Length; i++)
			{
				Color color = (Color)properties[i].GetValue(null, null);
				arrayList.Add(color);
			}
			arrayList.Sort(comparer);
			((ListBox)colorListBox2).Items.AddRange(arrayList.ToArray());
			((Control)colorListBox2).MouseUp += new MouseEventHandler(HandleMouseUp);
			((ListControl)colorListBox2).SelectedValueChanged += HandleChange;
			WebColorCompare comparer2 = new WebColorCompare();
			arrayList = new ArrayList();
			foreach (KnownColor value2 in Enum.GetValues(typeof(KnownColor)))
			{
				Color color2 = Color.FromKnownColor(value2);
				if (!color2.IsSystemColor)
				{
					arrayList.Add(color2);
				}
			}
			arrayList.Sort(comparer2);
			((ListBox)colorListBox).Items.AddRange(arrayList.ToArray());
			((Control)colorListBox).MouseUp += new MouseEventHandler(HandleMouseUp);
			((ListControl)colorListBox).SelectedValueChanged += HandleChange;
			CustomColorPicker customColorPicker = new CustomColorPicker();
			((Control)customColorPicker).Dock = (DockStyle)5;
			customColorPicker.ColorChanged += CustomColorPicked;
			((Control)val2).Controls.Add((Control)(object)customColorPicker);
			val.TabPages.Add(val2);
			val.TabPages.Add(val3);
			val.TabPages.Add(val4);
			if (value != null)
			{
				Color color3 = (Color)value;
				if (color3.IsSystemColor)
				{
					((ListControl)colorListBox2).SelectedValue = color3;
					val.SelectedTab = val4;
				}
				else if (color3.IsKnownColor)
				{
					((ListControl)colorListBox).SelectedValue = color3;
					val.SelectedTab = val3;
				}
				selected_color = color3;
				color_chosen = true;
			}
			((Control)val).Height = 216;
			return (Control)(object)val;
		}

		private void HandleChange(object sender, EventArgs e)
		{
			selected_color = (Color)((ListBox)(ColorListBox)sender).Items[((ListControl)(ColorListBox)sender).SelectedIndex];
			color_chosen = true;
		}

		private void CustomColorPicked(object sender, EventArgs e)
		{
			selected_color = (Color)sender;
			color_chosen = true;
			if (editorService != null)
			{
				editorService.CloseDropDown();
			}
		}

		private void HandleMouseUp(object sender, MouseEventArgs e)
		{
			if (editorService != null)
			{
				editorService.CloseDropDown();
			}
		}

		public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
		{
			return (UITypeEditorEditStyle)3;
		}

		public override bool GetPaintValueSupported(ITypeDescriptorContext context)
		{
			return true;
		}

		public override void PaintValue(PaintValueEventArgs e)
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Expected O, but got Unknown
			Graphics graphics = e.Graphics;
			if (e.Value != null)
			{
				SolidBrush val = new SolidBrush((Color)e.Value);
				try
				{
					graphics.FillRectangle((Brush)(object)val, e.Bounds);
				}
				finally
				{
					((IDisposable)val)?.Dispose();
				}
			}
		}
	}
	public class ContentAlignmentEditor : UITypeEditor
	{
		private class AlignmentUI : ListBox
		{
			private object value;

			private IWindowsFormsEditorService service;

			public object Value => value;

			public AlignmentUI(UITypeEditor host, IWindowsFormsEditorService service, object value)
			{
				this.service = service;
				this.value = value;
				((ListBox)this).Items.Add((object)(ContentAlignment)1);
				((ListBox)this).Items.Add((object)(ContentAlignment)2);
				((ListBox)this).Items.Add((object)(ContentAlignment)4);
				((ListBox)this).Items.Add((object)(ContentAlignment)16);
				((ListBox)this).Items.Add((object)(ContentAlignment)32);
				((ListBox)this).Items.Add((object)(ContentAlignment)64);
				((ListBox)this).Items.Add((object)(ContentAlignment)256);
				((ListBox)this).Items.Add((object)(ContentAlignment)512);
				((ListBox)this).Items.Add((object)(ContentAlignment)1024);
			}

			protected override void OnClick(EventArgs e)
			{
				((Control)this).OnClick(e);
				value = ((ListBox)this).SelectedItem;
				service.CloseDropDown();
			}
		}

		public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			if (provider == null)
			{
				return value;
			}
			IWindowsFormsEditorService val = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
			if (val == null)
			{
				return value;
			}
			AlignmentUI alignmentUI = new AlignmentUI((UITypeEditor)(object)this, val, value);
			val.DropDownControl((Control)(object)alignmentUI);
			return alignmentUI.Value;
		}

		public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
		{
			return (UITypeEditorEditStyle)3;
		}
	}
	public class CursorEditor : UITypeEditor
	{
		private class CursorUI : ListBox
		{
			private object value;

			private IWindowsFormsEditorService service;

			public object Value => value;

			public CursorUI(UITypeEditor host, IWindowsFormsEditorService service, object value)
			{
				this.service = service;
				this.value = value;
				foreach (object standardValue in TypeDescriptor.GetConverter(typeof(Cursor)).GetStandardValues())
				{
					((ListBox)this).Items.Add(standardValue);
				}
			}

			protected override void OnClick(EventArgs e)
			{
				((Control)this).OnClick(e);
				value = ((ListBox)this).SelectedItem;
				service.CloseDropDown();
			}
		}

		public override bool IsDropDownResizable => true;

		public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			if (provider == null)
			{
				return value;
			}
			IWindowsFormsEditorService val = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
			if (val == null)
			{
				return value;
			}
			CursorUI cursorUI = new CursorUI((UITypeEditor)(object)this, val, value);
			val.DropDownControl((Control)(object)cursorUI);
			return cursorUI.Value;
		}

		public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
		{
			return (UITypeEditorEditStyle)3;
		}
	}
	public class FontEditor : UITypeEditor
	{
		private FontDialog fontEdit;

		public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Expected O, but got Unknown
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Expected O, but got Unknown
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Invalid comparison between Unknown and I4
			fontEdit = new FontDialog();
			if (value is Font)
			{
				fontEdit.Font = (Font)value;
			}
			else
			{
				fontEdit.Font = new Font(FontFamily.GenericSansSerif, 12f);
			}
			fontEdit.FontMustExist = true;
			if ((int)((CommonDialog)fontEdit).ShowDialog() == 1)
			{
				return fontEdit.Font;
			}
			return value;
		}

		public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
		{
			return (UITypeEditorEditStyle)2;
		}
	}
	public class FontNameEditor : UITypeEditor
	{
		private const string PreviewString = "Ab";

		public override bool GetPaintValueSupported(ITypeDescriptorContext context)
		{
			return true;
		}

		public override void PaintValue(PaintValueEventArgs e)
		{
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			Graphics graphics = e.Graphics;
			graphics.FillRectangle(SystemBrushes.ActiveCaption, e.Bounds);
			if (e.Value is string text && text.Length > 0)
			{
				Font val = new Font(text, (float)e.Bounds.Height, (FontStyle)0, (GraphicsUnit)2);
				try
				{
					graphics.DrawString("Ab", val, SystemBrushes.ActiveCaptionText, (RectangleF)e.Bounds);
				}
				finally
				{
					((IDisposable)val)?.Dispose();
				}
			}
			graphics.DrawRectangle(Pens.Black, e.Bounds);
		}
	}
	public class IconEditor : UITypeEditor
	{
		private OpenFileDialog openDialog;

		protected static string CreateExtensionsString(string[] extensions, string sep)
		{
			if (extensions.Length != 0)
			{
				StringBuilder stringBuilder = new StringBuilder();
				stringBuilder.Append(extensions[0]);
				for (int i = 1; i < extensions.Length - 1; i++)
				{
					stringBuilder.Append(sep);
					stringBuilder.Append(extensions[i]);
				}
				return stringBuilder.ToString();
			}
			return string.Empty;
		}

		protected static string CreateFilterEntry(IconEditor e)
		{
			StringBuilder stringBuilder = new StringBuilder();
			string text = CreateExtensionsString(e.GetExtensions(), ";");
			stringBuilder.Append(e.GetFileDialogDescription());
			stringBuilder.Append(" (" + text + ")|");
			stringBuilder.Append(text);
			return stringBuilder.ToString();
		}

		public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Expected O, but got Unknown
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Invalid comparison between Unknown and I4
			openDialog = new OpenFileDialog();
			((FileDialog)openDialog).Title = Locale.GetText("Open image file");
			((FileDialog)openDialog).CheckFileExists = true;
			((FileDialog)openDialog).CheckPathExists = true;
			((FileDialog)openDialog).Filter = CreateFilterEntry(this);
			openDialog.Multiselect = false;
			if ((int)((CommonDialog)openDialog).ShowDialog() == 1)
			{
				return LoadFromStream(openDialog.OpenFile());
			}
			return value;
		}

		public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
		{
			return (UITypeEditorEditStyle)2;
		}

		protected virtual string[] GetExtensions()
		{
			return new string[1] { "*.ico" };
		}

		protected virtual string GetFileDialogDescription()
		{
			return Locale.GetText("Icon files");
		}

		public override bool GetPaintValueSupported(ITypeDescriptorContext context)
		{
			return true;
		}

		protected virtual Icon LoadFromStream(Stream stream)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			return new Icon(stream);
		}

		public override void PaintValue(PaintValueEventArgs e)
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			Graphics graphics = e.Graphics;
			if (e.Value != null)
			{
				Image val = (Image)(object)((Icon)e.Value).ToBitmap();
				graphics.DrawImage(val, e.Bounds);
				val.Dispose();
			}
			graphics.DrawRectangle(Pens.Black, e.Bounds);
		}
	}
	public class ImageEditor : UITypeEditor
	{
		private OpenFileDialog openDialog;

		public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Expected O, but got Unknown
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Invalid comparison between Unknown and I4
			openDialog = new OpenFileDialog();
			((FileDialog)openDialog).Title = Locale.GetText("Open image file");
			((FileDialog)openDialog).CheckFileExists = true;
			((FileDialog)openDialog).CheckPathExists = true;
			((FileDialog)openDialog).Filter = CreateFilterEntry(this);
			openDialog.Multiselect = false;
			if ((int)((CommonDialog)openDialog).ShowDialog() == 1)
			{
				return LoadFromStream(openDialog.OpenFile());
			}
			return value;
		}

		public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
		{
			return (UITypeEditorEditStyle)2;
		}

		public override bool GetPaintValueSupported(ITypeDescriptorContext context)
		{
			return true;
		}

		public override void PaintValue(PaintValueEventArgs e)
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			Graphics graphics = e.Graphics;
			if (e.Value != null)
			{
				Image val = (Image)e.Value;
				graphics.DrawImage(val, e.Bounds);
			}
			graphics.DrawRectangle(Pens.Black, e.Bounds);
		}

		protected static string CreateExtensionsString(string[] extensions, string sep)
		{
			if (extensions.Length != 0)
			{
				StringBuilder stringBuilder = new StringBuilder();
				stringBuilder.Append(extensions[0]);
				for (int i = 1; i < extensions.Length - 1; i++)
				{
					stringBuilder.Append(sep);
					stringBuilder.Append(extensions[i]);
				}
				return stringBuilder.ToString();
			}
			return string.Empty;
		}

		protected static string CreateFilterEntry(ImageEditor e)
		{
			StringBuilder stringBuilder = new StringBuilder();
			string text = CreateExtensionsString(e.GetExtensions(), ";");
			stringBuilder.Append(e.GetFileDialogDescription());
			stringBuilder.Append(" (" + text + ")|");
			stringBuilder.Append(text);
			return stringBuilder.ToString();
		}

		protected virtual string[] GetExtensions()
		{
			return new string[8] { "*.bmp", "*.gif", "*.jpg", "*.jpeg", "*.png", "*.ico", "*.emf", "*.wmf" };
		}

		protected virtual string GetFileDialogDescription()
		{
			return Locale.GetText("All image files");
		}

		protected virtual Image LoadFromStream(Stream stream)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			return (Image)new Bitmap(stream);
		}

		[MonoTODO]
		protected virtual Type[] GetImageExtenders()
		{
			throw new NotImplementedException();
		}
	}
	public class MetafileEditor : ImageEditor
	{
		protected override string[] GetExtensions()
		{
			return new string[2] { "*.emf", "*.wmf" };
		}

		protected override string GetFileDialogDescription()
		{
			return Locale.GetText("All metafile files");
		}

		protected override Image LoadFromStream(Stream stream)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			return (Image)new Metafile(stream);
		}
	}
	[Serializable]
	public class ToolboxItemContainer : ISerializable
	{
		[MonoTODO]
		public bool IsCreated
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public bool IsTransient
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public virtual IDataObject ToolboxData
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public ToolboxItemContainer(IDataObject data)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public ToolboxItemContainer(ToolboxItem item)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		protected ToolboxItemContainer(SerializationInfo info, StreamingContext context)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public override bool Equals(object obj)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public override int GetHashCode()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		[SecurityCritical]
		protected virtual void GetObjectData(SerializationInfo info, StreamingContext context)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public virtual ICollection GetFilter(ICollection creators)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public virtual ToolboxItem GetToolboxItem(ICollection creators)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void UpdateFilter(ToolboxItem item)
		{
			throw new NotImplementedException();
		}
	}
	public sealed class ToolboxItemCreator
	{
		[MonoTODO]
		public string Format
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		internal ToolboxItemCreator()
		{
		}

		[MonoTODO]
		public ToolboxItem Create(IDataObject data)
		{
			throw new NotImplementedException();
		}
	}
	public abstract class ToolboxService : IComponentDiscoveryService, IToolboxService
	{
		protected abstract CategoryNameCollection CategoryNames { get; }

		protected abstract string SelectedCategory { get; set; }

		protected abstract ToolboxItemContainer SelectedItemContainer { get; set; }

		CategoryNameCollection IToolboxService.CategoryNames
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		string IToolboxService.SelectedCategory
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		protected ToolboxService()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		protected virtual ToolboxItemContainer CreateItemContainer(IDataObject dataObject)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		protected virtual ToolboxItemContainer CreateItemContainer(ToolboxItem item, IDesignerHost link)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		protected virtual void FilterChanged()
		{
			throw new NotImplementedException();
		}

		protected abstract IList GetItemContainers();

		protected abstract IList GetItemContainers(string categoryName);

		[MonoTODO]
		protected virtual bool IsItemContainer(IDataObject dataObject, IDesignerHost host)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		protected bool IsItemContainerSupported(ToolboxItemContainer container, IDesignerHost host)
		{
			throw new NotImplementedException();
		}

		protected abstract void Refresh();

		[MonoTODO]
		protected virtual void SelectedItemContainerUsed()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		protected virtual bool SetCursor()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static void UnloadToolboxItems()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static ToolboxItem GetToolboxItem(Type toolType)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static ToolboxItem GetToolboxItem(Type toolType, bool nonPublic)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static ICollection GetToolboxItems(AssemblyName an)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static ICollection GetToolboxItems(AssemblyName an, bool throwOnError)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static ICollection GetToolboxItems(Assembly a, string newCodeBase)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static ICollection GetToolboxItems(Assembly a, string newCodeBase, bool throwOnError)
		{
			throw new NotImplementedException();
		}

		ICollection IComponentDiscoveryService.GetComponentTypes(IDesignerHost designerHost, Type baseType)
		{
			throw new NotImplementedException();
		}

		void IToolboxService.AddCreator(ToolboxItemCreatorCallback creator, string format)
		{
			throw new NotImplementedException();
		}

		void IToolboxService.AddCreator(ToolboxItemCreatorCallback creator, string format, IDesignerHost host)
		{
			throw new NotImplementedException();
		}

		void IToolboxService.AddLinkedToolboxItem(ToolboxItem toolboxItem, IDesignerHost host)
		{
			throw new NotImplementedException();
		}

		void IToolboxService.AddLinkedToolboxItem(ToolboxItem toolboxItem, string category, IDesignerHost host)
		{
			throw new NotImplementedException();
		}

		void IToolboxService.AddToolboxItem(ToolboxItem toolboxItem, string category)
		{
			throw new NotImplementedException();
		}

		void IToolboxService.AddToolboxItem(ToolboxItem toolboxItem)
		{
			throw new NotImplementedException();
		}

		ToolboxItem IToolboxService.DeserializeToolboxItem(object serializedObject)
		{
			throw new NotImplementedException();
		}

		ToolboxItem IToolboxService.DeserializeToolboxItem(object serializedObject, IDesignerHost host)
		{
			throw new NotImplementedException();
		}

		ToolboxItem IToolboxService.GetSelectedToolboxItem()
		{
			throw new NotImplementedException();
		}

		ToolboxItem IToolboxService.GetSelectedToolboxItem(IDesignerHost host)
		{
			throw new NotImplementedException();
		}

		ToolboxItemCollection IToolboxService.GetToolboxItems()
		{
			throw new NotImplementedException();
		}

		ToolboxItemCollection IToolboxService.GetToolboxItems(IDesignerHost host)
		{
			throw new NotImplementedException();
		}

		ToolboxItemCollection IToolboxService.GetToolboxItems(string category)
		{
			throw new NotImplementedException();
		}

		ToolboxItemCollection IToolboxService.GetToolboxItems(string category, IDesignerHost host)
		{
			throw new NotImplementedException();
		}

		bool IToolboxService.IsSupported(object serializedObject, ICollection filterAttributes)
		{
			throw new NotImplementedException();
		}

		bool IToolboxService.IsSupported(object serializedObject, IDesignerHost host)
		{
			throw new NotImplementedException();
		}

		bool IToolboxService.IsToolboxItem(object serializedObject)
		{
			throw new NotImplementedException();
		}

		bool IToolboxService.IsToolboxItem(object serializedObject, IDesignerHost host)
		{
			throw new NotImplementedException();
		}

		void IToolboxService.Refresh()
		{
			throw new NotImplementedException();
		}

		void IToolboxService.RemoveCreator(string format)
		{
			throw new NotImplementedException();
		}

		void IToolboxService.RemoveCreator(string format, IDesignerHost host)
		{
			throw new NotImplementedException();
		}

		void IToolboxService.RemoveToolboxItem(ToolboxItem toolboxItem)
		{
			throw new NotImplementedException();
		}

		void IToolboxService.RemoveToolboxItem(ToolboxItem toolboxItem, string category)
		{
			throw new NotImplementedException();
		}

		void IToolboxService.SelectedToolboxItemUsed()
		{
			throw new NotImplementedException();
		}

		object IToolboxService.SerializeToolboxItem(ToolboxItem toolboxItem)
		{
			throw new NotImplementedException();
		}

		bool IToolboxService.SetCursor()
		{
			throw new NotImplementedException();
		}

		void IToolboxService.SetSelectedToolboxItem(ToolboxItem toolboxItem)
		{
			throw new NotImplementedException();
		}
	}
}

Room Architect Tool_Data/Managed/System.Drawing.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.ComponentModel.Design.Serialization;
using System.Diagnostics;
using System.Drawing.Design;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.Drawing.Internal;
using System.Drawing.Text;
using System.Globalization;
using System.IO;
using System.Internal;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
using System.Runtime.Serialization;
using System.Security;
using System.Security.Permissions;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using Unity;

[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("System.Drawing.dll")]
[assembly: AssemblyDescription("System.Drawing.dll")]
[assembly: AssemblyDefaultAlias("System.Drawing.dll")]
[assembly: AssemblyCompany("Mono development team")]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright("(c) Various Mono authors")]
[assembly: SatelliteContractVersion("4.0.0.0")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: ComVisible(false)]
[assembly: ComCompatibleVersion(1, 0, 3300, 0)]
[assembly: AllowPartiallyTrustedCallers]
[assembly: CLSCompliant(true)]
[assembly: AssemblyDelaySign(true)]
[assembly: AssemblyFileVersion("4.6.57.0")]
[assembly: CompilationRelaxations(CompilationRelaxations.NoStringInterning)]
[assembly: AssemblyInformationalVersion("4.6.57.0")]
[assembly: Dependency("System,", LoadHint.Always)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("4.0.0.0")]
[module: UnverifiableCode]
internal static class Consts
{
	public const string MonoVersion = "5.11.0.0";

	public const string MonoCompany = "Mono development team";

	public const string MonoProduct = "Mono Common Language Infrastructure";

	public const string MonoCopyright = "(c) Various Mono authors";

	public const int MonoCorlibVersion = 1051100001;

	public const string FxVersion = "4.0.0.0";

	public const string FxFileVersion = "4.6.57.0";

	public const string EnvironmentVersion = "4.0.30319.42000";

	public const string VsVersion = "0.0.0.0";

	public const string VsFileVersion = "11.0.0.0";

	private const string PublicKeyToken = "b77a5c561934e089";

	public const string AssemblyI18N = "I18N, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMicrosoft_JScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMono_Http = "Mono.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Posix = "Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Security = "Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Messaging_RabbitMQ = "Mono.Messaging.RabbitMQ, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyCorlib = "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Data = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Design = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing_Design = "System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Messaging = "System.Messaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Security = "System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Web = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Core = "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string WindowsBase_3_0 = "WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
internal sealed class Locale
{
	private Locale()
	{
	}

	public static string GetText(string msg)
	{
		return msg;
	}

	public static string GetText(string fmt, params object[] args)
	{
		return string.Format(fmt, args);
	}
}
internal class SR
{
	public const string CantTellPrinterName = "(printer name protected due to security restrictions)";

	public const string CantChangeImmutableObjects = "Changes cannot be made to {0} because permissions are not valid.";

	public const string CantMakeIconTransparent = "Bitmaps that are icons cannot be made transparent. Icons natively support transparency. Use the Icon constructor to create an icon.";

	public const string ColorNotSystemColor = "The color {0} is not a system color.";

	public const string DotNET_ComponentType = ".NET Component";

	public const string GdiplusAborted = "Function was ended.";

	public const string GdiplusAccessDenied = "File access is denied.";

	public const string GdiplusCannotCreateGraphicsFromIndexedPixelFormat = "A Graphics object cannot be created from an image that has an indexed pixel format.";

	public const string GdiplusCannotSetPixelFromIndexedPixelFormat = "SetPixel is not supported for images with indexed pixel formats.";

	public const string GdiplusDestPointsInvalidParallelogram = "Destination points define a parallelogram which must have a length of 3. These points will represent the upper-left, upper-right, and lower-left coordinates (defined in that order).";

	public const string GdiplusDestPointsInvalidLength = "Destination points must be an array with a length of 3 or 4. A length of 3 defines a parallelogram with the upper-left, upper-right, and lower-left corners. A length of 4 defines a quadrilateral with the fourth element of the array specifying the lower-right coordinate.";

	public const string GdiplusFileNotFound = "File not found.";

	public const string GdiplusFontFamilyNotFound = "Font '{0}' cannot be found.";

	public const string GdiplusFontStyleNotFound = "Font '{0}' does not support style '{1}'.";

	public const string GdiplusGenericError = "A generic error occurred in GDI+.";

	public const string GdiplusInsufficientBuffer = "Buffer is too small (internal GDI+ error).";

	public const string GdiplusInvalidParameter = "Parameter is not valid.";

	public const string GdiplusInvalidRectangle = "Rectangle '{0}' cannot have a width or height equal to 0.";

	public const string GdiplusInvalidSize = "Operation requires a transformation of the image from GDI+ to GDI. GDI does not support images with a width or height greater than 32767.";

	public const string GdiplusOutOfMemory = "Out of memory.";

	public const string GdiplusNotImplemented = "Not implemented.";

	public const string GdiplusNotInitialized = "GDI+ is not properly initialized (internal GDI+ error).";

	public const string GdiplusNotTrueTypeFont = "Only TrueType fonts are supported. '{0}' is not a TrueType font.";

	public const string GdiplusNotTrueTypeFont_NoName = "Only TrueType fonts are supported. This is not a TrueType font.";

	public const string GdiplusObjectBusy = "Object is currently in use elsewhere.";

	public const string GdiplusOverflow = "Overflow error.";

	public const string GdiplusPropertyNotFoundError = "Property cannot be found.";

	public const string GdiplusPropertyNotSupportedError = "Property is not supported.";

	public const string GdiplusUnknown = "Unknown GDI+ error occurred.";

	public const string GdiplusUnknownImageFormat = "Image format is unknown.";

	public const string GdiplusUnsupportedGdiplusVersion = "Current version of GDI+ does not support this feature.";

	public const string GdiplusWrongState = "Bitmap region is already locked.";

	public const string GlobalAssemblyCache = " (Global Assembly Cache)";

	public const string GraphicsBufferCurrentlyBusy = "BufferedGraphicsContext cannot be disposed of because a buffer operation is currently in progress.";

	public const string GraphicsBufferQueryFail = "Screen-compatible bitmap cannot be created. The screen bitmap format cannot be determined.";

	public const string ToolboxItemLocked = "Toolbox item cannot be modified.";

	public const string ToolboxItemInvalidPropertyType = "Property {0} requires an argument of type {1}.";

	public const string ToolboxItemValueNotSerializable = "Data type {0} is not serializable. Items added to a property dictionary must be serializable.";

	public const string ToolboxItemInvalidKey = "Argument should be a non-empty string.";

	public const string IllegalState = "Internal state of the {0} class is invalid.";

	public const string InterpolationColorsColorBlendNotSet = "Property must be set to a valid ColorBlend object to use interpolation colors.";

	public const string InterpolationColorsCommon = "{0}{1} ColorBlend objects must be constructed with the same number of positions and color values. Positions must be between 0.0 and 1.0, 1.0 indicating the last element in the array.";

	public const string InterpolationColorsInvalidColorBlendObject = "ColorBlend object that was set is not valid.";

	public const string InterpolationColorsInvalidStartPosition = "Position's first element must be equal to 0.";

	public const string InterpolationColorsInvalidEndPosition = "Position's last element must be equal to 1.0.";

	public const string InterpolationColorsLength = "Array of colors and positions must contain at least two elements.";

	public const string InterpolationColorsLengthsDiffer = "Colors and positions do not have the same number of elements.";

	public const string InvalidArgument = "Value of '{1}' is not valid for '{0}'.";

	public const string InvalidBoundArgument = "Value of '{1}' is not valid for '{0}'. '{0}' should be greater than {2} and less than or equal to {3}.";

	public const string InvalidClassName = "Class name is not valid.";

	public const string InvalidColor = "Color '{0}' is not valid.";

	public const string InvalidDashPattern = "DashPattern value is not valid.";

	public const string InvalidEx2BoundArgument = "Value of '{1}' is not valid for '{0}'. '{0}' should be greater than or equal to {2} and less than or equal to {3}.";

	public const string InvalidFrame = "Frame is not valid. Frame must be between 0 and FrameCount.";

	public const string InvalidGDIHandle = "Win32 handle that was passed to {0} is not valid or is the wrong type.";

	public const string InvalidImage = "Image type is unknown.";

	public const string InvalidLowBoundArgumentEx = "Value of '{1}' is not valid for '{0}'. '{0}' must be greater than or equal to {2}.";

	public const string InvalidPermissionLevel = "Permission level is not valid.";

	public const string InvalidPermissionState = "Permission state is not valid.";

	public const string InvalidPictureType = "Argument '{0}' must be a picture that can be used as a {1}.";

	public const string InvalidPrinterException_InvalidPrinter = "Settings to access printer '{0}' are not valid.";

	public const string InvalidPrinterException_NoDefaultPrinter = "No printers are installed.";

	public const string InvalidPrinterHandle = "Handle {0} is not valid.";

	public const string ValidRangeX = "Parameter must be positive and < Width.";

	public const string ValidRangeY = "Parameter must be positive and < Height.";

	public const string NativeHandle0 = "Native handle is 0.";

	public const string NoDefaultPrinter = "Default printer is not set.";

	public const string NotImplemented = "Not implemented.";

	public const string PDOCbeginPrintDescr = "Occurs when the document is about to be printed.";

	public const string PDOCdocumentNameDescr = "The name of the document shown to the user.";

	public const string PDOCdocumentPageSettingsDescr = "The page settings of the page currently being printed.";

	public const string PDOCendPrintDescr = "Occurs after the document has been printed.";

	public const string PDOCoriginAtMarginsDescr = "Indicates that the graphics origin is located at the user-specified page margins.";

	public const string PDOCprintControllerDescr = "Retrieves the print controller for this document.";

	public const string PDOCprintPageDescr = "Occurs once for each page to be printed.";

	public const string PDOCprinterSettingsDescr = "Retrieves the settings for the printer the document is currently being printed to.";

	public const string PDOCqueryPageSettingsDescr = "Occurs before each page is printed.  Useful for changing PageSettings for a particular page.";

	public const string PrintDocumentDesc = "Defines an object that sends output to a printer.";

	public const string PrintingPermissionBadXml = "XML is not valid.";

	public const string PrintingPermissionAttributeInvalidPermissionLevel = "Permission level must be between PrintingPermissionLevel.NoPrinting and PrintingPermissionLevel.AllPrinting.";

	public const string PropertyValueInvalidEntry = "IDictionary parameter contains at least one entry that is not valid. Ensure all values are consistent with the object's properties.";

	public const string PSizeNotCustom = "PaperSize cannot be changed unless the Kind property is set to Custom.";

	public const string ResourceNotFound = "Resource '{1}' cannot be found in class '{0}'.";

	public const string TargetNotPrintingPermission = "Target does not have permission to print.";

	public const string TextParseFailedFormat = "Text \"{0}\" cannot be parsed. The expected text format is \"{1}\".";

	public const string TriStateCompareError = "TriState.Default cannot be converted into a Boolean.";

	public const string toStringIcon = "(Icon)";

	public const string toStringNone = "(none)";

	public const string DCTypeInvalid = "GetObjectType on this dc returned an invalid value.";

	public const string InvalidEnumArgument = "The value of argument '{0}' ({1}) is invalid for Enum type '{2}'.";

	public const string ConvertInvalidPrimitive = "{0} is not a valid value for {1}.";

	public const string LibgdiplusNotFound = "The native library \"libgdiplus\" is not installed on the system, or was otherwise unable to be loaded.";

	public static string Format(string format, params object[] args)
	{
		return string.Format(format, args);
	}
}
namespace System
{
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoTODOAttribute : Attribute
	{
		private string comment;

		public string Comment => comment;

		public MonoTODOAttribute()
		{
		}

		public MonoTODOAttribute(string comment)
		{
			this.comment = comment;
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoDocumentationNoteAttribute : MonoTODOAttribute
	{
		public MonoDocumentationNoteAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoExtensionAttribute : MonoTODOAttribute
	{
		public MonoExtensionAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoInternalNoteAttribute : MonoTODOAttribute
	{
		public MonoInternalNoteAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoLimitationAttribute : MonoTODOAttribute
	{
		public MonoLimitationAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoNotSupportedAttribute : MonoTODOAttribute
	{
		public MonoNotSupportedAttribute(string comment)
			: base(comment)
		{
		}
	}
}
namespace System.Internal
{
	internal sealed class HandleCollector
	{
		private class HandleType
		{
			internal readonly string name;

			private int _initialThreshHold;

			private int _threshHold;

			private int _handleCount;

			private readonly int _deltaPercent;

			internal HandleType(string name, int expense, int initialThreshHold)
			{
				this.name = name;
				_initialThreshHold = initialThreshHold;
				_threshHold = initialThreshHold;
				_deltaPercent = 100 - expense;
			}

			internal void Add(IntPtr handle)
			{
				if (!(handle == IntPtr.Zero))
				{
					bool flag = false;
					int currentHandleCount = 0;
					lock (this)
					{
						_handleCount++;
						flag = NeedCollection();
						currentHandleCount = _handleCount;
					}
					lock (s_internalSyncObject)
					{
						HandleCollector.HandleAdded?.Invoke(name, handle, currentHandleCount);
					}
					if (flag && flag)
					{
						GC.Collect();
						Thread.Sleep((100 - _deltaPercent) / 4);
					}
				}
			}

			internal bool NeedCollection()
			{
				if (_handleCount > _threshHold)
				{
					_threshHold = _handleCount + _handleCount * _deltaPercent / 100;
					return true;
				}
				int num = 100 * _threshHold / (100 + _deltaPercent);
				if (num >= _initialThreshHold && _handleCount < (int)((float)num * 0.9f))
				{
					_threshHold = num;
				}
				return false;
			}

			internal IntPtr Remove(IntPtr handle)
			{
				if (handle == IntPtr.Zero)
				{
					return handle;
				}
				int currentHandleCount = 0;
				lock (this)
				{
					_handleCount--;
					if (_handleCount < 0)
					{
						_handleCount = 0;
					}
					currentHandleCount = _handleCount;
				}
				lock (s_internalSyncObject)
				{
					HandleCollector.HandleRemoved?.Invoke(name, handle, currentHandleCount);
				}
				return handle;
			}
		}

		private static HandleType[] s_handleTypes;

		private static int s_handleTypeCount;

		private static object s_internalSyncObject = new object();

		internal static event HandleChangeEventHandler HandleAdded;

		internal static event HandleChangeEventHandler HandleRemoved;

		internal static IntPtr Add(IntPtr handle, int type)
		{
			s_handleTypes[type - 1].Add(handle);
			return handle;
		}

		internal static int RegisterType(string typeName, int expense, int initialThreshold)
		{
			lock (s_internalSyncObject)
			{
				if (s_handleTypeCount == 0 || s_handleTypeCount == s_handleTypes.Length)
				{
					HandleType[] destinationArray = new HandleType[s_handleTypeCount + 10];
					if (s_handleTypes != null)
					{
						Array.Copy(s_handleTypes, 0, destinationArray, 0, s_handleTypeCount);
					}
					s_handleTypes = destinationArray;
				}
				s_handleTypes[s_handleTypeCount++] = new HandleType(typeName, expense, initialThreshold);
				return s_handleTypeCount;
			}
		}

		internal static IntPtr Remove(IntPtr handle, int type)
		{
			return s_handleTypes[type - 1].Remove(handle);
		}
	}
	internal delegate void HandleChangeEventHandler(string handleType, IntPtr handleValue, int currentHandleCount);
}
namespace System.Drawing
{
	internal static class ColorTable
	{
		private static readonly Lazy<Dictionary<string, Color>> s_colorConstants = new Lazy<Dictionary<string, Color>>(GetColors);

		internal static Dictionary<string, Color> Colors => s_colorConstants.Value;

		private static Dictionary<string, Color> GetColors()
		{
			Dictionary<string, Color> dictionary = new Dictionary<string, Color>(StringComparer.OrdinalIgnoreCase);
			FillConstants(dictionary, typeof(Color));
			return dictionary;
		}

		private static void FillConstants(Dictionary<string, Color> colors, Type enumType)
		{
			PropertyInfo[] properties = enumType.GetProperties();
			foreach (PropertyInfo propertyInfo in properties)
			{
				if (propertyInfo.PropertyType == typeof(Color))
				{
					colors[propertyInfo.Name] = (Color)propertyInfo.GetValue(null, null);
				}
			}
		}

		internal static bool TryGetNamedColor(string name, out Color result)
		{
			return Colors.TryGetValue(name, out result);
		}

		internal static bool IsKnownNamedColor(string name)
		{
			Color value;
			return Colors.TryGetValue(name, out value);
		}
	}
	internal static class ColorUtil
	{
		public static Color FromKnownColor(KnownColor color)
		{
			return Color.FromKnownColor(color);
		}

		public static bool IsSystemColor(this Color color)
		{
			return color.IsSystemColor;
		}
	}
	internal static class AssemblyRef
	{
		public const string SystemDrawingDesign = "System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

		public const string SystemDesign = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

		public const string SystemWindowsForms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
	}
	[AttributeUsage(AttributeTargets.Assembly)]
	public class BitmapSuffixInSameAssemblyAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Assembly)]
	public class BitmapSuffixInSatelliteAssemblyAttribute : Attribute
	{
	}
	public abstract class Brush : MarshalByRefObject, ICloneable, IDisposable
	{
		private IntPtr _nativeBrush;

		[Browsable(false)]
		[EditorBrowsable(EditorBrowsableState.Never)]
		internal IntPtr NativeBrush => _nativeBrush;

		public abstract object Clone();

		protected internal void SetNativeBrush(IntPtr brush)
		{
			SetNativeBrushInternal(brush);
		}

		internal void SetNativeBrushInternal(IntPtr brush)
		{
			_nativeBrush = brush;
		}

		public void Dispose()
		{
			Dispose(disposing: true);
			GC.SuppressFinalize(this);
		}

		protected virtual void Dispose(bool disposing)
		{
			if (!(_nativeBrush != IntPtr.Zero))
			{
				return;
			}
			try
			{
				GDIPlus.GdipDeleteBrush(new HandleRef(this, _nativeBrush));
			}
			catch (Exception ex) when (!ClientUtils.IsSecurityOrCriticalException(ex))
			{
			}
			finally
			{
				_nativeBrush = IntPtr.Zero;
			}
		}

		~Brush()
		{
			Dispose(disposing: false);
		}
	}
	internal static class ClientUtils
	{
		internal class WeakRefCollection : IList, ICollection, IEnumerable
		{
			internal class WeakRefObject
			{
				private int _hash;

				private WeakReference _weakHolder;

				internal bool IsAlive => _weakHolder.IsAlive;

				internal object Target => _weakHolder.Target;

				internal WeakRefObject(object obj)
				{
					_weakHolder = new WeakReference(obj);
					_hash = obj.GetHashCode();
				}

				public override int GetHashCode()
				{
					return _hash;
				}

				public override bool Equals(object obj)
				{
					WeakRefObject weakRefObject = obj as WeakRefObject;
					if (weakRefObject == this)
					{
						return true;
					}
					if (weakRefObject == null)
					{
						return false;
					}
					if (weakRefObject.Target != Target && (Target == null || !Target.Equals(weakRefObject.Target)))
					{
						return false;
					}
					return true;
				}
			}

			internal ArrayList InnerList { get; }

			public int RefCheckThreshold { get; set; } = int.MaxValue;


			public object this[int index]
			{
				get
				{
					if (InnerList[index] is WeakRefObject weakRefObject && weakRefObject.IsAlive)
					{
						return weakRefObject.Target;
					}
					return null;
				}
				set
				{
					InnerList[index] = CreateWeakRefObject(value);
				}
			}

			public bool IsFixedSize => InnerList.IsFixedSize;

			public int Count => InnerList.Count;

			object ICollection.SyncRoot => InnerList.SyncRoot;

			public bool IsReadOnly => InnerList.IsReadOnly;

			bool ICollection.IsSynchronized => InnerList.IsSynchronized;

			internal WeakRefCollection()
				: this(4)
			{
			}

			internal WeakRefCollection(int size)
			{
				InnerList = new ArrayList(size);
			}

			public void ScavengeReferences()
			{
				int num = 0;
				int count = Count;
				for (int i = 0; i < count; i++)
				{
					if (this[num] == null)
					{
						InnerList.RemoveAt(num);
					}
					else
					{
						num++;
					}
				}
			}

			public override bool Equals(object obj)
			{
				if (!(obj is WeakRefCollection weakRefCollection))
				{
					return true;
				}
				if (weakRefCollection == null || Count != weakRefCollection.Count)
				{
					return false;
				}
				for (int i = 0; i < Count; i++)
				{
					if (InnerList[i] != weakRefCollection.InnerList[i] && (InnerList[i] == null || !InnerList[i].Equals(weakRefCollection.InnerList[i])))
					{
						return false;
					}
				}
				return true;
			}

			public override int GetHashCode()
			{
				return base.GetHashCode();
			}

			private WeakRefObject CreateWeakRefObject(object value)
			{
				if (value == null)
				{
					return null;
				}
				return new WeakRefObject(value);
			}

			private static void Copy(WeakRefCollection sourceList, int sourceIndex, WeakRefCollection destinationList, int destinationIndex, int length)
			{
				if (sourceIndex < destinationIndex)
				{
					sourceIndex += length;
					destinationIndex += length;
					while (length > 0)
					{
						destinationList.InnerList[--destinationIndex] = sourceList.InnerList[--sourceIndex];
						length--;
					}
				}
				else
				{
					while (length > 0)
					{
						destinationList.InnerList[destinationIndex++] = sourceList.InnerList[sourceIndex++];
						length--;
					}
				}
			}

			public void RemoveByHashCode(object value)
			{
				if (value == null)
				{
					return;
				}
				int hashCode = value.GetHashCode();
				for (int i = 0; i < InnerList.Count; i++)
				{
					if (InnerList[i] != null && InnerList[i].GetHashCode() == hashCode)
					{
						RemoveAt(i);
						break;
					}
				}
			}

			public void Clear()
			{
				InnerList.Clear();
			}

			public bool Contains(object value)
			{
				return InnerList.Contains(CreateWeakRefObject(value));
			}

			public void RemoveAt(int index)
			{
				InnerList.RemoveAt(index);
			}

			public void Remove(object value)
			{
				InnerList.Remove(CreateWeakRefObject(value));
			}

			public int IndexOf(object value)
			{
				return InnerList.IndexOf(CreateWeakRefObject(value));
			}

			public void Insert(int index, object value)
			{
				InnerList.Insert(index, CreateWeakRefObject(value));
			}

			public int Add(object value)
			{
				if (Count > RefCheckThreshold)
				{
					ScavengeReferences();
				}
				return InnerList.Add(CreateWeakRefObject(value));
			}

			public void CopyTo(Array array, int index)
			{
				InnerList.CopyTo(array, index);
			}

			public IEnumerator GetEnumerator()
			{
				return InnerList.GetEnumerator();
			}
		}

		public static bool IsCriticalException(Exception ex)
		{
			if (!(ex is NullReferenceException) && !(ex is StackOverflowException) && !(ex is OutOfMemoryException) && !(ex is ThreadAbortException) && !(ex is ExecutionEngineException) && !(ex is IndexOutOfRangeException))
			{
				return ex is AccessViolationException;
			}
			return true;
		}

		public static bool IsSecurityOrCriticalException(Exception ex)
		{
			if (!(ex is SecurityException))
			{
				return IsCriticalException(ex);
			}
			return true;
		}
	}
	[Flags]
	public enum FontStyle
	{
		Regular = 0,
		Bold = 1,
		Italic = 2,
		Underline = 4,
		Strikeout = 8
	}
	[SuppressUnmanagedCodeSecurity]
	internal class SafeNativeMethods
	{
		[SuppressUnmanagedCodeSecurity]
		internal class Gdip : GDIPlus
		{
			private static readonly TraceSwitch s_gdiPlusInitialization;

			private static IntPtr s_initToken;

			private const string ThreadDataSlotName = "system.drawing.threaddata";

			internal const int Ok = 0;

			internal const int GenericError = 1;

			internal const int InvalidParameter = 2;

			internal const int OutOfMemory = 3;

			internal const int ObjectBusy = 4;

			internal const int InsufficientBuffer = 5;

			internal const int NotImplemented = 6;

			internal const int Win32Error = 7;

			internal const int WrongState = 8;

			internal const int Aborted = 9;

			internal const int FileNotFound = 10;

			internal const int ValueOverflow = 11;

			internal const int AccessDenied = 12;

			internal const int UnknownImageFormat = 13;

			internal const int FontFamilyNotFound = 14;

			internal const int FontStyleNotFound = 15;

			internal const int NotTrueTypeFont = 16;

			internal const int UnsupportedGdiplusVersion = 17;

			internal const int GdiplusNotInitialized = 18;

			internal const int PropertyNotFound = 19;

			internal const int PropertyNotSupported = 20;

			private static bool Initialized => s_initToken != IntPtr.Zero;

			internal static IDictionary ThreadData
			{
				get
				{
					LocalDataStoreSlot namedDataSlot = Thread.GetNamedDataSlot("system.drawing.threaddata");
					IDictionary dictionary = (IDictionary)Thread.GetData(namedDataSlot);
					if (dictionary == null)
					{
						dictionary = new Hashtable();
						Thread.SetData(namedDataSlot, dictionary);
					}
					return dictionary;
				}
			}

			static Gdip()
			{
				s_gdiPlusInitialization = new TraceSwitch("GdiPlusInitialization", "Tracks GDI+ initialization and teardown");
				s_initToken = (IntPtr)1;
				AppDomain currentDomain = AppDomain.CurrentDomain;
				currentDomain.ProcessExit += OnProcessExit;
				if (!currentDomain.IsDefaultAppDomain())
				{
					currentDomain.DomainUnload += OnProcessExit;
				}
			}

			[MethodImpl(MethodImplOptions.NoInlining)]
			private static void ClearThreadData()
			{
				Thread.SetData(Thread.GetNamedDataSlot("system.drawing.threaddata"), null);
			}

			private static void Shutdown()
			{
				if (Initialized)
				{
					ClearThreadData();
					AppDomain currentDomain = AppDomain.CurrentDomain;
					currentDomain.ProcessExit -= OnProcessExit;
					if (!currentDomain.IsDefaultAppDomain())
					{
						currentDomain.DomainUnload -= OnProcessExit;
					}
				}
			}

			[PrePrepareMethod]
			private static void OnProcessExit(object sender, EventArgs e)
			{
				Shutdown();
			}

			internal static void DummyFunction()
			{
			}

			internal static void CheckStatus(int status)
			{
				if (status != 0)
				{
					throw StatusException(status);
				}
			}

			internal static Exception StatusException(int status)
			{
				return status switch
				{
					1 => new ExternalException(SR.Format("A generic error occurred in GDI+."), -2147467259), 
					2 => new ArgumentException(SR.Format("Parameter is not valid.")), 
					3 => new OutOfMemoryException(SR.Format("Out of memory.")), 
					4 => new InvalidOperationException(SR.Format("Object is currently in use elsewhere.")), 
					5 => new OutOfMemoryException(SR.Format("Buffer is too small (internal GDI+ error).")), 
					6 => new NotImplementedException(SR.Format("Not implemented.")), 
					7 => new ExternalException(SR.Format("A generic error occurred in GDI+."), -2147467259), 
					8 => new InvalidOperationException(SR.Format("Bitmap region is already locked.")), 
					9 => new ExternalException(SR.Format("Function was ended."), -2147467260), 
					10 => new FileNotFoundException(SR.Format("File not found.")), 
					11 => new OverflowException(SR.Format("Overflow error.")), 
					12 => new ExternalException(SR.Format("File access is denied."), -2147024891), 
					13 => new ArgumentException(SR.Format("Image format is unknown.")), 
					19 => new ArgumentException(SR.Format("Property cannot be found.")), 
					20 => new ArgumentException(SR.Format("Property is not supported.")), 
					14 => new ArgumentException(SR.Format("Font '{0}' cannot be found.", "?")), 
					15 => new ArgumentException(SR.Format("Font '{0}' does not support style '{1}'.", "?", "?")), 
					16 => new ArgumentException(SR.Format("Only TrueType fonts are supported. This is not a TrueType font.")), 
					17 => new ExternalException(SR.Format("Current version of GDI+ does not support this feature."), -2147467259), 
					18 => new ExternalException(SR.Format("GDI+ is not properly initialized (internal GDI+ error)."), -2147467259), 
					_ => new ExternalException(SR.Format("Unknown GDI+ error occurred."), -2147418113), 
				};
			}

			internal static PointF[] ConvertGPPOINTFArrayF(IntPtr memory, int count)
			{
				if (memory == IntPtr.Zero)
				{
					throw new ArgumentNullException("memory");
				}
				PointF[] array = new PointF[count];
				Type typeFromHandle = typeof(GPPOINTF);
				int num = Marshal.SizeOf(typeFromHandle);
				for (int i = 0; i < count; i++)
				{
					GPPOINTF gPPOINTF = (GPPOINTF)Marshal.PtrToStructure((IntPtr)((long)memory + i * num), typeFromHandle);
					array[i] = new PointF(gPPOINTF.X, gPPOINTF.Y);
				}
				return array;
			}

			internal static Point[] ConvertGPPOINTArray(IntPtr memory, int count)
			{
				if (memory == IntPtr.Zero)
				{
					throw new ArgumentNullException("memory");
				}
				Point[] array = new Point[count];
				Type typeFromHandle = typeof(GPPOINT);
				int num = Marshal.SizeOf(typeFromHandle);
				for (int i = 0; i < count; i++)
				{
					GPPOINT gPPOINT = (GPPOINT)Marshal.PtrToStructure((IntPtr)((long)memory + i * num), typeFromHandle);
					array[i] = new Point(gPPOINT.X, gPPOINT.Y);
				}
				return array;
			}

			internal static IntPtr ConvertPointToMemory(PointF[] points)
			{
				if (points == null)
				{
					throw new ArgumentNullException("points");
				}
				int num = Marshal.SizeOf(typeof(GPPOINTF));
				int num2 = points.Length;
				IntPtr intPtr = Marshal.AllocHGlobal(checked(num2 * num));
				for (int i = 0; i < num2; i++)
				{
					Marshal.StructureToPtr(new GPPOINTF(points[i]), (IntPtr)checked((long)intPtr + i * num), fDeleteOld: false);
				}
				return intPtr;
			}

			internal static IntPtr ConvertPointToMemory(Point[] points)
			{
				if (points == null)
				{
					throw new ArgumentNullException("points");
				}
				int num = Marshal.SizeOf(typeof(GPPOINT));
				int num2 = points.Length;
				IntPtr intPtr = Marshal.AllocHGlobal(checked(num2 * num));
				for (int i = 0; i < num2; i++)
				{
					Marshal.StructureToPtr(new GPPOINT(points[i]), (IntPtr)checked((long)intPtr + i * num), fDeleteOld: false);
				}
				return intPtr;
			}

			internal static IntPtr ConvertRectangleToMemory(RectangleF[] rect)
			{
				if (rect == null)
				{
					throw new ArgumentNullException("rect");
				}
				int num = Marshal.SizeOf(typeof(GPRECTF));
				int num2 = rect.Length;
				IntPtr intPtr = Marshal.AllocHGlobal(checked(num2 * num));
				for (int i = 0; i < num2; i++)
				{
					Marshal.StructureToPtr(new GPRECTF(rect[i]), (IntPtr)checked((long)intPtr + i * num), fDeleteOld: false);
				}
				return intPtr;
			}

			internal static IntPtr ConvertRectangleToMemory(Rectangle[] rect)
			{
				if (rect == null)
				{
					throw new ArgumentNullException("rect");
				}
				int num = Marshal.SizeOf(typeof(GPRECT));
				int num2 = rect.Length;
				IntPtr intPtr = Marshal.AllocHGlobal(checked(num2 * num));
				for (int i = 0; i < num2; i++)
				{
					Marshal.StructureToPtr(new GPRECT(rect[i]), (IntPtr)checked((long)intPtr + i * num), fDeleteOld: false);
				}
				return intPtr;
			}
		}

		[StructLayout(LayoutKind.Sequential)]
		public class ENHMETAHEADER
		{
			public int iType;

			public int nSize = 40;

			public int rclBounds_left;

			public int rclBounds_top;

			public int rclBounds_right;

			public int rclBounds_bottom;

			public int rclFrame_left;

			public int rclFrame_top;

			public int rclFrame_right;

			public int rclFrame_bottom;

			public int dSignature;

			public int nVersion;

			public int nBytes;

			public int nRecords;

			public short nHandles;

			public short sReserved;

			public int nDescription;

			public int offDescription;

			public int nPalEntries;

			public int szlDevice_cx;

			public int szlDevice_cy;

			public int szlMillimeters_cx;

			public int szlMillimeters_cy;

			public int cbPixelFormat;

			public int offPixelFormat;

			public int bOpenGL;
		}

		[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
		public class DOCINFO
		{
			public int cbSize = 20;

			public string lpszDocName;

			public string lpszOutput;

			public string lpszDatatype;

			public int fwType;
		}

		[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
		public class PRINTDLG
		{
			public int lStructSize;

			public IntPtr hwndOwner;

			public IntPtr hDevMode;

			public IntPtr hDevNames;

			public IntPtr hDC;

			public int Flags;

			public short nFromPage;

			public short nToPage;

			public short nMinPage;

			public short nMaxPage;

			public short nCopies;

			public IntPtr hInstance;

			public IntPtr lCustData;

			public IntPtr lpfnPrintHook;

			public IntPtr lpfnSetupHook;

			public string lpPrintTemplateName;

			public string lpSetupTemplateName;

			public IntPtr hPrintTemplate;

			public IntPtr hSetupTemplate;
		}

		[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto, Pack = 1)]
		public class PRINTDLGX86
		{
			public int lStructSize;

			public IntPtr hwndOwner;

			public IntPtr hDevMode;

			public IntPtr hDevNames;

			public IntPtr hDC;

			public int Flags;

			public short nFromPage;

			public short nToPage;

			public short nMinPage;

			public short nMaxPage;

			public short nCopies;

			public IntPtr hInstance;

			public IntPtr lCustData;

			public IntPtr lpfnPrintHook;

			public IntPtr lpfnSetupHook;

			public string lpPrintTemplateName;

			public string lpSetupTemplateName;

			public IntPtr hPrintTemplate;

			public IntPtr hSetupTemplate;
		}

		[StructLayout(LayoutKind.Sequential)]
		public class ICONINFO
		{
			public int fIcon;

			public int xHotspot;

			public int yHotspot;

			public IntPtr hbmMask = IntPtr.Zero;

			public IntPtr hbmColor = IntPtr.Zero;
		}

		[StructLayout(LayoutKind.Sequential)]
		public class BITMAP
		{
			public int bmType;

			public int bmWidth;

			public int bmHeight;

			public int bmWidthBytes;

			public short bmPlanes;

			public short bmBitsPixel;

			public IntPtr bmBits = IntPtr.Zero;
		}

		[StructLayout(LayoutKind.Sequential)]
		public class BITMAPINFOHEADER
		{
			public int biSize = 40;

			public int biWidth;

			public int biHeight;

			public short biPlanes;

			public short biBitCount;

			public int biCompression;

			public int biSizeImage;

			public int biXPelsPerMeter;

			public int biYPelsPerMeter;

			public int biClrUsed;

			public int biClrImportant;
		}

		[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
		public class LOGFONT
		{
			public int lfHeight;

			public int lfWidth;

			public int lfEscapement;

			public int lfOrientation;

			public int lfWeight;

			public byte lfItalic;

			public byte lfUnderline;

			public byte lfStrikeOut;

			public byte lfCharSet;

			public byte lfOutPrecision;

			public byte lfClipPrecision;

			public byte lfQuality;

			public byte lfPitchAndFamily;

			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
			public string lfFaceName;

			public override string ToString()
			{
				return "lfHeight=" + lfHeight + ", lfWidth=" + lfWidth + ", lfEscapement=" + lfEscapement + ", lfOrientation=" + lfOrientation + ", lfWeight=" + lfWeight + ", lfItalic=" + lfItalic + ", lfUnderline=" + lfUnderline + ", lfStrikeOut=" + lfStrikeOut + ", lfCharSet=" + lfCharSet + ", lfOutPrecision=" + lfOutPrecision + ", lfClipPrecision=" + lfClipPrecision + ", lfQuality=" + lfQuality + ", lfPitchAndFamily=" + lfPitchAndFamily + ", lfFaceName=" + lfFaceName;
			}
		}

		[StructLayout(LayoutKind.Sequential, Pack = 2)]
		public struct ICONDIR
		{
			public short idReserved;

			public short idType;

			public short idCount;

			public ICONDIRENTRY idEntries;
		}

		public struct ICONDIRENTRY
		{
			public byte bWidth;

			public byte bHeight;

			public byte bColorCount;

			public byte bReserved;

			public short wPlanes;

			public short wBitCount;

			public int dwBytesInRes;

			public int dwImageOffset;
		}

		public class Ole
		{
			public const int PICTYPE_ICON = 3;
		}

		[StructLayout(LayoutKind.Sequential)]
		public class PICTDESC
		{
			internal int cbSizeOfStruct;

			public int picType;

			internal IntPtr union1;

			internal int union2;

			internal int union3;

			public static PICTDESC CreateIconPICTDESC(IntPtr hicon)
			{
				return new PICTDESC
				{
					cbSizeOfStruct = 12,
					picType = 3,
					union1 = hicon
				};
			}
		}

		[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
		public class DEVMODE
		{
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
			public string dmDeviceName;

			public short dmSpecVersion;

			public short dmDriverVersion;

			public short dmSize;

			public short dmDriverExtra;

			public int dmFields;

			public short dmOrientation;

			public short dmPaperSize;

			public short dmPaperLength;

			public short dmPaperWidth;

			public short dmScale;

			public short dmCopies;

			public short dmDefaultSource;

			public short dmPrintQuality;

			public short dmColor;

			public short dmDuplex;

			public short dmYResolution;

			public short dmTTOption;

			public short dmCollate;

			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
			public string dmFormName;

			public short dmLogPixels;

			public int dmBitsPerPel;

			public int dmPelsWidth;

			public int dmPelsHeight;

			public int dmDisplayFlags;

			public int dmDisplayFrequency;

			public int dmICMMethod;

			public int dmICMIntent;

			public int dmMediaType;

			public int dmDitherType;

			public int dmICCManufacturer;

			public int dmICCModel;

			public int dmPanningWidth;

			public int dmPanningHeight;

			public override string ToString()
			{
				return "[DEVMODE: dmDeviceName=" + dmDeviceName + ", dmSpecVersion=" + dmSpecVersion + ", dmDriverVersion=" + dmDriverVersion + ", dmSize=" + dmSize + ", dmDriverExtra=" + dmDriverExtra + ", dmFields=" + dmFields + ", dmOrientation=" + dmOrientation + ", dmPaperSize=" + dmPaperSize + ", dmPaperLength=" + dmPaperLength + ", dmPaperWidth=" + dmPaperWidth + ", dmScale=" + dmScale + ", dmCopies=" + dmCopies + ", dmDefaultSource=" + dmDefaultSource + ", dmPrintQuality=" + dmPrintQuality + ", dmColor=" + dmColor + ", dmDuplex=" + dmDuplex + ", dmYResolution=" + dmYResolution + ", dmTTOption=" + dmTTOption + ", dmCollate=" + dmCollate + ", dmFormName=" + dmFormName + ", dmLogPixels=" + dmLogPixels + ", dmBitsPerPel=" + dmBitsPerPel + ", dmPelsWidth=" + dmPelsWidth + ", dmPelsHeight=" + dmPelsHeight + ", dmDisplayFlags=" + dmDisplayFlags + ", dmDisplayFrequency=" + dmDisplayFrequency + ", dmICMMethod=" + dmICMMethod + ", dmICMIntent=" + dmICMIntent + ", dmMediaType=" + dmMediaType + ", dmDitherType=" + dmDitherType + ", dmICCManufacturer=" + dmICCManufacturer + ", dmICCModel=" + dmICCModel + ", dmPanningWidth=" + dmPanningWidth + ", dmPanningHeight=" + dmPanningHeight + "]";
			}
		}

		public sealed class CommonHandles
		{
			public static readonly int GDI;

			public static readonly int HDC;

			public static readonly int Icon;

			public static readonly int Kernel;

			static CommonHandles()
			{
				GDI = System.Internal.HandleCollector.RegisterType("GDI", 50, 500);
				HDC = System.Internal.HandleCollector.RegisterType("HDC", 100, 2);
				Icon = System.Internal.HandleCollector.RegisterType("Icon", 20, 500);
				Kernel = System.Internal.HandleCollector.RegisterType("Kernel", 0, 1000);
			}
		}

		public class StreamConsts
		{
			public const int STREAM_SEEK_SET = 0;

			public const int STREAM_SEEK_CUR = 1;

			public const int STREAM_SEEK_END = 2;
		}

		[ComImport]
		[Guid("7BF80980-BF32-101A-8BBB-00AA00300CAB")]
		[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
		public interface IPicture
		{
			[SuppressUnmanagedCodeSecurity]
			IntPtr GetHandle();

			[SuppressUnmanagedCodeSecurity]
			IntPtr GetHPal();

			[SuppressUnmanagedCodeSecurity]
			[return: MarshalAs(UnmanagedType.I2)]
			short GetPictureType();

			[SuppressUnmanagedCodeSecurity]
			int GetWidth();

			[SuppressUnmanagedCodeSecurity]
			int GetHeight();

			[SuppressUnmanagedCodeSecurity]
			void Render();

			[SuppressUnmanagedCodeSecurity]
			void SetHPal([In] IntPtr phpal);

			[SuppressUnmanagedCodeSecurity]
			IntPtr GetCurDC();

			[SuppressUnmanagedCodeSecurity]
			void SelectPicture([In] IntPtr hdcIn, [Out][MarshalAs(UnmanagedType.LPArray)] int[] phdcOut, [Out][MarshalAs(UnmanagedType.LPArray)] int[] phbmpOut);

			[SuppressUnmanagedCodeSecurity]
			[return: MarshalAs(UnmanagedType.Bool)]
			bool GetKeepOriginalFormat();

			[SuppressUnmanagedCodeSecurity]
			void SetKeepOriginalFormat([In][MarshalAs(UnmanagedType.Bool)] bool pfkeep);

			[SuppressUnmanagedCodeSecurity]
			void PictureChanged();

			[PreserveSig]
			[SuppressUnmanagedCodeSecurity]
			int SaveAsFile([In][MarshalAs(UnmanagedType.Interface)] UnsafeNativeMethods.IStream pstm, [In] int fSaveMemCopy, out int pcbSize);

			[SuppressUnmanagedCodeSecurity]
			int GetAttributes();

			[SuppressUnmanagedCodeSecurity]
			void SetHdc([In] IntPtr hdc);
		}

		public const int ERROR_CANCELLED = 1223;

		public const int E_UNEXPECTED = -2147418113;

		public const int E_NOTIMPL = -2147467263;

		public const int E_ABORT = -2147467260;

		public const int E_FAIL = -2147467259;

		public const int E_ACCESSDENIED = -2147024891;

		public const int GMEM_MOVEABLE = 2;

		public const int GMEM_ZEROINIT = 64;

		public const int DM_IN_BUFFER = 8;

		public const int DM_OUT_BUFFER = 2;

		public const int DT_PLOTTER = 0;

		public const int DT_RASPRINTER = 2;

		public const int TECHNOLOGY = 2;

		public const int DC_PAPERS = 2;

		public const int DC_PAPERSIZE = 3;

		public const int DC_BINS = 6;

		public const int DC_DUPLEX = 7;

		public const int DC_BINNAMES = 12;

		public const int DC_ENUMRESOLUTIONS = 13;

		public const int DC_PAPERNAMES = 16;

		public const int DC_ORIENTATION = 17;

		public const int DC_COPIES = 18;

		public const int PD_ALLPAGES = 0;

		public const int PD_SELECTION = 1;

		public const int PD_PAGENUMS = 2;

		public const int PD_CURRENTPAGE = 4194304;

		public const int PD_RETURNDEFAULT = 1024;

		public const int DI_NORMAL = 3;

		public const int IMAGE_ICON = 1;

		public const int IDI_APPLICATION = 32512;

		public const int IDI_HAND = 32513;

		public const int IDI_QUESTION = 32514;

		public const int IDI_EXCLAMATION = 32515;

		public const int IDI_ASTERISK = 32516;

		public const int IDI_WINLOGO = 32517;

		public const int IDI_WARNING = 32515;

		public const int IDI_ERROR = 32513;

		public const int IDI_INFORMATION = 32516;

		public const int SRCCOPY = 13369376;

		public const int PLANES = 14;

		public const int BITSPIXEL = 12;

		public const int LOGPIXELSX = 88;

		public const int LOGPIXELSY = 90;

		public const int PHYSICALWIDTH = 110;

		public const int PHYSICALHEIGHT = 111;

		public const int PHYSICALOFFSETX = 112;

		public const int PHYSICALOFFSETY = 113;

		public const int VERTRES = 10;

		public const int HORZRES = 8;

		public const int DM_ORIENTATION = 1;

		public const int DM_PAPERSIZE = 2;

		public const int DM_PAPERLENGTH = 4;

		public const int DM_PAPERWIDTH = 8;

		public const int DM_COPIES = 256;

		public const int DM_DEFAULTSOURCE = 512;

		public const int DM_PRINTQUALITY = 1024;

		public const int DM_COLOR = 2048;

		public const int DM_DUPLEX = 4096;

		public const int DM_YRESOLUTION = 8192;

		public const int DM_COLLATE = 32768;

		public const int DMORIENT_PORTRAIT = 1;

		public const int DMORIENT_LANDSCAPE = 2;

		public const int DMPAPER_LETTER = 1;

		public const int DMPAPER_LETTERSMALL = 2;

		public const int DMPAPER_TABLOID = 3;

		public const int DMPAPER_LEDGER = 4;

		public const int DMPAPER_LEGAL = 5;

		public const int DMPAPER_STATEMENT = 6;

		public const int DMPAPER_EXECUTIVE = 7;

		public const int DMPAPER_A3 = 8;

		public const int DMPAPER_A4 = 9;

		public const int DMPAPER_A4SMALL = 10;

		public const int DMPAPER_A5 = 11;

		public const int DMPAPER_B4 = 12;

		public const int DMPAPER_B5 = 13;

		public const int DMPAPER_FOLIO = 14;

		public const int DMPAPER_QUARTO = 15;

		public const int DMPAPER_10X14 = 16;

		public const int DMPAPER_11X17 = 17;

		public const int DMPAPER_NOTE = 18;

		public const int DMPAPER_ENV_9 = 19;

		public const int DMPAPER_ENV_10 = 20;

		public const int DMPAPER_ENV_11 = 21;

		public const int DMPAPER_ENV_12 = 22;

		public const int DMPAPER_ENV_14 = 23;

		public const int DMPAPER_CSHEET = 24;

		public const int DMPAPER_DSHEET = 25;

		public const int DMPAPER_ESHEET = 26;

		public const int DMPAPER_ENV_DL = 27;

		public const int DMPAPER_ENV_C5 = 28;

		public const int DMPAPER_ENV_C3 = 29;

		public const int DMPAPER_ENV_C4 = 30;

		public const int DMPAPER_ENV_C6 = 31;

		public const int DMPAPER_ENV_C65 = 32;

		public const int DMPAPER_ENV_B4 = 33;

		public const int DMPAPER_ENV_B5 = 34;

		public const int DMPAPER_ENV_B6 = 35;

		public const int DMPAPER_ENV_ITALY = 36;

		public const int DMPAPER_ENV_MONARCH = 37;

		public const int DMPAPER_ENV_PERSONAL = 38;

		public const int DMPAPER_FANFOLD_US = 39;

		public const int DMPAPER_FANFOLD_STD_GERMAN = 40;

		public const int DMPAPER_FANFOLD_LGL_GERMAN = 41;

		public const int DMPAPER_ISO_B4 = 42;

		public const int DMPAPER_JAPANESE_POSTCARD = 43;

		public const int DMPAPER_9X11 = 44;

		public const int DMPAPER_10X11 = 45;

		public const int DMPAPER_15X11 = 46;

		public const int DMPAPER_ENV_INVITE = 47;

		public const int DMPAPER_RESERVED_48 = 48;

		public const int DMPAPER_RESERVED_49 = 49;

		public const int DMPAPER_LETTER_EXTRA = 50;

		public const int DMPAPER_LEGAL_EXTRA = 51;

		public const int DMPAPER_TABLOID_EXTRA = 52;

		public const int DMPAPER_A4_EXTRA = 53;

		public const int DMPAPER_LETTER_TRANSVERSE = 54;

		public const int DMPAPER_A4_TRANSVERSE = 55;

		public const int DMPAPER_LETTER_EXTRA_TRANSVERSE = 56;

		public const int DMPAPER_A_PLUS = 57;

		public const int DMPAPER_B_PLUS = 58;

		public const int DMPAPER_LETTER_PLUS = 59;

		public const int DMPAPER_A4_PLUS = 60;

		public const int DMPAPER_A5_TRANSVERSE = 61;

		public const int DMPAPER_B5_TRANSVERSE = 62;

		public const int DMPAPER_A3_EXTRA = 63;

		public const int DMPAPER_A5_EXTRA = 64;

		public const int DMPAPER_B5_EXTRA = 65;

		public const int DMPAPER_A2 = 66;

		public const int DMPAPER_A3_TRANSVERSE = 67;

		public const int DMPAPER_A3_EXTRA_TRANSVERSE = 68;

		public const int DMPAPER_DBL_JAPANESE_POSTCARD = 69;

		public const int DMPAPER_A6 = 70;

		public const int DMPAPER_JENV_KAKU2 = 71;

		public const int DMPAPER_JENV_KAKU3 = 72;

		public const int DMPAPER_JENV_CHOU3 = 73;

		public const int DMPAPER_JENV_CHOU4 = 74;

		public const int DMPAPER_LETTER_ROTATED = 75;

		public const int DMPAPER_A3_ROTATED = 76;

		public const int DMPAPER_A4_ROTATED = 77;

		public const int DMPAPER_A5_ROTATED = 78;

		public const int DMPAPER_B4_JIS_ROTATED = 79;

		public const int DMPAPER_B5_JIS_ROTATED = 80;

		public const int DMPAPER_JAPANESE_POSTCARD_ROTATED = 81;

		public const int DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED = 82;

		public const int DMPAPER_A6_ROTATED = 83;

		public const int DMPAPER_JENV_KAKU2_ROTATED = 84;

		public const int DMPAPER_JENV_KAKU3_ROTATED = 85;

		public const int DMPAPER_JENV_CHOU3_ROTATED = 86;

		public const int DMPAPER_JENV_CHOU4_ROTATED = 87;

		public const int DMPAPER_B6_JIS = 88;

		public const int DMPAPER_B6_JIS_ROTATED = 89;

		public const int DMPAPER_12X11 = 90;

		public const int DMPAPER_JENV_YOU4 = 91;

		public const int DMPAPER_JENV_YOU4_ROTATED = 92;

		public const int DMPAPER_P16K = 93;

		public const int DMPAPER_P32K = 94;

		public const int DMPAPER_P32KBIG = 95;

		public const int DMPAPER_PENV_1 = 96;

		public const int DMPAPER_PENV_2 = 97;

		public const int DMPAPER_PENV_3 = 98;

		public const int DMPAPER_PENV_4 = 99;

		public const int DMPAPER_PENV_5 = 100;

		public const int DMPAPER_PENV_6 = 101;

		public const int DMPAPER_PENV_7 = 102;

		public const int DMPAPER_PENV_8 = 103;

		public const int DMPAPER_PENV_9 = 104;

		public const int DMPAPER_PENV_10 = 105;

		public const int DMPAPER_P16K_ROTATED = 106;

		public const int DMPAPER_P32K_ROTATED = 107;

		public const int DMPAPER_P32KBIG_ROTATED = 108;

		public const int DMPAPER_PENV_1_ROTATED = 109;

		public const int DMPAPER_PENV_2_ROTATED = 110;

		public const int DMPAPER_PENV_3_ROTATED = 111;

		public const int DMPAPER_PENV_4_ROTATED = 112;

		public const int DMPAPER_PENV_5_ROTATED = 113;

		public const int DMPAPER_PENV_6_ROTATED = 114;

		public const int DMPAPER_PENV_7_ROTATED = 115;

		public const int DMPAPER_PENV_8_ROTATED = 116;

		public const int DMPAPER_PENV_9_ROTATED = 117;

		public const int DMPAPER_PENV_10_ROTATED = 118;

		public const int DMPAPER_LAST = 118;

		public const int DMBIN_UPPER = 1;

		public const int DMBIN_LOWER = 2;

		public const int DMBIN_MIDDLE = 3;

		public const int DMBIN_MANUAL = 4;

		public const int DMBIN_ENVELOPE = 5;

		public const int DMBIN_ENVMANUAL = 6;

		public const int DMBIN_AUTO = 7;

		public const int DMBIN_TRACTOR = 8;

		public const int DMBIN_SMALLFMT = 9;

		public const int DMBIN_LARGEFMT = 10;

		public const int DMBIN_LARGECAPACITY = 11;

		public const int DMBIN_CASSETTE = 14;

		public const int DMBIN_FORMSOURCE = 15;

		public const int DMBIN_LAST = 15;

		public const int DMBIN_USER = 256;

		public const int DMRES_DRAFT = -1;

		public const int DMRES_LOW = -2;

		public const int DMRES_MEDIUM = -3;

		public const int DMRES_HIGH = -4;

		public const int DMCOLOR_MONOCHROME = 1;

		public const int DMCOLOR_COLOR = 2;

		public const int DMDUP_SIMPLEX = 1;

		public const int DMDUP_VERTICAL = 2;

		public const int DMDUP_HORIZONTAL = 3;

		public const int DMCOLLATE_FALSE = 0;

		public const int DMCOLLATE_TRUE = 1;

		public const int PRINTER_ENUM_LOCAL = 2;

		public const int PRINTER_ENUM_CONNECTIONS = 4;

		public const int SRCPAINT = 15597702;

		public const int SRCAND = 8913094;

		public const int SRCINVERT = 6684742;

		public const int SRCERASE = 4457256;

		public const int NOTSRCCOPY = 3342344;

		public const int NOTSRCERASE = 1114278;

		public const int MERGECOPY = 12583114;

		public const int MERGEPAINT = 12255782;

		public const int PATCOPY = 15728673;

		public const int PATPAINT = 16452105;

		public const int PATINVERT = 5898313;

		public const int DSTINVERT = 5570569;

		public const int BLACKNESS = 66;

		public const int WHITENESS = 16711778;

		public const int CAPTUREBLT = 1073741824;

		public const int SM_CXICON = 11;

		public const int SM_CYICON = 12;

		public const int DEFAULT_CHARSET = 1;

		public const int NOMIRRORBITMAP = int.MinValue;

		public const int QUERYESCSUPPORT = 8;

		public const int CHECKJPEGFORMAT = 4119;

		public const int CHECKPNGFORMAT = 4120;

		public const int ERROR_ACCESS_DENIED = 5;

		public const int ERROR_INVALID_PARAMETER = 87;

		public const int ERROR_PROC_NOT_FOUND = 127;

		[DllImport("gdi32", CharSet = CharSet.Auto, EntryPoint = "CreateCompatibleBitmap", ExactSpelling = true, SetLastError = true)]
		public static extern IntPtr IntCreateCompatibleBitmap(HandleRef hDC, int width, int height);

		public static IntPtr CreateCompatibleBitmap(HandleRef hDC, int width, int height)
		{
			return System.Internal.HandleCollector.Add(IntCreateCompatibleBitmap(hDC, width, height), CommonHandles.GDI);
		}

		[DllImport("gdi32", CharSet = CharSet.Auto, ExactSpelling = true, SetLastError = true)]
		public static extern int BitBlt(HandleRef hDC, int x, int y, int nWidth, int nHeight, HandleRef hSrcDC, int xSrc, int ySrc, int dwRop);

		[DllImport("gdi32")]
		public static extern int GetDIBits(HandleRef hdc, HandleRef hbm, int arg1, int arg2, IntPtr arg3, ref NativeMethods.BITMAPINFO_FLAT bmi, int arg5);

		[DllImport("gdi32")]
		public static extern uint GetPaletteEntries(HandleRef hpal, int iStartIndex, int nEntries, byte[] lppe);

		[DllImport("gdi32", CharSet = CharSet.Auto, EntryPoint = "CreateDIBSection", ExactSpelling = true, SetLastError = true)]
		public static extern IntPtr IntCreateDIBSection(HandleRef hdc, ref NativeMethods.BITMAPINFO_FLAT bmi, int iUsage, ref IntPtr ppvBits, IntPtr hSection, int dwOffset);

		public static IntPtr CreateDIBSection(HandleRef hdc, ref NativeMethods.BITMAPINFO_FLAT bmi, int iUsage, ref IntPtr ppvBits, IntPtr hSection, int dwOffset)
		{
			return System.Internal.HandleCollector.Add(IntCreateDIBSection(hdc, ref bmi, iUsage, ref ppvBits, hSection, dwOffset), CommonHandles.GDI);
		}

		[DllImport("kernel32", CharSet = CharSet.Auto, ExactSpelling = true, SetLastError = true)]
		public static extern IntPtr GlobalFree(HandleRef handle);

		[DllImport("gdi32", CharSet = CharSet.Auto, SetLastError = true)]
		public static extern int StartDoc(HandleRef hDC, DOCINFO lpDocInfo);

		[DllImport("gdi32", CharSet = CharSet.Auto, ExactSpelling = true, SetLastError = true)]
		public static extern int StartPage(HandleRef hDC);

		[DllImport("gdi32", CharSet = CharSet.Auto, ExactSpelling = true, SetLastError = true)]
		public static extern int EndPage(HandleRef hDC);

		[DllImport("gdi32", CharSet = CharSet.Auto, ExactSpelling = true, SetLastError = true)]
		public static extern int AbortDoc(HandleRef hDC);

		[DllImport("gdi32", CharSet = CharSet.Auto, ExactSpelling = true, SetLastError = true)]
		public static extern int EndDoc(HandleRef hDC);

		[DllImport("comdlg32.dll", CharSet = CharSet.Auto, SetLastError = true)]
		public static extern bool PrintDlg([In][Out] PRINTDLG lppd);

		[DllImport("comdlg32.dll", CharSet = CharSet.Auto, SetLastError = true)]
		public static extern bool PrintDlg([In][Out] PRINTDLGX86 lppd);

		[DllImport("winspool.drv", CharSet = CharSet.Auto, SetLastError = true)]
		public static extern int DeviceCapabilities(string pDevice, string pPort, short fwCapabilities, IntPtr pOutput, IntPtr pDevMode);

		[DllImport("winspool.drv", BestFitMapping = false, CharSet = CharSet.Auto, SetLastError = true)]
		public static extern int DocumentProperties(HandleRef hwnd, HandleRef hPrinter, string pDeviceName, IntPtr pDevModeOutput, HandleRef pDevModeInput, int fMode);

		[DllImport("winspool.drv", BestFitMapping = false, CharSet = CharSet.Auto, SetLastError = true)]
		public static extern int DocumentProperties(HandleRef hwnd, HandleRef hPrinter, string pDeviceName, IntPtr pDevModeOutput, IntPtr pDevModeInput, int fMode);

		[DllImport("winspool.drv", CharSet = CharSet.Auto, SetLastError = true)]
		public static extern int EnumPrinters(int flags, string name, int level, IntPtr pPrinterEnum, int cbBuf, out int pcbNeeded, out int pcReturned);

		[DllImport("kernel32", CharSet = CharSet.Auto, ExactSpelling = true, SetLastError = true)]
		public static extern IntPtr GlobalLock(HandleRef handle);

		[DllImport("gdi32", CharSet = CharSet.Auto, SetLastError = true)]
		public static extern IntPtr ResetDC(HandleRef hDC, HandleRef lpDevMode);

		[DllImport("kernel32", CharSet = CharSet.Auto, ExactSpelling = true, SetLastError = true)]
		public static extern bool GlobalUnlock(HandleRef handle);

		[DllImport("gdi32", CharSet = CharSet.Auto, EntryPoint = "CreateRectRgn", ExactSpelling = true, SetLastError = true)]
		private static extern IntPtr IntCreateRectRgn(int x1, int y1, int x2, int y2);

		public static IntPtr CreateRectRgn(int x1, int y1, int x2, int y2)
		{
			return System.Internal.HandleCollector.Add(IntCreateRectRgn(x1, y1, x2, y2), CommonHandles.GDI);
		}

		[DllImport("gdi32", CharSet = CharSet.Auto, ExactSpelling = true, SetLastError = true)]
		public static extern int GetClipRgn(HandleRef hDC, HandleRef hRgn);

		[DllImport("gdi32", CharSet = CharSet.Auto, ExactSpelling = true, SetLastError = true)]
		public static extern int SelectClipRgn(HandleRef hDC, HandleRef hRgn);

		[DllImport("gdi32", CharSet = CharSet.Auto, SetLastError = true)]
		public static extern int AddFontResourceEx(string lpszFilename, int fl, IntPtr pdv);

		public static int AddFontFile(string fileName)
		{
			return AddFontResourceEx(fileName, 16, IntPtr.Zero);
		}

		internal static IntPtr SaveClipRgn(IntPtr hDC)
		{
			IntPtr intPtr = CreateRectRgn(0, 0, 0, 0);
			IntPtr result = IntPtr.Zero;
			try
			{
				if (GetClipRgn(new HandleRef(null, hDC), new HandleRef(null, intPtr)) > 0)
				{
					result = intPtr;
					intPtr = IntPtr.Zero;
				}
			}
			finally
			{
				if (intPtr != IntPtr.Zero)
				{
					DeleteObject(new HandleRef(null, intPtr));
				}
			}
			return result;
		}

		internal static void RestoreClipRgn(IntPtr hDC, IntPtr hRgn)
		{
			try
			{
				SelectClipRgn(new HandleRef(null, hDC), new HandleRef(null, hRgn));
			}
			finally
			{
				if (hRgn != IntPtr.Zero)
				{
					DeleteObject(new HandleRef(null, hRgn));
				}
			}
		}

		[DllImport("gdi32", CharSet = CharSet.Auto, ExactSpelling = true, SetLastError = true)]
		public static extern int ExtEscape(HandleRef hDC, int nEscape, int cbInput, ref int inData, int cbOutput, out int outData);

		[DllImport("gdi32", CharSet = CharSet.Auto, ExactSpelling = true, SetLastError = true)]
		public static extern int ExtEscape(HandleRef hDC, int nEscape, int cbInput, byte[] inData, int cbOutput, out int outData);

		[DllImport("gdi32", CharSet = CharSet.Auto, ExactSpelling = true, SetLastError = true)]
		public static extern int IntersectClipRect(HandleRef hDC, int x1, int y1, int x2, int y2);

		[DllImport("kernel32", CharSet = CharSet.Auto, EntryPoint = "GlobalAlloc", ExactSpelling = true, SetLastError = true)]
		public static extern IntPtr IntGlobalAlloc(int uFlags, UIntPtr dwBytes);

		public static IntPtr GlobalAlloc(int uFlags, uint dwBytes)
		{
			return IntGlobalAlloc(uFlags, new UIntPtr(dwBytes));
		}

		internal unsafe static void ZeroMemory(byte* ptr, ulong length)
		{
			byte* ptr2 = ptr + length;
			while (ptr != ptr2)
			{
				*(ptr++) = 0;
			}
		}

		[DllImport("gdi32", CharSet = CharSet.Auto, EntryPoint = "DeleteObject", ExactSpelling = true, SetLastError = true)]
		internal static extern int IntDeleteObject(HandleRef hObject);

		public static int DeleteObject(HandleRef hObject)
		{
			System.Internal.HandleCollector.Remove((IntPtr)hObject, CommonHandles.GDI);
			return IntDeleteObject(hObject);
		}

		[DllImport("gdi32", CharSet = CharSet.Auto, ExactSpelling = true, SetLastError = true)]
		public static extern IntPtr SelectObject(HandleRef hdc, HandleRef obj);

		[DllImport("user32", EntryPoint = "CreateIconFromResourceEx", SetLastError = true)]
		private unsafe static extern IntPtr IntCreateIconFromResourceEx(byte* pbIconBits, int cbIconBits, bool fIcon, int dwVersion, int csDesired, int cyDesired, int flags);

		public unsafe static IntPtr CreateIconFromResourceEx(byte* pbIconBits, int cbIconBits, bool fIcon, int dwVersion, int csDesired, int cyDesired, int flags)
		{
			return System.Internal.HandleCollector.Add(IntCreateIconFromResourceEx(pbIconBits, cbIconBits, fIcon, dwVersion, csDesired, cyDesired, flags), CommonHandles.Icon);
		}

		[DllImport("shell32.dll", BestFitMapping = false, CharSet = CharSet.Auto, EntryPoint = "ExtractAssociatedIcon")]
		public static extern IntPtr IntExtractAssociatedIcon(HandleRef hInst, StringBuilder iconPath, ref int index);

		public static IntPtr ExtractAssociatedIcon(HandleRef hInst, StringBuilder iconPath, ref int index)
		{
			return System.Internal.HandleCollector.Add(IntExtractAssociatedIcon(hInst, iconPath, ref index), CommonHandles.Icon);
		}

		[DllImport("user32", CharSet = CharSet.Auto, EntryPoint = "LoadIcon", SetLastError = true)]
		private static extern IntPtr IntLoadIcon(HandleRef hInst, IntPtr iconId);

		public static IntPtr LoadIcon(HandleRef hInst, int iconId)
		{
			return IntLoadIcon(hInst, new IntPtr(iconId));
		}

		[DllImport("user32", CharSet = CharSet.Auto, EntryPoint = "DestroyIcon", ExactSpelling = true, SetLastError = true)]
		private static extern bool IntDestroyIcon(HandleRef hIcon);

		public static bool DestroyIcon(HandleRef hIcon)
		{
			System.Internal.HandleCollector.Remove((IntPtr)hIcon, CommonHandles.Icon);
			return IntDestroyIcon(hIcon);
		}

		[DllImport("user32", CharSet = CharSet.Auto, EntryPoint = "CopyImage", ExactSpelling = true, SetLastError = true)]
		private static extern IntPtr IntCopyImage(HandleRef hImage, int uType, int cxDesired, int cyDesired, int fuFlags);

		public static IntPtr CopyImage(HandleRef hImage, int uType, int cxDesired, int cyDesired, int fuFlags)
		{
			return System.Internal.HandleCollector.Add(type: (uType != 1) ? CommonHandles.GDI : CommonHandles.Icon, handle: IntCopyImage(hImage, uType, cxDesired, cyDesired, fuFlags));
		}

		[DllImport("gdi32", CharSet = CharSet.Auto, SetLastError = true)]
		public static extern int GetObject(HandleRef hObject, int nSize, [In][Out] BITMAP bm);

		[DllImport("gdi32", CharSet = CharSet.Auto, SetLastError = true)]
		public static extern int GetObject(HandleRef hObject, int nSize, [In][Out] LOGFONT lf);

		public static int GetObject(HandleRef hObject, LOGFONT lp)
		{
			return GetObject(hObject, Marshal.SizeOf(typeof(LOGFONT)), lp);
		}

		[DllImport("user32", CharSet = CharSet.Auto, ExactSpelling = true, SetLastError = true)]
		public static extern bool GetIconInfo(HandleRef hIcon, [In][Out] ICONINFO info);

		[DllImport("user32", CharSet = CharSet.Auto, ExactSpelling = true, SetLastError = true)]
		public static extern bool DrawIconEx(HandleRef hDC, int x, int y, HandleRef hIcon, int width, int height, int iStepIfAniCursor, HandleRef hBrushFlickerFree, int diFlags);

		[DllImport("oleaut32.dll", PreserveSig = false)]
		public static extern IPicture OleCreatePictureIndirect(PICTDESC pictdesc, [In] ref Guid refiid, bool fOwn);
	}
	public interface IDeviceContext : IDisposable
	{
		IntPtr GetHdc();

		void ReleaseHdc();
	}
	internal class NativeMethods
	{
		internal struct BITMAPINFO_FLAT
		{
			public int bmiHeader_biSize;

			public int bmiHeader_biWidth;

			public int bmiHeader_biHeight;

			public short bmiHeader_biPlanes;

			public short bmiHeader_biBitCount;

			public int bmiHeader_biCompression;

			public int bmiHeader_biSizeImage;

			public int bmiHeader_biXPelsPerMeter;

			public int bmiHeader_biYPelsPerMeter;

			public int bmiHeader_biClrUsed;

			public int bmiHeader_biClrImportant;

			[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1024)]
			public byte[] bmiColors;
		}

		[StructLayout(LayoutKind.Sequential)]
		internal class BITMAPINFOHEADER
		{
			public int biSize = 40;

			public int biWidth;

			public int biHeight;

			public short biPlanes;

			public short biBitCount;

			public int biCompression;

			public int biSizeImage;

			public int biXPelsPerMeter;

			public int biYPelsPerMeter;

			public int biClrUsed;

			public int biClrImportant;
		}

		internal struct PALETTEENTRY
		{
			public byte peRed;

			public byte peGreen;

			public byte peBlue;

			public byte peFlags;
		}

		internal struct RGBQUAD
		{
			public byte rgbBlue;

			public byte rgbGreen;

			public byte rgbRed;

			public byte rgbReserved;
		}

		[StructLayout(LayoutKind.Sequential)]
		internal class NONCLIENTMETRICS
		{
			public int cbSize = Marshal.SizeOf(typeof(NONCLIENTMETRICS));

			public int iBorderWidth;

			public int iScrollWidth;

			public int iScrollHeight;

			public int iCaptionWidth;

			public int iCaptionHeight;

			[MarshalAs(UnmanagedType.Struct)]
			public SafeNativeMethods.LOGFONT lfCaptionFont;

			public int iSmCaptionWidth;

			public int iSmCaptionHeight;

			[MarshalAs(UnmanagedType.Struct)]
			public SafeNativeMethods.LOGFONT lfSmCaptionFont;

			public int iMenuWidth;

			public int iMenuHeight;

			[MarshalAs(UnmanagedType.Struct)]
			public SafeNativeMethods.LOGFONT lfMenuFont;

			[MarshalAs(UnmanagedType.Struct)]
			public SafeNativeMethods.LOGFONT lfStatusFont;

			[MarshalAs(UnmanagedType.Struct)]
			public SafeNativeMethods.LOGFONT lfMessageFont;
		}

		internal static HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero);

		public const int MAX_PATH = 260;

		internal const int SM_REMOTESESSION = 4096;

		internal const int OBJ_DC = 3;

		internal const int OBJ_METADC = 4;

		internal const int OBJ_MEMDC = 10;

		internal const int OBJ_ENHMETADC = 12;

		internal const int DIB_RGB_COLORS = 0;

		internal const int BI_BITFIELDS = 3;

		internal const int BI_RGB = 0;

		internal const int BITMAPINFO_MAX_COLORSIZE = 256;

		internal const int SPI_GETICONTITLELOGFONT = 31;

		internal const int SPI_GETNONCLIENTMETRICS = 41;

		internal const int DEFAULT_GUI_FONT = 17;
	}
	public enum RotateFlipType
	{
		RotateNoneFlipNone = 0,
		Rotate90FlipNone = 1,
		Rotate180FlipNone = 2,
		Rotate270FlipNone = 3,
		RotateNoneFlipX = 4,
		Rotate90FlipX = 5,
		Rotate180FlipX = 6,
		Rotate270FlipX = 7,
		RotateNoneFlipY = 6,
		Rotate90FlipY = 7,
		Rotate180FlipY = 4,
		Rotate270FlipY = 5,
		RotateNoneFlipXY = 2,
		Rotate90FlipXY = 3,
		Rotate180FlipXY = 0,
		Rotate270FlipXY = 1
	}
	public sealed class SolidBrush : Brush
	{
		private Color _color = Color.Empty;

		private bool _immutable;

		public Color Color
		{
			get
			{
				if (_color == Color.Empty)
				{
					SafeNativeMethods.Gdip.CheckStatus(GDIPlus.GdipGetSolidFillColor(new HandleRef(this, base.NativeBrush), out var color));
					_color = Color.FromArgb(color);
				}
				return _color;
			}
			set
			{
				if (_immutable)
				{
					throw new ArgumentException(SR.Format("Changes cannot be made to {0} because permissions are not valid.", "Brush"));
				}
				if (_color != value)
				{
					_ = _color;
					InternalSetColor(value);
				}
			}
		}

		public SolidBrush(Color color)
		{
			_color = color;
			IntPtr brush = IntPtr.Zero;
			SafeNativeMethods.Gdip.CheckStatus(GDIPlus.GdipCreateSolidFill(_color.ToArgb(), out brush));
			SetNativeBrushInternal(brush);
		}

		internal SolidBrush(Color color, bool immutable)
			: this(color)
		{
			_immutable = immutable;
		}

		internal SolidBrush(IntPtr nativeBrush)
		{
			SetNativeBrushInternal(nativeBrush);
		}

		public override object Clone()
		{
			IntPtr clonedBrush = IntPtr.Zero;
			SafeNativeMethods.Gdip.CheckStatus(GDIPlus.GdipCloneBrush(new HandleRef(this, base.NativeBrush), out clonedBrush));
			return new SolidBrush(clonedBrush);
		}

		protected override void Dispose(bool disposing)
		{
			if (!disposing)
			{
				_immutable = false;
			}
			else if (_immutable)
			{
				throw new ArgumentException(SR.Format("Changes cannot be made to {0} because permissions are not valid.", "Brush"));
			}
			base.Dispose(disposing);
		}

		private void InternalSetColor(Color value)
		{
			SafeNativeMethods.Gdip.CheckStatus(GDIPlus.GdipSetSolidFillColor(new HandleRef(this, base.NativeBrush), value.ToArgb()));
			_color = value;
		}
	}
	public enum StringAlignment
	{
		Near,
		Center,
		Far
	}
	public enum StringDigitSubstitute
	{
		User,
		None,
		National,
		Traditional
	}
	[Flags]
	public enum StringFormatFlags
	{
		DirectionRightToLeft = 1,
		DirectionVertical = 2,
		FitBlackBox = 4,
		DisplayFormatControl = 0x20,
		NoFontFallback = 0x400,
		MeasureTrailingSpaces = 0x800,
		NoWrap = 0x1000,
		LineLimit = 0x2000,
		NoClip = 0x4000
	}
	public enum StringTrimming
	{
		None,
		Character,
		Word,
		EllipsisCharacter,
		EllipsisWord,
		EllipsisPath
	}
	public enum StringUnit
	{
		World = 0,
		Display = 1,
		Pixel = 2,
		Point = 3,
		Inch = 4,
		Document = 5,
		Millimeter = 6,
		Em = 32
	}
	public static class SystemBrushes
	{
		private static readonly object s_systemBrushesKey = new object();

		public static Brush ActiveBorder => FromSystemColor(SystemColors.ActiveBorder);

		public static Brush ActiveCaption => FromSystemColor(SystemColors.ActiveCaption);

		public static Brush ActiveCaptionText => FromSystemColor(SystemColors.ActiveCaptionText);

		public static Brush AppWorkspace => FromSystemColor(SystemColors.AppWorkspace);

		public static Brush ButtonFace => FromSystemColor(SystemColors.ButtonFace);

		public static Brush ButtonHighlight => FromSystemColor(SystemColors.ButtonHighlight);

		public static Brush ButtonShadow => FromSystemColor(SystemColors.ButtonShadow);

		public static Brush Control => FromSystemColor(SystemColors.Control);

		public static Brush ControlLightLight => FromSystemColor(SystemColors.ControlLightLight);

		public static Brush ControlLight => FromSystemColor(SystemColors.ControlLight);

		public static Brush ControlDark => FromSystemColor(SystemColors.ControlDark);

		public static Brush ControlDarkDark => FromSystemColor(SystemColors.ControlDarkDark);

		public static Brush ControlText => FromSystemColor(SystemColors.ControlText);

		public static Brush Desktop => FromSystemColor(SystemColors.Desktop);

		public static Brush GradientActiveCaption => FromSystemColor(SystemColors.GradientActiveCaption);

		public static Brush GradientInactiveCaption => FromSystemColor(SystemColors.GradientInactiveCaption);

		public static Brush GrayText => FromSystemColor(SystemColors.GrayText);

		public static Brush Highlight => FromSystemColor(SystemColors.Highlight);

		public static Brush HighlightText => FromSystemColor(SystemColors.HighlightText);

		public static Brush HotTrack => FromSystemColor(SystemColors.HotTrack);

		public static Brush InactiveCaption => FromSystemColor(SystemColors.InactiveCaption);

		public static Brush InactiveBorder => FromSystemColor(SystemColors.InactiveBorder);

		public static Brush InactiveCaptionText => FromSystemColor(SystemColors.InactiveCaptionText);

		public static Brush Info => FromSystemColor(SystemColors.Info);

		public static Brush InfoText => FromSystemColor(SystemColors.InfoText);

		public static Brush Menu => FromSystemColor(SystemColors.Menu);

		public static Brush MenuBar => FromSystemColor(SystemColors.MenuBar);

		public static Brush MenuHighlight => FromSystemColor(SystemColors.MenuHighlight);

		public static Brush MenuText => FromSystemColor(SystemColors.MenuText);

		public static Brush ScrollBar => FromSystemColor(SystemColors.ScrollBar);

		public static Brush Window => FromSystemColor(SystemColors.Window);

		public static Brush WindowFrame => FromSystemColor(SystemColors.WindowFrame);

		public static Brush WindowText => FromSystemColor(SystemColors.WindowText);

		public static Brush FromSystemColor(Color c)
		{
			if (!c.IsSystemColor())
			{
				throw new ArgumentException(SR.Format("The color {0} is not a system color.", c.ToString()));
			}
			Brush[] array = (Brush[])SafeNativeMethods.Gdip.ThreadData[s_systemBrushesKey];
			if (array == null)
			{
				array = new Brush[33];
				SafeNativeMethods.Gdip.ThreadData[s_systemBrushesKey] = array;
			}
			int num = (int)c.ToKnownColor();
			if (num > 167)
			{
				num -= 141;
			}
			num--;
			if (array[num] == null)
			{
				array[num] = new SolidBrush(c, immutable: true);
			}
			return array[num];
		}

		internal SystemBrushes()
		{
			ThrowStub.ThrowNotSupportedException();
		}
	}
	public sealed class TextureBrush : Brush
	{
		public Matrix Transform
		{
			get
			{
				Matrix matrix = new Matrix();
				SafeNativeMethods.Gdip.CheckStatus(GDIPlus.GdipGetTextureTransform(new HandleRef(this, base.NativeBrush), new HandleRef(matrix, matrix.nativeMatrix)));
				return matrix;
			}
			set
			{
				if (value == null)
				{
					throw new ArgumentNullException("value");
				}
				SafeNativeMethods.Gdip.CheckStatus(GDIPlus.GdipSetTextureTransform(new HandleRef(this, base.NativeBrush), new HandleRef(value, value.nativeMatrix)));
			}
		}

		public WrapMode WrapMode
		{
			get
			{
				int wrapMode = 0;
				SafeNativeMethods.Gdip.CheckStatus(GDIPlus.GdipGetTextureWrapMode(new HandleRef(this, base.NativeBrush), out wrapMode));
				return (WrapMode)wrapMode;
			}
			set
			{
				if (value < WrapMode.Tile || value > WrapMode.Clamp)
				{
					throw new InvalidEnumArgumentException("value", (int)value, typeof(WrapMode));
				}
				SafeNativeMethods.Gdip.CheckStatus(GDIPlus.GdipSetTextureWrapMode(new HandleRef(this, base.NativeBrush), (int)value));
			}
		}

		public Image Image
		{
			get
			{
				SafeNativeMethods.Gdip.CheckStatus(GDIPlus.GdipGetTextureImage(new HandleRef(this, base.NativeBrush), out var image));
				return Image.CreateImageObject(image);
			}
		}

		public TextureBrush(Image bitmap)
			: this(bitmap, WrapMode.Tile)
		{
		}

		public TextureBrush(Image image, WrapMode wrapMode)
		{
			if (image == null)
			{
				throw new ArgumentNullException("image");
			}
			if (wrapMode < WrapMode.Tile || wrapMode > WrapMode.Clamp)
			{
				throw new InvalidEnumArgumentException("wrapMode", (int)wrapMode, typeof(WrapMode));
			}
			IntPtr texture = IntPtr.Zero;
			SafeNativeMethods.Gdip.CheckStatus(GDIPlus.GdipCreateTexture(new HandleRef(image, image.nativeImage), (int)wrapMode, out texture));
			SetNativeBrushInternal(texture);
		}

		public TextureBrush(Image image, WrapMode wrapMode, RectangleF dstRect)
		{
			if (image == null)
			{
				throw new ArgumentNullException("image");
			}
			if (wrapMode < WrapMode.Tile || wrapMode > WrapMode.Clamp)
			{
				throw new InvalidEnumArgumentException("wrapMode", (int)wrapMode, typeof(WrapMode));
			}
			IntPtr texture = IntPtr.Zero;
			SafeNativeMethods.Gdip.CheckStatus(GDIPlus.GdipCreateTexture2(new HandleRef(image, image.nativeImage), (int)wrapMode, dstRect.X, dstRect.Y, dstRect.Width, dstRect.Height, out texture));
			SetNativeBrushInternal(texture);
		}

		public TextureBrush(Image image, WrapMode wrapMode, Rectangle dstRect)
		{
			if (image == null)
			{
				throw new ArgumentNullException("image");
			}
			if (wrapMode < WrapMode.Tile || wrapMode > WrapMode.Clamp)
			{
				throw new InvalidEnumArgumentException("wrapMode", (int)wrapMode, typeof(WrapMode));
			}
			IntPtr texture = IntPtr.Zero;
			SafeNativeMethods.Gdip.CheckStatus(GDIPlus.GdipCreateTexture2I(new HandleRef(image, image.nativeImage), (int)wrapMode, dstRect.X, dstRect.Y, dstRect.Width, dstRect.Height, out texture));
			SetNativeBrushInternal(texture);
		}

		public TextureBrush(Image image, RectangleF dstRect)
			: this(image, dstRect, null)
		{
		}

		public TextureBrush(Image image, RectangleF dstRect, ImageAttributes imageAttr)
		{
			if (image == null)
			{
				throw new ArgumentNullException("image");
			}
			IntPtr texture = IntPtr.Zero;
			SafeNativeMethods.Gdip.CheckStatus(GDIPlus.GdipCreateTextureIA(new HandleRef(image, image.nativeImage), new HandleRef(imageAttr, imageAttr?.nativeImageAttributes ?? IntPtr.Zero), dstRect.X, dstRect.Y, dstRect.Width, dstRect.Height, out texture));
			SetNativeBrushInternal(texture);
		}

		public TextureBrush(Image image, Rectangle dstRect)
			: this(image, dstRect, null)
		{
		}

		public TextureBrush(Image image, Rectangle dstRect, ImageAttributes imageAttr)
		{
			if (image == null)
			{
				throw new ArgumentNullException("image");
			}
			IntPtr texture = IntPtr.Zero;
			SafeNativeMethods.Gdip.CheckStatus(GDIPlus.GdipCreateTextureIAI(new HandleRef(image, image.nativeImage), new HandleRef(imageAttr, imageAttr?.nativeImageAttributes ?? IntPtr.Zero), dstRect.X, dstRect.Y, dstRect.Width, dstRect.Height, out texture));
			SetNativeBrushInternal(texture);
		}

		internal TextureBrush(IntPtr nativeBrush)
		{
			SetNativeBrushInternal(nativeBrush);
		}

		public override object Clone()
		{
			IntPtr clonedBrush = IntPtr.Zero;
			SafeNativeMethods.Gdip.CheckStatus(GDIPlus.GdipCloneBrush(new HandleRef(this, base.NativeBrush), out clonedBrush));
			return new TextureBrush(clonedBrush);
		}

		public void ResetTransform()
		{
			SafeNativeMethods.Gdip.CheckStatus(GDIPlus.GdipResetTextureTransform(new HandleRef(this, base.NativeBrush)));
		}

		public void MultiplyTransform(Matrix matrix)
		{
			MultiplyTransform(matrix, MatrixOrder.Prepend);
		}

		public void MultiplyTransform(Matrix matrix, MatrixOrder order)
		{
			if (matrix == null)
			{
				throw new ArgumentNullException("matrix");
			}
			if (!(matrix.nativeMatrix == IntPtr.Zero))
			{
				SafeNativeMethods.Gdip.CheckStatus(GDIPlus.GdipMultiplyTextureTransform(new HandleRef(this, base.NativeBrush), new HandleRef(matrix, matrix.nativeMatrix), order));
			}
		}

		public void TranslateTransform(float dx, float dy)
		{
			TranslateTransform(dx, dy, MatrixOrder.Prepend);
		}

		public void TranslateTransform(float dx, float dy, MatrixOrder order)
		{
			SafeNativeMethods.Gdip.CheckStatus(GDIPlus.GdipTranslateTextureTransform(new HandleRef(this, base.NativeBrush), dx, dy, order));
		}

		public void ScaleTransform(float sx, float sy)
		{
			ScaleTransform(sx, sy, MatrixOrder.Prepend);
		}

		public void ScaleTransform(float sx, float sy, MatrixOrder order)
		{
			SafeNativeMethods.Gdip.CheckStatus(GDIPlus.GdipScaleTextureTransform(new HandleRef(this, base.NativeBrush), sx, sy, order));
		}

		public void RotateTransform(float angle)
		{
			RotateTransform(angle, MatrixOrder.Prepend);
		}

		public void RotateTransform(float angle, MatrixOrder order)
		{
			SafeNativeMethods.Gdip.CheckStatus(GDIPlus.GdipRotateTextureTransform(new HandleRef(this, base.NativeBrush), angle, order));
		}
	}
	[SuppressUnmanagedCodeSecurity]
	internal class UnsafeNativeMethods
	{
		[ComImport]
		[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
		[Guid("0000000C-0000-0000-C000-000000000046")]
		public interface IStream
		{
			int Read([In] IntPtr buf, [In] int len);

			int Write([In] IntPtr buf, [In] int len);

			[return: MarshalAs(UnmanagedType.I8)]
			long Seek([In][MarshalAs(UnmanagedType.I8)] long dlibMove, [In] int dwOrigin);

			void SetSize([In][MarshalAs(UnmanagedType.I8)] long libNewSize);

			[return: MarshalAs(UnmanagedType.I8)]
			long CopyTo([In][MarshalAs(UnmanagedType.Interface)] IStream pstm, [In][MarshalAs(UnmanagedType.I8)] long cb, [Out][MarshalAs(UnmanagedType.LPArray)] long[] pcbRead);

			void Commit([In] int grfCommitFlags);

			void Revert();

			void LockRegion([In][MarshalAs(UnmanagedType.I8)] long libOffset, [In][MarshalAs(UnmanagedType.I8)] long cb, [In] int dwLockType);

			void UnlockRegion([In][MarshalAs(UnmanagedType.I8)] long libOffset, [In][MarshalAs(UnmanagedType.I8)] long cb, [In] int dwLockType);

			void Stat([In] IntPtr pStatstg, [In] int grfStatFlag);

			[return: MarshalAs(UnmanagedType.Interface)]
			IStream Clone();
		}

		internal class ComStreamFromDataStream : IStream
		{
			protected Stream dataStream;

			private long _virtualPosition = -1L;

			internal ComStreamFromDataStream(Stream dataStream)
			{
				this.dataStream = dataStream ?? throw new ArgumentNullException("dataStream");
			}

			private void ActualizeVirtualPosition()
			{
				if (_virtualPosition != -1)
				{
					if (_virtualPosition > dataStream.Length)
					{
						dataStream.SetLength(_virtualPosition);
					}
					dataStream.Position = _virtualPosition;
					_virtualPosition = -1L;
				}
			}

			public virtual IStream Clone()
			{
				NotImplemented();
				return null;
			}

			public virtual void Commit(int grfCommitFlags)
			{
				dataStream.Flush();
				ActualizeVirtualPosition();
			}

			public virtual long CopyTo(IStream pstm, long cb, long[] pcbRead)
			{
				int num = 4096;
				IntPtr intPtr = Marshal.AllocHGlobal(num);
				if (intPtr == IntPtr.Zero)
				{
					throw new OutOfMemoryException();
				}
				long num2 = 0L;
				try
				{
					int num4;
					for (; num2 < cb; num2 += num4)
					{
						int num3 = num;
						if (num2 + num3 > cb)
						{
							num3 = (int)(cb - num2);
						}
						num4 = Read(intPtr, num3);
						if (num4 == 0)
						{
							break;
						}
						if (pstm.Write(intPtr, num4) != num4)
						{
							throw EFail("Wrote an incorrect number of bytes");
						}
					}
				}
				finally
				{
					Marshal.FreeHGlobal(intPtr);
				}
				if (pcbRead != null && pcbRead.Length != 0)
				{
					pcbRead[0] = num2;
				}
				return num2;
			}

			public virtual void LockRegion(long libOffset, long cb, int dwLockType)
			{
			}

			protected static ExternalException EFail(string msg)
			{
				throw new ExternalException(msg, -2147467259);
			}

			protected static void NotImplemented()
			{
				throw new ExternalException(SR.Format("Not implemented."), -2147467263);
			}

			public virtual int Read(IntPtr buf, int length)
			{
				byte[] array = new byte[length];
				int result = Read(array, length);
				Marshal.Copy(array, 0, buf, length);
				return result;
			}

			public virtual int Read(byte[] buffer, int length)
			{
				ActualizeVirtualPosition();
				return dataStream.Read(buffer, 0, length);
			}

			public virtual void Revert()
			{
				NotImplemented();
			}

			public virtual long Seek(long offset, int origin)
			{
				long num = _virtualPosition;
				if (_virtualPosition == -1)
				{
					num = dataStream.Position;
				}
				long length = dataStream.Length;
				switch (origin)
				{
				case 0:
					if (offset <= length)
					{
						dataStream.Position = offset;
						_virtualPosition = -1L;
					}
					else
					{
						_virtualPosition = offset;
					}
					break;
				case 2:
					if (offset <= 0)
					{
						dataStream.Position = length + offset;
						_virtualPosition = -1L;
					}
					else
					{
						_virtualPosition = length + offset;
					}
					break;
				case 1:
					if (offset + num <= length)
					{
						dataStream.Position = num + offset;
						_virtualPosition = -1L;
					}
					else
					{
						_virtualPosition = offset + num;
					}
					break;
				}
				if (_virtualPosition != -1)
				{
					return _virtualPosition;
				}
				return dataStream.Position;
			}

			public virtual void SetSize(long value)
			{
				dataStream.SetLength(value);
			}

			public virtual void Stat(IntPtr pstatstg, int grfStatFlag)
			{
				NotImplemented();
			}

			public virtual void UnlockRegion(long libOffset, long cb, int dwLockType)
			{
			}

			public virtual int Write(IntPtr buf, int length)
			{
				byte[] array = new byte[length];
				Marshal.Copy(buf, array, 0, length);
				return Write(array, length);
			}

			public virtual int Write(byte[] buffer, int length)
			{
				ActualizeVirtualPosition();
				dataStream.Write(buffer, 0, length);
				return length;
			}
		}

		[DllImport("kernel32", CharSet = CharSet.Auto, EntryPoint = "RtlMoveMemory", ExactSpelling = true, SetLastError = true)]
		public static extern void CopyMemory(HandleRef destData, HandleRef srcData, int size);

		[DllImport("user32", CharSet = CharSet.Auto, EntryPoint = "GetDC", ExactSpelling = true, SetLastError = true)]
		private static extern IntPtr IntGetDC(HandleRef hWnd);

		public static IntPtr GetDC(HandleRef hWnd)
		{
			return System.Internal.HandleCollector.Add(IntGetDC(hWnd), SafeNativeMethods.CommonHandles.HDC);
		}

		[DllImport("gdi32", CharSet = CharSet.Auto, EntryPoint = "DeleteDC", ExactSpelling = true, SetLastError = true)]
		private static extern bool IntDeleteDC(HandleRef hDC);

		public static bool DeleteDC(HandleRef hDC)
		{
			System.Internal.HandleCollector.Remove((IntPtr)hDC, SafeNativeMethods.CommonHandles.GDI);
			return IntDeleteDC(hDC);
		}

		[DllImport("user32", CharSet = CharSet.Auto, EntryPoint = "ReleaseDC", ExactSpelling = true, SetLastError = true)]
		private static extern int IntReleaseDC(HandleRef hWnd, HandleRef hDC);

		public static int ReleaseDC(HandleRef hWnd, HandleRef hDC)
		{
			System.Internal.HandleCollector.Remove((IntPtr)hDC, SafeNativeMethods.CommonHandles.HDC);
			return IntReleaseDC(hWnd, hDC);
		}

		[DllImport("gdi32", CharSet = CharSet.Auto, EntryPoint = "CreateCompatibleDC", ExactSpelling = true, SetLastError = true)]
		private static extern IntPtr IntCreateCompatibleDC(HandleRef hDC);

		public static IntPtr CreateCompatibleDC(HandleRef hDC)
		{
			return System.Internal.HandleCollector.Add(IntCreateCompatibleDC(hDC), SafeNativeMethods.CommonHandles.GDI);
		}

		[DllImport("gdi32", CharSet = CharSet.Auto, ExactSpelling = true, SetLastError = true)]
		public static extern IntPtr GetStockObject(int nIndex);

		[DllImport("kernel32", CharSet = CharSet.Auto, SetLastError = true)]
		public static extern int GetSystemDefaultLCID();

		[DllImport("user32", CharSet = CharSet.Auto, ExactSpelling = true, SetLastError = true)]
		public static extern int GetSystemMetrics(int nIndex);

		[DllImport("user32", BestFitMapping = false, CharSet = CharSet.Auto, SetLastError = true)]
		public static extern bool SystemParametersInfo(int uiAction, int uiParam, [In][Out] NativeMethods.NONCLIENTMETRICS pvParam, int fWinIni);

		[DllImport("user32", BestFitMapping = false, CharSet = CharSet.Auto, SetLastError = true)]
		public static extern bool SystemParametersInfo(int uiAction, int uiParam, [In][Out] SafeNativeMethods.LOGFONT pvParam, int fWinIni);

		[DllImport("gdi32", CharSet = CharSet.Auto, ExactSpelling = true, SetLastError = true)]
		public static extern int GetDeviceCaps(HandleRef hDC, int nIndex);

		[DllImport("gdi32", CharSet = CharSet.Auto, ExactSpelling = true, SetLastError = true)]
		public static extern int GetObjectType(HandleRef hObject);
	}
	[Serializable]
	[ComVisible(true)]
	[Editor("System.Drawing.Design.BitmapEditor, System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))]
	public sealed class Bitmap : Image
	{
		private Bitmap()
		{
		}

		internal Bitmap(IntPtr ptr)
		{
			nativeObject = ptr;
		}

		internal Bitmap(IntPtr ptr, Stream stream)
		{
			if (GDIPlus.RunningOnWindows())
			{
				base.stream = stream;
			}
			nativeObject = ptr;
		}

		public Bitmap(int width, int height)
			: this(width, height, PixelFormat.Format32bppArgb)
		{
		}

		public Bitmap(int width, int height, Graphics g)
		{
			if (g == null)
			{
				throw new ArgumentNullException("g");
			}
			GDIPlus.CheckStatus(GDIPlus.GdipCreateBitmapFromGraphics(width, height, g.nativeObject, out var bitmap));
			nativeObject = bitmap;
		}

		public Bitmap(int width, int height, PixelFormat format)
		{
			GDIPlus.CheckStatus(GDIPlus.GdipCreateBitmapFromScan0(width, height, 0, format, IntPtr.Zero, out var bmp));
			nativeObject = bmp;
		}

		public Bitmap(Image original)
			: this(original, original.Width, original.Height)
		{
		}

		public Bitmap(Stream stream)
			: this(stream, useIcm: false)
		{
		}

		public Bitmap(string filename)
			: this(filename, useIcm: false)
		{
		}

		public Bitmap(Image original, Size newSize)
			: this(original, newSize.Width, newSize.Height)
		{
		}

		public Bitmap(Stream stream, bool useIcm)
		{
			nativeObject = Image.InitFromStream(stream);
		}

		public Bitmap(string filename, bool useIcm)
		{
			if (filename == null)
			{
				throw new ArgumentNullException("filename");
			}
			GDIPlus.CheckStatus((!useIcm) ? GDIPlus.GdipCreateBitmapFromFile(filename, out var bitmap) : GDIPlus.GdipCreateBitmapFromFileICM(filename, out bitmap));
			nativeObject = bitmap;
		}

		public Bitmap(Type type, string resource)
		{
			if (resource == null)
			{
				throw new ArgumentException("resource");
			}
			if (type == null)
			{
				throw new NullReferenceException();
			}
			Stream manifestResourceStream = type.GetTypeInfo().Assembly.GetManifestResourceStream(type, resource);
			if (manifestResourceStream == null)
			{
				throw new FileNotFoundException(Locale.GetText("Resource '{0}' was not found.", resource));
			}
			nativeObject = Image.InitFromStream(manifestResourceStream);
			if (GDIPlus.RunningOnWindows())
			{
				stream = manifestResourceStream;
			}
		}

		public Bitmap(Image original, int width, int height)
			: this(width, height, PixelFormat.Format32bppArgb)
		{
			Graphics graphics = Graphics.FromImage(this);
			graphics.DrawImage(original, 0, 0, width, height);
			graphics.Dispose();
		}

		public Bitmap(int width, int height, int stride, PixelFormat format, IntPtr scan0)
		{
			GDIPlus.CheckStatus(GDIPlus.GdipCreateBitmapFromScan0(width, height, stride, format, scan0, out var bmp));
			nativeObject = bmp;
		}

		private Bitmap(SerializationInfo info, StreamingContext context)
			: base(info, context)
		{
		}

		public Color GetPixel(int x, int y)
		{
			GDIPlus.CheckStatus(GDIPlus.GdipBitmapGetPixel(nativeObject, x, y, out var argb));
			return Color.FromArgb(argb);
		}

		public void SetPixel(int x, int y, Color color)
		{
			Status num = GDIPlus.GdipBitmapSetPixel(nativeObject, x, y, color.ToArgb());
			if (num == Status.InvalidParameter && (base.PixelFormat & PixelFormat.Indexed) != 0)
			{
				throw new InvalidOperationException(Locale.GetText("SetPixel cannot be called on indexed bitmaps."));
			}
			GDIPlus.CheckStatus(num);
		}

		public Bitmap Clone(Rectangle rect, PixelFormat format)
		{
			GDIPlus.CheckStatus(GDIPlus.GdipCloneBitmapAreaI(rect.X, rect.Y, rect.Width, rect.Height, format, nativeObject, out var bitmap));
			return new Bitmap(bitmap);
		}

		public Bitmap Clone(RectangleF rect, PixelFormat format)
		{
			GDIPlus.CheckStatus(GDIPlus.GdipCloneBitmapArea(rect.X, rect.Y, rect.Width, rect.Height, format, nativeObject, out var bitmap));
			return new Bitmap(bitmap);
		}

		public static Bitmap FromHicon(IntPtr hicon)
		{
			GDIPlus.CheckStatus(GDIPlus.GdipCreateBitmapFromHICON(hicon, out var bitmap));
			return new Bitmap(bitmap);
		}

		public static Bitmap FromResource(IntPtr hinstance, string bitmapName)
		{
			GDIPlus.CheckStatus(GDIPlus.GdipCreateBitmapFromResource(hinstance, bitmapName, out var bitmap));
			return new Bitmap(bitmap);
		}

		[EditorBrowsable(EditorBrowsableState.Advanced)]
		public IntPtr GetHbitmap()
		{
			return GetHbitmap(Color.Gray);
		}

		[EditorBrowsable(EditorBrowsableState.Advanced)]
		public IntPtr GetHbitmap(Color background)
		{
			GDIPlus.CheckStatus(GDIPlus.GdipCreateHBITMAPFromBitmap(nativeObject, out var HandleBmp, background.ToArgb()));
			return HandleBmp;
		}

		[EditorBrowsable(EditorBrowsableState.Advanced)]
		public IntPtr GetHicon()
		{
			GDIPlus.CheckStatus(GDIPlus.GdipCreateHICONFromBitmap(nativeObject, out var HandleIcon));
			return HandleIcon;
		}

		public BitmapData LockBits(Rectangle rect, ImageLockMode flags, PixelFormat format)
		{
			BitmapData bitmapData = new BitmapData();
			return LockBits(rect, flags, format, bitmapData);
		}

		public BitmapData LockBits(Rectangle rect, ImageLockMode flags, PixelFormat format, BitmapData bitmapData)
		{
			GDIPlus.CheckStatus(GDIPlus.GdipBitmapLockBits(nativeObject, ref rect, flags, format, bitmapData));
			return bitmapData;
		}

		public void MakeTransparent()
		{
			Color pixel = GetPixel(0, 0);
			MakeTransparent(pixel);
		}

		public void MakeTransparent(Color transparentColor)
		{
			Bitmap bitmap = new Bitmap(base.Width, base.Height, PixelFormat.Format32bppArgb);
			Graphics graphics = Graphics.FromImage(bitmap);
			Rectangle destRect = new Rectangle(0, 0, base.Width, base.Height);
			ImageAttributes imageAttributes = new ImageAttributes();
			imageAttributes.SetColorKey(transparentColor, transparentColor);
			graphics.DrawImage(this, destRect, 0, 0, base.Width, base.Height, GraphicsUnit.Pixel, imageAttributes);
			IntPtr intPtr = nativeObject;
			nativeObject = bitmap.nativeObject;
			bitmap.nativeObject = intPtr;
			graphics.Dispose();
			bitmap.Dispose();
			imageAttributes.Dispose();
		}

		public void SetResolution(float xDpi, float yDpi)
		{
			GDIPlus.CheckStatus(GDIPlus.GdipBitmapSetResolution(nativeObject, xDpi, yDpi));
		}

		public void UnlockBits(BitmapData bitmapdata)
		{
			GDIPlus.CheckStatus(GDIPlus.GdipBitmapUnlockBits(nativeObject, bitmapdata));
		}
	}
	public sealed class Brushes
	{
		private static SolidBrush aliceBlue;

		private static SolidBrush antiqueWhite;

		private static SolidBrush aqua;

		private static SolidBrush aquamarine;

		private static SolidBrush azure;

		private static SolidBrush beige;

		private static SolidBrush bisque;

		private static SolidBrush black;

		private static SolidBrush blanchedAlmond;

		private static SolidBrush blue;

		private static SolidBrush blueViolet;

		private static SolidBrush brown;

		private static SolidBrush burlyWood;

		private static SolidBrush cadetBlue;

		private static SolidBrush chartreuse;

		private static SolidBrush chocolate;

		private static SolidBrush coral;

		private static SolidBrush cornflowerBlue;

		private static SolidBrush cornsilk;

		private static SolidBrush crimson;

		private static SolidBrush cyan;

		private static SolidBrush darkBlue;

		private static SolidBrush darkCyan;

		private static SolidBrush darkGoldenrod;

		private static SolidBrush darkGray;

		private static SolidBrush darkGreen;

		private static SolidBrush darkKhaki;

		private static SolidBrush darkMagenta;

		private static SolidBrush darkOliveGreen;

		private static SolidBrush darkOrange;

		private static SolidBrush darkOrchid;

		private static SolidBrush darkRed;

		private static SolidBrush darkSalmon;

		private static SolidBrush darkSeaGreen;

		private static SolidBrush darkSlateBlue;

		private static SolidBrush darkSlateGray;

		private static SolidBrush darkTurquoise;

		private static SolidBrush darkViolet;

		private static SolidBrush deepPink;

		private static SolidBrush deepSkyBlue;

		private static SolidBrush dimGray;

		private static SolidBrush dodgerBlue;

		private static SolidBrush firebrick;

		private static SolidBrush floralWhite;

		private static SolidBrush forestGreen;

		private static SolidBrush fuchsia;

		private static SolidBrush gainsboro;

		private static SolidBrush ghostWhite;

		private static SolidBrush gold;

		private static SolidBrush goldenrod;

		private static SolidBrush gray;

		private static SolidBrush green;

		private static SolidBrush greenYellow;

		private static SolidBrush honeydew;

		private static SolidBrush hotPink;

		private static SolidBrush indianRed;

		private static SolidBrush indigo;

		private static SolidBrush ivory;

		private static SolidBrush khaki;

		private static SolidBrush lavender;

		private static SolidBrush lavenderBlush;

		private static SolidBrush lawnGreen;

		private static SolidBrush lemonChiffon;

		private static SolidBrush lightBlue;

		private static SolidBrush lightCoral;

		private static SolidBrush lightCyan;

		private static SolidBrush lightGoldenrodYellow;

		private static SolidBrush lightGray;

		private static SolidBrush lightGreen;

		private static SolidBrush lightPink;

		private static SolidBrush lightSalmon;

		private static SolidBrush lightSeaGreen;

		private static SolidBrush lightSkyBlue;

		private static SolidBrush lightSlateGray;

		private static SolidBrush lightSteelBlue;

		private static SolidBrush lightYellow;

		private static SolidBrush lime;

		private static SolidBrush limeGreen;

		private static SolidBrush linen;

		private static SolidBrush magenta;

		private static SolidBrush maroon;

		private static SolidBrush mediumAquamarine;

		private static SolidBrush mediumBlue;

		private static SolidBrush mediumOrchid;

		private static SolidBrush mediumPurple;

		private static SolidBrush mediumSeaGreen;

		private static SolidBrush mediumSlateBlue;

		private static SolidBrush mediumSpringGreen;

		private static SolidBrush mediumTurquoise;

		private static SolidBrush mediumVioletRed;

		private static SolidBrush midnightBlue;

		private static SolidBrush mintCream;

		private static SolidBrush mistyRose;

		private static SolidBrush moccasin;

		private static SolidBrush navajoWhite;

		private static SolidBrush navy;

		private static SolidBrush oldLace;

		private static SolidBrush olive;

		private static SolidBrush oliveDrab;

		private static SolidBrush orange;

		private static SolidBrush orangeRed;

		private static SolidBrush orchid;

		private static SolidBrush paleGoldenrod;

		private static SolidBrush paleGreen;

		private static SolidBrush paleTurquoise;

		private static SolidBrush paleVioletRed;

		private static SolidBrush papayaWhip;

		private static SolidBrush peachPuff;

		private static SolidBrush peru;

		private static SolidBrush pink;

		private static SolidBrush plum;

		private static SolidBrush powderBlue;

		private static SolidBrush purple;

		private static SolidBrush red;

		private static SolidBrush rosyBrown;

		private static SolidBrush royalBlue;

		private static SolidBrush saddleBrown;

		private static SolidBrush salmon;

		private static SolidBrush sandyBrown;

		private static SolidBrush seaGreen;

		private static SolidBrush seaShell;

		private static SolidBrush sienna;

		private static SolidBrush silver;

		private static SolidBrush skyBlue;

		private static SolidBrush slateBlue;

		private static SolidBrush slateGray;

		private static SolidBrush snow;

		private static SolidBrush springGreen;

		private static SolidBrush steel

Room Architect Tool_Data/Managed/System.EnterpriseServices.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Diagnostics;
using System.EnterpriseServices;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Transactions;
using Unity;

[assembly: ComVisible(true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("System.EnterpriseServices.dll")]
[assembly: AssemblyDescription("System.EnterpriseServices.dll")]
[assembly: AssemblyDefaultAlias("System.EnterpriseServices.dll")]
[assembly: AssemblyCompany("Mono development team")]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright("(c) Various Mono authors")]
[assembly: SatelliteContractVersion("4.0.0.0")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: ComCompatibleVersion(1, 0, 3300, 0)]
[assembly: ApplicationID("1e246775-2281-484f-8ad4-044c15b86eb7")]
[assembly: ApplicationName(".NET Utilities")]
[assembly: Guid("4fb2d46f-efc8-4643-bcd0-6e5bfa6a174c")]
[assembly: CLSCompliant(true)]
[assembly: AssemblyDelaySign(true)]
[assembly: AssemblyInformationalVersion("4.6.57.0")]
[assembly: AssemblyFileVersion("4.6.57.0")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: CompilationRelaxations(CompilationRelaxations.NoStringInterning)]
[assembly: AssemblyVersion("4.0.0.0")]
internal static class Consts
{
	public const string MonoVersion = "5.11.0.0";

	public const string MonoCompany = "Mono development team";

	public const string MonoProduct = "Mono Common Language Infrastructure";

	public const string MonoCopyright = "(c) Various Mono authors";

	public const int MonoCorlibVersion = 1051100001;

	public const string FxVersion = "4.0.0.0";

	public const string FxFileVersion = "4.6.57.0";

	public const string EnvironmentVersion = "4.0.30319.42000";

	public const string VsVersion = "0.0.0.0";

	public const string VsFileVersion = "11.0.0.0";

	private const string PublicKeyToken = "b77a5c561934e089";

	public const string AssemblyI18N = "I18N, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMicrosoft_JScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMono_Http = "Mono.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Posix = "Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Security = "Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Messaging_RabbitMQ = "Mono.Messaging.RabbitMQ, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyCorlib = "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Data = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Design = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing_Design = "System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Messaging = "System.Messaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Security = "System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Web = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Core = "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string WindowsBase_3_0 = "WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
namespace System
{
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoTODOAttribute : Attribute
	{
		private string comment;

		public string Comment => comment;

		public MonoTODOAttribute()
		{
		}

		public MonoTODOAttribute(string comment)
		{
			this.comment = comment;
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoDocumentationNoteAttribute : MonoTODOAttribute
	{
		public MonoDocumentationNoteAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoExtensionAttribute : MonoTODOAttribute
	{
		public MonoExtensionAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoInternalNoteAttribute : MonoTODOAttribute
	{
		public MonoInternalNoteAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoLimitationAttribute : MonoTODOAttribute
	{
		public MonoLimitationAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoNotSupportedAttribute : MonoTODOAttribute
	{
		public MonoNotSupportedAttribute(string comment)
			: base(comment)
		{
		}
	}
}
namespace System.EnterpriseServices
{
	[Serializable]
	public enum AccessChecksLevelOption
	{
		Application,
		ApplicationComponent
	}
	[Serializable]
	public enum ActivationOption
	{
		Library,
		Server
	}
	[ComVisible(false)]
	public sealed class Activity
	{
		[MonoTODO]
		public Activity(ServiceConfig cfg)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void AsynchronousCall(IServiceCall serviceCall)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void BindToCurrentThread()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void SynchronousCall(IServiceCall serviceCall)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void UnbindFromThread()
		{
			throw new NotImplementedException();
		}
	}
	[ComVisible(false)]
	[AttributeUsage(AttributeTargets.Assembly)]
	public sealed class ApplicationAccessControlAttribute : Attribute, IConfigurationAttribute
	{
		private AccessChecksLevelOption accessChecksLevel;

		private AuthenticationOption authentication;

		private ImpersonationLevelOption impersonation;

		private bool val;

		public AccessChecksLevelOption AccessChecksLevel
		{
			get
			{
				return accessChecksLevel;
			}
			set
			{
				accessChecksLevel = value;
			}
		}

		public AuthenticationOption Authentication
		{
			get
			{
				return authentication;
			}
			set
			{
				authentication = value;
			}
		}

		public ImpersonationLevelOption ImpersonationLevel
		{
			get
			{
				return impersonation;
			}
			set
			{
				impersonation = value;
			}
		}

		public bool Value
		{
			get
			{
				return val;
			}
			set
			{
				val = value;
			}
		}

		public ApplicationAccessControlAttribute()
		{
			val = false;
		}

		public ApplicationAccessControlAttribute(bool val)
		{
			this.val = val;
		}

		bool IConfigurationAttribute.AfterSaveChanges(Hashtable info)
		{
			return false;
		}

		[MonoTODO]
		bool IConfigurationAttribute.Apply(Hashtable cache)
		{
			throw new NotImplementedException();
		}

		bool IConfigurationAttribute.IsValidTarget(string s)
		{
			return s == "Application";
		}
	}
	[AttributeUsage(AttributeTargets.Assembly)]
	[ComVisible(false)]
	public sealed class ApplicationActivationAttribute : Attribute, IConfigurationAttribute
	{
		private ActivationOption opt;

		private string soapMailbox;

		private string soapVRoot;

		public string SoapMailbox
		{
			get
			{
				return soapMailbox;
			}
			set
			{
				soapMailbox = value;
			}
		}

		public string SoapVRoot
		{
			get
			{
				return soapVRoot;
			}
			set
			{
				soapVRoot = value;
			}
		}

		public ActivationOption Value => opt;

		public ApplicationActivationAttribute(ActivationOption opt)
		{
			this.opt = opt;
		}

		[MonoTODO]
		bool IConfigurationAttribute.AfterSaveChanges(Hashtable info)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		bool IConfigurationAttribute.Apply(Hashtable cache)
		{
			throw new NotImplementedException();
		}

		bool IConfigurationAttribute.IsValidTarget(string s)
		{
			return s == "Application";
		}
	}
	[AttributeUsage(AttributeTargets.Assembly)]
	[ComVisible(false)]
	public sealed class ApplicationIDAttribute : Attribute, IConfigurationAttribute
	{
		private Guid guid;

		public Guid Value => guid;

		public ApplicationIDAttribute(string guid)
		{
			this.guid = new Guid(guid);
		}

		bool IConfigurationAttribute.AfterSaveChanges(Hashtable info)
		{
			return false;
		}

		bool IConfigurationAttribute.Apply(Hashtable cache)
		{
			return false;
		}

		bool IConfigurationAttribute.IsValidTarget(string s)
		{
			return s == "Application";
		}
	}
	[AttributeUsage(AttributeTargets.Assembly)]
	[ComVisible(false)]
	public sealed class ApplicationNameAttribute : Attribute, IConfigurationAttribute
	{
		private string name;

		public string Value => name;

		public ApplicationNameAttribute(string name)
		{
			this.name = name;
		}

		bool IConfigurationAttribute.AfterSaveChanges(Hashtable info)
		{
			return false;
		}

		[MonoTODO]
		bool IConfigurationAttribute.Apply(Hashtable cache)
		{
			throw new NotImplementedException();
		}

		bool IConfigurationAttribute.IsValidTarget(string s)
		{
			return s == "Application";
		}
	}
	[ComVisible(false)]
	[AttributeUsage(AttributeTargets.Assembly)]
	public sealed class ApplicationQueuingAttribute : Attribute
	{
		private bool enabled;

		private int maxListenerThreads;

		private bool queueListenerEnabled;

		public bool Enabled
		{
			get
			{
				return enabled;
			}
			set
			{
				enabled = value;
			}
		}

		public int MaxListenerThreads
		{
			get
			{
				return maxListenerThreads;
			}
			set
			{
				maxListenerThreads = value;
			}
		}

		public bool QueueListenerEnabled
		{
			get
			{
				return queueListenerEnabled;
			}
			set
			{
				queueListenerEnabled = value;
			}
		}

		public ApplicationQueuingAttribute()
		{
			enabled = true;
			queueListenerEnabled = false;
			maxListenerThreads = 0;
		}
	}
	[Serializable]
	public enum AuthenticationOption
	{
		Call = 3,
		Connect = 2,
		Default = 0,
		Integrity = 5,
		None = 1,
		Packet = 4,
		Privacy = 6
	}
	[AttributeUsage(AttributeTargets.Method)]
	[ComVisible(false)]
	public sealed class AutoCompleteAttribute : Attribute
	{
		private bool val;

		public bool Value => val;

		public AutoCompleteAttribute()
		{
			val = true;
		}

		public AutoCompleteAttribute(bool val)
		{
			this.val = val;
		}
	}
	[ComVisible(false)]
	public struct BOID
	{
		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
		public byte[] rgb;
	}
	public sealed class BYOT
	{
		private BYOT()
		{
		}

		[MonoTODO]
		public static object CreateWithTipTransaction(string url, Type t)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static object CreateWithTransaction(object transaction, Type t)
		{
			throw new NotImplementedException();
		}
	}
	[Serializable]
	[ComVisible(false)]
	public enum BindingOption
	{
		NoBinding,
		BindingToPoolThread
	}
	[ComVisible(false)]
	[AttributeUsage(AttributeTargets.Class)]
	public sealed class COMTIIntrinsicsAttribute : Attribute
	{
		private bool val;

		public bool Value => val;

		public COMTIIntrinsicsAttribute()
		{
			val = false;
		}

		public COMTIIntrinsicsAttribute(bool val)
		{
			this.val = val;
		}
	}
	[ComVisible(false)]
	[AttributeUsage(AttributeTargets.Class)]
	public sealed class ComponentAccessControlAttribute : Attribute
	{
		private bool val;

		public bool Value => val;

		public ComponentAccessControlAttribute()
		{
			val = false;
		}

		public ComponentAccessControlAttribute(bool val)
		{
			this.val = val;
		}
	}
	[ComVisible(false)]
	[AttributeUsage(AttributeTargets.Class)]
	public sealed class ConstructionEnabledAttribute : Attribute
	{
		private string def;

		private bool enabled;

		public string Default
		{
			get
			{
				return def;
			}
			set
			{
				def = value;
			}
		}

		public bool Enabled
		{
			get
			{
				return enabled;
			}
			set
			{
				enabled = value;
			}
		}

		public ConstructionEnabledAttribute()
		{
			def = string.Empty;
			enabled = true;
		}

		public ConstructionEnabledAttribute(bool val)
		{
			def = string.Empty;
			enabled = val;
		}
	}
	public sealed class ContextUtil
	{
		private static bool deactivateOnReturn;

		private static TransactionVote myTransactionVote;

		public static Guid ActivityId
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		public static Guid ApplicationId
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		public static Guid ApplicationInstanceId
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		public static Guid ContextId
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		public static bool DeactivateOnReturn
		{
			get
			{
				return deactivateOnReturn;
			}
			set
			{
				deactivateOnReturn = value;
			}
		}

		public static bool IsInTransaction
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		public static bool IsSecurityEnabled
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public static TransactionVote MyTransactionVote
		{
			get
			{
				return myTransactionVote;
			}
			set
			{
				myTransactionVote = value;
			}
		}

		public static Guid PartitionId
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		public static object Transaction
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		public static Transaction SystemTransaction
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		public static Guid TransactionId
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		internal ContextUtil()
		{
		}

		[MonoTODO]
		public static void DisableCommit()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static void EnableCommit()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static object GetNamedProperty(string name)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static bool IsCallerInRole(string role)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static bool IsDefaultContext()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static void SetAbort()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static void SetComplete()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static void SetNamedProperty(string name, object value)
		{
			throw new NotImplementedException();
		}
	}
	[ComVisible(false)]
	[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Interface)]
	public sealed class DescriptionAttribute : Attribute
	{
		public DescriptionAttribute(string desc)
		{
		}
	}
	[ComVisible(false)]
	[AttributeUsage(AttributeTargets.Class)]
	public sealed class EventClassAttribute : Attribute
	{
		private bool allowInProcSubscribers;

		private bool fireInParallel;

		private string publisherFilter;

		public bool AllowInprocSubscribers
		{
			get
			{
				return allowInProcSubscribers;
			}
			set
			{
				allowInProcSubscribers = value;
			}
		}

		public bool FireInParallel
		{
			get
			{
				return fireInParallel;
			}
			set
			{
				fireInParallel = value;
			}
		}

		public string PublisherFilter
		{
			get
			{
				return publisherFilter;
			}
			set
			{
				publisherFilter = value;
			}
		}

		public EventClassAttribute()
		{
			allowInProcSubscribers = true;
			fireInParallel = false;
			publisherFilter = null;
		}
	}
	[AttributeUsage(AttributeTargets.Class)]
	[ComVisible(false)]
	public sealed class EventTrackingEnabledAttribute : Attribute
	{
		private bool val;

		public bool Value => val;

		public EventTrackingEnabledAttribute()
		{
			val = true;
		}

		public EventTrackingEnabledAttribute(bool val)
		{
			this.val = val;
		}
	}
	[AttributeUsage(AttributeTargets.Class)]
	[ComVisible(false)]
	public sealed class ExceptionClassAttribute : Attribute
	{
		private string name;

		public string Value => name;

		public ExceptionClassAttribute(string name)
		{
			this.name = name;
		}
	}
	[ComImport]
	[Guid("FE6777FB-A674-4177-8F32-6D707E113484")]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	public interface IAsyncErrorNotify
	{
		void OnError(int hresult);
	}
	internal interface IConfigurationAttribute
	{
		bool AfterSaveChanges(Hashtable info);

		bool Apply(Hashtable info);

		bool IsValidTarget(string s);
	}
	[AttributeUsage(AttributeTargets.Class)]
	[ComVisible(false)]
	public sealed class IISIntrinsicsAttribute : Attribute
	{
		private bool val;

		public bool Value => val;

		public IISIntrinsicsAttribute()
		{
			val = true;
		}

		public IISIntrinsicsAttribute(bool val)
		{
			this.val = val;
		}
	}
	[ComImport]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	[Guid("51372AFD-CAE7-11CF-BE81-00AA00A2FA25")]
	public interface IPlaybackControl
	{
		void FinalClientRetry();

		void FinalServerRetry();
	}
	[ComImport]
	[Guid("72380d55-8d2b-43a3-8513-2b6ef31434e9")]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	public interface IProcessInitControl
	{
		void ResetInitializerTimeout(int dwSecondsRemaining);
	}
	[ComImport]
	[Guid("1113f52d-dc7f-4943-aed6-88d04027e32a")]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	public interface IProcessInitializer
	{
		void Shutdown();

		void Startup([In][MarshalAs(UnmanagedType.IUnknown)] object punkProcessControl);
	}
	[Guid("55e3ea25-55cb-4650-8887-18e8d30bb4bc")]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	public interface IRegistrationHelper
	{
		void InstallAssembly([In][MarshalAs(UnmanagedType.BStr)] string assembly, [In][Out][MarshalAs(UnmanagedType.BStr)] ref string application, [In][Out][MarshalAs(UnmanagedType.BStr)] ref string tlb, [In] InstallationFlags installFlags);

		void UninstallAssembly([In][MarshalAs(UnmanagedType.BStr)] string assembly, [In][MarshalAs(UnmanagedType.BStr)] string application);
	}
	[Guid("6619a740-8154-43be-a186-0319578e02db")]
	public interface IRemoteDispatch
	{
		[AutoComplete]
		string RemoteDispatchAutoDone(string s);

		[AutoComplete(false)]
		string RemoteDispatchNotAutoDone(string s);
	}
	internal interface ISecurityCallContext
	{
		int Count { get; }

		void GetEnumerator(ref IEnumerator enumerator);

		object GetItem(string user);

		bool IsCallerInRole(string role);

		bool IsSecurityEnabled();

		bool IsUserInRole(ref object user, string role);
	}
	internal interface ISecurityCallersColl
	{
		int Count { get; }

		void GetEnumerator(out IEnumerator enumerator);

		ISecurityIdentityColl GetItem(int idx);
	}
	internal interface ISecurityIdentityColl
	{
		int Count { get; }

		void GetEnumerator(out IEnumerator enumerator);

		SecurityIdentity GetItem(int idx);
	}
	[ComImport]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	[Guid("BD3E2E12-42DD-40f4-A09A-95A50C58304B")]
	public interface IServiceCall
	{
		void OnCall();
	}
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	[Guid("8165B19E-8D3A-4d0b-80C8-97DE310DB583")]
	public interface IServicedComponentInfo
	{
		void GetComponentInfo(ref int infoMask, out string[] infoArray);
	}
	internal interface ISharedProperty
	{
		object Value { get; set; }
	}
	internal interface ISharedPropertyGroup
	{
		ISharedProperty CreateProperty(string name, out bool fExists);

		ISharedProperty CreatePropertyByPosition(int position, out bool fExists);

		ISharedProperty Property(string name);

		ISharedProperty PropertyByPosition(int position);
	}
	[ComImport]
	[Guid("0FB15084-AF41-11CE-BD2B-204C4F4F5020")]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	public interface ITransaction
	{
		void Abort(ref BOID pboidReason, int fRetaining, int fAsync);

		void Commit(int fRetaining, int grfTC, int grfRM);

		void GetTransactionInfo(out XACTTRANSINFO pinfo);
	}
	[Serializable]
	public enum ImpersonationLevelOption
	{
		Anonymous = 1,
		Default = 0,
		Delegate = 4,
		Identify = 2,
		Impersonate = 3
	}
	[Serializable]
	[ComVisible(false)]
	public enum InheritanceOption
	{
		Inherit,
		Ignore
	}
	[Serializable]
	[Flags]
	public enum InstallationFlags
	{
		Configure = 0x400,
		ConfigureComponentsOnly = 0x10,
		CreateTargetApplication = 2,
		Default = 0,
		ExpectExistingTypeLib = 1,
		FindOrCreateTargetApplication = 4,
		Install = 0x200,
		ReconfigureExistingApplication = 8,
		Register = 0x100,
		ReportWarningsToConsole = 0x20
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple = true)]
	[ComVisible(false)]
	public sealed class InterfaceQueuingAttribute : Attribute
	{
		private bool enabled;

		private string interfaceName;

		public bool Enabled
		{
			get
			{
				return enabled;
			}
			set
			{
				enabled = value;
			}
		}

		public string Interface
		{
			get
			{
				return interfaceName;
			}
			set
			{
				interfaceName = value;
			}
		}

		public InterfaceQueuingAttribute()
			: this(enabled: true)
		{
		}

		public InterfaceQueuingAttribute(bool enabled)
		{
			this.enabled = enabled;
			interfaceName = null;
		}
	}
	[AttributeUsage(AttributeTargets.Class)]
	[ComVisible(false)]
	public sealed class JustInTimeActivationAttribute : Attribute
	{
		private bool val;

		public bool Value => val;

		public JustInTimeActivationAttribute()
			: this(val: true)
		{
		}

		public JustInTimeActivationAttribute(bool val)
		{
			this.val = val;
		}
	}
	[AttributeUsage(AttributeTargets.Class)]
	[ComVisible(false)]
	public sealed class LoadBalancingSupportedAttribute : Attribute
	{
		private bool val;

		public bool Value => val;

		public LoadBalancingSupportedAttribute()
			: this(val: true)
		{
		}

		public LoadBalancingSupportedAttribute(bool val)
		{
			this.val = val;
		}
	}
	[AttributeUsage(AttributeTargets.Class)]
	[ComVisible(false)]
	public sealed class MustRunInClientContextAttribute : Attribute
	{
		private bool val;

		public bool Value => val;

		public MustRunInClientContextAttribute()
			: this(val: true)
		{
		}

		public MustRunInClientContextAttribute(bool val)
		{
			this.val = val;
		}
	}
	[AttributeUsage(AttributeTargets.Class)]
	[ComVisible(false)]
	public sealed class ObjectPoolingAttribute : Attribute, IConfigurationAttribute
	{
		private int creationTimeout;

		private bool enabled;

		private int minPoolSize;

		private int maxPoolSize;

		public int CreationTimeout
		{
			get
			{
				return creationTimeout;
			}
			set
			{
				creationTimeout = value;
			}
		}

		public bool Enabled
		{
			get
			{
				return enabled;
			}
			set
			{
				enabled = value;
			}
		}

		public int MaxPoolSize
		{
			get
			{
				return maxPoolSize;
			}
			set
			{
				maxPoolSize = value;
			}
		}

		public int MinPoolSize
		{
			get
			{
				return minPoolSize;
			}
			set
			{
				minPoolSize = value;
			}
		}

		public ObjectPoolingAttribute()
			: this(enable: true)
		{
		}

		public ObjectPoolingAttribute(bool enable)
		{
			enabled = enable;
		}

		public ObjectPoolingAttribute(int minPoolSize, int maxPoolSize)
			: this(enable: true, minPoolSize, maxPoolSize)
		{
		}

		public ObjectPoolingAttribute(bool enable, int minPoolSize, int maxPoolSize)
		{
			enabled = enable;
			this.minPoolSize = minPoolSize;
			this.maxPoolSize = maxPoolSize;
		}

		[MonoTODO]
		public bool AfterSaveChanges(Hashtable info)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public bool Apply(Hashtable info)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public bool IsValidTarget(string s)
		{
			throw new NotImplementedException();
		}
	}
	[Serializable]
	[ComVisible(false)]
	public enum PartitionOption
	{
		Ignore,
		Inherit,
		New
	}
	[AttributeUsage(AttributeTargets.Class)]
	[ComVisible(false)]
	public sealed class PrivateComponentAttribute : Attribute
	{
	}
	[Serializable]
	[ComVisible(false)]
	public enum PropertyLockMode
	{
		Method = 1,
		SetGet = 0
	}
	[Serializable]
	[ComVisible(false)]
	public enum PropertyReleaseMode
	{
		Process = 1,
		Standard = 0
	}
	[Serializable]
	[Guid("36dcda30-dc3b-4d93-be42-90b2d74c64e7")]
	public class RegistrationConfig
	{
		[MonoTODO]
		public string Application
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public string ApplicationRootDirectory
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public string AssemblyFile
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public InstallationFlags InstallationFlags
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public string Partition
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public string TypeLibrary
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public RegistrationConfig()
		{
			throw new NotImplementedException();
		}
	}
	[Serializable]
	public sealed class RegistrationErrorInfo
	{
		private int errorCode;

		private string errorString;

		private string majorRef;

		private string minorRef;

		private string name;

		public int ErrorCode => errorCode;

		public string ErrorString => errorString;

		public string MajorRef => majorRef;

		public string MinorRef => minorRef;

		public string Name => name;

		[MonoTODO]
		internal RegistrationErrorInfo(string name, string majorRef, string minorRef, int errorCode)
		{
			this.name = name;
			this.majorRef = majorRef;
			this.minorRef = minorRef;
			this.errorCode = errorCode;
		}

		internal RegistrationErrorInfo()
		{
			ThrowStub.ThrowNotSupportedException();
		}
	}
	[Serializable]
	public sealed class RegistrationException : SystemException
	{
		private RegistrationErrorInfo[] errorInfo;

		public RegistrationErrorInfo[] ErrorInfo => errorInfo;

		[MonoTODO]
		public RegistrationException(string msg)
			: base(msg)
		{
		}

		public RegistrationException()
			: this("Registration error")
		{
		}

		public RegistrationException(string msg, Exception inner)
			: base(msg, inner)
		{
		}

		[MonoTODO]
		public override void GetObjectData(SerializationInfo info, StreamingContext ctx)
		{
			throw new NotImplementedException();
		}
	}
	[Guid("89a86e7b-c229-4008-9baa-2f5c8411d7e0")]
	public sealed class RegistrationHelper : MarshalByRefObject, IRegistrationHelper
	{
		public void InstallAssembly(string assembly, ref string application, ref string tlb, InstallationFlags installFlags)
		{
			application = string.Empty;
			tlb = string.Empty;
			InstallAssembly(assembly, ref application, null, ref tlb, installFlags);
		}

		[MonoTODO]
		public void InstallAssembly(string assembly, ref string application, string partition, ref string tlb, InstallationFlags installFlags)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void InstallAssemblyFromConfig([MarshalAs(UnmanagedType.IUnknown)] ref RegistrationConfig regConfig)
		{
			throw new NotImplementedException();
		}

		public void UninstallAssembly(string assembly, string application)
		{
			UninstallAssembly(assembly, application, null);
		}

		[MonoTODO]
		public void UninstallAssembly(string assembly, string application, string partition)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void UninstallAssemblyFromConfig([MarshalAs(UnmanagedType.IUnknown)] ref RegistrationConfig regConfig)
		{
			throw new NotImplementedException();
		}
	}
	[Transaction(TransactionOption.RequiresNew)]
	[Guid("C89AC250-E18A-4FC7-ABD5-B8897B6A78A5")]
	public sealed class RegistrationHelperTx : ServicedComponent
	{
		[MonoTODO]
		public RegistrationHelperTx()
		{
		}

		[MonoTODO]
		protected internal override void Activate()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		protected internal override void Deactivate()
		{
			throw new NotImplementedException();
		}

		public void InstallAssembly(string assembly, ref string application, ref string tlb, InstallationFlags installFlags, object sync)
		{
			InstallAssembly(assembly, ref application, null, ref tlb, installFlags, sync);
		}

		[MonoTODO]
		public void InstallAssembly(string assembly, ref string application, string partition, ref string tlb, InstallationFlags installFlags, object sync)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void InstallAssemblyFromConfig([MarshalAs(UnmanagedType.IUnknown)] ref RegistrationConfig regConfig, object sync)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public bool IsInTransaction()
		{
			throw new NotImplementedException();
		}

		public void UninstallAssembly(string assembly, string application, object sync)
		{
			UninstallAssembly(assembly, application, null, sync);
		}

		[MonoTODO]
		public void UninstallAssembly(string assembly, string application, string partition, object sync)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void UninstallAssemblyFromConfig([MarshalAs(UnmanagedType.IUnknown)] ref RegistrationConfig regConfig, object sync)
		{
			throw new NotImplementedException();
		}
	}
	public sealed class ResourcePool
	{
		public delegate void TransactionEndDelegate(object resource);

		[MonoTODO]
		public ResourcePool(TransactionEndDelegate cb)
		{
		}

		[MonoTODO]
		public object GetResource()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public bool PutResource(object resource)
		{
			throw new NotImplementedException();
		}
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
	[ComVisible(false)]
	public sealed class SecureMethodAttribute : Attribute
	{
	}
	public sealed class SecurityCallContext
	{
		public SecurityCallers Callers
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		public static SecurityCallContext CurrentCall
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		public SecurityIdentity DirectCaller
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		public bool IsSecurityEnabled
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		public int MinAuthenticationLevel
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		public int NumCallers
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		public SecurityIdentity OriginalCaller
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		internal SecurityCallContext()
		{
		}

		internal SecurityCallContext(ISecurityCallContext context)
		{
		}

		[MonoTODO]
		public bool IsCallerInRole(string role)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public bool IsUserInRole(string user, string role)
		{
			throw new NotImplementedException();
		}
	}
	public sealed class SecurityCallers : IEnumerable
	{
		public int Count
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		public SecurityIdentity this[int idx]
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		internal SecurityCallers()
		{
		}

		internal SecurityCallers(ISecurityCallersColl collection)
		{
		}

		[MonoTODO]
		public IEnumerator GetEnumerator()
		{
			throw new NotImplementedException();
		}
	}
	public sealed class SecurityIdentity
	{
		public string AccountName
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		public AuthenticationOption AuthenticationLevel
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		public int AuthenticationService
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		public ImpersonationLevelOption ImpersonationLevel
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		internal SecurityIdentity()
		{
		}

		[MonoTODO]
		internal SecurityIdentity(ISecurityIdentityColl collection)
		{
		}
	}
	[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Interface, AllowMultiple = true)]
	[ComVisible(false)]
	public sealed class SecurityRoleAttribute : Attribute
	{
		private string description;

		private bool everyone;

		private string role;

		public string Description
		{
			get
			{
				return description;
			}
			set
			{
				description = value;
			}
		}

		public string Role
		{
			get
			{
				return role;
			}
			set
			{
				role = value;
			}
		}

		public bool SetEveryoneAccess
		{
			get
			{
				return everyone;
			}
			set
			{
				everyone = value;
			}
		}

		public SecurityRoleAttribute(string role)
			: this(role, everyone: false)
		{
		}

		public SecurityRoleAttribute(string role, bool everyone)
		{
			description = string.Empty;
			this.everyone = everyone;
			this.role = role;
		}
	}
	[MonoTODO]
	[ComVisible(false)]
	public sealed class ServiceConfig
	{
		[MonoTODO]
		public BindingOption Binding
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public Transaction BringYourOwnSystemTransaction
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public ITransaction BringYourOwnTransaction
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public bool COMTIIntrinsicsEnabled
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public bool IISIntrinsicsEnabled
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public InheritanceOption Inheritance
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public TransactionIsolationLevel IsolationLevel
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public Guid PartitionId
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public PartitionOption PartitionOption
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public string SxsDirectory
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public string SxsName
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public SxsOption SxsOption
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public SynchronizationOption Synchronization
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public ThreadPoolOption ThreadPool
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public string TipUrl
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public string TrackingAppName
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public string TrackingComponentName
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public bool TrackingEnabled
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public TransactionOption Transaction
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public string TransactionDescription
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public int TransactionTimeout
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public ServiceConfig()
		{
			throw new NotImplementedException();
		}
	}
	[ComVisible(false)]
	public sealed class ServiceDomain
	{
		private ServiceDomain()
		{
		}

		[MonoTODO]
		public static void Enter(ServiceConfig cfg)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static TransactionStatus Leave()
		{
			throw new NotImplementedException();
		}
	}
	[Serializable]
	public abstract class ServicedComponent : ContextBoundObject, IDisposable, IRemoteDispatch, IServicedComponentInfo
	{
		public ServicedComponent()
		{
		}

		[MonoTODO]
		protected internal virtual void Activate()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		protected internal virtual bool CanBePooled()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		protected internal virtual void Construct(string s)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		protected internal virtual void Deactivate()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void Dispose()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		protected virtual void Dispose(bool disposing)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static void DisposeObject(ServicedComponent sc)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		string IRemoteDispatch.RemoteDispatchAutoDone(string s)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		string IRemoteDispatch.RemoteDispatchNotAutoDone(string s)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		void IServicedComponentInfo.GetComponentInfo(ref int infoMask, out string[] infoArray)
		{
			throw new NotImplementedException();
		}
	}
	[Serializable]
	[ComVisible(false)]
	public sealed class ServicedComponentException : SystemException
	{
		public ServicedComponentException()
		{
		}

		public ServicedComponentException(string message)
			: base(message)
		{
		}

		public ServicedComponentException(string message, Exception innerException)
			: base(message, innerException)
		{
		}
	}
	[ComVisible(false)]
	public sealed class SharedProperty
	{
		private ISharedProperty property;

		public object Value
		{
			get
			{
				return property.Value;
			}
			set
			{
				property.Value = value;
			}
		}

		internal SharedProperty(ISharedProperty property)
		{
			this.property = property;
		}

		internal SharedProperty()
		{
			ThrowStub.ThrowNotSupportedException();
		}
	}
	[ComVisible(false)]
	public sealed class SharedPropertyGroup
	{
		private ISharedPropertyGroup propertyGroup;

		internal SharedPropertyGroup(ISharedPropertyGroup propertyGroup)
		{
			this.propertyGroup = propertyGroup;
		}

		public SharedProperty CreateProperty(string name, out bool fExists)
		{
			return new SharedProperty(propertyGroup.CreateProperty(name, out fExists));
		}

		public SharedProperty CreatePropertyByPosition(int position, out bool fExists)
		{
			return new SharedProperty(propertyGroup.CreatePropertyByPosition(position, out fExists));
		}

		public SharedProperty Property(string name)
		{
			return new SharedProperty(propertyGroup.Property(name));
		}

		public SharedProperty PropertyByPosition(int position)
		{
			return new SharedProperty(propertyGroup.PropertyByPosition(position));
		}

		internal SharedPropertyGroup()
		{
			ThrowStub.ThrowNotSupportedException();
		}
	}
	[ComVisible(false)]
	public sealed class SharedPropertyGroupManager : IEnumerable
	{
		[MonoTODO]
		public SharedPropertyGroup CreatePropertyGroup(string name, ref PropertyLockMode dwIsoMode, ref PropertyReleaseMode dwRelMode, out bool fExist)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public IEnumerator GetEnumerator()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public SharedPropertyGroup Group(string name)
		{
			throw new NotImplementedException();
		}
	}
	[Serializable]
	[ComVisible(false)]
	public enum SxsOption
	{
		Ignore,
		Inherit,
		New
	}
	[AttributeUsage(AttributeTargets.Class)]
	[ComVisible(false)]
	public sealed class SynchronizationAttribute : Attribute
	{
		private SynchronizationOption val;

		public SynchronizationOption Value => val;

		public SynchronizationAttribute()
			: this(SynchronizationOption.Required)
		{
		}

		public SynchronizationAttribute(SynchronizationOption val)
		{
			this.val = val;
		}
	}
	[Serializable]
	public enum SynchronizationOption
	{
		Disabled = 0,
		NotSupported = 1,
		Required = 3,
		RequiresNew = 4,
		Supported = 2
	}
	[Serializable]
	[ComVisible(false)]
	public enum ThreadPoolOption
	{
		None,
		Inherit,
		STA,
		MTA
	}
	[AttributeUsage(AttributeTargets.Class)]
	[ComVisible(false)]
	public sealed class TransactionAttribute : Attribute
	{
		private TransactionIsolationLevel isolation;

		private int timeout;

		private TransactionOption val;

		public TransactionIsolationLevel Isolation
		{
			get
			{
				return isolation;
			}
			set
			{
				isolation = value;
			}
		}

		public int Timeout
		{
			get
			{
				return timeout;
			}
			set
			{
				timeout = value;
			}
		}

		public TransactionOption Value => val;

		public TransactionAttribute()
			: this(TransactionOption.Required)
		{
		}

		public TransactionAttribute(TransactionOption val)
		{
			isolation = TransactionIsolationLevel.Serializable;
			timeout = -1;
			this.val = val;
		}
	}
	[Serializable]
	public enum TransactionIsolationLevel
	{
		Any = 0,
		ReadCommitted = 2,
		ReadUncommitted = 1,
		RepeatableRead = 3,
		Serializable = 4
	}
	[Serializable]
	public enum TransactionOption
	{
		Disabled,
		NotSupported,
		Supported,
		Required,
		RequiresNew
	}
	[Serializable]
	[ComVisible(false)]
	public enum TransactionStatus
	{
		Commited,
		LocallyOk,
		NoTransaction,
		Aborting,
		Aborted
	}
	[Serializable]
	[ComVisible(false)]
	public enum TransactionVote
	{
		Abort = 1,
		Commit = 0
	}
	[ComVisible(false)]
	public struct XACTTRANSINFO
	{
		public int grfRMSupported;

		public int grfRMSupportedRetaining;

		public int grfTCSupported;

		public int grfTCSupportedRetaining;

		public int isoFlags;

		public int isoLevel;

		public BOID uow;
	}
}
namespace System.EnterpriseServices.Internal
{
	[Guid("ef24f689-14f8-4d92-b4af-d7b1f0e70fd4")]
	public class AppDomainHelper
	{
		[MonoTODO]
		public AppDomainHelper()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		~AppDomainHelper()
		{
			throw new NotImplementedException();
		}
	}
	[Guid("458aa3b5-265a-4b75-bc05-9bea4630cf18")]
	public class AssemblyLocator : MarshalByRefObject
	{
		[MonoTODO]
		public AssemblyLocator()
		{
			throw new NotImplementedException();
		}
	}
	public class ClientRemotingConfig
	{
		[MonoTODO]
		public ClientRemotingConfig()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static bool Write(string DestinationDirectory, string VRoot, string BaseUrl, string AssemblyName, string TypeName, string ProgId, string Mode, string Transport)
		{
			throw new NotImplementedException();
		}
	}
	[Guid("ecabafd1-7f19-11d2-978e-0000f8757e2a")]
	public class ClrObjectFactory : IClrObjectFactory
	{
		[MonoTODO]
		public ClrObjectFactory()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public object CreateFromAssembly(string AssemblyName, string TypeName, string Mode)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public object CreateFromMailbox(string Mailbox, string Mode)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public object CreateFromVroot(string VrootUrl, string Mode)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public object CreateFromWsdl(string WsdlUrl, string Mode)
		{
			throw new NotImplementedException();
		}
	}
	[Guid("3b0398c9-7812-4007-85cb-18c771f2206f")]
	public class ComManagedImportUtil : IComManagedImportUtil
	{
		[MonoTODO]
		public ComManagedImportUtil()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void GetComponentInfo(string assemblyPath, out string numComponents, out string componentInfo)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void InstallAssembly(string asmpath, string parname, string appname)
		{
			throw new NotImplementedException();
		}
	}
	public class ComSoapPublishError
	{
		[MonoTODO]
		public ComSoapPublishError()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static void Report(string s)
		{
			throw new NotImplementedException();
		}
	}
	[Guid("d8013ff1-730b-45e2-ba24-874b7242c425")]
	public class GenerateMetadata : IComSoapMetadata
	{
		[MonoTODO]
		public GenerateMetadata()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public string Generate(string strSrcTypeLib, string outPath)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public string GenerateMetaData(string strSrcTypeLib, string outPath, byte[] PublicKey, StrongNameKeyPair KeyPair)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public string GenerateSigned(string strSrcTypeLib, string outPath, bool InstallGac, out string Error)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static int SearchPath(string path, string fileName, string extension, int numBufferChars, string buffer, int[] filePart)
		{
			throw new NotImplementedException();
		}
	}
	[Guid("ecabafd2-7f19-11d2-978e-0000f8757e2a")]
	public interface IClrObjectFactory
	{
		[DispId(1)]
		[return: MarshalAs(UnmanagedType.IDispatch)]
		object CreateFromAssembly(string assembly, string type, string mode);

		[DispId(4)]
		[return: MarshalAs(UnmanagedType.IDispatch)]
		object CreateFromMailbox(string Mailbox, string Mode);

		[DispId(2)]
		[return: MarshalAs(UnmanagedType.IDispatch)]
		object CreateFromVroot(string VrootUrl, string Mode);

		[DispId(3)]
		[return: MarshalAs(UnmanagedType.IDispatch)]
		object CreateFromWsdl(string WsdlUrl, string Mode);
	}
	[Guid("c3f8f66b-91be-4c99-a94f-ce3b0a951039")]
	public interface IComManagedImportUtil
	{
		[DispId(4)]
		void GetComponentInfo([MarshalAs(UnmanagedType.BStr)] string assemblyPath, [MarshalAs(UnmanagedType.BStr)] out string numComponents, [MarshalAs(UnmanagedType.BStr)] out string componentInfo);

		[DispId(5)]
		void InstallAssembly([MarshalAs(UnmanagedType.BStr)] string filename, [MarshalAs(UnmanagedType.BStr)] string parname, [MarshalAs(UnmanagedType.BStr)] string appname);
	}
	[Guid("d8013ef0-730b-45e2-ba24-874b7242c425")]
	public interface IComSoapIISVRoot
	{
		[DispId(1)]
		void Create([MarshalAs(UnmanagedType.BStr)] string RootWeb, [MarshalAs(UnmanagedType.BStr)] string PhysicalDirectory, [MarshalAs(UnmanagedType.BStr)] string VirtualDirectory, [MarshalAs(UnmanagedType.BStr)] out string Error);

		[DispId(2)]
		void Delete([MarshalAs(UnmanagedType.BStr)] string RootWeb, [MarshalAs(UnmanagedType.BStr)] string PhysicalDirectory, [MarshalAs(UnmanagedType.BStr)] string VirtualDirectory, [MarshalAs(UnmanagedType.BStr)] out string Error);
	}
	[Guid("d8013ff0-730b-45e2-ba24-874b7242c425")]
	public interface IComSoapMetadata
	{
		[DispId(1)]
		[return: MarshalAs(UnmanagedType.BStr)]
		string Generate([MarshalAs(UnmanagedType.BStr)] string SrcTypeLibFileName, [MarshalAs(UnmanagedType.BStr)] string OutPath);

		[DispId(2)]
		[return: MarshalAs(UnmanagedType.BStr)]
		string GenerateSigned([MarshalAs(UnmanagedType.BStr)] string SrcTypeLibFileName, [MarshalAs(UnmanagedType.BStr)] string OutPath, [MarshalAs(UnmanagedType.Bool)] bool InstallGac, [MarshalAs(UnmanagedType.BStr)] out string Error);
	}
	[Guid("d8013eee-730b-45e2-ba24-874b7242c425")]
	public interface IComSoapPublisher
	{
		[DispId(6)]
		void CreateMailBox([MarshalAs(UnmanagedType.BStr)] string RootMailServer, [MarshalAs(UnmanagedType.BStr)] string MailBox, [MarshalAs(UnmanagedType.BStr)] out string SmtpName, [MarshalAs(UnmanagedType.BStr)] out string Domain, [MarshalAs(UnmanagedType.BStr)] out string PhysicalPath, [MarshalAs(UnmanagedType.BStr)] out string Error);

		[DispId(4)]
		void CreateVirtualRoot([MarshalAs(UnmanagedType.BStr)] string Operation, [MarshalAs(UnmanagedType.BStr)] string FullUrl, [MarshalAs(UnmanagedType.BStr)] out string BaseUrl, [MarshalAs(UnmanagedType.BStr)] out string VirtualRoot, [MarshalAs(UnmanagedType.BStr)] out string PhysicalPath, [MarshalAs(UnmanagedType.BStr)] out string Error);

		[DispId(7)]
		void DeleteMailBox([MarshalAs(UnmanagedType.BStr)] string RootMailServer, [MarshalAs(UnmanagedType.BStr)] string MailBox, [MarshalAs(UnmanagedType.BStr)] out string Error);

		[DispId(5)]
		void DeleteVirtualRoot([MarshalAs(UnmanagedType.BStr)] string RootWebServer, [MarshalAs(UnmanagedType.BStr)] string FullUrl, [MarshalAs(UnmanagedType.BStr)] out string Error);

		[DispId(13)]
		void GacInstall([MarshalAs(UnmanagedType.BStr)] string AssemblyPath);

		[DispId(14)]
		void GacRemove([MarshalAs(UnmanagedType.BStr)] string AssemblyPath);

		[DispId(15)]
		void GetAssemblyNameForCache([MarshalAs(UnmanagedType.BStr)] string TypeLibPath, [MarshalAs(UnmanagedType.BStr)] out string CachePath);

		[DispId(10)]
		[return: MarshalAs(UnmanagedType.BStr)]
		string GetTypeNameFromProgId([MarshalAs(UnmanagedType.BStr)] string AssemblyPath, [MarshalAs(UnmanagedType.BStr)] string ProgId);

		[DispId(9)]
		void ProcessClientTlb([MarshalAs(UnmanagedType.BStr)] string ProgId, [MarshalAs(UnmanagedType.BStr)] string SrcTlbPath, [MarshalAs(UnmanagedType.BStr)] string PhysicalPath, [MarshalAs(UnmanagedType.BStr)] string VRoot, [MarshalAs(UnmanagedType.BStr)] string BaseUrl, [MarshalAs(UnmanagedType.BStr)] string Mode, [MarshalAs(UnmanagedType.BStr)] string Transport, [MarshalAs(UnmanagedType.BStr)] out string AssemblyName, [MarshalAs(UnmanagedType.BStr)] out string TypeName, [MarshalAs(UnmanagedType.BStr)] out string Error);

		[DispId(8)]
		void ProcessServerTlb([MarshalAs(UnmanagedType.BStr)] string ProgId, [MarshalAs(UnmanagedType.BStr)] string SrcTlbPath, [MarshalAs(UnmanagedType.BStr)] string PhysicalPath, [MarshalAs(UnmanagedType.BStr)] string Operation, [MarshalAs(UnmanagedType.BStr)] out string AssemblyName, [MarshalAs(UnmanagedType.BStr)] out string TypeName, [MarshalAs(UnmanagedType.BStr)] out string Error);

		[DispId(11)]
		void RegisterAssembly([MarshalAs(UnmanagedType.BStr)] string AssemblyPath);

		[DispId(12)]
		void UnRegisterAssembly([MarshalAs(UnmanagedType.BStr)] string AssemblyPath);
	}
	[Guid("d8013ef1-730b-45e2-ba24-874b7242c425")]
	public class IISVirtualRoot : IComSoapIISVRoot
	{
		[MonoTODO]
		public IISVirtualRoot()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void Create(string RootWeb, string inPhysicalDirectory, string VirtualDirectory, out string Error)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void Delete(string RootWeb, string PhysicalDirectory, string VirtualDirectory, out string Error)
		{
			throw new NotImplementedException();
		}
	}
	[Guid("6261e4b5-572a-4142-a2f9-1fe1a0c97097")]
	public interface IServerWebConfig
	{
		[DispId(1)]
		void AddElement([MarshalAs(UnmanagedType.BStr)] string FilePath, [MarshalAs(UnmanagedType.BStr)] string AssemblyName, [MarshalAs(UnmanagedType.BStr)] string TypeName, [MarshalAs(UnmanagedType.BStr)] string ProgId, [MarshalAs(UnmanagedType.BStr)] string Mode, [MarshalAs(UnmanagedType.BStr)] out string Error);

		[DispId(2)]
		void Create([MarshalAs(UnmanagedType.BStr)] string FilePath, [MarshalAs(UnmanagedType.BStr)] string FileRootName, [MarshalAs(UnmanagedType.BStr)] out string Error);
	}
	[Guid("E7F0F021-9201-47e4-94DA-1D1416DEC27A")]
	public interface ISoapClientImport
	{
		[DispId(1)]
		void ProcessClientTlbEx([MarshalAs(UnmanagedType.BStr)] string progId, [MarshalAs(UnmanagedType.BStr)] string virtualRoot, [MarshalAs(UnmanagedType.BStr)] string baseUrl, [MarshalAs(UnmanagedType.BStr)] string authentication, [MarshalAs(UnmanagedType.BStr)] string assemblyName, [MarshalAs(UnmanagedType.BStr)] string typeName);
	}
	[Guid("1E7BA9F7-21DB-4482-929E-21BDE2DFE51C")]
	public interface ISoapServerTlb
	{
		[DispId(1)]
		void AddServerTlb([MarshalAs(UnmanagedType.BStr)] string progId, [MarshalAs(UnmanagedType.BStr)] string classId, [MarshalAs(UnmanagedType.BStr)] string interfaceId, [MarshalAs(UnmanagedType.BStr)] string srcTlbPath, [MarshalAs(UnmanagedType.BStr)] string rootWebServer, [MarshalAs(UnmanagedType.BStr)] string baseUrl, [MarshalAs(UnmanagedType.BStr)] string virtualRoot, [MarshalAs(UnmanagedType.BStr)] string clientActivated, [MarshalAs(UnmanagedType.BStr)] string wellKnown, [MarshalAs(UnmanagedType.BStr)] string discoFile, [MarshalAs(UnmanagedType.BStr)] string operation, [MarshalAs(UnmanagedType.BStr)] out string assemblyName, [MarshalAs(UnmanagedType.BStr)] out string typeName);

		[DispId(2)]
		void DeleteServerTlb([MarshalAs(UnmanagedType.BStr)] string progId, [MarshalAs(UnmanagedType.BStr)] string classId, [MarshalAs(UnmanagedType.BStr)] string interfaceId, [MarshalAs(UnmanagedType.BStr)] string srcTlbPath, [MarshalAs(UnmanagedType.BStr)] string rootWebServer, [MarshalAs(UnmanagedType.BStr)] string baseUrl, [MarshalAs(UnmanagedType.BStr)] string virtualRoot, [MarshalAs(UnmanagedType.BStr)] string operation, [MarshalAs(UnmanagedType.BStr)] string assemblyName, [MarshalAs(UnmanagedType.BStr)] string typeName);
	}
	[Guid("A31B6577-71D2-4344-AEDF-ADC1B0DC5347")]
	public interface ISoapServerVRoot
	{
		[DispId(1)]
		void CreateVirtualRootEx([MarshalAs(UnmanagedType.BStr)] string rootWebServer, [MarshalAs(UnmanagedType.BStr)] string inBaseUrl, [MarshalAs(UnmanagedType.BStr)] string inVirtualRoot, [MarshalAs(UnmanagedType.BStr)] string homePage, [MarshalAs(UnmanagedType.BStr)] string discoFile, [MarshalAs(UnmanagedType.BStr)] string secureSockets, [MarshalAs(UnmanagedType.BStr)] string authentication, [MarshalAs(UnmanagedType.BStr)] string operation, [MarshalAs(UnmanagedType.BStr)] out string baseUrl, [MarshalAs(UnmanagedType.BStr)] out string virtualRoot, [MarshalAs(UnmanagedType.BStr)] out string physicalPath);

		[DispId(2)]
		void DeleteVirtualRootEx([MarshalAs(UnmanagedType.BStr)] string rootWebServer, [MarshalAs(UnmanagedType.BStr)] string baseUrl, [MarshalAs(UnmanagedType.BStr)] string virtualRoot);

		[DispId(3)]
		void GetVirtualRootStatus([MarshalAs(UnmanagedType.BStr)] string rootWebServer, [MarshalAs(UnmanagedType.BStr)] string inBaseUrl, [MarshalAs(UnmanagedType.BStr)] string inVirtualRoot, [MarshalAs(UnmanagedType.BStr)] out string exists, [MarshalAs(UnmanagedType.BStr)] out string secureSockets, [MarshalAs(UnmanagedType.BStr)] out string windowsAuth, [MarshalAs(UnmanagedType.BStr)] out string anonymous, [MarshalAs(UnmanagedType.BStr)] out string homePage, [MarshalAs(UnmanagedType.BStr)] out string discoFile, [MarshalAs(UnmanagedType.BStr)] out string physicalPath, [MarshalAs(UnmanagedType.BStr)] out string baseUrl, [MarshalAs(UnmanagedType.BStr)] out string virtualRoot);
	}
	[Guid("5AC4CB7E-F89F-429b-926B-C7F940936BF4")]
	public interface ISoapUtility
	{
		[DispId(2)]
		void GetServerBinPath([MarshalAs(UnmanagedType.BStr)] string rootWebServer, [MarshalAs(UnmanagedType.BStr)] string inBaseUrl, [MarshalAs(UnmanagedType.BStr)] string inVirtualRoot, [MarshalAs(UnmanagedType.BStr)] out string binPath);

		[DispId(1)]
		void GetServerPhysicalPath([MarshalAs(UnmanagedType.BStr)] string rootWebServer, [MarshalAs(UnmanagedType.BStr)] string inBaseUrl, [MarshalAs(UnmanagedType.BStr)] string inVirtualRoot, [MarshalAs(UnmanagedType.BStr)] out string physicalPath);

		[DispId(3)]
		void Present();
	}
	[Guid("d8013eef-730b-45e2-ba24-874b7242c425")]
	public class Publish : IComSoapPublisher
	{
		[MonoTODO]
		public Publish()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void CreateMailBox(string RootMailServer, string MailBox, out string SmtpName, out string Domain, out string PhysicalPath, out string Error)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void CreateVirtualRoot(string Operation, string FullUrl, out string BaseUrl, out string VirtualRoot, out string PhysicalPath, out string Error)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void DeleteMailBox(string RootMailServer, string MailBox, out string Error)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void DeleteVirtualRoot(string RootWebServer, string FullUrl, out string Error)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void GacInstall(string AssemblyPath)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void GacRemove(string AssemblyPath)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void GetAssemblyNameForCache(string TypeLibPath, out string CachePath)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static string GetClientPhysicalPath(bool CreateDir)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public string GetTypeNameFromProgId(string AssemblyPath, string ProgId)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static void ParseUrl(string FullUrl, out string BaseUrl, out string VirtualRoot)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void ProcessClientTlb(string ProgId, string SrcTlbPath, string PhysicalPath, string VRoot, string BaseUrl, string Mode, string Transport, out string AssemblyName, out string TypeName, out string Error)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void ProcessServerTlb(string ProgId, string SrcTlbPath, string PhysicalPath, string Operation, out string strAssemblyName, out string TypeName, out string Error)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void RegisterAssembly(string AssemblyPath)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void UnRegisterAssembly(string AssemblyPath)
		{
			throw new NotImplementedException();
		}
	}
	public class ServerWebConfig : IServerWebConfig
	{
		[MonoTODO]
		public ServerWebConfig()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void AddElement(string FilePath, string AssemblyName, string TypeName, string ProgId, string WkoMode, out string Error)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void Create(string FilePath, string FilePrefix, out string Error)
		{
			throw new NotImplementedException();
		}
	}
	[Guid("346D5B9F-45E1-45c0-AADF-1B7D221E9063")]
	public sealed class SoapClientImport : ISoapClientImport
	{
		[MonoTODO]
		public SoapClientImport()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void ProcessClientTlbEx(string progId, string virtualRoot, string baseUrl, string authentication, string assemblyName, string typeName)
		{
			throw new NotImplementedException();
		}
	}
	[Guid("F6B6768F-F99E-4152-8ED2-0412F78517FB")]
	public sealed class SoapServerTlb : ISoapServerTlb
	{
		[MonoTODO]
		public SoapServerTlb()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void AddServerTlb(string progId, string classId, string interfaceId, string srcTlbPath, string rootWebServer, string inBaseUrl, string inVirtualRoot, string clientActivated, string wellKnown, string discoFile, string operation, out string strAssemblyName, out string typeName)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void DeleteServerTlb(string progId, string classId, string interfaceId, string srcTlbPath, string rootWebServer, string baseUrl, string virtualRoot, string operation, string assemblyName, string typeName)
		{
			throw new NotImplementedException();
		}
	}
	[Guid("CAA817CC-0C04-4d22-A05C-2B7E162F4E8F")]
	public sealed class SoapServerVRoot : ISoapServerVRoot
	{
		[MonoTODO]
		public SoapServerVRoot()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void CreateVirtualRootEx(string rootWebServer, string inBaseUrl, string inVirtualRoot, string homePage, string discoFile, string secureSockets, string authentication, string operation, out string baseUrl, out string virtualRoot, out string physicalPath)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void DeleteVirtualRootEx(string rootWebServer, string inBaseUrl, string inVirtualRoot)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void GetVirtualRootStatus(string RootWebServer, string inBaseUrl, string inVirtualRoot, out string Exists, out string SSL, out string WindowsAuth, out string Anonymous, out string HomePage, out string DiscoFile, out string PhysicalPath, out string BaseUrl, out string VirtualRoot)
		{
			throw new NotImplementedException();
		}
	}
	[Guid("5F9A955F-AA55-4127-A32B-33496AA8A44E")]
	public sealed class SoapUtility : ISoapUtility
	{
		[MonoTODO]
		public SoapUtility()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void GetServerBinPath(string rootWebServer, string inBaseUrl, string inVirtualRoot, out string binPath)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void GetServerPhysicalPath(string rootWebServer, string inBaseUrl, string inVirtualRoot, out string physicalPath)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void Present()
		{
			throw new NotImplementedException();
		}
	}
}
namespace System.EnterpriseServices.CompensatingResourceManager
{
	[AttributeUsage(AttributeTargets.Assembly)]
	[ComVisible(false)]
	[ProgId("System.EnterpriseServices.Crm.ApplicationCrmEnabledAttribute")]
	public sealed class ApplicationCrmEnabledAttribute : Attribute
	{
		private bool val;

		public bool Value => val;

		public ApplicationCrmEnabledAttribute()
		{
			val = true;
		}

		public ApplicationCrmEnabledAttribute(bool val)
		{
			this.val = val;
		}
	}
	public sealed class Clerk
	{
		public int LogRecordCount
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		public string TransactionUOW
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public Clerk(string compensator, string description, CompensatorOptions flags)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public Clerk(Type compensator, string description, CompensatorOptions flags)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		~Clerk()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void ForceLog()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void ForceTransactionToAbort()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void ForgetLogRecord()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void WriteLogRecord(object record)
		{
			throw new NotImplementedException();
		}
	}
	public sealed class ClerkInfo
	{
		[MonoTODO]
		public string ActivityId
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public Clerk Clerk
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public string Compensator
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public string Description
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public string InstanceId
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public string TransactionUOW
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		~ClerkInfo()
		{
			throw new NotImplementedException();
		}

		internal ClerkInfo()
		{
		}
	}
	public sealed class ClerkMonitor : IEnumerable
	{
		[MonoTODO]
		public int Count
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public ClerkInfo this[string index]
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public ClerkInfo this[int index]
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		~ClerkMonitor()
		{
		}

		[MonoTODO]
		public ClerkMonitor()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public IEnumerator GetEnumerator()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public void Populate()
		{
			throw new NotImplementedException();
		}
	}
	public class Compensator : ServicedComponent
	{
		public Clerk Clerk
		{
			[MonoTODO]
			get
			{
				throw new NotImplementedException();
			}
		}

		[MonoTODO]
		public Compensator()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public virtual bool AbortRecord(LogRecord rec)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public virtual void BeginAbort(bool fRecovery)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public virtual void BeginCommit(bool fRecovery)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public virtual void BeginPrepare()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public virtual bool CommitRecord(LogRecord rec)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public virtual void EndAbort()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public virtual void EndCommit()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public virtual bool EndPrepare()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public virtual bool PrepareRecord(LogRecord rec)
		{
			throw new NotImplementedException();
		}
	}
	[Serializable]
	[Flags]
	public enum CompensatorOptions
	{
		PreparePhase = 1,
		CommitPhase = 2,
		AbortPhase = 4,
		AllPhases = 7,
		FailIfInDoubtsRemain = 0x10
	}
	public sealed class LogRecord
	{
		private LogRecordFlags flags;

		private object record;

		private int sequence;

		public LogRecordFlags Flags => flags;

		public object Record => record;

		public int Sequence => sequence;

		[MonoTODO]
		internal LogRecord()
		{
		}

		[MonoTODO]
		internal LogRecord(_LogRecord logRecord)
		{
			flags = (LogRecordFlags)logRecord.dwCrmFlags;
			sequence = logRecord.dwSequenceNumber;
			record = logRecord.blobUserData;
		}
	}
	internal struct _LogRecord
	{
		public int dwCrmFlags;

		public int dwSequenceNumber;

		public object blobUserData;
	}
	[Serializable]
	[Flags]
	public enum LogRecordFlags
	{
		ForgetTarget = 1,
		WrittenDuringPrepare = 2,
		WrittenDuringCommit = 4,
		WrittenDuringAbort = 8,
		WrittenDurringRecovery = 0x10,
		WrittenDuringReplay = 0x20,
		ReplayInProgress = 0x40
	}
	[Serializable]
	public enum TransactionState
	{
		Active,
		Committed,
		Aborted,
		Indoubt
	}
}
namespace Unity
{
	internal sealed class ThrowStub : ObjectDisposedException
	{
		public static void ThrowNotSupportedException()
		{
			throw new PlatformNotSupportedException();
		}
	}
}

Room Architect Tool_Data/Managed/System.Globalization.Extensions.dll

Decompiled 3 months ago
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.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("System.Globalization.Extensions")]
[assembly: AssemblyDescription("System.Globalization.Extensions")]
[assembly: AssemblyDefaultAlias("System.Globalization.Extensions")]
[assembly: AssemblyCompany("Mono development team")]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright("(c) Various Mono authors")]
[assembly: AssemblyInformationalVersion("4.0.0.0")]
[assembly: AssemblyFileVersion("4.0.0.0")]
[assembly: AssemblyVersion("4.1.1.0")]
[assembly: TypeForwardedTo(typeof(IdnMapping))]
[assembly: TypeForwardedTo(typeof(NormalizationForm))]
internal class SR
{
	public const string Argument_InvalidFlag = "Value of flags is invalid.";
}
namespace System
{
	public static class StringNormalizationExtensions
	{
		public static bool IsNormalized(this string strInput)
		{
			return IsNormalized(strInput, NormalizationForm.FormC);
		}

		public static bool IsNormalized(this string strInput, NormalizationForm normalizationForm)
		{
			if (strInput == null)
			{
				throw new ArgumentNullException("strInput");
			}
			return strInput.IsNormalized(normalizationForm);
		}

		public static string Normalize(this string strInput)
		{
			return Normalize(strInput, NormalizationForm.FormC);
		}

		public static string Normalize(this string strInput, NormalizationForm normalizationForm)
		{
			if (strInput == null)
			{
				throw new ArgumentNullException("strInput");
			}
			return strInput.Normalize(normalizationForm);
		}
	}
}
namespace System.Globalization
{
	public static class GlobalizationExtensions
	{
		public static StringComparer GetStringComparer(this CompareInfo compareInfo, CompareOptions options)
		{
			if (compareInfo == null)
			{
				throw new ArgumentNullException("compareInfo");
			}
			switch (options)
			{
			case CompareOptions.Ordinal:
				return StringComparer.Ordinal;
			case CompareOptions.OrdinalIgnoreCase:
				return StringComparer.OrdinalIgnoreCase;
			default:
				if (((uint)options & 0xDFFFFFE0u) != 0)
				{
					throw new ArgumentException("Value of flags is invalid.", "options");
				}
				return new CultureAwareComparer(compareInfo, options);
			}
		}
	}
	[Serializable]
	internal sealed class CultureAwareComparer : StringComparer
	{
		internal const CompareOptions ValidCompareMaskOffFlags = ~(CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace | CompareOptions.IgnoreSymbols | CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth | CompareOptions.StringSort);

		private readonly CompareInfo _compareInfo;

		private readonly CompareOptions _options;

		internal CultureAwareComparer(CompareInfo compareInfo, CompareOptions options)
		{
			_compareInfo = compareInfo;
			_options = options;
		}

		public override int Compare(string x, string y)
		{
			if ((object)x == y)
			{
				return 0;
			}
			if (x == null)
			{
				return -1;
			}
			if (y == null)
			{
				return 1;
			}
			return _compareInfo.Compare(x, y, _options);
		}

		public override bool Equals(string x, string y)
		{
			if ((object)x == y)
			{
				return true;
			}
			if (x == null || y == null)
			{
				return false;
			}
			return _compareInfo.Compare(x, y, _options) == 0;
		}

		public override int GetHashCode(string obj)
		{
			if (obj == null)
			{
				throw new ArgumentNullException("obj");
			}
			return _compareInfo.GetHashCode(obj, _options & ~CompareOptions.StringSort);
		}

		public override bool Equals(object obj)
		{
			if (obj is CultureAwareComparer cultureAwareComparer && _options == cultureAwareComparer._options)
			{
				return _compareInfo.Equals(cultureAwareComparer._compareInfo);
			}
			return false;
		}

		public override int GetHashCode()
		{
			return _compareInfo.GetHashCode() ^ (int)(_options & (CompareOptions)2147483647);
		}
	}
}

Room Architect Tool_Data/Managed/System.IO.Compression.dll

Decompiled 3 months ago
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Globalization;
using System.IO.Compression;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Unity;

[assembly: AssemblyDelaySign(true)]
[assembly: AssemblyInformationalVersion("4.6.57.0")]
[assembly: AssemblyCopyright("(c) Various Mono authors")]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: AssemblyCompany("Mono development team")]
[assembly: AssemblyDefaultAlias("System.IO.Compression.dll")]
[assembly: AssemblyDescription("System.IO.Compression.dll")]
[assembly: AssemblyTitle("System.IO.Compression.dll")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: CompilationRelaxations(8)]
[assembly: AssemblyFileVersion("4.6.57.0")]
[assembly: AssemblyVersion("4.0.0.0")]
[assembly: TypeForwardedTo(typeof(CompressionLevel))]
[assembly: TypeForwardedTo(typeof(CompressionMode))]
[assembly: TypeForwardedTo(typeof(DeflateStream))]
[assembly: TypeForwardedTo(typeof(GZipStream))]
internal static class Consts
{
	public const string MonoVersion = "5.11.0.0";

	public const string MonoCompany = "Mono development team";

	public const string MonoProduct = "Mono Common Language Infrastructure";

	public const string MonoCopyright = "(c) Various Mono authors";

	public const int MonoCorlibVersion = 1051100001;

	public const string FxVersion = "4.0.0.0";

	public const string FxFileVersion = "4.6.57.0";

	public const string EnvironmentVersion = "4.0.30319.42000";

	public const string VsVersion = "0.0.0.0";

	public const string VsFileVersion = "11.0.0.0";

	private const string PublicKeyToken = "b77a5c561934e089";

	public const string AssemblyI18N = "I18N, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMicrosoft_JScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMono_Http = "Mono.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Posix = "Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Security = "Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Messaging_RabbitMQ = "Mono.Messaging.RabbitMQ, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyCorlib = "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Data = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Design = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing_Design = "System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Messaging = "System.Messaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Security = "System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Web = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Core = "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string WindowsBase_3_0 = "WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
internal static class SR
{
	public const string ArgumentOutOfRange_Enum = "Enum value was out of legal range.";

	public const string ArgumentOutOfRange_NeedPosNum = "Positive number required.";

	public const string CannotReadFromDeflateStream = "Reading from the compression stream is not supported.";

	public const string CannotWriteToDeflateStream = "Writing to the compression stream is not supported.";

	public const string GenericInvalidData = "Found invalid data while decoding.";

	public const string InvalidArgumentOffsetCount = "Offset plus count is larger than the length of target array.";

	public const string InvalidBeginCall = "Only one asynchronous reader or writer is allowed time at one time.";

	public const string InvalidBlockLength = "Block length does not match with its complement.";

	public const string InvalidHuffmanData = "Failed to construct a huffman tree using the length array. The stream might be corrupted.";

	public const string NotSupported = "This operation is not supported.";

	public const string NotSupported_UnreadableStream = "Stream does not support reading.";

	public const string NotSupported_UnwritableStream = "Stream does not support writing.";

	public const string ObjectDisposed_StreamClosed = "Can not access a closed Stream.";

	public const string UnknownBlockType = "Unknown block type. Stream might be corrupted.";

	public const string UnknownState = "Decoder is in some unknown state. This might be caused by corrupted data.";

	public const string ZLibErrorDLLLoadError = "The underlying compression routine could not be loaded correctly.";

	public const string ZLibErrorInconsistentStream = "The stream state of the underlying compression routine is inconsistent.";

	public const string ZLibErrorIncorrectInitParameters = "The underlying compression routine received incorrect initialization parameters.";

	public const string ZLibErrorNotEnoughMemory = "The underlying compression routine could not reserve sufficient memory.";

	public const string ZLibErrorVersionMismatch = "The version of the underlying compression routine does not match expected version.";

	public const string ZLibErrorUnexpected = "The underlying compression routine returned an unexpected error code.";

	public const string CorruptedGZipHeader = "The magic number in GZip header is not correct. Make sure you are passing in a GZip stream.";

	public const string UnknownCompressionMode = "The compression mode specified in GZip header is unknown.";

	public const string InvalidCRC = "The CRC in GZip footer does not match the CRC calculated from the decompressed data.";

	public const string InvalidStreamSize = "The stream size in GZip footer does not match the real stream size.";

	public const string ArgumentNeedNonNegative = "The argument must be non-negative.";

	public const string CannotBeEmpty = "String cannot be empty.";

	public const string CDCorrupt = "Central Directory corrupt.";

	public const string CentralDirectoryInvalid = "Central Directory is invalid.";

	public const string CreateInReadMode = "Cannot create entries on an archive opened in read mode.";

	public const string CreateModeCapabilities = "Cannot use create mode on a non-writable stream.";

	public const string CreateModeCreateEntryWhileOpen = "Entries cannot be created while previously created entries are still open.";

	public const string CreateModeWriteOnceAndOneEntryAtATime = "Entries in create mode may only be written to once, and only one entry may be held open at a time.";

	public const string DateTimeOutOfRange = "The DateTimeOffset specified cannot be converted into a Zip file timestamp.";

	public const string DeletedEntry = "Cannot modify deleted entry.";

	public const string DeleteOnlyInUpdate = "Delete can only be used when the archive is in Update mode.";

	public const string DeleteOpenEntry = "Cannot delete an entry currently open for writing.";

	public const string EntriesInCreateMode = "Cannot access entries in Create mode.";

	public const string EntryNameEncodingNotSupported = "The specified entry name encoding is not supported.";

	public const string EntryNamesTooLong = "Entry names cannot require more than 2^16 bits.";

	public const string EntryTooLarge = "Entries larger than 4GB are not supported in Update mode.";

	public const string EOCDNotFound = "End of Central Directory record could not be found.";

	public const string FieldTooBigCompressedSize = "Compressed Size cannot be held in an Int64.";

	public const string FieldTooBigLocalHeaderOffset = "Local Header Offset cannot be held in an Int64.";

	public const string FieldTooBigNumEntries = "Number of Entries cannot be held in an Int64.";

	public const string FieldTooBigOffsetToCD = "Offset to Central Directory cannot be held in an Int64.";

	public const string FieldTooBigOffsetToZip64EOCD = "Offset to Zip64 End Of Central Directory record cannot be held in an Int64.";

	public const string FieldTooBigStartDiskNumber = "Start Disk Number cannot be held in an Int64.";

	public const string FieldTooBigUncompressedSize = "Uncompressed Size cannot be held in an Int64.";

	public const string FrozenAfterWrite = "Cannot modify entry in Create mode after entry has been opened for writing.";

	public const string HiddenStreamName = "A stream from ZipArchiveEntry has been disposed.";

	public const string LengthAfterWrite = "Length properties are unavailable once an entry has been opened for writing.";

	public const string LocalFileHeaderCorrupt = "A local file header is corrupt.";

	public const string NumEntriesWrong = "Number of entries expected in End Of Central Directory does not correspond to number of entries in Central Directory.";

	public const string OffsetLengthInvalid = "The offset and length parameters are not valid for the array that was given.";

	public const string ReadingNotSupported = "This stream from ZipArchiveEntry does not support reading.";

	public const string ReadModeCapabilities = "Cannot use read mode on a non-readable stream.";

	public const string ReadOnlyArchive = "Cannot modify read-only archive.";

	public const string SeekingNotSupported = "This stream from ZipArchiveEntry does not support seeking.";

	public const string SetLengthRequiresSeekingAndWriting = "SetLength requires a stream that supports seeking and writing.";

	public const string SplitSpanned = "Split or spanned archives are not supported.";

	public const string UnexpectedEndOfStream = "Zip file corrupt: unexpected end of stream reached.";

	public const string UnsupportedCompression = "The archive entry was compressed using an unsupported compression method.";

	public const string UnsupportedCompressionMethod = "The archive entry was compressed using {0} and is not supported.";

	public const string UpdateModeCapabilities = "Update mode requires a stream with read, write, and seek capabilities.";

	public const string UpdateModeOneStream = "Entries cannot be opened multiple times in Update mode.";

	public const string WritingNotSupported = "This stream from ZipArchiveEntry does not support writing.";

	public const string Zip64EOCDNotWhereExpected = "Zip 64 End of Central Directory Record not where indicated.";

	public const string Argument_InvalidPathChars = "Illegal characters in path.";

	public const string FileNameContainsInvalidCharacters = "An entry in the ZipArchive has a path that contains invalid characters.";

	internal static string GetString(string name, params object[] args)
	{
		return GetString(CultureInfo.InvariantCulture, name, args);
	}

	internal static string GetString(CultureInfo culture, string name, params object[] args)
	{
		return string.Format(culture, name, args);
	}

	internal static string GetString(string name)
	{
		return name;
	}

	internal static string GetString(CultureInfo culture, string name)
	{
		return name;
	}

	internal static string Format(string resourceFormat, params object[] args)
	{
		if (args != null)
		{
			return string.Format(CultureInfo.InvariantCulture, resourceFormat, args);
		}
		return resourceFormat;
	}

	internal static string Format(string resourceFormat, object p1)
	{
		return string.Format(CultureInfo.InvariantCulture, resourceFormat, p1);
	}

	internal static string Format(string resourceFormat, object p1, object p2)
	{
		return string.Format(CultureInfo.InvariantCulture, resourceFormat, p1, p2);
	}

	internal static string Format(string resourceFormat, object p1, object p2, object p3)
	{
		return string.Format(CultureInfo.InvariantCulture, resourceFormat, p1, p2, p3);
	}
}
namespace System.Runtime.CompilerServices
{
	internal class FriendAccessAllowedAttribute : Attribute
	{
	}
}
namespace System.IO.Compression
{
	internal enum BlockType
	{
		Uncompressed,
		Static,
		Dynamic
	}
	internal sealed class CopyEncoder
	{
		private const int PaddingSize = 5;

		private const int MaxUncompressedBlockSize = 65536;

		public void GetBlock(DeflateInput input, OutputBuffer output, bool isFinal)
		{
			int num = 0;
			if (input != null)
			{
				num = Math.Min(input.Count, output.FreeBytes - 5 - output.BitsInBuffer);
				if (num > 65531)
				{
					num = 65531;
				}
			}
			if (isFinal)
			{
				output.WriteBits(3, 1u);
			}
			else
			{
				output.WriteBits(3, 0u);
			}
			output.FlushBits();
			WriteLenNLen((ushort)num, output);
			if (input != null && num > 0)
			{
				output.WriteBytes(input.Buffer, input.StartIndex, num);
				input.ConsumeBytes(num);
			}
		}

		private void WriteLenNLen(ushort len, OutputBuffer output)
		{
			output.WriteUInt16(len);
			ushort value = (ushort)(~len);
			output.WriteUInt16(value);
		}
	}
	internal sealed class DeflateInput
	{
		internal struct InputState
		{
			internal readonly int _count;

			internal readonly int _startIndex;

			internal InputState(int count, int startIndex)
			{
				_count = count;
				_startIndex = startIndex;
			}
		}

		internal byte[] Buffer { get; set; }

		internal int Count { get; set; }

		internal int StartIndex { get; set; }

		internal void ConsumeBytes(int n)
		{
			StartIndex += n;
			Count -= n;
		}

		internal InputState DumpState()
		{
			return new InputState(Count, StartIndex);
		}

		internal void RestoreState(InputState state)
		{
			Count = state._count;
			StartIndex = state._startIndex;
		}
	}
	internal sealed class DeflateManagedStream : Stream
	{
		internal const int DefaultBufferSize = 8192;

		private Stream _stream;

		private CompressionMode _mode;

		private bool _leaveOpen;

		private System.IO.Compression.InflaterManaged _inflater;

		private DeflaterManaged _deflater;

		private byte[] _buffer;

		private int _asyncOperations;

		private IFileFormatWriter _formatWriter;

		private bool _wroteHeader;

		private bool _wroteBytes;

		public override bool CanRead
		{
			get
			{
				//IL_000b: Unknown result type (might be due to invalid IL or missing references)
				if (_stream == null)
				{
					return false;
				}
				if ((int)_mode == 0)
				{
					return _stream.CanRead;
				}
				return false;
			}
		}

		public override bool CanWrite
		{
			get
			{
				//IL_000b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0011: Invalid comparison between Unknown and I4
				if (_stream == null)
				{
					return false;
				}
				if ((int)_mode == 1)
				{
					return _stream.CanWrite;
				}
				return false;
			}
		}

		public override bool CanSeek => false;

		public override long Length
		{
			get
			{
				throw new NotSupportedException("This operation is not supported.");
			}
		}

		public override long Position
		{
			get
			{
				throw new NotSupportedException("This operation is not supported.");
			}
			set
			{
				throw new NotSupportedException("This operation is not supported.");
			}
		}

		internal DeflateManagedStream(Stream stream, ZipArchiveEntry.CompressionMethodValues method)
		{
			if (stream == null)
			{
				throw new ArgumentNullException("stream");
			}
			if (!stream.CanRead)
			{
				throw new ArgumentException("Stream does not support reading.", "stream");
			}
			InitializeInflater(stream, leaveOpen: false, null, method);
		}

		internal void InitializeInflater(Stream stream, bool leaveOpen, IFileFormatReader reader = null, ZipArchiveEntry.CompressionMethodValues method = ZipArchiveEntry.CompressionMethodValues.Deflate)
		{
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			if (!stream.CanRead)
			{
				throw new ArgumentException("Stream does not support reading.", "stream");
			}
			_inflater = new System.IO.Compression.InflaterManaged(reader, method == ZipArchiveEntry.CompressionMethodValues.Deflate64);
			_stream = stream;
			_mode = (CompressionMode)0;
			_leaveOpen = leaveOpen;
			_buffer = new byte[8192];
		}

		internal void SetFileFormatWriter(IFileFormatWriter writer)
		{
			if (writer != null)
			{
				_formatWriter = writer;
			}
		}

		public override void Flush()
		{
			EnsureNotDisposed();
		}

		public override Task FlushAsync(CancellationToken cancellationToken)
		{
			EnsureNotDisposed();
			if (!cancellationToken.IsCancellationRequested)
			{
				return Task.CompletedTask;
			}
			return Task.FromCanceled(cancellationToken);
		}

		public override long Seek(long offset, SeekOrigin origin)
		{
			throw new NotSupportedException("This operation is not supported.");
		}

		public override void SetLength(long value)
		{
			throw new NotSupportedException("This operation is not supported.");
		}

		public override int Read(byte[] array, int offset, int count)
		{
			EnsureDecompressionMode();
			ValidateParameters(array, offset, count);
			EnsureNotDisposed();
			int num = offset;
			int num2 = count;
			while (true)
			{
				int num3 = _inflater.Inflate(array, num, num2);
				num += num3;
				num2 -= num3;
				if (num2 == 0 || _inflater.Finished())
				{
					break;
				}
				int num4 = _stream.Read(_buffer, 0, _buffer.Length);
				if (num4 <= 0)
				{
					break;
				}
				if (num4 > _buffer.Length)
				{
					throw new InvalidDataException("Found invalid data while decoding.");
				}
				_inflater.SetInput(_buffer, 0, num4);
			}
			return count - num2;
		}

		private void ValidateParameters(byte[] array, int offset, int count)
		{
			if (array == null)
			{
				throw new ArgumentNullException("array");
			}
			if (offset < 0)
			{
				throw new ArgumentOutOfRangeException("offset");
			}
			if (count < 0)
			{
				throw new ArgumentOutOfRangeException("count");
			}
			if (array.Length - offset < count)
			{
				throw new ArgumentException("Offset plus count is larger than the length of target array.");
			}
		}

		private void EnsureNotDisposed()
		{
			if (_stream == null)
			{
				ThrowStreamClosedException();
			}
		}

		[MethodImpl(MethodImplOptions.NoInlining)]
		private static void ThrowStreamClosedException()
		{
			throw new ObjectDisposedException(null, "Can not access a closed Stream.");
		}

		private void EnsureDecompressionMode()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			if ((int)_mode != 0)
			{
				ThrowCannotReadFromDeflateManagedStreamException();
			}
		}

		[MethodImpl(MethodImplOptions.NoInlining)]
		private static void ThrowCannotReadFromDeflateManagedStreamException()
		{
			throw new InvalidOperationException("Reading from the compression stream is not supported.");
		}

		private void EnsureCompressionMode()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Invalid comparison between Unknown and I4
			if ((int)_mode != 1)
			{
				ThrowCannotWriteToDeflateManagedStreamException();
			}
		}

		[MethodImpl(MethodImplOptions.NoInlining)]
		private static void ThrowCannotWriteToDeflateManagedStreamException()
		{
			throw new InvalidOperationException("Writing to the compression stream is not supported.");
		}

		public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState)
		{
			return System.Threading.Tasks.TaskToApm.Begin(ReadAsync(buffer, offset, count, CancellationToken.None), asyncCallback, asyncState);
		}

		public override int EndRead(IAsyncResult asyncResult)
		{
			return System.Threading.Tasks.TaskToApm.End<int>(asyncResult);
		}

		public override Task<int> ReadAsync(byte[] array, int offset, int count, CancellationToken cancellationToken)
		{
			EnsureDecompressionMode();
			if (_asyncOperations != 0)
			{
				throw new InvalidOperationException("Only one asynchronous reader or writer is allowed time at one time.");
			}
			ValidateParameters(array, offset, count);
			EnsureNotDisposed();
			if (cancellationToken.IsCancellationRequested)
			{
				return Task.FromCanceled<int>(cancellationToken);
			}
			Interlocked.Increment(ref _asyncOperations);
			Task<int> task = null;
			try
			{
				int num = _inflater.Inflate(array, offset, count);
				if (num != 0)
				{
					return Task.FromResult(num);
				}
				if (_inflater.Finished())
				{
					return Task.FromResult(0);
				}
				task = _stream.ReadAsync(_buffer, 0, _buffer.Length, cancellationToken);
				if (task == null)
				{
					throw new InvalidOperationException("Stream does not support reading.");
				}
				return ReadAsyncCore(task, array, offset, count, cancellationToken);
			}
			finally
			{
				if (task == null)
				{
					Interlocked.Decrement(ref _asyncOperations);
				}
			}
		}

		private async Task<int> ReadAsyncCore(Task<int> readTask, byte[] array, int offset, int count, CancellationToken cancellationToken)
		{
			try
			{
				int num;
				while (true)
				{
					num = await readTask.ConfigureAwait(continueOnCapturedContext: false);
					EnsureNotDisposed();
					if (num <= 0)
					{
						return 0;
					}
					if (num > _buffer.Length)
					{
						throw new InvalidDataException("Found invalid data while decoding.");
					}
					cancellationToken.ThrowIfCancellationRequested();
					_inflater.SetInput(_buffer, 0, num);
					num = _inflater.Inflate(array, offset, count);
					if (num != 0 || _inflater.Finished())
					{
						break;
					}
					readTask = _stream.ReadAsync(_buffer, 0, _buffer.Length, cancellationToken);
					if (readTask == null)
					{
						throw new InvalidOperationException("Stream does not support reading.");
					}
				}
				return num;
			}
			finally
			{
				Interlocked.Decrement(ref _asyncOperations);
			}
		}

		public override void Write(byte[] array, int offset, int count)
		{
			EnsureCompressionMode();
			ValidateParameters(array, offset, count);
			EnsureNotDisposed();
			DoMaintenance(array, offset, count);
			WriteDeflaterOutput();
			_deflater.SetInput(array, offset, count);
			WriteDeflaterOutput();
		}

		private void WriteDeflaterOutput()
		{
			while (!_deflater.NeedsInput())
			{
				int deflateOutput = _deflater.GetDeflateOutput(_buffer);
				if (deflateOutput > 0)
				{
					_stream.Write(_buffer, 0, deflateOutput);
				}
			}
		}

		private void DoMaintenance(byte[] array, int offset, int count)
		{
			if (count <= 0)
			{
				return;
			}
			_wroteBytes = true;
			if (_formatWriter != null)
			{
				if (!_wroteHeader)
				{
					byte[] header = _formatWriter.GetHeader();
					_stream.Write(header, 0, header.Length);
					_wroteHeader = true;
				}
				_formatWriter.UpdateWithBytesRead(array, offset, count);
			}
		}

		private void PurgeBuffers(bool disposing)
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Invalid comparison between Unknown and I4
			if (!disposing || _stream == null)
			{
				return;
			}
			Flush();
			if ((int)_mode != 1)
			{
				return;
			}
			if (_wroteBytes)
			{
				WriteDeflaterOutput();
				bool flag;
				do
				{
					flag = _deflater.Finish(_buffer, out var bytesRead);
					if (bytesRead > 0)
					{
						_stream.Write(_buffer, 0, bytesRead);
					}
				}
				while (!flag);
			}
			else
			{
				int bytesRead2;
				while (!_deflater.Finish(_buffer, out bytesRead2))
				{
				}
			}
			if (_formatWriter != null && _wroteHeader)
			{
				byte[] footer = _formatWriter.GetFooter();
				_stream.Write(footer, 0, footer.Length);
			}
		}

		protected override void Dispose(bool disposing)
		{
			try
			{
				PurgeBuffers(disposing);
			}
			finally
			{
				try
				{
					if (disposing && !_leaveOpen && _stream != null)
					{
						_stream.Dispose();
					}
				}
				finally
				{
					_stream = null;
					try
					{
						_deflater?.Dispose();
						_inflater?.Dispose();
					}
					finally
					{
						_deflater = null;
						_inflater = null;
						base.Dispose(disposing);
					}
				}
			}
		}

		public override Task WriteAsync(byte[] array, int offset, int count, CancellationToken cancellationToken)
		{
			EnsureCompressionMode();
			if (_asyncOperations != 0)
			{
				throw new InvalidOperationException("Only one asynchronous reader or writer is allowed time at one time.");
			}
			ValidateParameters(array, offset, count);
			EnsureNotDisposed();
			if (cancellationToken.IsCancellationRequested)
			{
				return Task.FromCanceled<int>(cancellationToken);
			}
			return WriteAsyncCore(array, offset, count, cancellationToken);
		}

		private async Task WriteAsyncCore(byte[] array, int offset, int count, CancellationToken cancellationToken)
		{
			Interlocked.Increment(ref _asyncOperations);
			try
			{
				await base.WriteAsync(array, offset, count, cancellationToken).ConfigureAwait(continueOnCapturedContext: false);
			}
			finally
			{
				Interlocked.Decrement(ref _asyncOperations);
			}
		}

		public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState)
		{
			return System.Threading.Tasks.TaskToApm.Begin(WriteAsync(buffer, offset, count, CancellationToken.None), asyncCallback, asyncState);
		}

		public override void EndWrite(IAsyncResult asyncResult)
		{
			System.Threading.Tasks.TaskToApm.End(asyncResult);
		}
	}
	internal sealed class DeflaterManaged : IDisposable
	{
		private enum DeflaterState
		{
			NotStarted,
			SlowDownForIncompressible1,
			SlowDownForIncompressible2,
			StartingSmallData,
			CompressThenCheck,
			CheckingForIncompressible,
			HandlingSmallData
		}

		private const int MinBlockSize = 256;

		private const int MaxHeaderFooterGoo = 120;

		private const int CleanCopySize = 8072;

		private const double BadCompressionThreshold = 1.0;

		private readonly FastEncoder _deflateEncoder;

		private readonly CopyEncoder _copyEncoder;

		private readonly DeflateInput _input;

		private readonly OutputBuffer _output;

		private DeflaterState _processingState;

		private DeflateInput _inputFromHistory;

		internal DeflaterManaged()
		{
			_deflateEncoder = new FastEncoder();
			_copyEncoder = new CopyEncoder();
			_input = new DeflateInput();
			_output = new OutputBuffer();
			_processingState = DeflaterState.NotStarted;
		}

		internal bool NeedsInput()
		{
			if (_input.Count == 0)
			{
				return _deflateEncoder.BytesInHistory == 0;
			}
			return false;
		}

		internal void SetInput(byte[] inputBuffer, int startIndex, int count)
		{
			_input.Buffer = inputBuffer;
			_input.Count = count;
			_input.StartIndex = startIndex;
			if (count > 0 && count < 256)
			{
				switch (_processingState)
				{
				case DeflaterState.NotStarted:
				case DeflaterState.CheckingForIncompressible:
					_processingState = DeflaterState.StartingSmallData;
					break;
				case DeflaterState.CompressThenCheck:
					_processingState = DeflaterState.HandlingSmallData;
					break;
				}
			}
		}

		internal int GetDeflateOutput(byte[] outputBuffer)
		{
			_output.UpdateBuffer(outputBuffer);
			switch (_processingState)
			{
			case DeflaterState.NotStarted:
			{
				DeflateInput.InputState state3 = _input.DumpState();
				OutputBuffer.BufferState state4 = _output.DumpState();
				_deflateEncoder.GetBlockHeader(_output);
				_deflateEncoder.GetCompressedData(_input, _output);
				if (!UseCompressed(_deflateEncoder.LastCompressionRatio))
				{
					_input.RestoreState(state3);
					_output.RestoreState(state4);
					_copyEncoder.GetBlock(_input, _output, isFinal: false);
					FlushInputWindows();
					_processingState = DeflaterState.CheckingForIncompressible;
				}
				else
				{
					_processingState = DeflaterState.CompressThenCheck;
				}
				break;
			}
			case DeflaterState.CompressThenCheck:
				_deflateEncoder.GetCompressedData(_input, _output);
				if (!UseCompressed(_deflateEncoder.LastCompressionRatio))
				{
					_processingState = DeflaterState.SlowDownForIncompressible1;
					_inputFromHistory = _deflateEncoder.UnprocessedInput;
				}
				break;
			case DeflaterState.SlowDownForIncompressible1:
				_deflateEncoder.GetBlockFooter(_output);
				_processingState = DeflaterState.SlowDownForIncompressible2;
				goto case DeflaterState.SlowDownForIncompressible2;
			case DeflaterState.SlowDownForIncompressible2:
				if (_inputFromHistory.Count > 0)
				{
					_copyEncoder.GetBlock(_inputFromHistory, _output, isFinal: false);
				}
				if (_inputFromHistory.Count == 0)
				{
					_deflateEncoder.FlushInput();
					_processingState = DeflaterState.CheckingForIncompressible;
				}
				break;
			case DeflaterState.CheckingForIncompressible:
			{
				DeflateInput.InputState state = _input.DumpState();
				OutputBuffer.BufferState state2 = _output.DumpState();
				_deflateEncoder.GetBlock(_input, _output, 8072);
				if (!UseCompressed(_deflateEncoder.LastCompressionRatio))
				{
					_input.RestoreState(state);
					_output.RestoreState(state2);
					_copyEncoder.GetBlock(_input, _output, isFinal: false);
					FlushInputWindows();
				}
				break;
			}
			case DeflaterState.StartingSmallData:
				_deflateEncoder.GetBlockHeader(_output);
				_processingState = DeflaterState.HandlingSmallData;
				goto case DeflaterState.HandlingSmallData;
			case DeflaterState.HandlingSmallData:
				_deflateEncoder.GetCompressedData(_input, _output);
				break;
			}
			return _output.BytesWritten;
		}

		internal bool Finish(byte[] outputBuffer, out int bytesRead)
		{
			if (_processingState == DeflaterState.NotStarted)
			{
				bytesRead = 0;
				return true;
			}
			_output.UpdateBuffer(outputBuffer);
			if (_processingState == DeflaterState.CompressThenCheck || _processingState == DeflaterState.HandlingSmallData || _processingState == DeflaterState.SlowDownForIncompressible1)
			{
				_deflateEncoder.GetBlockFooter(_output);
			}
			WriteFinal();
			bytesRead = _output.BytesWritten;
			return true;
		}

		private bool UseCompressed(double ratio)
		{
			return ratio <= 1.0;
		}

		private void FlushInputWindows()
		{
			_deflateEncoder.FlushInput();
		}

		private void WriteFinal()
		{
			_copyEncoder.GetBlock(null, _output, isFinal: true);
		}

		public void Dispose()
		{
		}
	}
	internal sealed class FastEncoder
	{
		private readonly FastEncoderWindow _inputWindow;

		private readonly Match _currentMatch;

		private double _lastCompressionRatio;

		internal int BytesInHistory => _inputWindow.BytesAvailable;

		internal DeflateInput UnprocessedInput => _inputWindow.UnprocessedInput;

		internal double LastCompressionRatio => _lastCompressionRatio;

		public FastEncoder()
		{
			_inputWindow = new FastEncoderWindow();
			_currentMatch = new Match();
		}

		internal void FlushInput()
		{
			_inputWindow.FlushWindow();
		}

		internal void GetBlock(DeflateInput input, OutputBuffer output, int maxBytesToCopy)
		{
			WriteDeflatePreamble(output);
			GetCompressedOutput(input, output, maxBytesToCopy);
			WriteEndOfBlock(output);
		}

		internal void GetCompressedData(DeflateInput input, OutputBuffer output)
		{
			GetCompressedOutput(input, output, -1);
		}

		internal void GetBlockHeader(OutputBuffer output)
		{
			WriteDeflatePreamble(output);
		}

		internal void GetBlockFooter(OutputBuffer output)
		{
			WriteEndOfBlock(output);
		}

		private void GetCompressedOutput(DeflateInput input, OutputBuffer output, int maxBytesToCopy)
		{
			int bytesWritten = output.BytesWritten;
			int num = 0;
			int num2 = BytesInHistory + input.Count;
			do
			{
				int num3 = ((input.Count < _inputWindow.FreeWindowSpace) ? input.Count : _inputWindow.FreeWindowSpace);
				if (maxBytesToCopy >= 1)
				{
					num3 = Math.Min(num3, maxBytesToCopy - num);
				}
				if (num3 > 0)
				{
					_inputWindow.CopyBytes(input.Buffer, input.StartIndex, num3);
					input.ConsumeBytes(num3);
					num += num3;
				}
				GetCompressedOutput(output);
			}
			while (SafeToWriteTo(output) && InputAvailable(input) && (maxBytesToCopy < 1 || num < maxBytesToCopy));
			int num4 = output.BytesWritten - bytesWritten;
			int num5 = BytesInHistory + input.Count;
			int num6 = num2 - num5;
			if (num4 != 0)
			{
				_lastCompressionRatio = (double)num4 / (double)num6;
			}
		}

		private void GetCompressedOutput(OutputBuffer output)
		{
			while (_inputWindow.BytesAvailable > 0 && SafeToWriteTo(output))
			{
				_inputWindow.GetNextSymbolOrMatch(_currentMatch);
				if (_currentMatch.State == MatchState.HasSymbol)
				{
					WriteChar(_currentMatch.Symbol, output);
					continue;
				}
				if (_currentMatch.State == MatchState.HasMatch)
				{
					WriteMatch(_currentMatch.Length, _currentMatch.Position, output);
					continue;
				}
				WriteChar(_currentMatch.Symbol, output);
				WriteMatch(_currentMatch.Length, _currentMatch.Position, output);
			}
		}

		private bool InputAvailable(DeflateInput input)
		{
			if (input.Count <= 0)
			{
				return BytesInHistory > 0;
			}
			return true;
		}

		private bool SafeToWriteTo(OutputBuffer output)
		{
			return output.FreeBytes > 16;
		}

		private void WriteEndOfBlock(OutputBuffer output)
		{
			uint num = FastEncoderStatics.FastEncoderLiteralCodeInfo[256];
			int n = (int)(num & 0x1F);
			output.WriteBits(n, num >> 5);
		}

		internal static void WriteMatch(int matchLen, int matchPos, OutputBuffer output)
		{
			uint num = FastEncoderStatics.FastEncoderLiteralCodeInfo[254 + matchLen];
			int num2 = (int)(num & 0x1F);
			if (num2 <= 16)
			{
				output.WriteBits(num2, num >> 5);
			}
			else
			{
				output.WriteBits(16, (num >> 5) & 0xFFFFu);
				output.WriteBits(num2 - 16, num >> 21);
			}
			num = FastEncoderStatics.FastEncoderDistanceCodeInfo[FastEncoderStatics.GetSlot(matchPos)];
			output.WriteBits((int)(num & 0xF), num >> 8);
			int num3 = (int)((num >> 4) & 0xF);
			if (num3 != 0)
			{
				output.WriteBits(num3, (uint)matchPos & FastEncoderStatics.BitMask[num3]);
			}
		}

		internal static void WriteChar(byte b, OutputBuffer output)
		{
			uint num = FastEncoderStatics.FastEncoderLiteralCodeInfo[b];
			output.WriteBits((int)(num & 0x1F), num >> 5);
		}

		internal static void WriteDeflatePreamble(OutputBuffer output)
		{
			output.WriteBytes(FastEncoderStatics.FastEncoderTreeStructureData, 0, FastEncoderStatics.FastEncoderTreeStructureData.Length);
			output.WriteBits(9, 34u);
		}
	}
	internal static class FastEncoderStatics
	{
		internal static readonly byte[] FastEncoderTreeStructureData = new byte[98]
		{
			236, 189, 7, 96, 28, 73, 150, 37, 38, 47,
			109, 202, 123, 127, 74, 245, 74, 215, 224, 116,
			161, 8, 128, 96, 19, 36, 216, 144, 64, 16,
			236, 193, 136, 205, 230, 146, 236, 29, 105, 71,
			35, 41, 171, 42, 129, 202, 101, 86, 101, 93,
			102, 22, 64, 204, 237, 157, 188, 247, 222, 123,
			239, 189, 247, 222, 123, 239, 189, 247, 186, 59,
			157, 78, 39, 247, 223, 255, 63, 92, 102, 100,
			1, 108, 246, 206, 74, 218, 201, 158, 33, 128,
			170, 200, 31, 63, 126, 124, 31, 63
		};

		internal static readonly byte[] BFinalFastEncoderTreeStructureData = new byte[98]
		{
			237, 189, 7, 96, 28, 73, 150, 37, 38, 47,
			109, 202, 123, 127, 74, 245, 74, 215, 224, 116,
			161, 8, 128, 96, 19, 36, 216, 144, 64, 16,
			236, 193, 136, 205, 230, 146, 236, 29, 105, 71,
			35, 41, 171, 42, 129, 202, 101, 86, 101, 93,
			102, 22, 64, 204, 237, 157, 188, 247, 222, 123,
			239, 189, 247, 222, 123, 239, 189, 247, 186, 59,
			157, 78, 39, 247, 223, 255, 63, 92, 102, 100,
			1, 108, 246, 206, 74, 218, 201, 158, 33, 128,
			170, 200, 31, 63, 126, 124, 31, 63
		};

		internal static readonly uint[] FastEncoderLiteralCodeInfo = new uint[513]
		{
			55278u, 317422u, 186350u, 448494u, 120814u, 382958u, 251886u, 514030u, 14318u, 51180u,
			294u, 276462u, 145390u, 407534u, 79854u, 341998u, 210926u, 473070u, 47086u, 309230u,
			178158u, 440302u, 112622u, 374766u, 243694u, 505838u, 30702u, 292846u, 161774u, 423918u,
			6125u, 96238u, 1318u, 358382u, 9194u, 116716u, 227310u, 489454u, 137197u, 25578u,
			2920u, 3817u, 23531u, 5098u, 1127u, 7016u, 3175u, 12009u, 1896u, 5992u,
			3944u, 7913u, 8040u, 16105u, 21482u, 489u, 232u, 8681u, 4585u, 4328u,
			12777u, 13290u, 2280u, 63470u, 325614u, 6376u, 2537u, 1256u, 10729u, 5352u,
			6633u, 29674u, 56299u, 3304u, 15339u, 194542u, 14825u, 3050u, 1513u, 19434u,
			9705u, 10220u, 5609u, 13801u, 3561u, 11242u, 75756u, 48107u, 456686u, 129006u,
			42988u, 31723u, 391150u, 64491u, 260078u, 522222u, 4078u, 806u, 615u, 2663u,
			1639u, 1830u, 7400u, 744u, 3687u, 166u, 108524u, 11753u, 1190u, 359u,
			2407u, 678u, 1383u, 71661u, 1702u, 422u, 1446u, 3431u, 4840u, 2792u,
			7657u, 6888u, 2027u, 202733u, 26604u, 38893u, 169965u, 266222u, 135150u, 397294u,
			69614u, 331758u, 200686u, 462830u, 36846u, 298990u, 167918u, 430062u, 102382u, 364526u,
			233454u, 495598u, 20462u, 282606u, 151534u, 413678u, 85998u, 348142u, 217070u, 479214u,
			53230u, 315374u, 184302u, 446446u, 118766u, 380910u, 249838u, 511982u, 12270u, 274414u,
			143342u, 405486u, 77806u, 339950u, 208878u, 471022u, 45038u, 307182u, 176110u, 438254u,
			110574u, 372718u, 241646u, 503790u, 28654u, 290798u, 159726u, 421870u, 94190u, 356334u,
			225262u, 487406u, 61422u, 323566u, 192494u, 454638u, 126958u, 389102u, 258030u, 520174u,
			8174u, 270318u, 139246u, 401390u, 73710u, 335854u, 204782u, 466926u, 40942u, 303086u,
			172014u, 434158u, 106478u, 368622u, 237550u, 499694u, 24558u, 286702u, 155630u, 417774u,
			90094u, 352238u, 221166u, 483310u, 57326u, 319470u, 188398u, 450542u, 122862u, 385006u,
			253934u, 516078u, 16366u, 278510u, 147438u, 409582u, 81902u, 344046u, 212974u, 475118u,
			49134u, 311278u, 180206u, 442350u, 114670u, 376814u, 245742u, 507886u, 32750u, 294894u,
			163822u, 425966u, 98286u, 104429u, 235501u, 22509u, 360430u, 153581u, 229358u, 88045u,
			491502u, 219117u, 65518u, 327662u, 196590u, 458734u, 131054u, 132u, 3u, 388u,
			68u, 324u, 197u, 709u, 453u, 966u, 1990u, 38u, 1062u, 935u,
			2983u, 1959u, 4007u, 551u, 1575u, 2599u, 3623u, 104u, 2152u, 4200u,
			6248u, 873u, 4969u, 9065u, 13161u, 1770u, 9962u, 18154u, 26346u, 5867u,
			14059u, 22251u, 30443u, 38635u, 46827u, 55019u, 63211u, 15852u, 32236u, 48620u,
			65004u, 81388u, 97772u, 114156u, 130540u, 27629u, 60397u, 93165u, 125933u, 158701u,
			191469u, 224237u, 257005u, 1004u, 17388u, 33772u, 50156u, 66540u, 82924u, 99308u,
			115692u, 7150u, 39918u, 72686u, 105454u, 138222u, 170990u, 203758u, 236526u, 269294u,
			302062u, 334830u, 367598u, 400366u, 433134u, 465902u, 498670u, 92144u, 223216u, 354288u,
			485360u, 616432u, 747504u, 878576u, 1009648u, 1140720u, 1271792u, 1402864u, 1533936u, 1665008u,
			1796080u, 1927152u, 2058224u, 34799u, 100335u, 165871u, 231407u, 296943u, 362479u, 428015u,
			493551u, 559087u, 624623u, 690159u, 755695u, 821231u, 886767u, 952303u, 1017839u, 59376u,
			190448u, 321520u, 452592u, 583664u, 714736u, 845808u, 976880u, 1107952u, 1239024u, 1370096u,
			1501168u, 1632240u, 1763312u, 1894384u, 2025456u, 393203u, 917491u, 1441779u, 1966067u, 2490355u,
			3014643u, 3538931u, 4063219u, 4587507u, 5111795u, 5636083u, 6160371u, 6684659u, 7208947u, 7733235u,
			8257523u, 8781811u, 9306099u, 9830387u, 10354675u, 10878963u, 11403251u, 11927539u, 12451827u, 12976115u,
			13500403u, 14024691u, 14548979u, 15073267u, 15597555u, 16121843u, 16646131u, 262131u, 786419u, 1310707u,
			1834995u, 2359283u, 2883571u, 3407859u, 3932147u, 4456435u, 4980723u, 5505011u, 6029299u, 6553587u,
			7077875u, 7602163u, 8126451u, 8650739u, 9175027u, 9699315u, 10223603u, 10747891u, 11272179u, 11796467u,
			12320755u, 12845043u, 13369331u, 13893619u, 14417907u, 14942195u, 15466483u, 15990771u, 16515059u, 524275u,
			1048563u, 1572851u, 2097139u, 2621427u, 3145715u, 3670003u, 4194291u, 4718579u, 5242867u, 5767155u,
			6291443u, 6815731u, 7340019u, 7864307u, 8388595u, 8912883u, 9437171u, 9961459u, 10485747u, 11010035u,
			11534323u, 12058611u, 12582899u, 13107187u, 13631475u, 14155763u, 14680051u, 15204339u, 15728627u, 16252915u,
			16777203u, 124913u, 255985u, 387057u, 518129u, 649201u, 780273u, 911345u, 1042417u, 1173489u,
			1304561u, 1435633u, 1566705u, 1697777u, 1828849u, 1959921u, 2090993u, 2222065u, 2353137u, 2484209u,
			2615281u, 2746353u, 2877425u, 3008497u, 3139569u, 3270641u, 3401713u, 3532785u, 3663857u, 3794929u,
			3926001u, 4057073u, 18411u
		};

		internal static readonly uint[] FastEncoderDistanceCodeInfo = new uint[32]
		{
			3846u, 130826u, 261899u, 524043u, 65305u, 16152u, 48936u, 32552u, 7991u, 24375u,
			3397u, 12102u, 84u, 7509u, 2148u, 869u, 1140u, 4981u, 3204u, 644u,
			2708u, 1684u, 3748u, 420u, 2484u, 2997u, 1476u, 7109u, 2005u, 6101u,
			0u, 256u
		};

		internal static readonly uint[] BitMask = new uint[16]
		{
			0u, 1u, 3u, 7u, 15u, 31u, 63u, 127u, 255u, 511u,
			1023u, 2047u, 4095u, 8191u, 16383u, 32767u
		};

		internal static readonly byte[] ExtraLengthBits = new byte[29]
		{
			0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
			1, 1, 2, 2, 2, 2, 3, 3, 3, 3,
			4, 4, 4, 4, 5, 5, 5, 5, 0
		};

		internal static readonly byte[] ExtraDistanceBits = new byte[32]
		{
			0, 0, 0, 0, 1, 1, 2, 2, 3, 3,
			4, 4, 5, 5, 6, 6, 7, 7, 8, 8,
			9, 9, 10, 10, 11, 11, 12, 12, 13, 13,
			0, 0
		};

		internal const int NumChars = 256;

		internal const int NumLengthBaseCodes = 29;

		internal const int NumDistBaseCodes = 30;

		internal const uint FastEncoderPostTreeBitBuf = 34u;

		internal const int FastEncoderPostTreeBitCount = 9;

		internal const uint NoCompressionHeader = 0u;

		internal const int NoCompressionHeaderBitCount = 3;

		internal const uint BFinalNoCompressionHeader = 1u;

		internal const int BFinalNoCompressionHeaderBitCount = 3;

		internal const int MaxCodeLen = 16;

		private static readonly byte[] s_distLookup = CreateDistanceLookup();

		private static byte[] CreateDistanceLookup()
		{
			byte[] array = new byte[512];
			int num = 0;
			int i;
			for (i = 0; i < 16; i++)
			{
				for (int j = 0; j < 1 << (int)ExtraDistanceBits[i]; j++)
				{
					array[num++] = (byte)i;
				}
			}
			num >>= 7;
			for (; i < 30; i++)
			{
				for (int k = 0; k < 1 << ExtraDistanceBits[i] - 7; k++)
				{
					array[256 + num++] = (byte)i;
				}
			}
			return array;
		}

		internal static int GetSlot(int pos)
		{
			return s_distLookup[(pos < 256) ? pos : (256 + (pos >> 7))];
		}

		public static uint BitReverse(uint code, int length)
		{
			uint num = 0u;
			do
			{
				num |= code & 1u;
				num <<= 1;
				code >>= 1;
			}
			while (--length > 0);
			return num >> 1;
		}
	}
	internal sealed class FastEncoderWindow
	{
		private byte[] _window;

		private int _bufPos;

		private int _bufEnd;

		private const int FastEncoderHashShift = 4;

		private const int FastEncoderHashtableSize = 2048;

		private const int FastEncoderHashMask = 2047;

		private const int FastEncoderWindowSize = 8192;

		private const int FastEncoderWindowMask = 8191;

		private const int FastEncoderMatch3DistThreshold = 16384;

		internal const int MaxMatch = 258;

		internal const int MinMatch = 3;

		private const int SearchDepth = 32;

		private const int GoodLength = 4;

		private const int NiceLength = 32;

		private const int LazyMatchThreshold = 6;

		private ushort[] _prev;

		private ushort[] _lookup;

		public int BytesAvailable => _bufEnd - _bufPos;

		public DeflateInput UnprocessedInput => new DeflateInput
		{
			Buffer = _window,
			StartIndex = _bufPos,
			Count = _bufEnd - _bufPos
		};

		public int FreeWindowSpace => 16384 - _bufEnd;

		public FastEncoderWindow()
		{
			ResetWindow();
		}

		public void FlushWindow()
		{
			ResetWindow();
		}

		private void ResetWindow()
		{
			_window = new byte[16646];
			_prev = new ushort[8450];
			_lookup = new ushort[2048];
			_bufPos = 8192;
			_bufEnd = _bufPos;
		}

		public void CopyBytes(byte[] inputBuffer, int startIndex, int count)
		{
			Array.Copy(inputBuffer, startIndex, _window, _bufEnd, count);
			_bufEnd += count;
		}

		public void MoveWindows()
		{
			Array.Copy(_window, _bufPos - 8192, _window, 0, 8192);
			for (int i = 0; i < 2048; i++)
			{
				int num = _lookup[i] - 8192;
				if (num <= 0)
				{
					_lookup[i] = 0;
				}
				else
				{
					_lookup[i] = (ushort)num;
				}
			}
			for (int i = 0; i < 8192; i++)
			{
				long num2 = (long)_prev[i] - 8192L;
				if (num2 <= 0)
				{
					_prev[i] = 0;
				}
				else
				{
					_prev[i] = (ushort)num2;
				}
			}
			_bufPos = 8192;
			_bufEnd = _bufPos;
		}

		private uint HashValue(uint hash, byte b)
		{
			return (hash << 4) ^ b;
		}

		private uint InsertString(ref uint hash)
		{
			hash = HashValue(hash, _window[_bufPos + 2]);
			uint num = _lookup[hash & 0x7FF];
			_lookup[hash & 0x7FF] = (ushort)_bufPos;
			_prev[_bufPos & 0x1FFF] = (ushort)num;
			return num;
		}

		private void InsertStrings(ref uint hash, int matchLen)
		{
			if (_bufEnd - _bufPos <= matchLen)
			{
				_bufPos += matchLen - 1;
				return;
			}
			while (--matchLen > 0)
			{
				InsertString(ref hash);
				_bufPos++;
			}
		}

		internal bool GetNextSymbolOrMatch(Match match)
		{
			uint hash = HashValue(0u, _window[_bufPos]);
			hash = HashValue(hash, _window[_bufPos + 1]);
			int matchPos = 0;
			int num;
			if (_bufEnd - _bufPos <= 3)
			{
				num = 0;
			}
			else
			{
				int num2 = (int)InsertString(ref hash);
				if (num2 != 0)
				{
					num = FindMatch(num2, out matchPos, 32, 32);
					if (_bufPos + num > _bufEnd)
					{
						num = _bufEnd - _bufPos;
					}
				}
				else
				{
					num = 0;
				}
			}
			if (num < 3)
			{
				match.State = MatchState.HasSymbol;
				match.Symbol = _window[_bufPos];
				_bufPos++;
			}
			else
			{
				_bufPos++;
				if (num <= 6)
				{
					int matchPos2 = 0;
					int num3 = (int)InsertString(ref hash);
					int num4;
					if (num3 != 0)
					{
						num4 = FindMatch(num3, out matchPos2, (num < 4) ? 32 : 8, 32);
						if (_bufPos + num4 > _bufEnd)
						{
							num4 = _bufEnd - _bufPos;
						}
					}
					else
					{
						num4 = 0;
					}
					if (num4 > num)
					{
						match.State = MatchState.HasSymbolAndMatch;
						match.Symbol = _window[_bufPos - 1];
						match.Position = matchPos2;
						match.Length = num4;
						_bufPos++;
						num = num4;
						InsertStrings(ref hash, num);
					}
					else
					{
						match.State = MatchState.HasMatch;
						match.Position = matchPos;
						match.Length = num;
						num--;
						_bufPos++;
						InsertStrings(ref hash, num);
					}
				}
				else
				{
					match.State = MatchState.HasMatch;
					match.Position = matchPos;
					match.Length = num;
					InsertStrings(ref hash, num);
				}
			}
			if (_bufPos == 16384)
			{
				MoveWindows();
			}
			return true;
		}

		private int FindMatch(int search, out int matchPos, int searchDepth, int niceLength)
		{
			int num = 0;
			int num2 = 0;
			int num3 = _bufPos - 8192;
			byte b = _window[_bufPos];
			while (search > num3)
			{
				if (_window[search + num] == b)
				{
					int i;
					for (i = 0; i < 258 && _window[_bufPos + i] == _window[search + i]; i++)
					{
					}
					if (i > num)
					{
						num = i;
						num2 = search;
						if (i > 32)
						{
							break;
						}
						b = _window[_bufPos + i];
					}
				}
				if (--searchDepth == 0)
				{
					break;
				}
				search = _prev[search & 0x1FFF];
			}
			matchPos = _bufPos - num2 - 1;
			if (num == 3 && matchPos >= 16384)
			{
				return 0;
			}
			return num;
		}

		[Conditional("DEBUG")]
		private void DebugAssertVerifyHashes()
		{
		}

		[Conditional("DEBUG")]
		private void DebugAssertRecalculatedHashesAreEqual(int position1, int position2, string message = "")
		{
		}
	}
	internal interface IFileFormatWriter
	{
		byte[] GetHeader();

		void UpdateWithBytesRead(byte[] buffer, int offset, int bytesToCopy);

		byte[] GetFooter();
	}
	internal interface IFileFormatReader
	{
		bool ReadHeader(System.IO.Compression.InputBuffer input);

		bool ReadFooter(System.IO.Compression.InputBuffer input);

		void UpdateWithBytesRead(byte[] buffer, int offset, int bytesToCopy);

		void Validate();
	}
	internal sealed class HuffmanTree
	{
		internal const int MaxLiteralTreeElements = 288;

		internal const int MaxDistTreeElements = 32;

		internal const int EndOfBlockCode = 256;

		internal const int NumberOfCodeLengthTreeElements = 19;

		private readonly int _tableBits;

		private readonly short[] _table;

		private readonly short[] _left;

		private readonly short[] _right;

		private readonly byte[] _codeLengthArray;

		private readonly int _tableMask;

		public static System.IO.Compression.HuffmanTree StaticLiteralLengthTree { get; } = new System.IO.Compression.HuffmanTree(GetStaticLiteralTreeLength());


		public static System.IO.Compression.HuffmanTree StaticDistanceTree { get; } = new System.IO.Compression.HuffmanTree(GetStaticDistanceTreeLength());


		public HuffmanTree(byte[] codeLengths)
		{
			_codeLengthArray = codeLengths;
			if (_codeLengthArray.Length == 288)
			{
				_tableBits = 9;
			}
			else
			{
				_tableBits = 7;
			}
			_tableMask = (1 << _tableBits) - 1;
			_table = new short[1 << _tableBits];
			_left = new short[2 * _codeLengthArray.Length];
			_right = new short[2 * _codeLengthArray.Length];
			CreateTable();
		}

		private static byte[] GetStaticLiteralTreeLength()
		{
			byte[] array = new byte[288];
			for (int i = 0; i <= 143; i++)
			{
				array[i] = 8;
			}
			for (int j = 144; j <= 255; j++)
			{
				array[j] = 9;
			}
			for (int k = 256; k <= 279; k++)
			{
				array[k] = 7;
			}
			for (int l = 280; l <= 287; l++)
			{
				array[l] = 8;
			}
			return array;
		}

		private static byte[] GetStaticDistanceTreeLength()
		{
			byte[] array = new byte[32];
			for (int i = 0; i < 32; i++)
			{
				array[i] = 5;
			}
			return array;
		}

		private uint[] CalculateHuffmanCode()
		{
			uint[] array = new uint[17];
			byte[] codeLengthArray = _codeLengthArray;
			foreach (int num in codeLengthArray)
			{
				array[num]++;
			}
			array[0] = 0u;
			uint[] array2 = new uint[17];
			uint num2 = 0u;
			for (int j = 1; j <= 16; j++)
			{
				num2 = (array2[j] = num2 + array[j - 1] << 1);
			}
			uint[] array3 = new uint[288];
			for (int k = 0; k < _codeLengthArray.Length; k++)
			{
				int num3 = _codeLengthArray[k];
				if (num3 > 0)
				{
					array3[k] = FastEncoderStatics.BitReverse(array2[num3], num3);
					array2[num3]++;
				}
			}
			return array3;
		}

		private void CreateTable()
		{
			uint[] array = CalculateHuffmanCode();
			short num = (short)_codeLengthArray.Length;
			for (int i = 0; i < _codeLengthArray.Length; i++)
			{
				int num2 = _codeLengthArray[i];
				if (num2 <= 0)
				{
					continue;
				}
				int num3 = (int)array[i];
				if (num2 <= _tableBits)
				{
					int num4 = 1 << num2;
					if (num3 >= num4)
					{
						throw new InvalidDataException("Failed to construct a huffman tree using the length array. The stream might be corrupted.");
					}
					int num5 = 1 << _tableBits - num2;
					for (int j = 0; j < num5; j++)
					{
						_table[num3] = (short)i;
						num3 += num4;
					}
					continue;
				}
				int num6 = num2 - _tableBits;
				int num7 = 1 << _tableBits;
				int num8 = num3 & ((1 << _tableBits) - 1);
				short[] array2 = _table;
				do
				{
					short num9 = array2[num8];
					if (num9 == 0)
					{
						array2[num8] = (short)(-num);
						num9 = (short)(-num);
						num++;
					}
					if (num9 > 0)
					{
						throw new InvalidDataException("Failed to construct a huffman tree using the length array. The stream might be corrupted.");
					}
					array2 = (((num3 & num7) != 0) ? _right : _left);
					num8 = -num9;
					num7 <<= 1;
					num6--;
				}
				while (num6 != 0);
				array2[num8] = (short)i;
			}
		}

		public int GetNextSymbol(System.IO.Compression.InputBuffer input)
		{
			uint num = input.TryLoad16Bits();
			if (input.AvailableBits == 0)
			{
				return -1;
			}
			int num2 = _table[num & _tableMask];
			if (num2 < 0)
			{
				uint num3 = (uint)(1 << _tableBits);
				do
				{
					num2 = -num2;
					num2 = (((num & num3) != 0) ? _right[num2] : _left[num2]);
					num3 <<= 1;
				}
				while (num2 < 0);
			}
			int num4 = _codeLengthArray[num2];
			if (num4 <= 0)
			{
				throw new InvalidDataException("Failed to construct a huffman tree using the length array. The stream might be corrupted.");
			}
			if (num4 > input.AvailableBits)
			{
				return -1;
			}
			input.SkipBits(num4);
			return num2;
		}
	}
	internal sealed class InflaterManaged
	{
		private static readonly byte[] s_extraLengthBits = new byte[29]
		{
			0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
			1, 1, 2, 2, 2, 2, 3, 3, 3, 3,
			4, 4, 4, 4, 5, 5, 5, 5, 16
		};

		private static readonly int[] s_lengthBase = new int[29]
		{
			3, 4, 5, 6, 7, 8, 9, 10, 11, 13,
			15, 17, 19, 23, 27, 31, 35, 43, 51, 59,
			67, 83, 99, 115, 131, 163, 195, 227, 3
		};

		private static readonly int[] s_distanceBasePosition = new int[32]
		{
			1, 2, 3, 4, 5, 7, 9, 13, 17, 25,
			33, 49, 65, 97, 129, 193, 257, 385, 513, 769,
			1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577,
			32769, 49153
		};

		private static readonly byte[] s_codeOrder = new byte[19]
		{
			16, 17, 18, 0, 8, 7, 9, 6, 10, 5,
			11, 4, 12, 3, 13, 2, 14, 1, 15
		};

		private static readonly byte[] s_staticDistanceTreeTable = new byte[32]
		{
			0, 16, 8, 24, 4, 20, 12, 28, 2, 18,
			10, 26, 6, 22, 14, 30, 1, 17, 9, 25,
			5, 21, 13, 29, 3, 19, 11, 27, 7, 23,
			15, 31
		};

		private readonly System.IO.Compression.OutputWindow _output;

		private readonly System.IO.Compression.InputBuffer _input;

		private System.IO.Compression.HuffmanTree _literalLengthTree;

		private System.IO.Compression.HuffmanTree _distanceTree;

		private System.IO.Compression.InflaterState _state;

		private bool _hasFormatReader;

		private int _bfinal;

		private System.IO.Compression.BlockType _blockType;

		private readonly byte[] _blockLengthBuffer = new byte[4];

		private int _blockLength;

		private int _length;

		private int _distanceCode;

		private int _extraBits;

		private int _loopCounter;

		private int _literalLengthCodeCount;

		private int _distanceCodeCount;

		private int _codeLengthCodeCount;

		private int _codeArraySize;

		private int _lengthCode;

		private readonly byte[] _codeList;

		private readonly byte[] _codeLengthTreeCodeLength;

		private readonly bool _deflate64;

		private System.IO.Compression.HuffmanTree _codeLengthTree;

		private IFileFormatReader _formatReader;

		public int AvailableOutput => _output.AvailableBytes;

		internal InflaterManaged(IFileFormatReader reader, bool deflate64)
		{
			_output = new System.IO.Compression.OutputWindow();
			_input = new System.IO.Compression.InputBuffer();
			_codeList = new byte[320];
			_codeLengthTreeCodeLength = new byte[19];
			_deflate64 = deflate64;
			if (reader != null)
			{
				_formatReader = reader;
				_hasFormatReader = true;
			}
			Reset();
		}

		private void Reset()
		{
			_state = ((!_hasFormatReader) ? System.IO.Compression.InflaterState.ReadingBFinal : System.IO.Compression.InflaterState.ReadingHeader);
		}

		public void SetInput(byte[] inputBytes, int offset, int length)
		{
			_input.SetInput(inputBytes, offset, length);
		}

		public bool Finished()
		{
			if (_state != System.IO.Compression.InflaterState.Done)
			{
				return _state == System.IO.Compression.InflaterState.VerifyingFooter;
			}
			return true;
		}

		public int Inflate(byte[] bytes, int offset, int length)
		{
			int num = 0;
			do
			{
				int num2 = _output.CopyTo(bytes, offset, length);
				if (num2 > 0)
				{
					if (_hasFormatReader)
					{
						_formatReader.UpdateWithBytesRead(bytes, offset, num2);
					}
					offset += num2;
					num += num2;
					length -= num2;
				}
			}
			while (length != 0 && !Finished() && Decode());
			if (_state == System.IO.Compression.InflaterState.VerifyingFooter && _output.AvailableBytes == 0)
			{
				_formatReader.Validate();
			}
			return num;
		}

		private bool Decode()
		{
			bool end_of_block_code_seen = false;
			bool flag = false;
			if (Finished())
			{
				return true;
			}
			if (_hasFormatReader)
			{
				if (_state == System.IO.Compression.InflaterState.ReadingHeader)
				{
					if (!_formatReader.ReadHeader(_input))
					{
						return false;
					}
					_state = System.IO.Compression.InflaterState.ReadingBFinal;
				}
				else if (_state == System.IO.Compression.InflaterState.StartReadingFooter || _state == System.IO.Compression.InflaterState.ReadingFooter)
				{
					if (!_formatReader.ReadFooter(_input))
					{
						return false;
					}
					_state = System.IO.Compression.InflaterState.VerifyingFooter;
					return true;
				}
			}
			if (_state == System.IO.Compression.InflaterState.ReadingBFinal)
			{
				if (!_input.EnsureBitsAvailable(1))
				{
					return false;
				}
				_bfinal = _input.GetBits(1);
				_state = System.IO.Compression.InflaterState.ReadingBType;
			}
			if (_state == System.IO.Compression.InflaterState.ReadingBType)
			{
				if (!_input.EnsureBitsAvailable(2))
				{
					_state = System.IO.Compression.InflaterState.ReadingBType;
					return false;
				}
				_blockType = (System.IO.Compression.BlockType)_input.GetBits(2);
				if (_blockType == System.IO.Compression.BlockType.Dynamic)
				{
					_state = System.IO.Compression.InflaterState.ReadingNumLitCodes;
				}
				else if (_blockType == System.IO.Compression.BlockType.Static)
				{
					_literalLengthTree = System.IO.Compression.HuffmanTree.StaticLiteralLengthTree;
					_distanceTree = System.IO.Compression.HuffmanTree.StaticDistanceTree;
					_state = System.IO.Compression.InflaterState.DecodeTop;
				}
				else
				{
					if (_blockType != 0)
					{
						throw new InvalidDataException("Unknown block type. Stream might be corrupted.");
					}
					_state = System.IO.Compression.InflaterState.UncompressedAligning;
				}
			}
			if (_blockType == System.IO.Compression.BlockType.Dynamic)
			{
				flag = ((_state >= System.IO.Compression.InflaterState.DecodeTop) ? DecodeBlock(out end_of_block_code_seen) : DecodeDynamicBlockHeader());
			}
			else if (_blockType == System.IO.Compression.BlockType.Static)
			{
				flag = DecodeBlock(out end_of_block_code_seen);
			}
			else
			{
				if (_blockType != 0)
				{
					throw new InvalidDataException("Unknown block type. Stream might be corrupted.");
				}
				flag = DecodeUncompressedBlock(out end_of_block_code_seen);
			}
			if (end_of_block_code_seen && _bfinal != 0)
			{
				if (_hasFormatReader)
				{
					_state = System.IO.Compression.InflaterState.StartReadingFooter;
				}
				else
				{
					_state = System.IO.Compression.InflaterState.Done;
				}
			}
			return flag;
		}

		private bool DecodeUncompressedBlock(out bool end_of_block)
		{
			end_of_block = false;
			while (true)
			{
				switch (_state)
				{
				case System.IO.Compression.InflaterState.UncompressedAligning:
					_input.SkipToByteBoundary();
					_state = System.IO.Compression.InflaterState.UncompressedByte1;
					goto case System.IO.Compression.InflaterState.UncompressedByte1;
				case System.IO.Compression.InflaterState.UncompressedByte1:
				case System.IO.Compression.InflaterState.UncompressedByte2:
				case System.IO.Compression.InflaterState.UncompressedByte3:
				case System.IO.Compression.InflaterState.UncompressedByte4:
				{
					int bits = _input.GetBits(8);
					if (bits < 0)
					{
						return false;
					}
					_blockLengthBuffer[(int)(_state - 16)] = (byte)bits;
					if (_state == System.IO.Compression.InflaterState.UncompressedByte4)
					{
						_blockLength = _blockLengthBuffer[0] + _blockLengthBuffer[1] * 256;
						int num2 = _blockLengthBuffer[2] + _blockLengthBuffer[3] * 256;
						if ((ushort)_blockLength != (ushort)(~num2))
						{
							throw new InvalidDataException("Block length does not match with its complement.");
						}
					}
					break;
				}
				case System.IO.Compression.InflaterState.DecodingUncompressed:
				{
					int num = _output.CopyFrom(_input, _blockLength);
					_blockLength -= num;
					if (_blockLength == 0)
					{
						_state = System.IO.Compression.InflaterState.ReadingBFinal;
						end_of_block = true;
						return true;
					}
					if (_output.FreeBytes == 0)
					{
						return true;
					}
					return false;
				}
				default:
					throw new InvalidDataException("Decoder is in some unknown state. This might be caused by corrupted data.");
				}
				_state++;
			}
		}

		private bool DecodeBlock(out bool end_of_block_code_seen)
		{
			end_of_block_code_seen = false;
			int num = _output.FreeBytes;
			while (num > 65536)
			{
				switch (_state)
				{
				case System.IO.Compression.InflaterState.DecodeTop:
				{
					int nextSymbol = _literalLengthTree.GetNextSymbol(_input);
					if (nextSymbol < 0)
					{
						return false;
					}
					if (nextSymbol < 256)
					{
						_output.Write((byte)nextSymbol);
						num--;
						break;
					}
					if (nextSymbol == 256)
					{
						end_of_block_code_seen = true;
						_state = System.IO.Compression.InflaterState.ReadingBFinal;
						return true;
					}
					nextSymbol -= 257;
					if (nextSymbol < 8)
					{
						nextSymbol += 3;
						_extraBits = 0;
					}
					else if (!_deflate64 && nextSymbol == 28)
					{
						nextSymbol = 258;
						_extraBits = 0;
					}
					else
					{
						if (nextSymbol < 0 || nextSymbol >= s_extraLengthBits.Length)
						{
							throw new InvalidDataException("Found invalid data while decoding.");
						}
						_extraBits = s_extraLengthBits[nextSymbol];
					}
					_length = nextSymbol;
					goto case System.IO.Compression.InflaterState.HaveInitialLength;
				}
				case System.IO.Compression.InflaterState.HaveInitialLength:
					if (_extraBits > 0)
					{
						_state = System.IO.Compression.InflaterState.HaveInitialLength;
						int bits2 = _input.GetBits(_extraBits);
						if (bits2 < 0)
						{
							return false;
						}
						if (_length < 0 || _length >= s_lengthBase.Length)
						{
							throw new InvalidDataException("Found invalid data while decoding.");
						}
						_length = s_lengthBase[_length] + bits2;
					}
					_state = System.IO.Compression.InflaterState.HaveFullLength;
					goto case System.IO.Compression.InflaterState.HaveFullLength;
				case System.IO.Compression.InflaterState.HaveFullLength:
					if (_blockType == System.IO.Compression.BlockType.Dynamic)
					{
						_distanceCode = _distanceTree.GetNextSymbol(_input);
					}
					else
					{
						_distanceCode = _input.GetBits(5);
						if (_distanceCode >= 0)
						{
							_distanceCode = s_staticDistanceTreeTable[_distanceCode];
						}
					}
					if (_distanceCode < 0)
					{
						return false;
					}
					_state = System.IO.Compression.InflaterState.HaveDistCode;
					goto case System.IO.Compression.InflaterState.HaveDistCode;
				case System.IO.Compression.InflaterState.HaveDistCode:
				{
					int distance;
					if (_distanceCode > 3)
					{
						_extraBits = _distanceCode - 2 >> 1;
						int bits = _input.GetBits(_extraBits);
						if (bits < 0)
						{
							return false;
						}
						distance = s_distanceBasePosition[_distanceCode] + bits;
					}
					else
					{
						distance = _distanceCode + 1;
					}
					_output.WriteLengthDistance(_length, distance);
					num -= _length;
					_state = System.IO.Compression.InflaterState.DecodeTop;
					break;
				}
				default:
					throw new InvalidDataException("Decoder is in some unknown state. This might be caused by corrupted data.");
				}
			}
			return true;
		}

		private bool DecodeDynamicBlockHeader()
		{
			switch (_state)
			{
			case System.IO.Compression.InflaterState.ReadingNumLitCodes:
				_literalLengthCodeCount = _input.GetBits(5);
				if (_literalLengthCodeCount < 0)
				{
					return false;
				}
				_literalLengthCodeCount += 257;
				_state = System.IO.Compression.InflaterState.ReadingNumDistCodes;
				goto case System.IO.Compression.InflaterState.ReadingNumDistCodes;
			case System.IO.Compression.InflaterState.ReadingNumDistCodes:
				_distanceCodeCount = _input.GetBits(5);
				if (_distanceCodeCount < 0)
				{
					return false;
				}
				_distanceCodeCount++;
				_state = System.IO.Compression.InflaterState.ReadingNumCodeLengthCodes;
				goto case System.IO.Compression.InflaterState.ReadingNumCodeLengthCodes;
			case System.IO.Compression.InflaterState.ReadingNumCodeLengthCodes:
				_codeLengthCodeCount = _input.GetBits(4);
				if (_codeLengthCodeCount < 0)
				{
					return false;
				}
				_codeLengthCodeCount += 4;
				_loopCounter = 0;
				_state = System.IO.Compression.InflaterState.ReadingCodeLengthCodes;
				goto case System.IO.Compression.InflaterState.ReadingCodeLengthCodes;
			case System.IO.Compression.InflaterState.ReadingCodeLengthCodes:
			{
				while (_loopCounter < _codeLengthCodeCount)
				{
					int bits = _input.GetBits(3);
					if (bits < 0)
					{
						return false;
					}
					_codeLengthTreeCodeLength[s_codeOrder[_loopCounter]] = (byte)bits;
					_loopCounter++;
				}
				for (int l = _codeLengthCodeCount; l < s_codeOrder.Length; l++)
				{
					_codeLengthTreeCodeLength[s_codeOrder[l]] = 0;
				}
				_codeLengthTree = new System.IO.Compression.HuffmanTree(_codeLengthTreeCodeLength);
				_codeArraySize = _literalLengthCodeCount + _distanceCodeCount;
				_loopCounter = 0;
				_state = System.IO.Compression.InflaterState.ReadingTreeCodesBefore;
				goto case System.IO.Compression.InflaterState.ReadingTreeCodesBefore;
			}
			case System.IO.Compression.InflaterState.ReadingTreeCodesBefore:
			case System.IO.Compression.InflaterState.ReadingTreeCodesAfter:
			{
				while (_loopCounter < _codeArraySize)
				{
					if (_state == System.IO.Compression.InflaterState.ReadingTreeCodesBefore && (_lengthCode = _codeLengthTree.GetNextSymbol(_input)) < 0)
					{
						return false;
					}
					if (_lengthCode <= 15)
					{
						_codeList[_loopCounter++] = (byte)_lengthCode;
					}
					else if (_lengthCode == 16)
					{
						if (!_input.EnsureBitsAvailable(2))
						{
							_state = System.IO.Compression.InflaterState.ReadingTreeCodesAfter;
							return false;
						}
						if (_loopCounter == 0)
						{
							throw new InvalidDataException();
						}
						byte b = _codeList[_loopCounter - 1];
						int num = _input.GetBits(2) + 3;
						if (_loopCounter + num > _codeArraySize)
						{
							throw new InvalidDataException();
						}
						for (int i = 0; i < num; i++)
						{
							_codeList[_loopCounter++] = b;
						}
					}
					else if (_lengthCode == 17)
					{
						if (!_input.EnsureBitsAvailable(3))
						{
							_state = System.IO.Compression.InflaterState.ReadingTreeCodesAfter;
							return false;
						}
						int num = _input.GetBits(3) + 3;
						if (_loopCounter + num > _codeArraySize)
						{
							throw new InvalidDataException();
						}
						for (int j = 0; j < num; j++)
						{
							_codeList[_loopCounter++] = 0;
						}
					}
					else
					{
						if (!_input.EnsureBitsAvailable(7))
						{
							_state = System.IO.Compression.InflaterState.ReadingTreeCodesAfter;
							return false;
						}
						int num = _input.GetBits(7) + 11;
						if (_loopCounter + num > _codeArraySize)
						{
							throw new InvalidDataException();
						}
						for (int k = 0; k < num; k++)
						{
							_codeList[_loopCounter++] = 0;
						}
					}
					_state = System.IO.Compression.InflaterState.ReadingTreeCodesBefore;
				}
				byte[] array = new byte[288];
				byte[] array2 = new byte[32];
				Array.Copy(_codeList, 0, array, 0, _literalLengthCodeCount);
				Array.Copy(_codeList, _literalLengthCodeCount, array2, 0, _distanceCodeCount);
				if (array[256] == 0)
				{
					throw new InvalidDataException();
				}
				_literalLengthTree = new System.IO.Compression.HuffmanTree(array);
				_distanceTree = new System.IO.Compression.HuffmanTree(array2);
				_state = System.IO.Compression.InflaterState.DecodeTop;
				return true;
			}
			default:
				throw new InvalidDataException("Decoder is in some unknown state. This might be caused by corrupted data.");
			}
		}

		public void Dispose()
		{
		}
	}
	internal enum InflaterState
	{
		ReadingHeader = 0,
		ReadingBFinal = 2,
		ReadingBType = 3,
		ReadingNumLitCodes = 4,
		ReadingNumDistCodes = 5,
		ReadingNumCodeLengthCodes = 6,
		ReadingCodeLengthCodes = 7,
		ReadingTreeCodesBefore = 8,
		ReadingTreeCodesAfter = 9,
		DecodeTop = 10,
		HaveInitialLength = 11,
		HaveFullLength = 12,
		HaveDistCode = 13,
		UncompressedAligning = 15,
		UncompressedByte1 = 16,
		UncompressedByte2 = 17,
		UncompressedByte3 = 18,
		UncompressedByte4 = 19,
		DecodingUncompressed = 20,
		StartReadingFooter = 21,
		ReadingFooter = 22,
		VerifyingFooter = 23,
		Done = 24
	}
	internal sealed class InputBuffer
	{
		private byte[] _buffer;

		private int _start;

		private int _end;

		private uint _bitBuffer;

		private int _bitsInBuffer;

		public int AvailableBits => _bitsInBuffer;

		public int AvailableBytes => _end - _start + _bitsInBuffer / 8;

		public bool EnsureBitsAvailable(int count)
		{
			if (_bitsInBuffer < count)
			{
				if (NeedsInput())
				{
					return false;
				}
				_bitBuffer |= (uint)(_buffer[_start++] << _bitsInBuffer);
				_bitsInBuffer += 8;
				if (_bitsInBuffer < count)
				{
					if (NeedsInput())
					{
						return false;
					}
					_bitBuffer |= (uint)(_buffer[_start++] << _bitsInBuffer);
					_bitsInBuffer += 8;
				}
			}
			return true;
		}

		public uint TryLoad16Bits()
		{
			if (_bitsInBuffer < 8)
			{
				if (_start < _end)
				{
					_bitBuffer |= (uint)(_buffer[_start++] << _bitsInBuffer);
					_bitsInBuffer += 8;
				}
				if (_start < _end)
				{
					_bitBuffer |= (uint)(_buffer[_start++] << _bitsInBuffer);
					_bitsInBuffer += 8;
				}
			}
			else if (_bitsInBuffer < 16 && _start < _end)
			{
				_bitBuffer |= (uint)(_buffer[_start++] << _bitsInBuffer);
				_bitsInBuffer += 8;
			}
			return _bitBuffer;
		}

		private uint GetBitMask(int count)
		{
			return (uint)((1 << count) - 1);
		}

		public int GetBits(int count)
		{
			if (!EnsureBitsAvailable(count))
			{
				return -1;
			}
			uint result = _bitBuffer & GetBitMask(count);
			_bitBuffer >>= count;
			_bitsInBuffer -= count;
			return (int)result;
		}

		public int CopyTo(byte[] output, int offset, int length)
		{
			int num = 0;
			while (_bitsInBuffer > 0 && length > 0)
			{
				output[offset++] = (byte)_bitBuffer;
				_bitBuffer >>= 8;
				_bitsInBuffer -= 8;
				length--;
				num++;
			}
			if (length == 0)
			{
				return num;
			}
			int num2 = _end - _start;
			if (length > num2)
			{
				length = num2;
			}
			Array.Copy(_buffer, _start, output, offset, length);
			_start += length;
			return num + length;
		}

		public bool NeedsInput()
		{
			return _start == _end;
		}

		public void SetInput(byte[] buffer, int offset, int length)
		{
			_buffer = buffer;
			_start = offset;
			_end = offset + length;
		}

		public void SkipBits(int n)
		{
			_bitBuffer >>= n;
			_bitsInBuffer -= n;
		}

		public void SkipToByteBoundary()
		{
			_bitBuffer >>= _bitsInBuffer % 8;
			_bitsInBuffer -= _bitsInBuffer % 8;
		}
	}
	internal sealed class Match
	{
		internal MatchState State { get; set; }

		internal int Position { get; set; }

		internal int Length { get; set; }

		internal byte Symbol { get; set; }
	}
	internal enum MatchState
	{
		HasSymbol = 1,
		HasMatch,
		HasSymbolAndMatch
	}
	internal sealed class OutputBuffer
	{
		internal struct BufferState
		{
			internal readonly int _pos;

			internal readonly uint _bitBuf;

			internal readonly int _bitCount;

			internal BufferState(int pos, uint bitBuf, int bitCount)
			{
				_pos = pos;
				_bitBuf = bitBuf;
				_bitCount = bitCount;
			}
		}

		private byte[] _byteBuffer;

		private int _pos;

		private uint _bitBuf;

		private int _bitCount;

		internal int BytesWritten => _pos;

		internal int FreeBytes => _byteBuffer.Length - _pos;

		internal int BitsInBuffer => _bitCount / 8 + 1;

		internal void UpdateBuffer(byte[] output)
		{
			_byteBuffer = output;
			_pos = 0;
		}

		internal void WriteUInt16(ushort value)
		{
			_byteBuffer[_pos++] = (byte)value;
			_byteBuffer[_pos++] = (byte)(value >> 8);
		}

		internal void WriteBits(int n, uint bits)
		{
			_bitBuf |= bits << _bitCount;
			_bitCount += n;
			if (_bitCount >= 16)
			{
				_byteBuffer[_pos++] = (byte)_bitBuf;
				_byteBuffer[_pos++] = (byte)(_bitBuf >> 8);
				_bitCount -= 16;
				_bitBuf >>= 16;
			}
		}

		internal void FlushBits()
		{
			while (_bitCount >= 8)
			{
				_byteBuffer[_pos++] = (byte)_bitBuf;
				_bitCount -= 8;
				_bitBuf >>= 8;
			}
			if (_bitCount > 0)
			{
				_byteBuffer[_pos++] = (byte)_bitBuf;
				_bitBuf = 0u;
				_bitCount = 0;
			}
		}

		internal void WriteBytes(byte[] byteArray, int offset, int count)
		{
			if (_bitCount == 0)
			{
				Array.Copy(byteArray, offset, _byteBuffer, _pos, count);
				_pos += count;
			}
			else
			{
				WriteBytesUnaligned(byteArray, offset, count);
			}
		}

		private void WriteBytesUnaligned(byte[] byteArray, int offset, int count)
		{
			for (int i = 0; i < count; i++)
			{
				byte b = byteArray[offset + i];
				WriteByteUnaligned(b);
			}
		}

		private void WriteByteUnaligned(byte b)
		{
			WriteBits(8, b);
		}

		internal BufferState DumpState()
		{
			return new BufferState(_pos, _bitBuf, _bitCount);
		}

		internal void RestoreState(BufferState state)
		{
			_pos = state._pos;
			_bitBuf = state._bitBuf;
			_bitCount = state._bitCount;
		}
	}
	internal sealed class OutputWindow
	{
		private const int WindowSize = 262144;

		private const int WindowMask = 262143;

		private readonly byte[] _window = new byte[262144];

		private int _end;

		private int _bytesUsed;

		public int FreeBytes => 262144 - _bytesUsed;

		public int AvailableBytes => _bytesUsed;

		public void Write(byte b)
		{
			_window[_end++] = b;
			_end &= 262143;
			_bytesUsed++;
		}

		public void WriteLengthDistance(int length, int distance)
		{
			_bytesUsed += length;
			int num = (_end - distance) & 0x3FFFF;
			int num2 = 262144 - length;
			if (num <= num2 && _end < num2)
			{
				if (length <= distance)
				{
					Array.Copy(_window, num, _window, _end, length);
					_end += length;
				}
				else
				{
					while (length-- > 0)
					{
						_window[_end++] = _window[num++];
					}
				}
			}
			else
			{
				while (length-- > 0)
				{
					_window[_end++] = _window[num++];
					_end &= 262143;
					num &= 0x3FFFF;
				}
			}
		}

		public int CopyFrom(System.IO.Compression.InputBuffer input, int length)
		{
			length = Math.Min(Math.Min(length, 262144 - _bytesUsed), input.AvailableBytes);
			int num = 262144 - _end;
			int num2;
			if (length > num)
			{
				num2 = input.CopyTo(_window, _end, num);
				if (num2 == num)
				{
					num2 += input.CopyTo(_window, 0, length - num);
				}
			}
			else
			{
				num2 = input.CopyTo(_window, _end, length);
			}
			_end = (_end + num2) & 0x3FFFF;
			_bytesUsed += num2;
			return num2;
		}

		public int CopyTo(byte[] output, int offset, int length)
		{
			int num;
			if (length > _bytesUsed)
			{
				num = _end;
				length = _bytesUsed;
			}
			else
			{
				num = (_end - _bytesUsed + length) & 0x3FFFF;
			}
			int num2 = length;
			int num3 = length - num;
			if (num3 > 0)
			{
				Array.Copy(_window, 262144 - num3, output, offset, num3);
				offset += num3;
				length = num;
			}
			Array.Copy(_window, num - length, output, offset, length);
			_bytesUsed -= num2;
			return num2;
		}
	}
	internal sealed class PositionPreservingWriteOnlyStreamWrapper : Stream
	{
		private readonly Stream _stream;

		private long _position;

		public override bool CanRead => false;

		public override bool CanSeek => false;

		public override bool CanWrite => true;

		public override long Position
		{
			get
			{
				return _position;
			}
			set
			{
				throw new NotSupportedException("This operation is not supported.");
			}
		}

		public override bool CanTimeout => _stream.CanTimeout;

		public override int ReadTimeout
		{
			get
			{
				return _stream.ReadTimeout;
			}
			set
			{
				_stream.ReadTimeout = value;
			}
		}

		public override int WriteTimeout
		{
			get
			{
				return _stream.WriteTimeout;
			}
			set
			{
				_stream.WriteTimeout = value;
			}
		}

		public override long Length
		{
			get
			{
				throw new NotSupportedException("This operation is not supported.");
			}
		}

		public PositionPreservingWriteOnlyStreamWrapper(Stream stream)
		{
			_stream = stream;
		}

		public override void Write(byte[] buffer, int offset, int count)
		{
			_position += count;
			_stream.Write(buffer, offset, count);
		}

		public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
		{
			_position += count;
			return _stream.BeginWrite(buffer, offset, count, callback, state);
		}

		public override void EndWrite(IAsyncResult asyncResult)
		{
			_stream.EndWrite(asyncResult);
		}

		public override void WriteByte(byte value)
		{
			_position++;
			_stream.WriteByte(value);
		}

		public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
		{
			_position += count;
			return _stream.WriteAsync(buffer, offset, count, cancellationToken);
		}

		public override void Flush()
		{
			_stream.Flush();
		}

		public override Task FlushAsync(CancellationToken cancellationToken)
		{
			return _stream.FlushAsync(cancellationToken);
		}

		public override void Close()
		{
			_stream.Close();
		}

		protected override void Dispose(bool disposing)
		{
			if (disposing)
			{
				_stream.Dispose();
			}
		}

		public override long Seek(long offset, SeekOrigin origin)
		{
			throw new NotSupportedException("This operation is not supported.");
		}

		public override void SetLength(long value)
		{
			throw new NotSupportedException("This operation is not supported.");
		}

		public override int Read(byte[] buffer, int offset, int count)
		{
			throw new NotSupportedException("This operation is not supported.");
		}
	}
	public class ZipArchive : IDisposable
	{
		private Stream _archiveStream;

		private ZipArchiveEntry _archiveStreamOwner;

		private BinaryReader _archiveReader;

		private ZipArchiveMode _mode;

		private List<ZipArchiveEntry> _entries;

		private ReadOnlyCollection<ZipArchiveEntry> _entriesCollection;

		private Dictionary<string, ZipArchiveEntry> _entriesDictionary;

		private bool _readEntries;

		private bool _leaveOpen;

		private long _centralDirectoryStart;

		private bool _isDisposed;

		private uint _numberOfThisDisk;

		private long _expectedNumberOfEntries;

		private Stream _backingStream;

		private byte[] _archiveComment;

		private Encoding _entryNameEncoding;

		public ReadOnlyCollection<ZipArchiveEntry> Entries
		{
			get
			{
				if (_mode == ZipArchiveMode.Create)
				{
					throw new NotSupportedException("Cannot access entries in Create mode.");
				}
				ThrowIfDisposed();
				EnsureCentralDirectoryRead();
				return _entriesCollection;
			}
		}

		public ZipArchiveMode Mode => _mode;

		internal BinaryReader ArchiveReader => _archiveReader;

		internal Stream ArchiveStream => _archiveStream;

		internal uint NumberOfThisDisk => _numberOfThisDisk;

		internal Encoding EntryNameEncoding
		{
			get
			{
				return _entryNameEncoding;
			}
			private set
			{
				if (value != null && (value.Equals(Encoding.BigEndianUnicode) || value.Equals(Encoding.Unicode)))
				{
					throw new ArgumentException("The specified entry name encoding is not supported.", "EntryNameEncoding");
				}
				_entryNameEncoding = value;
			}
		}

		public ZipArchive(Stream stream)
			: this(stream, ZipArchiveMode.Read, leaveOpen: false, null)
		{
		}

		public ZipArchive(Stream stream, ZipArchiveMode mode)
			: this(stream, mode, leaveOpen: false, null)
		{
		}

		public ZipArchive(Stream stream, ZipArchiveMode mode, bool leaveOpen)
			: this(stream, mode, leaveOpen, null)
		{
		}

		public ZipArchive(Stream stream, ZipArchiveMode mode, bool leaveOpen, Encoding entryNameEncoding)
		{
			if (stream == null)
			{
				throw new ArgumentNullException("stream");
			}
			EntryNameEncoding = entryNameEncoding;
			Init(stream, mode, leaveOpen);
		}

		public ZipArchiveEntry CreateEntry(string entryName)
		{
			return DoCreateEntry(entryName, null);
		}

		public ZipArchiveEntry CreateEntry(string entryName, CompressionLevel compressionLevel)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			return DoCreateEntry(entryName, compressionLevel);
		}

		protected virtual void Dispose(bool disposing)
		{
			if (!disposing || _isDisposed)
			{
				return;
			}
			try
			{
				ZipArchiveMode mode = _mode;
				if (mode != 0)
				{
					_ = mode - 1;
					_ = 1;
					WriteFile();
				}
			}
			finally
			{
				CloseStreams();
				_isDisposed = true;
			}
		}

		public void Dispose()
		{
			Dispose(disposing: true);
			GC.SuppressFinalize(this);
		}

		public ZipArchiveEntry GetEntry(string entryName)
		{
			if (entryName == null)
			{
				throw new ArgumentNullException("entryName");
			}
			if (_mode == ZipArchiveMode.Create)
			{
				throw new NotSupportedException("Cannot access entries in Create mode.");
			}
			EnsureCentralDirectoryRead();
			_entriesDictionary.TryGetValue(entryName, out var value);
			return value;
		}

		private ZipArchiveEntry DoCreateEntry(string entryName, CompressionLevel? compressionLevel)
		{
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			if (entryName == null)
			{
				throw new ArgumentNullException("entryName");
			}
			if (string.IsNullOrEmpty(entryName))
			{
				throw new ArgumentException("String cannot be empty.", "entryName");
			}
			if (_mode == ZipArchiveMode.Read)
			{
				throw new NotSupportedException("Cannot create entries on an archive opened in read mode.");
			}
			ThrowIfDisposed();
			ZipArchiveEntry zipArchiveEntry = (compressionLevel.HasValue ? new ZipArchiveEntry(this, entryName, compressionLevel.Value) : new ZipArchiveEntry(this, entryName));
			AddEntry(zipArchiveEntry);
			return zipArchiveEntry;
		}

		internal void AcquireArchiveStream(ZipArchiveEntry entry)
		{
			if (_archiveStreamOwner != null)
			{
				if (_archiveStreamOwner.EverOpenedForWrite)
				{
					throw new IOException("Entries cannot be created while previously created entries are still open.");
				}
				_archiveStreamOwner.WriteAndFinishLocalEntry();
			}
			_archiveStreamOwner = entry;
		}

		private void AddEntry(ZipArchiveEntry entry)
		{
			_entries.Add(entry);
			string fullName = entry.FullName;
			if (!_entriesDictionary.ContainsKey(fullName))
			{
				_entriesDictionary.Add(fullName, entry);
			}
		}

		[Conditional("DEBUG")]
		internal void DebugAssertIsStillArchiveStreamOwner(ZipArchiveEntry entry)
		{
		}

		internal void ReleaseArchiveStream(ZipArchiveEntry entry)
		{
			_archiveStreamOwner = null;
		}

		internal void RemoveEntry(ZipArchiveEntry entry)
		{
			_entries.Remove(entry);
			_entriesDictionary.Remove(entry.FullName);
		}

		internal void ThrowIfDisposed()
		{
			if (_isDisposed)
			{
				throw new ObjectDisposedException(GetType().ToString());
			}
		}

		private void CloseStreams()
		{
			if (!_leaveOpen)
			{
				_archiveStream.Dispose();
				_backingStream?.Dispose();
				_archiveReader?.Dispose();
			}
			else if (_backingStream != null)
			{
				_archiveStream.Dispose();
			}
		}

		private void EnsureCentralDirectoryRead()
		{
			if (!_readEntries)
			{
				ReadCentralDirectory();
				_readEntries = true;
			}
		}

		private void Init(Stream stream, ZipArchiveMode mode, bool leaveOpen)
		{
			Stream stream2 = null;
			try
			{
				_backingStream = null;
				switch (mode)
				{
				case ZipArchiveMode.Create:
					if (!stream.CanWrite)
					{
						throw new ArgumentException("Cannot use create mode on a non-writable stream.");
					}
					break;
				case ZipArchiveMode.Read:
					if (!stream.CanRead)
					{
						throw new ArgumentException("Cannot use read mode on a non-readable stream.");
					}
					if (!stream.CanSeek)
					{
						_backingStream = stream;
						stream2 = (stream = new MemoryStream());
						_backingStream.CopyTo(stream);
						stream.Seek(0L, SeekOrigin.Begin);
					}
					break;
				case ZipArchiveMode.Update:
					if (!stream.CanRead || !stream.CanWrite || !stream.CanSeek)
					{
						throw new ArgumentException("Update mode requires a stream with read, write, and seek capabilities.");
					}
					break;
				default:
					throw new ArgumentOutOfRangeException("mode");
				}
				_mode = mode;
				if (mode == ZipArchiveMode.Create && !stream.CanSeek)
				{
					_archiveStream = new System.IO.Compression.PositionPreservingWriteOnlyStreamWrapper(stream);
				}
				else
				{
					_archiveStream = stream;
				}
				_archiveStreamOwner = null;
				if (mode == ZipArchiveMode.Create)
				{
					_archiveReader = null;
				}
				else
				{
					_archiveReader = new BinaryReader(_archiveStream);
				}
				_entries = new List<ZipArchiveEntry>();
				_entriesCollection = new ReadOnlyCollection<ZipArchiveEntry>(_entries);
				_entriesDictionary = new Dictionary<string, ZipArchiveEntry>();
				_readEntries = false;
				_leaveOpen = leaveOpen;
				_centralDirectoryStart = 0L;
				_isDisposed = false;
				_numberOfThisDisk = 0u;
				_archiveComment = null;
				switch (mode)
				{
				case ZipArchiveMode.Create:
					_readEntries = true;
					return;
				case ZipArchiveMode.Read:
					ReadEndOfCentralDirectory();
					return;
				}
				if (_archiveStream.Length == 0L)
				{
					_readEntries = true;
					return;
				}
				ReadEndOfCentralDirectory();
				EnsureCentralDirectoryRead();
				foreach (ZipArchiveEntry entry in _entries)
				{
					entry.ThrowIfNotOpenable(needToUncompress: false, needToLoadIntoMemory: true);
				}
			}
			catch
			{
				stream2?.Dispose();
				throw;
			}
		}

		private void ReadCentralDirectory()
		{
			try
			{
				_archiveStream.Seek(_centralDirectoryStart, SeekOrigin.Begin);
				long num = 0L;
				bool saveExtraFieldsAndComments = Mode == ZipArchiveMode.Update;
				System.IO.Compression.ZipCentralDirectoryFileHeader header;
				while (System.IO.Compression.ZipCentralDirectoryFileHeader.TryReadBlock(_archiveReader, saveExtraFieldsAndComments, out header))
				{
					AddEntry(new ZipArchiveEntry(this, header));
					num++;
				}
				if (num != _expectedNumberOfEntries)
				{
					throw new InvalidDataException("Number of entries expected in End Of Central Directory does not correspond to number of entries in Central Directory.");
				}
			}
			catch (EndOfStreamException p)
			{
				throw new InvalidDataException(SR.Format("Central Directory is invalid.", p));
			}
		}

		private void ReadEndOfCentralDirectory()
		{
			try
			{
				_archiveStream.Seek(-18L, SeekOrigin.End);
				if (!System.IO.Compression.ZipHelper.SeekBackwardsToSignature(_archiveStream, 101010256u))
				{
					throw new InvalidDataException("End of Central Directory record could not be found.");
				}
				long position = _archiveStream.Position;
				System.IO.Compression.ZipEndOfCentralDirectoryBlock.TryReadBlock(_archiveReader, out var eocdBlock);
				if (eocdBlock.NumberOfThisDisk != eocdBlock.NumberOfTheDiskWithTheStartOfTheCentralDirectory)
				{
					throw new InvalidDataException("Split or spanned archives are not supported.");
				}
				_numberOfThisDisk = eocdBlock.NumberOfThisDisk;
				_centralDirectoryStart = eocdBlock.OffsetOfStartOfCentralDirectoryWithRespectToTheStartingDiskNumber;
				if (eocdBlock.NumberOfEntriesInTheCentralDirectory != eocdBlock.NumberOfEntriesInTheCentralDirectoryOnThisDisk)
				{
					throw new InvalidDataException("Split or spanned archives are not supported.");
				}
				_expectedNumberOfEntries = eocdBlock.NumberOfEntriesInTheCentralDirectory;
				if (_mode == ZipArchiveMode.Update)
				{
					_archiveComment = eocdBlock.ArchiveComment;
				}
				if (eocdBlock.NumberOfThisDisk == ushort.MaxValue || eocdBlock.OffsetOfStartOfCentralDirectoryWithRespectToTheStartingDiskNumber == uint.MaxValue || eocdBlock.NumberOfEntriesInTheCentralDirectory == ushort.MaxValue)
				{
					_archiveStream.Seek(position - 16, SeekOrigin.Begin);
					if (System.IO.Compression.ZipHelper.SeekBackwardsToSignature(_archiveStream, 117853008u))
					{
						System.IO.Compression.Zip64EndOfCentralDirectoryLocator.TryReadBlock(_archiveReader, out var zip64EOCDLocator);
						if (zip64EOCDLocator.OffsetOfZip64EOCD > long.MaxValue)
						{
							throw new InvalidDataException("Offset to Zip64 End Of Central Directory record cannot be held in an Int64.");
						}
						long offsetOfZip64EOCD = (long)zip64EOCDLocator.OffsetOfZip64EOCD;
						_archiveStream.Seek(offsetOfZip64EOCD, SeekOrigin.Begin);
						if (!System.IO.Compression.Zip64EndOfCentralDirectoryRecord.TryReadBlock(_archiveReader, out var zip64EOCDRecord))
						{
							throw new InvalidDataException("Zip 64 End of Central Directory Record not where indicated.");
						}
						_numberOfThisDisk = zip64EOCDRecord.NumberOfThisDisk;
						if (zip64EOCDRecord.NumberOfEntriesTotal > long.MaxValue)
						{
							throw new InvalidDataException("Number of Entries cannot be held in an Int64.");
						}
						if (zip64EOCDRecord.OffsetOfCentralDirectory > long.MaxValue)
						{
							throw new InvalidDataException("Offset to Central Directory cannot be held in an Int64.");
						}
						if (zip64EOCDRecord.NumberOfEntriesTotal != zip64EOCDRecord.NumberOfEntriesOnThisDisk)
						{
							throw new InvalidDataException("Split or spanned archives are not supported.");
						}
						_expectedNumberOfEntries = (long)zip64EOCDRecord.NumberOfEntriesTotal;
						_centralDirectoryStart = (long)zip64EOCDRecord.OffsetOfCentralDirectory;
					}
				}
				if (_centralDirectoryStart > _archiveStream.Length)
				{
					throw new InvalidDataException("Offset to Central Directory cannot be held in an Int64.");
				}
			}
			catch (EndOfStreamException innerException)
			{
				throw new InvalidDataException("Central Directory corrupt.", innerException);
			}
			catch (IOException innerException2)
			{
				throw new InvalidDataException("Central Directory corrupt.", innerException2);
			}
		}

		private void WriteFile()
		{
			if (_mode == ZipArchiveMode.Update)
			{
				List<ZipArchiveEntry> list = new List<ZipArchiveEntry>();
				foreach (ZipArchiveEntry entry in _entries)
				{
					if (!entry.LoadLocalHeaderExtraFieldAndCompressedBytesIfNeeded())
					{
						list.Add(entry);
					}
				}
				foreach (ZipArchiveEntry item in list)
				{
					item.Delete();
				}
				_archiveStream.Seek(0L, SeekOrigin.Begin);
				_archiveStream.SetLength(0L);
			}
			foreach (ZipArchiveEntry entry2 in _entries)
			{
				entry2.WriteAndFinishLocalEntry();
			}
			long position = _archiveStream.Position;
			foreach (ZipArchiveEntry entry3 in _entries)
			{
				entry3.WriteCentralDirectoryFileHeader();
			}
			long sizeOfCentralDirectory = _archiveStream.Position - position;
			WriteArchiveEpilogue(position, sizeOfCentralDirectory);
		}

		private void WriteArchiveEpilogue(long startOfCentralDirectory, long sizeOfCentralDirectory)
		{
			if (startOfCentralDirectory >= uint.MaxValue || sizeOfCentralDirectory >= uint.MaxValue || _entries.Count >= 65535)
			{
				long position = _archiveStream.Position;
				System.IO.Compression.Zip64EndOfCentralDirectoryRecord.WriteBlock(_archiveStream, _entries.Count, startOfCentralDirectory, sizeOfCentralDirectory);
				System.IO.Compression.Zip64EndOfCentralDirectoryLocator.WriteBlock(_archiveStream, position);
			}
			System.IO.Compression.ZipEndOfCentralDirectoryBlock.WriteBlock(_archiveStream, _entries.Count, startOfCentralDirectory, sizeOfCentralDirectory, _archiveComment);
		}
	}
	public class ZipArchiveEntry
	{
		private sealed class DirectToArchiveWriterStream : Stream
		{
			private long _position;

			private System.IO.Compression.CheckSumAndSizeWriteStream _crcSizeStream;

			private bool _everWritten;

			private bool _isDisposed;

			private ZipArchiveEntry _entry;

			private bool _usedZip64inLH;

			private bool _canWrite;

			public override long Length
			{
				get
				{
					ThrowIfDisposed();
					throw new NotSupportedException("This stream from ZipArchiveEntry does not support seeking.");
				}
			}

			public override long Position
			{
				get
				{
					ThrowIfDisposed();
					return _position;
				}
				set
				{
					ThrowIfDisposed();
					throw new NotSupportedException("This stream from ZipArchiveEntry does not support seeking.");
				}
			}

			public override bool CanRead => false;

			public override bool CanSeek => false;

			public override bool CanWrite => _canWrite;

			public DirectToArchiveWriterStream(System.IO.Compression.CheckSumAndSizeWriteStream crcSizeStream, ZipArchiveEntry entry)
			{
				_position = 0L;
				_crcSizeStream = crcSizeStream;
				_everWritten = false;
				_isDisposed = false;
				_entry = entry;
				_usedZip64inLH = false;
				_canWrite = true;
			}

			private void ThrowIfDisposed()
			{
				if (_isDisposed)
				{
					throw new ObjectDisposedException(GetType().ToString(), "A stream from ZipArchiveEntry has been disposed.");
				}
			}

			public override int Read(byte[] buffer, int offset, int count)
			{
				ThrowIfDisposed();
				throw new NotSupportedException("This stream from ZipArchiveEntry does not support reading.");
			}

			public override long Seek(long offset, SeekOrigin origin)
			{
				ThrowIfDisposed();
				throw new NotSupportedException("This stream from ZipArchiveEntry does not support seeking.");
			}

			public override void SetLength(long value)
			{
				ThrowIfDisposed();
				throw new NotSupportedException("SetLength requires a stream that supports seeking and writing.");
			}

			public override void Write(byte[] buffer, int offset, int count)
			{
				if (buffer == null)
				{
					throw new ArgumentNullException("buffer");
				}
				if (offset < 0)
				{
					throw new ArgumentOutOfRangeException("offset", "The argument must be non-negative.");
				}
				if (count < 0)
				{
					throw new ArgumentOutOfRangeException("count", "The argument must be non-negative.");
				}
				if (buffer.Length - offset < count)
				{
					throw new ArgumentException("The offset and length parameters are not valid for the array that was given.");
				}
				ThrowIfDisposed();
				if (count != 0)
				{
					if (!_everWritten)
					{
						_everWritten = true;
						_usedZip64inLH = _entry.WriteLocalFileHeader(isEmptyFile: false);
					}
					_crcSizeStream.Write(buffer, offset, count);
					_position += count;
				}
			}

			public override void Flush()
			{
				ThrowIfDisposed();
				_crcSizeStream.Flush();
			}

			protected override void Dispose(bool disposing)
			{
				if (disposing && !_isDisposed)
				{
					_crcSizeStream.Dispose();
					if (!_everWritten)
					{
						_entry.WriteLocalFileHeader(isEmptyFile: true);
					}
					else if (_entry._archive.ArchiveStream.CanSeek)
					{
						_entry.WriteCrcAndSizesInLocalHeader(_usedZip64inLH);
					}
					else
					{
						_entry.WriteDataDescriptor();
					}
					_canWrite = false;
					_isDisposed = true;
				}
				base.Dispose(disposing);
			}
		}

		[Flags]
		private enum BitFlagValues : ushort
		{
			DataDescriptor = 8,
			UnicodeFileName = 0x800
		}

		internal enum CompressionMethodValues : ushort
		{
			Stored = 0,
			Deflate = 8,
			Deflate64 = 9,
			BZip2 = 12,
			LZMA = 14
		}

		private const ushort DefaultVersionToExtract = 10;

		private const int MaxSingleBufferSize = 2147483591;

		private ZipArchive _archive;

		private readonly bool _originallyInArchive;

		private readonly int _diskNumberStart;

		private readonly System.IO.Compression.ZipVersionMadeByPlatform _versionMadeByPlatform;

		private System.IO.Compression.ZipVersionNeededValues _versionMadeBySpecification;

		private System.IO.Compression.ZipVersionNeededValues _versionToExtract;

		private BitFlagValues _generalPurposeBitFlag;

		private CompressionMethodValues _storedCompressionMethod;

		private DateTimeOffset _lastModified;

		private long _compressedSize;

		private long _uncompressedSize;

		private long _offsetOfLocalHeader;

		private long? _storedOffsetOfCompressedData;

		private uint _crc32;

		private byte[][] _compressedBytes;

		private MemoryStream _storedUncompressedData;

		private bool _currentlyOpenForWrite;

		private bool _everOpenedForWrite;

		private Stream _outstandingWriteStream;

		private uint _externalFileAttr;

		private string _storedEntryName;

		private byte[] _storedEntryNameBytes;

		private List<System.IO.Compression.ZipGenericExtraField> _cdUnknownExtraFields;

		private List<System.IO.Compression.ZipGenericExtraField> _lhUnknownExtraFields;

		private byte[] _fileComment;

		private CompressionLevel? _compressionLevel;

		private static readonly bool s_allowLargeZipArchiveEntriesInUpdateMode = IntPtr.Size > 4;

		internal static readonly System.IO.Compression.ZipVersionMadeByPlatform CurrentZipPlatform = ((Path.PathSeparator == '/') ? System.IO.Compression.ZipVersionMadeByPlatform.Unix : System.IO.Compression.ZipVersionMadeByPlatform.Windows);

		public ZipArchive Archive => _archive;

		public long CompressedLength
		{
			get
			{
				if (_everOpenedForWrite)
				{
					throw new InvalidOperationException("Length properties are unavailable once an entry has been opened for writing.");
				}
				return _compressedSize;
			}
		}

		public int ExternalAttributes
		{
			get
			{
				return (int)_externalFileAttr;
			}
			set
			{
				ThrowIfInvalidArchive();
				_externalFileAttr = (uint)value;
			}
		}

		public string FullName
		{
			get
			{
				return _storedEntryName;
			}
			private set
			{
				if (value == null)
				{
					throw new ArgumentNullException("FullName");
				}
				_storedEntryNameBytes = EncodeEntryName(value, out var isUTF);
				_storedEntryName = value;
				if (isUTF)
				{
					_generalPurposeBitFlag |= BitFlagValues.UnicodeFileName;
				}
				else
				{
					_generalPurposeBitFlag &= ~BitFlagValues.UnicodeFileName;
				}
				if (ParseFileName(value, _versionMadeByPlatform) == "")
				{
					VersionToExtractAtLeast(System.IO.Compression.ZipVersionNeededValues.ExplicitDirectory);
				}
			}
		}

		public DateTimeOffset LastWriteTime
		{
			get
			{
				return _lastModified;
			}
			set
			{
				ThrowIfInvalidArchive();
				if (_archive.Mode == ZipArchiveMode.Read)
				{
					throw new NotSupportedException("Cannot modify read-only archive.");
				}
				if (_archive.Mode == ZipArchiveMode.Create && _everOpenedForWrite)
				{
					throw new IOException("Cannot modify entry in Create mode after entry has been opened for writing.");
				}
				if (value.DateTime.Year < 1980 || value.DateTime.Year > 2107)
				{
					throw new ArgumentOutOfRangeException("value", "The DateTimeOffset specified cannot be converted into a Zip file timestamp.");
				}
				_lastModified = value;
			}
		}

		public long Length
		{
			get
			{
				if (_everOpenedForWrite)
				{
					throw new InvalidOperationException("Length properties are unavailable once an entry has been opened for writing.");
				}
				return _uncompressedSize;
			}
		}

		public string Name => ParseFileName(FullName, _versionMadeByPlatform);

		internal bool EverOpenedForWrite => _everOpenedForWrite;

		private long OffsetOfCompressedData
		{
			get
			{
				if (!_storedOffsetOfCompressedData.HasValue)
				{
					_archive.ArchiveStream.Seek(_offsetOfLocalHeader, SeekOrigin.Begin);
					if (!System.IO.Compression.ZipLocalFileHeader.TrySkipBlock(_archive.ArchiveReader))
					{
						throw new InvalidDataException("A local file header is corrupt.");
					}
					_storedOffsetOfCompressedData = _archive.ArchiveStream.Position;
				}
				return _storedOffsetOfCompressedData.Value;
			}
		}

		private MemoryStream UncompressedData
		{
			get
			{
				if (_storedUncompressedData == null)
				{
					_storedUncompressedData = new MemoryStream((int)_uncompressedSize);
					if (_originallyInArchive)
					{
						using Stream stream = OpenInReadMode(checkOpenable: false);
						try
						{
							stream.CopyTo(_storedUncompressedData);
						}
						catch (InvalidD

Room Architect Tool_Data/Managed/System.IO.Compression.FileSystem.dll

Decompiled 3 months ago
using System.Buffers;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.Tracing;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using System.Text;
using System.Threading;

[assembly: AssemblyFileVersion("4.6.57.0")]
[assembly: AssemblyInformationalVersion("4.6.57.0")]
[assembly: AssemblyCopyright("(c) Various Mono authors")]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: AssemblyCompany("Mono development team")]
[assembly: AssemblyDefaultAlias("System.IO.Compression.FileSystem.dll")]
[assembly: AssemblyDescription("System.IO.Compression.FileSystem.dll")]
[assembly: AssemblyTitle("System.IO.Compression.FileSystem.dll")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: CompilationRelaxations(8)]
[assembly: AssemblyDelaySign(true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("4.0.0.0")]
[module: UnverifiableCode]
internal static class Consts
{
	public const string MonoVersion = "5.11.0.0";

	public const string MonoCompany = "Mono development team";

	public const string MonoProduct = "Mono Common Language Infrastructure";

	public const string MonoCopyright = "(c) Various Mono authors";

	public const int MonoCorlibVersion = 1051100001;

	public const string FxVersion = "4.0.0.0";

	public const string FxFileVersion = "4.6.57.0";

	public const string EnvironmentVersion = "4.0.30319.42000";

	public const string VsVersion = "0.0.0.0";

	public const string VsFileVersion = "11.0.0.0";

	private const string PublicKeyToken = "b77a5c561934e089";

	public const string AssemblyI18N = "I18N, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMicrosoft_JScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMono_Http = "Mono.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Posix = "Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Security = "Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Messaging_RabbitMQ = "Mono.Messaging.RabbitMQ, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyCorlib = "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Data = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Design = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing_Design = "System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Messaging = "System.Messaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Security = "System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Web = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Core = "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string WindowsBase_3_0 = "WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
internal class SR
{
	public const string IO_DirectoryNameWithData = "Zip entry name ends in directory separator character but contains data.";

	public const string IO_ExtractingResultsInOutside = "Extracting Zip entry would have resulted in a file outside the specified destination directory.";

	public const string ArgumentException_BufferNotFromPool = "The buffer is not associated with this pool and may not be returned to it.";
}
namespace System.Buffers
{
	internal 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->Size = 4;
			ptr->DataPointer = (IntPtr)(&bufferId);
			ptr[1].Size = 4;
			ptr[1].DataPointer = (IntPtr)(&bufferSize);
			ptr[2].Size = 4;
			ptr[2].DataPointer = (IntPtr)(&poolId);
			ptr[3].Size = 4;
			ptr[3].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->Size = 4;
			ptr->DataPointer = (IntPtr)(&bufferId);
			ptr[1].Size = 4;
			ptr[1].DataPointer = (IntPtr)(&bufferSize);
			ptr[2].Size = 4;
			ptr[2].DataPointer = (IntPtr)(&poolId);
			ptr[3].Size = 4;
			ptr[3].DataPointer = (IntPtr)(&bucketId);
			ptr[4].Size = 4;
			ptr[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("The buffer is not associated with this pool and may not be returned to it.", "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;
			Bucket[] array = new Bucket[System.Buffers.Utilities.SelectBucketIndex(maxArrayLength) + 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;
		}
	}
}
namespace System.IO
{
	internal static class PathInternal
	{
		private static readonly bool s_isCaseSensitive = GetIsCaseSensitive();

		internal static StringComparison StringComparison
		{
			get
			{
				if (!s_isCaseSensitive)
				{
					return StringComparison.OrdinalIgnoreCase;
				}
				return StringComparison.Ordinal;
			}
		}

		internal static bool IsCaseSensitive => s_isCaseSensitive;

		private static bool GetIsCaseSensitive()
		{
			try
			{
				string text = Path.Combine(Path.GetTempPath(), "CASESENSITIVETEST" + Guid.NewGuid().ToString("N"));
				using (new FileStream(text, FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None, 4096, FileOptions.DeleteOnClose))
				{
					return !File.Exists(text.ToLowerInvariant());
				}
			}
			catch (Exception)
			{
				return false;
			}
		}
	}
}
namespace System.IO.Compression
{
	public static class ZipFile
	{
		private const char PathSeparator = '/';

		public static ZipArchive OpenRead(string archiveFileName)
		{
			return Open(archiveFileName, ZipArchiveMode.Read);
		}

		public static ZipArchive Open(string archiveFileName, ZipArchiveMode mode)
		{
			return Open(archiveFileName, mode, null);
		}

		public static ZipArchive Open(string archiveFileName, ZipArchiveMode mode, Encoding entryNameEncoding)
		{
			FileMode mode2;
			FileAccess access;
			FileShare share;
			switch (mode)
			{
			case ZipArchiveMode.Read:
				mode2 = FileMode.Open;
				access = FileAccess.Read;
				share = FileShare.Read;
				break;
			case ZipArchiveMode.Create:
				mode2 = FileMode.CreateNew;
				access = FileAccess.Write;
				share = FileShare.None;
				break;
			case ZipArchiveMode.Update:
				mode2 = FileMode.OpenOrCreate;
				access = FileAccess.ReadWrite;
				share = FileShare.None;
				break;
			default:
				throw new ArgumentOutOfRangeException("mode");
			}
			FileStream fileStream = new FileStream(archiveFileName, mode2, access, share, 4096, useAsync: false);
			try
			{
				return new ZipArchive(fileStream, mode, leaveOpen: false, entryNameEncoding);
			}
			catch
			{
				fileStream.Dispose();
				throw;
			}
		}

		public static void CreateFromDirectory(string sourceDirectoryName, string destinationArchiveFileName)
		{
			DoCreateFromDirectory(sourceDirectoryName, destinationArchiveFileName, null, includeBaseDirectory: false, null);
		}

		public static void CreateFromDirectory(string sourceDirectoryName, string destinationArchiveFileName, CompressionLevel compressionLevel, bool includeBaseDirectory)
		{
			DoCreateFromDirectory(sourceDirectoryName, destinationArchiveFileName, compressionLevel, includeBaseDirectory, null);
		}

		public static void CreateFromDirectory(string sourceDirectoryName, string destinationArchiveFileName, CompressionLevel compressionLevel, bool includeBaseDirectory, Encoding entryNameEncoding)
		{
			DoCreateFromDirectory(sourceDirectoryName, destinationArchiveFileName, compressionLevel, includeBaseDirectory, entryNameEncoding);
		}

		public static void ExtractToDirectory(string sourceArchiveFileName, string destinationDirectoryName)
		{
			ExtractToDirectory(sourceArchiveFileName, destinationDirectoryName, null);
		}

		public static void ExtractToDirectory(string sourceArchiveFileName, string destinationDirectoryName, bool overwrite)
		{
			ExtractToDirectory(sourceArchiveFileName, destinationDirectoryName, null, overwrite);
		}

		public static void ExtractToDirectory(string sourceArchiveFileName, string destinationDirectoryName, Encoding entryNameEncoding)
		{
			ExtractToDirectory(sourceArchiveFileName, destinationDirectoryName, entryNameEncoding, overwrite: false);
		}

		public static void ExtractToDirectory(string sourceArchiveFileName, string destinationDirectoryName, Encoding entryNameEncoding, bool overwrite)
		{
			if (sourceArchiveFileName == null)
			{
				throw new ArgumentNullException("sourceArchiveFileName");
			}
			using ZipArchive source = Open(sourceArchiveFileName, ZipArchiveMode.Read, entryNameEncoding);
			source.ExtractToDirectory(destinationDirectoryName, overwrite);
		}

		private static void DoCreateFromDirectory(string sourceDirectoryName, string destinationArchiveFileName, CompressionLevel? compressionLevel, bool includeBaseDirectory, Encoding entryNameEncoding)
		{
			sourceDirectoryName = Path.GetFullPath(sourceDirectoryName);
			destinationArchiveFileName = Path.GetFullPath(destinationArchiveFileName);
			using ZipArchive zipArchive = Open(destinationArchiveFileName, ZipArchiveMode.Create, entryNameEncoding);
			bool flag = true;
			DirectoryInfo directoryInfo = new DirectoryInfo(sourceDirectoryName);
			string fullName = directoryInfo.FullName;
			if (includeBaseDirectory && directoryInfo.Parent != null)
			{
				fullName = directoryInfo.Parent.FullName;
			}
			char[] buffer = ArrayPool<char>.Shared.Rent(260);
			try
			{
				foreach (FileSystemInfo item in directoryInfo.EnumerateFileSystemInfos("*", SearchOption.AllDirectories))
				{
					flag = false;
					int length = item.FullName.Length - fullName.Length;
					if (item is FileInfo)
					{
						string entryName = EntryFromPath(item.FullName, fullName.Length, length, ref buffer);
						ZipFileExtensions.DoCreateEntryFromFile(zipArchive, item.FullName, entryName, compressionLevel);
					}
					else if (item is DirectoryInfo possiblyEmptyDir && IsDirEmpty(possiblyEmptyDir))
					{
						string entryName2 = EntryFromPath(item.FullName, fullName.Length, length, ref buffer, appendPathSeparator: true);
						zipArchive.CreateEntry(entryName2);
					}
				}
				if (includeBaseDirectory && flag)
				{
					zipArchive.CreateEntry(EntryFromPath(directoryInfo.Name, 0, directoryInfo.Name.Length, ref buffer, appendPathSeparator: true));
				}
			}
			finally
			{
				ArrayPool<char>.Shared.Return(buffer);
			}
		}

		private static string EntryFromPath(string entry, int offset, int length, ref char[] buffer, bool appendPathSeparator = false)
		{
			while (length > 0 && (entry[offset] == Path.DirectorySeparatorChar || entry[offset] == Path.AltDirectorySeparatorChar))
			{
				offset++;
				length--;
			}
			if (length == 0)
			{
				if (!appendPathSeparator)
				{
					return string.Empty;
				}
				return '/'.ToString();
			}
			int num = (appendPathSeparator ? (length + 1) : length);
			EnsureCapacity(ref buffer, num);
			entry.CopyTo(offset, buffer, 0, length);
			for (int i = 0; i < length; i++)
			{
				char c = buffer[i];
				if (c == Path.DirectorySeparatorChar || c == Path.AltDirectorySeparatorChar)
				{
					buffer[i] = '/';
				}
			}
			if (appendPathSeparator)
			{
				buffer[length] = '/';
			}
			return new string(buffer, 0, num);
		}

		private static void EnsureCapacity(ref char[] buffer, int min)
		{
			if (buffer.Length < min)
			{
				int num = buffer.Length * 2;
				if (num < min)
				{
					num = min;
				}
				ArrayPool<char>.Shared.Return(buffer);
				buffer = ArrayPool<char>.Shared.Rent(num);
			}
		}

		private static bool IsDirEmpty(DirectoryInfo possiblyEmptyDir)
		{
			using IEnumerator<string> enumerator = Directory.EnumerateFileSystemEntries(possiblyEmptyDir.FullName).GetEnumerator();
			return !enumerator.MoveNext();
		}
	}
	[EditorBrowsable(EditorBrowsableState.Never)]
	public static class ZipFileExtensions
	{
		public static ZipArchiveEntry CreateEntryFromFile(this ZipArchive destination, string sourceFileName, string entryName)
		{
			return DoCreateEntryFromFile(destination, sourceFileName, entryName, null);
		}

		public static ZipArchiveEntry CreateEntryFromFile(this ZipArchive destination, string sourceFileName, string entryName, CompressionLevel compressionLevel)
		{
			return DoCreateEntryFromFile(destination, sourceFileName, entryName, compressionLevel);
		}

		public static void ExtractToDirectory(this ZipArchive source, string destinationDirectoryName)
		{
			source.ExtractToDirectory(destinationDirectoryName, overwrite: false);
		}

		public static void ExtractToDirectory(this ZipArchive source, string destinationDirectoryName, bool overwrite)
		{
			if (source == null)
			{
				throw new ArgumentNullException("source");
			}
			if (destinationDirectoryName == null)
			{
				throw new ArgumentNullException("destinationDirectoryName");
			}
			string fullName = Directory.CreateDirectory(destinationDirectoryName).FullName;
			foreach (ZipArchiveEntry entry in source.Entries)
			{
				string fullPath = Path.GetFullPath(Path.Combine(fullName, entry.FullName));
				if (!fullPath.StartsWith(fullName, System.IO.PathInternal.StringComparison))
				{
					throw new IOException("Extracting Zip entry would have resulted in a file outside the specified destination directory.");
				}
				if (Path.GetFileName(fullPath).Length == 0)
				{
					if (entry.Length != 0L)
					{
						throw new IOException("Zip entry name ends in directory separator character but contains data.");
					}
					Directory.CreateDirectory(fullPath);
				}
				else
				{
					Directory.CreateDirectory(Path.GetDirectoryName(fullPath));
					entry.ExtractToFile(fullPath, overwrite);
				}
			}
		}

		internal static ZipArchiveEntry DoCreateEntryFromFile(ZipArchive destination, string sourceFileName, string entryName, CompressionLevel? compressionLevel)
		{
			if (destination == null)
			{
				throw new ArgumentNullException("destination");
			}
			if (sourceFileName == null)
			{
				throw new ArgumentNullException("sourceFileName");
			}
			if (entryName == null)
			{
				throw new ArgumentNullException("entryName");
			}
			using Stream stream = new FileStream(sourceFileName, FileMode.Open, FileAccess.Read, FileShare.Read, 4096, useAsync: false);
			ZipArchiveEntry zipArchiveEntry = (compressionLevel.HasValue ? destination.CreateEntry(entryName, compressionLevel.Value) : destination.CreateEntry(entryName));
			DateTime dateTime = File.GetLastWriteTime(sourceFileName);
			if (dateTime.Year < 1980 || dateTime.Year > 2107)
			{
				dateTime = new DateTime(1980, 1, 1, 0, 0, 0);
			}
			zipArchiveEntry.LastWriteTime = dateTime;
			using (Stream destination2 = zipArchiveEntry.Open())
			{
				stream.CopyTo(destination2);
			}
			return zipArchiveEntry;
		}

		public static void ExtractToFile(this ZipArchiveEntry source, string destinationFileName)
		{
			source.ExtractToFile(destinationFileName, overwrite: false);
		}

		public static void ExtractToFile(this ZipArchiveEntry source, string destinationFileName, bool overwrite)
		{
			if (source == null)
			{
				throw new ArgumentNullException("source");
			}
			if (destinationFileName == null)
			{
				throw new ArgumentNullException("destinationFileName");
			}
			FileMode mode = ((!overwrite) ? FileMode.CreateNew : FileMode.Create);
			using (Stream destination = new FileStream(destinationFileName, mode, FileAccess.Write, FileShare.None, 4096, useAsync: false))
			{
				using Stream stream = source.Open();
				stream.CopyTo(destination);
			}
			File.SetLastWriteTime(destinationFileName, source.LastWriteTime.DateTime);
		}
	}
}

Room Architect Tool_Data/Managed/System.Net.Http.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Net.Http.Headers;
using System.Net.Mail;
using System.Net.Security;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security.Authentication;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Unity;

[assembly: InternalsVisibleTo("System.Net.Http.WebRequest, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
[assembly: ComVisible(false)]
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: AssemblyTitle("System.Net.Http.dll")]
[assembly: AssemblyDescription("System.Net.Http.dll")]
[assembly: AssemblyDefaultAlias("System.Net.Http.dll")]
[assembly: AssemblyCompany("Mono development team")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyCopyright("(c) Various Mono authors")]
[assembly: SatelliteContractVersion("4.0.0.0")]
[assembly: AssemblyInformationalVersion("4.6.57.0")]
[assembly: AssemblyDelaySign(true)]
[assembly: AssemblyFileVersion("4.6.57.0")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: CLSCompliant(true)]
[assembly: AssemblyVersion("4.0.0.0")]
internal static class Consts
{
	public const string MonoVersion = "5.11.0.0";

	public const string MonoCompany = "Mono development team";

	public const string MonoProduct = "Mono Common Language Infrastructure";

	public const string MonoCopyright = "(c) Various Mono authors";

	public const int MonoCorlibVersion = 1051100001;

	public const string FxVersion = "4.0.0.0";

	public const string FxFileVersion = "4.6.57.0";

	public const string EnvironmentVersion = "4.0.30319.42000";

	public const string VsVersion = "0.0.0.0";

	public const string VsFileVersion = "11.0.0.0";

	private const string PublicKeyToken = "b77a5c561934e089";

	public const string AssemblyI18N = "I18N, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMicrosoft_JScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMono_Http = "Mono.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Posix = "Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Security = "Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Messaging_RabbitMQ = "Mono.Messaging.RabbitMQ, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyCorlib = "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Data = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Design = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing_Design = "System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Messaging = "System.Messaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Security = "System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Web = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Core = "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string WindowsBase_3_0 = "WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
namespace System.Net.Http
{
	public class ByteArrayContent : HttpContent
	{
		private readonly byte[] content;

		private readonly int offset;

		private readonly int count;

		public ByteArrayContent(byte[] content)
		{
			if (content == null)
			{
				throw new ArgumentNullException("content");
			}
			this.content = content;
			count = content.Length;
		}

		public ByteArrayContent(byte[] content, int offset, int count)
			: this(content)
		{
			if (offset < 0 || offset > this.count)
			{
				throw new ArgumentOutOfRangeException("offset");
			}
			if (count < 0 || count > this.count - offset)
			{
				throw new ArgumentOutOfRangeException("count");
			}
			this.offset = offset;
			this.count = count;
		}

		protected override Task<Stream> CreateContentReadStreamAsync()
		{
			return Task.FromResult((Stream)new MemoryStream(content, offset, count));
		}

		protected internal override Task SerializeToStreamAsync(Stream stream, TransportContext context)
		{
			return stream.WriteAsync(content, offset, count);
		}

		protected internal override bool TryComputeLength(out long length)
		{
			length = count;
			return true;
		}
	}
	public enum ClientCertificateOption
	{
		Manual,
		Automatic
	}
	public abstract class DelegatingHandler : HttpMessageHandler
	{
		private bool disposed;

		private HttpMessageHandler handler;

		public HttpMessageHandler InnerHandler
		{
			get
			{
				return handler;
			}
			set
			{
				if (value == null)
				{
					throw new ArgumentNullException("InnerHandler");
				}
				handler = value;
			}
		}

		protected DelegatingHandler()
		{
		}

		protected DelegatingHandler(HttpMessageHandler innerHandler)
		{
			if (innerHandler == null)
			{
				throw new ArgumentNullException("innerHandler");
			}
			InnerHandler = innerHandler;
		}

		protected override void Dispose(bool disposing)
		{
			if (disposing && !disposed)
			{
				disposed = true;
				if (InnerHandler != null)
				{
					InnerHandler.Dispose();
				}
			}
			base.Dispose(disposing);
		}

		protected internal override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
		{
			return InnerHandler.SendAsync(request, cancellationToken);
		}
	}
	public class FormUrlEncodedContent : ByteArrayContent
	{
		public FormUrlEncodedContent(IEnumerable<KeyValuePair<string, string>> nameValueCollection)
			: base(EncodeContent(nameValueCollection))
		{
			base.Headers.ContentType = new MediaTypeHeaderValue("application/x-www-form-urlencoded");
		}

		private static byte[] EncodeContent(IEnumerable<KeyValuePair<string, string>> nameValueCollection)
		{
			if (nameValueCollection == null)
			{
				throw new ArgumentNullException("nameValueCollection");
			}
			List<byte> list = new List<byte>();
			foreach (KeyValuePair<string, string> item in nameValueCollection)
			{
				if (list.Count != 0)
				{
					list.Add(38);
				}
				byte[] array = SerializeValue(item.Key);
				if (array != null)
				{
					list.AddRange(array);
				}
				list.Add(61);
				array = SerializeValue(item.Value);
				if (array != null)
				{
					list.AddRange(array);
				}
			}
			return list.ToArray();
		}

		private static byte[] SerializeValue(string value)
		{
			if (value == null)
			{
				return null;
			}
			value = Uri.EscapeDataString(value).Replace("%20", "+");
			return Encoding.ASCII.GetBytes(value);
		}
	}
	public class HttpClient : HttpMessageInvoker
	{
		private static readonly TimeSpan TimeoutDefault = TimeSpan.FromSeconds(100.0);

		private Uri base_address;

		private CancellationTokenSource cts;

		private bool disposed;

		private HttpRequestHeaders headers;

		private long buffer_size;

		private TimeSpan timeout;

		public Uri BaseAddress
		{
			get
			{
				return base_address;
			}
			set
			{
				base_address = value;
			}
		}

		public HttpRequestHeaders DefaultRequestHeaders => headers ?? (headers = new HttpRequestHeaders());

		public long MaxResponseContentBufferSize
		{
			get
			{
				return buffer_size;
			}
			set
			{
				if (value <= 0)
				{
					throw new ArgumentOutOfRangeException();
				}
				buffer_size = value;
			}
		}

		public TimeSpan Timeout
		{
			get
			{
				return timeout;
			}
			set
			{
				if (value != System.Threading.Timeout.InfiniteTimeSpan && (value <= TimeSpan.Zero || value.TotalMilliseconds > 2147483647.0))
				{
					throw new ArgumentOutOfRangeException();
				}
				timeout = value;
			}
		}

		public HttpClient()
			: this(new HttpClientHandler(), disposeHandler: true)
		{
		}

		public HttpClient(HttpMessageHandler handler)
			: this(handler, disposeHandler: true)
		{
		}

		public HttpClient(HttpMessageHandler handler, bool disposeHandler)
			: base(handler, disposeHandler)
		{
			buffer_size = 2147483647L;
			timeout = TimeoutDefault;
			cts = new CancellationTokenSource();
		}

		public void CancelPendingRequests()
		{
			using CancellationTokenSource cancellationTokenSource = Interlocked.Exchange(ref cts, new CancellationTokenSource());
			cancellationTokenSource.Cancel();
		}

		protected override void Dispose(bool disposing)
		{
			if (disposing && !disposed)
			{
				disposed = true;
				cts.Dispose();
			}
			base.Dispose(disposing);
		}

		public Task<HttpResponseMessage> DeleteAsync(string requestUri)
		{
			return SendAsync(new HttpRequestMessage(HttpMethod.Delete, requestUri));
		}

		public Task<HttpResponseMessage> DeleteAsync(string requestUri, CancellationToken cancellationToken)
		{
			return SendAsync(new HttpRequestMessage(HttpMethod.Delete, requestUri), cancellationToken);
		}

		public Task<HttpResponseMessage> DeleteAsync(Uri requestUri)
		{
			return SendAsync(new HttpRequestMessage(HttpMethod.Delete, requestUri));
		}

		public Task<HttpResponseMessage> DeleteAsync(Uri requestUri, CancellationToken cancellationToken)
		{
			return SendAsync(new HttpRequestMessage(HttpMethod.Delete, requestUri), cancellationToken);
		}

		public Task<HttpResponseMessage> GetAsync(string requestUri)
		{
			return SendAsync(new HttpRequestMessage(HttpMethod.Get, requestUri));
		}

		public Task<HttpResponseMessage> GetAsync(string requestUri, CancellationToken cancellationToken)
		{
			return SendAsync(new HttpRequestMessage(HttpMethod.Get, requestUri), cancellationToken);
		}

		public Task<HttpResponseMessage> GetAsync(string requestUri, HttpCompletionOption completionOption)
		{
			return SendAsync(new HttpRequestMessage(HttpMethod.Get, requestUri), completionOption);
		}

		public Task<HttpResponseMessage> GetAsync(string requestUri, HttpCompletionOption completionOption, CancellationToken cancellationToken)
		{
			return SendAsync(new HttpRequestMessage(HttpMethod.Get, requestUri), completionOption, cancellationToken);
		}

		public Task<HttpResponseMessage> GetAsync(Uri requestUri)
		{
			return SendAsync(new HttpRequestMessage(HttpMethod.Get, requestUri));
		}

		public Task<HttpResponseMessage> GetAsync(Uri requestUri, CancellationToken cancellationToken)
		{
			return SendAsync(new HttpRequestMessage(HttpMethod.Get, requestUri), cancellationToken);
		}

		public Task<HttpResponseMessage> GetAsync(Uri requestUri, HttpCompletionOption completionOption)
		{
			return SendAsync(new HttpRequestMessage(HttpMethod.Get, requestUri), completionOption);
		}

		public Task<HttpResponseMessage> GetAsync(Uri requestUri, HttpCompletionOption completionOption, CancellationToken cancellationToken)
		{
			return SendAsync(new HttpRequestMessage(HttpMethod.Get, requestUri), completionOption, cancellationToken);
		}

		public Task<HttpResponseMessage> PostAsync(string requestUri, HttpContent content)
		{
			return SendAsync(new HttpRequestMessage(HttpMethod.Post, requestUri)
			{
				Content = content
			});
		}

		public Task<HttpResponseMessage> PostAsync(string requestUri, HttpContent content, CancellationToken cancellationToken)
		{
			return SendAsync(new HttpRequestMessage(HttpMethod.Post, requestUri)
			{
				Content = content
			}, cancellationToken);
		}

		public Task<HttpResponseMessage> PostAsync(Uri requestUri, HttpContent content)
		{
			return SendAsync(new HttpRequestMessage(HttpMethod.Post, requestUri)
			{
				Content = content
			});
		}

		public Task<HttpResponseMessage> PostAsync(Uri requestUri, HttpContent content, CancellationToken cancellationToken)
		{
			return SendAsync(new HttpRequestMessage(HttpMethod.Post, requestUri)
			{
				Content = content
			}, cancellationToken);
		}

		public Task<HttpResponseMessage> PutAsync(Uri requestUri, HttpContent content)
		{
			return SendAsync(new HttpRequestMessage(HttpMethod.Put, requestUri)
			{
				Content = content
			});
		}

		public Task<HttpResponseMessage> PutAsync(Uri requestUri, HttpContent content, CancellationToken cancellationToken)
		{
			return SendAsync(new HttpRequestMessage(HttpMethod.Put, requestUri)
			{
				Content = content
			}, cancellationToken);
		}

		public Task<HttpResponseMessage> PutAsync(string requestUri, HttpContent content)
		{
			return SendAsync(new HttpRequestMessage(HttpMethod.Put, requestUri)
			{
				Content = content
			});
		}

		public Task<HttpResponseMessage> PutAsync(string requestUri, HttpContent content, CancellationToken cancellationToken)
		{
			return SendAsync(new HttpRequestMessage(HttpMethod.Put, requestUri)
			{
				Content = content
			}, cancellationToken);
		}

		public Task<HttpResponseMessage> SendAsync(HttpRequestMessage request)
		{
			return SendAsync(request, HttpCompletionOption.ResponseContentRead, CancellationToken.None);
		}

		public Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption)
		{
			return SendAsync(request, completionOption, CancellationToken.None);
		}

		public override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
		{
			return SendAsync(request, HttpCompletionOption.ResponseContentRead, cancellationToken);
		}

		public Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)
		{
			if (request == null)
			{
				throw new ArgumentNullException("request");
			}
			if (request.SetIsUsed())
			{
				throw new InvalidOperationException("Cannot send the same request message multiple times");
			}
			Uri requestUri = request.RequestUri;
			if (requestUri == null)
			{
				if (base_address == null)
				{
					throw new InvalidOperationException("The request URI must either be an absolute URI or BaseAddress must be set");
				}
				request.RequestUri = base_address;
			}
			else if (!requestUri.IsAbsoluteUri || (requestUri.Scheme == Uri.UriSchemeFile && requestUri.OriginalString.StartsWith("/", StringComparison.Ordinal)))
			{
				if (base_address == null)
				{
					throw new InvalidOperationException("The request URI must either be an absolute URI or BaseAddress must be set");
				}
				request.RequestUri = new Uri(base_address, requestUri);
			}
			if (headers != null)
			{
				request.Headers.AddHeaders(headers);
			}
			return SendAsyncWorker(request, completionOption, cancellationToken);
		}

		private async Task<HttpResponseMessage> SendAsyncWorker(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)
		{
			using CancellationTokenSource lcts = CancellationTokenSource.CreateLinkedTokenSource(cts.Token, cancellationToken);
			lcts.CancelAfter(timeout);
			HttpResponseMessage response = await (base.SendAsync(request, lcts.Token) ?? throw new InvalidOperationException("Handler failed to return a value")).ConfigureAwait(continueOnCapturedContext: false);
			if (response == null)
			{
				throw new InvalidOperationException("Handler failed to return a response");
			}
			if (response.Content != null && (completionOption & HttpCompletionOption.ResponseHeadersRead) == 0)
			{
				await response.Content.LoadIntoBufferAsync(MaxResponseContentBufferSize).ConfigureAwait(continueOnCapturedContext: false);
			}
			return response;
		}

		public async Task<byte[]> GetByteArrayAsync(string requestUri)
		{
			using HttpResponseMessage resp = await GetAsync(requestUri, HttpCompletionOption.ResponseContentRead).ConfigureAwait(continueOnCapturedContext: false);
			resp.EnsureSuccessStatusCode();
			return await resp.Content.ReadAsByteArrayAsync().ConfigureAwait(continueOnCapturedContext: false);
		}

		public async Task<byte[]> GetByteArrayAsync(Uri requestUri)
		{
			using HttpResponseMessage resp = await GetAsync(requestUri, HttpCompletionOption.ResponseContentRead).ConfigureAwait(continueOnCapturedContext: false);
			resp.EnsureSuccessStatusCode();
			return await resp.Content.ReadAsByteArrayAsync().ConfigureAwait(continueOnCapturedContext: false);
		}

		public async Task<Stream> GetStreamAsync(string requestUri)
		{
			HttpResponseMessage obj = await GetAsync(requestUri, HttpCompletionOption.ResponseHeadersRead).ConfigureAwait(continueOnCapturedContext: false);
			obj.EnsureSuccessStatusCode();
			return await obj.Content.ReadAsStreamAsync().ConfigureAwait(continueOnCapturedContext: false);
		}

		public async Task<Stream> GetStreamAsync(Uri requestUri)
		{
			HttpResponseMessage obj = await GetAsync(requestUri, HttpCompletionOption.ResponseHeadersRead).ConfigureAwait(continueOnCapturedContext: false);
			obj.EnsureSuccessStatusCode();
			return await obj.Content.ReadAsStreamAsync().ConfigureAwait(continueOnCapturedContext: false);
		}

		public async Task<string> GetStringAsync(string requestUri)
		{
			using HttpResponseMessage resp = await GetAsync(requestUri, HttpCompletionOption.ResponseContentRead).ConfigureAwait(continueOnCapturedContext: false);
			resp.EnsureSuccessStatusCode();
			return await resp.Content.ReadAsStringAsync().ConfigureAwait(continueOnCapturedContext: false);
		}

		public async Task<string> GetStringAsync(Uri requestUri)
		{
			using HttpResponseMessage resp = await GetAsync(requestUri, HttpCompletionOption.ResponseContentRead).ConfigureAwait(continueOnCapturedContext: false);
			resp.EnsureSuccessStatusCode();
			return await resp.Content.ReadAsStringAsync().ConfigureAwait(continueOnCapturedContext: false);
		}
	}
	public class HttpClientHandler : HttpMessageHandler
	{
		private static long groupCounter;

		private bool allowAutoRedirect;

		private DecompressionMethods automaticDecompression;

		private CookieContainer cookieContainer;

		private ICredentials credentials;

		private int maxAutomaticRedirections;

		private long maxRequestContentBufferSize;

		private bool preAuthenticate;

		private IWebProxy proxy;

		private bool useCookies;

		private bool useDefaultCredentials;

		private bool useProxy;

		private ClientCertificateOption certificate;

		private bool sentRequest;

		private string connectionGroupName;

		private bool disposed;

		public bool AllowAutoRedirect
		{
			get
			{
				return allowAutoRedirect;
			}
			set
			{
				EnsureModifiability();
				allowAutoRedirect = value;
			}
		}

		public DecompressionMethods AutomaticDecompression
		{
			get
			{
				return automaticDecompression;
			}
			set
			{
				EnsureModifiability();
				automaticDecompression = value;
			}
		}

		public ClientCertificateOption ClientCertificateOptions
		{
			get
			{
				return certificate;
			}
			set
			{
				EnsureModifiability();
				certificate = value;
			}
		}

		public CookieContainer CookieContainer
		{
			get
			{
				return cookieContainer ?? (cookieContainer = new CookieContainer());
			}
			set
			{
				EnsureModifiability();
				cookieContainer = value;
			}
		}

		public ICredentials Credentials
		{
			get
			{
				return credentials;
			}
			set
			{
				EnsureModifiability();
				credentials = value;
			}
		}

		public int MaxAutomaticRedirections
		{
			get
			{
				return maxAutomaticRedirections;
			}
			set
			{
				EnsureModifiability();
				if (value <= 0)
				{
					throw new ArgumentOutOfRangeException();
				}
				maxAutomaticRedirections = value;
			}
		}

		public long MaxRequestContentBufferSize
		{
			get
			{
				return maxRequestContentBufferSize;
			}
			set
			{
				EnsureModifiability();
				if (value < 0)
				{
					throw new ArgumentOutOfRangeException();
				}
				maxRequestContentBufferSize = value;
			}
		}

		public bool PreAuthenticate
		{
			get
			{
				return preAuthenticate;
			}
			set
			{
				EnsureModifiability();
				preAuthenticate = value;
			}
		}

		public IWebProxy Proxy
		{
			get
			{
				return proxy;
			}
			set
			{
				EnsureModifiability();
				if (!UseProxy)
				{
					throw new InvalidOperationException();
				}
				proxy = value;
			}
		}

		public virtual bool SupportsAutomaticDecompression => true;

		public virtual bool SupportsProxy => true;

		public virtual bool SupportsRedirectConfiguration => true;

		public bool UseCookies
		{
			get
			{
				return useCookies;
			}
			set
			{
				EnsureModifiability();
				useCookies = value;
			}
		}

		public bool UseDefaultCredentials
		{
			get
			{
				return useDefaultCredentials;
			}
			set
			{
				EnsureModifiability();
				useDefaultCredentials = value;
			}
		}

		public bool UseProxy
		{
			get
			{
				return useProxy;
			}
			set
			{
				EnsureModifiability();
				useProxy = value;
			}
		}

		public bool CheckCertificateRevocationList
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public X509CertificateCollection ClientCertificates
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		public ICredentials DefaultProxyCredentials
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public int MaxConnectionsPerServer
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public int MaxResponseHeadersLength
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public IDictionary<string, object> Properties
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		public Func<HttpRequestMessage, X509Certificate2, X509Chain, SslPolicyErrors, bool> ServerCertificateCustomValidationCallback
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public SslProtocols SslProtocols
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public HttpClientHandler()
		{
			allowAutoRedirect = true;
			maxAutomaticRedirections = 50;
			maxRequestContentBufferSize = 2147483647L;
			useCookies = true;
			useProxy = true;
			connectionGroupName = "HttpClientHandler" + Interlocked.Increment(ref groupCounter);
		}

		internal void EnsureModifiability()
		{
			if (sentRequest)
			{
				throw new InvalidOperationException("This instance has already started one or more requests. Properties can only be modified before sending the first request.");
			}
		}

		protected override void Dispose(bool disposing)
		{
			if (disposing && !disposed)
			{
				Volatile.Write(ref disposed, value: true);
				ServicePointManager.CloseConnectionGroup(connectionGroupName);
			}
			base.Dispose(disposing);
		}

		internal virtual HttpWebRequest CreateWebRequest(HttpRequestMessage request)
		{
			HttpWebRequest httpWebRequest = new HttpWebRequest(request.RequestUri);
			httpWebRequest.ThrowOnError = false;
			httpWebRequest.AllowWriteStreamBuffering = false;
			httpWebRequest.ConnectionGroupName = connectionGroupName;
			httpWebRequest.Method = request.Method.Method;
			httpWebRequest.ProtocolVersion = request.Version;
			if (httpWebRequest.ProtocolVersion == HttpVersion.Version10)
			{
				httpWebRequest.KeepAlive = request.Headers.ConnectionKeepAlive;
			}
			else
			{
				httpWebRequest.KeepAlive = request.Headers.ConnectionClose != true;
			}
			if (allowAutoRedirect)
			{
				httpWebRequest.AllowAutoRedirect = true;
				httpWebRequest.MaximumAutomaticRedirections = maxAutomaticRedirections;
			}
			else
			{
				httpWebRequest.AllowAutoRedirect = false;
			}
			httpWebRequest.AutomaticDecompression = automaticDecompression;
			httpWebRequest.PreAuthenticate = preAuthenticate;
			if (useCookies)
			{
				httpWebRequest.CookieContainer = CookieContainer;
			}
			if (useDefaultCredentials)
			{
				httpWebRequest.UseDefaultCredentials = true;
			}
			else
			{
				httpWebRequest.Credentials = credentials;
			}
			if (useProxy)
			{
				httpWebRequest.Proxy = proxy;
			}
			else
			{
				httpWebRequest.Proxy = null;
			}
			httpWebRequest.ServicePoint.Expect100Continue = request.Headers.ExpectContinue == true;
			WebHeaderCollection headers = httpWebRequest.Headers;
			foreach (KeyValuePair<string, IEnumerable<string>> header in request.Headers)
			{
				IEnumerable<string> enumerable = header.Value;
				if (header.Key == "Host")
				{
					httpWebRequest.Host = request.Headers.Host;
					continue;
				}
				if (header.Key == "Transfer-Encoding")
				{
					enumerable = enumerable.Where((string l) => l != "chunked");
				}
				string singleHeaderString = HttpHeaders.GetSingleHeaderString(header.Key, enumerable);
				if (singleHeaderString != null)
				{
					headers.AddInternal(header.Key, singleHeaderString);
				}
			}
			return httpWebRequest;
		}

		private HttpResponseMessage CreateResponseMessage(HttpWebResponse wr, HttpRequestMessage requestMessage, CancellationToken cancellationToken)
		{
			HttpResponseMessage httpResponseMessage = new HttpResponseMessage(wr.StatusCode);
			httpResponseMessage.RequestMessage = requestMessage;
			httpResponseMessage.ReasonPhrase = wr.StatusDescription;
			httpResponseMessage.Content = new StreamContent(wr.GetResponseStream(), cancellationToken);
			WebHeaderCollection headers = wr.Headers;
			for (int i = 0; i < headers.Count; i++)
			{
				string key = headers.GetKey(i);
				string[] values = headers.GetValues(i);
				HttpHeaders httpHeaders = ((HttpHeaders.GetKnownHeaderKind(key) != HttpHeaderKind.Content) ? ((HttpHeaders)httpResponseMessage.Headers) : ((HttpHeaders)httpResponseMessage.Content.Headers));
				httpHeaders.TryAddWithoutValidation(key, values);
			}
			requestMessage.RequestUri = wr.ResponseUri;
			return httpResponseMessage;
		}

		private static bool MethodHasBody(HttpMethod method)
		{
			switch (method.Method)
			{
			case "HEAD":
			case "GET":
			case "MKCOL":
			case "CONNECT":
			case "TRACE":
				return false;
			default:
				return true;
			}
		}

		protected internal override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
		{
			if (disposed)
			{
				throw new ObjectDisposedException(GetType().ToString());
			}
			Volatile.Write(ref sentRequest, value: true);
			HttpWebRequest wrequest = CreateWebRequest(request);
			HttpWebResponse wresponse = null;
			try
			{
				using (cancellationToken.Register(delegate(object l)
				{
					((HttpWebRequest)l).Abort();
				}, wrequest))
				{
					HttpContent content = request.Content;
					if (content != null)
					{
						WebHeaderCollection headers = wrequest.Headers;
						foreach (KeyValuePair<string, IEnumerable<string>> header in content.Headers)
						{
							foreach (string item in header.Value)
							{
								headers.AddInternal(header.Key, item);
							}
						}
						if (request.Headers.TransferEncodingChunked == true)
						{
							wrequest.SendChunked = true;
						}
						else
						{
							long? contentLength = content.Headers.ContentLength;
							if (contentLength.HasValue)
							{
								wrequest.ContentLength = contentLength.Value;
							}
							else
							{
								if (MaxRequestContentBufferSize == 0L)
								{
									throw new InvalidOperationException("The content length of the request content can't be determined. Either set TransferEncodingChunked to true, load content into buffer, or set MaxRequestContentBufferSize.");
								}
								await content.LoadIntoBufferAsync(MaxRequestContentBufferSize).ConfigureAwait(continueOnCapturedContext: false);
								wrequest.ContentLength = content.Headers.ContentLength.Value;
							}
						}
						wrequest.ResendContentFactory = content.CopyTo;
						using Stream stream = await wrequest.GetRequestStreamAsync().ConfigureAwait(continueOnCapturedContext: false);
						await request.Content.CopyToAsync(stream).ConfigureAwait(continueOnCapturedContext: false);
					}
					else if (MethodHasBody(request.Method))
					{
						wrequest.ContentLength = 0L;
					}
					wresponse = (HttpWebResponse)(await wrequest.GetResponseAsync().ConfigureAwait(continueOnCapturedContext: false));
				}
			}
			catch (WebException ex)
			{
				if (ex.Status != WebExceptionStatus.RequestCanceled)
				{
					throw new HttpRequestException("An error occurred while sending the request", ex);
				}
			}
			catch (IOException inner)
			{
				throw new HttpRequestException("An error occurred while sending the request", inner);
			}
			if (cancellationToken.IsCancellationRequested)
			{
				TaskCompletionSource<HttpResponseMessage> taskCompletionSource = new TaskCompletionSource<HttpResponseMessage>();
				taskCompletionSource.SetCanceled();
				return await taskCompletionSource.Task;
			}
			return CreateResponseMessage(wresponse, request, cancellationToken);
		}
	}
	public enum HttpCompletionOption
	{
		ResponseContentRead,
		ResponseHeadersRead
	}
	public abstract class HttpContent : IDisposable
	{
		private sealed class FixedMemoryStream : MemoryStream
		{
			private readonly long maxSize;

			public FixedMemoryStream(long maxSize)
			{
				this.maxSize = maxSize;
			}

			private void CheckOverflow(int count)
			{
				if (Length + count > maxSize)
				{
					throw new HttpRequestException($"Cannot write more bytes to the buffer than the configured maximum buffer size: {maxSize}");
				}
			}

			public override void WriteByte(byte value)
			{
				CheckOverflow(1);
				base.WriteByte(value);
			}

			public override void Write(byte[] buffer, int offset, int count)
			{
				CheckOverflow(count);
				base.Write(buffer, offset, count);
			}
		}

		private FixedMemoryStream buffer;

		private Stream stream;

		private bool disposed;

		private HttpContentHeaders headers;

		public HttpContentHeaders Headers => headers ?? (headers = new HttpContentHeaders(this));

		internal long? LoadedBufferLength
		{
			get
			{
				if (buffer != null)
				{
					return buffer.Length;
				}
				return null;
			}
		}

		internal void CopyTo(Stream stream)
		{
			CopyToAsync(stream).Wait();
		}

		public Task CopyToAsync(Stream stream)
		{
			return CopyToAsync(stream, null);
		}

		public Task CopyToAsync(Stream stream, TransportContext context)
		{
			if (stream == null)
			{
				throw new ArgumentNullException("stream");
			}
			if (buffer != null)
			{
				return buffer.CopyToAsync(stream);
			}
			return SerializeToStreamAsync(stream, context);
		}

		protected virtual async Task<Stream> CreateContentReadStreamAsync()
		{
			await LoadIntoBufferAsync().ConfigureAwait(continueOnCapturedContext: false);
			return buffer;
		}

		private static FixedMemoryStream CreateFixedMemoryStream(long maxBufferSize)
		{
			return new FixedMemoryStream(maxBufferSize);
		}

		public void Dispose()
		{
			Dispose(disposing: true);
		}

		protected virtual void Dispose(bool disposing)
		{
			if (disposing && !disposed)
			{
				disposed = true;
				if (buffer != null)
				{
					buffer.Dispose();
				}
			}
		}

		public Task LoadIntoBufferAsync()
		{
			return LoadIntoBufferAsync(2147483647L);
		}

		public async Task LoadIntoBufferAsync(long maxBufferSize)
		{
			if (disposed)
			{
				throw new ObjectDisposedException(GetType().ToString());
			}
			if (buffer == null)
			{
				buffer = CreateFixedMemoryStream(maxBufferSize);
				await SerializeToStreamAsync(buffer, null).ConfigureAwait(continueOnCapturedContext: false);
				buffer.Seek(0L, SeekOrigin.Begin);
			}
		}

		public async Task<Stream> ReadAsStreamAsync()
		{
			if (disposed)
			{
				throw new ObjectDisposedException(GetType().ToString());
			}
			if (buffer != null)
			{
				return new MemoryStream(buffer.GetBuffer(), 0, (int)buffer.Length, writable: false);
			}
			if (stream == null)
			{
				stream = await CreateContentReadStreamAsync().ConfigureAwait(continueOnCapturedContext: false);
			}
			return stream;
		}

		public async Task<byte[]> ReadAsByteArrayAsync()
		{
			await LoadIntoBufferAsync().ConfigureAwait(continueOnCapturedContext: false);
			return buffer.ToArray();
		}

		public async Task<string> ReadAsStringAsync()
		{
			await LoadIntoBufferAsync().ConfigureAwait(continueOnCapturedContext: false);
			if (buffer.Length == 0L)
			{
				return string.Empty;
			}
			byte[] array = buffer.GetBuffer();
			int num = (int)buffer.Length;
			int preambleLength = 0;
			Encoding encoding;
			if (headers != null && headers.ContentType != null && headers.ContentType.CharSet != null)
			{
				encoding = Encoding.GetEncoding(headers.ContentType.CharSet);
				preambleLength = StartsWith(array, num, encoding.GetPreamble());
			}
			else
			{
				encoding = GetEncodingFromBuffer(array, num, ref preambleLength) ?? Encoding.UTF8;
			}
			return encoding.GetString(array, preambleLength, num - preambleLength);
		}

		private static Encoding GetEncodingFromBuffer(byte[] buffer, int length, ref int preambleLength)
		{
			Encoding[] array = new Encoding[3]
			{
				Encoding.UTF8,
				Encoding.UTF32,
				Encoding.Unicode
			};
			foreach (Encoding encoding in array)
			{
				if ((preambleLength = StartsWith(buffer, length, encoding.GetPreamble())) != 0)
				{
					return encoding;
				}
			}
			return null;
		}

		private static int StartsWith(byte[] array, int length, byte[] value)
		{
			if (length < value.Length)
			{
				return 0;
			}
			for (int i = 0; i < value.Length; i++)
			{
				if (array[i] != value[i])
				{
					return 0;
				}
			}
			return value.Length;
		}

		protected internal abstract Task SerializeToStreamAsync(Stream stream, TransportContext context);

		protected internal abstract bool TryComputeLength(out long length);
	}
	public abstract class HttpMessageHandler : IDisposable
	{
		public void Dispose()
		{
			Dispose(disposing: true);
		}

		protected virtual void Dispose(bool disposing)
		{
		}

		protected internal abstract Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken);
	}
	public class HttpMessageInvoker : IDisposable
	{
		private HttpMessageHandler handler;

		private readonly bool disposeHandler;

		public HttpMessageInvoker(HttpMessageHandler handler)
			: this(handler, disposeHandler: true)
		{
		}

		public HttpMessageInvoker(HttpMessageHandler handler, bool disposeHandler)
		{
			if (handler == null)
			{
				throw new ArgumentNullException("handler");
			}
			this.handler = handler;
			this.disposeHandler = disposeHandler;
		}

		public void Dispose()
		{
			Dispose(disposing: true);
		}

		protected virtual void Dispose(bool disposing)
		{
			if (disposing && disposeHandler && handler != null)
			{
				handler.Dispose();
				handler = null;
			}
		}

		public virtual Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
		{
			return handler.SendAsync(request, cancellationToken);
		}
	}
	public class HttpMethod : IEquatable<HttpMethod>
	{
		private static readonly HttpMethod delete_method = new HttpMethod("DELETE");

		private static readonly HttpMethod get_method = new HttpMethod("GET");

		private static readonly HttpMethod head_method = new HttpMethod("HEAD");

		private static readonly HttpMethod options_method = new HttpMethod("OPTIONS");

		private static readonly HttpMethod post_method = new HttpMethod("POST");

		private static readonly HttpMethod put_method = new HttpMethod("PUT");

		private static readonly HttpMethod trace_method = new HttpMethod("TRACE");

		private readonly string method;

		public static HttpMethod Delete => delete_method;

		public static HttpMethod Get => get_method;

		public static HttpMethod Head => head_method;

		public string Method => method;

		public static HttpMethod Options => options_method;

		public static HttpMethod Post => post_method;

		public static HttpMethod Put => put_method;

		public static HttpMethod Trace => trace_method;

		public HttpMethod(string method)
		{
			if (string.IsNullOrEmpty(method))
			{
				throw new ArgumentException("method");
			}
			Parser.Token.Check(method);
			this.method = method;
		}

		public static bool operator ==(HttpMethod left, HttpMethod right)
		{
			if ((object)left == null || (object)right == null)
			{
				return (object)left == right;
			}
			return left.Equals(right);
		}

		public static bool operator !=(HttpMethod left, HttpMethod right)
		{
			return !(left == right);
		}

		public bool Equals(HttpMethod other)
		{
			return string.Equals(method, other.method, StringComparison.OrdinalIgnoreCase);
		}

		public override bool Equals(object obj)
		{
			if (obj is HttpMethod other)
			{
				return Equals(other);
			}
			return false;
		}

		public override int GetHashCode()
		{
			return method.GetHashCode();
		}

		public override string ToString()
		{
			return method;
		}
	}
	[Serializable]
	public class HttpRequestException : Exception
	{
		public HttpRequestException()
		{
		}

		public HttpRequestException(string message)
			: base(message)
		{
		}

		public HttpRequestException(string message, Exception inner)
			: base(message, inner)
		{
		}
	}
	public class HttpRequestMessage : IDisposable
	{
		private HttpRequestHeaders headers;

		private HttpMethod method;

		private Version version;

		private Dictionary<string, object> properties;

		private Uri uri;

		private bool is_used;

		private bool disposed;

		public HttpContent Content { get; set; }

		public HttpRequestHeaders Headers => headers ?? (headers = new HttpRequestHeaders());

		public HttpMethod Method
		{
			get
			{
				return method;
			}
			set
			{
				if (value == null)
				{
					throw new ArgumentNullException("method");
				}
				method = value;
			}
		}

		public IDictionary<string, object> Properties => properties ?? (properties = new Dictionary<string, object>());

		public Uri RequestUri
		{
			get
			{
				return uri;
			}
			set
			{
				if (value != null && value.IsAbsoluteUri && !IsAllowedAbsoluteUri(value))
				{
					throw new ArgumentException("Only http or https scheme is allowed");
				}
				uri = value;
			}
		}

		public Version Version
		{
			get
			{
				return version ?? HttpVersion.Version11;
			}
			set
			{
				if (value == null)
				{
					throw new ArgumentNullException("Version");
				}
				version = value;
			}
		}

		public HttpRequestMessage()
		{
			method = HttpMethod.Get;
		}

		public HttpRequestMessage(HttpMethod method, string requestUri)
			: this(method, string.IsNullOrEmpty(requestUri) ? null : new Uri(requestUri, UriKind.RelativeOrAbsolute))
		{
		}

		public HttpRequestMessage(HttpMethod method, Uri requestUri)
		{
			Method = method;
			RequestUri = requestUri;
		}

		private static bool IsAllowedAbsoluteUri(Uri uri)
		{
			if (uri.Scheme == Uri.UriSchemeHttp || uri.Scheme == Uri.UriSchemeHttps)
			{
				return true;
			}
			if (uri.Scheme == Uri.UriSchemeFile && uri.OriginalString.StartsWith("/", StringComparison.Ordinal))
			{
				return true;
			}
			return false;
		}

		public void Dispose()
		{
			Dispose(disposing: true);
		}

		protected virtual void Dispose(bool disposing)
		{
			if (disposing && !disposed)
			{
				disposed = true;
				if (Content != null)
				{
					Content.Dispose();
				}
			}
		}

		internal bool SetIsUsed()
		{
			if (is_used)
			{
				return true;
			}
			is_used = true;
			return false;
		}

		public override string ToString()
		{
			StringBuilder stringBuilder = new StringBuilder();
			stringBuilder.Append("Method: ").Append(method);
			stringBuilder.Append(", RequestUri: '").Append((RequestUri != null) ? RequestUri.ToString() : "<null>");
			stringBuilder.Append("', Version: ").Append(Version);
			stringBuilder.Append(", Content: ").Append((Content != null) ? Content.ToString() : "<null>");
			stringBuilder.Append(", Headers:\r\n{\r\n").Append(Headers);
			if (Content != null)
			{
				stringBuilder.Append(Content.Headers);
			}
			stringBuilder.Append("}");
			return stringBuilder.ToString();
		}
	}
	public class HttpResponseMessage : IDisposable
	{
		private HttpResponseHeaders headers;

		private string reasonPhrase;

		private HttpStatusCode statusCode;

		private Version version;

		private bool disposed;

		public HttpContent Content { get; set; }

		public HttpResponseHeaders Headers => headers ?? (headers = new HttpResponseHeaders());

		public bool IsSuccessStatusCode
		{
			get
			{
				if (statusCode >= HttpStatusCode.OK)
				{
					return statusCode < HttpStatusCode.MultipleChoices;
				}
				return false;
			}
		}

		public string ReasonPhrase
		{
			get
			{
				return reasonPhrase ?? HttpStatusDescription.Get(statusCode);
			}
			set
			{
				reasonPhrase = value;
			}
		}

		public HttpRequestMessage RequestMessage { get; set; }

		public HttpStatusCode StatusCode
		{
			get
			{
				return statusCode;
			}
			set
			{
				if (value < (HttpStatusCode)0)
				{
					throw new ArgumentOutOfRangeException();
				}
				statusCode = value;
			}
		}

		public Version Version
		{
			get
			{
				return version ?? HttpVersion.Version11;
			}
			set
			{
				if (value == null)
				{
					throw new ArgumentNullException("Version");
				}
				version = value;
			}
		}

		public HttpResponseMessage()
			: this(HttpStatusCode.OK)
		{
		}

		public HttpResponseMessage(HttpStatusCode statusCode)
		{
			StatusCode = statusCode;
		}

		public void Dispose()
		{
			Dispose(disposing: true);
		}

		protected virtual void Dispose(bool disposing)
		{
			if (disposing && !disposed)
			{
				disposed = true;
				if (Content != null)
				{
					Content.Dispose();
				}
			}
		}

		public HttpResponseMessage EnsureSuccessStatusCode()
		{
			if (IsSuccessStatusCode)
			{
				return this;
			}
			throw new HttpRequestException($"{(int)statusCode} ({ReasonPhrase})");
		}

		public override string ToString()
		{
			StringBuilder stringBuilder = new StringBuilder();
			stringBuilder.Append("StatusCode: ").Append((int)StatusCode);
			stringBuilder.Append(", ReasonPhrase: '").Append(ReasonPhrase ?? "<null>");
			stringBuilder.Append("', Version: ").Append(Version);
			stringBuilder.Append(", Content: ").Append((Content != null) ? Content.ToString() : "<null>");
			stringBuilder.Append(", Headers:\r\n{\r\n").Append(Headers);
			if (Content != null)
			{
				stringBuilder.Append(Content.Headers);
			}
			stringBuilder.Append("}");
			return stringBuilder.ToString();
		}
	}
	public abstract class MessageProcessingHandler : DelegatingHandler
	{
		protected MessageProcessingHandler()
		{
		}

		protected MessageProcessingHandler(HttpMessageHandler innerHandler)
			: base(innerHandler)
		{
		}

		protected abstract HttpRequestMessage ProcessRequest(HttpRequestMessage request, CancellationToken cancellationToken);

		protected abstract HttpResponseMessage ProcessResponse(HttpResponseMessage response, CancellationToken cancellationToken);

		protected internal sealed override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
		{
			request = ProcessRequest(request, cancellationToken);
			return ProcessResponse(await base.SendAsync(request, cancellationToken).ConfigureAwait(continueOnCapturedContext: false), cancellationToken);
		}
	}
	public class MultipartContent : HttpContent, IEnumerable<HttpContent>, IEnumerable
	{
		private List<HttpContent> nested_content;

		private readonly string boundary;

		public MultipartContent()
			: this("mixed")
		{
		}

		public MultipartContent(string subtype)
			: this(subtype, Guid.NewGuid().ToString("D", CultureInfo.InvariantCulture))
		{
		}

		public MultipartContent(string subtype, string boundary)
		{
			if (string.IsNullOrWhiteSpace(subtype))
			{
				throw new ArgumentException("boundary");
			}
			if (string.IsNullOrWhiteSpace(boundary))
			{
				throw new ArgumentException("boundary");
			}
			if (boundary.Length > 70)
			{
				throw new ArgumentOutOfRangeException("boundary");
			}
			if (boundary.Last() == ' ' || !IsValidRFC2049(boundary))
			{
				throw new ArgumentException("boundary");
			}
			this.boundary = boundary;
			nested_content = new List<HttpContent>(2);
			base.Headers.ContentType = new MediaTypeHeaderValue("multipart/" + subtype)
			{
				Parameters = 
				{
					new NameValueHeaderValue("boundary", "\"" + boundary + "\"")
				}
			};
		}

		private static bool IsValidRFC2049(string s)
		{
			foreach (char c in s)
			{
				if ((c < 'a' || c > 'z') && (c < 'A' || c > 'Z') && (c < '0' || c > '9'))
				{
					switch (c)
					{
					case '\'':
					case '(':
					case ')':
					case '+':
					case ',':
					case '-':
					case '.':
					case '/':
					case ':':
					case '=':
					case '?':
						continue;
					}
					return false;
				}
			}
			return true;
		}

		public virtual void Add(HttpContent content)
		{
			if (content == null)
			{
				throw new ArgumentNullException("content");
			}
			if (nested_content == null)
			{
				nested_content = new List<HttpContent>();
			}
			nested_content.Add(content);
		}

		protected override void Dispose(bool disposing)
		{
			if (disposing)
			{
				foreach (HttpContent item in nested_content)
				{
					item.Dispose();
				}
				nested_content = null;
			}
			base.Dispose(disposing);
		}

		protected internal override async Task SerializeToStreamAsync(Stream stream, TransportContext context)
		{
			StringBuilder sb = new StringBuilder();
			sb.Append('-').Append('-');
			sb.Append(boundary);
			sb.Append('\r').Append('\n');
			byte[] bytes;
			for (int i = 0; i < nested_content.Count; i++)
			{
				HttpContent c = nested_content[i];
				foreach (KeyValuePair<string, IEnumerable<string>> header in c.Headers)
				{
					sb.Append(header.Key);
					sb.Append(':').Append(' ');
					foreach (string item in header.Value)
					{
						sb.Append(item);
					}
					sb.Append('\r').Append('\n');
				}
				sb.Append('\r').Append('\n');
				bytes = Encoding.ASCII.GetBytes(sb.ToString());
				sb.Clear();
				await stream.WriteAsync(bytes, 0, bytes.Length).ConfigureAwait(continueOnCapturedContext: false);
				await c.SerializeToStreamAsync(stream, context).ConfigureAwait(continueOnCapturedContext: false);
				if (i != nested_content.Count - 1)
				{
					sb.Append('\r').Append('\n');
					sb.Append('-').Append('-');
					sb.Append(boundary);
					sb.Append('\r').Append('\n');
				}
			}
			sb.Append('\r').Append('\n');
			sb.Append('-').Append('-');
			sb.Append(boundary);
			sb.Append('-').Append('-');
			sb.Append('\r').Append('\n');
			bytes = Encoding.ASCII.GetBytes(sb.ToString());
			await stream.WriteAsync(bytes, 0, bytes.Length).ConfigureAwait(continueOnCapturedContext: false);
		}

		protected internal override bool TryComputeLength(out long length)
		{
			length = 12 + 2 * boundary.Length;
			for (int i = 0; i < nested_content.Count; i++)
			{
				HttpContent httpContent = nested_content[i];
				foreach (KeyValuePair<string, IEnumerable<string>> header in httpContent.Headers)
				{
					length += header.Key.Length;
					length += 4L;
					foreach (string item in header.Value)
					{
						length += item.Length;
					}
				}
				if (!httpContent.TryComputeLength(out var length2))
				{
					return false;
				}
				length += 2L;
				length += length2;
				if (i != nested_content.Count - 1)
				{
					length += 6L;
					length += boundary.Length;
				}
			}
			return true;
		}

		public IEnumerator<HttpContent> GetEnumerator()
		{
			return nested_content.GetEnumerator();
		}

		IEnumerator IEnumerable.GetEnumerator()
		{
			return nested_content.GetEnumerator();
		}
	}
	public class MultipartFormDataContent : MultipartContent
	{
		public MultipartFormDataContent()
			: base("form-data")
		{
		}

		public MultipartFormDataContent(string boundary)
			: base("form-data", boundary)
		{
		}

		public override void Add(HttpContent content)
		{
			base.Add(content);
			AddContentDisposition(content, null, null);
		}

		public void Add(HttpContent content, string name)
		{
			base.Add(content);
			if (string.IsNullOrWhiteSpace(name))
			{
				throw new ArgumentException("name");
			}
			AddContentDisposition(content, name, null);
		}

		public void Add(HttpContent content, string name, string fileName)
		{
			base.Add(content);
			if (string.IsNullOrWhiteSpace(name))
			{
				throw new ArgumentException("name");
			}
			if (string.IsNullOrWhiteSpace(fileName))
			{
				throw new ArgumentException("fileName");
			}
			AddContentDisposition(content, name, fileName);
		}

		private void AddContentDisposition(HttpContent content, string name, string fileName)
		{
			HttpContentHeaders httpContentHeaders = content.Headers;
			if (httpContentHeaders.ContentDisposition == null)
			{
				httpContentHeaders.ContentDisposition = new ContentDispositionHeaderValue("form-data")
				{
					Name = name,
					FileName = fileName,
					FileNameStar = fileName
				};
			}
		}
	}
	public class StreamContent : HttpContent
	{
		private readonly Stream content;

		private readonly int bufferSize;

		private readonly CancellationToken cancellationToken;

		private readonly long startPosition;

		private bool contentCopied;

		public StreamContent(Stream content)
			: this(content, 16384)
		{
		}

		public StreamContent(Stream content, int bufferSize)
		{
			if (content == null)
			{
				throw new ArgumentNullException("content");
			}
			if (bufferSize <= 0)
			{
				throw new ArgumentOutOfRangeException("bufferSize");
			}
			this.content = content;
			this.bufferSize = bufferSize;
			if (content.CanSeek)
			{
				startPosition = content.Position;
			}
		}

		internal StreamContent(Stream content, CancellationToken cancellationToken)
			: this(content)
		{
			this.cancellationToken = cancellationToken;
		}

		protected override Task<Stream> CreateContentReadStreamAsync()
		{
			return Task.FromResult(content);
		}

		protected override void Dispose(bool disposing)
		{
			if (disposing)
			{
				content.Dispose();
			}
			base.Dispose(disposing);
		}

		protected internal override Task SerializeToStreamAsync(Stream stream, TransportContext context)
		{
			if (contentCopied)
			{
				if (!content.CanSeek)
				{
					throw new InvalidOperationException("The stream was already consumed. It cannot be read again.");
				}
				content.Seek(startPosition, SeekOrigin.Begin);
			}
			else
			{
				contentCopied = true;
			}
			return content.CopyToAsync(stream, bufferSize, cancellationToken);
		}

		protected internal override bool TryComputeLength(out long length)
		{
			if (!content.CanSeek)
			{
				length = 0L;
				return false;
			}
			length = content.Length - startPosition;
			return true;
		}
	}
	public class StringContent : ByteArrayContent
	{
		public StringContent(string content)
			: this(content, null, null)
		{
		}

		public StringContent(string content, Encoding encoding)
			: this(content, encoding, null)
		{
		}

		public StringContent(string content, Encoding encoding, string mediaType)
			: base(GetByteArray(content, encoding))
		{
			base.Headers.ContentType = new MediaTypeHeaderValue(mediaType ?? "text/plain")
			{
				CharSet = (encoding ?? Encoding.UTF8).WebName
			};
		}

		private static byte[] GetByteArray(string content, Encoding encoding)
		{
			return (encoding ?? Encoding.UTF8).GetBytes(content);
		}
	}
}
namespace System.Net.Http.Headers
{
	public class AuthenticationHeaderValue : ICloneable
	{
		public string Parameter { get; private set; }

		public string Scheme { get; private set; }

		public AuthenticationHeaderValue(string scheme)
			: this(scheme, null)
		{
		}

		public AuthenticationHeaderValue(string scheme, string parameter)
		{
			Parser.Token.Check(scheme);
			Scheme = scheme;
			Parameter = parameter;
		}

		private AuthenticationHeaderValue()
		{
		}

		object ICloneable.Clone()
		{
			return MemberwiseClone();
		}

		public override bool Equals(object obj)
		{
			if (obj is AuthenticationHeaderValue authenticationHeaderValue && string.Equals(authenticationHeaderValue.Scheme, Scheme, StringComparison.OrdinalIgnoreCase))
			{
				return authenticationHeaderValue.Parameter == Parameter;
			}
			return false;
		}

		public override int GetHashCode()
		{
			int num = Scheme.ToLowerInvariant().GetHashCode();
			if (!string.IsNullOrEmpty(Parameter))
			{
				num ^= Parameter.ToLowerInvariant().GetHashCode();
			}
			return num;
		}

		public static AuthenticationHeaderValue Parse(string input)
		{
			if (TryParse(input, out var parsedValue))
			{
				return parsedValue;
			}
			throw new FormatException(input);
		}

		public static bool TryParse(string input, out AuthenticationHeaderValue parsedValue)
		{
			if (TryParseElement(new Lexer(input), out parsedValue, out var t) && (Token.Type)t == Token.Type.End)
			{
				return true;
			}
			parsedValue = null;
			return false;
		}

		internal static bool TryParse(string input, int minimalCount, out List<AuthenticationHeaderValue> result)
		{
			return CollectionParser.TryParse(input, minimalCount, (ElementTryParser<AuthenticationHeaderValue>)TryParseElement, out result);
		}

		private static bool TryParseElement(Lexer lexer, out AuthenticationHeaderValue parsedValue, out Token t)
		{
			t = lexer.Scan();
			if ((Token.Type)t != Token.Type.Token)
			{
				parsedValue = null;
				return false;
			}
			parsedValue = new AuthenticationHeaderValue();
			parsedValue.Scheme = lexer.GetStringValue(t);
			t = lexer.Scan();
			if ((Token.Type)t == Token.Type.Token)
			{
				parsedValue.Parameter = lexer.GetRemainingStringValue(t.StartPosition);
				t = new Token(Token.Type.End, 0, 0);
			}
			return true;
		}

		public override string ToString()
		{
			if (Parameter == null)
			{
				return Scheme;
			}
			return Scheme + " " + Parameter;
		}
	}
	public class CacheControlHeaderValue : ICloneable
	{
		private List<NameValueHeaderValue> extensions;

		private List<string> no_cache_headers;

		private List<string> private_headers;

		public ICollection<NameValueHeaderValue> Extensions => extensions ?? (extensions = new List<NameValueHeaderValue>());

		public TimeSpan? MaxAge { get; set; }

		public bool MaxStale { get; set; }

		public TimeSpan? MaxStaleLimit { get; set; }

		public TimeSpan? MinFresh { get; set; }

		public bool MustRevalidate { get; set; }

		public bool NoCache { get; set; }

		public ICollection<string> NoCacheHeaders => no_cache_headers ?? (no_cache_headers = new List<string>());

		public bool NoStore { get; set; }

		public bool NoTransform { get; set; }

		public bool OnlyIfCached { get; set; }

		public bool Private { get; set; }

		public ICollection<string> PrivateHeaders => private_headers ?? (private_headers = new List<string>());

		public bool ProxyRevalidate { get; set; }

		public bool Public { get; set; }

		public TimeSpan? SharedMaxAge { get; set; }

		object ICloneable.Clone()
		{
			CacheControlHeaderValue cacheControlHeaderValue = (CacheControlHeaderValue)MemberwiseClone();
			if (extensions != null)
			{
				cacheControlHeaderValue.extensions = new List<NameValueHeaderValue>();
				foreach (NameValueHeaderValue extension in extensions)
				{
					cacheControlHeaderValue.extensions.Add(extension);
				}
			}
			if (no_cache_headers != null)
			{
				cacheControlHeaderValue.no_cache_headers = new List<string>();
				foreach (string no_cache_header in no_cache_headers)
				{
					cacheControlHeaderValue.no_cache_headers.Add(no_cache_header);
				}
			}
			if (private_headers != null)
			{
				cacheControlHeaderValue.private_headers = new List<string>();
				foreach (string private_header in private_headers)
				{
					cacheControlHeaderValue.private_headers.Add(private_header);
				}
			}
			return cacheControlHeaderValue;
		}

		public override bool Equals(object obj)
		{
			if (!(obj is CacheControlHeaderValue cacheControlHeaderValue))
			{
				return false;
			}
			TimeSpan? maxAge = MaxAge;
			TimeSpan? maxAge2 = cacheControlHeaderValue.MaxAge;
			if (maxAge.HasValue == maxAge2.HasValue && (!maxAge.HasValue || !(maxAge.GetValueOrDefault() != maxAge2.GetValueOrDefault())) && MaxStale == cacheControlHeaderValue.MaxStale && !(MaxStaleLimit != cacheControlHeaderValue.MaxStaleLimit))
			{
				maxAge = MinFresh;
				maxAge2 = cacheControlHeaderValue.MinFresh;
				if (maxAge.HasValue == maxAge2.HasValue && (!maxAge.HasValue || !(maxAge.GetValueOrDefault() != maxAge2.GetValueOrDefault())) && MustRevalidate == cacheControlHeaderValue.MustRevalidate && NoCache == cacheControlHeaderValue.NoCache && NoStore == cacheControlHeaderValue.NoStore && NoTransform == cacheControlHeaderValue.NoTransform && OnlyIfCached == cacheControlHeaderValue.OnlyIfCached && Private == cacheControlHeaderValue.Private && ProxyRevalidate == cacheControlHeaderValue.ProxyRevalidate && Public == cacheControlHeaderValue.Public && !(SharedMaxAge != cacheControlHeaderValue.SharedMaxAge))
				{
					if (extensions.SequenceEqual(cacheControlHeaderValue.extensions) && no_cache_headers.SequenceEqual(cacheControlHeaderValue.no_cache_headers))
					{
						return private_headers.SequenceEqual(cacheControlHeaderValue.private_headers);
					}
					return false;
				}
			}
			return false;
		}

		public override int GetHashCode()
		{
			return (((((((((((((((29 * 29 + HashCodeCalculator.Calculate(extensions)) * 29 + MaxAge.GetHashCode()) * 29 + MaxStale.GetHashCode()) * 29 + MaxStaleLimit.GetHashCode()) * 29 + MinFresh.GetHashCode()) * 29 + MustRevalidate.GetHashCode()) * 29 + HashCodeCalculator.Calculate(no_cache_headers)) * 29 + NoCache.GetHashCode()) * 29 + NoStore.GetHashCode()) * 29 + NoTransform.GetHashCode()) * 29 + OnlyIfCached.GetHashCode()) * 29 + Private.GetHashCode()) * 29 + HashCodeCalculator.Calculate(private_headers)) * 29 + ProxyRevalidate.GetHashCode()) * 29 + Public.GetHashCode()) * 29 + SharedMaxAge.GetHashCode();
		}

		public static CacheControlHeaderValue Parse(string input)
		{
			if (TryParse(input, out var parsedValue))
			{
				return parsedValue;
			}
			throw new FormatException(input);
		}

		public static bool TryParse(string input, out CacheControlHeaderValue parsedValue)
		{
			parsedValue = null;
			if (input == null)
			{
				return true;
			}
			CacheControlHeaderValue cacheControlHeaderValue = new CacheControlHeaderValue();
			Lexer lexer = new Lexer(input);
			Token token;
			do
			{
				token = lexer.Scan();
				if ((Token.Type)token != Token.Type.Token)
				{
					return false;
				}
				string stringValue = lexer.GetStringValue(token);
				bool flag = false;
				switch (stringValue)
				{
				case "no-store":
					cacheControlHeaderValue.NoStore = true;
					break;
				case "no-transform":
					cacheControlHeaderValue.NoTransform = true;
					break;
				case "only-if-cached":
					cacheControlHeaderValue.OnlyIfCached = true;
					break;
				case "public":
					cacheControlHeaderValue.Public = true;
					break;
				case "must-revalidate":
					cacheControlHeaderValue.MustRevalidate = true;
					break;
				case "proxy-revalidate":
					cacheControlHeaderValue.ProxyRevalidate = true;
					break;
				case "max-stale":
				{
					cacheControlHeaderValue.MaxStale = true;
					token = lexer.Scan();
					if ((Token.Type)token != Token.Type.SeparatorEqual)
					{
						flag = true;
						break;
					}
					token = lexer.Scan();
					if ((Token.Type)token != Token.Type.Token)
					{
						return false;
					}
					TimeSpan? maxStaleLimit = lexer.TryGetTimeSpanValue(token);
					if (!maxStaleLimit.HasValue)
					{
						return false;
					}
					cacheControlHeaderValue.MaxStaleLimit = maxStaleLimit;
					break;
				}
				case "max-age":
				case "s-maxage":
				case "min-fresh":
				{
					token = lexer.Scan();
					if ((Token.Type)token != Token.Type.SeparatorEqual)
					{
						return false;
					}
					token = lexer.Scan();
					if ((Token.Type)token != Token.Type.Token)
					{
						return false;
					}
					TimeSpan? maxStaleLimit = lexer.TryGetTimeSpanValue(token);
					if (!maxStaleLimit.HasValue)
					{
						return false;
					}
					switch (stringValue.Length)
					{
					case 7:
						cacheControlHeaderValue.MaxAge = maxStaleLimit;
						break;
					case 8:
						cacheControlHeaderValue.SharedMaxAge = maxStaleLimit;
						break;
					default:
						cacheControlHeaderValue.MinFresh = maxStaleLimit;
						break;
					}
					break;
				}
				case "private":
				case "no-cache":
				{
					if (stringValue.Length == 7)
					{
						cacheControlHeaderValue.Private = true;
					}
					else
					{
						cacheControlHeaderValue.NoCache = true;
					}
					token = lexer.Scan();
					if ((Token.Type)token != Token.Type.SeparatorEqual)
					{
						flag = true;
						break;
					}
					token = lexer.Scan();
					if ((Token.Type)token != Token.Type.QuotedString)
					{
						return false;
					}
					string[] array = lexer.GetQuotedStringValue(token).Split(new char[1] { ',' });
					for (int i = 0; i < array.Length; i++)
					{
						string item = array[i].Trim('\t', ' ');
						if (stringValue.Length == 7)
						{
							cacheControlHeaderValue.PrivateHeaders.Add(item);
							continue;
						}
						cacheControlHeaderValue.NoCache = true;
						cacheControlHeaderValue.NoCacheHeaders.Add(item);
					}
					break;
				}
				default:
				{
					string stringValue2 = lexer.GetStringValue(token);
					string value = null;
					token = lexer.Scan();
					if ((Token.Type)token == Token.Type.SeparatorEqual)
					{
						token = lexer.Scan();
						Token.Type kind = token.Kind;
						if ((uint)(kind - 2) > 1u)
						{
							return false;
						}
						value = lexer.GetStringValue(token);
					}
					else
					{
						flag = true;
					}
					cacheControlHeaderValue.Extensions.Add(NameValueHeaderValue.Create(stringValue2, value));
					break;
				}
				}
				if (!flag)
				{
					token = lexer.Scan();
				}
			}
			while ((Token.Type)token == Token.Type.SeparatorComma);
			if ((Token.Type)token != Token.Type.End)
			{
				return false;
			}
			parsedValue = cacheControlHeaderValue;
			return true;
		}

		public override string ToString()
		{
			StringBuilder stringBuilder = new StringBuilder();
			if (NoStore)
			{
				stringBuilder.Append("no-store");
				stringBuilder.Append(", ");
			}
			if (NoTransform)
			{
				stringBuilder.Append("no-transform");
				stringBuilder.Append(", ");
			}
			if (OnlyIfCached)
			{
				stringBuilder.Append("only-if-cached");
				stringBuilder.Append(", ");
			}
			if (Public)
			{
				stringBuilder.Append("public");
				stringBuilder.Append(", ");
			}
			if (MustRevalidate)
			{
				stringBuilder.Append("must-revalidate");
				stringBuilder.Append(", ");
			}
			if (ProxyRevalidate)
			{
				stringBuilder.Append("proxy-revalidate");
				stringBuilder.Append(", ");
			}
			if (NoCache)
			{
				stringBuilder.Append("no-cache");
				if (no_cache_headers != null)
				{
					stringBuilder.Append("=\"");
					no_cache_headers.ToStringBuilder(stringBuilder);
					stringBuilder.Append("\"");
				}
				stringBuilder.Append(", ");
			}
			if (MaxAge.HasValue)
			{
				stringBuilder.Append("max-age=");
				stringBuilder.Append(MaxAge.Value.TotalSeconds.ToString(CultureInfo.InvariantCulture));
				stringBuilder.Append(", ");
			}
			if (SharedMaxAge.HasValue)
			{
				stringBuilder.Append("s-maxage=");
				stringBuilder.Append(SharedMaxAge.Value.TotalSeconds.ToString(CultureInfo.InvariantCulture));
				stringBuilder.Append(", ");
			}
			if (MaxStale)
			{
				stringBuilder.Append("max-stale");
				if (MaxStaleLimit.HasValue)
				{
					stringBuilder.Append("=");
					stringBuilder.Append(MaxStaleLimit.Value.TotalSeconds.ToString(CultureInfo.InvariantCulture));
				}
				stringBuilder.Append(", ");
			}
			if (MinFresh.HasValue)
			{
				stringBuilder.Append("min-fresh=");
				stringBuilder.Append(MinFresh.Value.TotalSeconds.ToString(CultureInfo.InvariantCulture));
				stringBuilder.Append(", ");
			}
			if (Private)
			{
				stringBuilder.Append("private");
				if (private_headers != null)
				{
					stringBuilder.Append("=\"");
					private_headers.ToStringBuilder(stringBuilder);
					stringBuilder.Append("\"");
				}
				stringBuilder.Append(", ");
			}
			extensions.ToStringBuilder(stringBuilder);
			if (stringBuilder.Length > 2 && stringBuilder[stringBuilder.Length - 2] == ',' && stringBuilder[stringBuilder.Length - 1] == ' ')
			{
				stringBuilder.Remove(stringBuilder.Length - 2, 2);
			}
			return stringBuilder.ToString();
		}
	}
	internal static class CollectionExtensions
	{
		public static bool SequenceEqual<TSource>(this List<TSource> first, List<TSource> second)
		{
			if (first == null)
			{
				if (second != null)
				{
					return second.Count == 0;
				}
				return true;
			}
			if (second == null)
			{
				if (first != null)
				{
					return first.Count == 0;
				}
				return true;
			}
			return Enumerable.SequenceEqual(first, second);
		}

		public static void SetValue(this List<NameValueHeaderValue> parameters, string key, string value)
		{
			for (int i = 0; i < parameters.Count; i++)
			{
				if (string.Equals(parameters[i].Name, key, StringComparison.OrdinalIgnoreCase))
				{
					if (value == null)
					{
						parameters.RemoveAt(i);
					}
					else
					{
						parameters[i].Value = value;
					}
					return;
				}
			}
			if (!string.IsNullOrEmpty(value))
			{
				parameters.Add(new NameValueHeaderValue(key, value));
			}
		}

		public static string ToString<T>(this List<T> list)
		{
			if (list == null || list.Count == 0)
			{
				return null;
			}
			StringBuilder stringBuilder = new StringBuilder();
			for (int i = 0; i < list.Count; i++)
			{
				stringBuilder.Append("; ");
				stringBuilder.Append(list[i]);
			}
			return stringBuilder.ToString();
		}

		public static void ToStringBuilder<T>(this List<T> list, StringBuilder sb)
		{
			if (list == null || list.Count == 0)
			{
				return;
			}
			for (int i = 0; i < list.Count; i++)
			{
				if (i > 0)
				{
					sb.Append(", ");
				}
				sb.Append(list[i]);
			}
		}
	}
	internal delegate bool ElementTryParser<T>(Lexer lexer, out T parsedValue, out Token token);
	internal static class CollectionParser
	{
		public static bool TryParse<T>(string input, int minimalCount, ElementTryParser<T> parser, out List<T> result) where T : class
		{
			Lexer lexer = new Lexer(input);
			result = new List<T>();
			Token token;
			do
			{
				if (!parser(lexer, out var parsedValue, out token))
				{
					return false;
				}
				if (parsedValue != null)
				{
					result.Add(parsedValue);
				}
			}
			while ((Token.Type)token == Token.Type.SeparatorComma);
			if ((Token.Type)token == Token.Type.End)
			{
				if (minimalCount > result.Count)
				{
					result = null;
					return false;
				}
				return true;
			}
			result = null;
			return false;
		}

		public static bool TryParse(string input, int minimalCount, out List<string> result)
		{
			return TryParse(input, minimalCount, (ElementTryParser<string>)TryParseStringElement, out result);
		}

		public static bool TryParseRepetition(string input, int minimalCount, out List<string> result)
		{
			return TryParseRepetition(input, minimalCount, (ElementTryParser<string>)TryParseStringElement, out result);
		}

		private static bool TryParseStringElement(Lexer lexer, out string parsedValue, out Token t)
		{
			t = lexer.Scan();
			if ((Token.Type)t == Token.Type.Token)
			{
				parsedValue = lexer.GetStringValue(t);
				if (parsedValue.Length == 0)
				{
					parsedValue = null;
				}
				t = lexer.Scan();
			}
			else
			{
				parsedValue = null;
			}
			return true;
		}

		public static bool TryParseRepetition<T>(string input, int minimalCount, ElementTryParser<T> parser, out List<T> result) where T : class
		{
			Lexer lexer = new Lexer(input);
			result = new List<T>();
			Token token;
			do
			{
				if (!parser(lexer, out var parsedValue, out token))
				{
					return false;
				}
				if (parsedValue != null)
				{
					result.Add(parsedValue);
				}
			}
			while ((Token.Type)token != Token.Type.End);
			if (minimalCount > result.Count)
			{
				return false;
			}
			return true;
		}
	}
	public class ContentDispositionHeaderValue : ICloneable
	{
		private string dispositionType;

		private List<NameValueHeaderValue> parameters;

		public DateTimeOffset? CreationDate
		{
			get
			{
				return GetDateValue("creation-date");
			}
			set
			{
				SetDateValue("creation-date", value);
			}
		}

		public string DispositionType
		{
			get
			{
				return dispositionType;
			}
			set
			{
				Parser.Token.Check(value);
				dispositionType = value;
			}
		}

		public string FileName
		{
			get
			{
				string text = FindParameter("filename");
				if (text == null)
				{
					return null;
				}
				return DecodeValue(text, extendedNotation: false);
			}
			set
			{
				if (value != null)
				{
					value = EncodeBase64Value(value);
				}
				SetValue("filename", value);
			}
		}

		public string FileNameStar
		{
			get
			{
				string text = FindParameter("filename*");
				if (text == null)
				{
					return null;
				}
				return DecodeValue(text, extendedNotation: true);
			}
			set
			{
				if (value != null)
				{
					value = EncodeRFC5987(value);
				}
				SetValue("filename*", value);
			}
		}

		public DateTimeOffset? ModificationDate
		{
			get
			{
				return GetDateValue("modification-date");
			}
			set
			{
				SetDateValue("modification-date", value);
			}
		}

		public string Name
		{
			get
			{
				string text = FindParameter("name");
				if (text == null)
				{
					return null;
				}
				return DecodeValue(text, extendedNotation: false);
			}
			set
			{
				if (value != null)
				{
					value = EncodeBase64Value(value);
				}
				SetValue("name", value);
			}
		}

		public ICollection<NameValueHeaderValue> Parameters => parameters ?? (parameters = new List<NameValueHeaderValue>());

		public DateTimeOffset? ReadDate
		{
			get
			{
				return GetDateValue("read-date");
			}
			set
			{
				SetDateValue("read-date", value);
			}
		}

		public long? Size
		{
			get
			{
				if (Parser.Long.TryParse(FindParameter("size"), out var result))
				{
					return result;
				}
				return null;
			}
			set
			{
				if (!value.HasValue)
				{
					SetValue("size", null);
					return;
				}
				if (value < 0)
				{
					throw new ArgumentOutOfRangeException("value");
				}
				SetValue("size", value.Value.ToString(CultureInfo.InvariantCulture));
			}
		}

		private ContentDispositionHeaderValue()
		{
		}

		public ContentDispositionHeaderValue(string dispositionType)
		{
			DispositionType = dispositionType;
		}

		protected ContentDispositionHeaderValue(ContentDispositionHeaderValue source)
		{
			if (source == null)
			{
				throw new ArgumentNullException("source");
			}
			dispositionType = source.dispositionType;
			if (source.parameters == null)
			{
				return;
			}
			foreach (NameValueHeaderValue parameter in source.parameters)
			{
				Parameters.Add(new NameValueHeaderValue(parameter));
			}
		}

		object ICloneable.Clone()
		{
			return new ContentDispositionHeaderValue(this);
		}

		public override bool Equals(object obj)
		{
			if (obj is ContentDispositionHeaderValue contentDispositionHeaderValue && string.Equals(contentDispositionHeaderValue.dispositionType, dispositionType, StringComparison.OrdinalIgnoreCase))
			{
				return contentDispositionHeaderValue.parameters.SequenceEqual(parameters);
			}
			return false;
		}

		private string FindParameter(string name)
		{
			if (parameters == null)
			{
				return null;
			}
			foreach (NameValueHeaderValue parameter in parameters)
			{
				if (string.Equals(parameter.Name, name, StringComparison.OrdinalIgnoreCase))
				{
					return parameter.Value;
				}
			}
			return null;
		}

		private DateTimeOffset? GetDateValue(string name)
		{
			string text = FindParameter(name);
			if (text == null || text == null)
			{
				return null;
			}
			if (text.Length < 3)
			{
				return null;
			}
			if (text[0] == '"')
			{
				text = text.Substring(1, text.Length - 2);
			}
			if (Lexer.TryGetDateValue(text, out var value))
			{
				return value;
			}
			return null;
		}

		private static string EncodeBase64Value(string value)
		{
			bool flag = value.Length > 1 && value[0] == '"' && value[value.Length - 1] == '"';
			if (flag)
			{
				value = value.Substring(1, value.Length - 2);
			}
			for (int i = 0; i < value.Length; i++)
			{
				if (value[i] > '\u007f')
				{
					Encoding uTF = Encoding.UTF8;
					return $"\"=?{uTF.WebName}?B?{Convert.ToBase64String(uTF.GetBytes(value))}?=\"";
				}
			}
			if (flag || !Lexer.IsValidToken(value))
			{
				return "\"" + value + "\"";
			}
			return value;
		}

		private static string EncodeRFC5987(string value)
		{
			Encoding uTF = Encoding.UTF8;
			StringBuilder stringBuilder = new StringBuilder(value.Length + 11);
			stringBuilder.Append(uTF.WebName);
			stringBuilder.Append('\'');
			stringBuilder.Append('\'');
			foreach (char c in value)
			{
				if (c > '\u007f')
				{
					byte[] bytes = uTF.GetBytes(new char[1] { c });
					foreach (byte b in bytes)
					{
						stringBuilder.Append('%');
						stringBuilder.Append(b.ToString("X2"));
					}
				}
				else if (!Lexer.IsValidCharacter(c) || c == '*' || c == '?' || c == '%')
				{
					stringBuilder.Append(Uri.HexEscape(c));
				}
				else
				{
					stringBuilder.Append(c);
				}
			}
			return stringBuilder.ToString();
		}

		private static string DecodeValue(string value, bool extendedNotation)
		{
			if (value.Length < 2)
			{
				return value;
			}
			string[] array;
			Encoding encoding;
			if (value[0] == '"')
			{
				array = value.Split(new char[1] { '?' });
				if (array.Length != 5 || array[0] != "\"=" || array[4] != "=\"" || (array[2] != "B" && array[2] != "b"))
				{
					return value;
				}
				try
				{
					encoding = Encoding.GetEncoding(array[1]);
					return encoding.GetString(Convert.FromBase64String(array[3]));
				}
				catch
				{
					return value;
				}
			}
			if (!extendedNotation)
			{
				return value;
			}
			array = value.Split(new char[1] { '\'' });
			if (array.Length != 3)
			{
				return null;
			}
			try
			{
				encoding = Encoding.GetEncoding(array[0]);
			}
			catch
			{
				return null;
			}
			value = array[2];
			if (value.IndexOf('%') < 0)
			{
				return value;
			}
			StringBuilder stringBuilder = new StringBuilder();
			byte[] array2 = null;
			int num = 0;
			int index = 0;
			while (index < value.Length)
			{
				char c = value[index];
				if (c == '%')
				{
					char c2 = c;
					c = Uri.HexUnescape(value, ref index);
					if (c != c2)
					{
						if (array2 == null)
						{
							array2 = new byte[value.Length - index + 1];
						}
						array2[num++] = (byte)c;
						continue;
					}
				}
				else
				{
					index++;
				}
				if (num != 0)
				{
					stringBuilder.Append(encoding.GetChars(array2, 0, num));
					num = 0;
				}
				stringBuilder.Append(c);
			}
			if (num != 0)
			{
				stringBuilder.Append(encoding.GetChars(array2, 0, num));
			}
			return stringBuilder.ToString();
		}

		public override int GetHashCode()
		{
			return dispositionType.ToLowerInvariant().GetHashCode() ^ HashCodeCalculator.Calculate(parameters);
		}

		public static ContentDispositionHeaderValue Parse(string input)
		{
			if (TryParse(input, out var parsedValue))
			{
				return parsedValue;
			}
			throw new FormatException(input);
		}

		private void SetDateValue(string key, DateTimeOffset? value)
		{
			SetValue(key, (!value.HasValue) ? null : ("\"" + value.Value.ToString("r", CultureInfo.InvariantCulture) + "\""));
		}

		private void SetValue(string key, string value)
		{
			if (parameters == null)
			{
				parameters = new List<NameValueHeaderValue>();
			}
			parameters.SetValue(key, value);
		}

		public override string ToString()
		{
			return dispositionType + CollectionExtensions.ToString(parameters);
		}

		public static bool TryParse(string input, out ContentDispositionHeaderValue parsedValue)
		{
			parsedValue = null;
			Lexer lexer = new Lexer(input);
			Token token = lexer.Scan();
			if (token.Kind != Token.Type.Token)
			{
				return false;
			}
			List<NameValueHeaderValue> result = null;
			string stringValue = lexer.GetStringValue(token);
			token = lexer.Scan();
			switch (token.Kind)
			{
			case Token.Type.SeparatorSemicolon:
				if (!NameValueHeaderValue.TryParseParameters(lexer, out result, out token) || (Token.Type)token != Token.Type.End)
				{
					return false;
				}
				break;
			default:
				return false;
			case Token.Type.End:
				break;
			}
			parsedValue = new ContentDispositionHeaderValue
			{
				dispositionType = stringValue,
				parameters = result
			};
			return true;
		}
	}
	public class ContentRangeHeaderValue : ICloneable
	{
		private string unit = "bytes";

		public long? From { get; private set; }

		public bool HasLength => Length.HasValue;

		public bool HasRange => From.HasValue;

		public long? Length { get; private set; }

		public long? To { get; private set; }

		public string Unit
		{
			get
			{
				return unit;
			}
			set
			{
				if (value == null)
				{
					throw new ArgumentNullException("Unit");
				}
				Parser.Token.Check(value);
				unit = value;
			}
		}

		private ContentRangeHeaderValue()
		{
		}

		public ContentRangeHeaderValue(long length)
		{
			if (length < 0)
			{
				throw new ArgumentOutOfRangeException("length");
			}
			Length = length;
		}

		public ContentRangeHeaderValue(long from, long to)
		{
			if (from < 0 || from > to)
			{
				throw new ArgumentOutOfRangeException("from");
			}
			From = from;
			To = to;
		}

		public ContentRangeHeaderValue(long from, long to, long length)
			: this(from, to)
		{
			if (length < 0)
			{
				throw new ArgumentOutOfRangeException("length");
			}
			if (to > length)
			{
				throw new ArgumentOutOfRangeException("to");
			}
			Length = length;
		}

		object ICloneable.Clone()
		{
			return MemberwiseClone();
		}

		public override bool Equals(object obj)
		{
			if (!(obj is ContentRangeHeaderValue contentRangeHeaderValue))
			{
				return false;
			}
			if (contentRangeHeaderValue.Length == Length)
			{
				long? from = contentRangeHeaderValue.From;
				long? from2 = From;
				if (from.GetValueOrDefault() == from2.GetValueOrDefault() && from.HasValue == from2.HasValue && contentRangeHeaderValue.To == To)
				{
					return string.Equals(contentRangeHeaderValue.unit, unit, StringComparison.OrdinalIgnoreCase);
				}
			}
			return false;
		}

		public override int GetHashCode()
		{
			return Unit.GetHashCode() ^ Length.GetHashCode() ^ From.GetHashCode() ^ To.GetHashCode() ^ unit.ToLowerInvariant().GetHashCode();
		}

		public static ContentRangeHeaderValue Parse(string input)
		{
			if (TryParse(input, out var parsedValue))
			{
				return parsedValue;
			}
			throw new FormatException(input);
		}

		public static bool TryParse(string input, out ContentRangeHeaderValue parsedValue)
		{
			parsedValue = null;
			Lexer lexer = new Lexer(input);
			Token token = lexer.Scan();
			if ((Token.Type)token != Token.Type.Token)
			{
				return false;
			}
			ContentRangeHeaderValue contentRangeHeaderValue = new ContentRangeHeaderValue();
			contentRangeHeaderValue.unit = lexer.GetStringValue(token);
			token = lexer.Scan();
			if ((Token.Type)token != Token.Type.Token)
			{
				return false;
			}
			if (!lexer.IsStarStringValue(token))
			{
				if (!lexer.TryGetNumericValue(token, out long value))
				{
					string stringValue = lexer.GetStringValue(token);
					if (stringValue.Length < 3)
					{
						return false;
					}
					string[] array = stringValue.Split(new char[1] { '-' });
					if (array.Length != 2)
					{
						return false;
					}
					if (!long.TryParse(array[0], NumberStyles.None, CultureInfo.InvariantCulture, out value))
					{
						return false;
					}
					contentRangeHeaderValue.From = value;
					if (!long.TryParse(array[1], NumberStyles.None, CultureInfo.InvariantCulture, out value))
					{
						return false;
					}
					contentRangeHeaderValue.To = value;
				}
				else
				{
					contentRangeHeaderValue.From = value;
					token = lexer.Scan(recognizeDash: true);
					if ((Token.Type)token != Token.Type.SeparatorDash)
					{
						return false;
					}
					token = lexer.Scan();
					if (!lexer.TryGetNumericValue(token, out value))
					{
						return false;
					}
					contentRangeHeaderValue.To = value;
				}
			}
			token = lexer.Scan();
			if ((Token.Type)token != Token.Type.SeparatorSlash)
			{
				return false;
			}
			token = lexer.Scan();
			if (!lexer.IsStarStringValue(token))
			{
				if (!lexer.TryGetNumericValue(token, out long value2))
				{
					return false;
				}
				contentRangeHeaderValue.Length = value2;
			}
			token = lexer.Scan();
			if ((Token.Type)token != Token.Type.End)
			{
				return false;
			}
			parsedValue = contentRangeHeaderValue;
			return true;
		}

		public override string ToString()
		{
			StringBuilder stringBuilder = new StringBuilder(unit);
			stringBuilder.Append(" ");
			if (!From.HasValue)
			{
				stringBuilder.Append("*");
			}
			else
			{
				stringBuilder.Append(From.Value.ToString(CultureInfo.InvariantCulture));
				stringBuilder.Append("-");
				stringBuilder.Append(To.Value.ToString(CultureInfo.InvariantCulture));
			}
			stringBuilder.Append("/");
			stringBuilder.Append((!Length.HasValue) ? "*" : Length.Value.ToString(CultureInfo.InvariantCulture));
			return stringBuilder.ToString();
		}
	}
	public class EntityTagHeaderValue : ICloneable
	{
		private static readonly EntityTagHeaderValue any = new EntityTagHeaderValue
		{
			Tag = "*"
		};

		public static EntityTagHeaderValue Any => any;

		public bool IsWeak { get; internal set; }

		public string Tag { get; internal set; }

		public EntityTagHeaderValue(string tag)
		{
			Parser.Token.CheckQuotedString(tag);
			Tag = tag;
		}

		public EntityTagHeaderValue(string tag, bool isWeak)
			: this(tag)
		{
			IsWeak = isWeak;
		}

		internal EntityTagHeaderValue()
		{
		}

		object ICloneable.Clone()
		{
			return MemberwiseClone();
		}

		public override bool Equals(object obj)
		{
			if (obj is EntityTagHeaderValue entityTagHeaderValue && entityTagHeaderValue.Tag == Tag)
			{
				return string.Equals(entityTagHeaderValue.Tag, Tag, StringComparison.Ordinal);
			}
			return false;
		}

		public override int GetHashCode()
		{
			return IsWeak.GetHashCode() ^ Tag.GetHashCode();
		}

		public static EntityTagHeaderValue Parse(string input)
		{
			if (TryParse(input, out var parsedValue))
			{
				return parsedValue;
			}
			throw new FormatException(input);
		}

		public static bool TryParse(string input, out EntityTagHeaderValue parsedValue)
		{
			if (TryParseElement(new Lexer(input), out parsedValue, out var t) && (Token.Type)t == Token.Type.End)
			{
				return true;
			}
			parsedValue = null;
			return false;
		}

		private static bool TryParseElement(Lexer lexer, out EntityTagHeaderValue parsedValue, out Token t)
		{
			parsedValue = null;
			t = lexer.Scan();
			bool isWeak = false;
			if ((Token.Type)t == Token.Type.Token)
			{
				string stringValue = lexer.GetStringValue(t);
				if (stringValue == "*")
				{
					parsedValue = any;
					t = lexer.Scan();
					return true;
				}
				if (stringValue != "W" || lexer.PeekChar() != 47)
				{
					return false;
				}
				isWeak = true;
				lexer.EatChar();
				t = lexer.Scan();
			}
			if ((Token.Type)t != Token.Type.QuotedString)
			{
				return false;
			}
			parsedValue = new EntityTagHeaderValue();
			parsedValue.Tag = lexer.GetStringValue(t);
			parsedValue.IsWeak = isWeak;
			t = lexer.Scan();
			return true;
		}

		internal static bool TryParse(string input, int minimalCount, out List<EntityTagHeaderValue> result)
		{
			return CollectionParser.TryParse(input, minimalCount, (ElementTryParser<EntityTagHeaderValue>)TryParseElement, out result);
		}

		public override string ToString()
		{
			if (!IsWeak)
			{
				return Tag;
			}
			return "W/" + Tag;
		}
	}
	internal static class HashCodeCalculator
	{
		public static int Calculate<T>(ICollection<T> list)
		{
			if (list == null)
			{
				return 0;
			}
			int num = 17;
			foreach (T item in list)
			{
				num = num * 29 + item.GetHashCode();
			}
			return num;
		}
	}
	internal delegate bool TryParseDelegate<T>(string value, out T result);
	internal delegate bool TryParseListDelegate<T>(string value, int minimalCount, out List<T> result);
	internal abstract class HeaderInfo
	{
		private class HeaderTypeInfo<T, U> : HeaderInfo where U : class
		{
			private readonly TryParseDelegate<T> parser;

			public HeaderTypeInfo(string name, TryParseDelegate<T> parser, HttpHeaderKind headerKind)
				: base(name, headerKind)
			{
				this.parser = parser;
			}

			public override void AddToCollection(object collection, object value)
			{
				HttpHeaderValueCollection<U> httpHeaderValueCollection = (HttpHeaderValueCollection<U>)collection;
				if (value is List<U> values)
				{
					httpHeaderValueCollection.AddRange(values);
				}
				else
				{
					httpHeaderValueCollection.Add((U)value);
				}
			}

			protected override object CreateCollection(HttpHeaders headers, HeaderInfo headerInfo)
			{
				return new HttpHeaderValueCollection<U>(headers, headerInfo);
			}

			public override List<string> ToStringCollection(object collection)
			{
				if (collection == null)
				{
					return null;
				}
				HttpHeaderValueCollection<U> httpHeaderValueCollection = (HttpHeaderValueCollection<U>)collection;
				if (httpHeaderValueCollection.Count == 0)
				{
					if (httpHeaderValueCollection.InvalidValues == null)
					{
						return null;
					}
					return new List<string>(httpHeaderValueCollection.InvalidValues);
				}
				List<string> list = new List<string>();
				foreach (U item in httpHeaderValueCollection)
				{
					list.Add(item.ToString());
				}
				if (httpHeaderValueCollection.InvalidValues != null)
				{
					list.AddRange(httpHeaderValueCollection.InvalidValues);
				}
				return list;
			}

			public override bool TryParse(string value, out object result)
			{
				T result2;
				bool result3 = parser(value, out result2);
				result = result2;
				return result3;
			}
		}

		private class CollectionHeaderTypeInfo<T, U> : HeaderTypeInfo<T, U> where U : class
		{
			private readonly int minimalCount;

			private readonly string separator;

			private readonly TryParseListDelegate<T> parser;

			public override string Separator => separator;

			public CollectionHeaderTypeInfo(string name, TryParseListDelegate<T> parser, HttpHeaderKind headerKind, int minimalCount, string separator)
				: base(name, (TryParseDelegate<T>)null, headerKind)
			{
				this.parser = parser;
				this.minimalCount = minimalCount;
				AllowsMany = true;
				this.separator = separator;
			}

			public override bool TryParse(string value, out object result)
			{
				if (!parser(value, minimalCount, out var result2))
				{
					result = null;
					return false;
				}
				result = result2;
				return true;
			}
		}

		public bool AllowsMany;

		public readonly HttpHeaderKind HeaderKind;

		public readonly string Name;

		public Func<object, string> CustomToString { get; private set; }

		public virtual string Separator
		{
			get
			{
				throw new NotSupportedException();
			}
		}

		protected HeaderInfo(string name, HttpHeaderKind headerKind)
		{
			Name = name;
			HeaderKind = headerKind;
		}

		public static HeaderInfo CreateSingle<T>(string name, TryParseDelegate<T> parser, HttpHeaderKind headerKind, Func<object, string> toString = null)
		{
			return new HeaderTypeInfo<T, object>(name, parser, headerKind)
			{
				CustomToString = toString
			};
		}

		public static HeaderInfo CreateMulti<T>(string name, TryParseListDelegate<T> elementParser, HttpHeaderKind headerKind, int minimalCount = 1, string separator = ", ") where T : class
		{
			return new CollectionHeaderTypeInfo<T, T>(name, elementParser, headerKind, minimalCount, separator);
		}

		public object CreateCollection(HttpHeaders headers)
		{
			return CreateCollection(headers, this);
		}

		public abstract void AddToCollection(object collection, object value);

		protected abstract object CreateCollection(HttpHeaders headers, HeaderInfo headerInfo);

		public abstract List<string> ToStringCollection(object collection);

		public abstract bool TryParse(string value, out object result);
	}
	public sealed class HttpContentHeaders : HttpHeaders
	{
		private readonly HttpContent content;

		public ICollection<string> Allow => GetValues<string>("Allow");

		public ICollection<string> ContentEncoding => GetValues<string>("Content-Encoding");

		public ContentDispositionHeaderValue ContentDisposition
		{
			get
			{
				return GetValue<ContentDispositionHeaderValue>("Content-Disposition");
			}
			set
			{
				AddOrRemove("Content-Disposition", value);
			}
		}

		public ICollection<string> ContentLanguage => GetValues<string>("Content-Language");

		public long? ContentLength
		{
			get
			{
				long? value = GetValue<long?>("Content-Length");
				if (value.HasValue)
				{
					return value;
				}
				value = content.LoadedBufferLength;
				if (value.HasValue)
				{
					return value;
				}
				if (content.TryComputeLength(out var length))
				{
					SetValue("Content-Length", length);
					return length;
				}
				return null;
			}
			set
			{
				AddOrRemove("Content-Length", value);
			}
		}

		public Uri ContentLocation
		{
			get
			{
				return GetValue<Uri>("Content-Location");
			}
			set
			{
				AddOrRemove("Content-Location", value);
			}
		}

		public byte[] ContentMD5
		{
			get
			{
				return GetValue<byte[]>("Content-MD5");
			}
			set
			{
				AddOrRemove("Content-MD5", value, Parser.MD5.ToString);
			}
		}

		public ContentRangeHeaderValue ContentRange
		{
			get
			{
				return GetValue<ContentRangeHeaderValue>("Content-Range");
			}
			set
			{
				AddOrRemove("Content-Range", value);
			}
		}

		public MediaTypeHeaderValue ContentType
		{
			get
			{
				return GetValue<MediaTypeHeaderValue>("Content-Type");
			}
			set
			{
				AddOrRemove("Content-Type", value);
			}
		}

		public DateTimeOffset? Expires
		{
			get
			{
				return GetValue<DateTimeOffset?>("Expires");
			}
			set
			{
				AddOrRemove("Expires", value, Parser.DateTime.ToString);
			}
		}

		public DateTimeOffset? LastModified
		{
			get
			{
				return GetValue<DateTimeOffset?>("Last-Modified");
			}
			set
			{
				AddOrRemove("Last-Modified", value, Parser.DateTime.ToString);
			}
		}

		internal HttpContentHeaders(HttpContent content)
			: base(HttpHeaderKind.Content)
		{
			this.content = content;
		}

		internal HttpContentHeaders()
		{
			ThrowStub.ThrowNotSupportedException();
		}
	}
	[Flags]
	internal enum HttpHeaderKind
	{
		None = 0,
		Request = 1,
		Response = 2,
		Content = 4
	}
	public sealed class HttpHeaderValueCollection<T> : ICollection<T>, IEnumerable<T>, IEnumerable where T : class
	{
		private readonly List<T> list;

		private readonly HttpHeaders headers;

		private readonly HeaderInfo headerInfo;

		private List<string> invalidValues;

		public int Count => list.Count;

		internal List<string> InvalidValues => invalidValues;

		public bool IsReadOnly => false;

		internal HttpHeaderValueCollection(HttpHeaders headers, HeaderInfo headerInfo)
		{
			list = new List<T>();
			this.headers = headers;
			this.headerInfo = headerInfo;
		}

		public void Add(T item)
		{
			list.Add(item);
		}

		internal void AddRange(List<T> values)
		{
			list.AddRange(values);
		}

		internal void AddInvalidValue(string invalidValue)
		{
			if (invalidValues == null)
			{
				invalidValues = new List<string>();
			}
			invalidValues.Add(invalidValue);
		}

		public void Clear()
		{
			list.Clear();
			invalidValues = null;
		}

		public bool Contains(T item)
		{
			return list.Contains(item);
		}

		public void CopyTo(T[] array, int arrayIndex)
		{
			list.CopyTo(array, arrayIndex);
		}

		public void ParseAdd(string input)
		{
			headers.AddValue(input, headerInfo, ignoreInvalid: false);
		}

		public bool Remove(T item)
		{
			return list.Remove(item);
		}

		public override string ToString()
		{
			string text = string.Join(headerInfo.Separator, list);
			if (invalidValues != null)
			{
				text += string.Join(headerInfo.Separator, invalidValues);
			}
			return text;
		}

		public bool TryParseAdd(string input)
		{
			return headers.AddValue(input, headerInfo, ignoreInvalid: true);
		}

		public IEnumerator<T> GetEnumerator()
		{
			return list.GetEnumerator();
		}

		IEnumerator IEnumerable.GetEnumerator()
		{
			return GetEnumerator();
		}

		internal T Find(Predicate<T> predicate)
		{
			return list.Find(predicate);
		}

		internal void Remove(Predicate<T> predicate)
		{
			T val = Find(predicate);
			if (val != null)
			{
				Remove(val);
			}
		}

		internal HttpHeaderValueCollection()
		{
			ThrowStub.ThrowNotSupportedException();
		}
	}
	public abstract class HttpHeaders : IEnumerable<KeyValuePair<string, IEnumerable<string>>>, IEnumerable
	{
		private class HeaderBucket
		{
			public object Parsed;

			private List<string> values;

			public readonly Func<object, string> CustomToString;

			public bool HasStringValues
			{
				get
				{
					if (values != null)
					{
						return values.Count > 0;
					}
					return false;
				}
			}

			public List<string> Values
			{
				get
				{
					return values ?? (values = new List<string>());
				}
				set
				{
					values = value;
				}
			}

			public HeaderBucket(object parsed, Func<object, string> converter)
			{
				Parsed = parsed;
				CustomToString = converter;
			}

			public string ParsedToString()
			{
				if (Parsed == null)
				{
					return null;
				}
				if (CustomToString != null)
				{
					return CustomToString(Parsed);
				}
				return Parsed.ToString();
			}
		}

		private static readonly Dictionary<string, HeaderInfo> known_headers;

		private readonly Dictionary<string, HeaderBucket> headers;

		private readonly HttpHeaderKind HeaderKind;

		internal bool? connectionclose;

		internal bool? transferEncodingChunked;

		static HttpHeaders()
		{
			HeaderInfo[] obj = new HeaderInfo[48]
			{
				HeaderInfo.CreateMulti<MediaTypeWithQualityHeaderValue>("Accept", MediaTypeWithQualityHeaderValue.TryParse, HttpHeaderKind.Request),
				HeaderInfo.CreateMulti<StringWithQualityHeaderValue>("Accept-Charset", StringWithQualityHeaderValue.TryParse, HttpHeaderKind.Request),
				HeaderInfo.CreateMulti<StringWithQualityHeaderValue>("Accept-Encoding", StringWithQualityHeaderValue.TryParse, HttpHeaderKind.Request),
				HeaderInfo.CreateMulti<StringWithQualityHeaderValue>("Accept-Language", StringWithQualityHeaderValue.TryParse, HttpHeaderKind.Request),
				HeaderInfo.CreateMulti<string>("Accept-Ranges", CollectionParser.TryParse, HttpHeaderKind.Response),
				HeaderInfo.CreateSingle<TimeSpan>("Age", Parser.TimeSpanSeconds.TryParse, HttpHeaderKind.Response),
				HeaderInfo.CreateMulti<string>("Allow", CollectionParser.TryParse, HttpHeaderKind.Content, 0),
				HeaderInfo.CreateSingle<AuthenticationHeaderValue>("Authorization", AuthenticationHeaderValue.TryParse, HttpHeaderKind.Request),
				HeaderInfo.CreateSingle<CacheControlHeaderValue>("Cache-Control", CacheControlHeaderValue.TryParse, HttpHeaderKind.Request | HttpHeaderKind.Response),
				HeaderInfo.CreateMulti<string>("Connection", CollectionParser.TryParse, HttpHeaderKind.Request | HttpHeaderKind.Response),
				HeaderInfo.CreateSingle<ContentDispositionHeaderValue>("Content-Disposition", ContentDispositionHeaderValue.TryParse, HttpHeaderKind.Content),
				HeaderInfo.CreateMulti<string>("Content-Encoding", CollectionParser.TryParse, HttpHeaderKind.Content),
				HeaderInfo.CreateMulti<string>("Content-Language", CollectionParser.TryParse, HttpHeaderKind.Content),
				HeaderInfo.CreateSingle<long>("Content-Length", Parser.Long.TryParse, HttpHeaderKind.Content),
				HeaderInfo.CreateSingle<Uri>("Content-Location", Parser.Uri.TryParse, HttpHeaderKind.Content),
				HeaderInfo.CreateSingle<byte[]>("Content-MD5", Parser.MD5.TryParse, HttpHeaderKind.Content),
				HeaderInfo.CreateSingle<ContentRangeHeaderValue>("Content-Range", ContentRangeHeaderValue.TryParse, HttpHeaderKind.Content),
				HeaderInfo.CreateSingle<MediaTypeHeaderValue>("Content-Type", MediaTypeHeaderValue.TryParse, HttpHeaderKind.Content),
				HeaderInfo.CreateSingle<DateTimeOffset>("Date", Parser.DateTime.TryParse, HttpHeaderKind.Request | HttpHeaderKind.Response, Parser.DateTime.ToString),
				HeaderInfo.CreateSingle<EntityTagHeaderValue>("ETag", EntityTagHeaderValue.TryParse, HttpHeaderKind.Response),
				HeaderInfo.CreateMulti<NameValueWithParametersHeaderValue>("Expect", NameValueWithParametersHeaderValue.TryParse, HttpHeaderKind.Request),
				HeaderInfo.CreateSingle<DateTimeOffset>("Expires", Parser.DateTime.TryParse, HttpHeaderKind.Content, Parser.DateTime.ToString),
				HeaderInfo.CreateSingle<string>("From", Parser.EmailAddress.TryParse, HttpHeaderKind.Request),
				HeaderInfo.CreateSingle<string>("Host", Parser.Host.TryParse, HttpHeaderKind.Request),
				HeaderInfo.CreateMulti<EntityTagHeaderValue>("If-Match", EntityTagHeaderValue.TryParse, HttpHeaderKind.Request),
				HeaderInfo.CreateSingle<DateTimeOffset>("If-Modified-Since", Parser.DateTime.TryParse, HttpHeaderKind.Request, Parser.DateTime.ToString),
				HeaderInfo.CreateMulti<EntityTagHeaderValue>("If-None-Match", EntityTagHeaderValue.TryParse, HttpHeaderKind.Request),
				HeaderInfo.CreateSingle<RangeConditionHeaderValue>("If-Range", RangeConditionHeaderValue.TryParse, HttpHeaderKind.Request),
				HeaderInfo.CreateSingle<DateTimeOffset>("If-Unmodified-Since", Parser.DateTime.TryParse, HttpHeaderKind.Request, Parser.DateTime.ToString),
				HeaderInfo.CreateSingle<DateTimeOffset>("Last-Modified", Parser.DateTime.TryParse, HttpHeaderKind.Content, Parser.DateTime.ToString),
				HeaderInfo.CreateSingle<Uri>("Location", Parser.Uri.TryParse, HttpHeaderKind.Response),
				HeaderInfo.CreateSingle<int>("Max-Forwards", Parser.Int.TryParse, HttpHeaderKind.Request),
				HeaderInfo.CreateMulti<NameValueHeaderValue>("Pragma", NameValueHeaderValue.TryParsePragma, HttpHeaderKind.Request | HttpHeaderKind.Response),
				HeaderInfo.CreateMulti<AuthenticationHeaderValue>("Proxy-Authenticate", AuthenticationHeaderValue.TryParse, HttpHeaderKind.Response),
				HeaderInfo.CreateSingle<AuthenticationHeaderValue>("Proxy-Authorization", AuthenticationHeaderValue.TryParse, HttpHeaderKind.Request),
				HeaderInfo.CreateSingle<RangeHeaderValue>("Range", RangeHeaderValue.TryParse, HttpHeaderKind.Request),
				HeaderInfo.CreateSingle<Uri>("Referer", Parser.Uri.TryParse, HttpHeaderKind.Request),
				HeaderInfo.CreateSingle<RetryConditionHeaderValue>("Retry-After", RetryConditionHeaderValue.TryParse, HttpHeaderKind.Response),
				HeaderInfo.CreateMulti<ProductInfoHeaderValue>("Server", ProductInfoHeaderValue.TryParse, HttpHeaderKind.Response, 1, " "),
				HeaderInfo.CreateMulti<TransferCodingWithQualityHeaderValue>("TE", TransferCodingWithQualityHeaderValue.TryParse, HttpHeaderKind.Request, 0),
				HeaderInfo.CreateMulti<string>("Trailer", CollectionParser.TryParse, HttpHeaderKind.Request | HttpHeaderKind.Response),
				HeaderInfo.CreateMulti<TransferCodingHeaderValue>("Transfer-Encoding", TransferCodingHeaderValue.TryParse, HttpHeaderKind.Request | HttpHeaderKind.Response),
				HeaderInfo.CreateMulti<ProductHeaderValue>("Upgrade", ProductHeaderValue.TryParse, HttpHeaderKind.Request | HttpHeaderKind.Response),
				HeaderInfo.CreateMulti<ProductInfoHeaderValue>("User-Agent", ProductInfoHeaderValue.TryParse, HttpHeaderKind.Request, 1, " "),
				HeaderInfo.CreateMulti<string>("Vary", CollectionParser.TryParse, HttpH

Room Architect Tool_Data/Managed/System.Numerics.dll

Decompiled 3 months ago
using System;
using System.Diagnostics;
using System.Globalization;
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;

[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("System.Numerics.dll")]
[assembly: AssemblyDescription("System.Numerics.dll")]
[assembly: AssemblyDefaultAlias("System.Numerics.dll")]
[assembly: AssemblyCompany("Mono development team")]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright("(c) Various Mono authors")]
[assembly: SatelliteContractVersion("4.0.0.0")]
[assembly: AssemblyInformationalVersion("4.6.57.0")]
[assembly: AssemblyFileVersion("4.6.57.0")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: CLSCompliant(true)]
[assembly: AssemblyDelaySign(true)]
[assembly: SecurityCritical]
[assembly: CompilationRelaxations(8)]
[assembly: ComVisible(false)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("4.0.0.0")]
[module: UnverifiableCode]
internal static class Consts
{
	public const string MonoVersion = "5.11.0.0";

	public const string MonoCompany = "Mono development team";

	public const string MonoProduct = "Mono Common Language Infrastructure";

	public const string MonoCopyright = "(c) Various Mono authors";

	public const int MonoCorlibVersion = 1051100001;

	public const string FxVersion = "4.0.0.0";

	public const string FxFileVersion = "4.6.57.0";

	public const string EnvironmentVersion = "4.0.30319.42000";

	public const string VsVersion = "0.0.0.0";

	public const string VsFileVersion = "11.0.0.0";

	private const string PublicKeyToken = "b77a5c561934e089";

	public const string AssemblyI18N = "I18N, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMicrosoft_JScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMono_Http = "Mono.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Posix = "Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Security = "Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Messaging_RabbitMQ = "Mono.Messaging.RabbitMQ, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyCorlib = "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Data = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Design = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing_Design = "System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Messaging = "System.Messaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Security = "System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Web = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Core = "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string WindowsBase_3_0 = "WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
internal static class SR
{
	public const string Argument_BadFormatSpecifier = "Format specifier was invalid.";

	public const string Argument_InvalidNumberStyles = "An undefined NumberStyles value is being used.";

	public const string Argument_InvalidHexStyle = "With the AllowHexSpecifier bit set in the enum bit field, the only other valid bits that can be combined into the enum value must be a subset of those in HexNumber.";

	public const string Argument_MustBeBigInt = "The parameter must be a BigInteger.";

	public const string Format_TooLarge = "The value is too large to be represented by this format specifier.";

	public const string ArgumentOutOfRange_MustBeNonNeg = "The number must be greater than or equal to zero.";

	public const string Overflow_BigIntInfinity = "BigInteger cannot represent infinity.";

	public const string Overflow_NotANumber = "The value is not a number.";

	public const string Overflow_ParseBigInteger = "The value could not be parsed.";

	public const string Overflow_Int32 = "Value was either too large or too small for an Int32.";

	public const string Overflow_Int64 = "Value was either too large or too small for an Int64.";

	public const string Overflow_UInt32 = "Value was either too large or too small for a UInt32.";

	public const string Overflow_UInt64 = "Value was either too large or too small for a UInt64.";

	public const string Overflow_Decimal = "Value was either too large or too small for a Decimal.";

	public const string Arg_ArgumentOutOfRangeException = "Index was out of bounds:";

	public const string Arg_ElementsInSourceIsGreaterThanDestination = "Number of elements in source vector is greater than the destination array";

	public const string Arg_NullArgumentNullRef = "The method was called with a null array argument.";

	public const string Arg_TypeNotSupported = "Specified type is not supported";

	internal static string GetString(string name, params object[] args)
	{
		return GetString(CultureInfo.InvariantCulture, name, args);
	}

	internal static string GetString(CultureInfo culture, string name, params object[] args)
	{
		return string.Format(culture, name, args);
	}

	internal static string GetString(string name)
	{
		return name;
	}

	internal static string GetString(CultureInfo culture, string name)
	{
		return name;
	}

	internal static string Format(string resourceFormat, params object[] args)
	{
		if (args != null)
		{
			return string.Format(CultureInfo.InvariantCulture, resourceFormat, args);
		}
		return resourceFormat;
	}

	internal static string Format(string resourceFormat, object p1)
	{
		return string.Format(CultureInfo.InvariantCulture, resourceFormat, p1);
	}

	internal static string Format(string resourceFormat, object p1, object p2)
	{
		return string.Format(CultureInfo.InvariantCulture, resourceFormat, p1, p2);
	}

	internal static string Format(string resourceFormat, object p1, object p2, object p3)
	{
		return string.Format(CultureInfo.InvariantCulture, resourceFormat, p1, p2, p3);
	}
}
namespace System
{
	internal static class MathF
	{
		public const float PI = 3.1415927f;

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static float Abs(float x)
		{
			return Math.Abs(x);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static float Acos(float x)
		{
			return (float)Math.Acos(x);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static float Cos(float x)
		{
			return (float)Math.Cos(x);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static float IEEERemainder(float x, float y)
		{
			return (float)Math.IEEERemainder(x, y);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static float Pow(float x, float y)
		{
			return (float)Math.Pow(x, y);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static float Sin(float x)
		{
			return (float)Math.Sin(x);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static float Sqrt(float x)
		{
			return (float)Math.Sqrt(x);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static float Tan(float x)
		{
			return (float)Math.Tan(x);
		}
	}
}
namespace System.Runtime.CompilerServices
{
	internal class FriendAccessAllowedAttribute : Attribute
	{
	}
}
namespace System.Numerics
{
	[AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property)]
	internal class JitIntrinsicAttribute : Attribute
	{
	}
	public struct Matrix3x2 : IEquatable<Matrix3x2>
	{
		public float M11;

		public float M12;

		public float M21;

		public float M22;

		public float M31;

		public float M32;

		private static readonly Matrix3x2 _identity = new Matrix3x2(1f, 0f, 0f, 1f, 0f, 0f);

		public static Matrix3x2 Identity => _identity;

		public bool IsIdentity
		{
			get
			{
				if (M11 == 1f && M22 == 1f && M12 == 0f && M21 == 0f && M31 == 0f)
				{
					return M32 == 0f;
				}
				return false;
			}
		}

		public Vector2 Translation
		{
			get
			{
				return new Vector2(M31, M32);
			}
			set
			{
				M31 = value.X;
				M32 = value.Y;
			}
		}

		public Matrix3x2(float m11, float m12, float m21, float m22, float m31, float m32)
		{
			M11 = m11;
			M12 = m12;
			M21 = m21;
			M22 = m22;
			M31 = m31;
			M32 = m32;
		}

		public static Matrix3x2 CreateTranslation(Vector2 position)
		{
			Matrix3x2 result = default(Matrix3x2);
			result.M11 = 1f;
			result.M12 = 0f;
			result.M21 = 0f;
			result.M22 = 1f;
			result.M31 = position.X;
			result.M32 = position.Y;
			return result;
		}

		public static Matrix3x2 CreateTranslation(float xPosition, float yPosition)
		{
			Matrix3x2 result = default(Matrix3x2);
			result.M11 = 1f;
			result.M12 = 0f;
			result.M21 = 0f;
			result.M22 = 1f;
			result.M31 = xPosition;
			result.M32 = yPosition;
			return result;
		}

		public static Matrix3x2 CreateScale(float xScale, float yScale)
		{
			Matrix3x2 result = default(Matrix3x2);
			result.M11 = xScale;
			result.M12 = 0f;
			result.M21 = 0f;
			result.M22 = yScale;
			result.M31 = 0f;
			result.M32 = 0f;
			return result;
		}

		public static Matrix3x2 CreateScale(float xScale, float yScale, Vector2 centerPoint)
		{
			float m = centerPoint.X * (1f - xScale);
			float m2 = centerPoint.Y * (1f - yScale);
			Matrix3x2 result = default(Matrix3x2);
			result.M11 = xScale;
			result.M12 = 0f;
			result.M21 = 0f;
			result.M22 = yScale;
			result.M31 = m;
			result.M32 = m2;
			return result;
		}

		public static Matrix3x2 CreateScale(Vector2 scales)
		{
			Matrix3x2 result = default(Matrix3x2);
			result.M11 = scales.X;
			result.M12 = 0f;
			result.M21 = 0f;
			result.M22 = scales.Y;
			result.M31 = 0f;
			result.M32 = 0f;
			return result;
		}

		public static Matrix3x2 CreateScale(Vector2 scales, Vector2 centerPoint)
		{
			float m = centerPoint.X * (1f - scales.X);
			float m2 = centerPoint.Y * (1f - scales.Y);
			Matrix3x2 result = default(Matrix3x2);
			result.M11 = scales.X;
			result.M12 = 0f;
			result.M21 = 0f;
			result.M22 = scales.Y;
			result.M31 = m;
			result.M32 = m2;
			return result;
		}

		public static Matrix3x2 CreateScale(float scale)
		{
			Matrix3x2 result = default(Matrix3x2);
			result.M11 = scale;
			result.M12 = 0f;
			result.M21 = 0f;
			result.M22 = scale;
			result.M31 = 0f;
			result.M32 = 0f;
			return result;
		}

		public static Matrix3x2 CreateScale(float scale, Vector2 centerPoint)
		{
			float m = centerPoint.X * (1f - scale);
			float m2 = centerPoint.Y * (1f - scale);
			Matrix3x2 result = default(Matrix3x2);
			result.M11 = scale;
			result.M12 = 0f;
			result.M21 = 0f;
			result.M22 = scale;
			result.M31 = m;
			result.M32 = m2;
			return result;
		}

		public static Matrix3x2 CreateSkew(float radiansX, float radiansY)
		{
			float m = MathF.Tan(radiansX);
			float m2 = MathF.Tan(radiansY);
			Matrix3x2 result = default(Matrix3x2);
			result.M11 = 1f;
			result.M12 = m2;
			result.M21 = m;
			result.M22 = 1f;
			result.M31 = 0f;
			result.M32 = 0f;
			return result;
		}

		public static Matrix3x2 CreateSkew(float radiansX, float radiansY, Vector2 centerPoint)
		{
			float num = MathF.Tan(radiansX);
			float num2 = MathF.Tan(radiansY);
			float m = (0f - centerPoint.Y) * num;
			float m2 = (0f - centerPoint.X) * num2;
			Matrix3x2 result = default(Matrix3x2);
			result.M11 = 1f;
			result.M12 = num2;
			result.M21 = num;
			result.M22 = 1f;
			result.M31 = m;
			result.M32 = m2;
			return result;
		}

		public static Matrix3x2 CreateRotation(float radians)
		{
			radians = MathF.IEEERemainder(radians, (float)Math.PI * 2f);
			float num;
			float num2;
			if (radians > -1.7453294E-05f && radians < 1.7453294E-05f)
			{
				num = 1f;
				num2 = 0f;
			}
			else if (radians > 1.570779f && radians < 1.5708138f)
			{
				num = 0f;
				num2 = 1f;
			}
			else if (radians < -3.1415753f || radians > 3.1415753f)
			{
				num = -1f;
				num2 = 0f;
			}
			else if (radians > -1.5708138f && radians < -1.570779f)
			{
				num = 0f;
				num2 = -1f;
			}
			else
			{
				num = MathF.Cos(radians);
				num2 = MathF.Sin(radians);
			}
			Matrix3x2 result = default(Matrix3x2);
			result.M11 = num;
			result.M12 = num2;
			result.M21 = 0f - num2;
			result.M22 = num;
			result.M31 = 0f;
			result.M32 = 0f;
			return result;
		}

		public static Matrix3x2 CreateRotation(float radians, Vector2 centerPoint)
		{
			radians = MathF.IEEERemainder(radians, (float)Math.PI * 2f);
			float num;
			float num2;
			if (radians > -1.7453294E-05f && radians < 1.7453294E-05f)
			{
				num = 1f;
				num2 = 0f;
			}
			else if (radians > 1.570779f && radians < 1.5708138f)
			{
				num = 0f;
				num2 = 1f;
			}
			else if (radians < -3.1415753f || radians > 3.1415753f)
			{
				num = -1f;
				num2 = 0f;
			}
			else if (radians > -1.5708138f && radians < -1.570779f)
			{
				num = 0f;
				num2 = -1f;
			}
			else
			{
				num = MathF.Cos(radians);
				num2 = MathF.Sin(radians);
			}
			float m = centerPoint.X * (1f - num) + centerPoint.Y * num2;
			float m2 = centerPoint.Y * (1f - num) - centerPoint.X * num2;
			Matrix3x2 result = default(Matrix3x2);
			result.M11 = num;
			result.M12 = num2;
			result.M21 = 0f - num2;
			result.M22 = num;
			result.M31 = m;
			result.M32 = m2;
			return result;
		}

		public float GetDeterminant()
		{
			return M11 * M22 - M21 * M12;
		}

		public static bool Invert(Matrix3x2 matrix, out Matrix3x2 result)
		{
			float num = matrix.M11 * matrix.M22 - matrix.M21 * matrix.M12;
			if (MathF.Abs(num) < float.Epsilon)
			{
				result = new Matrix3x2(float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN);
				return false;
			}
			float num2 = 1f / num;
			result.M11 = matrix.M22 * num2;
			result.M12 = (0f - matrix.M12) * num2;
			result.M21 = (0f - matrix.M21) * num2;
			result.M22 = matrix.M11 * num2;
			result.M31 = (matrix.M21 * matrix.M32 - matrix.M31 * matrix.M22) * num2;
			result.M32 = (matrix.M31 * matrix.M12 - matrix.M11 * matrix.M32) * num2;
			return true;
		}

		public static Matrix3x2 Lerp(Matrix3x2 matrix1, Matrix3x2 matrix2, float amount)
		{
			Matrix3x2 result = default(Matrix3x2);
			result.M11 = matrix1.M11 + (matrix2.M11 - matrix1.M11) * amount;
			result.M12 = matrix1.M12 + (matrix2.M12 - matrix1.M12) * amount;
			result.M21 = matrix1.M21 + (matrix2.M21 - matrix1.M21) * amount;
			result.M22 = matrix1.M22 + (matrix2.M22 - matrix1.M22) * amount;
			result.M31 = matrix1.M31 + (matrix2.M31 - matrix1.M31) * amount;
			result.M32 = matrix1.M32 + (matrix2.M32 - matrix1.M32) * amount;
			return result;
		}

		public static Matrix3x2 Negate(Matrix3x2 value)
		{
			Matrix3x2 result = default(Matrix3x2);
			result.M11 = 0f - value.M11;
			result.M12 = 0f - value.M12;
			result.M21 = 0f - value.M21;
			result.M22 = 0f - value.M22;
			result.M31 = 0f - value.M31;
			result.M32 = 0f - value.M32;
			return result;
		}

		public static Matrix3x2 Add(Matrix3x2 value1, Matrix3x2 value2)
		{
			Matrix3x2 result = default(Matrix3x2);
			result.M11 = value1.M11 + value2.M11;
			result.M12 = value1.M12 + value2.M12;
			result.M21 = value1.M21 + value2.M21;
			result.M22 = value1.M22 + value2.M22;
			result.M31 = value1.M31 + value2.M31;
			result.M32 = value1.M32 + value2.M32;
			return result;
		}

		public static Matrix3x2 Subtract(Matrix3x2 value1, Matrix3x2 value2)
		{
			Matrix3x2 result = default(Matrix3x2);
			result.M11 = value1.M11 - value2.M11;
			result.M12 = value1.M12 - value2.M12;
			result.M21 = value1.M21 - value2.M21;
			result.M22 = value1.M22 - value2.M22;
			result.M31 = value1.M31 - value2.M31;
			result.M32 = value1.M32 - value2.M32;
			return result;
		}

		public static Matrix3x2 Multiply(Matrix3x2 value1, Matrix3x2 value2)
		{
			Matrix3x2 result = default(Matrix3x2);
			result.M11 = value1.M11 * value2.M11 + value1.M12 * value2.M21;
			result.M12 = value1.M11 * value2.M12 + value1.M12 * value2.M22;
			result.M21 = value1.M21 * value2.M11 + value1.M22 * value2.M21;
			result.M22 = value1.M21 * value2.M12 + value1.M22 * value2.M22;
			result.M31 = value1.M31 * value2.M11 + value1.M32 * value2.M21 + value2.M31;
			result.M32 = value1.M31 * value2.M12 + value1.M32 * value2.M22 + value2.M32;
			return result;
		}

		public static Matrix3x2 Multiply(Matrix3x2 value1, float value2)
		{
			Matrix3x2 result = default(Matrix3x2);
			result.M11 = value1.M11 * value2;
			result.M12 = value1.M12 * value2;
			result.M21 = value1.M21 * value2;
			result.M22 = value1.M22 * value2;
			result.M31 = value1.M31 * value2;
			result.M32 = value1.M32 * value2;
			return result;
		}

		public static Matrix3x2 operator -(Matrix3x2 value)
		{
			Matrix3x2 result = default(Matrix3x2);
			result.M11 = 0f - value.M11;
			result.M12 = 0f - value.M12;
			result.M21 = 0f - value.M21;
			result.M22 = 0f - value.M22;
			result.M31 = 0f - value.M31;
			result.M32 = 0f - value.M32;
			return result;
		}

		public static Matrix3x2 operator +(Matrix3x2 value1, Matrix3x2 value2)
		{
			Matrix3x2 result = default(Matrix3x2);
			result.M11 = value1.M11 + value2.M11;
			result.M12 = value1.M12 + value2.M12;
			result.M21 = value1.M21 + value2.M21;
			result.M22 = value1.M22 + value2.M22;
			result.M31 = value1.M31 + value2.M31;
			result.M32 = value1.M32 + value2.M32;
			return result;
		}

		public static Matrix3x2 operator -(Matrix3x2 value1, Matrix3x2 value2)
		{
			Matrix3x2 result = default(Matrix3x2);
			result.M11 = value1.M11 - value2.M11;
			result.M12 = value1.M12 - value2.M12;
			result.M21 = value1.M21 - value2.M21;
			result.M22 = value1.M22 - value2.M22;
			result.M31 = value1.M31 - value2.M31;
			result.M32 = value1.M32 - value2.M32;
			return result;
		}

		public static Matrix3x2 operator *(Matrix3x2 value1, Matrix3x2 value2)
		{
			Matrix3x2 result = default(Matrix3x2);
			result.M11 = value1.M11 * value2.M11 + value1.M12 * value2.M21;
			result.M12 = value1.M11 * value2.M12 + value1.M12 * value2.M22;
			result.M21 = value1.M21 * value2.M11 + value1.M22 * value2.M21;
			result.M22 = value1.M21 * value2.M12 + value1.M22 * value2.M22;
			result.M31 = value1.M31 * value2.M11 + value1.M32 * value2.M21 + value2.M31;
			result.M32 = value1.M31 * value2.M12 + value1.M32 * value2.M22 + value2.M32;
			return result;
		}

		public static Matrix3x2 operator *(Matrix3x2 value1, float value2)
		{
			Matrix3x2 result = default(Matrix3x2);
			result.M11 = value1.M11 * value2;
			result.M12 = value1.M12 * value2;
			result.M21 = value1.M21 * value2;
			result.M22 = value1.M22 * value2;
			result.M31 = value1.M31 * value2;
			result.M32 = value1.M32 * value2;
			return result;
		}

		public static bool operator ==(Matrix3x2 value1, Matrix3x2 value2)
		{
			if (value1.M11 == value2.M11 && value1.M22 == value2.M22 && value1.M12 == value2.M12 && value1.M21 == value2.M21 && value1.M31 == value2.M31)
			{
				return value1.M32 == value2.M32;
			}
			return false;
		}

		public static bool operator !=(Matrix3x2 value1, Matrix3x2 value2)
		{
			if (value1.M11 == value2.M11 && value1.M12 == value2.M12 && value1.M21 == value2.M21 && value1.M22 == value2.M22 && value1.M31 == value2.M31)
			{
				return value1.M32 != value2.M32;
			}
			return true;
		}

		public bool Equals(Matrix3x2 other)
		{
			if (M11 == other.M11 && M22 == other.M22 && M12 == other.M12 && M21 == other.M21 && M31 == other.M31)
			{
				return M32 == other.M32;
			}
			return false;
		}

		public override bool Equals(object obj)
		{
			if (obj is Matrix3x2)
			{
				return Equals((Matrix3x2)obj);
			}
			return false;
		}

		public override string ToString()
		{
			CultureInfo currentCulture = CultureInfo.CurrentCulture;
			return string.Format(currentCulture, "{{ {{M11:{0} M12:{1}}} {{M21:{2} M22:{3}}} {{M31:{4} M32:{5}}} }}", M11.ToString(currentCulture), M12.ToString(currentCulture), M21.ToString(currentCulture), M22.ToString(currentCulture), M31.ToString(currentCulture), M32.ToString(currentCulture));
		}

		public override int GetHashCode()
		{
			return M11.GetHashCode() + M12.GetHashCode() + M21.GetHashCode() + M22.GetHashCode() + M31.GetHashCode() + M32.GetHashCode();
		}
	}
	public struct Matrix4x4 : IEquatable<Matrix4x4>
	{
		private struct CanonicalBasis
		{
			public Vector3 Row0;

			public Vector3 Row1;

			public Vector3 Row2;
		}

		private struct VectorBasis
		{
			public unsafe Vector3* Element0;

			public unsafe Vector3* Element1;

			public unsafe Vector3* Element2;
		}

		public float M11;

		public float M12;

		public float M13;

		public float M14;

		public float M21;

		public float M22;

		public float M23;

		public float M24;

		public float M31;

		public float M32;

		public float M33;

		public float M34;

		public float M41;

		public float M42;

		public float M43;

		public float M44;

		private static readonly Matrix4x4 _identity = new Matrix4x4(1f, 0f, 0f, 0f, 0f, 1f, 0f, 0f, 0f, 0f, 1f, 0f, 0f, 0f, 0f, 1f);

		public static Matrix4x4 Identity => _identity;

		public bool IsIdentity
		{
			get
			{
				if (M11 == 1f && M22 == 1f && M33 == 1f && M44 == 1f && M12 == 0f && M13 == 0f && M14 == 0f && M21 == 0f && M23 == 0f && M24 == 0f && M31 == 0f && M32 == 0f && M34 == 0f && M41 == 0f && M42 == 0f)
				{
					return M43 == 0f;
				}
				return false;
			}
		}

		public Vector3 Translation
		{
			get
			{
				return new Vector3(M41, M42, M43);
			}
			set
			{
				M41 = value.X;
				M42 = value.Y;
				M43 = value.Z;
			}
		}

		public Matrix4x4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44)
		{
			M11 = m11;
			M12 = m12;
			M13 = m13;
			M14 = m14;
			M21 = m21;
			M22 = m22;
			M23 = m23;
			M24 = m24;
			M31 = m31;
			M32 = m32;
			M33 = m33;
			M34 = m34;
			M41 = m41;
			M42 = m42;
			M43 = m43;
			M44 = m44;
		}

		public Matrix4x4(Matrix3x2 value)
		{
			M11 = value.M11;
			M12 = value.M12;
			M13 = 0f;
			M14 = 0f;
			M21 = value.M21;
			M22 = value.M22;
			M23 = 0f;
			M24 = 0f;
			M31 = 0f;
			M32 = 0f;
			M33 = 1f;
			M34 = 0f;
			M41 = value.M31;
			M42 = value.M32;
			M43 = 0f;
			M44 = 1f;
		}

		public static Matrix4x4 CreateBillboard(Vector3 objectPosition, Vector3 cameraPosition, Vector3 cameraUpVector, Vector3 cameraForwardVector)
		{
			Vector3 left = new Vector3(objectPosition.X - cameraPosition.X, objectPosition.Y - cameraPosition.Y, objectPosition.Z - cameraPosition.Z);
			float num = left.LengthSquared();
			left = ((!(num < 0.0001f)) ? Vector3.Multiply(left, 1f / MathF.Sqrt(num)) : (-cameraForwardVector));
			Vector3 vector = Vector3.Normalize(Vector3.Cross(cameraUpVector, left));
			Vector3 vector2 = Vector3.Cross(left, vector);
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = vector.X;
			result.M12 = vector.Y;
			result.M13 = vector.Z;
			result.M14 = 0f;
			result.M21 = vector2.X;
			result.M22 = vector2.Y;
			result.M23 = vector2.Z;
			result.M24 = 0f;
			result.M31 = left.X;
			result.M32 = left.Y;
			result.M33 = left.Z;
			result.M34 = 0f;
			result.M41 = objectPosition.X;
			result.M42 = objectPosition.Y;
			result.M43 = objectPosition.Z;
			result.M44 = 1f;
			return result;
		}

		public static Matrix4x4 CreateConstrainedBillboard(Vector3 objectPosition, Vector3 cameraPosition, Vector3 rotateAxis, Vector3 cameraForwardVector, Vector3 objectForwardVector)
		{
			Vector3 left = new Vector3(objectPosition.X - cameraPosition.X, objectPosition.Y - cameraPosition.Y, objectPosition.Z - cameraPosition.Z);
			float num = left.LengthSquared();
			left = ((!(num < 0.0001f)) ? Vector3.Multiply(left, 1f / MathF.Sqrt(num)) : (-cameraForwardVector));
			Vector3 vector = rotateAxis;
			Vector3 vector3;
			Vector3 vector2;
			if (MathF.Abs(Vector3.Dot(rotateAxis, left)) > 0.99825466f)
			{
				vector2 = objectForwardVector;
				if (MathF.Abs(Vector3.Dot(rotateAxis, vector2)) > 0.99825466f)
				{
					vector2 = ((MathF.Abs(rotateAxis.Z) > 0.99825466f) ? new Vector3(1f, 0f, 0f) : new Vector3(0f, 0f, -1f));
				}
				vector3 = Vector3.Normalize(Vector3.Cross(rotateAxis, vector2));
				vector2 = Vector3.Normalize(Vector3.Cross(vector3, rotateAxis));
			}
			else
			{
				vector3 = Vector3.Normalize(Vector3.Cross(rotateAxis, left));
				vector2 = Vector3.Normalize(Vector3.Cross(vector3, vector));
			}
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = vector3.X;
			result.M12 = vector3.Y;
			result.M13 = vector3.Z;
			result.M14 = 0f;
			result.M21 = vector.X;
			result.M22 = vector.Y;
			result.M23 = vector.Z;
			result.M24 = 0f;
			result.M31 = vector2.X;
			result.M32 = vector2.Y;
			result.M33 = vector2.Z;
			result.M34 = 0f;
			result.M41 = objectPosition.X;
			result.M42 = objectPosition.Y;
			result.M43 = objectPosition.Z;
			result.M44 = 1f;
			return result;
		}

		public static Matrix4x4 CreateTranslation(Vector3 position)
		{
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = 1f;
			result.M12 = 0f;
			result.M13 = 0f;
			result.M14 = 0f;
			result.M21 = 0f;
			result.M22 = 1f;
			result.M23 = 0f;
			result.M24 = 0f;
			result.M31 = 0f;
			result.M32 = 0f;
			result.M33 = 1f;
			result.M34 = 0f;
			result.M41 = position.X;
			result.M42 = position.Y;
			result.M43 = position.Z;
			result.M44 = 1f;
			return result;
		}

		public static Matrix4x4 CreateTranslation(float xPosition, float yPosition, float zPosition)
		{
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = 1f;
			result.M12 = 0f;
			result.M13 = 0f;
			result.M14 = 0f;
			result.M21 = 0f;
			result.M22 = 1f;
			result.M23 = 0f;
			result.M24 = 0f;
			result.M31 = 0f;
			result.M32 = 0f;
			result.M33 = 1f;
			result.M34 = 0f;
			result.M41 = xPosition;
			result.M42 = yPosition;
			result.M43 = zPosition;
			result.M44 = 1f;
			return result;
		}

		public static Matrix4x4 CreateScale(float xScale, float yScale, float zScale)
		{
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = xScale;
			result.M12 = 0f;
			result.M13 = 0f;
			result.M14 = 0f;
			result.M21 = 0f;
			result.M22 = yScale;
			result.M23 = 0f;
			result.M24 = 0f;
			result.M31 = 0f;
			result.M32 = 0f;
			result.M33 = zScale;
			result.M34 = 0f;
			result.M41 = 0f;
			result.M42 = 0f;
			result.M43 = 0f;
			result.M44 = 1f;
			return result;
		}

		public static Matrix4x4 CreateScale(float xScale, float yScale, float zScale, Vector3 centerPoint)
		{
			float m = centerPoint.X * (1f - xScale);
			float m2 = centerPoint.Y * (1f - yScale);
			float m3 = centerPoint.Z * (1f - zScale);
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = xScale;
			result.M12 = 0f;
			result.M13 = 0f;
			result.M14 = 0f;
			result.M21 = 0f;
			result.M22 = yScale;
			result.M23 = 0f;
			result.M24 = 0f;
			result.M31 = 0f;
			result.M32 = 0f;
			result.M33 = zScale;
			result.M34 = 0f;
			result.M41 = m;
			result.M42 = m2;
			result.M43 = m3;
			result.M44 = 1f;
			return result;
		}

		public static Matrix4x4 CreateScale(Vector3 scales)
		{
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = scales.X;
			result.M12 = 0f;
			result.M13 = 0f;
			result.M14 = 0f;
			result.M21 = 0f;
			result.M22 = scales.Y;
			result.M23 = 0f;
			result.M24 = 0f;
			result.M31 = 0f;
			result.M32 = 0f;
			result.M33 = scales.Z;
			result.M34 = 0f;
			result.M41 = 0f;
			result.M42 = 0f;
			result.M43 = 0f;
			result.M44 = 1f;
			return result;
		}

		public static Matrix4x4 CreateScale(Vector3 scales, Vector3 centerPoint)
		{
			float m = centerPoint.X * (1f - scales.X);
			float m2 = centerPoint.Y * (1f - scales.Y);
			float m3 = centerPoint.Z * (1f - scales.Z);
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = scales.X;
			result.M12 = 0f;
			result.M13 = 0f;
			result.M14 = 0f;
			result.M21 = 0f;
			result.M22 = scales.Y;
			result.M23 = 0f;
			result.M24 = 0f;
			result.M31 = 0f;
			result.M32 = 0f;
			result.M33 = scales.Z;
			result.M34 = 0f;
			result.M41 = m;
			result.M42 = m2;
			result.M43 = m3;
			result.M44 = 1f;
			return result;
		}

		public static Matrix4x4 CreateScale(float scale)
		{
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = scale;
			result.M12 = 0f;
			result.M13 = 0f;
			result.M14 = 0f;
			result.M21 = 0f;
			result.M22 = scale;
			result.M23 = 0f;
			result.M24 = 0f;
			result.M31 = 0f;
			result.M32 = 0f;
			result.M33 = scale;
			result.M34 = 0f;
			result.M41 = 0f;
			result.M42 = 0f;
			result.M43 = 0f;
			result.M44 = 1f;
			return result;
		}

		public static Matrix4x4 CreateScale(float scale, Vector3 centerPoint)
		{
			float m = centerPoint.X * (1f - scale);
			float m2 = centerPoint.Y * (1f - scale);
			float m3 = centerPoint.Z * (1f - scale);
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = scale;
			result.M12 = 0f;
			result.M13 = 0f;
			result.M14 = 0f;
			result.M21 = 0f;
			result.M22 = scale;
			result.M23 = 0f;
			result.M24 = 0f;
			result.M31 = 0f;
			result.M32 = 0f;
			result.M33 = scale;
			result.M34 = 0f;
			result.M41 = m;
			result.M42 = m2;
			result.M43 = m3;
			result.M44 = 1f;
			return result;
		}

		public static Matrix4x4 CreateRotationX(float radians)
		{
			float num = MathF.Cos(radians);
			float num2 = MathF.Sin(radians);
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = 1f;
			result.M12 = 0f;
			result.M13 = 0f;
			result.M14 = 0f;
			result.M21 = 0f;
			result.M22 = num;
			result.M23 = num2;
			result.M24 = 0f;
			result.M31 = 0f;
			result.M32 = 0f - num2;
			result.M33 = num;
			result.M34 = 0f;
			result.M41 = 0f;
			result.M42 = 0f;
			result.M43 = 0f;
			result.M44 = 1f;
			return result;
		}

		public static Matrix4x4 CreateRotationX(float radians, Vector3 centerPoint)
		{
			float num = MathF.Cos(radians);
			float num2 = MathF.Sin(radians);
			float m = centerPoint.Y * (1f - num) + centerPoint.Z * num2;
			float m2 = centerPoint.Z * (1f - num) - centerPoint.Y * num2;
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = 1f;
			result.M12 = 0f;
			result.M13 = 0f;
			result.M14 = 0f;
			result.M21 = 0f;
			result.M22 = num;
			result.M23 = num2;
			result.M24 = 0f;
			result.M31 = 0f;
			result.M32 = 0f - num2;
			result.M33 = num;
			result.M34 = 0f;
			result.M41 = 0f;
			result.M42 = m;
			result.M43 = m2;
			result.M44 = 1f;
			return result;
		}

		public static Matrix4x4 CreateRotationY(float radians)
		{
			float num = MathF.Cos(radians);
			float num2 = MathF.Sin(radians);
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = num;
			result.M12 = 0f;
			result.M13 = 0f - num2;
			result.M14 = 0f;
			result.M21 = 0f;
			result.M22 = 1f;
			result.M23 = 0f;
			result.M24 = 0f;
			result.M31 = num2;
			result.M32 = 0f;
			result.M33 = num;
			result.M34 = 0f;
			result.M41 = 0f;
			result.M42 = 0f;
			result.M43 = 0f;
			result.M44 = 1f;
			return result;
		}

		public static Matrix4x4 CreateRotationY(float radians, Vector3 centerPoint)
		{
			float num = MathF.Cos(radians);
			float num2 = MathF.Sin(radians);
			float m = centerPoint.X * (1f - num) - centerPoint.Z * num2;
			float m2 = centerPoint.Z * (1f - num) + centerPoint.X * num2;
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = num;
			result.M12 = 0f;
			result.M13 = 0f - num2;
			result.M14 = 0f;
			result.M21 = 0f;
			result.M22 = 1f;
			result.M23 = 0f;
			result.M24 = 0f;
			result.M31 = num2;
			result.M32 = 0f;
			result.M33 = num;
			result.M34 = 0f;
			result.M41 = m;
			result.M42 = 0f;
			result.M43 = m2;
			result.M44 = 1f;
			return result;
		}

		public static Matrix4x4 CreateRotationZ(float radians)
		{
			float num = MathF.Cos(radians);
			float num2 = MathF.Sin(radians);
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = num;
			result.M12 = num2;
			result.M13 = 0f;
			result.M14 = 0f;
			result.M21 = 0f - num2;
			result.M22 = num;
			result.M23 = 0f;
			result.M24 = 0f;
			result.M31 = 0f;
			result.M32 = 0f;
			result.M33 = 1f;
			result.M34 = 0f;
			result.M41 = 0f;
			result.M42 = 0f;
			result.M43 = 0f;
			result.M44 = 1f;
			return result;
		}

		public static Matrix4x4 CreateRotationZ(float radians, Vector3 centerPoint)
		{
			float num = MathF.Cos(radians);
			float num2 = MathF.Sin(radians);
			float m = centerPoint.X * (1f - num) + centerPoint.Y * num2;
			float m2 = centerPoint.Y * (1f - num) - centerPoint.X * num2;
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = num;
			result.M12 = num2;
			result.M13 = 0f;
			result.M14 = 0f;
			result.M21 = 0f - num2;
			result.M22 = num;
			result.M23 = 0f;
			result.M24 = 0f;
			result.M31 = 0f;
			result.M32 = 0f;
			result.M33 = 1f;
			result.M34 = 0f;
			result.M41 = m;
			result.M42 = m2;
			result.M43 = 0f;
			result.M44 = 1f;
			return result;
		}

		public static Matrix4x4 CreateFromAxisAngle(Vector3 axis, float angle)
		{
			float x = axis.X;
			float y = axis.Y;
			float z = axis.Z;
			float num = MathF.Sin(angle);
			float num2 = MathF.Cos(angle);
			float num3 = x * x;
			float num4 = y * y;
			float num5 = z * z;
			float num6 = x * y;
			float num7 = x * z;
			float num8 = y * z;
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = num3 + num2 * (1f - num3);
			result.M12 = num6 - num2 * num6 + num * z;
			result.M13 = num7 - num2 * num7 - num * y;
			result.M14 = 0f;
			result.M21 = num6 - num2 * num6 - num * z;
			result.M22 = num4 + num2 * (1f - num4);
			result.M23 = num8 - num2 * num8 + num * x;
			result.M24 = 0f;
			result.M31 = num7 - num2 * num7 + num * y;
			result.M32 = num8 - num2 * num8 - num * x;
			result.M33 = num5 + num2 * (1f - num5);
			result.M34 = 0f;
			result.M41 = 0f;
			result.M42 = 0f;
			result.M43 = 0f;
			result.M44 = 1f;
			return result;
		}

		public static Matrix4x4 CreatePerspectiveFieldOfView(float fieldOfView, float aspectRatio, float nearPlaneDistance, float farPlaneDistance)
		{
			if (fieldOfView <= 0f || fieldOfView >= (float)Math.PI)
			{
				throw new ArgumentOutOfRangeException("fieldOfView");
			}
			if (nearPlaneDistance <= 0f)
			{
				throw new ArgumentOutOfRangeException("nearPlaneDistance");
			}
			if (farPlaneDistance <= 0f)
			{
				throw new ArgumentOutOfRangeException("farPlaneDistance");
			}
			if (nearPlaneDistance >= farPlaneDistance)
			{
				throw new ArgumentOutOfRangeException("nearPlaneDistance");
			}
			float num = 1f / MathF.Tan(fieldOfView * 0.5f);
			float m = num / aspectRatio;
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = m;
			result.M12 = (result.M13 = (result.M14 = 0f));
			result.M22 = num;
			result.M21 = (result.M23 = (result.M24 = 0f));
			result.M31 = (result.M32 = 0f);
			float num2 = (result.M33 = (float.IsPositiveInfinity(farPlaneDistance) ? (-1f) : (farPlaneDistance / (nearPlaneDistance - farPlaneDistance))));
			result.M34 = -1f;
			result.M41 = (result.M42 = (result.M44 = 0f));
			result.M43 = nearPlaneDistance * num2;
			return result;
		}

		public static Matrix4x4 CreatePerspective(float width, float height, float nearPlaneDistance, float farPlaneDistance)
		{
			if (nearPlaneDistance <= 0f)
			{
				throw new ArgumentOutOfRangeException("nearPlaneDistance");
			}
			if (farPlaneDistance <= 0f)
			{
				throw new ArgumentOutOfRangeException("farPlaneDistance");
			}
			if (nearPlaneDistance >= farPlaneDistance)
			{
				throw new ArgumentOutOfRangeException("nearPlaneDistance");
			}
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = 2f * nearPlaneDistance / width;
			result.M12 = (result.M13 = (result.M14 = 0f));
			result.M22 = 2f * nearPlaneDistance / height;
			result.M21 = (result.M23 = (result.M24 = 0f));
			float num = (result.M33 = (float.IsPositiveInfinity(farPlaneDistance) ? (-1f) : (farPlaneDistance / (nearPlaneDistance - farPlaneDistance))));
			result.M31 = (result.M32 = 0f);
			result.M34 = -1f;
			result.M41 = (result.M42 = (result.M44 = 0f));
			result.M43 = nearPlaneDistance * num;
			return result;
		}

		public static Matrix4x4 CreatePerspectiveOffCenter(float left, float right, float bottom, float top, float nearPlaneDistance, float farPlaneDistance)
		{
			if (nearPlaneDistance <= 0f)
			{
				throw new ArgumentOutOfRangeException("nearPlaneDistance");
			}
			if (farPlaneDistance <= 0f)
			{
				throw new ArgumentOutOfRangeException("farPlaneDistance");
			}
			if (nearPlaneDistance >= farPlaneDistance)
			{
				throw new ArgumentOutOfRangeException("nearPlaneDistance");
			}
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = 2f * nearPlaneDistance / (right - left);
			result.M12 = (result.M13 = (result.M14 = 0f));
			result.M22 = 2f * nearPlaneDistance / (top - bottom);
			result.M21 = (result.M23 = (result.M24 = 0f));
			result.M31 = (left + right) / (right - left);
			result.M32 = (top + bottom) / (top - bottom);
			float num = (result.M33 = (float.IsPositiveInfinity(farPlaneDistance) ? (-1f) : (farPlaneDistance / (nearPlaneDistance - farPlaneDistance))));
			result.M34 = -1f;
			result.M43 = nearPlaneDistance * num;
			result.M41 = (result.M42 = (result.M44 = 0f));
			return result;
		}

		public static Matrix4x4 CreateOrthographic(float width, float height, float zNearPlane, float zFarPlane)
		{
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = 2f / width;
			result.M12 = (result.M13 = (result.M14 = 0f));
			result.M22 = 2f / height;
			result.M21 = (result.M23 = (result.M24 = 0f));
			result.M33 = 1f / (zNearPlane - zFarPlane);
			result.M31 = (result.M32 = (result.M34 = 0f));
			result.M41 = (result.M42 = 0f);
			result.M43 = zNearPlane / (zNearPlane - zFarPlane);
			result.M44 = 1f;
			return result;
		}

		public static Matrix4x4 CreateOrthographicOffCenter(float left, float right, float bottom, float top, float zNearPlane, float zFarPlane)
		{
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = 2f / (right - left);
			result.M12 = (result.M13 = (result.M14 = 0f));
			result.M22 = 2f / (top - bottom);
			result.M21 = (result.M23 = (result.M24 = 0f));
			result.M33 = 1f / (zNearPlane - zFarPlane);
			result.M31 = (result.M32 = (result.M34 = 0f));
			result.M41 = (left + right) / (left - right);
			result.M42 = (top + bottom) / (bottom - top);
			result.M43 = zNearPlane / (zNearPlane - zFarPlane);
			result.M44 = 1f;
			return result;
		}

		public static Matrix4x4 CreateLookAt(Vector3 cameraPosition, Vector3 cameraTarget, Vector3 cameraUpVector)
		{
			Vector3 vector = Vector3.Normalize(cameraPosition - cameraTarget);
			Vector3 vector2 = Vector3.Normalize(Vector3.Cross(cameraUpVector, vector));
			Vector3 vector3 = Vector3.Cross(vector, vector2);
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = vector2.X;
			result.M12 = vector3.X;
			result.M13 = vector.X;
			result.M14 = 0f;
			result.M21 = vector2.Y;
			result.M22 = vector3.Y;
			result.M23 = vector.Y;
			result.M24 = 0f;
			result.M31 = vector2.Z;
			result.M32 = vector3.Z;
			result.M33 = vector.Z;
			result.M34 = 0f;
			result.M41 = 0f - Vector3.Dot(vector2, cameraPosition);
			result.M42 = 0f - Vector3.Dot(vector3, cameraPosition);
			result.M43 = 0f - Vector3.Dot(vector, cameraPosition);
			result.M44 = 1f;
			return result;
		}

		public static Matrix4x4 CreateWorld(Vector3 position, Vector3 forward, Vector3 up)
		{
			Vector3 vector = Vector3.Normalize(-forward);
			Vector3 vector2 = Vector3.Normalize(Vector3.Cross(up, vector));
			Vector3 vector3 = Vector3.Cross(vector, vector2);
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = vector2.X;
			result.M12 = vector2.Y;
			result.M13 = vector2.Z;
			result.M14 = 0f;
			result.M21 = vector3.X;
			result.M22 = vector3.Y;
			result.M23 = vector3.Z;
			result.M24 = 0f;
			result.M31 = vector.X;
			result.M32 = vector.Y;
			result.M33 = vector.Z;
			result.M34 = 0f;
			result.M41 = position.X;
			result.M42 = position.Y;
			result.M43 = position.Z;
			result.M44 = 1f;
			return result;
		}

		public static Matrix4x4 CreateFromQuaternion(Quaternion quaternion)
		{
			float num = quaternion.X * quaternion.X;
			float num2 = quaternion.Y * quaternion.Y;
			float num3 = quaternion.Z * quaternion.Z;
			float num4 = quaternion.X * quaternion.Y;
			float num5 = quaternion.Z * quaternion.W;
			float num6 = quaternion.Z * quaternion.X;
			float num7 = quaternion.Y * quaternion.W;
			float num8 = quaternion.Y * quaternion.Z;
			float num9 = quaternion.X * quaternion.W;
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = 1f - 2f * (num2 + num3);
			result.M12 = 2f * (num4 + num5);
			result.M13 = 2f * (num6 - num7);
			result.M14 = 0f;
			result.M21 = 2f * (num4 - num5);
			result.M22 = 1f - 2f * (num3 + num);
			result.M23 = 2f * (num8 + num9);
			result.M24 = 0f;
			result.M31 = 2f * (num6 + num7);
			result.M32 = 2f * (num8 - num9);
			result.M33 = 1f - 2f * (num2 + num);
			result.M34 = 0f;
			result.M41 = 0f;
			result.M42 = 0f;
			result.M43 = 0f;
			result.M44 = 1f;
			return result;
		}

		public static Matrix4x4 CreateFromYawPitchRoll(float yaw, float pitch, float roll)
		{
			return CreateFromQuaternion(Quaternion.CreateFromYawPitchRoll(yaw, pitch, roll));
		}

		public static Matrix4x4 CreateShadow(Vector3 lightDirection, Plane plane)
		{
			Plane plane2 = Plane.Normalize(plane);
			float num = plane2.Normal.X * lightDirection.X + plane2.Normal.Y * lightDirection.Y + plane2.Normal.Z * lightDirection.Z;
			float num2 = 0f - plane2.Normal.X;
			float num3 = 0f - plane2.Normal.Y;
			float num4 = 0f - plane2.Normal.Z;
			float num5 = 0f - plane2.D;
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = num2 * lightDirection.X + num;
			result.M21 = num3 * lightDirection.X;
			result.M31 = num4 * lightDirection.X;
			result.M41 = num5 * lightDirection.X;
			result.M12 = num2 * lightDirection.Y;
			result.M22 = num3 * lightDirection.Y + num;
			result.M32 = num4 * lightDirection.Y;
			result.M42 = num5 * lightDirection.Y;
			result.M13 = num2 * lightDirection.Z;
			result.M23 = num3 * lightDirection.Z;
			result.M33 = num4 * lightDirection.Z + num;
			result.M43 = num5 * lightDirection.Z;
			result.M14 = 0f;
			result.M24 = 0f;
			result.M34 = 0f;
			result.M44 = num;
			return result;
		}

		public static Matrix4x4 CreateReflection(Plane value)
		{
			value = Plane.Normalize(value);
			float x = value.Normal.X;
			float y = value.Normal.Y;
			float z = value.Normal.Z;
			float num = -2f * x;
			float num2 = -2f * y;
			float num3 = -2f * z;
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = num * x + 1f;
			result.M12 = num2 * x;
			result.M13 = num3 * x;
			result.M14 = 0f;
			result.M21 = num * y;
			result.M22 = num2 * y + 1f;
			result.M23 = num3 * y;
			result.M24 = 0f;
			result.M31 = num * z;
			result.M32 = num2 * z;
			result.M33 = num3 * z + 1f;
			result.M34 = 0f;
			result.M41 = num * value.D;
			result.M42 = num2 * value.D;
			result.M43 = num3 * value.D;
			result.M44 = 1f;
			return result;
		}

		public float GetDeterminant()
		{
			float m = M11;
			float m2 = M12;
			float m3 = M13;
			float m4 = M14;
			float m5 = M21;
			float m6 = M22;
			float m7 = M23;
			float m8 = M24;
			float m9 = M31;
			float m10 = M32;
			float m11 = M33;
			float m12 = M34;
			float m13 = M41;
			float m14 = M42;
			float m15 = M43;
			float m16 = M44;
			float num = m11 * m16 - m12 * m15;
			float num2 = m10 * m16 - m12 * m14;
			float num3 = m10 * m15 - m11 * m14;
			float num4 = m9 * m16 - m12 * m13;
			float num5 = m9 * m15 - m11 * m13;
			float num6 = m9 * m14 - m10 * m13;
			return m * (m6 * num - m7 * num2 + m8 * num3) - m2 * (m5 * num - m7 * num4 + m8 * num5) + m3 * (m5 * num2 - m6 * num4 + m8 * num6) - m4 * (m5 * num3 - m6 * num5 + m7 * num6);
		}

		public static bool Invert(Matrix4x4 matrix, out Matrix4x4 result)
		{
			float m = matrix.M11;
			float m2 = matrix.M12;
			float m3 = matrix.M13;
			float m4 = matrix.M14;
			float m5 = matrix.M21;
			float m6 = matrix.M22;
			float m7 = matrix.M23;
			float m8 = matrix.M24;
			float m9 = matrix.M31;
			float m10 = matrix.M32;
			float m11 = matrix.M33;
			float m12 = matrix.M34;
			float m13 = matrix.M41;
			float m14 = matrix.M42;
			float m15 = matrix.M43;
			float m16 = matrix.M44;
			float num = m11 * m16 - m12 * m15;
			float num2 = m10 * m16 - m12 * m14;
			float num3 = m10 * m15 - m11 * m14;
			float num4 = m9 * m16 - m12 * m13;
			float num5 = m9 * m15 - m11 * m13;
			float num6 = m9 * m14 - m10 * m13;
			float num7 = m6 * num - m7 * num2 + m8 * num3;
			float num8 = 0f - (m5 * num - m7 * num4 + m8 * num5);
			float num9 = m5 * num2 - m6 * num4 + m8 * num6;
			float num10 = 0f - (m5 * num3 - m6 * num5 + m7 * num6);
			float num11 = m * num7 + m2 * num8 + m3 * num9 + m4 * num10;
			if (MathF.Abs(num11) < float.Epsilon)
			{
				result = new Matrix4x4(float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN);
				return false;
			}
			float num12 = 1f / num11;
			result.M11 = num7 * num12;
			result.M21 = num8 * num12;
			result.M31 = num9 * num12;
			result.M41 = num10 * num12;
			result.M12 = (0f - (m2 * num - m3 * num2 + m4 * num3)) * num12;
			result.M22 = (m * num - m3 * num4 + m4 * num5) * num12;
			result.M32 = (0f - (m * num2 - m2 * num4 + m4 * num6)) * num12;
			result.M42 = (m * num3 - m2 * num5 + m3 * num6) * num12;
			float num13 = m7 * m16 - m8 * m15;
			float num14 = m6 * m16 - m8 * m14;
			float num15 = m6 * m15 - m7 * m14;
			float num16 = m5 * m16 - m8 * m13;
			float num17 = m5 * m15 - m7 * m13;
			float num18 = m5 * m14 - m6 * m13;
			result.M13 = (m2 * num13 - m3 * num14 + m4 * num15) * num12;
			result.M23 = (0f - (m * num13 - m3 * num16 + m4 * num17)) * num12;
			result.M33 = (m * num14 - m2 * num16 + m4 * num18) * num12;
			result.M43 = (0f - (m * num15 - m2 * num17 + m3 * num18)) * num12;
			float num19 = m7 * m12 - m8 * m11;
			float num20 = m6 * m12 - m8 * m10;
			float num21 = m6 * m11 - m7 * m10;
			float num22 = m5 * m12 - m8 * m9;
			float num23 = m5 * m11 - m7 * m9;
			float num24 = m5 * m10 - m6 * m9;
			result.M14 = (0f - (m2 * num19 - m3 * num20 + m4 * num21)) * num12;
			result.M24 = (m * num19 - m3 * num22 + m4 * num23) * num12;
			result.M34 = (0f - (m * num20 - m2 * num22 + m4 * num24)) * num12;
			result.M44 = (m * num21 - m2 * num23 + m3 * num24) * num12;
			return true;
		}

		public unsafe static bool Decompose(Matrix4x4 matrix, out Vector3 scale, out Quaternion rotation, out Vector3 translation)
		{
			bool result = true;
			fixed (Vector3* ptr = &scale)
			{
				float* ptr2 = (float*)ptr;
				VectorBasis vectorBasis = default(VectorBasis);
				Vector3** ptr3 = (Vector3**)(&vectorBasis);
				Matrix4x4 identity = Identity;
				CanonicalBasis canonicalBasis = default(CanonicalBasis);
				Vector3* ptr4 = &canonicalBasis.Row0;
				canonicalBasis.Row0 = new Vector3(1f, 0f, 0f);
				canonicalBasis.Row1 = new Vector3(0f, 1f, 0f);
				canonicalBasis.Row2 = new Vector3(0f, 0f, 1f);
				translation = new Vector3(matrix.M41, matrix.M42, matrix.M43);
				*ptr3 = (Vector3*)(&identity.M11);
				ptr3[1] = (Vector3*)(&identity.M21);
				ptr3[2] = (Vector3*)(&identity.M31);
				*(*ptr3) = new Vector3(matrix.M11, matrix.M12, matrix.M13);
				*ptr3[1] = new Vector3(matrix.M21, matrix.M22, matrix.M23);
				*ptr3[2] = new Vector3(matrix.M31, matrix.M32, matrix.M33);
				scale.X = (*ptr3)->Length();
				scale.Y = ptr3[1]->Length();
				scale.Z = ptr3[2]->Length();
				float num = *ptr2;
				float num2 = ptr2[1];
				float num3 = ptr2[2];
				uint num4;
				uint num5;
				uint num6;
				if (num < num2)
				{
					if (num2 < num3)
					{
						num4 = 2u;
						num5 = 1u;
						num6 = 0u;
					}
					else
					{
						num4 = 1u;
						if (num < num3)
						{
							num5 = 2u;
							num6 = 0u;
						}
						else
						{
							num5 = 0u;
							num6 = 2u;
						}
					}
				}
				else if (num < num3)
				{
					num4 = 2u;
					num5 = 0u;
					num6 = 1u;
				}
				else
				{
					num4 = 0u;
					if (num2 < num3)
					{
						num5 = 2u;
						num6 = 1u;
					}
					else
					{
						num5 = 1u;
						num6 = 2u;
					}
				}
				if (ptr2[num4] < 0.0001f)
				{
					*ptr3[num4] = ptr4[num4];
				}
				*ptr3[num4] = Vector3.Normalize(*ptr3[num4]);
				if (ptr2[num5] < 0.0001f)
				{
					float num7 = MathF.Abs(ptr3[num4]->X);
					float num8 = MathF.Abs(ptr3[num4]->Y);
					float num9 = MathF.Abs(ptr3[num4]->Z);
					uint num10 = ((num7 < num8) ? ((!(num8 < num9)) ? ((!(num7 < num9)) ? 2u : 0u) : 0u) : ((num7 < num9) ? 1u : ((num8 < num9) ? 1u : 2u)));
					*ptr3[num5] = Vector3.Cross(*ptr3[num4], ptr4[num10]);
				}
				*ptr3[num5] = Vector3.Normalize(*ptr3[num5]);
				if (ptr2[num6] < 0.0001f)
				{
					*ptr3[num6] = Vector3.Cross(*ptr3[num4], *ptr3[num5]);
				}
				*ptr3[num6] = Vector3.Normalize(*ptr3[num6]);
				float num11 = identity.GetDeterminant();
				if (num11 < 0f)
				{
					ptr2[num4] = 0f - ptr2[num4];
					*ptr3[num4] = -(*ptr3[num4]);
					num11 = 0f - num11;
				}
				num11 -= 1f;
				num11 *= num11;
				if (0.0001f < num11)
				{
					rotation = Quaternion.Identity;
					result = false;
				}
				else
				{
					rotation = Quaternion.CreateFromRotationMatrix(identity);
				}
			}
			return result;
		}

		public static Matrix4x4 Transform(Matrix4x4 value, Quaternion rotation)
		{
			float num = rotation.X + rotation.X;
			float num2 = rotation.Y + rotation.Y;
			float num3 = rotation.Z + rotation.Z;
			float num4 = rotation.W * num;
			float num5 = rotation.W * num2;
			float num6 = rotation.W * num3;
			float num7 = rotation.X * num;
			float num8 = rotation.X * num2;
			float num9 = rotation.X * num3;
			float num10 = rotation.Y * num2;
			float num11 = rotation.Y * num3;
			float num12 = rotation.Z * num3;
			float num13 = 1f - num10 - num12;
			float num14 = num8 - num6;
			float num15 = num9 + num5;
			float num16 = num8 + num6;
			float num17 = 1f - num7 - num12;
			float num18 = num11 - num4;
			float num19 = num9 - num5;
			float num20 = num11 + num4;
			float num21 = 1f - num7 - num10;
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = value.M11 * num13 + value.M12 * num14 + value.M13 * num15;
			result.M12 = value.M11 * num16 + value.M12 * num17 + value.M13 * num18;
			result.M13 = value.M11 * num19 + value.M12 * num20 + value.M13 * num21;
			result.M14 = value.M14;
			result.M21 = value.M21 * num13 + value.M22 * num14 + value.M23 * num15;
			result.M22 = value.M21 * num16 + value.M22 * num17 + value.M23 * num18;
			result.M23 = value.M21 * num19 + value.M22 * num20 + value.M23 * num21;
			result.M24 = value.M24;
			result.M31 = value.M31 * num13 + value.M32 * num14 + value.M33 * num15;
			result.M32 = value.M31 * num16 + value.M32 * num17 + value.M33 * num18;
			result.M33 = value.M31 * num19 + value.M32 * num20 + value.M33 * num21;
			result.M34 = value.M34;
			result.M41 = value.M41 * num13 + value.M42 * num14 + value.M43 * num15;
			result.M42 = value.M41 * num16 + value.M42 * num17 + value.M43 * num18;
			result.M43 = value.M41 * num19 + value.M42 * num20 + value.M43 * num21;
			result.M44 = value.M44;
			return result;
		}

		public static Matrix4x4 Transpose(Matrix4x4 matrix)
		{
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = matrix.M11;
			result.M12 = matrix.M21;
			result.M13 = matrix.M31;
			result.M14 = matrix.M41;
			result.M21 = matrix.M12;
			result.M22 = matrix.M22;
			result.M23 = matrix.M32;
			result.M24 = matrix.M42;
			result.M31 = matrix.M13;
			result.M32 = matrix.M23;
			result.M33 = matrix.M33;
			result.M34 = matrix.M43;
			result.M41 = matrix.M14;
			result.M42 = matrix.M24;
			result.M43 = matrix.M34;
			result.M44 = matrix.M44;
			return result;
		}

		public static Matrix4x4 Lerp(Matrix4x4 matrix1, Matrix4x4 matrix2, float amount)
		{
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = matrix1.M11 + (matrix2.M11 - matrix1.M11) * amount;
			result.M12 = matrix1.M12 + (matrix2.M12 - matrix1.M12) * amount;
			result.M13 = matrix1.M13 + (matrix2.M13 - matrix1.M13) * amount;
			result.M14 = matrix1.M14 + (matrix2.M14 - matrix1.M14) * amount;
			result.M21 = matrix1.M21 + (matrix2.M21 - matrix1.M21) * amount;
			result.M22 = matrix1.M22 + (matrix2.M22 - matrix1.M22) * amount;
			result.M23 = matrix1.M23 + (matrix2.M23 - matrix1.M23) * amount;
			result.M24 = matrix1.M24 + (matrix2.M24 - matrix1.M24) * amount;
			result.M31 = matrix1.M31 + (matrix2.M31 - matrix1.M31) * amount;
			result.M32 = matrix1.M32 + (matrix2.M32 - matrix1.M32) * amount;
			result.M33 = matrix1.M33 + (matrix2.M33 - matrix1.M33) * amount;
			result.M34 = matrix1.M34 + (matrix2.M34 - matrix1.M34) * amount;
			result.M41 = matrix1.M41 + (matrix2.M41 - matrix1.M41) * amount;
			result.M42 = matrix1.M42 + (matrix2.M42 - matrix1.M42) * amount;
			result.M43 = matrix1.M43 + (matrix2.M43 - matrix1.M43) * amount;
			result.M44 = matrix1.M44 + (matrix2.M44 - matrix1.M44) * amount;
			return result;
		}

		public static Matrix4x4 Negate(Matrix4x4 value)
		{
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = 0f - value.M11;
			result.M12 = 0f - value.M12;
			result.M13 = 0f - value.M13;
			result.M14 = 0f - value.M14;
			result.M21 = 0f - value.M21;
			result.M22 = 0f - value.M22;
			result.M23 = 0f - value.M23;
			result.M24 = 0f - value.M24;
			result.M31 = 0f - value.M31;
			result.M32 = 0f - value.M32;
			result.M33 = 0f - value.M33;
			result.M34 = 0f - value.M34;
			result.M41 = 0f - value.M41;
			result.M42 = 0f - value.M42;
			result.M43 = 0f - value.M43;
			result.M44 = 0f - value.M44;
			return result;
		}

		public static Matrix4x4 Add(Matrix4x4 value1, Matrix4x4 value2)
		{
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = value1.M11 + value2.M11;
			result.M12 = value1.M12 + value2.M12;
			result.M13 = value1.M13 + value2.M13;
			result.M14 = value1.M14 + value2.M14;
			result.M21 = value1.M21 + value2.M21;
			result.M22 = value1.M22 + value2.M22;
			result.M23 = value1.M23 + value2.M23;
			result.M24 = value1.M24 + value2.M24;
			result.M31 = value1.M31 + value2.M31;
			result.M32 = value1.M32 + value2.M32;
			result.M33 = value1.M33 + value2.M33;
			result.M34 = value1.M34 + value2.M34;
			result.M41 = value1.M41 + value2.M41;
			result.M42 = value1.M42 + value2.M42;
			result.M43 = value1.M43 + value2.M43;
			result.M44 = value1.M44 + value2.M44;
			return result;
		}

		public static Matrix4x4 Subtract(Matrix4x4 value1, Matrix4x4 value2)
		{
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = value1.M11 - value2.M11;
			result.M12 = value1.M12 - value2.M12;
			result.M13 = value1.M13 - value2.M13;
			result.M14 = value1.M14 - value2.M14;
			result.M21 = value1.M21 - value2.M21;
			result.M22 = value1.M22 - value2.M22;
			result.M23 = value1.M23 - value2.M23;
			result.M24 = value1.M24 - value2.M24;
			result.M31 = value1.M31 - value2.M31;
			result.M32 = value1.M32 - value2.M32;
			result.M33 = value1.M33 - value2.M33;
			result.M34 = value1.M34 - value2.M34;
			result.M41 = value1.M41 - value2.M41;
			result.M42 = value1.M42 - value2.M42;
			result.M43 = value1.M43 - value2.M43;
			result.M44 = value1.M44 - value2.M44;
			return result;
		}

		public static Matrix4x4 Multiply(Matrix4x4 value1, Matrix4x4 value2)
		{
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = value1.M11 * value2.M11 + value1.M12 * value2.M21 + value1.M13 * value2.M31 + value1.M14 * value2.M41;
			result.M12 = value1.M11 * value2.M12 + value1.M12 * value2.M22 + value1.M13 * value2.M32 + value1.M14 * value2.M42;
			result.M13 = value1.M11 * value2.M13 + value1.M12 * value2.M23 + value1.M13 * value2.M33 + value1.M14 * value2.M43;
			result.M14 = value1.M11 * value2.M14 + value1.M12 * value2.M24 + value1.M13 * value2.M34 + value1.M14 * value2.M44;
			result.M21 = value1.M21 * value2.M11 + value1.M22 * value2.M21 + value1.M23 * value2.M31 + value1.M24 * value2.M41;
			result.M22 = value1.M21 * value2.M12 + value1.M22 * value2.M22 + value1.M23 * value2.M32 + value1.M24 * value2.M42;
			result.M23 = value1.M21 * value2.M13 + value1.M22 * value2.M23 + value1.M23 * value2.M33 + value1.M24 * value2.M43;
			result.M24 = value1.M21 * value2.M14 + value1.M22 * value2.M24 + value1.M23 * value2.M34 + value1.M24 * value2.M44;
			result.M31 = value1.M31 * value2.M11 + value1.M32 * value2.M21 + value1.M33 * value2.M31 + value1.M34 * value2.M41;
			result.M32 = value1.M31 * value2.M12 + value1.M32 * value2.M22 + value1.M33 * value2.M32 + value1.M34 * value2.M42;
			result.M33 = value1.M31 * value2.M13 + value1.M32 * value2.M23 + value1.M33 * value2.M33 + value1.M34 * value2.M43;
			result.M34 = value1.M31 * value2.M14 + value1.M32 * value2.M24 + value1.M33 * value2.M34 + value1.M34 * value2.M44;
			result.M41 = value1.M41 * value2.M11 + value1.M42 * value2.M21 + value1.M43 * value2.M31 + value1.M44 * value2.M41;
			result.M42 = value1.M41 * value2.M12 + value1.M42 * value2.M22 + value1.M43 * value2.M32 + value1.M44 * value2.M42;
			result.M43 = value1.M41 * value2.M13 + value1.M42 * value2.M23 + value1.M43 * value2.M33 + value1.M44 * value2.M43;
			result.M44 = value1.M41 * value2.M14 + value1.M42 * value2.M24 + value1.M43 * value2.M34 + value1.M44 * value2.M44;
			return result;
		}

		public static Matrix4x4 Multiply(Matrix4x4 value1, float value2)
		{
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = value1.M11 * value2;
			result.M12 = value1.M12 * value2;
			result.M13 = value1.M13 * value2;
			result.M14 = value1.M14 * value2;
			result.M21 = value1.M21 * value2;
			result.M22 = value1.M22 * value2;
			result.M23 = value1.M23 * value2;
			result.M24 = value1.M24 * value2;
			result.M31 = value1.M31 * value2;
			result.M32 = value1.M32 * value2;
			result.M33 = value1.M33 * value2;
			result.M34 = value1.M34 * value2;
			result.M41 = value1.M41 * value2;
			result.M42 = value1.M42 * value2;
			result.M43 = value1.M43 * value2;
			result.M44 = value1.M44 * value2;
			return result;
		}

		public static Matrix4x4 operator -(Matrix4x4 value)
		{
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = 0f - value.M11;
			result.M12 = 0f - value.M12;
			result.M13 = 0f - value.M13;
			result.M14 = 0f - value.M14;
			result.M21 = 0f - value.M21;
			result.M22 = 0f - value.M22;
			result.M23 = 0f - value.M23;
			result.M24 = 0f - value.M24;
			result.M31 = 0f - value.M31;
			result.M32 = 0f - value.M32;
			result.M33 = 0f - value.M33;
			result.M34 = 0f - value.M34;
			result.M41 = 0f - value.M41;
			result.M42 = 0f - value.M42;
			result.M43 = 0f - value.M43;
			result.M44 = 0f - value.M44;
			return result;
		}

		public static Matrix4x4 operator +(Matrix4x4 value1, Matrix4x4 value2)
		{
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = value1.M11 + value2.M11;
			result.M12 = value1.M12 + value2.M12;
			result.M13 = value1.M13 + value2.M13;
			result.M14 = value1.M14 + value2.M14;
			result.M21 = value1.M21 + value2.M21;
			result.M22 = value1.M22 + value2.M22;
			result.M23 = value1.M23 + value2.M23;
			result.M24 = value1.M24 + value2.M24;
			result.M31 = value1.M31 + value2.M31;
			result.M32 = value1.M32 + value2.M32;
			result.M33 = value1.M33 + value2.M33;
			result.M34 = value1.M34 + value2.M34;
			result.M41 = value1.M41 + value2.M41;
			result.M42 = value1.M42 + value2.M42;
			result.M43 = value1.M43 + value2.M43;
			result.M44 = value1.M44 + value2.M44;
			return result;
		}

		public static Matrix4x4 operator -(Matrix4x4 value1, Matrix4x4 value2)
		{
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = value1.M11 - value2.M11;
			result.M12 = value1.M12 - value2.M12;
			result.M13 = value1.M13 - value2.M13;
			result.M14 = value1.M14 - value2.M14;
			result.M21 = value1.M21 - value2.M21;
			result.M22 = value1.M22 - value2.M22;
			result.M23 = value1.M23 - value2.M23;
			result.M24 = value1.M24 - value2.M24;
			result.M31 = value1.M31 - value2.M31;
			result.M32 = value1.M32 - value2.M32;
			result.M33 = value1.M33 - value2.M33;
			result.M34 = value1.M34 - value2.M34;
			result.M41 = value1.M41 - value2.M41;
			result.M42 = value1.M42 - value2.M42;
			result.M43 = value1.M43 - value2.M43;
			result.M44 = value1.M44 - value2.M44;
			return result;
		}

		public static Matrix4x4 operator *(Matrix4x4 value1, Matrix4x4 value2)
		{
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = value1.M11 * value2.M11 + value1.M12 * value2.M21 + value1.M13 * value2.M31 + value1.M14 * value2.M41;
			result.M12 = value1.M11 * value2.M12 + value1.M12 * value2.M22 + value1.M13 * value2.M32 + value1.M14 * value2.M42;
			result.M13 = value1.M11 * value2.M13 + value1.M12 * value2.M23 + value1.M13 * value2.M33 + value1.M14 * value2.M43;
			result.M14 = value1.M11 * value2.M14 + value1.M12 * value2.M24 + value1.M13 * value2.M34 + value1.M14 * value2.M44;
			result.M21 = value1.M21 * value2.M11 + value1.M22 * value2.M21 + value1.M23 * value2.M31 + value1.M24 * value2.M41;
			result.M22 = value1.M21 * value2.M12 + value1.M22 * value2.M22 + value1.M23 * value2.M32 + value1.M24 * value2.M42;
			result.M23 = value1.M21 * value2.M13 + value1.M22 * value2.M23 + value1.M23 * value2.M33 + value1.M24 * value2.M43;
			result.M24 = value1.M21 * value2.M14 + value1.M22 * value2.M24 + value1.M23 * value2.M34 + value1.M24 * value2.M44;
			result.M31 = value1.M31 * value2.M11 + value1.M32 * value2.M21 + value1.M33 * value2.M31 + value1.M34 * value2.M41;
			result.M32 = value1.M31 * value2.M12 + value1.M32 * value2.M22 + value1.M33 * value2.M32 + value1.M34 * value2.M42;
			result.M33 = value1.M31 * value2.M13 + value1.M32 * value2.M23 + value1.M33 * value2.M33 + value1.M34 * value2.M43;
			result.M34 = value1.M31 * value2.M14 + value1.M32 * value2.M24 + value1.M33 * value2.M34 + value1.M34 * value2.M44;
			result.M41 = value1.M41 * value2.M11 + value1.M42 * value2.M21 + value1.M43 * value2.M31 + value1.M44 * value2.M41;
			result.M42 = value1.M41 * value2.M12 + value1.M42 * value2.M22 + value1.M43 * value2.M32 + value1.M44 * value2.M42;
			result.M43 = value1.M41 * value2.M13 + value1.M42 * value2.M23 + value1.M43 * value2.M33 + value1.M44 * value2.M43;
			result.M44 = value1.M41 * value2.M14 + value1.M42 * value2.M24 + value1.M43 * value2.M34 + value1.M44 * value2.M44;
			return result;
		}

		public static Matrix4x4 operator *(Matrix4x4 value1, float value2)
		{
			Matrix4x4 result = default(Matrix4x4);
			result.M11 = value1.M11 * value2;
			result.M12 = value1.M12 * value2;
			result.M13 = value1.M13 * value2;
			result.M14 = value1.M14 * value2;
			result.M21 = value1.M21 * value2;
			result.M22 = value1.M22 * value2;
			result.M23 = value1.M23 * value2;
			result.M24 = value1.M24 * value2;
			result.M31 = value1.M31 * value2;
			result.M32 = value1.M32 * value2;
			result.M33 = value1.M33 * value2;
			result.M34 = value1.M34 * value2;
			result.M41 = value1.M41 * value2;
			result.M42 = value1.M42 * value2;
			result.M43 = value1.M43 * value2;
			result.M44 = value1.M44 * value2;
			return result;
		}

		public static bool operator ==(Matrix4x4 value1, Matrix4x4 value2)
		{
			if (value1.M11 == value2.M11 && value1.M22 == value2.M22 && value1.M33 == value2.M33 && value1.M44 == value2.M44 && value1.M12 == value2.M12 && value1.M13 == value2.M13 && value1.M14 == value2.M14 && value1.M21 == value2.M21 && value1.M23 == value2.M23 && value1.M24 == value2.M24 && value1.M31 == value2.M31 && value1.M32 == value2.M32 && value1.M34 == value2.M34 && value1.M41 == value2.M41 && value1.M42 == value2.M42)
			{
				return value1.M43 == value2.M43;
			}
			return false;
		}

		public static bool operator !=(Matrix4x4 value1, Matrix4x4 value2)
		{
			if (value1.M11 == value2.M11 && value1.M12 == value2.M12 && value1.M13 == value2.M13 && value1.M14 == value2.M14 && value1.M21 == value2.M21 && value1.M22 == value2.M22 && value1.M23 == value2.M23 && value1.M24 == value2.M24 && value1.M31 == value2.M31 && value1.M32 == value2.M32 && value1.M33 == value2.M33 && value1.M34 == value2.M34 && value1.M41 == value2.M41 && value1.M42 == value2.M42 && value1.M43 == value2.M43)
			{
				return value1.M44 != value2.M44;
			}
			return true;
		}

		public bool Equals(Matrix4x4 other)
		{
			if (M11 == other.M11 && M22 == other.M22 && M33 == other.M33 && M44 == other.M44 && M12 == other.M12 && M13 == other.M13 && M14 == other.M14 && M21 == other.M21 && M23 == other.M23 && M24 == other.M24 && M31 == other.M31 && M32 == other.M32 && M34 == other.M34 && M41 == other.M41 && M42 == other.M42)
			{
				return M43 == other.M43;
			}
			return false;
		}

		public override bool Equals(object obj)
		{
			if (obj is Matrix4x4)
			{
				return Equals((Matrix4x4)obj);
			}
			return false;
		}

		public override string ToString()
		{
			CultureInfo currentCulture = CultureInfo.CurrentCulture;
			return string.Format(currentCulture, "{{ {{M11:{0} M12:{1} M13:{2} M14:{3}}} {{M21:{4} M22:{5} M23:{6} M24:{7}}} {{M31:{8} M32:{9} M33:{10} M34:{11}}} {{M41:{12} M42:{13} M43:{14} M44:{15}}} }}", M11.ToString(currentCulture), M12.ToString(currentCulture), M13.ToString(currentCulture), M14.ToString(currentCulture), M21.ToString(currentCulture), M22.ToString(currentCulture), M23.ToString(currentCulture), M24.ToString(currentCulture), M31.ToString(currentCulture), M32.ToString(currentCulture), M33.ToString(currentCulture), M34.ToString(currentCulture), M41.ToString(currentCulture), M42.ToString(currentCulture), M43.ToString(currentCulture), M44.ToString(currentCulture));
		}

		public override int GetHashCode()
		{
			return M11.GetHashCode() + M12.GetHashCode() + M13.GetHashCode() + M14.GetHashCode() + M21.GetHashCode() + M22.GetHashCode() + M23.GetHashCode() + M24.GetHashCode() + M31.GetHashCode() + M32.GetHashCode() + M33.GetHashCode() + M34.GetHashCode() + M41.GetHashCode() + M42.GetHashCode() + M43.GetHashCode() + M44.GetHashCode();
		}
	}
	public struct Plane : IEquatable<Plane>
	{
		public Vector3 Normal;

		public float D;

		public Plane(float x, float y, float z, float d)
		{
			Normal = new Vector3(x, y, z);
			D = d;
		}

		public Plane(Vector3 normal, float d)
		{
			Normal = normal;
			D = d;
		}

		public Plane(Vector4 value)
		{
			Normal = new Vector3(value.X, value.Y, value.Z);
			D = value.W;
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static Plane CreateFromVertices(Vector3 point1, Vector3 point2, Vector3 point3)
		{
			if (Vector.IsHardwareAccelerated)
			{
				Vector3 vector = point2 - point1;
				Vector3 vector2 = point3 - point1;
				Vector3 vector3 = Vector3.Normalize(Vector3.Cross(vector, vector2));
				float d = 0f - Vector3.Dot(vector3, point1);
				return new Plane(vector3, d);
			}
			float num = point2.X - point1.X;
			float num2 = point2.Y - point1.Y;
			float num3 = point2.Z - point1.Z;
			float num4 = point3.X - point1.X;
			float num5 = point3.Y - point1.Y;
			float num6 = point3.Z - point1.Z;
			float num7 = num2 * num6 - num3 * num5;
			float num8 = num3 * num4 - num * num6;
			float num9 = num * num5 - num2 * num4;
			float x = num7 * num7 + num8 * num8 + num9 * num9;
			float num10 = 1f / MathF.Sqrt(x);
			Vector3 normal = new Vector3(num7 * num10, num8 * num10, num9 * num10);
			return new Plane(normal, 0f - (normal.X * point1.X + normal.Y * point1.Y + normal.Z * point1.Z));
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static Plane Normalize(Plane value)
		{
			if (Vector.IsHardwareAccelerated)
			{
				float num = value.Normal.LengthSquared();
				if (MathF.Abs(num - 1f) < 1.1920929E-07f)
				{
					return value;
				}
				float num2 = MathF.Sqrt(num);
				return new Plane(value.Normal / num2, value.D / num2);
			}
			float num3 = value.Normal.X * value.Normal.X + value.Normal.Y * value.Normal.Y + value.Normal.Z * value.Normal.Z;
			if (MathF.Abs(num3 - 1f) < 1.1920929E-07f)
			{
				return value;
			}
			float num4 = 1f / MathF.Sqrt(num3);
			return new Plane(value.Normal.X * num4, value.Normal.Y * num4, value.Normal.Z * num4, value.D * num4);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static Plane Transform(Plane plane, Matrix4x4 matrix)
		{
			Matrix4x4.Invert(matrix, out var result);
			float x = plane.Normal.X;
			float y = plane.Normal.Y;
			float z = plane.Normal.Z;
			float d = plane.D;
			return new Plane(x * result.M11 + y * result.M12 + z * result.M13 + d * result.M14, x * result.M21 + y * result.M22 + z * result.M23 + d * result.M24, x * result.M31 + y * result.M32 + z * result.M33 + d * result.M34, x * result.M41 + y * result.M42 + z * result.M43 + d * result.M44);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static Plane Transform(Plane plane, Quaternion rotation)
		{
			float num = rotation.X + rotation.X;
			float num2 = rotation.Y + rotation.Y;
			float num3 = rotation.Z + rotation.Z;
			float num4 = rotation.W * num;
			float num5 = rotation.W * num2;
			float num6 = rotation.W * num3;
			float num7 = rotation.X * num;
			float num8 = rotation.X * num2;
			float num9 = rotation.X * num3;
			float num10 = rotation.Y * num2;
			float num11 = rotation.Y * num3;
			float num12 = rotation.Z * num3;
			float num13 = 1f - num10 - num12;
			float num14 = num8 - num6;
			float num15 = num9 + num5;
			float num16 = num8 + num6;
			float num17 = 1f - num7 - num12;
			float num18 = num11 - num4;
			float num19 = num9 - num5;
			float num20 = num11 + num4;
			float num21 = 1f - num7 - num10;
			float x = plane.Normal.X;
			float y = plane.Normal.Y;
			float z = plane.Normal.Z;
			return new Plane(x * num13 + y * num14 + z * num15, x * num16 + y * num17 + z * num18, x * num19 + y * num20 + z * num21, plane.D);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static float Dot(Plane plane, Vector4 value)
		{
			return plane.Normal.X * value.X + plane.Normal.Y * value.Y + plane.Normal.Z * value.Z + plane.D * value.W;
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static float DotCoordinate(Plane plane, Vector3 value)
		{
			if (Vector.IsHardwareAccelerated)
			{
				return Vector3.Dot(plane.Normal, value) + plane.D;
			}
			return plane.Normal.X * value.X + plane.Normal.Y * value.Y + plane.Normal.Z * value.Z + plane.D;
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static float DotNormal(Plane plane, Vector3 value)
		{
			if (Vector.IsHardwareAccelerated)
			{
				return Vector3.Dot(plane.Normal, value);
			}
			return plane.Normal.X * value.X + plane.Normal.Y * value.Y + plane.Normal.Z * value.Z;
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static bool operator ==(Plane value1, Plane value2)
		{
			if (value1.Normal.X == value2.Normal.X && value1.Normal.Y == value2.Normal.Y && value1.Normal.Z == value2.Normal.Z)
			{
				return value1.D == value2.D;
			}
			return false;
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static bool operator !=(Plane value1, Plane value2)
		{
			if (value1.Normal.X == value2.Normal.X && value1.Normal.Y == value2.Normal.Y && value1.Normal.Z == value2.Normal.Z)
			{
				return value1.D != value2.D;
			}
			return true;
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public bool Equals(Plane other)
		{
			if (Vector.IsHardwareAccelerated)
			{
				if (Normal.Equals(other.Normal))
				{
					return D == other.D;
				}
				return false;
			}
			if (Normal.X == other.Normal.X && Normal.Y == other.Normal.Y && Normal.Z == other.Normal.Z)
			{
				return D == other.D;
			}
			return false;
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public override bool Equals(object obj)
		{
			if (obj is Plane)
			{
				return Equals((Plane)obj);
			}
			return false;
		}

		public override string ToString()
		{
			CultureInfo currentCulture = CultureInfo.CurrentCulture;
			return string.Format(currentCulture, "{{Normal:{0} D:{1}}}", Normal.ToString(), D.ToString(currentCulture));
		}

		public override int GetHashCode()
		{
			return Normal.GetHashCode() + D.GetHashCode();
		}
	}
	public struct Quaternion : IEquatable<Quaternion>
	{
		public float X;

		public float Y;

		public float Z;

		public float W;

		public static Quaternion Identity => new Quaternion(0f, 0f, 0f, 1f);

		public bool IsIdentity
		{
			get
			{
				if (X == 0f && Y == 0f && Z == 0f)
				{
					return W == 1f;
				}
				return false;
			}
		}

		public Quaternion(float x, float y, float z, float w)
		{
			X = x;
			Y = y;
			Z = z;
			W = w;
		}

		public Quaternion(Vector3 vectorPart, float scalarPart)
		{
			X = vectorPart.X;
			Y = vectorPart.Y;
			Z = vectorPart.Z;
			W = scalarPart;
		}

		public float Length()
		{
			return MathF.Sqrt(X * X + Y * Y + Z * Z + W * W);
		}

		public float LengthSquared()
		{
			return X * X + Y * Y + Z * Z + W * W;
		}

		public static Quaternion Normalize(Quaternion value)
		{
			float x = value.X * value.X + value.Y * value.Y + value.Z * value.Z + value.W * value.W;
			float num = 1f / MathF.Sqrt(x);
			Quaternion result = default(Quaternion);
			result.X = value.X * num;
			result.Y = value.Y * num;
			result.Z = value.Z * num;
			result.W = value.W * num;
			return result;
		}

		public static Quaternion Conjugate(Quaternion value)
		{
			Quaternion result = default(Quaternion);
			result.X = 0f - value.X;
			result.Y = 0f - value.Y;
			result.Z = 0f - value.Z;
			result.W = value.W;
			return result;
		}

		public static Quaternion Inverse(Quaternion value)
		{
			float num = value.X * value.X + value.Y * value.Y + value.Z * value.Z + value.W * value.W;
			float num2 = 1f / num;
			Quaternion result = default(Quaternion);
			result.X = (0f - value.X) * num2;
			result.Y = (0f - value.Y) * num2;
			result.Z = (0f - value.Z) * num2;
			result.W = value.W * num2;
			return result;
		}

		public static Quaternion CreateFromAxisAngle(Vector3 axis, float angle)
		{
			float x = angle * 0.5f;
			float num = MathF.Sin(x);
			float w = MathF.Cos(x);
			Quaternion result = default(Quaternion);
			result.X = axis.X * num;
			result.Y = axis.Y * num;
			result.Z = axis.Z * num;
			result.W = w;
			return result;
		}

		public static Quaternion CreateFromYawPitchRoll(float yaw, float pitch, float roll)
		{
			float x = roll * 0.5f;
			float num = MathF.Sin(x);
			float num2 = MathF.Cos(x);
			float x2 = pitch * 0.5f;
			float num3 = MathF.Sin(x2);
			float num4 = MathF.Cos(x2);
			float x3 = yaw * 0.5f;
			float num5 = MathF.Sin(x3);
			float num6 = MathF.Cos(x3);
			Quaternion result = default(Quaternion);
			result.X = num6 * num3 * num2 + num5 * num4 * num;
			result.Y = num5 * num4 * num2 - num6 * num3 * num;
			result.Z = num6 * num4 * num - num5 * num3 * num2;
			result.W = num6 * num4 * num2 + num5 * num3 * num;
			return result;
		}

		public static Quaternion CreateFromRotationMatrix(Matrix4x4 matrix)
		{
			float num = matrix.M11 + matrix.M22 + matrix.M33;
			Quaternion result = default(Quaternion);
			if (num > 0f)
			{
				float num2 = MathF.Sqrt(num + 1f);
				result.W = num2 * 0.5f;
				num2 = 0.5f / num2;
				result.X = (matrix.M23 - matrix.M32) * num2;
				result.Y = (matrix.M31 - matrix.M13) * num2;
				result.Z = (matrix.M12 - matrix.M21) * num2;
			}
			else if (matrix.M11 >= matrix.M22 && matrix.M11 >= matrix.M33)
			{
				float num3 = MathF.Sqrt(1f + matrix.M11 - matrix.M22 - matrix.M33);
				float num4 = 0.5f / num3;
				result.X = 0.5f * num3;
				result.Y = (matrix.M12 + matrix.M21) * num4;
				result.Z = (matrix.M13 + matrix.M31) * num4;
				result.W = (matrix.M23 - matrix.M32) * num4;
			}
			else if (matrix.M22 > matrix.M33)
			{
				float num5 = MathF.Sqrt(1f + matrix.M22 - matrix.M11 - matrix.M33);
				float num6 = 0.5f / num5;
				result.X = (matrix.M21 + matrix.M12) * num6;
				result.Y = 0.5f * num5;
				result.Z = (matrix.M32 + matrix.M23) * num6;
				result.W = (matrix.M31 - matrix.M13) * num6;
			}
			else
			{
				float num7 = MathF.Sqrt(1f + matrix.M33 - matrix.M11 - matrix.M22);
				float num8 = 0.5f / num7;
				result.X = (matrix.M31 + matrix.M13) * num8;
				result.Y = (matrix.M32 + matrix.M23) * num8;
				result.Z = 0.5f * num7;
				result.W = (matrix.M12 - matrix.M21) * num8;
			}
			return result;
		}

		public static float Dot(Quaternion quaternion1, Quaternion quaternion2)
		{
			return quaternion1.X * quaternion2.X + quaternion1.Y * quaternion2.Y + quaternion1.Z * quaternion2.Z + quaternion1.W * quaternion2.W;
		}

		public static Quaternion Slerp(Quaternion quaternion1, Quaternion quaternion2, float amount)
		{
			float num = quaternion1.X * quaternion2.X + quaternion1.Y * quaternion2.Y + quaternion1.Z * quaternion2.Z + quaternion1.W * quaternion2.W;
			bool flag = false;
			if (num < 0f)
			{
				flag = true;
				num = 0f - num;
			}
			float num2;
			float num3;
			if (num > 0.999999f)
			{
				num2 = 1f - amount;
				num3 = (flag ? (0f - amount) : amount);
			}
			else
			{
				float num4 = MathF.Acos(num);
				float num5 = 1f / MathF.Sin(num4);
				num2 = MathF.Sin((1f - amount) * num4) * num5;
				num3 = (flag ? ((0f - MathF.Sin(amount * num4)) * num5) : (MathF.Sin(amount * num4) * num5));
			}
			Quaternion result = default(Quaternion);
			result.X = num2 * quaternion1.X + num3 * quaternion2.X;
			result.Y = num2 * quaternion1.Y + num3 * quaternion2.Y;
			result.Z = num2 * quaternion1.Z + num3 * quaternion2.Z;
			result.W = num2 * quaternion1.W + num3 * quaternion2.W;
			return result;
		}

		public static Quaternion Lerp(Quaternion quaternion1, Quaternion quaternion2, float amount)
		{
			float num = 1f - amount;
			Quaternion result = default(Quaternion);
			if (quaternion1.X * quaternion2.X + quaternion1.Y * quaternion2.Y + quaternion1.Z * quaternion2.Z + quaternion1.W * quaternion2.W >= 0f)
			{
				result.X = num * quaternion1.X + amount * quaternion2.X;
				result.Y = num * quaternion1.Y + amount * quaternion2.Y;
				result.Z = num * quaternion1.Z + amount * quaternion2.Z;
				result.W = num * quaternion1.W + amount * quaternion2.W;
			}
			else
			{
				result.X = num * quaternion1.X - amount * quaternion2.X;
				result.Y = num * quaternion1.Y - amount * quaternion2.Y;
				result.Z = num * quaternion1.Z - amount * quaternion2.Z;
				result.W = num * quaternion1.W - amount * quaternion2.W;
			}
			float x = result.X * result.X + result.Y * result.Y + result.Z * result.Z + result.W * result.W;
			float num2 = 1f / MathF.Sqrt(x);
			result.X *= num2;
			result.Y *= num2;
			result.Z *= num2;
			result.W *= num2;
			return result;
		}

		public static Quaternion Concatenate(Quaternion value1, Quaternion value2)
		{
			float x = value2.X;
			float y = value2.Y;
			float z = value2.Z;
			float w = value2.W;
			float x2 = value1.X;
			float y2 = value1.Y;
			float z2 = value1.Z;
			float w2 = value1.W;
			float num = y * z2 - z * y2;
			float num2 = z * x2 - x * z2;
			float num3 = x * y2 - y * x2;
			float num4 = x * x2 + y * y2 + z * z2;
			Quaternion result = default(Quaternion);
			result.X = x * w2 + x2 * w + num;
			result.Y = y * w2 + y2 * w + num2;
			result.Z = z * w2 + z2 * w + num3;
			result.W = w * w2 - num4;
			return result;
		}

		public static Quaternion Negate(Quaternion value)
		{
			Quaternion result = default(Quaternion);
			result.X = 0f - value.X;
			result.Y = 0f - value.Y;
			result.Z = 0f - value.Z;
			result.W = 0f - value.W;
			return result;
		}

		public static Quaternion Add(Quaternion value1, Quaternion value2)
		{
			Quaternion result = default(Quaternion);
			result.X = value1.X + value2.X;
			result.Y = value1.Y + value2.Y;
			result.Z = value1.Z + value2.Z;
			result.W = value1.W + value2.W;
			return result;
		}

		public static Quaternion Subtract(Quaternion value1, Quaternion value2)
		{
			Quaternion result = default(Quaternion);
			result.X = value1.X - value2.X;
			result.Y = value1.Y - value2.Y;
			result.Z = value1.Z - value2.Z;
			result.W = value1.W - value2.W;
			return result;
		}

		public static Quaternion Multiply(Quaternion value1, Quaternion value2)
		{
			float x = value1.X;
			float y = value1.Y;
			float z = value1.Z;
			float w = value1.W;
			float x2 = value2.X;
			float y2 = value2.Y;
			float z2 = value2.Z;
			float w2 = value2.W;
			float num = y * z2 - z * y2;
			float num2 = z * x2 - x * z2;
			float num3 = x * y2 - y * x2;
			float num4 = x * x2 + y * y2 + z * z2;
			Quaternion result = default(Quaternion);
			result.X = x * w2 + x2 * w + num;
			result.Y = y * w2 + y2 * w + num2;
			result.Z = z * w2 + z2 * w + num3;
			result.W = w * w2 - num4;
			return result;
		}

		public static Quaternion Multiply(Quaternion value1, float value2)
		{
			Quaternion result = default(Quaternion);
			result.X = value1.X * value2;
			result.Y = value1.Y * value2;
			result.Z = value1.Z * value2;
			result.W = value1.W * value2;
			return result;
		}

		public static Quaternion Divide(Quaternion value1, Quaternion value2)
		{
			float x = value1.X;
			float y = value1.Y;
			float z = value1.Z;
			float w = value1.W;
			float num = value2.X * value2.X + value2.Y * value2.Y + value2.Z * value2.Z + value2.W * value2.W;
			float num2 = 1f / num;
			float num3 = (0f - value2.X) * num2;
			float num4 = (0f - value2.Y) * num2;
			float num5 = (0f - value2.Z) * num2;
			float num6 = value2.W * num2;
			float num7 = y * num5 - z * num4;
			float num8 = z * num3 - x * num5;
			float num9 = x * num4 - y * num3;
			float num10 = x * num3 + y * num4 + z * num5;
			Quaternion result = default(Quaternion);
			result.X = x * num6 + num3 * w + num7;
			result.Y = y * num6 + num4 * w + num8;
			result.Z = z * num6 + num5 * w + num9;
			result.W = w * num6 - num10;
			return result;
		}

		public static Quaternion operator -(Quaternion value)
		{
			Quaternion result = default(Quaternion);
			result.X = 0f - value.X;
			result.Y = 0f - value.Y;
			result.Z = 0f - value.Z;
			result.W = 0f - value.W;
			return result;
		}

		public static Quaternion operator +(Quaternion value1, Quaternion value2)
		{
			Quaternion result = default(Quaternion);
			result.X = value1.X + value2.X;
			result.Y = value1.Y + value2.Y;
			result.Z = value1.Z + value2.Z;
			result.W = value1.W + value2.W;
			return result;
		}

		public static Quaternion operator -(Quaternion value1, Quaternion value2)
		{
			Quaternion result = default(Quaternion);
			result.X = value1.X - value2.X;
			result.Y = value1.Y - value2.Y;
			result.Z = value1.Z - value2.Z;
			result.W = value1.W - value2.W;
			return result;
		}

		public static Quaternion operator *(Quaternion value1, Quaternion value2)
		{
			float x = value1.X;
			float y = value1.Y;
			float z = value1.Z;
			float w = value1.W;
			float x2 = value2.X;
			float y2 = value2.Y;
			float z2 = value2.Z;
			float w2 = value2.W;
			float num = y * z2 - z * y2;
			float num2 = z * x2 - x * z2;
			float num3 = x * y2 - y * x2;
			float num4 = x * x2 + y * y2 + z * z2;
			Quaternion result = default(Quaternion);
			result.X = x * w2 + x2 * w + num;
			result.Y = y * w2 + y2 * w + num2;
			result.Z = z * w2 + z2 * w + num3;
			result.W = w * w2 - num4;
			return result;
		}

		public static Quaternion operator *(Quaternion value1, float value2)
		{
			Quaternion result = default(Quaternion);
			result.X = value1.X * value2;
			result.Y = value1.Y * value2;
			result.Z = value1.Z * value2;
			result.W = value1.W * value2;
			return result;
		}

		public static Quaternion operator /(Quaternion value1, Quaternion value2)
		{
			float x = value1.X;
			float y = value1.Y;
			float z = value1.Z;
			float w = value1.W;
			float num = value2.X * value2.X + value2.Y * value2.Y + value2.Z * value2.Z + value2.W * value2.W;
			float num2 = 1f / num;
			float num3 = (0f - value2.X) * num2;
			float num4 = (0f - value2.Y) * num2;
			float num5 = (0f - value2.Z) * num2;
			float num6 = value2.W * num2;
			float num7 = y * num5 - z * num4;
			float num8 = z * num3 - x * num5;
			float num9 = x * num4 - y * num3;
			float num10 = x * num3 + y * num4 + z * num5;
			Quaternion result = default(Quaternion);
			result.X = x * num6 + num3 * w + num7;
			result.Y = y * num6 + num4 * w + num8;
			result.Z = z * num6 + num5 * w + num9;
			result.W = w * num6 - num10;
			return result;
		}

		public static bool operator ==(Quaternion value1, Quaternion value2)
		{
			if (value1.X == value2.X && value1.Y == value2.Y && value1.Z == value2.Z)
			{
				return value1.W == value2.W;
			}
			return false;
		}

		public static bool operator !=(Quaternion value1, Quaternion value2)
		{
			if (value1.X == value2.X && value1.Y == value2.Y && value1.Z == value2.Z)
			{
				return value1.W != value2.W;
			}
			return true;
		}

		public bool Equals(Quaternion other)
		{
			if (X == other.X && Y == other.Y && Z == other.Z)
			{
				return W == other.W;
			}
			return false;
		}

		public override bool Equals(object obj)
		{
			if (obj is Quaternion)
			{
				return Equals((Quaternion)obj);
			}
			return false;
		}

		public override string ToString()
		{
			CultureInfo currentCulture = CultureInfo.CurrentCulture;
			return string.Format(currentCulture, "{{X:{0} Y:{1} Z:{2} W:{3}}}", X.ToString(currentCulture), Y.ToString(currentCulture), Z.ToString(currentCulture), W.ToString(currentCulture));
		}

		public override int GetHashCode()
		{
			return X.GetHashCode() + Y.GetHashCode() + Z.GetHashCode() + W.GetHashCode();
		}
	}
	public struct Vector2 : IEquatable<Vector2>, IFormattable
	{
		public float X;

		public float Y;

		public static Vector2 Zero => default(Vector2);

		public static Vector2 One => new Vector2(1f, 1f);

		public static Vector2 UnitX => new Vector2(1f, 0f);

		public static Vector2 UnitY => new Vector2(0f, 1f);

		public override int GetHashCode()
		{
			return HashHelpers.Combine(X.GetHashCode(), Y.GetHashCode());
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public override bool Equals(object obj)
		{
			if (!(obj is Vector2))
			{
				return false;
			}
			return Equals((Vector2)obj);
		}

		public override string ToString()
		{
			return ToString("G", CultureInfo.CurrentCulture);
		}

		public string ToString(string format)
		{
			return ToString(format, CultureInfo.CurrentCulture);
		}

		public string ToString(string format, IFormatProvider formatProvider)
		{
			StringBuilder stringBuilder = new StringBuilder();
			string numberGroupSeparator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator;
			stringBuilder.Append('<');
			stringBuilder.Append(X.ToString(format, formatProvider));
			stringBuilder.Append(numberGroupSeparator);
			stringBuilder.Append(' ');
			stringBuilder.Append(Y.ToString(format, formatProvider));
			stringBuilder.Append('>');
			return stringBuilder.ToString();
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public float Length()
		{
			if (Vector.IsHardwareAccelerated)
			{
				return MathF.Sqrt(Dot(this, this));
			}
			return MathF.Sqrt(X * X + Y * Y);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public float LengthSquared()
		{
			if (Vector.IsHardwareAccelerated)
			{
				return Dot(this, this);
			}
			return X * X + Y * Y;
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static float Distance(Vector2 value1, Vector2 value2)
		{
			if (Vector.IsHardwareAccelerated)
			{
				Vector2 vector = value1 - value2;
				return MathF.Sqrt(Dot(vector, vector));
			}
			float num = value1.X - value2.X;
			float num2 = value1.Y - value2.Y;
			return MathF.Sqrt(num * num + num2 * num2);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static float DistanceSquared(Vector2 value1, Vector2 value2)
		{
			if (Vector.IsHardwareAccelerated)
			{
				Vector2 vector = value1 - value2;
				return Dot(vector, vector);
			}
			float num = value1.X - value2.X;
			float num2 = value1.Y - value2.Y;
			return num * num + num2 * num2;
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static Vector2 Normalize(Vector2 value)
		{
			if (Vector.IsHardwareAccelerated)
			{
				float num = value.Length();
				return value / num;
			}
			float x = value.X * value.X + value.Y * value.Y;
			float num2 = 1f / MathF.Sqrt(x);
			return new Vector2(value.X * num2, value.Y * num2);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static Vector2 Reflect(Vector2 vector, Vector2 normal)
		{
			if (Vector.IsHardwareAccelerated)
			{
				float num = Dot(vector, normal);
				return vector - 2f * num * normal;
			}
			float num2 = vector.X * normal.X + vector.Y * normal.Y;
			return new Vector2(vector.X - 2f * num2 * normal.X, vector.Y - 2f * num2 * normal.Y);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static Vector2 Clamp(Vector2 value1, Vector2 min, Vector2 max)
		{
			float x = value1.X;
			x = ((x > max.X) ? max.X : x);
			x = ((x < min.X) ? min.X : x);
			float y = value1.Y;
			y = ((y > max.Y) ? max.Y : y);
			y = ((y < min.Y) ? min.Y : y);
			return new Vector2(x, y);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static Vector2 Lerp(Vector2 value1, Vector2 value2, float amount)
		{
			return new Vector2(value1.X + (value2.X - value1.X) * amount, value1.Y + (value2.Y - value1.Y) * amount);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static Vector2 Transform(Vector2 position, Matrix3x2 matrix)
		{
			return new Vector2(position.X * matrix.M11 + position.Y * matrix.M21 + matrix.M31, position.X * matrix.M12 + position.Y * matrix.M22 + matrix.M32);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static Vector2 Transform(Vector2 position, Matrix4x4 matrix)
		{
			return new Vector2(position.X * matrix.M11 + position.Y * matrix.M21 + matrix.M41, position.X * matrix.M12 + position.Y * matrix.M22 + matrix.M42);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static Vector2 TransformNormal(Vector2 normal, Matrix3x2 matrix)
		{
			return new Vector2(normal.X * matrix.M11 + normal.Y * matrix.M21, normal.X * matrix.M12 + normal.Y * matrix.M22);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static Vector2 TransformNormal(Vector2 normal, Matrix4x4 matrix)
		{
			return new Vector2(normal.X * matrix.M11 + normal.Y * matrix.M21, normal.X * matrix.M12 + normal.Y * matrix.M22);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static Vector2 Transform(Vector2 value, Quaternion rotation)
		{
			float num = rotation.X + rotation.X;
			float num2 = rotation.Y + rotation.Y;
			float num3 = rotation.Z + rotation.Z;
			float num4 = rotation.W * num3;
			float num5 = rotation.X * num;
			float num6 = rotation.X * num2;
			float num7 = rotation.Y * num2;
			float num8 = rotation.Z * num3;
			return new Vector2(value.X * (1f - num7 - num8) + value.Y * (num6 - num4), value.X * (num6 + num4) + value.Y * (1f - num5 - num8));
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static Vector2 Add(Vector2 left, Vector2 right)
		{
			return left + right;
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static Vector2 Subtract(Vector2 left, Vector2 right)
		{
			return left - right;
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static Vector2 Multiply(Vector2 left, Vector2 right)
		{
			return left * right;
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static Vector2 Multiply(Vector2 left, float right)
		{
			return left * right;
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static Vector2 Multiply(float left, Vector2 right)
		{
			return left * right;
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static Vector2 Divide(Vector2 left, Vector2 right)
		{
			return left / right;
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static Vector2 Divide(Vector2 left, float divisor)
		{
			return left / divisor;
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static Vector2 Negate(Vector2 value)
		{
			return -value;
		}

		[JitIntrinsic]
		public Vector2(float value)
			: this(value, value)
		{
		}

		[JitIntrinsic]
		public Vector2(float x, float y)
		{
			X = x;
			Y = y;
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public void CopyTo(float[] array)
		{
			CopyTo(array, 0);
		}

		public void CopyTo(float[] array, int index)
		{
			if (array == null)
			{
				throw new NullReferenceException("The method was called with a null array argument.");
			}
			if (index < 0 || index >= array.Length)
			{
				throw new ArgumentOutOfRangeException("index", SR.Format("Index was out of bounds:", index));
			}
			if (array.Length - index < 2)
			{
				throw new ArgumentException(SR.Format("Number of elements in source vector is greater than the destination array", index));
			}
			array[index] = X;
			array[index + 1] = Y;
		}

		[JitIntrinsic]
		public bool Equals(Vector2 other)
		{
			if (X == other.X)
			{
				return Y == other.Y;
			}
			return false;
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		[JitIntrinsic]
		public static float Dot(Vector2 value1, Vector2 value2)
		{
			return value1.X * value2.X + value1.Y * value2.Y;
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		[JitIntrinsic]
		public static Vector2 Min(Vector2 value1, Vector2 value2)
		{
			return new Vector2((value1.X < value2.X) ? value1.X : value2.X, (value1.Y < value2.Y) ? value1.Y : value2.Y);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		[JitIntrinsic]
		public static Vector2 Max(Vector2 value1, Vector2 value2)
		{
			return new Vector2((value1.X > value2.X) ? value1.X : value2.X, (value1.Y > value2.Y) ? value1.Y : value2.Y);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		[JitIntrinsic]
		public static Vector2 Abs(Vector2 value)
		{
			return new Vector2(MathF.Abs(value.X), MathF.Abs(value.Y));
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		[JitIntrinsic]
		public static Vector2 SquareRoot(Vector2 value)
		{
			return new Vector2(MathF.Sqrt(value.X), MathF.Sqrt(value.Y));
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		[JitIntrinsic]
		public static Vector2 operator +(Vector2 left, Vector2 right)
		{
			return new Vector2(left.X + right.X, left.Y + right.Y);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		[JitIntrinsic]
		public static Vector2 operator -(Vector2 left, Vector2 right)
		{
			return new Vector2(left.X - right.X, left.Y - right.Y);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		[JitIntrinsic]
		public static Vector2 operator *(Vector2 left, Vector2 right)
		{
			return new Vector2(left.X * right.X, left.Y * right.Y);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		[JitIntrinsic]
		public static Vector2 operator *(float left, Vector2 right)
		{
			return new Vector2(left, left) * right;
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		[JitIntrinsic]
		public static Vector2 operator *(Vector2 left, float right)
		{
			return left * new Vector2(right, right);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		[JitIntrinsic]
		public static Vector2 operator /(Vector2 left, Vector2 right)
		{
			return new Vector2(left.X / right.X, left.Y / right.Y);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		[JitIntrinsic]
		public static Vector2 operator /(Vector2 value1, float value2)
		{
			float num = 1f / value2;
			return new Vector2(value1.X * num, value1.Y * num);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static Vector2 operator -(Vector2 value)
		{
			return Zero - value;
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static bool operator ==(Vector2 left, Vector2 right)
		{
			return left.Equals(right);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static bool operator !=(Vector2 left, Vector2 right)
		{
			return !(left == right);
		}
	}
	public struct Vector3 : IEquatable<Vector3>, IFormattable
	{
		public float X;

		public float Y;

		public float Z;

		public static Vector3 Zero => default(Vector3);

		public static Vector3 One => new Vector3(1f, 1f, 1f);

		public static Vector3 UnitX => new Vector3(1f, 0f, 0f);

		public static Vector3 UnitY => new Vector3(0f, 1f, 0f);

		public static Vector3 UnitZ => new Vector3(0f, 0f, 1f);

		public override int GetHashCode()
		{
			return HashHelpers.Combine(HashHelpers.Combine(X.GetHashCode(), Y.GetHashCode()), Z.GetHashCode());
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public override bool Equals(object obj)
		{
			if (!(obj is Vector3))
			{
				return false;
			}
			return Equals((Vector3)obj);
		}

		public override string ToString()
		{
			return ToString("G", CultureInfo.CurrentCulture);
		}

		public string ToString(string format)
		{
			return ToString(format, CultureInfo.CurrentCulture);
		}

		public string ToString(string format, IFormatProvider formatProvider)
		{
			StringBuilder stringBuilder = new StringBuilder();
			string numberGroupSeparator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator;
			stringBuilder.Append('<');
			stringBuilder.Append(((IFormattable)X).ToString(format, formatProvider));
			stringBuilder.Append(numberGroupSeparator);
			stringBuilder.Append(' ');
			stringBuilder.Append(((IFormattable)Y).ToString(format, formatProvider));
			stringBuilder.Append(numberGroupSeparator);
			stringBuilder.Append(' ');
			stringBuilder.Append(((IFormattable)Z).ToString(format, formatProvider));
			stringBuilder.Append('>');
			return stringBuilder.ToString();
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public float Length()
		{
			if (Vector.IsHardwareAccelerated)
			{
				return MathF.Sqrt(Dot(this, this));
			}
			return MathF.Sqrt(X * X + Y * Y + Z * Z);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public float LengthSquared()
		{
			if (Vector.IsHardwareAccelerated)
			{
				return Dot(this, this);
			}
			return X * X + Y * Y + Z * Z;
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static float Distance(Vector3 value1, Vector3 value2)
		{
			if (Vector.IsHardwareAccelerated)
			{
				Vector3 vector = value1 - value2;
				return MathF.Sqrt(Dot(vector, vector));
			}
			float num = value1.X - value2.X;
			float num2 = value1.Y - value2.Y;
			float num3 = value1.Z - value2.Z;
			return MathF.Sqrt(num * num + num2 * num2 + num3 * num3);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static float DistanceSquared(Vector3 value1, Vector3 value2)
		{
			if (Vector.IsHardwareAccelerated)
			{
				Vector3 vector = value1 - value2;
				return Dot(vector, vector);
			}
			float num = value1.X - value2.X;
			float num2 = value1.Y - value2.Y;
			float num3 = value1.Z - value2.Z;
			return num * num + num2 * num2 + num3 * num3;
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static Vector3 Normalize(Vector3 value)
		{
			if (Vector.IsHardwareAccelerated)
			{
				float num = value.Length();
				return value / num;
			}
			float num2 = MathF.Sqrt(value.X * value.X + value.Y * value.Y + value.Z * value.Z);
			return new Vector3(value.X / num2, value.Y / num2, value.Z / num2);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static Vector3 Cross(Vector3 vector1, Vector3 vector2)
		{
			return new Vector3(vector1.Y * vector2.Z - vector1.Z * vector2.Y, vector1.Z * vector2.X - vector1.X * vector2.Z, vector1.X * vector2.Y - vector1.Y * vector2.X);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public static Vector3 Reflect(Vector3 vector, Vector3 normal)
		{
			if (Vector.IsHardwareAccelerated)
			{
				float num = Dot(vector, normal);
				Vector3 vector2 = normal * num * 2f;
				return vector - vector2;
			}
			float num2 = vector.X * normal.X + vector.Y * normal.Y + vector.Z * normal.Z;
			float num3 = normal.X * num2 * 2f;
			float num4 = normal.Y * num2 * 2f;
			float num5 = normal.Z * num2 * 2f;
			return new Vector3(vector.X - num3, vector.Y - num4, vector.Z 

Room Architect Tool_Data/Managed/System.Runtime.Serialization.dll

Decompiled 3 months ago
using System;
using System.CodeDom;
using System.CodeDom.Compiler;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Configuration;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Resources;
using System.Runtime;
using System.Runtime.CompilerServices;
using System.Runtime.Diagnostics;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Configuration;
using System.Runtime.Serialization.Diagnostics;
using System.Runtime.Serialization.Diagnostics.Application;
using System.Runtime.Serialization.Formatters;
using System.Runtime.Serialization.Json;
using System.Security;
using System.Security.Permissions;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;
using System.Xml.XPath;
using Unity;

[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("System.Runtime.Serialization.dll")]
[assembly: AssemblyDescription("System.Runtime.Serialization.dll")]
[assembly: AssemblyDefaultAlias("System.Runtime.Serialization.dll")]
[assembly: AssemblyCompany("Mono development team")]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright("(c) Various Mono authors")]
[assembly: CompilationRelaxations(8)]
[assembly: SatelliteContractVersion("4.0.0.0")]
[assembly: AssemblyFileVersion("4.6.57.0")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: CLSCompliant(true)]
[assembly: AssemblyDelaySign(true)]
[assembly: AssemblyKeyFile("../ecma.pub")]
[assembly: AllowPartiallyTrustedCallers]
[assembly: ComCompatibleVersion(1, 0, 3300, 0)]
[assembly: SecurityCritical(SecurityCriticalScope.Explicit)]
[assembly: AssemblyInformationalVersion("4.6.57.0")]
[assembly: ComVisible(false)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("4.0.0.0")]
[module: UnverifiableCode]
internal static class SR
{
	internal static string GetString(string name, params object[] args)
	{
		return GetString(CultureInfo.InvariantCulture, name, args);
	}

	internal static string GetString(CultureInfo culture, string name, params object[] args)
	{
		return string.Format(culture, name, args);
	}

	internal static string GetString(string name)
	{
		return name;
	}

	internal static string GetString(CultureInfo culture, string name)
	{
		return name;
	}

	internal static string Format(string resourceFormat, params object[] args)
	{
		if (args != null)
		{
			return string.Format(CultureInfo.InvariantCulture, resourceFormat, args);
		}
		return resourceFormat;
	}

	internal static string Format(string resourceFormat, object p1)
	{
		return string.Format(CultureInfo.InvariantCulture, resourceFormat, p1);
	}

	internal static string Format(string resourceFormat, object p1, object p2)
	{
		return string.Format(CultureInfo.InvariantCulture, resourceFormat, p1, p2);
	}

	internal static string Format(string resourceFormat, object p1, object p2, object p3)
	{
		return string.Format(CultureInfo.InvariantCulture, resourceFormat, p1, p2, p3);
	}
}
namespace System
{
	internal static class LocalAppContextSwitches
	{
		public static readonly bool DoNotUseTimeZoneInfo;

		public static readonly bool DoNotUseEcmaScriptV6EscapeControlCharacter;
	}
}
namespace System.Xml
{
	internal abstract class ArrayHelper<TArgument, TArray>
	{
		public TArray[] ReadArray(XmlDictionaryReader reader, TArgument localName, TArgument namespaceUri, int maxArrayLength)
		{
			TArray[][] array = null;
			TArray[] array2 = null;
			int num = 0;
			int num2 = 0;
			if (reader.TryGetArrayLength(out var count))
			{
				if (count > maxArrayLength)
				{
					XmlExceptionHelper.ThrowMaxArrayLengthOrMaxItemsQuotaExceeded(reader, maxArrayLength);
				}
				if (count > 65535)
				{
					count = 65535;
				}
			}
			else
			{
				count = 32;
			}
			while (true)
			{
				array2 = new TArray[count];
				int i;
				int num3;
				for (i = 0; i < array2.Length; i += num3)
				{
					num3 = ReadArray(reader, localName, namespaceUri, array2, i, array2.Length - i);
					if (num3 == 0)
					{
						break;
					}
				}
				if (num2 > maxArrayLength - i)
				{
					XmlExceptionHelper.ThrowMaxArrayLengthOrMaxItemsQuotaExceeded(reader, maxArrayLength);
				}
				num2 += i;
				if (i < array2.Length || reader.NodeType == XmlNodeType.EndElement)
				{
					break;
				}
				if (array == null)
				{
					array = new TArray[32][];
				}
				array[num++] = array2;
				count *= 2;
			}
			if (num2 != array2.Length || num > 0)
			{
				TArray[] array3 = new TArray[num2];
				int num4 = 0;
				for (int j = 0; j < num; j++)
				{
					Array.Copy(array[j], 0, array3, num4, array[j].Length);
					num4 += array[j].Length;
				}
				Array.Copy(array2, 0, array3, num4, num2 - num4);
				array2 = array3;
			}
			return array2;
		}

		public void WriteArray(XmlDictionaryWriter writer, string prefix, TArgument localName, TArgument namespaceUri, XmlDictionaryReader reader)
		{
			int count = ((!reader.TryGetArrayLength(out count)) ? 256 : Math.Min(count, 256));
			TArray[] array = new TArray[count];
			while (true)
			{
				int num = ReadArray(reader, localName, namespaceUri, array, 0, array.Length);
				if (num != 0)
				{
					WriteArray(writer, prefix, localName, namespaceUri, array, 0, num);
					continue;
				}
				break;
			}
		}

		protected abstract int ReadArray(XmlDictionaryReader reader, TArgument localName, TArgument namespaceUri, TArray[] array, int offset, int count);

		protected abstract void WriteArray(XmlDictionaryWriter writer, string prefix, TArgument localName, TArgument namespaceUri, TArray[] array, int offset, int count);
	}
	internal class BooleanArrayHelperWithString : ArrayHelper<string, bool>
	{
		public static readonly BooleanArrayHelperWithString Instance = new BooleanArrayHelperWithString();

		protected override int ReadArray(XmlDictionaryReader reader, string localName, string namespaceUri, bool[] array, int offset, int count)
		{
			return reader.ReadArray(localName, namespaceUri, array, offset, count);
		}

		protected override void WriteArray(XmlDictionaryWriter writer, string prefix, string localName, string namespaceUri, bool[] array, int offset, int count)
		{
			writer.WriteArray(prefix, localName, namespaceUri, array, offset, count);
		}
	}
	internal class BooleanArrayHelperWithDictionaryString : ArrayHelper<XmlDictionaryString, bool>
	{
		public static readonly BooleanArrayHelperWithDictionaryString Instance = new BooleanArrayHelperWithDictionaryString();

		protected override int ReadArray(XmlDictionaryReader reader, XmlDictionaryString localName, XmlDictionaryString namespaceUri, bool[] array, int offset, int count)
		{
			return reader.ReadArray(localName, namespaceUri, array, offset, count);
		}

		protected override void WriteArray(XmlDictionaryWriter writer, string prefix, XmlDictionaryString localName, XmlDictionaryString namespaceUri, bool[] array, int offset, int count)
		{
			writer.WriteArray(prefix, localName, namespaceUri, array, offset, count);
		}
	}
	internal class Int16ArrayHelperWithString : ArrayHelper<string, short>
	{
		public static readonly Int16ArrayHelperWithString Instance = new Int16ArrayHelperWithString();

		protected override int ReadArray(XmlDictionaryReader reader, string localName, string namespaceUri, short[] array, int offset, int count)
		{
			return reader.ReadArray(localName, namespaceUri, array, offset, count);
		}

		protected override void WriteArray(XmlDictionaryWriter writer, string prefix, string localName, string namespaceUri, short[] array, int offset, int count)
		{
			writer.WriteArray(prefix, localName, namespaceUri, array, offset, count);
		}
	}
	internal class Int16ArrayHelperWithDictionaryString : ArrayHelper<XmlDictionaryString, short>
	{
		public static readonly Int16ArrayHelperWithDictionaryString Instance = new Int16ArrayHelperWithDictionaryString();

		protected override int ReadArray(XmlDictionaryReader reader, XmlDictionaryString localName, XmlDictionaryString namespaceUri, short[] array, int offset, int count)
		{
			return reader.ReadArray(localName, namespaceUri, array, offset, count);
		}

		protected override void WriteArray(XmlDictionaryWriter writer, string prefix, XmlDictionaryString localName, XmlDictionaryString namespaceUri, short[] array, int offset, int count)
		{
			writer.WriteArray(prefix, localName, namespaceUri, array, offset, count);
		}
	}
	internal class Int32ArrayHelperWithString : ArrayHelper<string, int>
	{
		public static readonly Int32ArrayHelperWithString Instance = new Int32ArrayHelperWithString();

		protected override int ReadArray(XmlDictionaryReader reader, string localName, string namespaceUri, int[] array, int offset, int count)
		{
			return reader.ReadArray(localName, namespaceUri, array, offset, count);
		}

		protected override void WriteArray(XmlDictionaryWriter writer, string prefix, string localName, string namespaceUri, int[] array, int offset, int count)
		{
			writer.WriteArray(prefix, localName, namespaceUri, array, offset, count);
		}
	}
	internal class Int32ArrayHelperWithDictionaryString : ArrayHelper<XmlDictionaryString, int>
	{
		public static readonly Int32ArrayHelperWithDictionaryString Instance = new Int32ArrayHelperWithDictionaryString();

		protected override int ReadArray(XmlDictionaryReader reader, XmlDictionaryString localName, XmlDictionaryString namespaceUri, int[] array, int offset, int count)
		{
			return reader.ReadArray(localName, namespaceUri, array, offset, count);
		}

		protected override void WriteArray(XmlDictionaryWriter writer, string prefix, XmlDictionaryString localName, XmlDictionaryString namespaceUri, int[] array, int offset, int count)
		{
			writer.WriteArray(prefix, localName, namespaceUri, array, offset, count);
		}
	}
	internal class Int64ArrayHelperWithString : ArrayHelper<string, long>
	{
		public static readonly Int64ArrayHelperWithString Instance = new Int64ArrayHelperWithString();

		protected override int ReadArray(XmlDictionaryReader reader, string localName, string namespaceUri, long[] array, int offset, int count)
		{
			return reader.ReadArray(localName, namespaceUri, array, offset, count);
		}

		protected override void WriteArray(XmlDictionaryWriter writer, string prefix, string localName, string namespaceUri, long[] array, int offset, int count)
		{
			writer.WriteArray(prefix, localName, namespaceUri, array, offset, count);
		}
	}
	internal class Int64ArrayHelperWithDictionaryString : ArrayHelper<XmlDictionaryString, long>
	{
		public static readonly Int64ArrayHelperWithDictionaryString Instance = new Int64ArrayHelperWithDictionaryString();

		protected override int ReadArray(XmlDictionaryReader reader, XmlDictionaryString localName, XmlDictionaryString namespaceUri, long[] array, int offset, int count)
		{
			return reader.ReadArray(localName, namespaceUri, array, offset, count);
		}

		protected override void WriteArray(XmlDictionaryWriter writer, string prefix, XmlDictionaryString localName, XmlDictionaryString namespaceUri, long[] array, int offset, int count)
		{
			writer.WriteArray(prefix, localName, namespaceUri, array, offset, count);
		}
	}
	internal class SingleArrayHelperWithString : ArrayHelper<string, float>
	{
		public static readonly SingleArrayHelperWithString Instance = new SingleArrayHelperWithString();

		protected override int ReadArray(XmlDictionaryReader reader, string localName, string namespaceUri, float[] array, int offset, int count)
		{
			return reader.ReadArray(localName, namespaceUri, array, offset, count);
		}

		protected override void WriteArray(XmlDictionaryWriter writer, string prefix, string localName, string namespaceUri, float[] array, int offset, int count)
		{
			writer.WriteArray(prefix, localName, namespaceUri, array, offset, count);
		}
	}
	internal class SingleArrayHelperWithDictionaryString : ArrayHelper<XmlDictionaryString, float>
	{
		public static readonly SingleArrayHelperWithDictionaryString Instance = new SingleArrayHelperWithDictionaryString();

		protected override int ReadArray(XmlDictionaryReader reader, XmlDictionaryString localName, XmlDictionaryString namespaceUri, float[] array, int offset, int count)
		{
			return reader.ReadArray(localName, namespaceUri, array, offset, count);
		}

		protected override void WriteArray(XmlDictionaryWriter writer, string prefix, XmlDictionaryString localName, XmlDictionaryString namespaceUri, float[] array, int offset, int count)
		{
			writer.WriteArray(prefix, localName, namespaceUri, array, offset, count);
		}
	}
	internal class DoubleArrayHelperWithString : ArrayHelper<string, double>
	{
		public static readonly DoubleArrayHelperWithString Instance = new DoubleArrayHelperWithString();

		protected override int ReadArray(XmlDictionaryReader reader, string localName, string namespaceUri, double[] array, int offset, int count)
		{
			return reader.ReadArray(localName, namespaceUri, array, offset, count);
		}

		protected override void WriteArray(XmlDictionaryWriter writer, string prefix, string localName, string namespaceUri, double[] array, int offset, int count)
		{
			writer.WriteArray(prefix, localName, namespaceUri, array, offset, count);
		}
	}
	internal class DoubleArrayHelperWithDictionaryString : ArrayHelper<XmlDictionaryString, double>
	{
		public static readonly DoubleArrayHelperWithDictionaryString Instance = new DoubleArrayHelperWithDictionaryString();

		protected override int ReadArray(XmlDictionaryReader reader, XmlDictionaryString localName, XmlDictionaryString namespaceUri, double[] array, int offset, int count)
		{
			return reader.ReadArray(localName, namespaceUri, array, offset, count);
		}

		protected override void WriteArray(XmlDictionaryWriter writer, string prefix, XmlDictionaryString localName, XmlDictionaryString namespaceUri, double[] array, int offset, int count)
		{
			writer.WriteArray(prefix, localName, namespaceUri, array, offset, count);
		}
	}
	internal class DecimalArrayHelperWithString : ArrayHelper<string, decimal>
	{
		public static readonly DecimalArrayHelperWithString Instance = new DecimalArrayHelperWithString();

		protected override int ReadArray(XmlDictionaryReader reader, string localName, string namespaceUri, decimal[] array, int offset, int count)
		{
			return reader.ReadArray(localName, namespaceUri, array, offset, count);
		}

		protected override void WriteArray(XmlDictionaryWriter writer, string prefix, string localName, string namespaceUri, decimal[] array, int offset, int count)
		{
			writer.WriteArray(prefix, localName, namespaceUri, array, offset, count);
		}
	}
	internal class DecimalArrayHelperWithDictionaryString : ArrayHelper<XmlDictionaryString, decimal>
	{
		public static readonly DecimalArrayHelperWithDictionaryString Instance = new DecimalArrayHelperWithDictionaryString();

		protected override int ReadArray(XmlDictionaryReader reader, XmlDictionaryString localName, XmlDictionaryString namespaceUri, decimal[] array, int offset, int count)
		{
			return reader.ReadArray(localName, namespaceUri, array, offset, count);
		}

		protected override void WriteArray(XmlDictionaryWriter writer, string prefix, XmlDictionaryString localName, XmlDictionaryString namespaceUri, decimal[] array, int offset, int count)
		{
			writer.WriteArray(prefix, localName, namespaceUri, array, offset, count);
		}
	}
	internal class DateTimeArrayHelperWithString : ArrayHelper<string, DateTime>
	{
		public static readonly DateTimeArrayHelperWithString Instance = new DateTimeArrayHelperWithString();

		protected override int ReadArray(XmlDictionaryReader reader, string localName, string namespaceUri, DateTime[] array, int offset, int count)
		{
			return reader.ReadArray(localName, namespaceUri, array, offset, count);
		}

		protected override void WriteArray(XmlDictionaryWriter writer, string prefix, string localName, string namespaceUri, DateTime[] array, int offset, int count)
		{
			writer.WriteArray(prefix, localName, namespaceUri, array, offset, count);
		}
	}
	internal class DateTimeArrayHelperWithDictionaryString : ArrayHelper<XmlDictionaryString, DateTime>
	{
		public static readonly DateTimeArrayHelperWithDictionaryString Instance = new DateTimeArrayHelperWithDictionaryString();

		protected override int ReadArray(XmlDictionaryReader reader, XmlDictionaryString localName, XmlDictionaryString namespaceUri, DateTime[] array, int offset, int count)
		{
			return reader.ReadArray(localName, namespaceUri, array, offset, count);
		}

		protected override void WriteArray(XmlDictionaryWriter writer, string prefix, XmlDictionaryString localName, XmlDictionaryString namespaceUri, DateTime[] array, int offset, int count)
		{
			writer.WriteArray(prefix, localName, namespaceUri, array, offset, count);
		}
	}
	internal class GuidArrayHelperWithString : ArrayHelper<string, Guid>
	{
		public static readonly GuidArrayHelperWithString Instance = new GuidArrayHelperWithString();

		protected override int ReadArray(XmlDictionaryReader reader, string localName, string namespaceUri, Guid[] array, int offset, int count)
		{
			return reader.ReadArray(localName, namespaceUri, array, offset, count);
		}

		protected override void WriteArray(XmlDictionaryWriter writer, string prefix, string localName, string namespaceUri, Guid[] array, int offset, int count)
		{
			writer.WriteArray(prefix, localName, namespaceUri, array, offset, count);
		}
	}
	internal class GuidArrayHelperWithDictionaryString : ArrayHelper<XmlDictionaryString, Guid>
	{
		public static readonly GuidArrayHelperWithDictionaryString Instance = new GuidArrayHelperWithDictionaryString();

		protected override int ReadArray(XmlDictionaryReader reader, XmlDictionaryString localName, XmlDictionaryString namespaceUri, Guid[] array, int offset, int count)
		{
			return reader.ReadArray(localName, namespaceUri, array, offset, count);
		}

		protected override void WriteArray(XmlDictionaryWriter writer, string prefix, XmlDictionaryString localName, XmlDictionaryString namespaceUri, Guid[] array, int offset, int count)
		{
			writer.WriteArray(prefix, localName, namespaceUri, array, offset, count);
		}
	}
	internal class TimeSpanArrayHelperWithString : ArrayHelper<string, TimeSpan>
	{
		public static readonly TimeSpanArrayHelperWithString Instance = new TimeSpanArrayHelperWithString();

		protected override int ReadArray(XmlDictionaryReader reader, string localName, string namespaceUri, TimeSpan[] array, int offset, int count)
		{
			return reader.ReadArray(localName, namespaceUri, array, offset, count);
		}

		protected override void WriteArray(XmlDictionaryWriter writer, string prefix, string localName, string namespaceUri, TimeSpan[] array, int offset, int count)
		{
			writer.WriteArray(prefix, localName, namespaceUri, array, offset, count);
		}
	}
	internal class TimeSpanArrayHelperWithDictionaryString : ArrayHelper<XmlDictionaryString, TimeSpan>
	{
		public static readonly TimeSpanArrayHelperWithDictionaryString Instance = new TimeSpanArrayHelperWithDictionaryString();

		protected override int ReadArray(XmlDictionaryReader reader, XmlDictionaryString localName, XmlDictionaryString namespaceUri, TimeSpan[] array, int offset, int count)
		{
			return reader.ReadArray(localName, namespaceUri, array, offset, count);
		}

		protected override void WriteArray(XmlDictionaryWriter writer, string prefix, XmlDictionaryString localName, XmlDictionaryString namespaceUri, TimeSpan[] array, int offset, int count)
		{
			writer.WriteArray(prefix, localName, namespaceUri, array, offset, count);
		}
	}
	internal class EncodingStreamWrapper : Stream
	{
		private enum SupportedEncoding
		{
			UTF8,
			UTF16LE,
			UTF16BE,
			None
		}

		private static readonly UTF8Encoding SafeUTF8 = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: false);

		private static readonly UnicodeEncoding SafeUTF16 = new UnicodeEncoding(bigEndian: false, byteOrderMark: false, throwOnInvalidBytes: false);

		private static readonly UnicodeEncoding SafeBEUTF16 = new UnicodeEncoding(bigEndian: true, byteOrderMark: false, throwOnInvalidBytes: false);

		private static readonly UTF8Encoding ValidatingUTF8 = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);

		private static readonly UnicodeEncoding ValidatingUTF16 = new UnicodeEncoding(bigEndian: false, byteOrderMark: false, throwOnInvalidBytes: true);

		private static readonly UnicodeEncoding ValidatingBEUTF16 = new UnicodeEncoding(bigEndian: true, byteOrderMark: false, throwOnInvalidBytes: true);

		private const int BufferLength = 128;

		private static readonly byte[] encodingAttr = new byte[8] { 101, 110, 99, 111, 100, 105, 110, 103 };

		private static readonly byte[] encodingUTF8 = new byte[5] { 117, 116, 102, 45, 56 };

		private static readonly byte[] encodingUnicode = new byte[6] { 117, 116, 102, 45, 49, 54 };

		private static readonly byte[] encodingUnicodeLE = new byte[8] { 117, 116, 102, 45, 49, 54, 108, 101 };

		private static readonly byte[] encodingUnicodeBE = new byte[8] { 117, 116, 102, 45, 49, 54, 98, 101 };

		private SupportedEncoding encodingCode;

		private Encoding encoding;

		private Encoder enc;

		private Decoder dec;

		private bool isReading;

		private Stream stream;

		private char[] chars;

		private byte[] bytes;

		private int byteOffset;

		private int byteCount;

		private byte[] byteBuffer = new byte[1];

		public override bool CanRead
		{
			get
			{
				if (!isReading)
				{
					return false;
				}
				return stream.CanRead;
			}
		}

		public override bool CanSeek => false;

		public override bool CanWrite
		{
			get
			{
				if (isReading)
				{
					return false;
				}
				return stream.CanWrite;
			}
		}

		public override long Position
		{
			get
			{
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException());
			}
			set
			{
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException());
			}
		}

		public override bool CanTimeout => stream.CanTimeout;

		public override long Length => stream.Length;

		public override int ReadTimeout
		{
			get
			{
				return stream.ReadTimeout;
			}
			set
			{
				stream.ReadTimeout = value;
			}
		}

		public override int WriteTimeout
		{
			get
			{
				return stream.WriteTimeout;
			}
			set
			{
				stream.WriteTimeout = value;
			}
		}

		public EncodingStreamWrapper(Stream stream, Encoding encoding)
		{
			try
			{
				isReading = true;
				this.stream = new BufferedStream(stream);
				SupportedEncoding supportedEncoding = GetSupportedEncoding(encoding);
				SupportedEncoding supportedEncoding2 = ReadBOMEncoding(encoding == null);
				if (supportedEncoding != SupportedEncoding.None && supportedEncoding != supportedEncoding2)
				{
					ThrowExpectedEncodingMismatch(supportedEncoding, supportedEncoding2);
				}
				if (supportedEncoding2 == SupportedEncoding.UTF8)
				{
					FillBuffer(2);
					if (bytes[byteOffset + 1] == 63 && bytes[byteOffset] == 60)
					{
						FillBuffer(128);
						CheckUTF8DeclarationEncoding(bytes, byteOffset, byteCount, supportedEncoding2, supportedEncoding);
					}
					return;
				}
				EnsureBuffers();
				FillBuffer(254);
				SetReadDocumentEncoding(supportedEncoding2);
				CleanupCharBreak();
				int charCount = this.encoding.GetChars(bytes, byteOffset, byteCount, chars, 0);
				byteOffset = 0;
				byteCount = ValidatingUTF8.GetBytes(chars, 0, charCount, bytes, 0);
				if (bytes[1] == 63 && bytes[0] == 60)
				{
					CheckUTF8DeclarationEncoding(bytes, 0, byteCount, supportedEncoding2, supportedEncoding);
				}
				else if (supportedEncoding == SupportedEncoding.None)
				{
					throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(System.Runtime.Serialization.SR.GetString("An XML declaration with an encoding is required for all non-UTF8 documents.")));
				}
			}
			catch (DecoderFallbackException innerException)
			{
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(System.Runtime.Serialization.SR.GetString("Invalid byte encoding."), innerException));
			}
		}

		private void SetReadDocumentEncoding(SupportedEncoding e)
		{
			EnsureBuffers();
			encodingCode = e;
			encoding = GetEncoding(e);
		}

		private static Encoding GetEncoding(SupportedEncoding e)
		{
			return e switch
			{
				SupportedEncoding.UTF8 => ValidatingUTF8, 
				SupportedEncoding.UTF16LE => ValidatingUTF16, 
				SupportedEncoding.UTF16BE => ValidatingBEUTF16, 
				_ => throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(System.Runtime.Serialization.SR.GetString("XML encoding not supported."))), 
			};
		}

		private static Encoding GetSafeEncoding(SupportedEncoding e)
		{
			return e switch
			{
				SupportedEncoding.UTF8 => SafeUTF8, 
				SupportedEncoding.UTF16LE => SafeUTF16, 
				SupportedEncoding.UTF16BE => SafeBEUTF16, 
				_ => throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(System.Runtime.Serialization.SR.GetString("XML encoding not supported."))), 
			};
		}

		private static string GetEncodingName(SupportedEncoding enc)
		{
			return enc switch
			{
				SupportedEncoding.UTF8 => "utf-8", 
				SupportedEncoding.UTF16LE => "utf-16LE", 
				SupportedEncoding.UTF16BE => "utf-16BE", 
				_ => throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(System.Runtime.Serialization.SR.GetString("XML encoding not supported."))), 
			};
		}

		private static SupportedEncoding GetSupportedEncoding(Encoding encoding)
		{
			if (encoding == null)
			{
				return SupportedEncoding.None;
			}
			if (encoding.WebName == ValidatingUTF8.WebName)
			{
				return SupportedEncoding.UTF8;
			}
			if (encoding.WebName == ValidatingUTF16.WebName)
			{
				return SupportedEncoding.UTF16LE;
			}
			if (encoding.WebName == ValidatingBEUTF16.WebName)
			{
				return SupportedEncoding.UTF16BE;
			}
			throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(System.Runtime.Serialization.SR.GetString("XML encoding not supported.")));
		}

		public EncodingStreamWrapper(Stream stream, Encoding encoding, bool emitBOM)
		{
			isReading = false;
			this.encoding = encoding;
			this.stream = new BufferedStream(stream);
			encodingCode = GetSupportedEncoding(encoding);
			if (encodingCode == SupportedEncoding.UTF8)
			{
				return;
			}
			EnsureBuffers();
			dec = ValidatingUTF8.GetDecoder();
			enc = this.encoding.GetEncoder();
			if (emitBOM)
			{
				byte[] preamble = this.encoding.GetPreamble();
				if (preamble.Length != 0)
				{
					this.stream.Write(preamble, 0, preamble.Length);
				}
			}
		}

		private SupportedEncoding ReadBOMEncoding(bool notOutOfBand)
		{
			int num = stream.ReadByte();
			int num2 = stream.ReadByte();
			int num3 = stream.ReadByte();
			int num4 = stream.ReadByte();
			if (num4 == -1)
			{
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(System.Runtime.Serialization.SR.GetString("Unexpected end of file.")));
			}
			int preserve;
			SupportedEncoding result = ReadBOMEncoding((byte)num, (byte)num2, (byte)num3, (byte)num4, notOutOfBand, out preserve);
			EnsureByteBuffer();
			switch (preserve)
			{
			case 1:
				bytes[0] = (byte)num4;
				break;
			case 2:
				bytes[0] = (byte)num3;
				bytes[1] = (byte)num4;
				break;
			case 4:
				bytes[0] = (byte)num;
				bytes[1] = (byte)num2;
				bytes[2] = (byte)num3;
				bytes[3] = (byte)num4;
				break;
			}
			byteCount = preserve;
			return result;
		}

		private static SupportedEncoding ReadBOMEncoding(byte b1, byte b2, byte b3, byte b4, bool notOutOfBand, out int preserve)
		{
			SupportedEncoding result = SupportedEncoding.UTF8;
			preserve = 0;
			if (b1 == 60 && b2 != 0)
			{
				result = SupportedEncoding.UTF8;
				preserve = 4;
			}
			else if (b1 == byte.MaxValue && b2 == 254)
			{
				result = SupportedEncoding.UTF16LE;
				preserve = 2;
			}
			else if (b1 == 254 && b2 == byte.MaxValue)
			{
				result = SupportedEncoding.UTF16BE;
				preserve = 2;
			}
			else if (b1 == 0 && b2 == 60)
			{
				result = SupportedEncoding.UTF16BE;
				if (notOutOfBand && (b3 != 0 || b4 != 63))
				{
					throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(System.Runtime.Serialization.SR.GetString("An XML declaration is required for all non-UTF8 documents.")));
				}
				preserve = 4;
			}
			else if (b1 == 60 && b2 == 0)
			{
				result = SupportedEncoding.UTF16LE;
				if (notOutOfBand && (b3 != 63 || b4 != 0))
				{
					throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(System.Runtime.Serialization.SR.GetString("An XML declaration is required for all non-UTF8 documents.")));
				}
				preserve = 4;
			}
			else if (b1 == 239 && b2 == 187)
			{
				if (notOutOfBand && b3 != 191)
				{
					throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(System.Runtime.Serialization.SR.GetString("Unrecognized Byte Order Mark.")));
				}
				preserve = 1;
			}
			else
			{
				preserve = 4;
			}
			return result;
		}

		private void FillBuffer(int count)
		{
			count -= byteCount;
			while (count > 0)
			{
				int num = stream.Read(bytes, byteOffset + byteCount, count);
				if (num != 0)
				{
					byteCount += num;
					count -= num;
					continue;
				}
				break;
			}
		}

		private void EnsureBuffers()
		{
			EnsureByteBuffer();
			if (chars == null)
			{
				chars = new char[128];
			}
		}

		private void EnsureByteBuffer()
		{
			if (bytes == null)
			{
				bytes = new byte[512];
				byteOffset = 0;
				byteCount = 0;
			}
		}

		private static void CheckUTF8DeclarationEncoding(byte[] buffer, int offset, int count, SupportedEncoding e, SupportedEncoding expectedEnc)
		{
			byte b = 0;
			int num = -1;
			int num2 = offset + Math.Min(count, 128);
			int num3 = 0;
			int num4 = 0;
			for (num3 = offset + 2; num3 < num2; num3++)
			{
				if (b != 0)
				{
					if (buffer[num3] == b)
					{
						b = 0;
					}
				}
				else if (buffer[num3] == 39 || buffer[num3] == 34)
				{
					b = buffer[num3];
				}
				else if (buffer[num3] == 61)
				{
					if (num4 == 1)
					{
						num = num3;
						break;
					}
					num4++;
				}
				else if (buffer[num3] == 63)
				{
					break;
				}
			}
			if (num == -1)
			{
				if (e != 0 && expectedEnc == SupportedEncoding.None)
				{
					throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(System.Runtime.Serialization.SR.GetString("An XML declaration with an encoding is required for all non-UTF8 documents.")));
				}
				return;
			}
			if (num < 28)
			{
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(System.Runtime.Serialization.SR.GetString("Malformed XML declaration.")));
			}
			num3 = num - 1;
			while (IsWhitespace(buffer[num3]))
			{
				num3--;
			}
			if (!Compare(encodingAttr, buffer, num3 - encodingAttr.Length + 1))
			{
				if (e == SupportedEncoding.UTF8 || expectedEnc != SupportedEncoding.None)
				{
					return;
				}
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(System.Runtime.Serialization.SR.GetString("An XML declaration with an encoding is required for all non-UTF8 documents.")));
			}
			for (num3 = num + 1; num3 < num2 && IsWhitespace(buffer[num3]); num3++)
			{
			}
			if (buffer[num3] != 39 && buffer[num3] != 34)
			{
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(System.Runtime.Serialization.SR.GetString("Malformed XML declaration.")));
			}
			b = buffer[num3];
			int num5 = num3++;
			for (; buffer[num3] != b && num3 < num2; num3++)
			{
			}
			if (buffer[num3] != b)
			{
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(System.Runtime.Serialization.SR.GetString("Malformed XML declaration.")));
			}
			int num6 = num5 + 1;
			int num7 = num3 - num6;
			SupportedEncoding supportedEncoding = e;
			if (num7 == encodingUTF8.Length && CompareCaseInsensitive(encodingUTF8, buffer, num6))
			{
				supportedEncoding = SupportedEncoding.UTF8;
			}
			else if (num7 == encodingUnicodeLE.Length && CompareCaseInsensitive(encodingUnicodeLE, buffer, num6))
			{
				supportedEncoding = SupportedEncoding.UTF16LE;
			}
			else if (num7 == encodingUnicodeBE.Length && CompareCaseInsensitive(encodingUnicodeBE, buffer, num6))
			{
				supportedEncoding = SupportedEncoding.UTF16BE;
			}
			else if (num7 == encodingUnicode.Length && CompareCaseInsensitive(encodingUnicode, buffer, num6))
			{
				if (e == SupportedEncoding.UTF8)
				{
					ThrowEncodingMismatch(SafeUTF8.GetString(buffer, num6, num7), SafeUTF8.GetString(encodingUTF8, 0, encodingUTF8.Length));
				}
			}
			else
			{
				ThrowEncodingMismatch(SafeUTF8.GetString(buffer, num6, num7), e);
			}
			if (e != supportedEncoding)
			{
				ThrowEncodingMismatch(SafeUTF8.GetString(buffer, num6, num7), e);
			}
		}

		private static bool CompareCaseInsensitive(byte[] key, byte[] buffer, int offset)
		{
			for (int i = 0; i < key.Length; i++)
			{
				if (key[i] != buffer[offset + i] && key[i] != char.ToLower((char)buffer[offset + i], CultureInfo.InvariantCulture))
				{
					return false;
				}
			}
			return true;
		}

		private static bool Compare(byte[] key, byte[] buffer, int offset)
		{
			for (int i = 0; i < key.Length; i++)
			{
				if (key[i] != buffer[offset + i])
				{
					return false;
				}
			}
			return true;
		}

		private static bool IsWhitespace(byte ch)
		{
			if (ch != 32 && ch != 10 && ch != 9)
			{
				return ch == 13;
			}
			return true;
		}

		internal static ArraySegment<byte> ProcessBuffer(byte[] buffer, int offset, int count, Encoding encoding)
		{
			if (count < 4)
			{
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(System.Runtime.Serialization.SR.GetString("Unexpected end of file.")));
			}
			try
			{
				SupportedEncoding supportedEncoding = GetSupportedEncoding(encoding);
				int preserve;
				SupportedEncoding supportedEncoding2 = ReadBOMEncoding(buffer[offset], buffer[offset + 1], buffer[offset + 2], buffer[offset + 3], encoding == null, out preserve);
				if (supportedEncoding != SupportedEncoding.None && supportedEncoding != supportedEncoding2)
				{
					ThrowExpectedEncodingMismatch(supportedEncoding, supportedEncoding2);
				}
				offset += 4 - preserve;
				count -= 4 - preserve;
				if (supportedEncoding2 == SupportedEncoding.UTF8)
				{
					if (buffer[offset + 1] != 63 || buffer[offset] != 60)
					{
						return new ArraySegment<byte>(buffer, offset, count);
					}
					CheckUTF8DeclarationEncoding(buffer, offset, count, supportedEncoding2, supportedEncoding);
					return new ArraySegment<byte>(buffer, offset, count);
				}
				Encoding safeEncoding = GetSafeEncoding(supportedEncoding2);
				int num = Math.Min(count, 256);
				char[] array = new char[safeEncoding.GetMaxCharCount(num)];
				int charCount = safeEncoding.GetChars(buffer, offset, num, array, 0);
				byte[] array2 = new byte[ValidatingUTF8.GetMaxByteCount(charCount)];
				int count2 = ValidatingUTF8.GetBytes(array, 0, charCount, array2, 0);
				if (array2[1] == 63 && array2[0] == 60)
				{
					CheckUTF8DeclarationEncoding(array2, 0, count2, supportedEncoding2, supportedEncoding);
				}
				else if (supportedEncoding == SupportedEncoding.None)
				{
					throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(System.Runtime.Serialization.SR.GetString("An XML declaration with an encoding is required for all non-UTF8 documents.")));
				}
				return new ArraySegment<byte>(ValidatingUTF8.GetBytes(GetEncoding(supportedEncoding2).GetChars(buffer, offset, count)));
			}
			catch (DecoderFallbackException innerException)
			{
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(System.Runtime.Serialization.SR.GetString("Invalid byte encoding."), innerException));
			}
		}

		private static void ThrowExpectedEncodingMismatch(SupportedEncoding expEnc, SupportedEncoding actualEnc)
		{
			throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(System.Runtime.Serialization.SR.GetString("The expected encoding '{0}' does not match the actual encoding '{1}'.", GetEncodingName(expEnc), GetEncodingName(actualEnc))));
		}

		private static void ThrowEncodingMismatch(string declEnc, SupportedEncoding enc)
		{
			ThrowEncodingMismatch(declEnc, GetEncodingName(enc));
		}

		private static void ThrowEncodingMismatch(string declEnc, string docEnc)
		{
			throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(System.Runtime.Serialization.SR.GetString("The encoding in the declaration '{0}' does not match the encoding of the document '{1}'.", declEnc, docEnc)));
		}

		public override void Close()
		{
			Flush();
			base.Close();
			stream.Close();
		}

		public override void Flush()
		{
			stream.Flush();
		}

		public override int ReadByte()
		{
			if (byteCount == 0 && encodingCode == SupportedEncoding.UTF8)
			{
				return stream.ReadByte();
			}
			if (Read(byteBuffer, 0, 1) == 0)
			{
				return -1;
			}
			return byteBuffer[0];
		}

		public override int Read(byte[] buffer, int offset, int count)
		{
			try
			{
				if (byteCount == 0)
				{
					if (encodingCode == SupportedEncoding.UTF8)
					{
						return stream.Read(buffer, offset, count);
					}
					byteOffset = 0;
					byteCount = stream.Read(bytes, byteCount, (chars.Length - 1) * 2);
					if (byteCount == 0)
					{
						return 0;
					}
					CleanupCharBreak();
					int charCount = encoding.GetChars(bytes, 0, byteCount, chars, 0);
					byteCount = Encoding.UTF8.GetBytes(chars, 0, charCount, bytes, 0);
				}
				if (byteCount < count)
				{
					count = byteCount;
				}
				Buffer.BlockCopy(bytes, byteOffset, buffer, offset, count);
				byteOffset += count;
				byteCount -= count;
				return count;
			}
			catch (DecoderFallbackException innerException)
			{
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(System.Runtime.Serialization.SR.GetString("Invalid byte encoding."), innerException));
			}
		}

		private void CleanupCharBreak()
		{
			int num = byteOffset + byteCount;
			if (byteCount % 2 != 0)
			{
				int num2 = stream.ReadByte();
				if (num2 < 0)
				{
					throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(System.Runtime.Serialization.SR.GetString("Unexpected end of file.")));
				}
				bytes[num++] = (byte)num2;
				byteCount++;
			}
			int num3 = ((encodingCode != SupportedEncoding.UTF16LE) ? (bytes[num - 1] + (bytes[num - 2] << 8)) : (bytes[num - 2] + (bytes[num - 1] << 8)));
			if ((num3 & 0xDC00) != 56320 && num3 >= 55296 && num3 <= 56319)
			{
				int num4 = stream.ReadByte();
				int num5 = stream.ReadByte();
				if (num5 < 0)
				{
					throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(System.Runtime.Serialization.SR.GetString("Unexpected end of file.")));
				}
				bytes[num++] = (byte)num4;
				bytes[num++] = (byte)num5;
				byteCount += 2;
			}
		}

		public override long Seek(long offset, SeekOrigin origin)
		{
			throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException());
		}

		public override void WriteByte(byte b)
		{
			if (encodingCode == SupportedEncoding.UTF8)
			{
				stream.WriteByte(b);
				return;
			}
			byteBuffer[0] = b;
			Write(byteBuffer, 0, 1);
		}

		public override void Write(byte[] buffer, int offset, int count)
		{
			if (encodingCode == SupportedEncoding.UTF8)
			{
				stream.Write(buffer, offset, count);
				return;
			}
			while (count > 0)
			{
				int num = ((chars.Length < count) ? chars.Length : count);
				int charCount = dec.GetChars(buffer, offset, num, chars, 0, flush: false);
				byteCount = enc.GetBytes(chars, 0, charCount, bytes, 0, flush: false);
				stream.Write(bytes, 0, byteCount);
				offset += num;
				count -= num;
			}
		}

		public override void SetLength(long value)
		{
			throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException());
		}
	}
	public interface IFragmentCapableXmlDictionaryWriter
	{
		bool CanFragment { get; }

		void StartFragment(Stream stream, bool generateSelfContainedTextFragment);

		void EndFragment();

		void WriteFragment(byte[] buffer, int offset, int count);
	}
	public interface IStreamProvider
	{
		Stream GetStream();

		void ReleaseStream(Stream stream);
	}
	public interface IXmlDictionary
	{
		bool TryLookup(string value, out XmlDictionaryString result);

		bool TryLookup(int key, out XmlDictionaryString result);

		bool TryLookup(XmlDictionaryString value, out XmlDictionaryString result);
	}
	internal enum PrefixHandleType
	{
		Empty,
		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,
		Buffer,
		Max
	}
	internal class PrefixHandle
	{
		private XmlBufferReader bufferReader;

		private PrefixHandleType type;

		private int offset;

		private int length;

		private static string[] prefixStrings = new string[27]
		{
			"", "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"
		};

		private static byte[] prefixBuffer = new byte[26]
		{
			97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
			107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
			117, 118, 119, 120, 121, 122
		};

		public bool IsEmpty => type == PrefixHandleType.Empty;

		public bool IsXmlns
		{
			get
			{
				if (type != PrefixHandleType.Buffer)
				{
					return false;
				}
				if (length != 5)
				{
					return false;
				}
				byte[] buffer = bufferReader.Buffer;
				int num = offset;
				if (buffer[num] == 120 && buffer[num + 1] == 109 && buffer[num + 2] == 108 && buffer[num + 3] == 110)
				{
					return buffer[num + 4] == 115;
				}
				return false;
			}
		}

		public bool IsXml
		{
			get
			{
				if (type != PrefixHandleType.Buffer)
				{
					return false;
				}
				if (length != 3)
				{
					return false;
				}
				byte[] buffer = bufferReader.Buffer;
				int num = offset;
				if (buffer[num] == 120 && buffer[num + 1] == 109)
				{
					return buffer[num + 2] == 108;
				}
				return false;
			}
		}

		public PrefixHandle(XmlBufferReader bufferReader)
		{
			this.bufferReader = bufferReader;
		}

		public void SetValue(PrefixHandleType type)
		{
			this.type = type;
		}

		public void SetValue(PrefixHandle prefix)
		{
			type = prefix.type;
			offset = prefix.offset;
			length = prefix.length;
		}

		public void SetValue(int offset, int length)
		{
			switch (length)
			{
			case 0:
				SetValue(PrefixHandleType.Empty);
				return;
			case 1:
			{
				byte @byte = bufferReader.GetByte(offset);
				if (@byte >= 97 && @byte <= 122)
				{
					SetValue(GetAlphaPrefix(@byte - 97));
					return;
				}
				break;
			}
			}
			type = PrefixHandleType.Buffer;
			this.offset = offset;
			this.length = length;
		}

		public bool TryGetShortPrefix(out PrefixHandleType type)
		{
			type = this.type;
			return type != PrefixHandleType.Buffer;
		}

		public static string GetString(PrefixHandleType type)
		{
			return prefixStrings[(int)type];
		}

		public static PrefixHandleType GetAlphaPrefix(int index)
		{
			return (PrefixHandleType)(1 + index);
		}

		public static byte[] GetString(PrefixHandleType type, out int offset, out int length)
		{
			if (type == PrefixHandleType.Empty)
			{
				offset = 0;
				length = 0;
			}
			else
			{
				length = 1;
				offset = (int)(type - 1);
			}
			return prefixBuffer;
		}

		public string GetString(XmlNameTable nameTable)
		{
			PrefixHandleType prefixHandleType = type;
			if (prefixHandleType != PrefixHandleType.Buffer)
			{
				return GetString(prefixHandleType);
			}
			return bufferReader.GetString(offset, length, nameTable);
		}

		public string GetString()
		{
			PrefixHandleType prefixHandleType = type;
			if (prefixHandleType != PrefixHandleType.Buffer)
			{
				return GetString(prefixHandleType);
			}
			return bufferReader.GetString(offset, length);
		}

		public byte[] GetString(out int offset, out int length)
		{
			PrefixHandleType prefixHandleType = type;
			if (prefixHandleType != PrefixHandleType.Buffer)
			{
				return GetString(prefixHandleType, out offset, out length);
			}
			offset = this.offset;
			length = this.length;
			return bufferReader.Buffer;
		}

		public int CompareTo(PrefixHandle that)
		{
			return GetString().CompareTo(that.GetString());
		}

		private bool Equals2(PrefixHandle prefix2)
		{
			PrefixHandleType prefixHandleType = type;
			PrefixHandleType prefixHandleType2 = prefix2.type;
			if (prefixHandleType != prefixHandleType2)
			{
				return false;
			}
			if (prefixHandleType != PrefixHandleType.Buffer)
			{
				return true;
			}
			if (bufferReader == prefix2.bufferReader)
			{
				return bufferReader.Equals2(offset, length, prefix2.offset, prefix2.length);
			}
			return bufferReader.Equals2(offset, length, prefix2.bufferReader, prefix2.offset, prefix2.length);
		}

		private bool Equals2(string prefix2)
		{
			PrefixHandleType prefixHandleType = type;
			if (prefixHandleType != PrefixHandleType.Buffer)
			{
				return GetString(prefixHandleType) == prefix2;
			}
			return bufferReader.Equals2(offset, length, prefix2);
		}

		private bool Equals2(XmlDictionaryString prefix2)
		{
			return Equals2(prefix2.Value);
		}

		public static bool operator ==(PrefixHandle prefix1, string prefix2)
		{
			return prefix1.Equals2(prefix2);
		}

		public static bool operator !=(PrefixHandle prefix1, string prefix2)
		{
			return !prefix1.Equals2(prefix2);
		}

		public static bool operator ==(PrefixHandle prefix1, XmlDictionaryString prefix2)
		{
			return prefix1.Equals2(prefix2);
		}

		public static bool operator !=(PrefixHandle prefix1, XmlDictionaryString prefix2)
		{
			return !prefix1.Equals2(prefix2);
		}

		public static bool operator ==(PrefixHandle prefix1, PrefixHandle prefix2)
		{
			return prefix1.Equals2(prefix2);
		}

		public static bool operator !=(PrefixHandle prefix1, PrefixHandle prefix2)
		{
			return !prefix1.Equals2(prefix2);
		}

		public override bool Equals(object obj)
		{
			if (!(obj is PrefixHandle prefixHandle))
			{
				return false;
			}
			return this == prefixHandle;
		}

		public override string ToString()
		{
			return GetString();
		}

		public override int GetHashCode()
		{
			return GetString().GetHashCode();
		}
	}
	internal enum StringHandleConstStringType
	{
		Type,
		Root,
		Item
	}
	internal class StringHandle
	{
		private enum StringHandleType
		{
			Dictionary,
			UTF8,
			EscapedUTF8,
			ConstString
		}

		private XmlBufferReader bufferReader;

		private StringHandleType type;

		private int key;

		private int offset;

		private int length;

		private static string[] constStrings = new string[3] { "type", "root", "item" };

		public bool IsEmpty
		{
			get
			{
				if (type == StringHandleType.UTF8)
				{
					return length == 0;
				}
				return Equals2(string.Empty);
			}
		}

		public bool IsXmlns
		{
			get
			{
				if (type == StringHandleType.UTF8)
				{
					if (length != 5)
					{
						return false;
					}
					byte[] buffer = bufferReader.Buffer;
					int num = offset;
					if (buffer[num] == 120 && buffer[num + 1] == 109 && buffer[num + 2] == 108 && buffer[num + 3] == 110)
					{
						return buffer[num + 4] == 115;
					}
					return false;
				}
				return Equals2("xmlns");
			}
		}

		public StringHandle(XmlBufferReader bufferReader)
		{
			this.bufferReader = bufferReader;
			SetValue(0, 0);
		}

		public void SetValue(int offset, int length)
		{
			type = StringHandleType.UTF8;
			this.offset = offset;
			this.length = length;
		}

		public void SetConstantValue(StringHandleConstStringType constStringType)
		{
			type = StringHandleType.ConstString;
			key = (int)constStringType;
		}

		public void SetValue(int offset, int length, bool escaped)
		{
			type = ((!escaped) ? StringHandleType.UTF8 : StringHandleType.EscapedUTF8);
			this.offset = offset;
			this.length = length;
		}

		public void SetValue(int key)
		{
			type = StringHandleType.Dictionary;
			this.key = key;
		}

		public void SetValue(StringHandle value)
		{
			type = value.type;
			key = value.key;
			offset = value.offset;
			length = value.length;
		}

		public void ToPrefixHandle(PrefixHandle prefix)
		{
			prefix.SetValue(offset, length);
		}

		public string GetString(XmlNameTable nameTable)
		{
			return type switch
			{
				StringHandleType.UTF8 => bufferReader.GetString(offset, length, nameTable), 
				StringHandleType.Dictionary => nameTable.Add(bufferReader.GetDictionaryString(key).Value), 
				StringHandleType.ConstString => nameTable.Add(constStrings[key]), 
				_ => bufferReader.GetEscapedString(offset, length, nameTable), 
			};
		}

		public string GetString()
		{
			return type switch
			{
				StringHandleType.UTF8 => bufferReader.GetString(offset, length), 
				StringHandleType.Dictionary => bufferReader.GetDictionaryString(key).Value, 
				StringHandleType.ConstString => constStrings[key], 
				_ => bufferReader.GetEscapedString(offset, length), 
			};
		}

		public byte[] GetString(out int offset, out int length)
		{
			switch (type)
			{
			case StringHandleType.UTF8:
				offset = this.offset;
				length = this.length;
				return bufferReader.Buffer;
			case StringHandleType.Dictionary:
			{
				byte[] array3 = bufferReader.GetDictionaryString(key).ToUTF8();
				offset = 0;
				length = array3.Length;
				return array3;
			}
			case StringHandleType.ConstString:
			{
				byte[] array2 = XmlConverter.ToBytes(constStrings[key]);
				offset = 0;
				length = array2.Length;
				return array2;
			}
			default:
			{
				byte[] array = XmlConverter.ToBytes(bufferReader.GetEscapedString(this.offset, this.length));
				offset = 0;
				length = array.Length;
				return array;
			}
			}
		}

		public bool TryGetDictionaryString(out XmlDictionaryString value)
		{
			if (type == StringHandleType.Dictionary)
			{
				value = bufferReader.GetDictionaryString(key);
				return true;
			}
			if (IsEmpty)
			{
				value = XmlDictionaryString.Empty;
				return true;
			}
			value = null;
			return false;
		}

		public override string ToString()
		{
			return GetString();
		}

		private bool Equals2(int key2, XmlBufferReader bufferReader2)
		{
			return type switch
			{
				StringHandleType.Dictionary => bufferReader.Equals2(key, key2, bufferReader2), 
				StringHandleType.UTF8 => bufferReader.Equals2(offset, length, bufferReader2.GetDictionaryString(key2).Value), 
				_ => GetString() == bufferReader.GetDictionaryString(key2).Value, 
			};
		}

		private bool Equals2(XmlDictionaryString xmlString2)
		{
			return type switch
			{
				StringHandleType.Dictionary => bufferReader.Equals2(key, xmlString2), 
				StringHandleType.UTF8 => bufferReader.Equals2(offset, length, xmlString2.ToUTF8()), 
				_ => GetString() == xmlString2.Value, 
			};
		}

		private bool Equals2(string s2)
		{
			return type switch
			{
				StringHandleType.Dictionary => bufferReader.GetDictionaryString(key).Value == s2, 
				StringHandleType.UTF8 => bufferReader.Equals2(offset, length, s2), 
				_ => GetString() == s2, 
			};
		}

		private bool Equals2(int offset2, int length2, XmlBufferReader bufferReader2)
		{
			return type switch
			{
				StringHandleType.Dictionary => bufferReader2.Equals2(offset2, length2, bufferReader.GetDictionaryString(key).Value), 
				StringHandleType.UTF8 => bufferReader.Equals2(offset, length, bufferReader2, offset2, length2), 
				_ => GetString() == bufferReader.GetString(offset2, length2), 
			};
		}

		private bool Equals2(StringHandle s2)
		{
			return s2.type switch
			{
				StringHandleType.Dictionary => Equals2(s2.key, s2.bufferReader), 
				StringHandleType.UTF8 => Equals2(s2.offset, s2.length, s2.bufferReader), 
				_ => Equals2(s2.GetString()), 
			};
		}

		public static bool operator ==(StringHandle s1, XmlDictionaryString xmlString2)
		{
			return s1.Equals2(xmlString2);
		}

		public static bool operator !=(StringHandle s1, XmlDictionaryString xmlString2)
		{
			return !s1.Equals2(xmlString2);
		}

		public static bool operator ==(StringHandle s1, string s2)
		{
			return s1.Equals2(s2);
		}

		public static bool operator !=(StringHandle s1, string s2)
		{
			return !s1.Equals2(s2);
		}

		public static bool operator ==(StringHandle s1, StringHandle s2)
		{
			return s1.Equals2(s2);
		}

		public static bool operator !=(StringHandle s1, StringHandle s2)
		{
			return !s1.Equals2(s2);
		}

		public int CompareTo(StringHandle that)
		{
			if (type == StringHandleType.UTF8 && that.type == StringHandleType.UTF8)
			{
				return bufferReader.Compare(offset, length, that.offset, that.length);
			}
			return string.Compare(GetString(), that.GetString(), StringComparison.Ordinal);
		}

		public override bool Equals(object obj)
		{
			if (!(obj is StringHandle stringHandle))
			{
				return false;
			}
			return this == stringHandle;
		}

		public override int GetHashCode()
		{
			return GetString().GetHashCode();
		}
	}
	public class UniqueId
	{
		private long idLow;

		private long idHigh;

		[SecurityCritical]
		private string s;

		private const int guidLength = 16;

		private const int uuidLength = 45;

		private static short[] char2val = new short[256]
		{
			256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
			256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
			256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
			256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
			256, 256, 256, 256, 256, 256, 256, 256, 0, 16,
			32, 48, 64, 80, 96, 112, 128, 144, 256, 256,
			256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
			256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
			256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
			256, 256, 256, 256, 256, 256, 256, 160, 176, 192,
			208, 224, 240, 256, 256, 256, 256, 256, 256, 256,
			256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
			256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
			256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
			256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
			256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
			256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
			256, 256, 256, 256, 256, 256, 0, 1, 2, 3,
			4, 5, 6, 7, 8, 9, 256, 256, 256, 256,
			256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
			256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
			256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
			256, 256, 256, 256, 256, 10, 11, 12, 13, 14,
			15, 256, 256, 256, 256, 256, 256, 256, 256, 256,
			256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
			256, 256, 256, 256, 256, 256
		};

		private const string val2char = "0123456789abcdef";

		public int CharArrayLength
		{
			[SecuritySafeCritical]
			get
			{
				if (s != null)
				{
					return s.Length;
				}
				return 45;
			}
		}

		public bool IsGuid => (idLow | idHigh) != 0;

		public UniqueId()
			: this(Guid.NewGuid())
		{
		}

		public UniqueId(Guid guid)
			: this(guid.ToByteArray())
		{
		}

		public UniqueId(byte[] guid)
			: this(guid, 0)
		{
		}

		[SecuritySafeCritical]
		public unsafe UniqueId(byte[] guid, int offset)
		{
			if (guid == null)
			{
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("guid"));
			}
			if (offset < 0)
			{
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("offset", System.Runtime.Serialization.SR.GetString("The value of this argument must be non-negative.")));
			}
			if (offset > guid.Length)
			{
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("offset", System.Runtime.Serialization.SR.GetString("The specified offset exceeds the buffer size ({0} bytes).", guid.Length)));
			}
			if (16 > guid.Length - offset)
			{
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(System.Runtime.Serialization.SR.GetString("Array too small.  Length of available data must be at least {0}.", 16), "guid"));
			}
			fixed (byte* ptr = &guid[offset])
			{
				idLow = UnsafeGetInt64(ptr);
				idHigh = UnsafeGetInt64(ptr + 8);
			}
		}

		[SecuritySafeCritical]
		public unsafe UniqueId(string value)
		{
			if (value == null)
			{
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("value");
			}
			if (value.Length == 0)
			{
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new FormatException(System.Runtime.Serialization.SR.GetString("UniqueId cannot be zero length.")));
			}
			fixed (char* chars = value)
			{
				UnsafeParse(chars, value.Length);
			}
			s = value;
		}

		[SecuritySafeCritical]
		public unsafe UniqueId(char[] chars, int offset, int count)
		{
			if (chars == null)
			{
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("chars"));
			}
			if (offset < 0)
			{
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("offset", System.Runtime.Serialization.SR.GetString("The value of this argument must be non-negative.")));
			}
			if (offset > chars.Length)
			{
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("offset", System.Runtime.Serialization.SR.GetString("The specified offset exceeds the buffer size ({0} bytes).", chars.Length)));
			}
			if (count < 0)
			{
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("count", System.Runtime.Serialization.SR.GetString("The value of this argument must be non-negative.")));
			}
			if (count > chars.Length - offset)
			{
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("count", System.Runtime.Serialization.SR.GetString("The specified size exceeds the remaining buffer space ({0} bytes).", chars.Length - offset)));
			}
			if (count == 0)
			{
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new FormatException(System.Runtime.Serialization.SR.GetString("UniqueId cannot be zero length.")));
			}
			fixed (char* chars2 = &chars[offset])
			{
				UnsafeParse(chars2, count);
			}
			if (!IsGuid)
			{
				s = new string(chars, offset, count);
			}
		}

		[SecurityCritical]
		private unsafe int UnsafeDecode(short* char2val, char ch1, char ch2)
		{
			if ((ch1 | ch2) >= 128)
			{
				return 256;
			}
			return char2val[(int)ch1] | char2val[128 + ch2];
		}

		[SecurityCritical]
		private unsafe void UnsafeEncode(char* val2char, byte b, char* pch)
		{
			*pch = val2char[b >> 4];
			pch[1] = val2char[b & 0xF];
		}

		[SecurityCritical]
		private unsafe void UnsafeParse(char* chars, int charCount)
		{
			if (charCount != 45 || *chars != 'u' || chars[1] != 'r' || chars[2] != 'n' || chars[3] != ':' || chars[4] != 'u' || chars[5] != 'u' || chars[6] != 'i' || chars[7] != 'd' || chars[8] != ':' || chars[17] != '-' || chars[22] != '-' || chars[27] != '-' || chars[32] != '-')
			{
				return;
			}
			byte* ptr = stackalloc byte[16];
			int num = 0;
			fixed (short* ptr2 = char2val)
			{
				short* ptr3 = ptr2;
				num = UnsafeDecode(ptr3, chars[15], chars[16]);
				*ptr = (byte)num;
				int num2 = 0 | num;
				num = UnsafeDecode(ptr3, chars[13], chars[14]);
				ptr[1] = (byte)num;
				int num3 = num2 | num;
				num = UnsafeDecode(ptr3, chars[11], chars[12]);
				ptr[2] = (byte)num;
				int num4 = num3 | num;
				num = UnsafeDecode(ptr3, chars[9], chars[10]);
				ptr[3] = (byte)num;
				int num5 = num4 | num;
				num = UnsafeDecode(ptr3, chars[20], chars[21]);
				ptr[4] = (byte)num;
				int num6 = num5 | num;
				num = UnsafeDecode(ptr3, chars[18], chars[19]);
				ptr[5] = (byte)num;
				int num7 = num6 | num;
				num = UnsafeDecode(ptr3, chars[25], chars[26]);
				ptr[6] = (byte)num;
				int num8 = num7 | num;
				num = UnsafeDecode(ptr3, chars[23], chars[24]);
				ptr[7] = (byte)num;
				int num9 = num8 | num;
				num = UnsafeDecode(ptr3, chars[28], chars[29]);
				ptr[8] = (byte)num;
				int num10 = num9 | num;
				num = UnsafeDecode(ptr3, chars[30], chars[31]);
				ptr[9] = (byte)num;
				int num11 = num10 | num;
				num = UnsafeDecode(ptr3, chars[33], chars[34]);
				ptr[10] = (byte)num;
				int num12 = num11 | num;
				num = UnsafeDecode(ptr3, chars[35], chars[36]);
				ptr[11] = (byte)num;
				int num13 = num12 | num;
				num = UnsafeDecode(ptr3, chars[37], chars[38]);
				ptr[12] = (byte)num;
				int num14 = num13 | num;
				num = UnsafeDecode(ptr3, chars[39], chars[40]);
				ptr[13] = (byte)num;
				int num15 = num14 | num;
				num = UnsafeDecode(ptr3, chars[41], chars[42]);
				ptr[14] = (byte)num;
				int num16 = num15 | num;
				num = UnsafeDecode(ptr3, chars[43], chars[44]);
				ptr[15] = (byte)num;
				if ((num16 | num) >= 256)
				{
					return;
				}
				idLow = UnsafeGetInt64(ptr);
				idHigh = UnsafeGetInt64(ptr + 8);
			}
		}

		[SecuritySafeCritical]
		public unsafe int ToCharArray(char[] chars, int offset)
		{
			int charArrayLength = CharArrayLength;
			if (chars == null)
			{
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("chars"));
			}
			if (offset < 0)
			{
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("offset", System.Runtime.Serialization.SR.GetString("The value of this argument must be non-negative.")));
			}
			if (offset > chars.Length)
			{
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("offset", System.Runtime.Serialization.SR.GetString("The specified offset exceeds the buffer size ({0} bytes).", chars.Length)));
			}
			if (charArrayLength > chars.Length - offset)
			{
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("chars", System.Runtime.Serialization.SR.GetString("Array too small.  Must be able to hold at least {0}.", charArrayLength)));
			}
			if (s != null)
			{
				s.CopyTo(0, chars, offset, charArrayLength);
			}
			else
			{
				byte* ptr = stackalloc byte[16];
				UnsafeSetInt64(idLow, ptr);
				UnsafeSetInt64(idHigh, ptr + 8);
				fixed (char* ptr2 = &chars[offset])
				{
					*ptr2 = 'u';
					ptr2[1] = 'r';
					ptr2[2] = 'n';
					ptr2[3] = ':';
					ptr2[4] = 'u';
					ptr2[5] = 'u';
					ptr2[6] = 'i';
					ptr2[7] = 'd';
					ptr2[8] = ':';
					ptr2[17] = '-';
					ptr2[22] = '-';
					ptr2[27] = '-';
					ptr2[32] = '-';
					fixed (char* ptr3 = "0123456789abcdef")
					{
						char* ptr4 = ptr3;
						UnsafeEncode(ptr4, *ptr, ptr2 + 15);
						UnsafeEncode(ptr4, ptr[1], ptr2 + 13);
						UnsafeEncode(ptr4, ptr[2], ptr2 + 11);
						UnsafeEncode(ptr4, ptr[3], ptr2 + 9);
						UnsafeEncode(ptr4, ptr[4], ptr2 + 20);
						UnsafeEncode(ptr4, ptr[5], ptr2 + 18);
						UnsafeEncode(ptr4, ptr[6], ptr2 + 25);
						UnsafeEncode(ptr4, ptr[7], ptr2 + 23);
						UnsafeEncode(ptr4, ptr[8], ptr2 + 28);
						UnsafeEncode(ptr4, ptr[9], ptr2 + 30);
						UnsafeEncode(ptr4, ptr[10], ptr2 + 33);
						UnsafeEncode(ptr4, ptr[11], ptr2 + 35);
						UnsafeEncode(ptr4, ptr[12], ptr2 + 37);
						UnsafeEncode(ptr4, ptr[13], ptr2 + 39);
						UnsafeEncode(ptr4, ptr[14], ptr2 + 41);
						UnsafeEncode(ptr4, ptr[15], ptr2 + 43);
					}
				}
			}
			return charArrayLength;
		}

		public bool TryGetGuid(out Guid guid)
		{
			byte[] array = new byte[16];
			if (!TryGetGuid(array, 0))
			{
				guid = Guid.Empty;
				return false;
			}
			guid = new Guid(array);
			return true;
		}

		[SecuritySafeCritical]
		public unsafe bool TryGetGuid(byte[] buffer, int offset)
		{
			if (!IsGuid)
			{
				return false;
			}
			if (buffer == null)
			{
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("buffer"));
			}
			if (offset < 0)
			{
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("offset", System.Runtime.Serialization.SR.GetString("The value of this argument must be non-negative.")));
			}
			if (offset > buffer.Length)
			{
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("offset", System.Runtime.Serialization.SR.GetString("The specified offset exceeds the buffer size ({0} bytes).", buffer.Length)));
			}
			if (16 > buffer.Length - offset)
			{
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("buffer", System.Runtime.Serialization.SR.GetString("Array too small.  Must be able to hold at least {0}.", 16)));
			}
			fixed (byte* ptr = &buffer[offset])
			{
				UnsafeSetInt64(idLow, ptr);
				UnsafeSetInt64(idHigh, ptr + 8);
			}
			return true;
		}

		[SecuritySafeCritical]
		public override string ToString()
		{
			if (s == null)
			{
				int charArrayLength = CharArrayLength;
				char[] array = new char[charArrayLength];
				ToCharArray(array, 0);
				s = new string(array, 0, charArrayLength);
			}
			return s;
		}

		public static bool operator ==(UniqueId id1, UniqueId id2)
		{
			if ((object)id1 == null && (object)id2 == null)
			{
				return true;
			}
			if ((object)id1 == null || (object)id2 == null)
			{
				return false;
			}
			if (id1.IsGuid && id2.IsGuid)
			{
				if (id1.idLow == id2.idLow)
				{
					return id1.idHigh == id2.idHigh;
				}
				return false;
			}
			return id1.ToString() == id2.ToString();
		}

		public static bool operator !=(UniqueId id1, UniqueId id2)
		{
			return !(id1 == id2);
		}

		public override bool Equals(object obj)
		{
			return this == obj as UniqueId;
		}

		public override int GetHashCode()
		{
			if (IsGuid)
			{
				long num = idLow ^ idHigh;
				return (int)(num >> 32) ^ (int)num;
			}
			return ToString().GetHashCode();
		}

		[SecurityCritical]
		private unsafe long UnsafeGetInt64(byte* pb)
		{
			int num = UnsafeGetInt32(pb);
			return ((long)UnsafeGetInt32(pb + 4) << 32) | (uint)num;
		}

		[SecurityCritical]
		private unsafe int UnsafeGetInt32(byte* pb)
		{
			return (((((pb[3] << 8) | pb[2]) << 8) | pb[1]) << 8) | *pb;
		}

		[SecurityCritical]
		private unsafe void UnsafeSetInt64(long value, byte* pb)
		{
			UnsafeSetInt32((int)value, pb);
			UnsafeSetInt32((int)(value >> 32), pb + 4);
		}

		[SecurityCritical]
		private unsafe void UnsafeSetInt32(int value, byte* pb)
		{
			*pb = (byte)value;
			value >>= 8;
			pb[1] = (byte)value;
			value >>= 8;
			pb[2] = (byte)value;
			value >>= 8;
			pb[3] = (byte)value;
		}
	}
	internal enum ValueHandleConstStringType
	{
		String,
		Number,
		Array,
		Object,
		Boolean,
		Null
	}
	internal static class ValueHandleLength
	{
		public const int Int8 = 1;

		public const int Int16 = 2;

		public const int Int32 = 4;

		public const int Int64 = 8;

		public const int UInt64 = 8;

		public const int Single = 4;

		public const int Double = 8;

		public const int Decimal = 16;

		public const int DateTime = 8;

		public const int TimeSpan = 8;

		public const int Guid = 16;

		public const int UniqueId = 16;
	}
	internal enum ValueHandleType
	{
		Empty,
		True,
		False,
		Zero,
		One,
		Int8,
		Int16,
		Int32,
		Int64,
		UInt64,
		Single,
		Double,
		Decimal,
		DateTime,
		TimeSpan,
		Guid,
		UniqueId,
		UTF8,
		EscapedUTF8,
		Base64,
		Dictionary,
		List,
		Char,
		Unicode,
		QName,
		ConstString
	}
	internal class ValueHandle
	{
		private XmlBufferReader bufferReader;

		private ValueHandleType type;

		private int offset;

		private int length;

		private static Base64Encoding base64Encoding;

		private static string[] constStrings = new string[6] { "string", "number", "array", "object", "boolean", "null" };

		private static Base64Encoding Base64Encoding
		{
			get
			{
				if (base64Encoding == null)
				{
					base64Encoding = new Base64Encoding();
				}
				return base64Encoding;
			}
		}

		public ValueHandle(XmlBufferReader bufferReader)
		{
			this.bufferReader = bufferReader;
			type = ValueHandleType.Empty;
		}

		public void SetConstantValue(ValueHandleConstStringType constStringType)
		{
			type = ValueHandleType.ConstString;
			offset = (int)constStringType;
		}

		public void SetValue(ValueHandleType type)
		{
			this.type = type;
		}

		public void SetDictionaryValue(int key)
		{
			SetValue(ValueHandleType.Dictionary, key, 0);
		}

		public void SetCharValue(int ch)
		{
			SetValue(ValueHandleType.Char, ch, 0);
		}

		public void SetQNameValue(int prefix, int key)
		{
			SetValue(ValueHandleType.QName, key, prefix);
		}

		public void SetValue(ValueHandleType type, int offset, int length)
		{
			this.type = type;
			this.offset = offset;
			this.length = length;
		}

		public bool IsWhitespace()
		{
			switch (type)
			{
			case ValueHandleType.UTF8:
				return bufferReader.IsWhitespaceUTF8(offset, length);
			case ValueHandleType.Dictionary:
				return bufferReader.IsWhitespaceKey(offset);
			case ValueHandleType.Char:
			{
				int @char = GetChar();
				if (@char > 65535)
				{
					return false;
				}
				return XmlConverter.IsWhitespace((char)@char);
			}
			case ValueHandleType.EscapedUTF8:
				return bufferReader.IsWhitespaceUTF8(offset, length);
			case ValueHandleType.Unicode:
				return bufferReader.IsWhitespaceUnicode(offset, length);
			case ValueHandleType.True:
			case ValueHandleType.False:
			case ValueHandleType.Zero:
			case ValueHandleType.One:
				return false;
			case ValueHandleType.ConstString:
				return constStrings[offset].Length == 0;
			default:
				return length == 0;
			}
		}

		public Type ToType()
		{
			switch (type)
			{
			case ValueHandleType.True:
			case ValueHandleType.False:
				return typeof(bool);
			case ValueHandleType.Zero:
			case ValueHandleType.One:
			case ValueHandleType.Int8:
			case ValueHandleType.Int16:
			case ValueHandleType.Int32:
				return typeof(int);
			case ValueHandleType.Int64:
				return typeof(long);
			case ValueHandleType.UInt64:
				return typeof(ulong);
			case ValueHandleType.Single:
				return typeof(float);
			case ValueHandleType.Double:
				return typeof(double);
			case ValueHandleType.Decimal:
				return typeof(decimal);
			case ValueHandleType.DateTime:
				return typeof(DateTime);
			case ValueHandleType.Empty:
			case ValueHandleType.UTF8:
			case ValueHandleType.EscapedUTF8:
			case ValueHandleType.Dictionary:
			case ValueHandleType.Char:
			case ValueHandleType.Unicode:
			case ValueHandleType.QName:
			case ValueHandleType.ConstString:
				return typeof(string);
			case ValueHandleType.Base64:
				return typeof(byte[]);
			case ValueHandleType.List:
				return typeof(object[]);
			case ValueHandleType.UniqueId:
				return typeof(UniqueId);
			case ValueHandleType.Guid:
				return typeof(Guid);
			case ValueHandleType.TimeSpan:
				return typeof(TimeSpan);
			default:
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException());
			}
		}

		public bool ToBoolean()
		{
			switch (type)
			{
			case ValueHandleType.False:
				return false;
			case ValueHandleType.True:
				return true;
			case ValueHandleType.UTF8:
				return XmlConverter.ToBoolean(bufferReader.Buffer, offset, length);
			case ValueHandleType.Int8:
				switch (GetInt8())
				{
				case 0:
					return false;
				case 1:
					return true;
				}
				break;
			}
			return XmlConverter.ToBoolean(GetString());
		}

		public int ToInt()
		{
			ValueHandleType valueHandleType = type;
			switch (valueHandleType)
			{
			case ValueHandleType.Zero:
				return 0;
			case ValueHandleType.One:
				return 1;
			case ValueHandleType.Int8:
				return GetInt8();
			case ValueHandleType.Int16:
				return GetInt16();
			case ValueHandleType.Int32:
				return GetInt32();
			case ValueHandleType.Int64:
			{
				long @int = GetInt64();
				if (@int >= int.MinValue && @int <= int.MaxValue)
				{
					return (int)@int;
				}
				break;
			}
			}
			if (valueHandleType == ValueHandleType.UInt64)
			{
				ulong uInt = GetUInt64();
				if (uInt <= int.MaxValue)
				{
					return (int)uInt;
				}
			}
			if (valueHandleType == ValueHandleType.UTF8)
			{
				return XmlConverter.ToInt32(bufferReader.Buffer, offset, length);
			}
			return XmlConverter.ToInt32(GetString());
		}

		public long ToLong()
		{
			ValueHandleType valueHandleType = type;
			switch (valueHandleType)
			{
			case ValueHandleType.Zero:
				return 0L;
			case ValueHandleType.One:
				return 1L;
			case ValueHandleType.Int8:
				return GetInt8();
			case ValueHandleType.Int16:
				return GetInt16();
			case ValueHandleType.Int32:
				return GetInt32();
			case ValueHandleType.Int64:
				return GetInt64();
			case ValueHandleType.UInt64:
			{
				ulong uInt = GetUInt64();
				if (uInt <= long.MaxValue)
				{
					return (long)uInt;
				}
				break;
			}
			}
			if (valueHandleType == ValueHandleType.UTF8)
			{
				return XmlConverter.ToInt64(bufferReader.Buffer, offset, length);
			}
			return XmlConverter.ToInt64(GetString());
		}

		public ulong ToULong()
		{
			ValueHandleType valueHandleType = type;
			switch (valueHandleType)
			{
			case ValueHandleType.Zero:
				return 0uL;
			case ValueHandleType.One:
				return 1uL;
			case ValueHandleType.Int8:
			case ValueHandleType.Int16:
			case ValueHandleType.Int32:
			case ValueHandleType.Int64:
			{
				long num = ToLong();
				if (num >= 0)
				{
					return (ulong)num;
				}
				break;
			}
			}
			return valueHandleType switch
			{
				ValueHandleType.UInt64 => GetUInt64(), 
				ValueHandleType.UTF8 => XmlConverter.ToUInt64(bufferReader.Buffer, offset, length), 
				_ => XmlConverter.ToUInt64(GetString()), 
			};
		}

		public float ToSingle()
		{
			ValueHandleType valueHandleType = type;
			switch (valueHandleType)
			{
			case ValueHandleType.Single:
				return GetSingle();
			case ValueHandleType.Double:
			{
				double @double = GetDouble();
				if ((@double >= -3.4028234663852886E+38 && @double <= 3.4028234663852886E+38) || double.IsInfinity(@double) || double.IsNaN(@double))
				{
					return (float)@double;
				}
				break;
			}
			}
			return valueHandleType switch
			{
				ValueHandleType.Zero => 0f, 
				ValueHandleType.One => 1f, 
				ValueHandleType.Int8 => GetInt8(), 
				ValueHandleType.Int16 => GetInt16(), 
				ValueHandleType.UTF8 => XmlConverter.ToSingle(bufferReader.Buffer, offset, length), 
				_ => XmlConverter.ToSingle(GetString()), 
			};
		}

		public double ToDouble()
		{
			return type switch
			{
				ValueHandleType.Double => GetDouble(), 
				ValueHandleType.Single => GetSingle(), 
				ValueHandleType.Zero => 0.0, 
				ValueHandleType.One => 1.0, 
				ValueHandleType.Int8 => GetInt8(), 
				ValueHandleType.Int16 => GetInt16(), 
				ValueHandleType.Int32 => GetInt32(), 
				ValueHandleType.UTF8 => XmlConverter.ToDouble(bufferReader.Buffer, offset, length), 
				_ => XmlConverter.ToDouble(GetString()), 
			};
		}

		public decimal ToDecimal()
		{
			ValueHandleType valueHandleType = type;
			switch (valueHandleType)
			{
			case ValueHandleType.Decimal:
				return GetDecimal();
			case ValueHandleType.Zero:
				return 0m;
			case ValueHandleType.One:
				return 1m;
			case ValueHandleType.Int8:
			case ValueHandleType.Int16:
			case ValueHandleType.Int32:
			case ValueHandleType.Int64:
				return ToLong();
			default:
				return valueHandleType switch
				{
					ValueHandleType.UInt64 => GetUInt64(), 
					ValueHandleType.UTF8 => XmlConverter.ToDecimal(bufferReader.Buffer, offset, length), 
					_ => XmlConverter.ToDecimal(GetString()), 
				};
			}
		}

		public DateTime ToDateTime()
		{
			if (type == ValueHandleType.DateTime)
			{
				return XmlConverter.ToDateTime(GetInt64());
			}
			if (type == ValueHandleType.UTF8)
			{
				return XmlConverter.ToDateTime(bufferReader.Buffer, offset, length);
			}
			return XmlConverter.ToDateTime(GetString());
		}

		public UniqueId ToUniqueId()
		{
			if (type == ValueHandleType.UniqueId)
			{
				return GetUniqueId();
			}
			if (type == ValueHandleType.UTF8)
			{
				return XmlConverter.ToUniqueId(bufferReader.Buffer, offset, length);
			}
			return XmlConverter.ToUniqueId(GetString());
		}

		public TimeSpan ToTimeSpan()
		{
			if (type == ValueHandleType.TimeSpan)
			{
				return new TimeSpan(GetInt64());
			}
			if (type == ValueHandleType.UTF8)
			{
				return XmlConverter.ToTimeSpan(bufferReader.Buffer, offset, length);
			}
			return XmlConverter.ToTimeSpan(GetString());
		}

		public Guid ToGuid()
		{
			if (type == ValueHandleType.Guid)
			{
				return GetGuid();
			}
			if (type == ValueHandleType.UTF8)
			{
				return XmlConverter.ToGuid(bufferReader.Buffer, offset, length);
			}
			return XmlConverter.ToGuid(GetString());
		}

		public override string ToString()
		{
			return GetString();
		}

		public byte[] ToByteArray()
		{
			if (type == ValueHandleType.Base64)
			{
				byte[] array = new byte[length];
				GetBase64(array, 0, length);
				return array;
			}
			if (type == ValueHandleType.UTF8 && length % 4 == 0)
			{
				try
				{
					int num = length / 4 * 3;
					if (length > 0 && bufferReader.Buffer[offset + length - 1] == 61)
					{
						num--;
						if (bufferReader.Buffer[offset + length - 2] == 61)
						{
							num--;
						}
					}
					byte[] array2 = new byte[num];
					int bytes = Base64Encoding.GetBytes(bufferReader.Buffer, offset, length, array2, 0);
					if (bytes != array2.Length)
					{
						byte[] array3 = new byte[bytes];
						Buffer.BlockCopy(array2, 0, array3, 0, bytes);
						array2 = array3;
					}
					return array2;
				}
				catch (FormatException)
				{
				}
			}
			try
			{
				return Base64Encoding.GetBytes(XmlConverter.StripWhitespace(GetString()));
			}
			catch (FormatException ex2)
			{
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(ex2.Message, ex2.InnerException));
			}
		}

		public string GetString()
		{
			ValueHandleType valueHandleType = type;
			if (valueHandleType == ValueHandleType.UTF8)
			{
				return GetCharsText();
			}
			switch (valueHandleType)
			{
			case ValueHandleType.False:
				return "false";
			case ValueHandleType.True:
				return "true";
			case ValueHandleType.Zero:
				return "0";
			case ValueHandleType.One:
				return "1";
			case ValueHandleType.Int8:
			case ValueHandleType.Int16:
			case ValueHandleType.Int32:
				return XmlConverter.ToString(ToInt());
			case ValueHandleType.Int64:
				return XmlConverter.ToString(GetInt64());
			case ValueHandleType.UInt64:
				return XmlConverter.ToString(GetUInt64());
			case ValueHandleType.Single:
				return XmlConverter.ToString(GetSingle());
			case ValueHandleType.Double:
				return XmlConverter.ToString(GetDouble());
			case ValueHandleType.Decimal:
				return XmlConverter.ToString(GetDecimal());
			case ValueHandleType.DateTime:
				return XmlConverter.ToString(ToDateTime());
			case ValueHandleType.Empty:
				return string.Empty;
			case ValueHandleType.UTF8:
				return GetCharsText();
			case ValueHandleType.Unicode:
				return GetUnicodeCharsText();
			case ValueHandleType.EscapedUTF8:
				return GetEscapedCharsText();
			case ValueHandleType.Char:
				return GetCharText();
			case ValueHandleType.Dictionary:
				return GetDictionaryString().Value;
			case ValueHandleType.Base64:
				return Base64Encoding.GetString(ToByteArray());
			case ValueHandleType.List:
				return XmlConverter.ToString(ToList());
			case ValueHandleType.UniqueId:
				return XmlConverter.ToString(ToUniqueId());
			case ValueHandleType.Guid:
				return XmlConverter.ToString(ToGuid());
			case ValueHandleType.TimeSpan:
				return XmlConverter.ToString(ToTimeSpan());
			case ValueHandleType.QName:
				return GetQNameDictionaryText();
			case ValueHandleType.ConstString:
				return constStrings[offset];
			default:
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException());
			}
		}

		public bool Equals2(string str, bool checkLower)
		{
			if (type != ValueHandleType.UTF8)
			{
				return GetString() == str;
			}
			if (length != str.Length)
			{
				return false;
			}
			byte[] buffer = bufferReader.Buffer;
			for (int i = 0; i < length; i++)
			{
				byte b = buffer[i + offset];
				if (b != str[i] && (!checkLower || char.ToLowerInvariant((char)b) != str[i]))
				{
					return false;
				}
			}
			return true;
		}

		public void Sign(XmlSigningNodeWriter writer)
		{
			switch (type)
			{
			case ValueHandleType.Int8:
			case ValueHandleType.Int16:
			case ValueHandleType.Int32:
				writer.WriteInt32Text(ToInt());
				break;
			case ValueHandleType.Int64:
				writer.WriteInt64Text(GetInt64());
				break;
			case ValueHandleType.UInt64:
				writer.WriteUInt64Text(GetUInt64());
				break;
			case ValueHandleType.Single:
				writer.WriteFloatText(GetSingle());
				break;
			case ValueHandleType.Double:
				writer.WriteDoubleText(GetDouble());
				break;
			case ValueHandleType.Decimal:
				writer.WriteDecimalText(GetDecimal());
				break;
			case ValueHandleType.DateTime:
				writer.WriteDateTimeText(ToDateTime());
				break;
			case ValueHandleType.UTF8:
				writer.WriteEscapedText(bufferReader.Buffer, offset, length);
				break;
			case ValueHandleType.Base64:
				writer.WriteBase64Text(bufferReader.Buffer, 0, bufferReader.Buffer, offset, length);
				break;
			case ValueHandleType.UniqueId:
				writer.WriteUniqueIdText(ToUniqueId());
				break;
			case ValueHandleType.Guid:
				writer.WriteGuidText(ToGuid());
				break;
			case ValueHandleType.TimeSpan:
				writer.WriteTimeSpanText(ToTimeSpan());
				break;
			default:
				writer.WriteEscapedText(GetString());
				break;
			case ValueHandleType.Empty:
				break;
			}
		}

		public object[] ToList()
		{
			return bufferReader.GetList(offset, length);
		}

		public object ToObject()
		{
			switch (type)
			{
			case ValueHandleType.True:
			case ValueHandleType.False:
				return ToBoolean();
			case ValueHandleType.Zero:
			case ValueHandleType.One:
			case ValueHandleType.Int8:
			case ValueHandleType.Int16:
			case ValueHandleType.Int32:
				return ToInt();
			case ValueHandleType.Int64:
				return ToLong();
			case ValueHandleType.UInt64:
				return GetUInt64();
			case ValueHandleType.Single:
				return ToSingle();
			case ValueHandleType.Double:
				return ToDouble();
			case ValueHandleType.Decimal:
				return ToDecimal();
			case ValueHandleType.DateTime:
				return ToDateTime();
			case ValueHandleType.Empty:
			case ValueHandleType.UTF8:
			case ValueHandleType.EscapedUTF8:
			case ValueHandleType.Dictionary:
			case ValueHandleType.Char:
			case ValueHandleType.Unicode:
			case ValueHandleType.ConstString:
				return ToString();
			case ValueHandleType.Base64:
				return ToByteArray();
			case ValueHandleType.List:
				return ToList();
			case ValueHandleType.UniqueId:
				return ToUniqueId();
			case ValueHandleType.Guid:
				return ToGuid();
			case ValueHandleType.TimeSpan:
				return ToTimeSpan();
			default:
				throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException());
			}
		}

		public bool TryReadBase64(byte[] buffer, int offset, int count, out int actual)
		{
			if (type == ValueHandleType.Base64)
			{
				actual = Math.Min(length, count);
				GetBase64(buffer, offset, actual);
				this.offset += actual;
				length -= actual;
				return true;
			}
			if (type == ValueHandleType.UTF8 && count >= 3 && length % 4 == 0)
			{
				try
				{
					int num = Math.Min(count / 3 * 4, length);
					actual = Base64Encoding.GetBytes(bufferReader.Buffer, this.offset, num, buffer, offset);
					this.offset += num;
					length -= num;
					return true;
				}
				catch (FormatException)
				{
				}
			}
			actual = 0;
			return false;
		}

		public bool TryReadChars(char[] chars, int offset, int count, out int actual)
		{
			if (type == ValueHandleType.Unicode)
			{
				return TryReadUnicodeChars(chars, offset, count, out actual);
			}
			if (type != ValueHandleType.UTF8)
			{
				actual = 0;
				return false;
			}
			int num = offset;
			int num2 = count;
			byte[] buffer = bufferReader.Buffer;
			int num3 = this.offset;
			int num4 = length;
			bool flag = false;
			while (true)
			{
				if (num2 > 0 && num4 > 0)
				{
					byte b = buffer[num3];
					if (b < 128)
					{
						chars[num] = (char)b;
						num3++;
						num4--;
						num++;
						num2--;
						continue;
					}
				}
				if (num2 == 0 || num4 == 0 || flag)
				{
					break;
				}
				UTF8Encoding uTF8Encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
				int chars2;
				int num5;
				try
				{
					if (num2 >= uTF8Encoding.GetMaxCharCount(num4) || num2 >= uTF8Encoding.GetCharCount(buffer, num3, num4))
					{
						chars2 = uTF8Encoding.GetChars(buffer, num3, num4, chars, num);
						num5 = num4;
					}
					else
					{
						Decoder decoder = uTF8Encoding.GetDecoder();
						num5 = Math.Min(num2, num4);
						chars2 = decoder.GetChars(buffer, num3, num5, chars, num);
						while (chars2 == 0)
						{
							if (num5 >= 3 && num2 < 2)
							{
								flag = true;
								break;
							}
							chars2 = decoder.GetChars(buffer, num3 + num5, 1, chars, num);
							num5++;
						}
						num5 = uTF8Encoding.GetByteCount(chars, num, chars2);
					}
				}
				catch (FormatException exception)
				{
					throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlExceptionHelper.CreateEncodingException(buffer, num3, num4, exception));
				}
				num3 += num5;
				num4 -= num5;
				num += chars2;
				num2 -= chars2;
			}
			this.offset = num3;
			length = num4;
			actual = count - num2;
			return true;
		}

		private bool TryReadUnicodeChars(char[] chars, int offset, int count, out int actual)
		{
			int num = Math.Min(count, length / 2);
			for (int i = 0; i < num; i++)
			{
				chars[offset + i] = (char)bufferReader.GetInt16(this.offset + i * 2);
			}
			this.offset += num * 2;
			length -= num * 2;
			actual = num;
			return true;
		}

		public bool TryGetDictionaryString(out XmlDictionaryString value)
		{
			if (type == ValueHandleType.Dictionary)
			{
				value = GetDictionaryString();
				return true;
			}
			value = null;
			return false;
		}

		public bool TryGetByteArrayLength(out int length)
		{
			if (type == ValueHandleType.Base64)
			{
				length = this.length;
				return true;
			}
			length = 0;
			return false;
		}

		private string GetCharsText()
		{
			if (length == 1 && bufferReader.GetByte(offset) == 49)
			{
				return "1";
			}
			return bufferReader.GetString(offset, length);
		}

		private string GetUnicodeCharsText()
		{
			return bufferReader.GetUnicodeString(offset, length);
		}

		private string GetEscapedCharsText()
		{
			return bufferReader.GetEscapedString(offset, length);
		}

		private string GetCharText()
		{
			int @char = GetChar();
			if (@char > 65535)
			{
				SurrogateChar surrogateChar = new SurrogateChar(@char);
				return new string(new char[2] { surrogateChar.HighChar, surrogateChar.LowChar }, 0, 2);
			}
			return ((char)@char).ToString();
		}

		private int GetChar()
		{
			return offset;
		}

		private int GetInt8()
		{
			return bufferReader.GetInt8(offset);
		}

		private int GetInt16()
		{
			return bufferReader.GetInt16(offset);
		}

		private int GetInt32()
		{
			return bufferReader.GetInt32(offset);
		}

		private long GetInt64()
		{
			return bufferReader.GetInt64(offset);
		}

		private ulong GetUInt64()
		{
			return bufferReader.GetUInt64(offset);
		}

		private float GetSingle()
		{
			return bufferReader.GetSingle(offset);
		}

		private double GetDouble()
		{
			return bufferReader.GetDouble(offset);
		}

		private decimal GetDecimal()
		{
			return bufferReader.GetDecimal(offset);
		}

		private UniqueId GetUniqueId()
		{
			return bufferReader.GetUniqueId(offset);
		}

		private Guid GetGuid()
		{
			return bufferReader.GetGuid(offset);
		}

		private void GetBase64(byte[] buffer, int offset, int count)
		{
			bufferReader.GetBase64(this.offset, buffer, offset, count);
		}

		private XmlDictionaryString GetDictionaryString()
		{
			return bufferReader.GetDictionaryString(offset);
		}

		private string GetQNameDictionaryText()
		{
			return PrefixHandle.GetString(PrefixHandle.GetAlphaPrefix(length)) + ":" + bufferReader.GetDictionaryString(offset);
		}
	}
	internal abstract class XmlBaseReader : XmlDictionaryReader
	{
		protected enum QNameType
		{
			Normal,
			Xmlns
		}

		protected class XmlNode
		{
			protected enum XmlNodeFlags
			{
				None = 0,
				CanGetAttribute = 1,
				CanMoveToElement = 2,
				HasValue = 4,
				AtomicValue = 8,
				SkipValue = 0x10,
				HasContent = 0x20
			}

			private XmlNodeType nodeType;

			private PrefixHandle prefix;

			private StringHandle localName;

			private ValueHandle value;

			private Namespace ns;

			private bool hasValue;

			private bool canGetAttribute;

			private bool canMoveToElement;

			private ReadState readState;

			private XmlAttributeTextNode attributeTextNode;

			private bool exitScope;

			private int depthDelta;

			private bool isAtomicValue;

			private bool skipValue;

			private QNameType qnameType;

			private bool hasContent;

			private bool isEmptyElement;

			private char quoteChar;

			public bool HasValue => hasValue;

			public ReadState ReadState => readState;

			public StringHandle LocalName => localName;

			public PrefixHandle Prefix => prefix;

			public bool CanGetAttribute => canGetAttribute;

			public bool CanMoveToElement => canMoveToElement;

			public XmlAttributeTextNode AttributeText => attributeTextNode;

			public bool SkipValue => skipValue;

			public ValueHandle Value => value;

			public int DepthDelta => depthDelta;

			public bool HasContent => hasContent;

			public XmlNodeType NodeType
			{
				get
				{
					return nodeType;
				}
				set
				{
					nodeType = value;
				}
			}

			public QNameType QNameType
			{
				get
				{
					return qnameType;
				}
				set
				{
					qnameType = value;
				}
			}

			public Namespace Namespace
			{
				get
				{
					return ns;
				}
				set
				{
					ns = value;
				}
			}

			public bool IsAtomicValue
			{
				get
				{
					return isAtomicValue;
				}
				set
				{
					isAtomicValue = value;
				}
			}

			public bool ExitScope
			{
				get
				{
					return exitScope;
				}
				set
				{
					exitScope = value;
				}
			}

			public bool IsEmptyElement
			{
				get
				{
					return isEmptyElement;
				}
				set
				{
					isEmptyElement = value;
				}
			}

			public char QuoteChar
			{
				get
				{
					return quoteChar;
				}
				set
				{
					quoteChar = value;
				}
			}

			public string ValueAsString
			{
				get
				{
					if (qnameType == QNameType.Normal)
					{
						return Value.GetString();
					}
					return Namespace.Uri.GetString();
				}
			}

			protected XmlNode(XmlNodeType nodeType, PrefixHandle prefix, StringHandle localName, ValueHandle value, XmlNodeFlags nodeFlags, ReadState readState, XmlAttributeTextNode attributeTextNode, int depthDelta)
			{
				this.nodeType = nodeType;
				this.prefix = prefix;
				this.localName = localName;
				this.value = value;
				ns = NamespaceManager.EmptyNamespace;
				hasValue = (nodeFlags & XmlNodeFlags.HasValue) != 0;
				canGetAttribute = (nodeFlags & XmlNodeFlags.CanGetAttribute) != 0;
				canMoveToElement = (nodeFlags & XmlNodeFlags.CanMoveToElement) != 0;
				isAtomicValue = (nodeFlags & XmlNodeFlags.AtomicValue) != 0;
				skipValue = (nodeFlags & XmlNodeFlags.SkipValue) != 0;
				hasContent = (nodeFlags & XmlNodeFlags.HasContent) != 0;
				this.readState = readState;
				this.attributeTextNode = attributeTextNode;
				exitScope = nodeType == XmlNodeType.EndElement;
				this.depthDelta = depthDelta;
				isEmptyElement = false;
				quoteChar = '"';
				qnameType = QNameType.Normal;
			}

			public bool IsLocalName(string localName)
			{
				if (qnameType == QNameType.Normal)
				{
					return LocalName == localName;
				}
				return Namespace.Prefix == localName;
			}

			public bool IsLocalName(XmlDictionaryString localName)
			{
				if (qnameType == QNameType.Normal)
				{
					return LocalName == localName;
				}
				return Namespace.Prefix == localName;
			}

			public bool IsNamespaceUri(string ns)
			{
				if (qnameType == QNameType.Normal)
				{
					return Namespace.IsUri(ns);
				}
				return ns == "http://www.w3.org/2000/xmlns/";
			}

			public bool IsNamespaceUri(XmlDictionaryString ns)
			{
				if (qnameType == QNameType.Normal)
				{
					return Namespace.IsUri(ns);
				}
				return ns.Value == "http://www.w3.org/2000/xmlns/";
			}

			public bool IsLocalNameAndNamespaceUri(string localName, string ns)
			{
				if (qnameType == QNameType.Normal)
				{
					if (LocalName == localName)
					{
						return Namespace.IsUri(ns);
					}
					return false;
				}
				if (Namespace.Prefix == localName)
				{
					return ns == "http://www.w3.org/2000/xmlns/";
				}
				return false;
			}

			public bool IsLocalNameAndNamespaceUri(XmlDictionaryString localName, XmlDictionaryString ns)
			{
				if (qnameType == QNameType.Normal)
				{
					if (LocalName == localName)
					{
						return Namespace.IsUri(ns);
					}
					return false;
				}
				if (Namespace.Prefix == localName)
				{
					return ns.Value == "http://www.w3.org/2000/xmlns/";
				}
				return false;
			}

			public bool IsPrefixAndLocalName(string prefix, string localName)
			{
				if (qnameType == QNameType.Normal)
				{
					if (Prefix == prefix)
					{
						return LocalName == localName;
					}
					return false;
				}
				if (prefix == "xmlns")
				{
					return Namespace.Prefix == localName;
				}
				return false;
			}

			public bool TryGetLocalNameAsDictionaryString(out XmlDictionaryString localName)
			{
				if (qnameType == QNameType.Normal)
				{
					return LocalName.TryGetDictionaryString(out localName);
				}
				localName = null;
				return false;
			}

			public bool TryGetNamespaceUriAsDictionaryString(out XmlDictionaryString ns)
			{
				if (qnameType == QNameType.Normal)
				{
					return Namespace.Uri.TryGetDictionaryString(out ns);
				}
				ns = null;
				return false;
			}

			public bool TryGetValueAsDictionaryString(out XmlDictionaryString value)
			{
				if (qnameType == QNameType.Normal)
				{
					return Value.TryGetDictionaryString(out value);
				}
				value = null;
				return false;
			}
		}

		protected class XmlElementNode : XmlNode
		{
			private XmlEndElementNode endElementNode;

			private int bufferOffset;

			public int NameOffset;

			public int NameLength;

			public XmlEndElementNode EndElement => endElementNode;

			public int BufferOffset
			{
				get
				{
					return bufferOffset;
				}
				set
				{
					bufferOffset = value;
				}
			}

			public XmlElementNode(XmlBufferReader bufferReader)
				: this(new PrefixHandle(bufferReader), new StringHandle(bufferReader), new ValueHandle(bufferReader))
			{
			}

			private XmlElementNode(PrefixHandle prefix, StringHandle localName, ValueHandle value)
				: base(XmlNodeType.Element, prefix, localName, value, (XmlNodeFlags)33, ReadState.Interactive, null, -1)
			{
				endElementNode = new XmlEndElementNode(prefix, localName, value);
			}
		}

		protected class XmlAttributeNode : XmlNode
		{
			public XmlAttributeNode(XmlBufferReader bufferReader)
				: this(new PrefixHandle(bufferReader), new StringHandle(bufferReader), new ValueHandle(bufferReader))
			{
			}

			private XmlAttributeNode(PrefixHandle prefix, StringHandle localName, ValueHandle value)
				: base(XmlNodeType.Attribute, prefix, localName, value, (XmlNodeFlags)15, ReadState.Interactive, new XmlAttributeTextNode(prefix, localName, value), 0)
			{
			}
		}

		protected class XmlEndElementNode : XmlNode
		{
			public XmlEndElementNode(PrefixHandle prefix, StringHandle localName, ValueHandle value)
				: base(XmlNodeType.EndElement, prefix, localName, value, XmlNodeFlags.HasContent, ReadState.Interactive, null, -1)
			{
			}
		}

		protected class XmlTextNode : XmlNode
		{
			protected XmlTextNode(XmlNodeType nodeType, PrefixHandle prefix, StringHandle localName, ValueHandle value, XmlNodeFlags nodeFlags, ReadState readState, XmlAttributeTextNode attributeTextNode, int depthDelta)
				: base(nodeType, prefix, localName, value, nodeFlags, readState, attributeTextNode, depthDelta)
			{
			}
		}

		protected class XmlAtomicTextNode : XmlTextNode
		{
			public XmlAtomicTextNode(XmlBufferReader bufferReader)
				: base(XmlNodeType.Text, new PrefixHandle(bufferReader), new StringHandle(bufferReader), new ValueHandle(bufferReader), (XmlNodeFlags)60, ReadState.Interactive, null, 0)
			{
			}
		}

		protected class XmlComplexTextNode : XmlTextNode
		{
			public XmlComplexTextNode(XmlBufferReader bufferReader)
				: base(XmlNodeType.Text, new PrefixHandle(bufferReader), new StringHandle(bufferReader), new ValueHandle(bufferReader), (XmlNodeFlags)36, ReadState.Interactive, null, 0)
			{
			}
		}

		protected class XmlWhitespaceTextNode : XmlTextNode
		{
			public XmlWhitespaceTextNode(XmlBufferReader bufferReader)
				: base(XmlNodeType.Whitespace, new PrefixHandle(bufferReader), new StringHandle(bufferReader), new ValueHandle(bufferReader), XmlNodeFlags.HasValue, ReadState.Interactive, null, 0)
			{
			}
		}

		protected class XmlCDataNode : XmlTextNode
		{
			public XmlCDataNode(XmlBufferReader bufferReader)
				: base(XmlNodeType.CDATA, new PrefixHandle(bufferReader), new StringHandle(bufferReader), new ValueHandle(bufferReader), (XmlNodeFlags)36, ReadState.Interactive, null, 0)
			{
			}
		}

		protected class XmlAttributeTextNode : XmlTextNode
		{
			public XmlAttributeTextNode(PrefixHandle prefix, StringHandle localName, ValueHandle value)
				: base(XmlNodeType.Text, prefix, localName, value, (XmlNodeFlags)47, ReadState.Interactive, null, 1)
			{
			}
		}

		protected class XmlInitialNode : XmlNode
		{
			public XmlInitialNode(XmlBufferReader bufferReader)
				: base(XmlNodeType.None, new PrefixHandle(bufferReader), new StringHandle(bufferReader), new ValueHandle(bufferReader), XmlNodeFlags.None, ReadState.Initial, null, 0)
			{
			}
		}

		protected class XmlDeclarationNode : XmlNode
		{
			public XmlDeclarationNode(XmlBufferReader bufferReader)
				: base(XmlNodeType.XmlDeclaration, new PrefixHandle(bufferReader), new StringHandle(bufferReader), new ValueHandle(bufferReader), XmlNodeFlags.CanGetAttribute, ReadState.Interactive, null, 0)
			{
			}
		}

		protected class XmlCommentNode : XmlNode
		{
			public XmlCommentNode(XmlBufferReader bufferReader)
				: base(XmlNodeType.Comment, new PrefixHandle(bufferReader), new StringHandle(bufferReader), new ValueHandle(bufferReader), XmlNodeFlags.HasValue, ReadState.Interactive, null, 0)
			{
			}
		}

		protected class XmlEndOfFileNode : XmlNode
		{
			public XmlEndOfFileNode(XmlBufferReader bufferReader)
				: base(XmlNodeType.None, new PrefixHandle(bufferReader), new StringHandle(bufferReader), new ValueHandle(bufferReader), XmlNodeFlags.None, ReadState.EndOfFile, null, 0)
			{
			}
		}

		protected class XmlClosedNode : XmlNode
		{
			public XmlClosedNode(XmlBufferReader bufferReader)
				: base(XmlNodeType.None, new PrefixHandle(bufferReader), new StringHandle(bufferReader), new ValueHandle(bufferReader), XmlNodeFlags.None, ReadState.Closed, null, 0)
			{
			}
		}

		private class AttributeSorter : IComparer
		{
			private object[] indeces;

			private XmlAttributeNode[] attributeNodes;

			private int attributeCount;

			private int attributeIndex1;

			private int attributeIndex2;

			public bool Sort(XmlAttributeNode[] attributeNodes, int attributeCount)
			{
				attributeIndex1 = -1;
				attributeIndex2 = -1;
				this.attributeNodes = attributeNodes;
				this.attributeCount = attributeCount;
				bool result = Sort();
				this.attributeNodes = null;
				this.attributeCount = 0;
				return result;
			}

			public void GetIndeces(out int attributeIndex1, out int attributeIndex2)
			{
				attributeIndex1 = this.attributeIndex1;
				attributeIndex2 = this.attributeIndex2;
			}

			public void Close()
			{
				if (indeces != null && indeces.Length > 32)
				{
					indeces = null;
				}
			}

			private bool Sort()
			{
				if (indeces != null && indeces.Length == attributeCount && IsSorted())
				{
					return true;
				}
				object[] array = new object[attributeCount];
				for (int i = 0; i < array.Length; i++)
				{
					array[i] = i;
				}
				indeces = array;
				Array.Sort(indeces, 0, attributeCount, this);
				return IsSorted();
			}

			private bool IsSorted()
			{
				for (int i = 0; i < indeces.Length - 1; i++)
				{
					if (Compare(indeces[i], indeces[i + 1]) >= 0)
					{
						attributeIndex1 = (int)indeces[i];
						attributeIndex2 = (int)indeces[i + 1];
						return false;
					}
				}
				return true;
			}

			public int Compare(object obj1, object obj2)
			{
				int num = (int)obj1;
				int num2 = (int)obj2;
				XmlAttributeNode xmlAttributeNode = attributeNodes[num];
				XmlAttributeNode xmlAttributeNode2 = attributeNodes[num2];
				int num3 = CompareQNameType(xmlAttributeNode.QNameType, xmlAttributeNode2.QNameType);
				if (num3 == 0)
				{
					if (xmlAttributeNode.QNameType == QNameType.Normal)
					{
						num3 = xmlAttributeNode.LocalName.CompareTo(xmlAttributeNode2.LocalName);
						if (num3 == 0)
						{
							num3 = xmlAttributeNode.Namespace.Uri.CompareTo(xmlAttributeNode2.Namespace.Uri);
						}
					}
					else
					{
						num3 = xmlAttributeNode.Namespace.Prefix.CompareTo(xmlAttributeNode2.Namespace.Prefix);
					}
				}
				return num3;
			}

			public int CompareQNameType(QNameType type1, QNameType type2)
			{
				return type1 - type2;
			}
		}

		private class NamespaceManager
		{
			private class XmlAttribute
			{
				private XmlSpace space;

				private string lang;

				private int depth;

				public int Depth
				{
					get
					{
						return depth;
					}
					set
					{
						depth = value;
					}
				}

				public string XmlLang
				{
					get
					{
						return lang;
					}
					set
					{
						lang = value;
					}
				}

				public XmlSpace XmlSpace
				{
					get
					{
						return space;
					}
					set
					{
						space = value;
					}
				}
			}

			private XmlBufferReader bufferReader;

			private Namespace[] namespaces;

			private int nsCount;

			private int depth;

			private Namespace[] shortPrefixUri;

			private static Namespace emptyNamespace = new Namespace(XmlBufferReader.Empty);

			priva

Room Architect Tool_Data/Managed/System.Runtime.Serialization.Formatters.Soap.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Messaging;
using System.Runtime.Remoting.Metadata;
using System.Runtime.Remoting.Metadata.W3cXsd2001;
using System.Text;
using System.Threading;
using System.Xml;

[assembly: AssemblyDefaultAlias("System.Runtime.Serialization.Formatters.Soap.dll")]
[assembly: AssemblyFileVersion("4.6.57.0")]
[assembly: AssemblyDelaySign(true)]
[assembly: CLSCompliant(true)]
[assembly: ComCompatibleVersion(1, 0, 3300, 0)]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: SatelliteContractVersion("4.0.0.0")]
[assembly: AssemblyInformationalVersion("4.6.57.0")]
[assembly: AssemblyCopyright("(c) Various Mono authors")]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: AssemblyCompany("Mono development team")]
[assembly: ComVisible(true)]
[assembly: CompilationRelaxations(CompilationRelaxations.NoStringInterning)]
[assembly: AssemblyTitle("System.Runtime.Serialization.Formatters.Soap.dll")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: AssemblyDescription("System.Runtime.Serialization.Formatters.Soap.dll")]
[assembly: AssemblyVersion("4.0.0.0")]
internal static class Consts
{
	public const string MonoVersion = "5.11.0.0";

	public const string MonoCompany = "Mono development team";

	public const string MonoProduct = "Mono Common Language Infrastructure";

	public const string MonoCopyright = "(c) Various Mono authors";

	public const int MonoCorlibVersion = 1051100001;

	public const string FxVersion = "4.0.0.0";

	public const string FxFileVersion = "4.6.57.0";

	public const string EnvironmentVersion = "4.0.30319.42000";

	public const string VsVersion = "0.0.0.0";

	public const string VsFileVersion = "11.0.0.0";

	private const string PublicKeyToken = "b77a5c561934e089";

	public const string AssemblyI18N = "I18N, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMicrosoft_JScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMono_Http = "Mono.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Posix = "Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Security = "Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Messaging_RabbitMQ = "Mono.Messaging.RabbitMQ, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyCorlib = "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Data = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Design = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing_Design = "System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Messaging = "System.Messaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Security = "System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Web = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Core = "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string WindowsBase_3_0 = "WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
internal sealed class Locale
{
	private Locale()
	{
	}

	public static string GetText(string msg)
	{
		return msg;
	}

	public static string GetText(string fmt, params object[] args)
	{
		return string.Format(fmt, args);
	}
}
namespace System
{
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoTODOAttribute : Attribute
	{
		private string comment;

		public string Comment => comment;

		public MonoTODOAttribute()
		{
		}

		public MonoTODOAttribute(string comment)
		{
			this.comment = comment;
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoDocumentationNoteAttribute : MonoTODOAttribute
	{
		public MonoDocumentationNoteAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoExtensionAttribute : MonoTODOAttribute
	{
		public MonoExtensionAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoInternalNoteAttribute : MonoTODOAttribute
	{
		public MonoInternalNoteAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoLimitationAttribute : MonoTODOAttribute
	{
		public MonoLimitationAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoNotSupportedAttribute : MonoTODOAttribute
	{
		public MonoNotSupportedAttribute(string comment)
			: base(comment)
		{
		}
	}
}
namespace System.Runtime.Serialization.Formatters.Soap
{
	internal enum RemMessageType
	{
		MethodCall,
		MethodResponse,
		ServerFault,
		NotRecognize
	}
	public sealed class SoapFormatter : IRemotingFormatter, IFormatter
	{
		private SerializationBinder _binder;

		private StreamingContext _context;

		private ISurrogateSelector _selector;

		private FormatterAssemblyStyle _assemblyFormat = FormatterAssemblyStyle.Full;

		private FormatterTypeStyle _typeFormat;

		private ISoapMessage _topObject;

		private TypeFilterLevel _filterLevel = TypeFilterLevel.Low;

		public ISurrogateSelector SurrogateSelector
		{
			get
			{
				return _selector;
			}
			set
			{
				_selector = value;
			}
		}

		public SerializationBinder Binder
		{
			get
			{
				return _binder;
			}
			set
			{
				_binder = value;
			}
		}

		public StreamingContext Context
		{
			get
			{
				return _context;
			}
			set
			{
				_context = value;
			}
		}

		public ISoapMessage TopObject
		{
			get
			{
				return _topObject;
			}
			set
			{
				_topObject = value;
			}
		}

		[MonoTODO("Interpret this")]
		public TypeFilterLevel FilterLevel
		{
			get
			{
				return _filterLevel;
			}
			set
			{
				_filterLevel = value;
			}
		}

		public FormatterAssemblyStyle AssemblyFormat
		{
			get
			{
				return _assemblyFormat;
			}
			set
			{
				_assemblyFormat = value;
			}
		}

		public FormatterTypeStyle TypeFormat
		{
			get
			{
				return _typeFormat;
			}
			set
			{
				_typeFormat = value;
			}
		}

		public SoapFormatter()
		{
			_selector = null;
			_context = new StreamingContext(StreamingContextStates.All);
		}

		public SoapFormatter(ISurrogateSelector selector, StreamingContext context)
		{
			_selector = selector;
			_context = context;
		}

		public object Deserialize(Stream serializationStream)
		{
			return Deserialize(serializationStream, null);
		}

		public object Deserialize(Stream serializationStream, HeaderHandler handler)
		{
			return new SoapReader(_binder, _selector, _context).Deserialize(serializationStream, _topObject);
		}

		public void Serialize(Stream serializationStream, object graph)
		{
			Serialize(serializationStream, graph, null);
		}

		public void Serialize(Stream serializationStream, object graph, Header[] headers)
		{
			if (serializationStream == null)
			{
				throw new ArgumentNullException("serializationStream");
			}
			if (!serializationStream.CanWrite)
			{
				throw new SerializationException("Can't write in the serialization stream");
			}
			if (graph == null)
			{
				throw new ArgumentNullException("graph");
			}
			new SoapWriter(serializationStream, _selector, _context, _topObject).Serialize(graph, headers, _typeFormat, _assemblyFormat);
		}
	}
	internal sealed class SoapReader
	{
		private class TypeMetadata
		{
			public MemberInfo[] MemberInfos;

			public Hashtable Indices;
		}

		private SerializationBinder _binder;

		private SoapTypeMapper mapper;

		private ObjectManager objMgr;

		private StreamingContext _context;

		private long _nextAvailableId = long.MaxValue;

		private ISurrogateSelector _surrogateSelector;

		private XmlTextReader xmlReader;

		private Hashtable _fieldIndices;

		private long _topObjectId = 1L;

		private long NextAvailableId
		{
			get
			{
				_nextAvailableId--;
				return _nextAvailableId;
			}
		}

		public SoapTypeMapper Mapper => mapper;

		public XmlTextReader XmlReader => xmlReader;

		private object TopObject
		{
			get
			{
				objMgr.DoFixups();
				objMgr.RaiseDeserializationEvent();
				return objMgr.GetObject(_topObjectId);
			}
		}

		public SoapReader(SerializationBinder binder, ISurrogateSelector selector, StreamingContext context)
		{
			_binder = binder;
			objMgr = new ObjectManager(selector, context);
			_context = context;
			_surrogateSelector = selector;
			_fieldIndices = new Hashtable();
		}

		public object Deserialize(Stream inStream, ISoapMessage soapMessage)
		{
			CultureInfo currentCulture = CultureInfo.CurrentCulture;
			try
			{
				Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
				Deserialize_inner(inStream, soapMessage);
			}
			finally
			{
				Thread.CurrentThread.CurrentCulture = currentCulture;
			}
			return TopObject;
		}

		private void Deserialize_inner(Stream inStream, ISoapMessage soapMessage)
		{
			ArrayList arrayList = null;
			xmlReader = new XmlTextReader(inStream);
			xmlReader.WhitespaceHandling = WhitespaceHandling.None;
			mapper = new SoapTypeMapper(_binder);
			try
			{
				xmlReader.MoveToContent();
				xmlReader.ReadStartElement();
				xmlReader.MoveToContent();
				while (xmlReader.NodeType != XmlNodeType.Element || !(xmlReader.LocalName == "Body") || !(xmlReader.NamespaceURI == SoapTypeMapper.SoapEnvelopeNamespace))
				{
					if (xmlReader.NodeType == XmlNodeType.Element && xmlReader.LocalName == "Header" && xmlReader.NamespaceURI == SoapTypeMapper.SoapEnvelopeNamespace)
					{
						if (arrayList == null)
						{
							arrayList = new ArrayList();
						}
						DeserializeHeaders(arrayList);
					}
					else
					{
						xmlReader.Skip();
					}
					xmlReader.MoveToContent();
				}
				xmlReader.ReadStartElement();
				xmlReader.MoveToContent();
				if (soapMessage != null)
				{
					if (DeserializeMessage(soapMessage))
					{
						_topObjectId = NextAvailableId;
						RegisterObject(_topObjectId, soapMessage, null, 0L, null, null);
					}
					xmlReader.MoveToContent();
					if (arrayList != null)
					{
						soapMessage.Headers = (Header[])arrayList.ToArray(typeof(Header));
					}
				}
				while (xmlReader.NodeType != XmlNodeType.EndElement)
				{
					Deserialize();
				}
				xmlReader.ReadEndElement();
				xmlReader.MoveToContent();
				xmlReader.ReadEndElement();
			}
			finally
			{
				if (xmlReader != null)
				{
					xmlReader.Close();
				}
			}
		}

		private bool IsNull()
		{
			string text = xmlReader["null", "http://www.w3.org/2001/XMLSchema-instance"];
			if (text != null && !(text == string.Empty))
			{
				return true;
			}
			return false;
		}

		private long GetId()
		{
			string text = xmlReader["id"];
			if (text == null || text == string.Empty)
			{
				return 0L;
			}
			return Convert.ToInt64(text.Substring(4));
		}

		private long GetHref()
		{
			string text = xmlReader["href"];
			if (text == null || text == string.Empty)
			{
				return 0L;
			}
			return Convert.ToInt64(text.Substring(5));
		}

		private Type GetComponentType()
		{
			string text = xmlReader["type", "http://www.w3.org/2001/XMLSchema-instance"];
			if (text == null)
			{
				if (GetId() != 0L)
				{
					return typeof(string);
				}
				return null;
			}
			return GetTypeFromQName(text);
		}

		private bool DeserializeMessage(ISoapMessage message)
		{
			if (xmlReader.Name == SoapTypeMapper.SoapEnvelopePrefix + ":Fault")
			{
				Deserialize();
				return false;
			}
			string text = default(string);
			string text2 = default(string);
			SoapServices.DecodeXmlNamespaceForClrTypeNamespace(xmlReader.NamespaceURI, ref text, ref text2);
			message.MethodName = xmlReader.LocalName;
			message.XmlNameSpace = xmlReader.NamespaceURI;
			ArrayList arrayList = new ArrayList();
			ArrayList arrayList2 = new ArrayList();
			long nextAvailableId = NextAvailableId;
			int[] array = new int[1];
			if (!xmlReader.IsEmptyElement)
			{
				int depth = xmlReader.Depth;
				xmlReader.Read();
				int num = 0;
				while (xmlReader.Depth > depth)
				{
					object obj = null;
					arrayList.Add(xmlReader.Name);
					Type componentType = null;
					if (message.ParamTypes != null)
					{
						if (num >= message.ParamTypes.Length)
						{
							throw new SerializationException("Not enough parameter types in SoapMessages");
						}
						componentType = message.ParamTypes[num];
					}
					array[0] = num;
					obj = DeserializeComponent(componentType, out var _, out var componentHref, nextAvailableId, null, array);
					array[0] = arrayList2.Add(obj);
					if (componentHref != 0L)
					{
						RecordFixup(nextAvailableId, componentHref, arrayList2.ToArray(), null, null, null, array);
					}
					num++;
				}
				xmlReader.ReadEndElement();
			}
			else
			{
				xmlReader.Read();
			}
			message.ParamNames = (string[])arrayList.ToArray(typeof(string));
			message.ParamValues = arrayList2.ToArray();
			RegisterObject(nextAvailableId, message.ParamValues, null, 0L, null, null);
			return true;
		}

		private void DeserializeHeaders(ArrayList headers)
		{
			xmlReader.ReadStartElement();
			xmlReader.MoveToContent();
			while (xmlReader.NodeType != XmlNodeType.EndElement)
			{
				if (xmlReader.NodeType != XmlNodeType.Element)
				{
					xmlReader.Skip();
					continue;
				}
				if (xmlReader.GetAttribute("root", SoapTypeMapper.SoapEncodingNamespace) == "1")
				{
					headers.Add(DeserializeHeader());
				}
				else
				{
					Deserialize();
				}
				xmlReader.MoveToContent();
			}
			xmlReader.ReadEndElement();
		}

		private Header DeserializeHeader()
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			Header val = new Header(xmlReader.LocalName, (object)null);
			val.HeaderNamespace = xmlReader.NamespaceURI;
			val.MustUnderstand = xmlReader.GetAttribute("mustUnderstand", SoapTypeMapper.SoapEnvelopeNamespace) == "1";
			long nextAvailableId = NextAvailableId;
			FieldInfo field = typeof(Header).GetField("Value");
			long componentId;
			long componentHref;
			object obj = (val.Value = DeserializeComponent(null, out componentId, out componentHref, nextAvailableId, field, null));
			if (componentHref != 0L && obj == null)
			{
				RecordFixup(nextAvailableId, componentHref, val, null, null, field, null);
			}
			else if (obj != null && obj.GetType().IsValueType && componentId != 0L)
			{
				RecordFixup(nextAvailableId, componentId, val, null, null, field, null);
			}
			else if (componentId != 0L)
			{
				RegisterObject(componentId, obj, null, nextAvailableId, field, null);
			}
			RegisterObject(nextAvailableId, val, null, 0L, null, null);
			return val;
		}

		private object DeserializeArray(long id)
		{
			if (GetComponentType() == typeof(byte[]))
			{
				byte[] array = Convert.FromBase64String(xmlReader.ReadElementString());
				RegisterObject(id, array, null, 0L, null, null);
				return array;
			}
			string[] array2 = xmlReader["arrayType", SoapTypeMapper.SoapEncodingNamespace].Split(new char[1] { ':' });
			int num = array2[1].LastIndexOf('[');
			string xmlName = array2[1].Substring(0, num);
			string text = array2[1].Substring(num);
			string[] array3 = text.Substring(1, text.Length - 2).Trim().Split(new char[1] { ',' });
			int num2 = array3.Length;
			int[] array4 = new int[num2];
			for (int i = 0; i < num2; i++)
			{
				array4[i] = Convert.ToInt32(array3[i]);
			}
			int[] array5 = new int[num2];
			Array array6 = Array.CreateInstance(mapper.GetType(xmlName, xmlReader.LookupNamespace(array2[0])), array4);
			for (int j = 0; j < num2; j++)
			{
				array5[j] = array6.GetLowerBound(j);
			}
			int depth = xmlReader.Depth;
			xmlReader.Read();
			while (xmlReader.Depth > depth)
			{
				Type type = GetComponentType();
				if (type == null)
				{
					type = array6.GetType().GetElementType();
				}
				long componentId;
				long componentHref;
				object obj = DeserializeComponent(type, out componentId, out componentHref, id, null, array5);
				if (componentHref != 0L)
				{
					object @object = objMgr.GetObject(componentHref);
					if (@object != null)
					{
						array6.SetValue(@object, array5);
					}
					else
					{
						RecordFixup(id, componentHref, array6, null, null, null, array5);
					}
				}
				else if (obj != null && obj.GetType().IsValueType && componentId != 0L)
				{
					RecordFixup(id, componentId, array6, null, null, null, array5);
				}
				else if (componentId != 0L)
				{
					RegisterObject(componentId, obj, null, id, null, array5);
					array6.SetValue(obj, array5);
				}
				else
				{
					array6.SetValue(obj, array5);
				}
				for (int num3 = array6.Rank - 1; num3 >= 0; num3--)
				{
					array5[num3]++;
					if (array5[num3] <= array6.GetUpperBound(num3) || num3 <= 0)
					{
						break;
					}
					array5[num3] = array6.GetLowerBound(num3);
				}
			}
			RegisterObject(id, array6, null, 0L, null, null);
			xmlReader.ReadEndElement();
			return array6;
		}

		private object Deserialize()
		{
			object obj = null;
			Type type = mapper.GetType(xmlReader.LocalName, xmlReader.NamespaceURI);
			long id = GetId();
			id = ((id == 0L) ? 1 : id);
			if (type == typeof(Array))
			{
				return DeserializeArray(id);
			}
			return DeserializeObject(type, id, 0L, null, null);
		}

		private object DeserializeObject(Type type, long id, long parentId, MemberInfo parentMemberInfo, int[] indices)
		{
			SerializationInfo info = null;
			bool flag = false;
			if (type == typeof(string) || type == typeof(TimeSpan) || (mapper.IsInternalSoapType(type) && (indices != null || parentMemberInfo != null)))
			{
				object obj = mapper.ReadInternalSoapValue(this, type);
				if (id != 0L)
				{
					RegisterObject(id, obj, info, parentId, parentMemberInfo, indices);
				}
				return obj;
			}
			object uninitializedObject = FormatterServices.GetUninitializedObject(type);
			objMgr.RaiseOnDeserializingEvent(uninitializedObject);
			if (uninitializedObject is ISerializable)
			{
				flag = true;
			}
			if (_surrogateSelector != null && !flag)
			{
				ISurrogateSelector selector;
				ISerializationSurrogate surrogate = _surrogateSelector.GetSurrogate(type, _context, out selector);
				flag = flag || surrogate != null;
			}
			bool hasFixup;
			if (flag)
			{
				uninitializedObject = DeserializeISerializableObject(uninitializedObject, id, out info, out hasFixup);
			}
			else
			{
				uninitializedObject = DeserializeSimpleObject(uninitializedObject, id, out hasFixup);
				if (!hasFixup && uninitializedObject is IObjectReference)
				{
					uninitializedObject = ((IObjectReference)uninitializedObject).GetRealObject(_context);
				}
			}
			RegisterObject(id, uninitializedObject, info, parentId, parentMemberInfo, indices);
			xmlReader.ReadEndElement();
			return uninitializedObject;
		}

		private object DeserializeSimpleObject(object obj, long id, out bool hasFixup)
		{
			hasFixup = false;
			Type type = obj.GetType();
			TypeMetadata typeMetadata = GetTypeMetadata(type);
			object[] array = new object[typeMetadata.MemberInfos.Length];
			xmlReader.Read();
			xmlReader.MoveToContent();
			while (xmlReader.NodeType != XmlNodeType.EndElement)
			{
				if (xmlReader.NodeType != XmlNodeType.Element)
				{
					xmlReader.Skip();
					continue;
				}
				int num = (int)(typeMetadata.Indices[xmlReader.LocalName] ?? throw new SerializationException("Field \"" + xmlReader.LocalName + "\" not found in class " + type.FullName));
				FieldInfo fieldInfo = typeMetadata.MemberInfos[num] as FieldInfo;
				long componentId;
				long componentHref;
				object obj2 = (array[num] = DeserializeComponent(fieldInfo.FieldType, out componentId, out componentHref, id, fieldInfo, null));
				if (componentHref != 0L && obj2 == null)
				{
					RecordFixup(id, componentHref, obj, null, null, fieldInfo, null);
					hasFixup = true;
				}
				else if (obj2 != null && obj2.GetType().IsValueType && componentId != 0L)
				{
					RecordFixup(id, componentId, obj, null, null, fieldInfo, null);
					hasFixup = true;
				}
				else if (componentId != 0L)
				{
					RegisterObject(componentId, obj2, null, id, fieldInfo, null);
				}
			}
			FormatterServices.PopulateObjectMembers(obj, typeMetadata.MemberInfos, array);
			return obj;
		}

		private object DeserializeISerializableObject(object obj, long id, out SerializationInfo info, out bool hasFixup)
		{
			info = new SerializationInfo(obj.GetType(), new FormatterConverter());
			hasFixup = false;
			int depth = xmlReader.Depth;
			xmlReader.Read();
			while (xmlReader.Depth > depth)
			{
				Type componentType = GetComponentType();
				string text = XmlConvert.DecodeName(xmlReader.LocalName);
				long componentId;
				long componentHref;
				object obj2 = DeserializeComponent(componentType, out componentId, out componentHref, id, null, null);
				if (componentHref != 0L && obj2 == null)
				{
					RecordFixup(id, componentHref, obj, info, text, null, null);
					hasFixup = true;
					continue;
				}
				if (componentId != 0L && obj2.GetType().IsValueType)
				{
					RecordFixup(id, componentId, obj, info, text, null, null);
					hasFixup = true;
					continue;
				}
				if (componentId != 0L)
				{
					RegisterObject(componentId, obj2, null, id, null, null);
				}
				info.AddValue(text, obj2, (componentType != null) ? componentType : typeof(object));
			}
			return obj;
		}

		private object DeserializeComponent(Type componentType, out long componentId, out long componentHref, long parentId, MemberInfo parentMemberInfo, int[] indices)
		{
			componentId = 0L;
			componentHref = 0L;
			if (IsNull())
			{
				xmlReader.Read();
				return null;
			}
			Type componentType2 = GetComponentType();
			if (componentType2 != null)
			{
				componentType = componentType2;
			}
			if (xmlReader.HasAttributes)
			{
				componentId = GetId();
				componentHref = GetHref();
			}
			if (componentId != 0L)
			{
				string text = xmlReader.ReadElementString();
				objMgr.RegisterObject(text, componentId);
				return text;
			}
			if (componentHref != 0L)
			{
				xmlReader.Read();
				return objMgr.GetObject(componentHref);
			}
			if (componentType == null)
			{
				return xmlReader.ReadElementString();
			}
			componentId = NextAvailableId;
			return DeserializeObject(componentType, componentId, parentId, parentMemberInfo, indices);
		}

		public void RecordFixup(long parentObjectId, long childObjectId, object parentObject, SerializationInfo info, string fieldName, MemberInfo memberInfo, int[] indices)
		{
			if (info != null)
			{
				objMgr.RecordDelayedFixup(parentObjectId, fieldName, childObjectId);
			}
			else if (parentObject is Array)
			{
				if (indices.Length == 1)
				{
					objMgr.RecordArrayElementFixup(parentObjectId, indices[0], childObjectId);
				}
				else
				{
					objMgr.RecordArrayElementFixup(parentObjectId, (int[])indices.Clone(), childObjectId);
				}
			}
			else
			{
				objMgr.RecordFixup(parentObjectId, memberInfo, childObjectId);
			}
		}

		private void RegisterObject(long objectId, object objectInstance, SerializationInfo info, long parentObjectId, MemberInfo parentObjectMember, int[] indices)
		{
			if (parentObjectId == 0L)
			{
				indices = null;
			}
			if (!objectInstance.GetType().IsValueType || parentObjectId == 0L)
			{
				if (objMgr.GetObject(objectId) != objectInstance)
				{
					objMgr.RegisterObject(objectInstance, objectId, info, 0L, null, null);
				}
				return;
			}
			if (objMgr.GetObject(objectId) != null)
			{
				throw new SerializationException("Object already registered");
			}
			if (indices != null)
			{
				indices = (int[])indices.Clone();
			}
			objMgr.RegisterObject(objectInstance, objectId, info, parentObjectId, parentObjectMember, indices);
		}

		private TypeMetadata GetTypeMetadata(Type type)
		{
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Expected O, but got Unknown
			if (_fieldIndices[type] is TypeMetadata result)
			{
				return result;
			}
			TypeMetadata typeMetadata = new TypeMetadata();
			typeMetadata.MemberInfos = FormatterServices.GetSerializableMembers(type, _context);
			typeMetadata.Indices = new Hashtable();
			for (int i = 0; i < typeMetadata.MemberInfos.Length; i++)
			{
				SoapFieldAttribute val = (SoapFieldAttribute)InternalRemotingServices.GetCachedSoapAttribute((object)typeMetadata.MemberInfos[i]);
				typeMetadata.Indices[XmlConvert.EncodeLocalName(val.XmlElementName)] = i;
			}
			_fieldIndices[type] = typeMetadata;
			return typeMetadata;
		}

		public Type GetTypeFromQName(string qname)
		{
			string[] array = qname.Split(new char[1] { ':' });
			string xmlNamespace = xmlReader.LookupNamespace(array[0]);
			return mapper.GetType(array[1], xmlNamespace);
		}
	}
	internal class Element
	{
		private string _prefix;

		private string _localName;

		private string _namespaceURI;

		private MethodInfo _parseMethod;

		public string Prefix => _prefix;

		public string LocalName => _localName;

		public string NamespaceURI => _namespaceURI;

		public MethodInfo ParseMethod
		{
			get
			{
				return _parseMethod;
			}
			set
			{
				_parseMethod = value;
			}
		}

		public Element(string prefix, string localName, string namespaceURI)
		{
			_prefix = prefix;
			_localName = localName;
			_namespaceURI = namespaceURI;
		}

		public Element(string localName, string namespaceURI)
			: this(null, localName, namespaceURI)
		{
		}

		public override bool Equals(object obj)
		{
			Element element = obj as Element;
			if (!(_localName == XmlConvert.DecodeName(element._localName)) || !(_namespaceURI == XmlConvert.DecodeName(element._namespaceURI)))
			{
				return false;
			}
			return true;
		}

		public override int GetHashCode()
		{
			return $"{XmlConvert.DecodeName(_localName)} {XmlConvert.DecodeName(_namespaceURI)}".GetHashCode();
		}

		public override string ToString()
		{
			return $"Element.Prefix = {Prefix}, Element.LocalName = {LocalName}, Element.NamespaceURI = {NamespaceURI}";
		}
	}
	internal class SoapTypeMapper
	{
		private static Hashtable xmlNodeToTypeTable;

		private static Hashtable typeToXmlNodeTable;

		public static readonly string SoapEncodingNamespace;

		public static readonly string SoapEncodingPrefix;

		public static readonly string SoapEnvelopeNamespace;

		public static readonly string SoapEnvelopePrefix;

		private XmlTextWriter _xmlWriter;

		private long _prefixNumber;

		private Hashtable namespaceToPrefixTable = new Hashtable();

		private SerializationBinder _binder;

		private static ArrayList _canBeValueTypeList;

		private FormatterAssemblyStyle _assemblyFormat = FormatterAssemblyStyle.Full;

		private Element elementString;

		public SoapTypeMapper(SerializationBinder binder)
		{
			_binder = binder;
		}

		public SoapTypeMapper(XmlTextWriter xmlWriter, FormatterAssemblyStyle assemblyFormat, FormatterTypeStyle typeFormat)
		{
			_xmlWriter = xmlWriter;
			_assemblyFormat = assemblyFormat;
			_prefixNumber = 1L;
			if (typeFormat == FormatterTypeStyle.XsdString)
			{
				elementString = new Element("xsd", "string", "http://www.w3.org/2001/XMLSchema");
			}
			else
			{
				elementString = new Element(SoapEncodingPrefix, "string", SoapEncodingNamespace);
			}
		}

		static SoapTypeMapper()
		{
			xmlNodeToTypeTable = new Hashtable();
			typeToXmlNodeTable = new Hashtable();
			SoapEncodingNamespace = "http://schemas.xmlsoap.org/soap/encoding/";
			SoapEncodingPrefix = "SOAP-ENC";
			SoapEnvelopeNamespace = "http://schemas.xmlsoap.org/soap/envelope/";
			SoapEnvelopePrefix = "SOAP-ENV";
			_canBeValueTypeList = new ArrayList();
			_canBeValueTypeList.Add(typeof(DateTime).ToString());
			_canBeValueTypeList.Add(typeof(TimeSpan).ToString());
			_canBeValueTypeList.Add(typeof(string).ToString());
			_canBeValueTypeList.Add(typeof(decimal).ToString());
			_canBeValueTypeList.Sort();
			InitMappingTables();
		}

		private static string GetKey(string localName, string namespaceUri)
		{
			return localName + " " + namespaceUri;
		}

		public Type GetType(string xmlName, string xmlNamespace)
		{
			Type type = null;
			string text = XmlConvert.DecodeName(xmlName);
			string arg = XmlConvert.DecodeName(xmlNamespace);
			string text2 = default(string);
			string text3 = default(string);
			SoapServices.DecodeXmlNamespaceForClrTypeNamespace(xmlNamespace, ref text2, ref text3);
			string text5;
			if (text2 != null && !(text2 == string.Empty))
			{
				string text4 = text2;
				char delimiter = Type.Delimiter;
				text5 = text4 + delimiter + text;
			}
			else
			{
				text5 = text;
			}
			string text6 = text5;
			if (text3 != null && text3 != string.Empty && _binder != null)
			{
				type = _binder.BindToType(text3, text6);
			}
			if (type == null)
			{
				string text7 = (string)xmlNodeToTypeTable[GetKey(xmlName, xmlNamespace)];
				if (text7 != null)
				{
					type = Type.GetType(text7);
				}
				else
				{
					type = Type.GetType(text6);
					if (type == null)
					{
						if (text3 == null || text3 == string.Empty)
						{
							throw new SerializationException($"Parse Error, no assembly associated with XML key {text} {arg}");
						}
						type = FormatterServices.GetTypeFromAssembly(Assembly.Load(text3), text6);
					}
				}
				if (type == null)
				{
					throw new SerializationException();
				}
			}
			return type;
		}

		public Element GetXmlElement(string typeFullName, string assemblyName)
		{
			string text = string.Empty;
			string text2 = typeFullName;
			if (_assemblyFormat == FormatterAssemblyStyle.Simple)
			{
				assemblyName = assemblyName.Split(new char[1] { ',' })[0];
			}
			string key = typeFullName + ", " + assemblyName;
			Element element = (Element)typeToXmlNodeTable[key];
			if (element == null)
			{
				int num = typeFullName.LastIndexOf('.');
				if (num != -1)
				{
					text = typeFullName.Substring(0, num);
					text2 = typeFullName.Substring(text.Length + 1);
				}
				string text3 = SoapServices.CodeXmlNamespaceForClrTypeNamespace(text, (!assemblyName.StartsWith("mscorlib")) ? assemblyName : string.Empty);
				string text4 = (string)namespaceToPrefixTable[text3];
				if (text4 == null || text4 == string.Empty)
				{
					text4 = "a" + _prefixNumber++;
					namespaceToPrefixTable[text3] = text4;
				}
				int num2 = text2.IndexOf("[");
				if (num2 != -1)
				{
					text2 = XmlConvert.EncodeName(text2.Substring(0, num2)) + text2.Substring(num2);
				}
				else
				{
					int num3 = text2.IndexOf("&");
					text2 = ((num3 == -1) ? XmlConvert.EncodeName(text2) : (XmlConvert.EncodeName(text2.Substring(0, num3)) + text2.Substring(num3)));
				}
				element = new Element(text4, text2, text3);
			}
			return element;
		}

		public Element GetXmlElement(Type type)
		{
			if (type == typeof(string))
			{
				return elementString;
			}
			Element element = (Element)typeToXmlNodeTable[type.AssemblyQualifiedName];
			if (element == null)
			{
				element = GetXmlElement(type.FullName, type.Assembly.FullName);
			}
			else if (_xmlWriter != null)
			{
				element = new Element((element.Prefix == null) ? _xmlWriter.LookupPrefix(element.NamespaceURI) : element.Prefix, element.LocalName, element.NamespaceURI);
			}
			if (element == null)
			{
				throw new SerializationException("Oooops");
			}
			return element;
		}

		private static void RegisterType(Type type, string name, string namspace)
		{
			RegisterType(type, name, namspace, reverseMap: true);
		}

		private static Element RegisterType(Type type, string name, string namspace, bool reverseMap)
		{
			Element element = new Element(name, namspace);
			xmlNodeToTypeTable.Add(GetKey(name, namspace), type.AssemblyQualifiedName);
			if (reverseMap)
			{
				typeToXmlNodeTable.Add(type.AssemblyQualifiedName, element);
			}
			return element;
		}

		private static void RegisterType(Type type)
		{
			string name = (string)type.GetProperty("XsdType", BindingFlags.Static | BindingFlags.Public).GetValue(null, null);
			Element element = RegisterType(type, name, "http://www.w3.org/2001/XMLSchema", reverseMap: true);
			element.ParseMethod = type.GetMethod("Parse", BindingFlags.Static | BindingFlags.Public);
			if (element.ParseMethod == null)
			{
				throw new InvalidOperationException("Parse method not found in class " + type);
			}
		}

		private static void InitMappingTables()
		{
			RegisterType(typeof(Array), "Array", SoapEncodingNamespace);
			RegisterType(typeof(string), "string", "http://www.w3.org/2001/XMLSchema", reverseMap: false);
			RegisterType(typeof(string), "string", SoapEncodingNamespace, reverseMap: false);
			RegisterType(typeof(bool), "boolean", "http://www.w3.org/2001/XMLSchema");
			RegisterType(typeof(sbyte), "byte", "http://www.w3.org/2001/XMLSchema");
			RegisterType(typeof(byte), "unsignedByte", "http://www.w3.org/2001/XMLSchema");
			RegisterType(typeof(long), "long", "http://www.w3.org/2001/XMLSchema");
			RegisterType(typeof(ulong), "unsignedLong", "http://www.w3.org/2001/XMLSchema");
			RegisterType(typeof(int), "int", "http://www.w3.org/2001/XMLSchema");
			RegisterType(typeof(uint), "unsignedInt", "http://www.w3.org/2001/XMLSchema");
			RegisterType(typeof(float), "float", "http://www.w3.org/2001/XMLSchema");
			RegisterType(typeof(double), "double", "http://www.w3.org/2001/XMLSchema");
			RegisterType(typeof(decimal), "decimal", "http://www.w3.org/2001/XMLSchema");
			RegisterType(typeof(short), "short", "http://www.w3.org/2001/XMLSchema");
			RegisterType(typeof(ushort), "unsignedShort", "http://www.w3.org/2001/XMLSchema");
			RegisterType(typeof(object), "anyType", "http://www.w3.org/2001/XMLSchema");
			RegisterType(typeof(DateTime), "dateTime", "http://www.w3.org/2001/XMLSchema");
			RegisterType(typeof(TimeSpan), "duration", "http://www.w3.org/2001/XMLSchema");
			RegisterType(typeof(SoapFault), "Fault", SoapEnvelopeNamespace);
			RegisterType(typeof(byte[]), "base64", SoapEncodingNamespace);
			RegisterType(typeof(MethodSignature), "methodSignature", SoapEncodingNamespace);
			RegisterType(typeof(SoapAnyUri));
			RegisterType(typeof(SoapEntity));
			RegisterType(typeof(SoapMonth));
			RegisterType(typeof(SoapNonNegativeInteger));
			RegisterType(typeof(SoapToken));
			RegisterType(typeof(SoapBase64Binary));
			RegisterType(typeof(SoapHexBinary));
			RegisterType(typeof(SoapMonthDay));
			RegisterType(typeof(SoapNonPositiveInteger));
			RegisterType(typeof(SoapYear));
			RegisterType(typeof(SoapDate));
			RegisterType(typeof(SoapId));
			RegisterType(typeof(SoapName));
			RegisterType(typeof(SoapNormalizedString));
			RegisterType(typeof(SoapYearMonth));
			RegisterType(typeof(SoapIdref));
			RegisterType(typeof(SoapNcName));
			RegisterType(typeof(SoapNotation));
			RegisterType(typeof(SoapDay));
			RegisterType(typeof(SoapIdrefs));
			RegisterType(typeof(SoapNegativeInteger));
			RegisterType(typeof(SoapPositiveInteger));
			RegisterType(typeof(SoapInteger));
			RegisterType(typeof(SoapNmtoken));
			RegisterType(typeof(SoapQName));
			RegisterType(typeof(SoapEntities));
			RegisterType(typeof(SoapLanguage));
			RegisterType(typeof(SoapNmtokens));
			RegisterType(typeof(SoapTime));
		}

		public static string GetXsdValue(object value)
		{
			if (value is DateTime)
			{
				return SoapDateTime.ToString((DateTime)value);
			}
			if (value is decimal num)
			{
				return num.ToString(CultureInfo.InvariantCulture);
			}
			if (value is double num2)
			{
				return num2.ToString("G17", CultureInfo.InvariantCulture);
			}
			if (value is float num3)
			{
				return num3.ToString("G9", CultureInfo.InvariantCulture);
			}
			if (value is TimeSpan)
			{
				return SoapDuration.ToString((TimeSpan)value);
			}
			if (value is bool)
			{
				if (!(bool)value)
				{
					return "false";
				}
				return "true";
			}
			if (value is MethodSignature)
			{
				return null;
			}
			return value.ToString();
		}

		public static object ParseXsdValue(string value, Type type)
		{
			if (type == typeof(DateTime))
			{
				return SoapDateTime.Parse(value);
			}
			if (type == typeof(decimal))
			{
				return decimal.Parse(value, CultureInfo.InvariantCulture);
			}
			if (type == typeof(double))
			{
				return double.Parse(value, CultureInfo.InvariantCulture);
			}
			if (type == typeof(float))
			{
				return float.Parse(value, CultureInfo.InvariantCulture);
			}
			if (type == typeof(TimeSpan))
			{
				return SoapDuration.Parse(value);
			}
			if (type.IsEnum)
			{
				return Enum.Parse(type, value);
			}
			return Convert.ChangeType(value, type, CultureInfo.InvariantCulture);
		}

		public static bool CanBeValue(Type type)
		{
			if (type.IsPrimitive)
			{
				return true;
			}
			if (type.IsEnum)
			{
				return true;
			}
			if (_canBeValueTypeList.BinarySearch(type.ToString()) >= 0)
			{
				return true;
			}
			return false;
		}

		public bool IsInternalSoapType(Type type)
		{
			if (CanBeValue(type))
			{
				return true;
			}
			if (typeof(ISoapXsd).IsAssignableFrom(type))
			{
				return true;
			}
			if (type == typeof(MethodSignature))
			{
				return true;
			}
			return false;
		}

		public object ReadInternalSoapValue(SoapReader reader, Type type)
		{
			if (CanBeValue(type))
			{
				return ParseXsdValue(reader.XmlReader.ReadElementString(), type);
			}
			if (type == typeof(MethodSignature))
			{
				return MethodSignature.ReadXmlValue(reader);
			}
			string text = reader.XmlReader.ReadElementString();
			Element xmlElement = GetXmlElement(type);
			if (xmlElement.ParseMethod != null)
			{
				return xmlElement.ParseMethod.Invoke(null, new object[1] { text });
			}
			throw new SerializationException("Can't parse type " + type);
		}

		public string GetInternalSoapValue(SoapWriter writer, object value)
		{
			if (CanBeValue(value.GetType()))
			{
				return GetXsdValue(value);
			}
			if (value is MethodSignature)
			{
				return ((MethodSignature)value).GetXmlValue(writer);
			}
			return value.ToString();
		}
	}
	internal class MethodSignature
	{
		private Type[] types;

		public MethodSignature(Type[] types)
		{
			this.types = types;
		}

		public static object ReadXmlValue(SoapReader reader)
		{
			reader.XmlReader.MoveToElement();
			if (reader.XmlReader.IsEmptyElement)
			{
				reader.XmlReader.Skip();
				return new Type[0];
			}
			reader.XmlReader.ReadStartElement();
			string text = reader.XmlReader.ReadString();
			while (reader.XmlReader.NodeType != XmlNodeType.EndElement)
			{
				reader.XmlReader.Skip();
			}
			ArrayList arrayList = new ArrayList();
			string[] array = text.Split(new char[1] { ' ' });
			foreach (string text2 in array)
			{
				if (text2.Length != 0)
				{
					arrayList.Add(reader.GetTypeFromQName(text2));
				}
			}
			reader.XmlReader.ReadEndElement();
			return (Type[])arrayList.ToArray(typeof(Type));
		}

		public string GetXmlValue(SoapWriter writer)
		{
			StringBuilder stringBuilder = new StringBuilder();
			Type[] array = types;
			foreach (Type type in array)
			{
				Element xmlElement = writer.Mapper.GetXmlElement(type);
				if (stringBuilder.Length > 0)
				{
					stringBuilder.Append(' ');
				}
				string namespacePrefix = writer.GetNamespacePrefix(xmlElement);
				stringBuilder.Append(namespacePrefix).Append(':').Append(xmlElement.LocalName);
			}
			return stringBuilder.ToString();
		}
	}
	internal class SoapWriter : IComparer
	{
		private struct EnqueuedObject
		{
			public long _id;

			public object _object;

			public long Id => _id;

			public object Object => _object;

			public EnqueuedObject(object currentObject, long id)
			{
				_id = id;
				_object = currentObject;
			}
		}

		private XmlTextWriter _xmlWriter;

		private Queue _objectQueue = new Queue();

		private Hashtable _objectToIdTable = new Hashtable();

		private ISurrogateSelector _surrogateSelector;

		private SoapTypeMapper _mapper;

		private StreamingContext _context;

		private ObjectIDGenerator idGen = new ObjectIDGenerator();

		private FormatterAssemblyStyle _assemblyFormat = FormatterAssemblyStyle.Full;

		private FormatterTypeStyle _typeFormat;

		private static string defaultMessageNamespace;

		private SerializationObjectManager _manager;

		public SoapTypeMapper Mapper => _mapper;

		public XmlTextWriter XmlWriter => _xmlWriter;

		internal FormatterAssemblyStyle AssemblyFormat
		{
			get
			{
				return _assemblyFormat;
			}
			set
			{
				_assemblyFormat = value;
			}
		}

		internal FormatterTypeStyle TypeFormat
		{
			get
			{
				return _typeFormat;
			}
			set
			{
				_typeFormat = value;
			}
		}

		~SoapWriter()
		{
		}

		internal SoapWriter(Stream outStream, ISurrogateSelector selector, StreamingContext context, ISoapMessage soapMessage)
		{
			_xmlWriter = new XmlTextWriter(outStream, null);
			_xmlWriter.Formatting = Formatting.Indented;
			_surrogateSelector = selector;
			_context = context;
			_manager = new SerializationObjectManager(_context);
		}

		static SoapWriter()
		{
			defaultMessageNamespace = typeof(SoapWriter).Assembly.GetName().FullName;
		}

		private void Id(long id)
		{
			_xmlWriter.WriteAttributeString(null, "id", null, "ref-" + id);
		}

		private void Href(long href)
		{
			_xmlWriter.WriteAttributeString(null, "href", null, "#ref-" + href);
		}

		private void Null()
		{
			_xmlWriter.WriteAttributeString("xsi", "null", "http://www.w3.org/2001/XMLSchema-instance", "1");
		}

		private bool IsEncodingNeeded(object componentObject, Type componentType)
		{
			if (componentObject == null)
			{
				return false;
			}
			if (_typeFormat == FormatterTypeStyle.TypesAlways)
			{
				return true;
			}
			if (componentType == null)
			{
				componentType = componentObject.GetType();
				if (componentType.IsPrimitive || componentType == typeof(string))
				{
					return false;
				}
				return true;
			}
			if (componentType == typeof(object) || componentType != componentObject.GetType())
			{
				return true;
			}
			return false;
		}

		internal void Serialize(object objGraph, Header[] headers, FormatterTypeStyle typeFormat, FormatterAssemblyStyle assemblyFormat)
		{
			CultureInfo currentCulture = CultureInfo.CurrentCulture;
			try
			{
				Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
				Serialize_inner(objGraph, headers, typeFormat, assemblyFormat);
			}
			finally
			{
				Thread.CurrentThread.CurrentCulture = currentCulture;
			}
			_manager.RaiseOnSerializedEvent();
		}

		private void Serialize_inner(object objGraph, Header[] headers, FormatterTypeStyle typeFormat, FormatterAssemblyStyle assemblyFormat)
		{
			_typeFormat = typeFormat;
			_assemblyFormat = assemblyFormat;
			_mapper = new SoapTypeMapper(_xmlWriter, assemblyFormat, typeFormat);
			_xmlWriter.WriteStartElement(SoapTypeMapper.SoapEnvelopePrefix, "Envelope", SoapTypeMapper.SoapEnvelopeNamespace);
			_xmlWriter.WriteAttributeString("xmlns", "xsi", "http://www.w3.org/2000/xmlns/", "http://www.w3.org/2001/XMLSchema-instance");
			_xmlWriter.WriteAttributeString("xmlns", "xsd", "http://www.w3.org/2000/xmlns/", "http://www.w3.org/2001/XMLSchema");
			_xmlWriter.WriteAttributeString("xmlns", SoapTypeMapper.SoapEncodingPrefix, "http://www.w3.org/2000/xmlns/", SoapTypeMapper.SoapEncodingNamespace);
			_xmlWriter.WriteAttributeString("xmlns", SoapTypeMapper.SoapEnvelopePrefix, "http://www.w3.org/2000/xmlns/", SoapTypeMapper.SoapEnvelopeNamespace);
			_xmlWriter.WriteAttributeString("xmlns", "clr", "http://www.w3.org/2000/xmlns/", SoapServices.XmlNsForClrType);
			_xmlWriter.WriteAttributeString(SoapTypeMapper.SoapEnvelopePrefix, "encodingStyle", SoapTypeMapper.SoapEnvelopeNamespace, "http://schemas.xmlsoap.org/soap/encoding/");
			ISoapMessage val = (ISoapMessage)((objGraph is ISoapMessage) ? objGraph : null);
			if (val != null)
			{
				headers = val.Headers;
			}
			if (headers != null && headers.Length != 0)
			{
				_xmlWriter.WriteStartElement(SoapTypeMapper.SoapEnvelopePrefix, "Header", SoapTypeMapper.SoapEnvelopeNamespace);
				Header[] array = headers;
				foreach (Header header in array)
				{
					SerializeHeader(header);
				}
				WriteObjectQueue();
				_xmlWriter.WriteEndElement();
			}
			_xmlWriter.WriteStartElement(SoapTypeMapper.SoapEnvelopePrefix, "Body", SoapTypeMapper.SoapEnvelopeNamespace);
			bool firstTime = false;
			if (val != null)
			{
				SerializeMessage(val);
			}
			else
			{
				_objectQueue.Enqueue(new EnqueuedObject(objGraph, idGen.GetId(objGraph, out firstTime)));
			}
			WriteObjectQueue();
			_xmlWriter.WriteFullEndElement();
			_xmlWriter.WriteFullEndElement();
			_xmlWriter.Flush();
		}

		private void WriteObjectQueue()
		{
			while (_objectQueue.Count > 0)
			{
				EnqueuedObject enqueuedObject = (EnqueuedObject)_objectQueue.Dequeue();
				object @object = enqueuedObject.Object;
				Type type = @object.GetType();
				if (!type.IsValueType)
				{
					_objectToIdTable[@object] = enqueuedObject.Id;
				}
				if (type.IsArray)
				{
					SerializeArray((Array)@object, enqueuedObject.Id);
				}
				else
				{
					SerializeObject(@object, enqueuedObject.Id);
				}
			}
		}

		private void SerializeMessage(ISoapMessage message)
		{
			string ns = ((message.XmlNameSpace != null) ? message.XmlNameSpace : defaultMessageNamespace);
			_xmlWriter.WriteStartElement("i2", message.MethodName, ns);
			Id(idGen.GetId(message, out var _));
			string[] paramNames = message.ParamNames;
			object[] paramValues = message.ParamValues;
			int num = ((paramNames != null) ? paramNames.Length : 0);
			for (int i = 0; i < num; i++)
			{
				_xmlWriter.WriteStartElement(paramNames[i]);
				SerializeComponent(paramValues[i], specifyEncoding: true);
				_xmlWriter.WriteEndElement();
			}
			_xmlWriter.WriteFullEndElement();
		}

		private void SerializeHeader(Header header)
		{
			string ns = ((header.HeaderNamespace != null) ? header.HeaderNamespace : "http://schemas.microsoft.com/clr/soap");
			_xmlWriter.WriteStartElement("h4", header.Name, ns);
			if (header.MustUnderstand)
			{
				_xmlWriter.WriteAttributeString("mustUnderstand", SoapTypeMapper.SoapEnvelopeNamespace, "1");
			}
			_xmlWriter.WriteAttributeString("root", SoapTypeMapper.SoapEncodingNamespace, "1");
			if (header.Name == "__MethodSignature")
			{
				if (!(header.Value is Type[] types))
				{
					throw new SerializationException("Invalid method signature.");
				}
				SerializeComponent(new MethodSignature(types), specifyEncoding: true);
			}
			else
			{
				SerializeComponent(header.Value, specifyEncoding: true);
			}
			_xmlWriter.WriteEndElement();
		}

		private void SerializeObject(object currentObject, long currentObjectId)
		{
			bool flag = false;
			ISerializationSurrogate serializationSurrogate = null;
			if (_surrogateSelector != null)
			{
				serializationSurrogate = _surrogateSelector.GetSurrogate(currentObject.GetType(), _context, out ISurrogateSelector _);
			}
			if (currentObject is ISerializable || serializationSurrogate != null)
			{
				flag = true;
			}
			_manager.RegisterObject(currentObject);
			if (flag)
			{
				SerializeISerializableObject(currentObject, currentObjectId, serializationSurrogate);
				return;
			}
			if (!currentObject.GetType().IsSerializable)
			{
				throw new SerializationException($"Type {currentObject.GetType()} in assembly {currentObject.GetType().Assembly.FullName} is not marked as serializable.");
			}
			SerializeSimpleObject(currentObject, currentObjectId);
		}

		public int Compare(object x, object y)
		{
			MemberInfo obj = x as MemberInfo;
			MemberInfo memberInfo = y as MemberInfo;
			return string.Compare(obj.Name, memberInfo.Name);
		}

		private void SerializeSimpleObject(object currentObject, long currentObjectId)
		{
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Expected O, but got Unknown
			Type type = currentObject.GetType();
			if (currentObjectId > 0)
			{
				Element xmlElement = _mapper.GetXmlElement(type);
				_xmlWriter.WriteStartElement(xmlElement.Prefix, xmlElement.LocalName, xmlElement.NamespaceURI);
				Id(currentObjectId);
			}
			if (type == typeof(TimeSpan))
			{
				_xmlWriter.WriteString(SoapTypeMapper.GetXsdValue(currentObject));
			}
			else if (type == typeof(string))
			{
				_xmlWriter.WriteString(currentObject.ToString());
			}
			else
			{
				MemberInfo[] serializableMembers = FormatterServices.GetSerializableMembers(type, _context);
				object[] objectData = FormatterServices.GetObjectData(currentObject, serializableMembers);
				for (int i = 0; i < serializableMembers.Length; i++)
				{
					FieldInfo fieldInfo = (FieldInfo)serializableMembers[i];
					SoapFieldAttribute val = (SoapFieldAttribute)InternalRemotingServices.GetCachedSoapAttribute((object)fieldInfo);
					_xmlWriter.WriteStartElement(XmlConvert.EncodeLocalName(val.XmlElementName));
					SerializeComponent(objectData[i], IsEncodingNeeded(objectData[i], fieldInfo.FieldType));
					_xmlWriter.WriteEndElement();
				}
			}
			if (currentObjectId > 0)
			{
				_xmlWriter.WriteFullEndElement();
			}
		}

		private void SerializeISerializableObject(object currentObject, long currentObjectId, ISerializationSurrogate surrogate)
		{
			SerializationInfo serializationInfo = new SerializationInfo(currentObject.GetType(), new FormatterConverter());
			ISerializable serializable = currentObject as ISerializable;
			if (surrogate != null)
			{
				surrogate.GetObjectData(currentObject, serializationInfo, _context);
			}
			else
			{
				serializable.GetObjectData(serializationInfo, _context);
			}
			if (currentObjectId > 0)
			{
				Element xmlElement = _mapper.GetXmlElement(serializationInfo.FullTypeName, serializationInfo.AssemblyName);
				_xmlWriter.WriteStartElement(xmlElement.Prefix, xmlElement.LocalName, xmlElement.NamespaceURI);
				Id(currentObjectId);
			}
			SerializationInfoEnumerator enumerator = serializationInfo.GetEnumerator();
			while (enumerator.MoveNext())
			{
				SerializationEntry current = enumerator.Current;
				_xmlWriter.WriteStartElement(XmlConvert.EncodeLocalName(current.Name));
				SerializeComponent(current.Value, IsEncodingNeeded(current.Value, null));
				_xmlWriter.WriteEndElement();
			}
			if (currentObjectId > 0)
			{
				_xmlWriter.WriteFullEndElement();
			}
		}

		private void SerializeArray(Array currentArray, long currentArrayId)
		{
			Element xmlElement = _mapper.GetXmlElement(typeof(Array));
			Type elementType = currentArray.GetType().GetElementType();
			Element xmlElement2 = _mapper.GetXmlElement(elementType);
			_xmlWriter.WriteStartElement(xmlElement.Prefix, xmlElement.LocalName, xmlElement.NamespaceURI);
			if (currentArrayId > 0)
			{
				Id(currentArrayId);
			}
			if (elementType == typeof(byte))
			{
				EncodeType(currentArray.GetType());
				_xmlWriter.WriteString(Convert.ToBase64String((byte[])currentArray));
				_xmlWriter.WriteFullEndElement();
				return;
			}
			string namespacePrefix = GetNamespacePrefix(xmlElement2);
			StringBuilder stringBuilder = new StringBuilder();
			stringBuilder.AppendFormat("{0}:{1}[", namespacePrefix, xmlElement2.LocalName);
			for (int i = 0; i < currentArray.Rank; i++)
			{
				stringBuilder.AppendFormat("{0},", currentArray.GetUpperBound(i) + 1);
			}
			stringBuilder.Replace(',', ']', stringBuilder.Length - 1, 1);
			_xmlWriter.WriteAttributeString(SoapTypeMapper.SoapEncodingPrefix, "arrayType", SoapTypeMapper.SoapEncodingNamespace, stringBuilder.ToString());
			int num = 0;
			int num2 = 0;
			foreach (object item in currentArray)
			{
				if (item != null)
				{
					for (int j = num; j < num2; j++)
					{
						_xmlWriter.WriteStartElement("item");
						Null();
						_xmlWriter.WriteEndElement();
					}
					num = num2 + 1;
					_xmlWriter.WriteStartElement("item");
					SerializeComponent(item, IsEncodingNeeded(item, elementType));
					_xmlWriter.WriteEndElement();
				}
				num2++;
			}
			_xmlWriter.WriteFullEndElement();
		}

		private void SerializeComponent(object obj, bool specifyEncoding)
		{
			if (_typeFormat == FormatterTypeStyle.TypesAlways)
			{
				specifyEncoding = true;
			}
			if (obj == null)
			{
				Null();
				return;
			}
			Type type = obj.GetType();
			bool flag = _mapper.IsInternalSoapType(type);
			long num = 0L;
			if ((num = idGen.HasId(obj, out var firstTime)) != 0L)
			{
				Href(idGen.GetId(obj, out firstTime));
				return;
			}
			if (type == typeof(string) && _typeFormat != FormatterTypeStyle.XsdString)
			{
				num = idGen.GetId(obj, out firstTime);
				Id(num);
			}
			if (!flag && !type.IsValueType)
			{
				long id = idGen.GetId(obj, out firstTime);
				Href(id);
				_objectQueue.Enqueue(new EnqueuedObject(obj, id));
				return;
			}
			if (specifyEncoding)
			{
				EncodeType(type);
			}
			if (!flag && type.IsValueType)
			{
				SerializeObject(obj, 0L);
			}
			else
			{
				_xmlWriter.WriteString(_mapper.GetInternalSoapValue(this, obj));
			}
		}

		private void EncodeType(Type type)
		{
			if (type == null)
			{
				throw new SerializationException("Oooops");
			}
			Element xmlElement = _mapper.GetXmlElement(type);
			string namespacePrefix = GetNamespacePrefix(xmlElement);
			_xmlWriter.WriteAttributeString("xsi", "type", "http://www.w3.org/2001/XMLSchema-instance", namespacePrefix + ":" + xmlElement.LocalName);
		}

		public string GetNamespacePrefix(Element xmlType)
		{
			string text = _xmlWriter.LookupPrefix(xmlType.NamespaceURI);
			if (text == null || text == string.Empty)
			{
				_xmlWriter.WriteAttributeString("xmlns", xmlType.Prefix, "http://www.w3.org/2000/xmlns/", xmlType.NamespaceURI);
				return xmlType.Prefix;
			}
			return text;
		}
	}
}

Room Architect Tool_Data/Managed/System.Runtime.Serialization.Xml.dll

Decompiled 3 months ago
using System.CodeDom;
using System.Collections.ObjectModel;
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.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("System.Runtime.Serialization.Xml")]
[assembly: AssemblyDescription("System.Runtime.Serialization.Xml")]
[assembly: AssemblyDefaultAlias("System.Runtime.Serialization.Xml")]
[assembly: AssemblyCompany("Mono development team")]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright("(c) Various Mono authors")]
[assembly: AssemblyInformationalVersion("4.0.0.0")]
[assembly: AssemblyFileVersion("4.0.0.0")]
[assembly: AssemblyVersion("4.1.1.0")]
[assembly: TypeForwardedTo(typeof(DataContractResolver))]
[assembly: TypeForwardedTo(typeof(DataContractSerializer))]
[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))]
namespace System
{
	internal static class NotImplemented
	{
		internal static Exception ByDesign => new NotImplementedException();

		internal static Exception ByDesignWithMessage(string message)
		{
			return new NotImplementedException(message);
		}
	}
}
namespace System.Runtime.Serialization
{
	public static class DataContractSerializerExtensions
	{
		private class SurrogateProviderAdapter : IDataContractSurrogate
		{
			private ISerializationSurrogateProvider _provider;

			public ISerializationSurrogateProvider Provider => _provider;

			public SurrogateProviderAdapter(ISerializationSurrogateProvider provider)
			{
				_provider = provider;
			}

			public object GetCustomDataToExport(Type clrType, Type dataContractType)
			{
				throw System.NotImplemented.ByDesign;
			}

			public object GetCustomDataToExport(MemberInfo memberInfo, Type dataContractType)
			{
				throw System.NotImplemented.ByDesign;
			}

			public Type GetDataContractType(Type type)
			{
				return _provider.GetSurrogateType(type);
			}

			public object GetDeserializedObject(object obj, Type targetType)
			{
				return _provider.GetDeserializedObject(obj, targetType);
			}

			public void GetKnownCustomDataTypes(Collection<Type> customDataTypes)
			{
				throw System.NotImplemented.ByDesign;
			}

			public object GetObjectToSerialize(object obj, Type targetType)
			{
				return _provider.GetObjectToSerialize(obj, targetType);
			}

			public Type GetReferencedTypeOnImport(string typeName, string typeNamespace, object customData)
			{
				throw System.NotImplemented.ByDesign;
			}

			public CodeTypeDeclaration ProcessImportedType(CodeTypeDeclaration typeDeclaration, CodeCompileUnit compileUnit)
			{
				throw System.NotImplemented.ByDesign;
			}
		}

		public static ISerializationSurrogateProvider GetSerializationSurrogateProvider(this DataContractSerializer serializer)
		{
			if (serializer.DataContractSurrogate is SurrogateProviderAdapter surrogateProviderAdapter)
			{
				return surrogateProviderAdapter.Provider;
			}
			return null;
		}

		public static void SetSerializationSurrogateProvider(this DataContractSerializer serializer, ISerializationSurrogateProvider provider)
		{
			IDataContractSurrogate value = (IDataContractSurrogate)(object)new SurrogateProviderAdapter(provider);
			typeof(DataContractSerializer).GetField("dataContractSurrogate", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(serializer, value);
		}
	}
}

Room Architect Tool_Data/Managed/System.Security.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Net;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Security;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Security.Cryptography.Xml;
using System.Security.Permissions;
using System.Security.Policy;
using System.Text;
using System.Xml;
using System.Xml.XPath;
using System.Xml.Xsl;
using Mono.Security;
using Mono.Security.Cryptography;
using Mono.Security.X509;
using Unity;

[assembly: AllowPartiallyTrustedCallers]
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: SatelliteContractVersion("4.0.0.0")]
[assembly: CLSCompliant(true)]
[assembly: ComVisible(false)]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: AssemblyDelaySign(true)]
[assembly: AssemblyDefaultAlias("System.Security.dll")]
[assembly: AssemblyDescription("System.Security.dll")]
[assembly: AssemblyTitle("System.Security.dll")]
[assembly: AssemblyFileVersion("4.6.57.0")]
[assembly: AssemblyInformationalVersion("4.6.57.0")]
[assembly: AssemblyCompany("Mono development team")]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright("(c) Various Mono authors")]
[assembly: AssemblyVersion("4.0.0.0")]
internal static class Consts
{
	public const string MonoVersion = "5.11.0.0";

	public const string MonoCompany = "Mono development team";

	public const string MonoProduct = "Mono Common Language Infrastructure";

	public const string MonoCopyright = "(c) Various Mono authors";

	public const int MonoCorlibVersion = 1051100001;

	public const string FxVersion = "4.0.0.0";

	public const string FxFileVersion = "4.6.57.0";

	public const string EnvironmentVersion = "4.0.30319.42000";

	public const string VsVersion = "0.0.0.0";

	public const string VsFileVersion = "11.0.0.0";

	private const string PublicKeyToken = "b77a5c561934e089";

	public const string AssemblyI18N = "I18N, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMicrosoft_JScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMono_Http = "Mono.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Posix = "Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Security = "Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Messaging_RabbitMQ = "Mono.Messaging.RabbitMQ, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyCorlib = "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Data = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Design = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing_Design = "System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Messaging = "System.Messaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Security = "System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Web = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Core = "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string WindowsBase_3_0 = "WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
internal sealed class Locale
{
	private Locale()
	{
	}

	public static string GetText(string msg)
	{
		return msg;
	}

	public static string GetText(string fmt, params object[] args)
	{
		return string.Format(fmt, args);
	}
}
internal class SR
{
	public const string ArgumentOutOfRange_Index = "Index was out of range.  Must be non-negative and less than the size of the collection.";

	public const string Arg_EmptyOrNullString = "String cannot be empty or null.";

	public const string Cryptography_Partial_Chain = "A certificate chain could not be built to a trusted root authority.";

	public const string Cryptography_Xml_BadWrappedKeySize = "Bad wrapped key size.";

	public const string Cryptography_Xml_CipherValueElementRequired = "A Cipher Data element should have either a CipherValue or a CipherReference element.";

	public const string Cryptography_Xml_CreateHashAlgorithmFailed = "Could not create hash algorithm object.";

	public const string Cryptography_Xml_CreateTransformFailed = "Could not create the XML transformation identified by the URI {0}.";

	public const string Cryptography_Xml_CreatedKeyFailed = "Failed to create signing key.";

	public const string Cryptography_Xml_DigestMethodRequired = "A DigestMethod must be specified on a Reference prior to generating XML.";

	public const string Cryptography_Xml_DigestValueRequired = "A Reference must contain a DigestValue.";

	public const string Cryptography_Xml_EnvelopedSignatureRequiresContext = "An XmlDocument context is required for enveloped transforms.";

	public const string Cryptography_Xml_InvalidElement = "Malformed element {0}.";

	public const string Cryptography_Xml_InvalidEncryptionProperty = "Malformed encryption property element.";

	public const string Cryptography_Xml_InvalidKeySize = "The key size should be a non negative integer.";

	public const string Cryptography_Xml_InvalidReference = "Malformed reference element.";

	public const string Cryptography_Xml_InvalidSignatureLength = "The length of the signature with a MAC should be less than the hash output length.";

	public const string Cryptography_Xml_InvalidSignatureLength2 = "The length in bits of the signature with a MAC should be a multiple of 8.";

	public const string Cryptography_Xml_InvalidX509IssuerSerialNumber = "X509 issuer serial number is invalid.";

	public const string Cryptography_Xml_KeyInfoRequired = "A KeyInfo element is required to check the signature.";

	public const string Cryptography_Xml_KW_BadKeySize = "The length of the encrypted data in Key Wrap is either 32, 40 or 48 bytes.";

	public const string Cryptography_Xml_LoadKeyFailed = "Signing key is not loaded.";

	public const string Cryptography_Xml_MissingAlgorithm = "Symmetric algorithm is not specified.";

	public const string Cryptography_Xml_MissingCipherData = "Cipher data is not specified.";

	public const string Cryptography_Xml_MissingDecryptionKey = "Unable to retrieve the decryption key.";

	public const string Cryptography_Xml_MissingEncryptionKey = "Unable to retrieve the encryption key.";

	public const string Cryptography_Xml_NotSupportedCryptographicTransform = "The specified cryptographic transform is not supported.";

	public const string Cryptography_Xml_ReferenceElementRequired = "At least one Reference element is required.";

	public const string Cryptography_Xml_ReferenceTypeRequired = "The Reference type must be set in an EncryptedReference object.";

	public const string Cryptography_Xml_SelfReferenceRequiresContext = "An XmlDocument context is required to resolve the Reference Uri {0}.";

	public const string Cryptography_Xml_SignatureDescriptionNotCreated = "SignatureDescription could not be created for the signature algorithm supplied.";

	public const string Cryptography_Xml_SignatureMethodKeyMismatch = "The key does not fit the SignatureMethod.";

	public const string Cryptography_Xml_SignatureMethodRequired = "A signature method is required.";

	public const string Cryptography_Xml_SignatureValueRequired = "Signature requires a SignatureValue.";

	public const string Cryptography_Xml_SignedInfoRequired = "Signature requires a SignedInfo.";

	public const string Cryptography_Xml_TransformIncorrectInputType = "The input type was invalid for this transform.";

	public const string Cryptography_Xml_IncorrectObjectType = "Type of input object is invalid.";

	public const string Cryptography_Xml_UnknownTransform = "Unknown transform has been encountered.";

	public const string Cryptography_Xml_UriNotResolved = "Unable to resolve Uri {0}.";

	public const string Cryptography_Xml_UriNotSupported = " The specified Uri is not supported.";

	public const string Cryptography_Xml_UriRequired = "A Uri attribute is required for a CipherReference element.";

	public const string Cryptography_Xml_XrmlMissingContext = "Null Context property encountered.";

	public const string Cryptography_Xml_XrmlMissingIRelDecryptor = "IRelDecryptor is required.";

	public const string Cryptography_Xml_XrmlMissingIssuer = "Issuer node is required.";

	public const string Cryptography_Xml_XrmlMissingLicence = "License node is required.";

	public const string Cryptography_Xml_XrmlUnableToDecryptGrant = "Unable to decrypt grant content.";

	public const string NotSupported_KeyAlgorithm = "The certificate key algorithm is not supported.";

	public const string Log_ActualHashValue = "Actual hash value: {0}";

	public const string Log_BeginCanonicalization = "Beginning canonicalization using \"{0}\" ({1}).";

	public const string Log_BeginSignatureComputation = "Beginning signature computation.";

	public const string Log_BeginSignatureVerification = "Beginning signature verification.";

	public const string Log_BuildX509Chain = "Building and verifying the X509 chain for certificate {0}.";

	public const string Log_CanonicalizationSettings = "Canonicalization transform is using resolver {0} and base URI \"{1}\".";

	public const string Log_CanonicalizedOutput = "Output of canonicalization transform: {0}";

	public const string Log_CertificateChain = "Certificate chain:";

	public const string Log_CheckSignatureFormat = "Checking signature format using format validator \"[{0}] {1}.{2}\".";

	public const string Log_CheckSignedInfo = "Checking signature on SignedInfo with id \"{0}\".";

	public const string Log_FormatValidationSuccessful = "Signature format validation was successful.";

	public const string Log_FormatValidationNotSuccessful = "Signature format validation failed.";

	public const string Log_KeyUsages = "Found key usages \"{0}\" in extension {1} on certificate {2}.";

	public const string Log_NoNamespacesPropagated = "No namespaces are being propagated.";

	public const string Log_PropagatingNamespace = "Propagating namespace {0}=\"{1}\".";

	public const string Log_RawSignatureValue = "Raw signature: {0}";

	public const string Log_ReferenceHash = "Reference {0} hashed with \"{1}\" ({2}) has hash value {3}, expected hash value {4}.";

	public const string Log_RevocationMode = "Revocation mode for chain building: {0}.";

	public const string Log_RevocationFlag = "Revocation flag for chain building: {0}.";

	public const string Log_SigningAsymmetric = "Calculating signature with key {0} using signature description {1}, hash algorithm {2}, and asymmetric signature formatter {3}.";

	public const string Log_SigningHmac = "Calculating signature using keyed hash algorithm {0}.";

	public const string Log_SigningReference = "Hashing reference {0}, Uri \"{1}\", Id \"{2}\", Type \"{3}\" with hash algorithm \"{4}\" ({5}).";

	public const string Log_TransformedReferenceContents = "Transformed reference contents: {0}";

	public const string Log_UnsafeCanonicalizationMethod = "Canonicalization method \"{0}\" is not on the safe list. Safe canonicalization methods are: {1}.";

	public const string Log_UrlTimeout = "URL retrieval timeout for chain building: {0}.";

	public const string Log_VerificationFailed = "Verification failed checking {0}.";

	public const string Log_VerificationFailed_References = "references";

	public const string Log_VerificationFailed_SignedInfo = "SignedInfo";

	public const string Log_VerificationFailed_X509Chain = "X509 chain verification";

	public const string Log_VerificationFailed_X509KeyUsage = "X509 key usage verification";

	public const string Log_VerificationFlag = "Verification flags for chain building: {0}.";

	public const string Log_VerificationTime = "Verification time for chain building: {0}.";

	public const string Log_VerificationWithKeySuccessful = "Verification with key {0} was successful.";

	public const string Log_VerificationWithKeyNotSuccessful = "Verification with key {0} was not successful.";

	public const string Log_VerifyReference = "Processing reference {0}, Uri \"{1}\", Id \"{2}\", Type \"{3}\".";

	public const string Log_VerifySignedInfoAsymmetric = "Verifying SignedInfo using key {0}, signature description {1}, hash algorithm {2}, and asymmetric signature deformatter {3}.";

	public const string Log_VerifySignedInfoHmac = "Verifying SignedInfo using keyed hash algorithm {0}.";

	public const string Log_X509ChainError = "Error building X509 chain: {0}: {1}.";

	public const string Log_XmlContext = "Using context: {0}";

	public const string Log_SignedXmlRecursionLimit = "Signed xml recursion limit hit while trying to decrypt the key. Reference {0} hashed with \"{1}\" and ({2}).";

	public const string Log_UnsafeTransformMethod = "Transform method \"{0}\" is not on the safe list. Safe transform methods are: {1}.";
}
namespace Mono.Security.Cryptography
{
	internal static class ManagedProtection
	{
		private static RSA user;

		private static RSA machine;

		private static readonly object user_lock = new object();

		private static readonly object machine_lock = new object();

		public static byte[] Protect(byte[] userData, byte[] optionalEntropy, DataProtectionScope scope)
		{
			if (userData == null)
			{
				throw new ArgumentNullException("userData");
			}
			Rijndael rijndael = Rijndael.Create();
			rijndael.KeySize = 128;
			byte[] array = null;
			using (MemoryStream memoryStream = new MemoryStream())
			{
				ICryptoTransform transform = rijndael.CreateEncryptor();
				using CryptoStream cryptoStream = new CryptoStream(memoryStream, transform, CryptoStreamMode.Write);
				cryptoStream.Write(userData, 0, userData.Length);
				cryptoStream.Close();
				array = memoryStream.ToArray();
			}
			byte[] array2 = null;
			byte[] array3 = null;
			byte[] array4 = null;
			byte[] array5 = null;
			SHA256 sHA = SHA256.Create();
			try
			{
				array2 = rijndael.Key;
				array3 = rijndael.IV;
				array4 = new byte[68];
				byte[] src = sHA.ComputeHash(userData);
				if (optionalEntropy != null && optionalEntropy.Length != 0)
				{
					byte[] array6 = sHA.ComputeHash(optionalEntropy);
					for (int i = 0; i < 16; i++)
					{
						array2[i] ^= array6[i];
						array3[i] ^= array6[i + 16];
					}
					array4[0] = 2;
				}
				else
				{
					array4[0] = 1;
				}
				array4[1] = 16;
				Buffer.BlockCopy(array2, 0, array4, 2, 16);
				array4[18] = 16;
				Buffer.BlockCopy(array3, 0, array4, 19, 16);
				array4[35] = 32;
				Buffer.BlockCopy(src, 0, array4, 36, 32);
				array5 = new RSAOAEPKeyExchangeFormatter(GetKey(scope)).CreateKeyExchange(array4);
			}
			finally
			{
				if (array2 != null)
				{
					Array.Clear(array2, 0, array2.Length);
					array2 = null;
				}
				if (array4 != null)
				{
					Array.Clear(array4, 0, array4.Length);
					array4 = null;
				}
				if (array3 != null)
				{
					Array.Clear(array3, 0, array3.Length);
					array3 = null;
				}
				rijndael.Clear();
				sHA.Clear();
			}
			byte[] array7 = new byte[array5.Length + array.Length];
			Buffer.BlockCopy(array5, 0, array7, 0, array5.Length);
			Buffer.BlockCopy(array, 0, array7, array5.Length, array.Length);
			return array7;
		}

		public static byte[] Unprotect(byte[] encryptedData, byte[] optionalEntropy, DataProtectionScope scope)
		{
			if (encryptedData == null)
			{
				throw new ArgumentNullException("encryptedData");
			}
			byte[] array = null;
			Rijndael rijndael = Rijndael.Create();
			RSA key = GetKey(scope);
			int num = key.KeySize >> 3;
			bool flag = encryptedData.Length >= num;
			if (!flag)
			{
				num = encryptedData.Length;
			}
			byte[] array2 = new byte[num];
			Buffer.BlockCopy(encryptedData, 0, array2, 0, num);
			byte[] array3 = null;
			byte[] array4 = null;
			byte[] array5 = null;
			bool flag2 = false;
			bool flag3 = false;
			bool flag4 = false;
			SHA256 sHA = SHA256.Create();
			try
			{
				try
				{
					array3 = new RSAOAEPKeyExchangeDeformatter(key).DecryptKeyExchange(array2);
					flag2 = array3.Length == 68;
				}
				catch
				{
					flag2 = false;
				}
				if (!flag2)
				{
					array3 = new byte[68];
				}
				flag3 = array3[1] == 16 && array3[18] == 16 && array3[35] == 32;
				array4 = new byte[16];
				Buffer.BlockCopy(array3, 2, array4, 0, 16);
				array5 = new byte[16];
				Buffer.BlockCopy(array3, 19, array5, 0, 16);
				if (optionalEntropy != null && optionalEntropy.Length != 0)
				{
					byte[] array6 = sHA.ComputeHash(optionalEntropy);
					for (int i = 0; i < 16; i++)
					{
						array4[i] ^= array6[i];
						array5[i] ^= array6[i + 16];
					}
					flag3 &= array3[0] == 2;
				}
				else
				{
					flag3 &= array3[0] == 1;
				}
				using (MemoryStream memoryStream = new MemoryStream())
				{
					ICryptoTransform transform = rijndael.CreateDecryptor(array4, array5);
					using (CryptoStream cryptoStream = new CryptoStream(memoryStream, transform, CryptoStreamMode.Write))
					{
						try
						{
							cryptoStream.Write(encryptedData, num, encryptedData.Length - num);
							cryptoStream.Close();
						}
						catch
						{
						}
					}
					array = memoryStream.ToArray();
				}
				byte[] array7 = sHA.ComputeHash(array);
				flag4 = true;
				for (int j = 0; j < 32; j++)
				{
					if (array7[j] != array3[36 + j])
					{
						flag4 = false;
					}
				}
			}
			finally
			{
				if (array4 != null)
				{
					Array.Clear(array4, 0, array4.Length);
					array4 = null;
				}
				if (array3 != null)
				{
					Array.Clear(array3, 0, array3.Length);
					array3 = null;
				}
				if (array5 != null)
				{
					Array.Clear(array5, 0, array5.Length);
					array5 = null;
				}
				rijndael.Clear();
				sHA.Clear();
			}
			if (!flag || !flag2 || !flag3 || !flag4)
			{
				if (array != null)
				{
					Array.Clear(array, 0, array.Length);
					array = null;
				}
				throw new CryptographicException(Locale.GetText("Invalid data."));
			}
			return array;
		}

		private static RSA GetKey(DataProtectionScope scope)
		{
			switch (scope)
			{
			case DataProtectionScope.CurrentUser:
				if (user == null)
				{
					lock (user_lock)
					{
						CspParameters cspParameters2 = new CspParameters();
						cspParameters2.KeyContainerName = "DAPI";
						user = new RSACryptoServiceProvider(1536, cspParameters2);
					}
				}
				return user;
			case DataProtectionScope.LocalMachine:
				if (machine == null)
				{
					lock (machine_lock)
					{
						CspParameters cspParameters = new CspParameters();
						cspParameters.KeyContainerName = "DAPI";
						cspParameters.Flags = CspProviderFlags.UseMachineKeyStore;
						machine = new RSACryptoServiceProvider(1536, cspParameters);
					}
				}
				return machine;
			default:
				throw new CryptographicException(Locale.GetText("Invalid scope."));
			}
		}
	}
	internal class NativeDapiProtection
	{
		[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
		private struct DATA_BLOB
		{
			private int cbData;

			private IntPtr pbData;

			public void Alloc(int size)
			{
				if (size > 0)
				{
					pbData = Marshal.AllocHGlobal(size);
					cbData = size;
				}
			}

			public void Alloc(byte[] managedMemory)
			{
				if (managedMemory != null)
				{
					int cb = managedMemory.Length;
					pbData = Marshal.AllocHGlobal(cb);
					cbData = cb;
					Marshal.Copy(managedMemory, 0, pbData, cbData);
				}
			}

			public void Free()
			{
				if (pbData != IntPtr.Zero)
				{
					ZeroMemory(pbData, cbData);
					Marshal.FreeHGlobal(pbData);
					pbData = IntPtr.Zero;
					cbData = 0;
				}
			}

			public byte[] ToBytes()
			{
				if (cbData <= 0)
				{
					return new byte[0];
				}
				byte[] array = new byte[cbData];
				Marshal.Copy(pbData, array, 0, cbData);
				return array;
			}
		}

		[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
		private struct CRYPTPROTECT_PROMPTSTRUCT
		{
			private int cbSize;

			private uint dwPromptFlags;

			private IntPtr hwndApp;

			private string szPrompt;

			public CRYPTPROTECT_PROMPTSTRUCT(uint flags)
			{
				cbSize = Marshal.SizeOf(typeof(CRYPTPROTECT_PROMPTSTRUCT));
				dwPromptFlags = flags;
				hwndApp = IntPtr.Zero;
				szPrompt = null;
			}
		}

		private const uint CRYPTPROTECT_UI_FORBIDDEN = 1u;

		private const uint CRYPTPROTECT_LOCAL_MACHINE = 4u;

		[DllImport("crypt32.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Auto, SetLastError = true)]
		[SuppressUnmanagedCodeSecurity]
		private static extern bool CryptProtectData(ref DATA_BLOB pDataIn, string szDataDescr, ref DATA_BLOB pOptionalEntropy, IntPtr pvReserved, ref CRYPTPROTECT_PROMPTSTRUCT pPromptStruct, uint dwFlags, ref DATA_BLOB pDataOut);

		[DllImport("crypt32.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Auto, SetLastError = true)]
		[SuppressUnmanagedCodeSecurity]
		private static extern bool CryptUnprotectData(ref DATA_BLOB pDataIn, string szDataDescr, ref DATA_BLOB pOptionalEntropy, IntPtr pvReserved, ref CRYPTPROTECT_PROMPTSTRUCT pPromptStruct, uint dwFlags, ref DATA_BLOB pDataOut);

		[DllImport("kernel32.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Auto, EntryPoint = "RtlZeroMemory")]
		[SuppressUnmanagedCodeSecurity]
		private static extern void ZeroMemory(IntPtr dest, int size);

		public static byte[] Protect(byte[] userData, byte[] optionalEntropy, DataProtectionScope scope)
		{
			byte[] array = null;
			int num = 0;
			DATA_BLOB pDataIn = default(DATA_BLOB);
			DATA_BLOB pOptionalEntropy = default(DATA_BLOB);
			DATA_BLOB pDataOut = default(DATA_BLOB);
			try
			{
				CRYPTPROTECT_PROMPTSTRUCT pPromptStruct = new CRYPTPROTECT_PROMPTSTRUCT(0u);
				pDataIn.Alloc(userData);
				pOptionalEntropy.Alloc(optionalEntropy);
				uint num2 = 1u;
				if (scope == DataProtectionScope.LocalMachine)
				{
					num2 |= 4u;
				}
				if (CryptProtectData(ref pDataIn, string.Empty, ref pOptionalEntropy, IntPtr.Zero, ref pPromptStruct, num2, ref pDataOut))
				{
					array = pDataOut.ToBytes();
				}
				else
				{
					num = Marshal.GetLastWin32Error();
				}
			}
			catch (Exception inner)
			{
				throw new CryptographicException(Locale.GetText("Error protecting data."), inner);
			}
			finally
			{
				pDataOut.Free();
				pDataIn.Free();
				pOptionalEntropy.Free();
			}
			if (array == null || num != 0)
			{
				throw new CryptographicException(num);
			}
			return array;
		}

		public static byte[] Unprotect(byte[] encryptedData, byte[] optionalEntropy, DataProtectionScope scope)
		{
			byte[] array = null;
			int num = 0;
			DATA_BLOB pDataIn = default(DATA_BLOB);
			DATA_BLOB pOptionalEntropy = default(DATA_BLOB);
			DATA_BLOB pDataOut = default(DATA_BLOB);
			try
			{
				CRYPTPROTECT_PROMPTSTRUCT pPromptStruct = new CRYPTPROTECT_PROMPTSTRUCT(0u);
				pDataIn.Alloc(encryptedData);
				pOptionalEntropy.Alloc(optionalEntropy);
				uint num2 = 1u;
				if (scope == DataProtectionScope.LocalMachine)
				{
					num2 |= 4u;
				}
				if (CryptUnprotectData(ref pDataIn, null, ref pOptionalEntropy, IntPtr.Zero, ref pPromptStruct, num2, ref pDataOut))
				{
					array = pDataOut.ToBytes();
				}
				else
				{
					num = Marshal.GetLastWin32Error();
				}
			}
			catch (Exception inner)
			{
				throw new CryptographicException(Locale.GetText("Error protecting data."), inner);
			}
			finally
			{
				pDataIn.Free();
				pDataOut.Free();
				pOptionalEntropy.Free();
			}
			if (array == null || num != 0)
			{
				throw new CryptographicException(num);
			}
			return array;
		}
	}
}
namespace System
{
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoTODOAttribute : Attribute
	{
		private string comment;

		public string Comment => comment;

		public MonoTODOAttribute()
		{
		}

		public MonoTODOAttribute(string comment)
		{
			this.comment = comment;
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoDocumentationNoteAttribute : MonoTODOAttribute
	{
		public MonoDocumentationNoteAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoExtensionAttribute : MonoTODOAttribute
	{
		public MonoExtensionAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoInternalNoteAttribute : MonoTODOAttribute
	{
		public MonoInternalNoteAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoLimitationAttribute : MonoTODOAttribute
	{
		public MonoLimitationAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoNotSupportedAttribute : MonoTODOAttribute
	{
		public MonoNotSupportedAttribute(string comment)
			: base(comment)
		{
		}
	}
}
namespace System.Security.Permissions
{
	[Serializable]
	public sealed class DataProtectionPermission : CodeAccessPermission, IUnrestrictedPermission
	{
		private const int version = 1;

		private DataProtectionPermissionFlags _flags;

		public DataProtectionPermissionFlags Flags
		{
			get
			{
				return _flags;
			}
			set
			{
				if (((uint)value & 0xFFFFFFF0u) != 0)
				{
					throw new ArgumentException(string.Format(Locale.GetText("Invalid enum {0}"), value), "DataProtectionPermissionFlags");
				}
				_flags = value;
			}
		}

		public DataProtectionPermission(PermissionState state)
		{
			if (PermissionHelper.CheckPermissionState(state, allowUnrestricted: true) == PermissionState.Unrestricted)
			{
				_flags = DataProtectionPermissionFlags.AllFlags;
			}
		}

		public DataProtectionPermission(DataProtectionPermissionFlags flag)
		{
			Flags = flag;
		}

		public bool IsUnrestricted()
		{
			return _flags == DataProtectionPermissionFlags.AllFlags;
		}

		public override IPermission Copy()
		{
			return (IPermission)(object)new DataProtectionPermission(_flags);
		}

		public override IPermission Intersect(IPermission target)
		{
			DataProtectionPermission dataProtectionPermission = Cast(target);
			if (dataProtectionPermission == null)
			{
				return null;
			}
			if (IsUnrestricted() && dataProtectionPermission.IsUnrestricted())
			{
				return (IPermission)(object)new DataProtectionPermission(PermissionState.Unrestricted);
			}
			if (IsUnrestricted())
			{
				return ((CodeAccessPermission)dataProtectionPermission).Copy();
			}
			if (dataProtectionPermission.IsUnrestricted())
			{
				return ((CodeAccessPermission)this).Copy();
			}
			return (IPermission)(object)new DataProtectionPermission(_flags & dataProtectionPermission._flags);
		}

		public override IPermission Union(IPermission target)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Expected O, but got Unknown
			DataProtectionPermission dataProtectionPermission = Cast(target);
			if (dataProtectionPermission == null)
			{
				return ((CodeAccessPermission)this).Copy();
			}
			if (IsUnrestricted() || dataProtectionPermission.IsUnrestricted())
			{
				return (IPermission)new SecurityPermission(PermissionState.Unrestricted);
			}
			return (IPermission)(object)new DataProtectionPermission(_flags | dataProtectionPermission._flags);
		}

		public override bool IsSubsetOf(IPermission target)
		{
			DataProtectionPermission dataProtectionPermission = Cast(target);
			if (dataProtectionPermission == null)
			{
				return _flags == DataProtectionPermissionFlags.NoFlags;
			}
			if (dataProtectionPermission.IsUnrestricted())
			{
				return true;
			}
			if (IsUnrestricted())
			{
				return false;
			}
			return (_flags & ~dataProtectionPermission._flags) == 0;
		}

		public override void FromXml(SecurityElement securityElement)
		{
			PermissionHelper.CheckSecurityElement(securityElement, "securityElement", 1, 1);
			_flags = (DataProtectionPermissionFlags)Enum.Parse(typeof(DataProtectionPermissionFlags), securityElement.Attribute("Flags"));
		}

		public override SecurityElement ToXml()
		{
			SecurityElement securityElement = PermissionHelper.Element(typeof(DataProtectionPermission), 1);
			securityElement.AddAttribute("Flags", _flags.ToString());
			return securityElement;
		}

		private DataProtectionPermission Cast(IPermission target)
		{
			if (target == null)
			{
				return null;
			}
			DataProtectionPermission obj = target as DataProtectionPermission;
			if (obj == null)
			{
				PermissionHelper.ThrowInvalidPermission(target, typeof(DataProtectionPermission));
			}
			return obj;
		}
	}
	[Serializable]
	[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method, AllowMultiple = true, Inherited = false)]
	public sealed class DataProtectionPermissionAttribute : CodeAccessSecurityAttribute
	{
		private DataProtectionPermissionFlags _flags;

		public DataProtectionPermissionFlags Flags
		{
			get
			{
				return _flags;
			}
			set
			{
				if ((value & DataProtectionPermissionFlags.AllFlags) != value)
				{
					throw new ArgumentException(string.Format(Locale.GetText("Invalid flags {0}"), value), "DataProtectionPermissionFlags");
				}
				_flags = value;
			}
		}

		public bool ProtectData
		{
			get
			{
				return (_flags & DataProtectionPermissionFlags.ProtectData) != 0;
			}
			set
			{
				if (value)
				{
					_flags |= DataProtectionPermissionFlags.ProtectData;
				}
				else
				{
					_flags &= ~DataProtectionPermissionFlags.ProtectData;
				}
			}
		}

		public bool UnprotectData
		{
			get
			{
				return (_flags & DataProtectionPermissionFlags.UnprotectData) != 0;
			}
			set
			{
				if (value)
				{
					_flags |= DataProtectionPermissionFlags.UnprotectData;
				}
				else
				{
					_flags &= ~DataProtectionPermissionFlags.UnprotectData;
				}
			}
		}

		public bool ProtectMemory
		{
			get
			{
				return (_flags & DataProtectionPermissionFlags.ProtectMemory) != 0;
			}
			set
			{
				if (value)
				{
					_flags |= DataProtectionPermissionFlags.ProtectMemory;
				}
				else
				{
					_flags &= ~DataProtectionPermissionFlags.ProtectMemory;
				}
			}
		}

		public bool UnprotectMemory
		{
			get
			{
				return (_flags & DataProtectionPermissionFlags.UnprotectMemory) != 0;
			}
			set
			{
				if (value)
				{
					_flags |= DataProtectionPermissionFlags.UnprotectMemory;
				}
				else
				{
					_flags &= ~DataProtectionPermissionFlags.UnprotectMemory;
				}
			}
		}

		public DataProtectionPermissionAttribute(SecurityAction action)
			: base(action)
		{
		}

		public override IPermission CreatePermission()
		{
			DataProtectionPermission dataProtectionPermission = null;
			if (base.Unrestricted)
			{
				return (IPermission)(object)new DataProtectionPermission(PermissionState.Unrestricted);
			}
			return (IPermission)(object)new DataProtectionPermission(_flags);
		}
	}
	[Serializable]
	[Flags]
	public enum DataProtectionPermissionFlags
	{
		NoFlags = 0,
		ProtectData = 1,
		UnprotectData = 2,
		ProtectMemory = 4,
		UnprotectMemory = 8,
		AllFlags = 0xF
	}
	internal sealed class PermissionHelper
	{
		internal static SecurityElement Element(Type type, int version)
		{
			SecurityElement securityElement = new SecurityElement("IPermission");
			securityElement.AddAttribute("class", type.FullName + ", " + type.Assembly.ToString().Replace('"', '\''));
			securityElement.AddAttribute("version", version.ToString());
			return securityElement;
		}

		internal static PermissionState CheckPermissionState(PermissionState state, bool allowUnrestricted)
		{
			switch (state)
			{
			case PermissionState.Unrestricted:
				if (!allowUnrestricted)
				{
					throw new ArgumentException(Locale.GetText("Unrestricted isn't not allowed for identity permissions."), "state");
				}
				break;
			default:
				throw new ArgumentException(string.Format(Locale.GetText("Invalid enum {0}"), state), "state");
			case PermissionState.None:
				break;
			}
			return state;
		}

		internal static int CheckSecurityElement(SecurityElement se, string parameterName, int minimumVersion, int maximumVersion)
		{
			if (se == null)
			{
				throw new ArgumentNullException(parameterName);
			}
			if (se.Attribute("class") == null)
			{
				throw new ArgumentException(Locale.GetText("Missing 'class' attribute."), parameterName);
			}
			int num = minimumVersion;
			string text = se.Attribute("version");
			if (text != null)
			{
				try
				{
					num = int.Parse(text);
				}
				catch (Exception innerException)
				{
					throw new ArgumentException(string.Format(Locale.GetText("Couldn't parse version from '{0}'."), text), parameterName, innerException);
				}
			}
			if (num < minimumVersion || num > maximumVersion)
			{
				throw new ArgumentException(string.Format(Locale.GetText("Unknown version '{0}', expected versions between ['{1}','{2}']."), num, minimumVersion, maximumVersion), parameterName);
			}
			return num;
		}

		internal static bool IsUnrestricted(SecurityElement se)
		{
			string text = se.Attribute("Unrestricted");
			if (text == null)
			{
				return false;
			}
			return string.Compare(text, bool.TrueString, ignoreCase: true, CultureInfo.InvariantCulture) == 0;
		}

		internal static void ThrowInvalidPermission(IPermission target, Type expected)
		{
			throw new ArgumentException(string.Format(Locale.GetText("Invalid permission type '{0}', expected type '{1}'."), target.GetType(), expected), "target");
		}
	}
}
namespace System.Security.Cryptography
{
	public sealed class CryptographicAttributeObject
	{
		private Oid _oid;

		private AsnEncodedDataCollection _list;

		public Oid Oid => _oid;

		public AsnEncodedDataCollection Values => _list;

		public CryptographicAttributeObject(Oid oid)
		{
			if (oid == null)
			{
				throw new ArgumentNullException("oid");
			}
			_oid = new Oid(oid);
			_list = new AsnEncodedDataCollection();
		}

		public CryptographicAttributeObject(Oid oid, AsnEncodedDataCollection values)
		{
			if (oid == null)
			{
				throw new ArgumentNullException("oid");
			}
			_oid = new Oid(oid);
			if (values == null)
			{
				_list = new AsnEncodedDataCollection();
			}
			else
			{
				_list = values;
			}
		}
	}
	public sealed class CryptographicAttributeObjectCollection : ICollection, IEnumerable
	{
		private ArrayList _list;

		public int Count => _list.Count;

		public bool IsSynchronized => _list.IsSynchronized;

		public CryptographicAttributeObject this[int index] => (CryptographicAttributeObject)_list[index];

		public object SyncRoot => this;

		public CryptographicAttributeObjectCollection()
		{
			_list = new ArrayList();
		}

		public CryptographicAttributeObjectCollection(CryptographicAttributeObject attribute)
			: this()
		{
			_list.Add(attribute);
		}

		public int Add(AsnEncodedData asnEncodedData)
		{
			if (asnEncodedData == null)
			{
				throw new ArgumentNullException("asnEncodedData");
			}
			AsnEncodedDataCollection values = new AsnEncodedDataCollection(asnEncodedData);
			return Add(new CryptographicAttributeObject(asnEncodedData.Oid, values));
		}

		public int Add(CryptographicAttributeObject attribute)
		{
			if (attribute == null)
			{
				throw new ArgumentNullException("attribute");
			}
			int num = -1;
			string value = attribute.Oid.Value;
			for (int i = 0; i < _list.Count; i++)
			{
				if ((_list[i] as CryptographicAttributeObject).Oid.Value == value)
				{
					num = i;
					break;
				}
			}
			if (num >= 0)
			{
				CryptographicAttributeObject cryptographicAttributeObject = this[num];
				AsnEncodedDataEnumerator enumerator = attribute.Values.GetEnumerator();
				while (enumerator.MoveNext())
				{
					AsnEncodedData current = enumerator.Current;
					cryptographicAttributeObject.Values.Add(current);
				}
				return num;
			}
			return _list.Add(attribute);
		}

		public void CopyTo(CryptographicAttributeObject[] array, int index)
		{
			_list.CopyTo(array, index);
		}

		void ICollection.CopyTo(Array array, int index)
		{
			_list.CopyTo(array, index);
		}

		public CryptographicAttributeObjectEnumerator GetEnumerator()
		{
			return new CryptographicAttributeObjectEnumerator(_list);
		}

		IEnumerator IEnumerable.GetEnumerator()
		{
			return new CryptographicAttributeObjectEnumerator(_list);
		}

		public void Remove(CryptographicAttributeObject attribute)
		{
			if (attribute == null)
			{
				throw new ArgumentNullException("attribute");
			}
			_list.Remove(attribute);
		}
	}
	public sealed class CryptographicAttributeObjectEnumerator : IEnumerator
	{
		private IEnumerator enumerator;

		public CryptographicAttributeObject Current => (CryptographicAttributeObject)enumerator.Current;

		object IEnumerator.Current => enumerator.Current;

		internal CryptographicAttributeObjectEnumerator(IEnumerable enumerable)
		{
			enumerator = enumerable.GetEnumerator();
		}

		public bool MoveNext()
		{
			return enumerator.MoveNext();
		}

		public void Reset()
		{
			enumerator.Reset();
		}

		internal CryptographicAttributeObjectEnumerator()
		{
			ThrowStub.ThrowNotSupportedException();
		}
	}
	public enum DataProtectionScope
	{
		CurrentUser,
		LocalMachine
	}
	public enum MemoryProtectionScope
	{
		SameProcess,
		CrossProcess,
		SameLogon
	}
	public sealed class ProtectedData
	{
		private enum DataProtectionImplementation
		{
			Unknown = 0,
			Win32CryptoProtect = 1,
			ManagedProtection = 2,
			Unsupported = int.MinValue
		}

		private static DataProtectionImplementation impl;

		private ProtectedData()
		{
		}

		public static byte[] Protect(byte[] userData, byte[] optionalEntropy, DataProtectionScope scope)
		{
			if (userData == null)
			{
				throw new ArgumentNullException("userData");
			}
			Check(scope);
			switch (impl)
			{
			case DataProtectionImplementation.ManagedProtection:
				try
				{
					return ManagedProtection.Protect(userData, optionalEntropy, scope);
				}
				catch (Exception inner2)
				{
					throw new CryptographicException(Locale.GetText("Data protection failed."), inner2);
				}
			case DataProtectionImplementation.Win32CryptoProtect:
				try
				{
					return NativeDapiProtection.Protect(userData, optionalEntropy, scope);
				}
				catch (Exception inner)
				{
					throw new CryptographicException(Locale.GetText("Data protection failed."), inner);
				}
			default:
				throw new PlatformNotSupportedException();
			}
		}

		public static byte[] Unprotect(byte[] encryptedData, byte[] optionalEntropy, DataProtectionScope scope)
		{
			if (encryptedData == null)
			{
				throw new ArgumentNullException("encryptedData");
			}
			Check(scope);
			switch (impl)
			{
			case DataProtectionImplementation.ManagedProtection:
				try
				{
					return ManagedProtection.Unprotect(encryptedData, optionalEntropy, scope);
				}
				catch (Exception inner2)
				{
					throw new CryptographicException(Locale.GetText("Data unprotection failed."), inner2);
				}
			case DataProtectionImplementation.Win32CryptoProtect:
				try
				{
					return NativeDapiProtection.Unprotect(encryptedData, optionalEntropy, scope);
				}
				catch (Exception inner)
				{
					throw new CryptographicException(Locale.GetText("Data unprotection failed."), inner);
				}
			default:
				throw new PlatformNotSupportedException();
			}
		}

		private static void Detect()
		{
			OperatingSystem oSVersion = Environment.OSVersion;
			switch (oSVersion.Platform)
			{
			case PlatformID.Win32NT:
				if (oSVersion.Version.Major < 5)
				{
					impl = DataProtectionImplementation.Unsupported;
				}
				else
				{
					impl = DataProtectionImplementation.Win32CryptoProtect;
				}
				break;
			case PlatformID.Unix:
				impl = DataProtectionImplementation.ManagedProtection;
				break;
			default:
				impl = DataProtectionImplementation.Unsupported;
				break;
			}
		}

		private static void Check(DataProtectionScope scope)
		{
			if (scope < DataProtectionScope.CurrentUser || scope > DataProtectionScope.LocalMachine)
			{
				throw new ArgumentException(Locale.GetText("Invalid enum value '{0}' for '{1}'.", scope, "DataProtectionScope"), "scope");
			}
			switch (impl)
			{
			case DataProtectionImplementation.Unknown:
				Detect();
				break;
			case DataProtectionImplementation.Unsupported:
				throw new PlatformNotSupportedException();
			}
		}
	}
	public sealed class ProtectedMemory
	{
		private enum MemoryProtectionImplementation
		{
			Unknown = 0,
			Win32RtlEncryptMemory = 1,
			Win32CryptoProtect = 2,
			Unsupported = int.MinValue
		}

		private const int BlockSize = 16;

		private static MemoryProtectionImplementation impl;

		private ProtectedMemory()
		{
		}

		[MonoTODO("only supported on Windows 2000 SP3 and later")]
		public static void Protect(byte[] userData, MemoryProtectionScope scope)
		{
			if (userData == null)
			{
				throw new ArgumentNullException("userData");
			}
			Check(userData.Length, scope);
			try
			{
				uint cbData = (uint)userData.Length;
				switch (impl)
				{
				case MemoryProtectionImplementation.Win32RtlEncryptMemory:
				{
					int num = RtlEncryptMemory(userData, cbData, (uint)scope);
					if (num < 0)
					{
						throw new CryptographicException(Locale.GetText("Error. NTSTATUS = {0}.", num));
					}
					break;
				}
				case MemoryProtectionImplementation.Win32CryptoProtect:
					if (!CryptProtectMemory(userData, cbData, (uint)scope))
					{
						throw new CryptographicException(Marshal.GetLastWin32Error());
					}
					break;
				default:
					throw new PlatformNotSupportedException();
				}
			}
			catch
			{
				impl = MemoryProtectionImplementation.Unsupported;
				throw new PlatformNotSupportedException();
			}
		}

		[MonoTODO("only supported on Windows 2000 SP3 and later")]
		public static void Unprotect(byte[] encryptedData, MemoryProtectionScope scope)
		{
			if (encryptedData == null)
			{
				throw new ArgumentNullException("encryptedData");
			}
			Check(encryptedData.Length, scope);
			try
			{
				uint cbData = (uint)encryptedData.Length;
				switch (impl)
				{
				case MemoryProtectionImplementation.Win32RtlEncryptMemory:
				{
					int num = RtlDecryptMemory(encryptedData, cbData, (uint)scope);
					if (num < 0)
					{
						throw new CryptographicException(Locale.GetText("Error. NTSTATUS = {0}.", num));
					}
					break;
				}
				case MemoryProtectionImplementation.Win32CryptoProtect:
					if (!CryptUnprotectMemory(encryptedData, cbData, (uint)scope))
					{
						throw new CryptographicException(Marshal.GetLastWin32Error());
					}
					break;
				default:
					throw new PlatformNotSupportedException();
				}
			}
			catch
			{
				impl = MemoryProtectionImplementation.Unsupported;
				throw new PlatformNotSupportedException();
			}
		}

		private static void Detect()
		{
			OperatingSystem oSVersion = Environment.OSVersion;
			PlatformID platform = oSVersion.Platform;
			if (platform == PlatformID.Win32NT)
			{
				Version version = oSVersion.Version;
				if (version.Major < 5)
				{
					impl = MemoryProtectionImplementation.Unsupported;
				}
				else if (version.Major == 5)
				{
					if (version.Minor < 2)
					{
						impl = MemoryProtectionImplementation.Win32RtlEncryptMemory;
					}
					else
					{
						impl = MemoryProtectionImplementation.Win32CryptoProtect;
					}
				}
				else
				{
					impl = MemoryProtectionImplementation.Win32CryptoProtect;
				}
			}
			else
			{
				impl = MemoryProtectionImplementation.Unsupported;
			}
		}

		private static void Check(int size, MemoryProtectionScope scope)
		{
			if (size % 16 != 0)
			{
				throw new CryptographicException(Locale.GetText("Not a multiple of {0} bytes.", 16));
			}
			if (scope < MemoryProtectionScope.SameProcess || scope > MemoryProtectionScope.SameLogon)
			{
				throw new ArgumentException(Locale.GetText("Invalid enum value for '{0}'.", "MemoryProtectionScope"), "scope");
			}
			switch (impl)
			{
			case MemoryProtectionImplementation.Unknown:
				Detect();
				break;
			case MemoryProtectionImplementation.Unsupported:
				throw new PlatformNotSupportedException();
			}
		}

		[DllImport("advapi32.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Auto, EntryPoint = "SystemFunction040", SetLastError = true)]
		[SuppressUnmanagedCodeSecurity]
		private static extern int RtlEncryptMemory(byte[] pData, uint cbData, uint dwFlags);

		[DllImport("advapi32.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Auto, EntryPoint = "SystemFunction041", SetLastError = true)]
		[SuppressUnmanagedCodeSecurity]
		private static extern int RtlDecryptMemory(byte[] pData, uint cbData, uint dwFlags);

		[DllImport("crypt32.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Auto, SetLastError = true)]
		[SuppressUnmanagedCodeSecurity]
		private static extern bool CryptProtectMemory(byte[] pData, uint cbData, uint dwFlags);

		[DllImport("crypt32.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Auto, SetLastError = true)]
		[SuppressUnmanagedCodeSecurity]
		private static extern bool CryptUnprotectMemory(byte[] pData, uint cbData, uint dwFlags);
	}
}
namespace System.Security.Cryptography.Pkcs
{
	public sealed class AlgorithmIdentifier
	{
		private Oid _oid;

		private int _length;

		private byte[] _params;

		public int KeyLength
		{
			get
			{
				return _length;
			}
			set
			{
				_length = value;
			}
		}

		public Oid Oid
		{
			get
			{
				return _oid;
			}
			set
			{
				_oid = value;
			}
		}

		public byte[] Parameters
		{
			get
			{
				return _params;
			}
			set
			{
				_params = value;
			}
		}

		public AlgorithmIdentifier()
		{
			_oid = new Oid("1.2.840.113549.3.7", "3des");
			_params = new byte[0];
		}

		public AlgorithmIdentifier(Oid oid)
		{
			_oid = oid;
			_params = new byte[0];
		}

		public AlgorithmIdentifier(Oid oid, int keyLength)
		{
			_oid = oid;
			_length = keyLength;
			_params = new byte[0];
		}
	}
	public sealed class CmsRecipient
	{
		private SubjectIdentifierType _recipient;

		private X509Certificate2 _certificate;

		public X509Certificate2 Certificate => _certificate;

		public SubjectIdentifierType RecipientIdentifierType => _recipient;

		public CmsRecipient(X509Certificate2 certificate)
		{
			if (certificate == null)
			{
				throw new ArgumentNullException("certificate");
			}
			_recipient = SubjectIdentifierType.IssuerAndSerialNumber;
			_certificate = certificate;
		}

		public CmsRecipient(SubjectIdentifierType recipientIdentifierType, X509Certificate2 certificate)
		{
			if (certificate == null)
			{
				throw new ArgumentNullException("certificate");
			}
			if (recipientIdentifierType == SubjectIdentifierType.Unknown)
			{
				_recipient = SubjectIdentifierType.IssuerAndSerialNumber;
			}
			else
			{
				_recipient = recipientIdentifierType;
			}
			_certificate = certificate;
		}
	}
	public sealed class CmsRecipientCollection : ICollection, IEnumerable
	{
		private ArrayList _list;

		public int Count => _list.Count;

		public bool IsSynchronized => _list.IsSynchronized;

		public CmsRecipient this[int index] => (CmsRecipient)_list[index];

		public object SyncRoot => _list.SyncRoot;

		public CmsRecipientCollection()
		{
			_list = new ArrayList();
		}

		public CmsRecipientCollection(CmsRecipient recipient)
		{
			_list.Add(recipient);
		}

		public CmsRecipientCollection(SubjectIdentifierType recipientIdentifierType, X509Certificate2Collection certificates)
		{
			X509Certificate2Enumerator enumerator = certificates.GetEnumerator();
			while (enumerator.MoveNext())
			{
				X509Certificate2 current = enumerator.Current;
				CmsRecipient value = new CmsRecipient(recipientIdentifierType, current);
				_list.Add(value);
			}
		}

		public int Add(CmsRecipient recipient)
		{
			return _list.Add(recipient);
		}

		public void CopyTo(Array array, int index)
		{
			_list.CopyTo(array, index);
		}

		public void CopyTo(CmsRecipient[] array, int index)
		{
			_list.CopyTo(array, index);
		}

		public CmsRecipientEnumerator GetEnumerator()
		{
			return new CmsRecipientEnumerator(_list);
		}

		IEnumerator IEnumerable.GetEnumerator()
		{
			return new CmsRecipientEnumerator(_list);
		}

		public void Remove(CmsRecipient recipient)
		{
			_list.Remove(recipient);
		}
	}
	public sealed class CmsRecipientEnumerator : IEnumerator
	{
		private IEnumerator enumerator;

		public CmsRecipient Current => (CmsRecipient)enumerator.Current;

		object IEnumerator.Current => enumerator.Current;

		internal CmsRecipientEnumerator(IEnumerable enumerable)
		{
			enumerator = enumerable.GetEnumerator();
		}

		public bool MoveNext()
		{
			return enumerator.MoveNext();
		}

		public void Reset()
		{
			enumerator.Reset();
		}

		internal CmsRecipientEnumerator()
		{
			ThrowStub.ThrowNotSupportedException();
		}
	}
	public sealed class CmsSigner
	{
		private SubjectIdentifierType _signer;

		private X509Certificate2 _certificate;

		private X509Certificate2Collection _coll;

		private Oid _digest;

		private X509IncludeOption _options;

		private CryptographicAttributeObjectCollection _signed;

		private CryptographicAttributeObjectCollection _unsigned;

		public CryptographicAttributeObjectCollection SignedAttributes => _signed;

		public X509Certificate2 Certificate
		{
			get
			{
				return _certificate;
			}
			set
			{
				_certificate = value;
			}
		}

		public X509Certificate2Collection Certificates => _coll;

		public Oid DigestAlgorithm
		{
			get
			{
				return _digest;
			}
			set
			{
				_digest = value;
			}
		}

		public X509IncludeOption IncludeOption
		{
			get
			{
				return _options;
			}
			set
			{
				_options = value;
			}
		}

		public SubjectIdentifierType SignerIdentifierType
		{
			get
			{
				return _signer;
			}
			set
			{
				if (value == SubjectIdentifierType.Unknown)
				{
					throw new ArgumentException("value");
				}
				_signer = value;
			}
		}

		public CryptographicAttributeObjectCollection UnsignedAttributes => _unsigned;

		public CmsSigner()
		{
			_signer = SubjectIdentifierType.IssuerAndSerialNumber;
			_digest = new Oid("1.3.14.3.2.26");
			_options = X509IncludeOption.ExcludeRoot;
			_signed = new CryptographicAttributeObjectCollection();
			_unsigned = new CryptographicAttributeObjectCollection();
			_coll = new X509Certificate2Collection();
		}

		public CmsSigner(SubjectIdentifierType signerIdentifierType)
			: this()
		{
			if (signerIdentifierType == SubjectIdentifierType.Unknown)
			{
				_signer = SubjectIdentifierType.IssuerAndSerialNumber;
			}
			else
			{
				_signer = signerIdentifierType;
			}
		}

		public CmsSigner(SubjectIdentifierType signerIdentifierType, X509Certificate2 certificate)
			: this(signerIdentifierType)
		{
			_certificate = certificate;
		}

		public CmsSigner(X509Certificate2 certificate)
			: this()
		{
			_certificate = certificate;
		}

		[MonoTODO]
		public CmsSigner(CspParameters parameters)
			: this()
		{
		}
	}
	public sealed class ContentInfo
	{
		private Oid _oid;

		private byte[] _content;

		public byte[] Content => (byte[])_content.Clone();

		public Oid ContentType => _oid;

		public ContentInfo(byte[] content)
			: this(new Oid("1.2.840.113549.1.7.1"), content)
		{
		}

		public ContentInfo(Oid contentType, byte[] content)
		{
			if (contentType == null)
			{
				throw new ArgumentNullException("contentType");
			}
			if (content == null)
			{
				throw new ArgumentNullException("content");
			}
			_oid = contentType;
			_content = content;
		}

		~ContentInfo()
		{
		}

		[MonoTODO("MS is stricter than us about the content structure")]
		public static Oid GetContentType(byte[] encodedMessage)
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Expected O, but got Unknown
			if (encodedMessage == null)
			{
				throw new ArgumentNullException("algorithm");
			}
			try
			{
				ContentInfo val = new ContentInfo(encodedMessage);
				switch (val.ContentType)
				{
				case "1.2.840.113549.1.7.1":
				case "1.2.840.113549.1.7.2":
				case "1.2.840.113549.1.7.3":
				case "1.2.840.113549.1.7.5":
				case "1.2.840.113549.1.7.6":
					return new Oid(val.ContentType);
				default:
					throw new CryptographicException(string.Format(Locale.GetText("Bad ASN1 - invalid OID '{0}'"), val.ContentType));
				}
			}
			catch (Exception inner)
			{
				throw new CryptographicException(Locale.GetText("Bad ASN1 - invalid structure"), inner);
			}
		}
	}
	public sealed class EnvelopedCms
	{
		private ContentInfo _content;

		private AlgorithmIdentifier _identifier;

		private X509Certificate2Collection _certs;

		private RecipientInfoCollection _recipients;

		private CryptographicAttributeObjectCollection _uattribs;

		private SubjectIdentifierType _idType;

		private int _version;

		public X509Certificate2Collection Certificates => _certs;

		public AlgorithmIdentifier ContentEncryptionAlgorithm
		{
			get
			{
				if (_identifier == null)
				{
					_identifier = new AlgorithmIdentifier();
				}
				return _identifier;
			}
		}

		public ContentInfo ContentInfo
		{
			get
			{
				if (_content == null)
				{
					Oid contentType = new Oid("1.2.840.113549.1.7.1");
					_content = new ContentInfo(contentType, new byte[0]);
				}
				return _content;
			}
		}

		public RecipientInfoCollection RecipientInfos => _recipients;

		public CryptographicAttributeObjectCollection UnprotectedAttributes => _uattribs;

		public int Version => _version;

		public EnvelopedCms()
		{
			_certs = new X509Certificate2Collection();
			_recipients = new RecipientInfoCollection();
			_uattribs = new CryptographicAttributeObjectCollection();
		}

		public EnvelopedCms(ContentInfo contentInfo)
			: this()
		{
			if (contentInfo == null)
			{
				throw new ArgumentNullException("contentInfo");
			}
			_content = contentInfo;
		}

		public EnvelopedCms(ContentInfo contentInfo, AlgorithmIdentifier encryptionAlgorithm)
			: this(contentInfo)
		{
			if (encryptionAlgorithm == null)
			{
				throw new ArgumentNullException("encryptionAlgorithm");
			}
			_identifier = encryptionAlgorithm;
		}

		public EnvelopedCms(SubjectIdentifierType recipientIdentifierType, ContentInfo contentInfo)
			: this(contentInfo)
		{
			_idType = recipientIdentifierType;
			if (_idType == SubjectIdentifierType.SubjectKeyIdentifier)
			{
				_version = 2;
			}
		}

		public EnvelopedCms(SubjectIdentifierType recipientIdentifierType, ContentInfo contentInfo, AlgorithmIdentifier encryptionAlgorithm)
			: this(contentInfo, encryptionAlgorithm)
		{
			_idType = recipientIdentifierType;
			if (_idType == SubjectIdentifierType.SubjectKeyIdentifier)
			{
				_version = 2;
			}
		}

		private X509IssuerSerial GetIssuerSerial(string issuer, byte[] serial)
		{
			X509IssuerSerial result = default(X509IssuerSerial);
			result.IssuerName = issuer;
			StringBuilder stringBuilder = new StringBuilder();
			foreach (byte b in serial)
			{
				stringBuilder.Append(b.ToString("X2"));
			}
			result.SerialNumber = stringBuilder.ToString();
			return result;
		}

		[MonoTODO]
		public void Decode(byte[] encodedMessage)
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: 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)
			//IL_003c: Expected O, but got Unknown
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Expected O, but got Unknown
			if (encodedMessage == null)
			{
				throw new ArgumentNullException("encodedMessage");
			}
			ContentInfo val = new ContentInfo(encodedMessage);
			if (val.ContentType != "1.2.840.113549.1.7.3")
			{
				throw new Exception("");
			}
			EnvelopedData val2 = new EnvelopedData(val.Content);
			Oid contentType = new Oid(val2.ContentInfo.ContentType);
			_content = new ContentInfo(contentType, new byte[0]);
			foreach (RecipientInfo recipientInfo in val2.RecipientInfos)
			{
				RecipientInfo val3 = recipientInfo;
				AlgorithmIdentifier keyEncryptionAlgorithm = new AlgorithmIdentifier(new Oid(val3.Oid));
				SubjectIdentifier recipientIdentifier = null;
				if (val3.SubjectKeyIdentifier != null)
				{
					recipientIdentifier = new SubjectIdentifier(SubjectIdentifierType.SubjectKeyIdentifier, val3.SubjectKeyIdentifier);
				}
				else if (val3.Issuer != null && val3.Serial != null)
				{
					X509IssuerSerial issuerSerial = GetIssuerSerial(val3.Issuer, val3.Serial);
					recipientIdentifier = new SubjectIdentifier(SubjectIdentifierType.IssuerAndSerialNumber, issuerSerial);
				}
				KeyTransRecipientInfo ri = new KeyTransRecipientInfo(val3.Key, keyEncryptionAlgorithm, recipientIdentifier, val3.Version);
				_recipients.Add(ri);
			}
			_version = val2.Version;
		}

		[MonoTODO]
		public void Decrypt()
		{
			throw new InvalidOperationException("not encrypted");
		}

		[MonoTODO]
		public void Decrypt(RecipientInfo recipientInfo)
		{
			if (recipientInfo == null)
			{
				throw new ArgumentNullException("recipientInfo");
			}
			Decrypt();
		}

		[MonoTODO]
		public void Decrypt(RecipientInfo recipientInfo, X509Certificate2Collection extraStore)
		{
			if (recipientInfo == null)
			{
				throw new ArgumentNullException("recipientInfo");
			}
			if (extraStore == null)
			{
				throw new ArgumentNullException("extraStore");
			}
			Decrypt();
		}

		[MonoTODO]
		public void Decrypt(X509Certificate2Collection extraStore)
		{
			if (extraStore == null)
			{
				throw new ArgumentNullException("extraStore");
			}
			Decrypt();
		}

		[MonoTODO]
		public byte[] Encode()
		{
			throw new InvalidOperationException("not encrypted");
		}

		[MonoTODO]
		public void Encrypt()
		{
			if (_content == null || _content.Content == null || _content.Content.Length == 0)
			{
				throw new CryptographicException("no content to encrypt");
			}
		}

		[MonoTODO]
		public void Encrypt(CmsRecipient recipient)
		{
			if (recipient == null)
			{
				throw new ArgumentNullException("recipient");
			}
			Encrypt();
		}

		[MonoTODO]
		public void Encrypt(CmsRecipientCollection recipients)
		{
			if (recipients == null)
			{
				throw new ArgumentNullException("recipients");
			}
		}
	}
	public enum KeyAgreeKeyChoice
	{
		Unknown,
		EphemeralKey,
		StaticKey
	}
	[MonoTODO]
	public sealed class KeyAgreeRecipientInfo : RecipientInfo
	{
		public DateTime Date => DateTime.MinValue;

		public override byte[] EncryptedKey => null;

		public override AlgorithmIdentifier KeyEncryptionAlgorithm => null;

		public SubjectIdentifierOrKey OriginatorIdentifierOrKey => null;

		public CryptographicAttributeObject OtherKeyAttribute => null;

		public override SubjectIdentifier RecipientIdentifier => null;

		public override int Version => 0;

		internal KeyAgreeRecipientInfo()
			: base(RecipientInfoType.KeyAgreement)
		{
		}
	}
	public sealed class KeyTransRecipientInfo : RecipientInfo
	{
		private byte[] _encryptedKey;

		private AlgorithmIdentifier _keyEncryptionAlgorithm;

		private SubjectIdentifier _recipientIdentifier;

		private int _version;

		public override byte[] EncryptedKey => _encryptedKey;

		public override AlgorithmIdentifier KeyEncryptionAlgorithm => _keyEncryptionAlgorithm;

		public override SubjectIdentifier RecipientIdentifier => _recipientIdentifier;

		public override int Version => _version;

		internal KeyTransRecipientInfo(byte[] encryptedKey, AlgorithmIdentifier keyEncryptionAlgorithm, SubjectIdentifier recipientIdentifier, int version)
			: base(RecipientInfoType.KeyTransport)
		{
			_encryptedKey = encryptedKey;
			_keyEncryptionAlgorithm = keyEncryptionAlgorithm;
			_recipientIdentifier = recipientIdentifier;
			_version = version;
		}

		internal KeyTransRecipientInfo()
		{
			ThrowStub.ThrowNotSupportedException();
		}
	}
	public class Pkcs9AttributeObject : AsnEncodedData
	{
		public new Oid Oid
		{
			get
			{
				return base.Oid;
			}
			internal set
			{
				base.Oid = value;
			}
		}

		public Pkcs9AttributeObject()
		{
		}

		public Pkcs9AttributeObject(AsnEncodedData asnEncodedData)
			: base(asnEncodedData)
		{
		}

		public Pkcs9AttributeObject(Oid oid, byte[] encodedData)
		{
			if (oid == null)
			{
				throw new ArgumentNullException("oid");
			}
			base.Oid = oid;
			base.RawData = encodedData;
		}

		public Pkcs9AttributeObject(string oid, byte[] encodedData)
			: base(oid, encodedData)
		{
		}

		public override void CopyFrom(AsnEncodedData asnEncodedData)
		{
			if (asnEncodedData == null)
			{
				throw new ArgumentNullException("asnEncodedData");
			}
			throw new ArgumentException("Cannot convert the PKCS#9 attribute.");
		}
	}
	public sealed class Pkcs9ContentType : Pkcs9AttributeObject
	{
		internal const string oid = "1.2.840.113549.1.9.3";

		internal const string friendlyName = "Content Type";

		private Oid _contentType;

		private byte[] _encoded;

		public Oid ContentType
		{
			get
			{
				if (_encoded != null)
				{
					Decode(_encoded);
				}
				return _contentType;
			}
		}

		public Pkcs9ContentType()
		{
			((AsnEncodedData)this).Oid = new Oid("1.2.840.113549.1.9.3", "Content Type");
			_encoded = null;
		}

		internal Pkcs9ContentType(string contentType)
		{
			((AsnEncodedData)this).Oid = new Oid("1.2.840.113549.1.9.3", "Content Type");
			_contentType = new Oid(contentType);
			base.RawData = Encode();
			_encoded = null;
		}

		internal Pkcs9ContentType(byte[] encodedContentType)
		{
			if (encodedContentType == null)
			{
				throw new ArgumentNullException("encodedContentType");
			}
			((AsnEncodedData)this).Oid = new Oid("1.2.840.113549.1.9.3", "Content Type");
			base.RawData = encodedContentType;
			Decode(encodedContentType);
		}

		public override void CopyFrom(AsnEncodedData asnEncodedData)
		{
			base.CopyFrom(asnEncodedData);
			_encoded = asnEncodedData.RawData;
		}

		internal void Decode(byte[] attribute)
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Expected O, but got Unknown
			if (attribute == null || attribute[0] != 6)
			{
				throw new CryptographicException(Locale.GetText("Expected an OID."));
			}
			ASN1 val = new ASN1(attribute);
			_contentType = new Oid(ASN1Convert.ToOid(val));
			_encoded = null;
		}

		internal byte[] Encode()
		{
			if (_contentType == null)
			{
				return null;
			}
			return ASN1Convert.FromOid(_contentType.Value).GetBytes();
		}
	}
	public sealed class Pkcs9DocumentDescription : Pkcs9AttributeObject
	{
		internal const string oid = "1.3.6.1.4.1.311.88.2.2";

		internal const string friendlyName = null;

		private string _desc;

		public string DocumentDescription => _desc;

		public Pkcs9DocumentDescription()
		{
			((AsnEncodedData)this).Oid = new Oid("1.3.6.1.4.1.311.88.2.2", null);
		}

		public Pkcs9DocumentDescription(string documentDescription)
		{
			if (documentDescription == null)
			{
				throw new ArgumentNullException("documentName");
			}
			((AsnEncodedData)this).Oid = new Oid("1.3.6.1.4.1.311.88.2.2", null);
			_desc = documentDescription;
			base.RawData = Encode();
		}

		public Pkcs9DocumentDescription(byte[] encodedDocumentDescription)
		{
			if (encodedDocumentDescription == null)
			{
				throw new ArgumentNullException("encodedDocumentDescription");
			}
			((AsnEncodedData)this).Oid = new Oid("1.3.6.1.4.1.311.88.2.2", null);
			base.RawData = encodedDocumentDescription;
			Decode(encodedDocumentDescription);
		}

		public override void CopyFrom(AsnEncodedData asnEncodedData)
		{
			base.CopyFrom(asnEncodedData);
			Decode(base.RawData);
		}

		internal void Decode(byte[] attribute)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			if (attribute[0] == 4)
			{
				byte[] value = new ASN1(attribute).Value;
				int num = value.Length;
				if (value[num - 2] == 0)
				{
					num -= 2;
				}
				_desc = Encoding.Unicode.GetString(value, 0, num);
			}
		}

		internal byte[] Encode()
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			return new ASN1((byte)4, Encoding.Unicode.GetBytes(_desc + "\0")).GetBytes();
		}
	}
	public sealed class Pkcs9DocumentName : Pkcs9AttributeObject
	{
		internal const string oid = "1.3.6.1.4.1.311.88.2.1";

		internal const string friendlyName = null;

		private string _name;

		public string DocumentName => _name;

		public Pkcs9DocumentName()
		{
			((AsnEncodedData)this).Oid = new Oid("1.3.6.1.4.1.311.88.2.1", null);
		}

		public Pkcs9DocumentName(string documentName)
		{
			if (documentName == null)
			{
				throw new ArgumentNullException("documentName");
			}
			((AsnEncodedData)this).Oid = new Oid("1.3.6.1.4.1.311.88.2.1", null);
			_name = documentName;
			base.RawData = Encode();
		}

		public Pkcs9DocumentName(byte[] encodedDocumentName)
		{
			if (encodedDocumentName == null)
			{
				throw new ArgumentNullException("encodedDocumentName");
			}
			((AsnEncodedData)this).Oid = new Oid("1.3.6.1.4.1.311.88.2.1", null);
			base.RawData = encodedDocumentName;
			Decode(encodedDocumentName);
		}

		public override void CopyFrom(AsnEncodedData asnEncodedData)
		{
			base.CopyFrom(asnEncodedData);
			Decode(base.RawData);
		}

		internal void Decode(byte[] attribute)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			if (attribute[0] == 4)
			{
				byte[] value = new ASN1(attribute).Value;
				int num = value.Length;
				if (value[num - 2] == 0)
				{
					num -= 2;
				}
				_name = Encoding.Unicode.GetString(value, 0, num);
			}
		}

		internal byte[] Encode()
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			return new ASN1((byte)4, Encoding.Unicode.GetBytes(_name + "\0")).GetBytes();
		}
	}
	public sealed class Pkcs9MessageDigest : Pkcs9AttributeObject
	{
		internal const string oid = "1.2.840.113549.1.9.4";

		internal const string friendlyName = "Message Digest";

		private byte[] _messageDigest;

		private byte[] _encoded;

		public byte[] MessageDigest
		{
			get
			{
				if (_encoded != null)
				{
					Decode(_encoded);
				}
				return _messageDigest;
			}
		}

		public Pkcs9MessageDigest()
		{
			((AsnEncodedData)this).Oid = new Oid("1.2.840.113549.1.9.4", "Message Digest");
			_encoded = null;
		}

		internal Pkcs9MessageDigest(byte[] messageDigest, bool encoded)
		{
			if (messageDigest == null)
			{
				throw new ArgumentNullException("messageDigest");
			}
			if (encoded)
			{
				((AsnEncodedData)this).Oid = new Oid("1.2.840.113549.1.9.4", "Message Digest");
				base.RawData = messageDigest;
				Decode(messageDigest);
			}
			else
			{
				((AsnEncodedData)this).Oid = new Oid("1.2.840.113549.1.9.4", "Message Digest");
				_messageDigest = (byte[])_messageDigest.Clone();
				base.RawData = Encode();
			}
		}

		public override void CopyFrom(AsnEncodedData asnEncodedData)
		{
			base.CopyFrom(asnEncodedData);
			_encoded = asnEncodedData.RawData;
		}

		internal void Decode(byte[] attribute)
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Expected O, but got Unknown
			if (attribute == null || attribute[0] != 4)
			{
				throw new CryptographicException(Locale.GetText("Expected an OCTETSTRING."));
			}
			ASN1 val = new ASN1(attribute);
			_messageDigest = val.Value;
			_encoded = null;
		}

		internal byte[] Encode()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			return new ASN1((byte)4, _messageDigest).GetBytes();
		}
	}
	public sealed class Pkcs9SigningTime : Pkcs9AttributeObject
	{
		internal const string oid = "1.2.840.113549.1.9.5";

		internal const string friendlyName = "Signing Time";

		private DateTime _signingTime;

		public DateTime SigningTime => _signingTime;

		public Pkcs9SigningTime()
		{
			((AsnEncodedData)this).Oid = new Oid("1.2.840.113549.1.9.5", "Signing Time");
			_signingTime = DateTime.Now;
			base.RawData = Encode();
		}

		public Pkcs9SigningTime(DateTime signingTime)
		{
			((AsnEncodedData)this).Oid = new Oid("1.2.840.113549.1.9.5", "Signing Time");
			_signingTime = signingTime;
			base.RawData = Encode();
		}

		public Pkcs9SigningTime(byte[] encodedSigningTime)
		{
			if (encodedSigningTime == null)
			{
				throw new ArgumentNullException("encodedSigningTime");
			}
			((AsnEncodedData)this).Oid = new Oid("1.2.840.113549.1.9.5", "Signing Time");
			base.RawData = encodedSigningTime;
			Decode(encodedSigningTime);
		}

		public override void CopyFrom(AsnEncodedData asnEncodedData)
		{
			if (asnEncodedData == null)
			{
				throw new ArgumentNullException("asnEncodedData");
			}
			Decode(asnEncodedData.RawData);
			base.Oid = asnEncodedData.Oid;
			base.RawData = asnEncodedData.RawData;
		}

		internal void Decode(byte[] attribute)
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			if (attribute[0] != 23)
			{
				throw new CryptographicException(Locale.GetText("Only UTCTIME is supported."));
			}
			byte[] value = new ASN1(attribute).Value;
			string @string = Encoding.ASCII.GetString(value, 0, value.Length - 1);
			_signingTime = DateTime.ParseExact(@string, "yyMMddHHmmss", null);
		}

		internal byte[] Encode()
		{
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			if (_signingTime.Year <= 1600)
			{
				throw new ArgumentOutOfRangeException("<= 1600");
			}
			if (_signingTime.Year < 1950 || _signingTime.Year >= 2050)
			{
				throw new CryptographicException("[1950,2049]");
			}
			string s = _signingTime.ToString("yyMMddHHmmss", CultureInfo.InvariantCulture) + "Z";
			return new ASN1((byte)23, Encoding.ASCII.GetBytes(s)).GetBytes();
		}
	}
	public sealed class PublicKeyInfo
	{
		private AlgorithmIdentifier _algorithm;

		private byte[] _key;

		public AlgorithmIdentifier Algorithm => _algorithm;

		public byte[] KeyValue => _key;

		internal PublicKeyInfo(AlgorithmIdentifier algorithm, byte[] key)
		{
			_algorithm = algorithm;
			_key = key;
		}

		internal PublicKeyInfo()
		{
			ThrowStub.ThrowNotSupportedException();
		}
	}
	public abstract class RecipientInfo
	{
		private RecipientInfoType _type;

		public abstract byte[] EncryptedKey { get; }

		public abstract AlgorithmIdentifier KeyEncryptionAlgorithm { get; }

		public abstract SubjectIdentifier RecipientIdentifier { get; }

		public RecipientInfoType Type => _type;

		public abstract int Version { get; }

		internal RecipientInfo(RecipientInfoType recipInfoType)
		{
			_type = recipInfoType;
		}

		internal RecipientInfo()
		{
			ThrowStub.ThrowNotSupportedException();
		}
	}
	public sealed class RecipientInfoCollection : ICollection, IEnumerable
	{
		private ArrayList _list;

		public int Count => _list.Count;

		public bool IsSynchronized => _list.IsSynchronized;

		public RecipientInfo this[int index] => (RecipientInfo)_list[index];

		public object SyncRoot => _list.SyncRoot;

		internal RecipientInfoCollection()
		{
			_list = new ArrayList();
		}

		internal int Add(RecipientInfo ri)
		{
			return _list.Add(ri);
		}

		public void CopyTo(Array array, int index)
		{
			_list.CopyTo(array, index);
		}

		public void CopyTo(RecipientInfo[] array, int index)
		{
			_list.CopyTo(array, index);
		}

		public RecipientInfoEnumerator GetEnumerator()
		{
			return new RecipientInfoEnumerator(_list);
		}

		IEnumerator IEnumerable.GetEnumerator()
		{
			return new RecipientInfoEnumerator(_list);
		}
	}
	public sealed class RecipientInfoEnumerator : IEnumerator
	{
		private IEnumerator enumerator;

		public RecipientInfo Current => (RecipientInfo)enumerator.Current;

		object IEnumerator.Current => enumerator.Current;

		internal RecipientInfoEnumerator(IEnumerable enumerable)
		{
			enumerator = enumerable.GetEnumerator();
		}

		public bool MoveNext()
		{
			return enumerator.MoveNext();
		}

		public void Reset()
		{
			enumerator.Reset();
		}

		internal RecipientInfoEnumerator()
		{
			ThrowStub.ThrowNotSupportedException();
		}
	}
	public enum RecipientInfoType
	{
		Unknown,
		KeyTransport,
		KeyAgreement
	}
	public sealed class SignedCms
	{
		private ContentInfo _content;

		private bool _detached;

		private SignerInfoCollection _info;

		private X509Certificate2Collection _certs;

		private SubjectIdentifierType _type;

		private int _version;

		public X509Certificate2Collection Certificates => _certs;

		public ContentInfo ContentInfo
		{
			get
			{
				if (_content == null)
				{
					Oid contentType = new Oid("1.2.840.113549.1.7.1");
					_content = new ContentInfo(contentType, new byte[0]);
				}
				return _content;
			}
		}

		public bool Detached => _detached;

		public SignerInfoCollection SignerInfos => _info;

		public int Version => _version;

		public SignedCms()
		{
			_certs = new X509Certificate2Collection();
			_info = new SignerInfoCollection();
		}

		public SignedCms(ContentInfo contentInfo)
			: this(contentInfo, detached: false)
		{
		}

		public SignedCms(ContentInfo contentInfo, bool detached)
			: this()
		{
			if (contentInfo == null)
			{
				throw new ArgumentNullException("contentInfo");
			}
			_content = contentInfo;
			_detached = detached;
		}

		public SignedCms(SubjectIdentifierType signerIdentifierType)
			: this()
		{
			_type = signerIdentifierType;
		}

		public SignedCms(SubjectIdentifierType signerIdentifierType, ContentInfo contentInfo)
			: this(contentInfo, detached: false)
		{
			_type = signerIdentifierType;
		}

		public SignedCms(SubjectIdentifierType signerIdentifierType, ContentInfo contentInfo, bool detached)
			: this(contentInfo, detached)
		{
			_type = signerIdentifierType;
		}

		[MonoTODO]
		public void CheckSignature(bool verifySignatureOnly)
		{
			SignerInfoEnumerator enumerator = _info.GetEnumerator();
			while (enumerator.MoveNext())
			{
				enumerator.Current.CheckSignature(verifySignatureOnly);
			}
		}

		[MonoTODO]
		public void CheckSignature(X509Certificate2Collection extraStore, bool verifySignatureOnly)
		{
			SignerInfoEnumerator enumerator = _info.GetEnumerator();
			while (enumerator.MoveNext())
			{
				enumerator.Current.CheckSignature(extraStore, verifySignatureOnly);
			}
		}

		[MonoTODO]
		public void CheckHash()
		{
			throw new InvalidOperationException("");
		}

		[MonoTODO]
		public void ComputeSignature()
		{
			throw new CryptographicException("");
		}

		[MonoTODO]
		public void ComputeSignature(CmsSigner signer)
		{
			ComputeSignature();
		}

		[MonoTODO]
		public void ComputeSignature(CmsSigner signer, bool silent)
		{
			ComputeSignature();
		}

		private string ToString(byte[] array, bool reverse)
		{
			StringBuilder stringBuilder = new StringBuilder();
			if (reverse)
			{
				for (int num = array.Length - 1; num >= 0; num--)
				{
					stringBuilder.Append(array[num].ToString("X2"));
				}
			}
			else
			{
				for (int i = 0; i < array.Length; i++)
				{
					stringBuilder.Append(array[i].ToString("X2"));
				}
			}
			return stringBuilder.ToString();
		}

		private byte[] GetKeyIdentifier(X509Certificate x509)
		{
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected O, but got Unknown
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Expected O, but got Unknown
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Expected O, but got Unknown
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Expected O, but got Unknown
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Expected O, but got Unknown
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			X509Extension val = x509.Extensions["2.5.29.14"];
			if (val != null)
			{
				return new ASN1(val.Value.Value).Value;
			}
			ASN1 val2 = new ASN1((byte)48);
			ASN1 obj = val2.Add(new ASN1((byte)48));
			obj.Add(new ASN1(CryptoConfig.EncodeOID(x509.KeyAlgorithm)));
			obj.Add(new ASN1(x509.KeyAlgorithmParameters));
			byte[] publicKey = x509.PublicKey;
			byte[] array = new byte[publicKey.Length + 1];
			Array.Copy(publicKey, 0, array, 1, publicKey.Length);
			val2.Add(new ASN1((byte)3, array));
			return SHA1.Create().ComputeHash(val2.GetBytes());
		}

		[MonoTODO("incomplete - missing attributes")]
		public void Decode(byte[] encodedMessage)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Expected O, but got Unknown
			ContentInfo val = new ContentInfo(encodedMessage);
			if (val.ContentType != "1.2.840.113549.1.7.2")
			{
				throw new Exception("");
			}
			SignedData val2 = new SignedData(val.Content);
			SubjectIdentifierType type = SubjectIdentifierType.Unknown;
			object o = null;
			X509Certificate2 certificate = null;
			X509CertificateEnumerator enumerator;
			if (val2.SignerInfo.Certificate != null)
			{
				certificate = new X509Certificate2(val2.SignerInfo.Certificate.RawData);
			}
			else if (val2.SignerInfo.IssuerName != null && val2.SignerInfo.SerialNumber != null)
			{
				byte[] serialNumber = val2.SignerInfo.SerialNumber;
				Array.Reverse(serialNumber);
				type = SubjectIdentifierType.IssuerAndSerialNumber;
				X509IssuerSerial x509IssuerSerial = default(X509IssuerSerial);
				x509IssuerSerial.IssuerName = val2.SignerInfo.IssuerName;
				x509IssuerSerial.SerialNumber = ToString(serialNumber, reverse: true);
				o = x509IssuerSerial;
				enumerator = val2.Certificates.GetEnumerator();
				try
				{
					while (enumerator.MoveNext())
					{
						X509Certificate current = enumerator.Current;
						if (current.IssuerName == val2.SignerInfo.IssuerName && ToString(current.SerialNumber, reverse: true) == x509IssuerSerial.SerialNumber)
						{
							certificate = new X509Certificate2(current.RawData);
							break;
						}
					}
				}
				finally
				{
					if (enumerator is IDisposable disposable)
					{
						disposable.Dispose();
					}
				}
			}
			else if (val2.SignerInfo.SubjectKeyIdentifier != null)
			{
				string text = ToString(val2.SignerInfo.SubjectKeyIdentifier, reverse: false);
				type = SubjectIdentifierType.SubjectKeyIdentifier;
				o = text;
				enumerator = val2.Certificates.GetEnumerator();
				try
				{
					while (enumerator.MoveNext())
					{
						X509Certificate current2 = enumerator.Current;
						if (ToString(GetKeyIdentifier(current2), reverse: false) == text)
						{
							certificate = new X509Certificate2(current2.RawData);
							break;
						}
					}
				}
				finally
				{
					if (enumerator is IDisposable disposable2)
					{
						disposable2.Dispose();
					}
				}
			}
			SignerInfo signer = new SignerInfo(val2.SignerInfo.HashName, certificate, type, o, val2.SignerInfo.Version);
			_info.Add(signer);
			ASN1 content = val2.ContentInfo.Content;
			Oid contentType = new Oid(val2.ContentInfo.ContentType);
			if (!_detached || _content == null)
			{
				if (content[0] == null)
				{
					throw new ArgumentException("ContentInfo has no content. Detached signature ?");
				}
				_content = new ContentInfo(contentType, content[0].Value);
			}
			enumerator = val2.Certificates.GetEnumerator();
			try
			{
				while (enumerator.MoveNext())
				{
					X509Certificate current3 = enumerator.Current;
					_certs.Add(new X509Certificate2(current3.RawData));
				}
			}
			finally
			{
				if (enumerator is IDisposable disposable3)
				{
					disposable3.Dispose();
				}
			}
			_version = val2.Version;
		}

		[MonoTODO]
		public byte[] Encode()
		{
			return null;
		}

		[MonoTODO]
		public void RemoveSignature(SignerInfo signerInfo)
		{
		}

		[MonoTODO]
		public void RemoveSignature(int index)
		{
		}
	}
	public sealed class SignerInfo
	{
		private SubjectIdentifier _signer;

		private X509Certificate2 _certificate;

		private Oid _digest;

		private SignerInfoCollection _counter;

		private CryptographicAttributeObjectCollection _signed;

		private CryptographicAttributeObjectCollection _unsigned;

		private int _version;

		public CryptographicAttributeObjectCollection SignedAttributes => _signed;

		public X509Certificate2 Certificate => _certificate;

		public SignerInfoCollection CounterSignerInfos => _counter;

		public Oid DigestAlgorithm => _digest;

		public SubjectIdentifier SignerIdentifier => _signer;

		public CryptographicAttributeObjectCollection UnsignedAttributes => _unsigned;

		public int Version => _version;

		internal SignerInfo(string hashName, X509Certificate2 certificate, SubjectIdentifierType type, object o, int version)
		{
			_digest = new Oid(CryptoConfig.MapNameToOID(hashName));
			_certificate = certificate;
			_counter = new SignerInfoCollection();
			_signed = new CryptographicAttributeObjectCollection();
			_unsigned = new CryptographicAttributeObjectCollection();
			_signer = new SubjectIdentifier(type, o);
			_version = version;
		}

		[MonoTODO]
		public void CheckHash()
		{
		}

		[MonoTODO]
		public void CheckSignature(bool verifySignatureOnly)
		{
		}

		[MonoTODO]
		public void CheckSignature(X509Certificate2Collection extraStore, bool verifySignatureOnly)
		{
		}

		[MonoTODO]
		public void ComputeCounterSignature()
		{
		}

		[MonoTODO]
		public void ComputeCounterSignature(CmsSigner signer)
		{
		}

		[MonoTODO]
		public void RemoveCounterSignature(SignerInfo counterSignerInfo)
		{
		}

		[MonoTODO]
		public void RemoveCounterSignature(int index)
		{
		}

		internal SignerInfo()
		{
			ThrowStub.ThrowNotSupportedException();
		}
	}
	public sealed class SignerInfoCollection : ICollection, IEnumerable
	{
		private ArrayList _list;

		public int Count => _list.Count;

		public bool IsSynchronized => false;

		public SignerInfo this[int index] => (SignerInfo)_list[index];

		public object SyncRoot => _list.SyncRoot;

		internal SignerInfoCollection()
		{
			_list = new ArrayList();
		}

		internal void Add(SignerInfo signer)
		{
			_list.Add(signer);
		}

		public void CopyTo(Array array, int index)
		{
			if (array == null)
			{
				throw new ArgumentNullException("array");
			}
			if (index < 0 || index >= array.Length)
			{
				throw new ArgumentOutOfRangeException("index");
			}
			_list.CopyTo(array, index);
		}

		public void CopyTo(SignerInfo[] array, int index)
		{
			if (array == null)
			{
				throw new ArgumentNullException("array");
			}
			if (index < 0 || index >= array.Length)
			{
				throw new ArgumentOutOfRangeException("index");
			}
			_list.CopyTo(array, index);
		}

		public SignerInfoEnumerator GetEnumerator()
		{
			return new SignerInfoEnumerator(_list);
		}

		IEnumerator IEnumerable.GetEnumerator()
		{
			return new SignerInfoEnumerator(_list);
		}
	}
	public sealed class SignerInfoEnumerator : IEnumerator
	{
		private IEnumerator enumerator;

		public SignerInfo Current => (SignerInfo)enumerator.Current;

		object IEnumerator.Current => enumerator.Current;

		internal SignerInfoEnumerator(IEnumerable enumerable)
		{
			enumerator = enumerable.GetEnumerator();
		}

		public bool MoveNext()
		{
			return enumerator.MoveNext();
		}

		public void Reset()
		{
			enumerator.Reset();
		}

		internal SignerInfoEnumerator()
		{
			ThrowStub.ThrowNotSupportedException();
		}
	}
	public sealed class SubjectIdentifier
	{
		private SubjectIdentifierType _type;

		private object _value;

		public SubjectIdentifierType Type => _type;

		public object Value => _value;

		internal SubjectIdentifier(SubjectIdentifierType type, object value)
		{
			_type = type;
			_value = value;
		}

		internal SubjectIdentifier()
		{
			ThrowStub.ThrowNotSupportedException();
		}
	}
	public sealed class SubjectIdentifierOrKey
	{
		private SubjectIdentifierOrKeyType _type;

		private object _value;

		public SubjectIdentifierOrKeyType Type => _type;

		public object Value => _value;

		internal SubjectIdentifierOrKey(SubjectIdentifierOrKeyType type, object value)
		{
			_type = type;
			_value = value;
		}

		internal SubjectIdentifierOrKey()
		{
			ThrowStub.ThrowNotSupportedException();
		}
	}
	public enum SubjectIdentifierOrKeyType
	{
		Unknown,
		IssuerAndSerialNumber,
		SubjectKeyIdentifier,
		PublicKeyInfo
	}
	public enum SubjectIdentifierType
	{
		Unknown,
		IssuerAndSerialNumber,
		SubjectKeyIdentifier,
		NoSignature
	}
}
namespace System.Security.Cryptography.X509Certificates
{
	internal static class RSACertificateExtensions
	{
		public static RSA GetRSAPrivateKey(this X509Certificate2 certificate)
		{
			if (certificate == null)
			{
				throw new ArgumentNullException("certificate");
			}
			return certificate.PrivateKey as RSA;
		}

		public static RSA GetRSAPublicKey(this X509Certificate2 certificate)
		{
			if (certificate == null)
			{
				throw new ArgumentNullException("certificate");
			}
			return certificate.PublicKey.Key as RSA;
		}
	}
	public static class X509Certificate2UI
	{
		[MonoTODO]
		public static void DisplayCertificate(X509Certificate2 certificate)
		{
			DisplayCertificate(certificate, IntPtr.Zero);
		}

		[MonoTODO]
		[SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode = true)]
		public static void DisplayCertificate(X509Certificate2 certificate, IntPtr hwndParent)
		{
			if (certificate == null)
			{
				throw new ArgumentNullException("certificate");
			}
			certificate.GetRawCertData();
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static X509Certificate2Collection SelectFromCollection(X509Certificate2Collection certificates, string title, string message, X509SelectionFlag selectionFlag)
		{
			return SelectFromCollection(certificates, title, message, selectionFlag, IntPtr.Zero);
		}

		[MonoTODO]
		[SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode = true)]
		public static X509Certificate2Collection SelectFromCollection(X509Certificate2Collection certificates, string title, string message, X509SelectionFlag selectionFlag, IntPtr hwndParent)
		{
			if (certificates == null)
			{
				throw new ArgumentNullException("certificates");
			}
			if (selectionFlag < X509SelectionFlag.SingleSelection || selectionFlag > X509SelectionFlag.MultiSelection)
			{
				throw new ArgumentException("selectionFlag");
			}
			throw new NotImplementedException();
		}
	}
	public enum X509SelectionFlag
	{
		SingleSelection,
		MultiSelection
	}
}
namespace System.Security.Cryptography.Xml
{
	internal abstract class AncestralNamespaceContextManager
	{
		internal ArrayList _ancestorStack = new ArrayList();

		internal NamespaceFrame GetScopeAt(int i)
		{
			return (NamespaceFrame)_ancestorStack[i];
		}

		internal NamespaceFrame GetCurrentScope()
		{
			return GetScopeAt(_ancestorStack.Count - 1);
		}

		protected XmlAttribute GetNearestRenderedNamespaceWithMatchingPrefix(string nsPrefix, out int depth)
		{
			XmlAttribute xmlAttribute = null;
			depth = -1;
			for (int num = _ancestorStack.Count - 1; num >= 0; num--)
			{
				if ((xmlAttribute = GetScopeAt(num).GetRendered(nsPrefix)) != null)
				{
					depth = num;
					return xmlAttribute;
				}
			}
			return null;
		}

		protected XmlAttribute GetNearestUnrenderedNamespaceWithMatchingPrefix(string nsPrefix, out int depth)
		{
			XmlAttribute xmlAttribute = null;
			depth = -1;
			for (int num = _ancestorStack.Count - 1; num >= 0; num--)
			{
				if ((xmlAttribute = GetScopeAt(num).GetUnrendered(nsPrefix)) != null)
				{
					depth = num;
					return xmlAttribute;
				}
			}
			return null;
		}

		internal void EnterElementContext()
		{
			_ancestorStack.Add(new NamespaceFrame());
		}

		internal void ExitElementContext()
		{
			_ancestorStack.RemoveAt(_ancestorStack.Count - 1);
		}

		internal abstract void TrackNamespaceNode(XmlAttribute attr, SortedList nsListToRender, Hashtable nsLocallyDeclared);

		internal abstract void TrackXmlNamespaceNode(XmlAttribute attr, SortedList nsListToRender, SortedList attrListToRender, Hashtable nsLocallyDeclared);

		internal abstract void GetNamespacesToRender(XmlElement element, SortedList attrListToRender, SortedList nsListToRender, Hashtable nsLocallyDeclared);

		internal void LoadUnrenderedNamespaces(Hashtable nsLocallyDeclared)
		{
			object[] array = new object[nsLocallyDeclared.Count];
			nsLocallyDeclared.Values.CopyTo(array, 0);
			object[] array2 = array;
			foreach (object obj in array2)
			{
				AddUnrendered((XmlAttribute)obj);
			}
		}

		internal void LoadRenderedNamespaces(SortedList nsRenderedList)
		{
			foreach (object key in nsRenderedList.GetKeyList())
			{
				AddRendered((XmlAttribute)key);
			}
		}

		internal void AddRendered(XmlAttribute attr)
		{
			GetCurrentScope().AddRendered(attr);
		}

		internal void AddUnrendered(XmlAttribute attr)
		{
			GetCurrentScope().AddUnrendered(attr);
		}
	}
	internal class AttributeSortOrder : IComparer
	{
		internal AttributeSortOrder()
		{
		}

		public int Compare(object a, object b)
		{
			XmlNode xmlNode = a as XmlNode;
			XmlNode xmlNode2 = b as XmlNode;
			if (xmlNode == null || xmlNode2 == null)
			{
				throw new ArgumentException();
			}
			int num = string.CompareOrdinal(xmlNode.NamespaceURI, xmlNode2.NamespaceURI);
			if (num != 0)
			{
				return num;
			}
			return string.CompareOrdinal(xmlNode.LocalName, xmlNode2.LocalName);
		}
	}
	internal class C14NAncestralNamespaceContextManager : AncestralNamespaceContextManager
	{
		internal C14NAncestralNamespaceContextManager()
		{
		}

		private void GetNamespaceToRender(string nsPrefix, SortedList attrListToRender, SortedList nsListToRender, Hashtable nsLocallyDeclared)
		{
			foreach (XmlAttribute key in nsListToRender.GetKeyList())
			{
				if (Utils.HasNamespacePrefix(key, nsPrefix))
				{
					return;
				}
			}
			foreach (XmlAttribute key2 in attrListToRender.GetKeyList())
			{
				if (key2.LocalName.Equals(nsPrefix))
				{
					return;
				}
			}
			XmlAttribute xmlAttribute = (XmlAttribute)nsLocallyDeclared[nsPrefix];
			int depth;
			XmlAttribute nearestRenderedNamespaceWithMatchingPrefix = GetNearestRenderedNamespaceWithMatchingPrefix(nsPrefix, out depth);
			if (xmlAttribute != null)
			{
				if (Utils.IsNonRedundantNamespaceDecl(xmlAttribute, nearestRenderedNamespaceWithMatchingPrefix))
				{
					nsLocallyDeclared.Remove(nsPrefix);
					if (Utils.IsXmlNamespaceNode(xmlAttribute))
					{
						attrListToRender.Add(xmlAttribute, null);
					}
					else
					{
						nsListToRender.Add(xmlAttribute, null);
					}
				}
				return;
			}
			int depth2;
			XmlAttribute nearestUnrenderedNamespaceWithMatchingPrefix = GetNearestUnrenderedNamespaceWithMatchingPrefix(nsPrefix, out depth2);
			if (nearestUnrenderedNamespaceWithMatchingPrefix != null && depth2 > depth && Utils.IsNonRedundantNamespaceDecl(nearestUnrenderedNamespaceWithMatchingPrefix, nearestRenderedNamespaceWithMatchingPrefix))
			{
				if (Utils.IsXmlNamespaceNode(nearestUnrenderedNamespaceWithMatchingPrefix))
				{
					attrListToRender.Add(nearestUnrenderedNamespaceWithMatchingPrefix, null);
				}
				else
				{
					nsListToRender.Add(nearestUnrenderedNamespaceWithMatchingPrefix, null);
				}
			}
		}

		internal override void GetNamespacesToRender(XmlElement element, SortedList attrListToRender, SortedList nsListToRender, Hashtable nsLocallyDeclared)
		{
			XmlAttribute xmlAttribute = null;
			object[] array = new object[nsLocallyDeclared.Count];
			nsLocallyDeclared.Values.CopyTo(array, 0);
			object[] array2 = array;
			for (int i = 0; i < array2.Length; i++)
			{
				xmlAttribute = (XmlAttribute)array2[i];
				int depth;
				XmlAttribute nearestRenderedNamespaceWithMatchingPrefix = GetNearestRenderedNamespaceWithMatchingPrefix(Utils.GetNamespacePrefix(xmlAttribute), out depth);
				if (Utils.IsNonRedundantNamespaceDecl(xmlAttribute, nearestRenderedNamespaceWithMatchingPrefix))
				{
					nsLocallyDeclared.Remove(Utils.GetNamespacePrefix(xmlAttribute));
					if (Utils.IsXmlNamespaceNode(xmlAttribute))
					{
						attrListToRender.Add(xmlAttribute, null);
					}
					else
					{
						nsListToRender.Add(xmlAttribute, null);
					}
				}
			}
			for (int num = _ancestorStack.Count - 1; num >= 0; num--)
			{
				foreach (XmlAttribute value in GetScopeAt(num).GetUnrendered().Values)
				{
					if (value != null)
					{
						GetNamespaceToRender(Utils.GetNamespacePrefix(value), attrListToRender, nsListToRender, nsLocallyDeclared);
					}
				}
			}
		}

		internal override void TrackNamespaceNode(XmlAttribute attr, SortedList nsListToRender, Hashtable nsLocallyDeclared)
		{
			nsLocallyDeclared.Add(Utils.GetNamespacePrefix(attr), attr);
		}

		internal override void TrackXmlNamespaceNode(XmlAttribute attr, SortedList nsListToRender, SortedList attrListToRender, Hashtable nsLocallyDeclared)
		{
			nsLocallyDeclared.Add(Utils.GetNamespacePrefix(attr), attr);
		}
	}
	internal class CanonicalXml
	{
		private CanonicalXmlDocument _c14nDoc;

		private C14NAncestralNamespaceContextManager _ancMgr;

		internal CanonicalXml(Stream inputStream, bool includeComments, XmlResolver resolver, string strBaseUri)
		{
			if (inputStream == null)
			{
				throw new ArgumentNullException("inputStream");
			}
			_c14nDoc = new CanonicalXmlDocument(defaultNodeSetInclusionState: true, includeComments);
			_c14nDoc.XmlResolver = resolver;
			_c14nDoc.Load(Utils.PreProcessStreamInput(inputStream, resolver, strBaseUri));
			_ancMgr = new C14NAncestralNamespaceContextManager();
		}

		internal CanonicalXml(XmlDocument document, XmlResolver resolver)
			: this(document, resolver, includeComments: false)
		{
		}

		internal CanonicalXml(XmlDocument document, XmlResolver resolver, bool includeComments)
		{
			if (document == null)
			{
				throw new ArgumentNullException("document");
			}
			_c14nDoc = new CanonicalXmlDocument(defaultNodeSetInclusionState: true, includeComments);
			_c14nDoc.XmlResolver = resolver;
			_c14nDoc.Load(new XmlNodeReader(document));
			_ancMgr = new C14NAncestralNamespaceContextManager();
		}

		internal CanonicalXml(XmlNodeList nodeList, XmlResolver resolver, bool includeComments)
		{
			if (nodeList == null)
			{
				throw new ArgumentNullException("nodeList");
			}
			XmlDocument ownerDocument = Utils.GetOwnerDocument(nodeList);
			if (ownerDocument == null)
			{
				throw new ArgumentException("nodeList");
			}
			_c14nDoc = new CanonicalXmlDocument(defaultNodeSetInclusionState: false, includeComments);
			_c14nDoc.XmlResolver = resolver;
			_c14nDoc.Load(new XmlNodeReader(ownerDocument));
			_ancMgr = new C14NAncestralNamespaceContextManager();
			MarkInclusionStateForNodes(nodeList, ownerDocument, _c14nDoc);
		}

		private static void MarkNodeAsIncluded(XmlNode node)
		{
			if (node is ICanonicalizableNode)
			{
				((ICanonicalizableNode)node).IsInNodeSet = true;
			}
		}

		private static void MarkInclusionStateForNodes(XmlNodeList nodeList, XmlDocument inputRoot, XmlDocument root)
		{
			CanonicalXmlNodeList canonicalXmlNodeList = new CanonicalXmlNodeList();
			CanonicalXmlNodeList canonicalXmlNodeList2 = new CanonicalXmlNodeList();
			canonicalXmlNodeList.Add(inputRoot);
			canonicalXmlNodeList2.Add(root);
			int num = 0;
			do
			{
				XmlNode xmlNode = canonicalXmlNodeList[num];
				XmlNode? xmlNode2 = canonicalXmlNodeList2[num];
				XmlNodeList childNodes = xmlNode.ChildNodes;
				XmlNodeList childNodes2 = xmlNode2.ChildNodes;
				for (int i = 0; i < childNodes.Count; i++)
				{
					canonicalXmlNodeList.Add(childNodes[i]);
					canonicalXmlNodeList2.Add(childNodes2[i]);
					if (Utils.NodeInList(childNodes[i], nodeList))
					{
						MarkNodeAsIncluded(childNodes2[i]);
					}
					XmlAttributeCollection attributes = childNodes[i].Attributes;
					if (attributes == null)
					{
						continue;
					}
					for (int j = 0; j < attributes.Count; j++)
					{
						if (Utils.NodeInList(attributes[j], nodeList))
						{
							MarkNodeAsIncluded(childNodes2[i].Attributes.Item(j));
						}
					}
				}
				num++;
			}
			while (num < canonicalXmlNodeList.Count);
		}

		internal byte[] GetBytes()
		{
			StringBuilder stringBuilder = new StringBuilder();
			_c14nDoc.Write(stringBuilder, DocPosition.BeforeRootElement, _ancMgr);
			return new UTF8Encoding(encoderShouldEmitUTF8Identifier: false).GetBytes(stringBuilder.ToString());
		}

		internal byte[] GetDigestedBytes(HashAlgorithm hash)
		{
			_c14nDoc.WriteHash(hash, DocPosition.BeforeRootElement, _ancMgr);
			hash.TransformFinalBlock(new byte[0], 0, 0);
			byte[] result = (byte[])hash.Hash.Clone();
			hash.Initialize();
			return result;
		}
	}
	internal class CanonicalXmlAttribute : XmlAttribute, ICanonicalizableNode
	{
		private bool _isInNodeSet;

		public bool IsInNodeSet
		{
			get
			{
				return _isInNodeSet;
			}
			set
			{
				_isInNodeSet = value;
			}
		}

		public CanonicalXmlAttribute(string prefix, string localName, string namespaceURI, XmlDocument doc, bool defaultNodeSetInclusionState)
			: base(prefix, localName, namespaceURI, doc)
		{
			IsInNodeSet = defaultNodeSetInclusionState;
		}

		public void Write(StringBuilder strBuilder, DocPosition docPos, AncestralNamespaceContextManager anc)
		{
			strBuilder.Append(" " + Name + "=\"");
			strBuilder.Append(Utils.EscapeAttributeValue(Value));
			strBuilder.Append("\"");
		}

		public void WriteHash(HashAlgorithm hash, DocPosition docPos, AncestralNamespaceContextManager anc)
		{
			UTF8Encoding uTF8Encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false);
			byte[] bytes = uTF8Encoding.GetBytes(" " + Name + "=\"");
			hash.TransformBlock(bytes, 0, bytes.Length, bytes, 0);
			bytes = uTF8Encoding.GetBytes(Utils.EscapeAttributeValue(Value));
			hash.TransformBlock(bytes, 0, bytes.Length, bytes, 0);
			bytes = uTF8Encoding.GetBytes("\"");
			hash.TransformBlock(bytes, 0, bytes.Length, bytes, 0);
		}
	}
	internal class CanonicalXmlCDataSection : XmlCDataSection, ICanonicalizableNode
	{
		private bool _isInNodeSet;

		public bool IsInNodeSet
		{
			get
			{
				return _isInNodeSet;
			}
			set
			{
				_isInNodeSet = value;
			}
		}

		public CanonicalXmlCDataSection(string data, XmlDocument doc, bool defaultNodeSetInclusionState)
			: base(data, doc)
		{
			_isInNodeSet = defaultNodeSetInclusionState;
		}

		public void Write(StringBuilder strBuilder, DocPosition docPos, AncestralNamespaceContextManager anc)
		{
			if (IsInNodeSet)
			{
				strBuilder.Append(Utils.EscapeCData(Data));
			}
		}

		public void WriteHash(HashAlgorithm hash, DocPosition docPos, AncestralNamespaceContextManager anc)
		{
			if (IsInNodeSet)
			{
				byte[] bytes = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false).GetBytes(Utils.EscapeCData(Data));
				hash.TransformBlock(bytes, 0, bytes.Length, bytes, 0);
			}
		}
	}
	internal class CanonicalXmlComment : XmlComment, ICanonicalizableNode
	{
		private bool _isInNodeSet;

		private bool _includeComments;

		public bool IsInNodeSet
		{
			get
			{
				return _isInNodeSet;
			}
			set
			{
				_isInNodeSet = value;
			}
		}

		public bool IncludeComments => _includeComments;

		public CanonicalXmlComment(string comment, XmlDocument doc, bool defaultNodeSetInclusionState, bool includeComments)
			: base(comment, doc)
		{
			_isInNodeSet = defaultNodeSetInclusionState;
			_includeComments = includeComments;
		}

		public void Write(StringBuilder strBuilder, DocPosition docPos, AncestralNamespaceContextManager anc)
		{
			if (IsInNodeSet && IncludeC

Room Architect Tool_Data/Managed/System.ServiceModel.Internals.dll

Decompiled 3 months ago
#define DEBUG
using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
using System.Runtime.Diagnostics;
using System.Runtime.Interop;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
using System.Runtime.Serialization;
using System.Security;
using System.Security.Permissions;
using System.Security.Principal;
using System.ServiceModel.Internals;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.XPath;
using Microsoft.Win32.SafeHandles;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: Guid("a9b8c4b5-b4a9-4800-8268-e8ec3b93d9ac")]
[assembly: InternalsVisibleTo("System.Activities, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("System.Activities.Statements, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("System.Activities.Extended, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("System.Runtime.DurableInstancing, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("System.Runtime.Serialization.Xaml, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("System.Runtime.Xaml, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("System.ServiceModel, PublicKey=00000000000000000400000000000000")]
[assembly: InternalsVisibleTo("System.ServiceModel.Activation, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("System.ServiceModel.ServiceMoniker40, PublicKey=00000000000000000400000000000000")]
[assembly: InternalsVisibleTo("System.ServiceModel.Activities, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("System.ServiceModel.Channels, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("System.ServiceModel.LocalChannel, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("System.ServiceModel.Discovery, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("System.ServiceModel.Routing, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("System.ServiceModel.Web, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("Microsoft.ServiceModel.Web.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("System.WorkflowServices, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("System.ServiceModel.WasHosting, PublicKey=00000000000000000400000000000000")]
[assembly: InternalsVisibleTo("System.Xaml.Hosting, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("XamlBuildTask, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("SMSvcHost, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
[assembly: InternalsVisibleTo("SMDiagnostics, PublicKey=00000000000000000400000000000000")]
[assembly: InternalsVisibleTo("Microsoft.Transactions.Bridge, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
[assembly: InternalsVisibleTo("System.IO.Log, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
[assembly: InternalsVisibleTo("System.Runtime.Serialization, PublicKey=00000000000000000400000000000000")]
[assembly: InternalsVisibleTo("System.IdentityModel, PublicKey=00000000000000000400000000000000")]
[assembly: InternalsVisibleTo("System.IdentityModel.Selectors, PublicKey=00000000000000000400000000000000")]
[assembly: InternalsVisibleTo("System.IdentityModel.Services, PublicKey=00000000000000000400000000000000")]
[assembly: InternalsVisibleTo("WorkflowManagementService, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("System.Activities.DurableInstancing, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("XsdBuildTask, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("System.ServiceModel.Friend, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
[assembly: InternalsVisibleTo("Microsoft.CDF.Test.Persistence, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("CDF.CIT.Scenarios.Common, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("WireTool, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
[assembly: InternalsVisibleTo("WsatTest, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
[assembly: InternalsVisibleTo("WCF.CIT.ChannelModel, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
[assembly: InternalsVisibleTo("System.Activities.Core.Presentation, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("System.Activities.Presentation, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("Microsoft.Activities.Build, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("Microsoft.VisualStudio.ServiceModel, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: AssemblyTitle("System.ServiceModel.Internals.dll")]
[assembly: AssemblyDescription("Contains share code for some System.ServiceModel libraries")]
[assembly: AssemblyDefaultAlias("System.ServiceModel.dll")]
[assembly: AssemblyInformationalVersion("4.6.57.0")]
[assembly: AssemblyFileVersion("4.6.57.0")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: CLSCompliant(true)]
[assembly: AssemblyDelaySign(true)]
[assembly: AssemblyKeyFile("../ecma.pub")]
[assembly: AllowPartiallyTrustedCallers]
[assembly: ComCompatibleVersion(1, 0, 3300, 0)]
[assembly: SecurityCritical(SecurityCriticalScope.Explicit)]
[assembly: InternalsVisibleTo("System.Runtime.DurableInstancing, PublicKey=00000000000000000400000000000000")]
[assembly: InternalsVisibleTo("System.ServiceModel.Web, PublicKey=00000000000000000400000000000000")]
[assembly: ComVisible(false)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
internal static class AssemblyRef
{
	internal const string SystemConfiguration = "System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	internal const string System = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string EcmaPublicKey = "b77a5c561934e089";

	public const string FrameworkPublicKeyFull = "00000000000000000400000000000000";

	public const string FrameworkPublicKeyFull2 = "00000000000000000400000000000000";

	public const string MicrosoftPublicKey = "b03f5f7f11d50a3a";

	public const string MicrosoftJScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string MicrosoftVSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string SystemData = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string SystemDesign = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string SystemDrawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string SystemWeb = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string SystemWebExtensions = "System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string SystemWindowsForms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
internal static class Consts
{
	public const string MonoVersion = "5.11.0.0";

	public const string MonoCompany = "Mono development team";

	public const string MonoProduct = "Mono Common Language Infrastructure";

	public const string MonoCopyright = "(c) Various Mono authors";

	public const int MonoCorlibVersion = 1051100001;

	public const string FxVersion = "4.0.0.0";

	public const string FxFileVersion = "4.6.57.0";

	public const string EnvironmentVersion = "4.0.30319.42000";

	public const string VsVersion = "0.0.0.0";

	public const string VsFileVersion = "11.0.0.0";

	private const string PublicKeyToken = "b77a5c561934e089";

	public const string AssemblyI18N = "I18N, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMicrosoft_JScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMono_Http = "Mono.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Posix = "Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Security = "Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Messaging_RabbitMQ = "Mono.Messaging.RabbitMQ, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyCorlib = "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Data = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Design = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing_Design = "System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Messaging = "System.Messaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Security = "System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Web = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Core = "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string WindowsBase_3_0 = "WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
internal static class SR
{
	internal static string GetString(string name, params object[] args)
	{
		return GetString(CultureInfo.InvariantCulture, name, args);
	}

	internal static string GetString(CultureInfo culture, string name, params object[] args)
	{
		return string.Format(culture, name, args);
	}

	internal static string GetString(string name)
	{
		return name;
	}

	internal static string GetString(CultureInfo culture, string name)
	{
		return name;
	}

	internal static string Format(string resourceFormat, params object[] args)
	{
		if (args != null)
		{
			return string.Format(CultureInfo.InvariantCulture, resourceFormat, args);
		}
		return resourceFormat;
	}

	internal static string Format(string resourceFormat, object p1)
	{
		return string.Format(CultureInfo.InvariantCulture, resourceFormat, p1);
	}

	internal static string Format(string resourceFormat, object p1, object p2)
	{
		return string.Format(CultureInfo.InvariantCulture, resourceFormat, p1, p2);
	}

	internal static string Format(string resourceFormat, object p1, object p2, object p3)
	{
		return string.Format(CultureInfo.InvariantCulture, resourceFormat, p1, p2, p3);
	}
}
namespace System.ServiceModel.Internals
{
	internal static class LocalAppContextSwitches
	{
		public static readonly bool IncludeNullExceptionMessageInETWTrace;
	}
}
namespace System.Runtime
{
	internal abstract class ActionItem
	{
		[SecurityCritical]
		private static class CallbackHelper
		{
			private static Action<object> invokeWithoutContextCallback;

			private static ContextCallback onContextAppliedCallback;

			public static Action<object> InvokeWithoutContextCallback
			{
				get
				{
					if (invokeWithoutContextCallback == null)
					{
						invokeWithoutContextCallback = InvokeWithoutContext;
					}
					return invokeWithoutContextCallback;
				}
			}

			public static ContextCallback OnContextAppliedCallback
			{
				get
				{
					if (onContextAppliedCallback == null)
					{
						onContextAppliedCallback = OnContextApplied;
					}
					return onContextAppliedCallback;
				}
			}

			private static void InvokeWithoutContext(object state)
			{
				((ActionItem)state).Invoke();
				((ActionItem)state).isScheduled = false;
			}

			private static void OnContextApplied(object o)
			{
				((ActionItem)o).Invoke();
				((ActionItem)o).isScheduled = false;
			}
		}

		private class DefaultActionItem : ActionItem
		{
			[SecurityCritical]
			private Action<object> callback;

			[SecurityCritical]
			private object state;

			private bool flowLegacyActivityId;

			private Guid activityId;

			private EventTraceActivity eventTraceActivity;

			[SecuritySafeCritical]
			public DefaultActionItem(Action<object> callback, object state, bool isLowPriority)
			{
				base.LowPriority = isLowPriority;
				this.callback = callback;
				this.state = state;
				if (WaitCallbackActionItem.ShouldUseActivity)
				{
					flowLegacyActivityId = true;
					activityId = DiagnosticTraceBase.ActivityId;
				}
				if (Fx.Trace.IsEnd2EndActivityTracingEnabled)
				{
					eventTraceActivity = EventTraceActivity.GetFromThreadOrCreate();
					if (TraceCore.ActionItemScheduledIsEnabled(Fx.Trace))
					{
						TraceCore.ActionItemScheduled(Fx.Trace, eventTraceActivity);
					}
				}
			}

			[SecurityCritical]
			protected override void Invoke()
			{
				if (flowLegacyActivityId || Fx.Trace.IsEnd2EndActivityTracingEnabled)
				{
					TraceAndInvoke();
				}
				else
				{
					callback(state);
				}
			}

			[SecurityCritical]
			private void TraceAndInvoke()
			{
				if (flowLegacyActivityId)
				{
					Guid guid = DiagnosticTraceBase.ActivityId;
					try
					{
						DiagnosticTraceBase.ActivityId = activityId;
						callback(state);
						return;
					}
					finally
					{
						DiagnosticTraceBase.ActivityId = guid;
					}
				}
				Guid empty = Guid.Empty;
				bool flag = false;
				try
				{
					if (eventTraceActivity != null)
					{
						empty = Trace.CorrelationManager.ActivityId;
						flag = true;
						Trace.CorrelationManager.ActivityId = eventTraceActivity.ActivityId;
						if (TraceCore.ActionItemCallbackInvokedIsEnabled(Fx.Trace))
						{
							TraceCore.ActionItemCallbackInvoked(Fx.Trace, eventTraceActivity);
						}
					}
					callback(state);
				}
				finally
				{
					if (flag)
					{
						Trace.CorrelationManager.ActivityId = empty;
					}
				}
			}
		}

		private bool isScheduled;

		private bool lowPriority;

		public bool LowPriority
		{
			get
			{
				return lowPriority;
			}
			protected set
			{
				lowPriority = value;
			}
		}

		public static void Schedule(Action<object> callback, object state)
		{
			Schedule(callback, state, lowPriority: false);
		}

		[SecuritySafeCritical]
		public static void Schedule(Action<object> callback, object state, bool lowPriority)
		{
			if (PartialTrustHelpers.ShouldFlowSecurityContext || WaitCallbackActionItem.ShouldUseActivity || Fx.Trace.IsEnd2EndActivityTracingEnabled)
			{
				new DefaultActionItem(callback, state, lowPriority).Schedule();
			}
			else
			{
				ScheduleCallback(callback, state, lowPriority);
			}
		}

		[SecurityCritical]
		protected abstract void Invoke();

		[SecurityCritical]
		protected void Schedule()
		{
			if (isScheduled)
			{
				throw Fx.Exception.AsError(new InvalidOperationException("Action Item Is Already Scheduled"));
			}
			isScheduled = true;
			ScheduleCallback(CallbackHelper.InvokeWithoutContextCallback);
		}

		[SecurityCritical]
		protected void ScheduleWithoutContext()
		{
			if (isScheduled)
			{
				throw Fx.Exception.AsError(new InvalidOperationException("Action Item Is Already Scheduled"));
			}
			isScheduled = true;
			ScheduleCallback(CallbackHelper.InvokeWithoutContextCallback);
		}

		[SecurityCritical]
		private static void ScheduleCallback(Action<object> callback, object state, bool lowPriority)
		{
			if (lowPriority)
			{
				IOThreadScheduler.ScheduleCallbackLowPriNoFlow(callback, state);
			}
			else
			{
				IOThreadScheduler.ScheduleCallbackNoFlow(callback, state);
			}
		}

		[SecurityCritical]
		private void ScheduleCallback(Action<object> callback)
		{
			ScheduleCallback(callback, this, lowPriority);
		}
	}
	internal static class AssertHelper
	{
		internal static void FireAssert(string message)
		{
			try
			{
			}
			finally
			{
				Debug.Assert(condition: false, message);
			}
		}
	}
	internal enum AsyncCompletionResult
	{
		Queued,
		Completed
	}
	internal abstract class AsyncEventArgs : IAsyncEventArgs
	{
		private enum OperationState
		{
			Created,
			PendingCompletion,
			CompletedSynchronously,
			CompletedAsynchronously
		}

		private OperationState state;

		private object asyncState;

		private AsyncEventArgsCallback callback;

		private Exception exception;

		public Exception Exception => exception;

		public object AsyncState => asyncState;

		private OperationState State
		{
			set
			{
				switch (value)
				{
				case OperationState.PendingCompletion:
					if (state == OperationState.PendingCompletion)
					{
						throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.AsyncEventArgsCompletionPending(GetType())));
					}
					break;
				case OperationState.CompletedSynchronously:
				case OperationState.CompletedAsynchronously:
					if (state != OperationState.PendingCompletion)
					{
						throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.AsyncEventArgsCompletedTwice(GetType())));
					}
					break;
				}
				state = value;
			}
		}

		public void Complete(bool completedSynchronously)
		{
			Complete(completedSynchronously, null);
		}

		public virtual void Complete(bool completedSynchronously, Exception exception)
		{
			this.exception = exception;
			if (completedSynchronously)
			{
				State = OperationState.CompletedSynchronously;
				return;
			}
			State = OperationState.CompletedAsynchronously;
			callback(this);
		}

		protected void SetAsyncState(AsyncEventArgsCallback callback, object state)
		{
			if (callback == null)
			{
				throw Fx.Exception.ArgumentNull("callback");
			}
			State = OperationState.PendingCompletion;
			asyncState = state;
			this.callback = callback;
		}
	}
	internal class AsyncEventArgs<TArgument> : AsyncEventArgs
	{
		public TArgument Arguments { get; private set; }

		public virtual void Set(AsyncEventArgsCallback callback, TArgument arguments, object state)
		{
			SetAsyncState(callback, state);
			Arguments = arguments;
		}
	}
	internal class AsyncEventArgs<TArgument, TResult> : AsyncEventArgs<TArgument>
	{
		public TResult Result { get; set; }
	}
	internal delegate void AsyncEventArgsCallback(IAsyncEventArgs eventArgs);
	internal abstract class AsyncResult : IAsyncResult
	{
		protected delegate bool AsyncCompletion(IAsyncResult result);

		private static AsyncCallback asyncCompletionWrapperCallback;

		private AsyncCallback callback;

		private bool completedSynchronously;

		private bool endCalled;

		private Exception exception;

		private bool isCompleted;

		private AsyncCompletion nextAsyncCompletion;

		private object state;

		private Action beforePrepareAsyncCompletionAction;

		private Func<IAsyncResult, bool> checkSyncValidationFunc;

		private ManualResetEvent manualResetEvent;

		private object thisLock;

		public object AsyncState => state;

		public WaitHandle AsyncWaitHandle
		{
			get
			{
				if (manualResetEvent != null)
				{
					return manualResetEvent;
				}
				lock (ThisLock)
				{
					if (manualResetEvent == null)
					{
						manualResetEvent = new ManualResetEvent(isCompleted);
					}
				}
				return manualResetEvent;
			}
		}

		public bool CompletedSynchronously => completedSynchronously;

		public bool HasCallback => callback != null;

		public bool IsCompleted => isCompleted;

		protected Action<AsyncResult, Exception> OnCompleting { get; set; }

		private object ThisLock => thisLock;

		protected Action<AsyncCallback, IAsyncResult> VirtualCallback { get; set; }

		protected AsyncResult(AsyncCallback callback, object state)
		{
			this.callback = callback;
			this.state = state;
			thisLock = new object();
		}

		protected void Complete(bool completedSynchronously)
		{
			if (isCompleted)
			{
				throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.AsyncResultCompletedTwice(GetType())));
			}
			this.completedSynchronously = completedSynchronously;
			if (OnCompleting != null)
			{
				try
				{
					OnCompleting(this, exception);
				}
				catch (Exception ex)
				{
					if (Fx.IsFatal(ex))
					{
						throw;
					}
					exception = ex;
				}
			}
			if (completedSynchronously)
			{
				isCompleted = true;
			}
			else
			{
				lock (ThisLock)
				{
					isCompleted = true;
					if (manualResetEvent != null)
					{
						manualResetEvent.Set();
					}
				}
			}
			if (callback == null)
			{
				return;
			}
			try
			{
				if (VirtualCallback != null)
				{
					VirtualCallback(callback, this);
				}
				else
				{
					callback(this);
				}
			}
			catch (Exception innerException)
			{
				if (Fx.IsFatal(innerException))
				{
					throw;
				}
				throw Fx.Exception.AsError(new CallbackException("Async Callback Threw Exception", innerException));
			}
		}

		protected void Complete(bool completedSynchronously, Exception exception)
		{
			this.exception = exception;
			Complete(completedSynchronously);
		}

		private static void AsyncCompletionWrapperCallback(IAsyncResult result)
		{
			if (result == null)
			{
				throw Fx.Exception.AsError(new InvalidOperationException("Invalid Null Async Result"));
			}
			if (result.CompletedSynchronously)
			{
				return;
			}
			AsyncResult asyncResult = (AsyncResult)result.AsyncState;
			if (!asyncResult.OnContinueAsyncCompletion(result))
			{
				return;
			}
			AsyncCompletion nextCompletion = asyncResult.GetNextCompletion();
			if (nextCompletion == null)
			{
				ThrowInvalidAsyncResult(result);
			}
			bool flag = false;
			Exception ex = null;
			try
			{
				flag = nextCompletion(result);
			}
			catch (Exception ex2)
			{
				if (Fx.IsFatal(ex2))
				{
					throw;
				}
				flag = true;
				ex = ex2;
			}
			if (flag)
			{
				asyncResult.Complete(completedSynchronously: false, ex);
			}
		}

		protected virtual bool OnContinueAsyncCompletion(IAsyncResult result)
		{
			return true;
		}

		protected void SetBeforePrepareAsyncCompletionAction(Action beforePrepareAsyncCompletionAction)
		{
			this.beforePrepareAsyncCompletionAction = beforePrepareAsyncCompletionAction;
		}

		protected void SetCheckSyncValidationFunc(Func<IAsyncResult, bool> checkSyncValidationFunc)
		{
			this.checkSyncValidationFunc = checkSyncValidationFunc;
		}

		protected AsyncCallback PrepareAsyncCompletion(AsyncCompletion callback)
		{
			if (beforePrepareAsyncCompletionAction != null)
			{
				beforePrepareAsyncCompletionAction();
			}
			nextAsyncCompletion = callback;
			if (asyncCompletionWrapperCallback == null)
			{
				asyncCompletionWrapperCallback = Fx.ThunkCallback(AsyncCompletionWrapperCallback);
			}
			return asyncCompletionWrapperCallback;
		}

		protected bool CheckSyncContinue(IAsyncResult result)
		{
			AsyncCompletion asyncCompletion;
			return TryContinueHelper(result, out asyncCompletion);
		}

		protected bool SyncContinue(IAsyncResult result)
		{
			if (TryContinueHelper(result, out var asyncCompletion))
			{
				return asyncCompletion(result);
			}
			return false;
		}

		private bool TryContinueHelper(IAsyncResult result, out AsyncCompletion callback)
		{
			if (result == null)
			{
				throw Fx.Exception.AsError(new InvalidOperationException("Invalid Null Async Result"));
			}
			callback = null;
			if (checkSyncValidationFunc != null)
			{
				if (!checkSyncValidationFunc(result))
				{
					return false;
				}
			}
			else if (!result.CompletedSynchronously)
			{
				return false;
			}
			callback = GetNextCompletion();
			if (callback == null)
			{
				ThrowInvalidAsyncResult("Only call Check/SyncContinue once per async operation (once per PrepareAsyncCompletion).");
			}
			return true;
		}

		private AsyncCompletion GetNextCompletion()
		{
			AsyncCompletion result = nextAsyncCompletion;
			nextAsyncCompletion = null;
			return result;
		}

		protected static void ThrowInvalidAsyncResult(IAsyncResult result)
		{
			throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.InvalidAsyncResultImplementation(result.GetType())));
		}

		protected static void ThrowInvalidAsyncResult(string debugText)
		{
			string message = "Invalid Async Result Implementation Generic";
			throw Fx.Exception.AsError(new InvalidOperationException(message));
		}

		protected static TAsyncResult End<TAsyncResult>(IAsyncResult result) where TAsyncResult : AsyncResult
		{
			if (result == null)
			{
				throw Fx.Exception.ArgumentNull("result");
			}
			if (!(result is TAsyncResult val))
			{
				throw Fx.Exception.Argument("result", "Invalid Async Result");
			}
			if (val.endCalled)
			{
				throw Fx.Exception.AsError(new InvalidOperationException("Async Result Already Ended"));
			}
			val.endCalled = true;
			if (!val.isCompleted)
			{
				val.AsyncWaitHandle.WaitOne();
			}
			if (val.manualResetEvent != null)
			{
				val.manualResetEvent.Close();
			}
			if (val.exception != null)
			{
				throw Fx.Exception.AsError(val.exception);
			}
			return val;
		}
	}
	internal class AsyncWaitHandle
	{
		private class AsyncWaiter : ActionItem
		{
			[SecurityCritical]
			private Action<object, TimeoutException> callback;

			[SecurityCritical]
			private object state;

			private IOThreadTimer timer;

			private TimeSpan originalTimeout;

			public AsyncWaitHandle Parent { get; private set; }

			public bool TimedOut { get; set; }

			[SecuritySafeCritical]
			public AsyncWaiter(AsyncWaitHandle parent, Action<object, TimeoutException> callback, object state)
			{
				Parent = parent;
				this.callback = callback;
				this.state = state;
			}

			[SecuritySafeCritical]
			public void Call()
			{
				Schedule();
			}

			[SecurityCritical]
			protected override void Invoke()
			{
				callback(state, TimedOut ? new TimeoutException(InternalSR.TimeoutOnOperation(originalTimeout)) : null);
			}

			public void SetTimer(Action<object> callback, object state, TimeSpan timeout)
			{
				if (timer != null)
				{
					throw Fx.Exception.AsError(new InvalidOperationException("Must Cancel Old Timer"));
				}
				originalTimeout = timeout;
				timer = new IOThreadTimer(callback, state, isTypicallyCanceledShortlyAfterBeingSet: false);
				timer.Set(timeout);
			}

			public void CancelTimer()
			{
				if (timer != null)
				{
					timer.Cancel();
					timer = null;
				}
			}
		}

		private static Action<object> timerCompleteCallback;

		private List<AsyncWaiter> asyncWaiters;

		private bool isSignaled;

		private EventResetMode resetMode;

		private object syncObject;

		private int syncWaiterCount;

		public AsyncWaitHandle()
			: this(EventResetMode.AutoReset)
		{
		}

		public AsyncWaitHandle(EventResetMode resetMode)
		{
			this.resetMode = resetMode;
			syncObject = new object();
		}

		public bool WaitAsync(Action<object, TimeoutException> callback, object state, TimeSpan timeout)
		{
			if (!isSignaled || (isSignaled && resetMode == EventResetMode.AutoReset))
			{
				lock (syncObject)
				{
					if (isSignaled && resetMode == EventResetMode.AutoReset)
					{
						isSignaled = false;
					}
					else if (!isSignaled)
					{
						AsyncWaiter asyncWaiter = new AsyncWaiter(this, callback, state);
						if (asyncWaiters == null)
						{
							asyncWaiters = new List<AsyncWaiter>();
						}
						asyncWaiters.Add(asyncWaiter);
						if (timeout != TimeSpan.MaxValue)
						{
							if (timerCompleteCallback == null)
							{
								timerCompleteCallback = OnTimerComplete;
							}
							asyncWaiter.SetTimer(timerCompleteCallback, asyncWaiter, timeout);
						}
						return false;
					}
				}
			}
			return true;
		}

		private static void OnTimerComplete(object state)
		{
			AsyncWaiter asyncWaiter = (AsyncWaiter)state;
			AsyncWaitHandle parent = asyncWaiter.Parent;
			bool flag = false;
			lock (parent.syncObject)
			{
				if (parent.asyncWaiters != null && parent.asyncWaiters.Remove(asyncWaiter))
				{
					asyncWaiter.TimedOut = true;
					flag = true;
				}
			}
			asyncWaiter.CancelTimer();
			if (flag)
			{
				asyncWaiter.Call();
			}
		}

		public bool Wait(TimeSpan timeout)
		{
			if (!isSignaled || (isSignaled && resetMode == EventResetMode.AutoReset))
			{
				lock (syncObject)
				{
					if (isSignaled && resetMode == EventResetMode.AutoReset)
					{
						isSignaled = false;
					}
					else if (!isSignaled)
					{
						bool flag = false;
						try
						{
							try
							{
							}
							finally
							{
								syncWaiterCount++;
								flag = true;
							}
							if (timeout == TimeSpan.MaxValue)
							{
								if (!Monitor.Wait(syncObject, -1))
								{
									return false;
								}
							}
							else if (!Monitor.Wait(syncObject, timeout))
							{
								return false;
							}
						}
						finally
						{
							if (flag)
							{
								syncWaiterCount--;
							}
						}
					}
				}
			}
			return true;
		}

		public void Set()
		{
			List<AsyncWaiter> list = null;
			AsyncWaiter asyncWaiter = null;
			if (!isSignaled)
			{
				lock (syncObject)
				{
					if (!isSignaled)
					{
						if (resetMode == EventResetMode.ManualReset)
						{
							isSignaled = true;
							Monitor.PulseAll(syncObject);
							list = asyncWaiters;
							asyncWaiters = null;
						}
						else if (syncWaiterCount > 0)
						{
							Monitor.Pulse(syncObject);
						}
						else if (asyncWaiters != null && asyncWaiters.Count > 0)
						{
							asyncWaiter = asyncWaiters[0];
							asyncWaiters.RemoveAt(0);
						}
						else
						{
							isSignaled = true;
						}
					}
				}
			}
			if (list != null)
			{
				foreach (AsyncWaiter item in list)
				{
					item.CancelTimer();
					item.Call();
				}
			}
			if (asyncWaiter != null)
			{
				asyncWaiter.CancelTimer();
				asyncWaiter.Call();
			}
		}

		public void Reset()
		{
			isSignaled = false;
		}
	}
	internal sealed class BackoffTimeoutHelper
	{
		private static readonly int maxSkewMilliseconds = (int)(IOThreadTimer.SystemTimeResolutionTicks / 10000);

		private static readonly long maxDriftTicks = IOThreadTimer.SystemTimeResolutionTicks * 2;

		private static readonly TimeSpan defaultInitialWaitTime = TimeSpan.FromMilliseconds(1.0);

		private static readonly TimeSpan defaultMaxWaitTime = TimeSpan.FromMinutes(1.0);

		private DateTime deadline;

		private TimeSpan maxWaitTime;

		private TimeSpan waitTime;

		private IOThreadTimer backoffTimer;

		private Action<object> backoffCallback;

		private object backoffState;

		private Random random;

		private TimeSpan originalTimeout;

		public TimeSpan OriginalTimeout => originalTimeout;

		internal BackoffTimeoutHelper(TimeSpan timeout)
			: this(timeout, defaultMaxWaitTime)
		{
		}

		internal BackoffTimeoutHelper(TimeSpan timeout, TimeSpan maxWaitTime)
			: this(timeout, maxWaitTime, defaultInitialWaitTime)
		{
		}

		internal BackoffTimeoutHelper(TimeSpan timeout, TimeSpan maxWaitTime, TimeSpan initialWaitTime)
		{
			random = new Random(GetHashCode());
			this.maxWaitTime = maxWaitTime;
			originalTimeout = timeout;
			Reset(timeout, initialWaitTime);
		}

		private void Reset(TimeSpan timeout, TimeSpan initialWaitTime)
		{
			if (timeout == TimeSpan.MaxValue)
			{
				deadline = DateTime.MaxValue;
			}
			else
			{
				deadline = DateTime.UtcNow + timeout;
			}
			waitTime = initialWaitTime;
		}

		public bool IsExpired()
		{
			if (deadline == DateTime.MaxValue)
			{
				return false;
			}
			return DateTime.UtcNow >= deadline;
		}

		public void WaitAndBackoff(Action<object> callback, object state)
		{
			if (backoffCallback != callback || backoffState != state)
			{
				if (backoffTimer != null)
				{
					backoffTimer.Cancel();
				}
				backoffCallback = callback;
				backoffState = state;
				backoffTimer = new IOThreadTimer(callback, state, isTypicallyCanceledShortlyAfterBeingSet: false, maxSkewMilliseconds);
			}
			TimeSpan timeFromNow = WaitTimeWithDrift();
			Backoff();
			backoffTimer.Set(timeFromNow);
		}

		public void WaitAndBackoff()
		{
			Thread.Sleep(WaitTimeWithDrift());
			Backoff();
		}

		private TimeSpan WaitTimeWithDrift()
		{
			return Ticks.ToTimeSpan(Math.Max(Ticks.FromTimeSpan(defaultInitialWaitTime), Ticks.Add(Ticks.FromTimeSpan(waitTime), (uint)random.Next() % (2 * maxDriftTicks + 1) - maxDriftTicks)));
		}

		private void Backoff()
		{
			if (waitTime.Ticks >= maxWaitTime.Ticks / 2)
			{
				waitTime = maxWaitTime;
			}
			else
			{
				waitTime = TimeSpan.FromTicks(waitTime.Ticks * 2);
			}
			if (!(deadline != DateTime.MaxValue))
			{
				return;
			}
			TimeSpan timeSpan = deadline - DateTime.UtcNow;
			if (waitTime > timeSpan)
			{
				waitTime = timeSpan;
				if (waitTime < TimeSpan.Zero)
				{
					waitTime = TimeSpan.Zero;
				}
			}
		}
	}
	internal class BufferedOutputStream : Stream
	{
		private InternalBufferManager bufferManager;

		private byte[][] chunks;

		private int chunkCount;

		private byte[] currentChunk;

		private int currentChunkSize;

		private int maxSize;

		private int maxSizeQuota;

		private int totalSize;

		private bool callerReturnsBuffer;

		private bool bufferReturned;

		private bool initialized;

		public override bool CanRead => false;

		public override bool CanSeek => false;

		public override bool CanWrite => true;

		public override long Length => totalSize;

		public override long Position
		{
			get
			{
				throw Fx.Exception.AsError(new NotSupportedException("Seek Not Supported"));
			}
			set
			{
				throw Fx.Exception.AsError(new NotSupportedException("Seek Not Supported"));
			}
		}

		public BufferedOutputStream()
		{
			chunks = new byte[4][];
		}

		public BufferedOutputStream(int initialSize, int maxSize, InternalBufferManager bufferManager)
			: this()
		{
			Reinitialize(initialSize, maxSize, bufferManager);
		}

		public BufferedOutputStream(int maxSize)
			: this(0, maxSize, InternalBufferManager.Create(0L, int.MaxValue))
		{
		}

		public void Reinitialize(int initialSize, int maxSizeQuota, InternalBufferManager bufferManager)
		{
			Reinitialize(initialSize, maxSizeQuota, maxSizeQuota, bufferManager);
		}

		public void Reinitialize(int initialSize, int maxSizeQuota, int effectiveMaxSize, InternalBufferManager bufferManager)
		{
			this.maxSizeQuota = maxSizeQuota;
			maxSize = effectiveMaxSize;
			this.bufferManager = bufferManager;
			currentChunk = bufferManager.TakeBuffer(initialSize);
			currentChunkSize = 0;
			totalSize = 0;
			chunkCount = 1;
			chunks[0] = currentChunk;
			initialized = true;
		}

		private void AllocNextChunk(int minimumChunkSize)
		{
			int num = ((currentChunk.Length <= 1073741823) ? (currentChunk.Length * 2) : int.MaxValue);
			if (minimumChunkSize > num)
			{
				num = minimumChunkSize;
			}
			byte[] array = bufferManager.TakeBuffer(num);
			if (chunkCount == chunks.Length)
			{
				byte[][] destinationArray = new byte[chunks.Length * 2][];
				Array.Copy(chunks, destinationArray, chunks.Length);
				chunks = destinationArray;
			}
			chunks[chunkCount++] = array;
			currentChunk = array;
			currentChunkSize = 0;
		}

		public override IAsyncResult BeginRead(byte[] buffer, int offset, int size, AsyncCallback callback, object state)
		{
			throw Fx.Exception.AsError(new NotSupportedException("Read Not Supported"));
		}

		public override int EndRead(IAsyncResult result)
		{
			throw Fx.Exception.AsError(new NotSupportedException("Read Not Supported"));
		}

		public override IAsyncResult BeginWrite(byte[] buffer, int offset, int size, AsyncCallback callback, object state)
		{
			Write(buffer, offset, size);
			return new CompletedAsyncResult(callback, state);
		}

		public override void EndWrite(IAsyncResult result)
		{
			CompletedAsyncResult.End(result);
		}

		public void Clear()
		{
			if (!callerReturnsBuffer)
			{
				for (int i = 0; i < chunkCount; i++)
				{
					bufferManager.ReturnBuffer(chunks[i]);
					chunks[i] = null;
				}
			}
			callerReturnsBuffer = false;
			initialized = false;
			bufferReturned = false;
			chunkCount = 0;
			currentChunk = null;
		}

		public override void Close()
		{
		}

		public override void Flush()
		{
		}

		public override int Read(byte[] buffer, int offset, int size)
		{
			throw Fx.Exception.AsError(new NotSupportedException("Read Not Supported"));
		}

		public override int ReadByte()
		{
			throw Fx.Exception.AsError(new NotSupportedException("Read Not Supported"));
		}

		public override long Seek(long offset, SeekOrigin origin)
		{
			throw Fx.Exception.AsError(new NotSupportedException("Seek Not Supported"));
		}

		public override void SetLength(long value)
		{
			throw Fx.Exception.AsError(new NotSupportedException("Seek Not Supported"));
		}

		public MemoryStream ToMemoryStream()
		{
			int bufferSize;
			return new MemoryStream(ToArray(out bufferSize), 0, bufferSize);
		}

		public byte[] ToArray(out int bufferSize)
		{
			byte[] array;
			if (chunkCount == 1)
			{
				array = currentChunk;
				bufferSize = currentChunkSize;
				callerReturnsBuffer = true;
			}
			else
			{
				array = bufferManager.TakeBuffer(totalSize);
				int num = 0;
				int num2 = chunkCount - 1;
				for (int i = 0; i < num2; i++)
				{
					byte[] array2 = chunks[i];
					Buffer.BlockCopy(array2, 0, array, num, array2.Length);
					num += array2.Length;
				}
				Buffer.BlockCopy(currentChunk, 0, array, num, currentChunkSize);
				bufferSize = totalSize;
			}
			bufferReturned = true;
			return array;
		}

		public void Skip(int size)
		{
			WriteCore(null, 0, size);
		}

		public override void Write(byte[] buffer, int offset, int size)
		{
			WriteCore(buffer, offset, size);
		}

		protected virtual Exception CreateQuotaExceededException(int maxSizeQuota)
		{
			return new InvalidOperationException(InternalSR.BufferedOutputStreamQuotaExceeded(maxSizeQuota));
		}

		private void WriteCore(byte[] buffer, int offset, int size)
		{
			if (size < 0)
			{
				throw Fx.Exception.ArgumentOutOfRange("size", size, "Value Must Be Non Negative");
			}
			if (int.MaxValue - size < totalSize)
			{
				throw Fx.Exception.AsError(CreateQuotaExceededException(maxSizeQuota));
			}
			int num = totalSize + size;
			if (num > maxSize)
			{
				throw Fx.Exception.AsError(CreateQuotaExceededException(maxSizeQuota));
			}
			int num2 = currentChunk.Length - currentChunkSize;
			if (size > num2)
			{
				if (num2 > 0)
				{
					if (buffer != null)
					{
						Buffer.BlockCopy(buffer, offset, currentChunk, currentChunkSize, num2);
					}
					currentChunkSize = currentChunk.Length;
					offset += num2;
					size -= num2;
				}
				AllocNextChunk(size);
			}
			if (buffer != null)
			{
				Buffer.BlockCopy(buffer, offset, currentChunk, currentChunkSize, size);
			}
			totalSize = num;
			currentChunkSize += size;
		}

		public override void WriteByte(byte value)
		{
			if (totalSize == maxSize)
			{
				throw Fx.Exception.AsError(CreateQuotaExceededException(maxSize));
			}
			if (currentChunkSize == currentChunk.Length)
			{
				AllocNextChunk(1);
			}
			currentChunk[currentChunkSize++] = value;
		}
	}
	[Serializable]
	internal class CallbackException : FatalException
	{
		public CallbackException()
		{
		}

		public CallbackException(string message, Exception innerException)
			: base(message, innerException)
		{
		}

		protected CallbackException(SerializationInfo info, StreamingContext context)
			: base(info, context)
		{
		}
	}
	internal class CompletedAsyncResult : AsyncResult
	{
		public CompletedAsyncResult(AsyncCallback callback, object state)
			: base(callback, state)
		{
			Complete(completedSynchronously: true);
		}

		public static void End(IAsyncResult result)
		{
			Fx.AssertAndThrowFatal(result.IsCompleted, "CompletedAsyncResult was not completed!");
			AsyncResult.End<CompletedAsyncResult>(result);
		}
	}
	internal class CompletedAsyncResult<T> : AsyncResult
	{
		private T data;

		public CompletedAsyncResult(T data, AsyncCallback callback, object state)
			: base(callback, state)
		{
			this.data = data;
			Complete(completedSynchronously: true);
		}

		public static T End(IAsyncResult result)
		{
			Fx.AssertAndThrowFatal(result.IsCompleted, "CompletedAsyncResult<T> was not completed!");
			return AsyncResult.End<CompletedAsyncResult<T>>(result).data;
		}
	}
	internal class CompletedAsyncResult<TResult, TParameter> : AsyncResult
	{
		private TResult resultData;

		private TParameter parameter;

		public CompletedAsyncResult(TResult resultData, TParameter parameter, AsyncCallback callback, object state)
			: base(callback, state)
		{
			this.resultData = resultData;
			this.parameter = parameter;
			Complete(completedSynchronously: true);
		}

		public static TResult End(IAsyncResult result, out TParameter parameter)
		{
			Fx.AssertAndThrowFatal(result.IsCompleted, "CompletedAsyncResult<T> was not completed!");
			CompletedAsyncResult<TResult, TParameter> completedAsyncResult = AsyncResult.End<CompletedAsyncResult<TResult, TParameter>>(result);
			parameter = completedAsyncResult.parameter;
			return completedAsyncResult.resultData;
		}
	}
	internal enum ComputerNameFormat
	{
		NetBIOS,
		DnsHostName,
		Dns,
		DnsFullyQualified,
		PhysicalNetBIOS,
		PhysicalDnsHostName,
		PhysicalDnsDomain,
		PhysicalDnsFullyQualified
	}
	internal static class DiagnosticStrings
	{
		internal const string AppDomain = "AppDomain";

		internal const string ChannelTag = "Channel";

		internal const string Description = "Description";

		internal const string DataTag = "Data";

		internal const string DataItemsTag = "DataItems";

		internal const string DescriptionTag = "Description";

		internal const string ExceptionTag = "Exception";

		internal const string ExceptionTypeTag = "ExceptionType";

		internal const string ExceptionStringTag = "ExceptionString";

		internal const string ExtendedDataTag = "ExtendedData";

		internal const string InnerExceptionTag = "InnerException";

		internal const string KeyTag = "Key";

		internal const string MessageTag = "Message";

		internal const string NamespaceTag = "xmlns";

		internal const string NativeErrorCodeTag = "NativeErrorCode";

		internal const string Separator = ":";

		internal const string SeverityTag = "Severity";

		internal const string SourceTag = "Source";

		internal const string StackTraceTag = "StackTrace";

		internal const string Task = "Task";

		internal const string TraceCodeTag = "TraceIdentifier";

		internal const string TraceRecordTag = "TraceRecord";

		internal const string ValueTag = "Value";
	}
	internal class DuplicateDetector<T> where T : class
	{
		private LinkedList<T> fifoList;

		private Dictionary<T, LinkedListNode<T>> items;

		private int capacity;

		private object thisLock;

		public DuplicateDetector(int capacity)
		{
			this.capacity = capacity;
			items = new Dictionary<T, LinkedListNode<T>>();
			fifoList = new LinkedList<T>();
			thisLock = new object();
		}

		public bool AddIfNotDuplicate(T value)
		{
			bool result = false;
			lock (thisLock)
			{
				if (!items.ContainsKey(value))
				{
					Add(value);
					result = true;
				}
			}
			return result;
		}

		private void Add(T value)
		{
			if (items.Count == capacity)
			{
				LinkedListNode<T> last = fifoList.Last;
				items.Remove(last.Value);
				fifoList.Remove(last);
			}
			items.Add(value, fifoList.AddFirst(value));
		}

		public bool Remove(T value)
		{
			bool result = false;
			lock (thisLock)
			{
				if (items.TryGetValue(value, out var value2))
				{
					items.Remove(value);
					fifoList.Remove(value2);
					result = true;
				}
			}
			return result;
		}

		public void Clear()
		{
			lock (thisLock)
			{
				fifoList.Clear();
				items.Clear();
			}
		}
	}
	internal class ExceptionTrace
	{
		private const ushort FailFastEventLogCategory = 6;

		private string eventSourceName;

		private readonly EtwDiagnosticTrace diagnosticTrace;

		public ExceptionTrace(string eventSourceName, EtwDiagnosticTrace diagnosticTrace)
		{
			this.eventSourceName = eventSourceName;
			this.diagnosticTrace = diagnosticTrace;
		}

		public void AsInformation(Exception exception)
		{
			TraceCore.HandledException(diagnosticTrace, (exception != null) ? exception.ToString() : string.Empty, exception);
		}

		public void AsWarning(Exception exception)
		{
			TraceCore.HandledExceptionWarning(diagnosticTrace, (exception != null) ? exception.ToString() : string.Empty, exception);
		}

		public Exception AsError(Exception exception)
		{
			if (exception is AggregateException aggregateException)
			{
				return AsError<Exception>(aggregateException);
			}
			if (exception is TargetInvocationException ex && ex.InnerException != null)
			{
				return AsError(ex.InnerException);
			}
			return TraceException(exception);
		}

		public Exception AsError(Exception exception, string eventSource)
		{
			if (exception is AggregateException aggregateException)
			{
				return AsError<Exception>(aggregateException, eventSource);
			}
			if (exception is TargetInvocationException ex && ex.InnerException != null)
			{
				return AsError(ex.InnerException, eventSource);
			}
			return TraceException(exception, eventSource);
		}

		public Exception AsError(TargetInvocationException targetInvocationException, string eventSource)
		{
			if (Fx.IsFatal(targetInvocationException))
			{
				return targetInvocationException;
			}
			Exception innerException = targetInvocationException.InnerException;
			if (innerException != null)
			{
				return AsError(innerException, eventSource);
			}
			return TraceException((Exception)targetInvocationException, eventSource);
		}

		public Exception AsError<TPreferredException>(AggregateException aggregateException)
		{
			return AsError<TPreferredException>(aggregateException, eventSourceName);
		}

		public Exception AsError<TPreferredException>(AggregateException aggregateException, string eventSource)
		{
			if (Fx.IsFatal(aggregateException))
			{
				return aggregateException;
			}
			ReadOnlyCollection<Exception> innerExceptions = aggregateException.Flatten().InnerExceptions;
			if (innerExceptions.Count == 0)
			{
				return TraceException(aggregateException, eventSource);
			}
			Exception ex = null;
			foreach (Exception item in innerExceptions)
			{
				Exception ex3 = ((item is TargetInvocationException ex2 && ex2.InnerException != null) ? ex2.InnerException : item);
				if (ex3 is TPreferredException && ex == null)
				{
					ex = ex3;
				}
				TraceException(ex3, eventSource);
			}
			if (ex == null)
			{
				ex = innerExceptions[0];
			}
			return ex;
		}

		public ArgumentException Argument(string paramName, string message)
		{
			return TraceException(new ArgumentException(message, paramName));
		}

		public ArgumentNullException ArgumentNull(string paramName)
		{
			return TraceException(new ArgumentNullException(paramName));
		}

		public ArgumentNullException ArgumentNull(string paramName, string message)
		{
			return TraceException(new ArgumentNullException(paramName, message));
		}

		public ArgumentException ArgumentNullOrEmpty(string paramName)
		{
			return Argument(paramName, InternalSR.ArgumentNullOrEmpty(paramName));
		}

		public ArgumentOutOfRangeException ArgumentOutOfRange(string paramName, object actualValue, string message)
		{
			return TraceException(new ArgumentOutOfRangeException(paramName, actualValue, message));
		}

		public ObjectDisposedException ObjectDisposed(string message)
		{
			return TraceException(new ObjectDisposedException(null, message));
		}

		public void TraceUnhandledException(Exception exception)
		{
			TraceCore.UnhandledException(diagnosticTrace, (exception != null) ? exception.ToString() : string.Empty, exception);
		}

		public void TraceHandledException(Exception exception, TraceEventType traceEventType)
		{
			switch (traceEventType)
			{
			case TraceEventType.Error:
				if (TraceCore.HandledExceptionErrorIsEnabled(diagnosticTrace))
				{
					TraceCore.HandledExceptionError(diagnosticTrace, (exception != null) ? exception.ToString() : string.Empty, exception);
				}
				break;
			case TraceEventType.Warning:
				if (TraceCore.HandledExceptionWarningIsEnabled(diagnosticTrace))
				{
					TraceCore.HandledExceptionWarning(diagnosticTrace, (exception != null) ? exception.ToString() : string.Empty, exception);
				}
				break;
			case TraceEventType.Verbose:
				if (TraceCore.HandledExceptionVerboseIsEnabled(diagnosticTrace))
				{
					TraceCore.HandledExceptionVerbose(diagnosticTrace, (exception != null) ? exception.ToString() : string.Empty, exception);
				}
				break;
			default:
				if (TraceCore.HandledExceptionIsEnabled(diagnosticTrace))
				{
					TraceCore.HandledException(diagnosticTrace, (exception != null) ? exception.ToString() : string.Empty, exception);
				}
				break;
			}
		}

		public void TraceEtwException(Exception exception, TraceEventType eventType)
		{
			switch (eventType)
			{
			case TraceEventType.Error:
			case TraceEventType.Warning:
				if (TraceCore.ThrowingEtwExceptionIsEnabled(diagnosticTrace))
				{
					TraceCore.ThrowingEtwException(diagnosticTrace, eventSourceName, (exception != null) ? exception.ToString() : string.Empty, exception);
				}
				break;
			case TraceEventType.Critical:
				if (TraceCore.EtwUnhandledExceptionIsEnabled(diagnosticTrace))
				{
					TraceCore.EtwUnhandledException(diagnosticTrace, (exception != null) ? exception.ToString() : string.Empty, exception);
				}
				break;
			default:
				if (TraceCore.ThrowingEtwExceptionVerboseIsEnabled(diagnosticTrace))
				{
					TraceCore.ThrowingEtwExceptionVerbose(diagnosticTrace, eventSourceName, (exception != null) ? exception.ToString() : string.Empty, exception);
				}
				break;
			}
		}

		private TException TraceException<TException>(TException exception) where TException : Exception
		{
			return TraceException(exception, eventSourceName);
		}

		[SecuritySafeCritical]
		private TException TraceException<TException>(TException exception, string eventSource) where TException : Exception
		{
			if (TraceCore.ThrowingExceptionIsEnabled(diagnosticTrace))
			{
				TraceCore.ThrowingException(diagnosticTrace, eventSource, (exception != null) ? exception.ToString() : string.Empty, exception);
			}
			BreakOnException(exception);
			return exception;
		}

		[SecuritySafeCritical]
		private void BreakOnException(Exception exception)
		{
		}

		[MethodImpl(MethodImplOptions.NoInlining)]
		internal void TraceFailFast(string message)
		{
			EventLogger eventLogger = null;
			eventLogger = new EventLogger(eventSourceName, diagnosticTrace);
			TraceFailFast(message, eventLogger);
		}

		[MethodImpl(MethodImplOptions.NoInlining)]
		internal void TraceFailFast(string message, EventLogger logger)
		{
			if (logger == null)
			{
				return;
			}
			try
			{
				string text = null;
				try
				{
					text = new StackTrace().ToString();
				}
				catch (Exception ex)
				{
					text = ex.Message;
					if (Fx.IsFatal(ex))
					{
						throw;
					}
				}
				finally
				{
					logger.LogEvent(TraceEventType.Critical, 6, 3221291110u, message, text);
				}
			}
			catch (Exception ex2)
			{
				logger.LogEvent(TraceEventType.Critical, 6, 3221291111u, ex2.ToString());
				if (Fx.IsFatal(ex2))
				{
					throw;
				}
			}
		}
	}
	internal delegate void FastAsyncCallback(object state, Exception asyncException);
	[Serializable]
	internal class FatalException : SystemException
	{
		public FatalException()
		{
		}

		public FatalException(string message)
			: base(message)
		{
		}

		public FatalException(string message, Exception innerException)
			: base(message, innerException)
		{
		}

		protected FatalException(SerializationInfo info, StreamingContext context)
			: base(info, context)
		{
		}
	}
	internal static class Fx
	{
		public abstract class ExceptionHandler
		{
			public abstract bool HandleException(Exception exception);
		}

		public static class Tag
		{
			public enum CacheAttrition
			{
				None,
				ElementOnTimer,
				ElementOnGC,
				ElementOnCallback,
				FullPurgeOnTimer,
				FullPurgeOnEachAccess,
				PartialPurgeOnTimer,
				PartialPurgeOnEachAccess
			}

			public enum ThrottleAction
			{
				Reject,
				Pause
			}

			public enum ThrottleMetric
			{
				Count,
				Rate,
				Other
			}

			public enum Location
			{
				InProcess,
				OutOfProcess,
				LocalSystem,
				LocalOrRemoteSystem,
				RemoteSystem
			}

			public enum SynchronizationKind
			{
				LockStatement,
				MonitorWait,
				MonitorExplicit,
				InterlockedNoSpin,
				InterlockedWithSpin,
				FromFieldType
			}

			[Flags]
			public enum BlocksUsing
			{
				MonitorEnter = 0,
				MonitorWait = 1,
				ManualResetEvent = 2,
				AutoResetEvent = 3,
				AsyncResult = 4,
				IAsyncResult = 5,
				PInvoke = 6,
				InputQueue = 7,
				ThreadNeutralSemaphore = 8,
				PrivatePrimitive = 9,
				OtherInternalPrimitive = 0xA,
				OtherFrameworkPrimitive = 0xB,
				OtherInterop = 0xC,
				Other = 0xD,
				NonBlocking = 0xE
			}

			public static class Strings
			{
				internal const string ExternallyManaged = "externally managed";

				internal const string AppDomain = "AppDomain";

				internal const string DeclaringInstance = "instance of declaring class";

				internal const string Unbounded = "unbounded";

				internal const string Infinite = "infinite";
			}

			[AttributeUsage(AttributeTargets.Class | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property, AllowMultiple = true, Inherited = false)]
			[Conditional("DEBUG")]
			public sealed class FriendAccessAllowedAttribute : Attribute
			{
				public string AssemblyName { get; set; }

				public FriendAccessAllowedAttribute(string assemblyName)
				{
					AssemblyName = assemblyName;
				}
			}

			public static class Throws
			{
				[AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Method, AllowMultiple = true, Inherited = false)]
				[Conditional("CODE_ANALYSIS_CDF")]
				public sealed class TimeoutAttribute : ThrowsAttribute
				{
					public TimeoutAttribute()
						: this("The operation timed out.")
					{
					}

					public TimeoutAttribute(string diagnosis)
						: base(typeof(TimeoutException), diagnosis)
					{
					}
				}
			}

			[AttributeUsage(AttributeTargets.Field)]
			[Conditional("CODE_ANALYSIS_CDF")]
			public sealed class CacheAttribute : Attribute
			{
				private readonly Type elementType;

				private readonly CacheAttrition cacheAttrition;

				public Type ElementType => elementType;

				public CacheAttrition CacheAttrition => cacheAttrition;

				public string Scope { get; set; }

				public string SizeLimit { get; set; }

				public string Timeout { get; set; }

				public CacheAttribute(Type elementType, CacheAttrition cacheAttrition)
				{
					Scope = "instance of declaring class";
					SizeLimit = "unbounded";
					Timeout = "infinite";
					if (elementType == null)
					{
						throw Exception.ArgumentNull("elementType");
					}
					this.elementType = elementType;
					this.cacheAttrition = cacheAttrition;
				}
			}

			[AttributeUsage(AttributeTargets.Field)]
			[Conditional("CODE_ANALYSIS_CDF")]
			public sealed class QueueAttribute : Attribute
			{
				private readonly Type elementType;

				public Type ElementType => elementType;

				public string Scope { get; set; }

				public string SizeLimit { get; set; }

				public bool StaleElementsRemovedImmediately { get; set; }

				public bool EnqueueThrowsIfFull { get; set; }

				public QueueAttribute(Type elementType)
				{
					Scope = "instance of declaring class";
					SizeLimit = "unbounded";
					if (elementType == null)
					{
						throw Exception.ArgumentNull("elementType");
					}
					this.elementType = elementType;
				}
			}

			[AttributeUsage(AttributeTargets.Field)]
			[Conditional("CODE_ANALYSIS_CDF")]
			public sealed class ThrottleAttribute : Attribute
			{
				private readonly ThrottleAction throttleAction;

				private readonly ThrottleMetric throttleMetric;

				private readonly string limit;

				public ThrottleAction ThrottleAction => throttleAction;

				public ThrottleMetric ThrottleMetric => throttleMetric;

				public string Limit => limit;

				public string Scope { get; set; }

				public ThrottleAttribute(ThrottleAction throttleAction, ThrottleMetric throttleMetric, string limit)
				{
					Scope = "AppDomain";
					if (string.IsNullOrEmpty(limit))
					{
						throw Exception.ArgumentNullOrEmpty("limit");
					}
					this.throttleAction = throttleAction;
					this.throttleMetric = throttleMetric;
					this.limit = limit;
				}
			}

			[AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Field, AllowMultiple = true, Inherited = false)]
			[Conditional("CODE_ANALYSIS_CDF")]
			public sealed class ExternalResourceAttribute : Attribute
			{
				private readonly Location location;

				private readonly string description;

				public Location Location => location;

				public string Description => description;

				public ExternalResourceAttribute(Location location, string description)
				{
					this.location = location;
					this.description = description;
				}
			}

			[AttributeUsage(AttributeTargets.Class | AttributeTargets.Field, Inherited = false)]
			[Conditional("CODE_ANALYSIS_CDF")]
			public sealed class SynchronizationObjectAttribute : Attribute
			{
				public bool Blocking { get; set; }

				public string Scope { get; set; }

				public SynchronizationKind Kind { get; set; }

				public SynchronizationObjectAttribute()
				{
					Blocking = true;
					Scope = "instance of declaring class";
					Kind = SynchronizationKind.FromFieldType;
				}
			}

			[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = true)]
			[Conditional("CODE_ANALYSIS_CDF")]
			public sealed class SynchronizationPrimitiveAttribute : Attribute
			{
				private readonly BlocksUsing blocksUsing;

				public BlocksUsing BlocksUsing => blocksUsing;

				public bool SupportsAsync { get; set; }

				public bool Spins { get; set; }

				public string ReleaseMethod { get; set; }

				public SynchronizationPrimitiveAttribute(BlocksUsing blocksUsing)
				{
					this.blocksUsing = blocksUsing;
				}
			}

			[AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Method, Inherited = false)]
			[Conditional("CODE_ANALYSIS_CDF")]
			public sealed class BlockingAttribute : Attribute
			{
				public string CancelMethod { get; set; }

				public Type CancelDeclaringType { get; set; }

				public string Conditional { get; set; }
			}

			[AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Method, Inherited = false)]
			[Conditional("CODE_ANALYSIS_CDF")]
			public sealed class GuaranteeNonBlockingAttribute : Attribute
			{
			}

			[AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Method, Inherited = false)]
			[Conditional("CODE_ANALYSIS_CDF")]
			public sealed class NonThrowingAttribute : Attribute
			{
			}

			[AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Method, AllowMultiple = true, Inherited = false)]
			[Conditional("CODE_ANALYSIS_CDF")]
			public class ThrowsAttribute : Attribute
			{
				private readonly Type exceptionType;

				private readonly string diagnosis;

				public Type ExceptionType => exceptionType;

				public string Diagnosis => diagnosis;

				public ThrowsAttribute(Type exceptionType, string diagnosis)
				{
					if (exceptionType == null)
					{
						throw Exception.ArgumentNull("exceptionType");
					}
					if (string.IsNullOrEmpty(diagnosis))
					{
						throw Exception.ArgumentNullOrEmpty("diagnosis");
					}
					this.exceptionType = exceptionType;
					this.diagnosis = diagnosis;
				}
			}

			[AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Method, Inherited = false)]
			[Conditional("CODE_ANALYSIS_CDF")]
			public sealed class InheritThrowsAttribute : Attribute
			{
				public Type FromDeclaringType { get; set; }

				public string From { get; set; }
			}

			[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
			[Conditional("CODE_ANALYSIS_CDF")]
			public sealed class KnownXamlExternalAttribute : Attribute
			{
			}

			[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = false)]
			[Conditional("CODE_ANALYSIS_CDF")]
			public sealed class XamlVisibleAttribute : Attribute
			{
				public bool Visible { get; private set; }

				public XamlVisibleAttribute()
					: this(visible: true)
				{
				}

				public XamlVisibleAttribute(bool visible)
				{
					Visible = visible;
				}
			}

			[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
			[Conditional("CODE_ANALYSIS_CDF")]
			public sealed class SecurityNoteAttribute : Attribute
			{
				public string Critical { get; set; }

				public string Safe { get; set; }

				public string Miscellaneous { get; set; }
			}
		}

		private abstract class Thunk<T> where T : class
		{
			[SecurityCritical]
			private T callback;

			internal T Callback
			{
				[SecuritySafeCritical]
				get
				{
					return callback;
				}
			}

			[SecuritySafeCritical]
			protected Thunk(T callback)
			{
				this.callback = callback;
			}
		}

		private sealed class ActionThunk<T1> : Thunk<Action<T1>>
		{
			public Action<T1> ThunkFrame => UnhandledExceptionFrame;

			public ActionThunk(Action<T1> callback)
				: base(callback)
			{
			}

			[SecuritySafeCritical]
			private void UnhandledExceptionFrame(T1 result)
			{
				RuntimeHelpers.PrepareConstrainedRegions();
				try
				{
					base.Callback(result);
				}
				catch (Exception exception)
				{
					if (!HandleAtThreadBase(exception))
					{
						throw;
					}
				}
			}
		}

		private sealed class AsyncThunk : Thunk<AsyncCallback>
		{
			public AsyncCallback ThunkFrame => UnhandledExceptionFrame;

			public AsyncThunk(AsyncCallback callback)
				: base(callback)
			{
			}

			[SecuritySafeCritical]
			private void UnhandledExceptionFrame(IAsyncResult result)
			{
				RuntimeHelpers.PrepareConstrainedRegions();
				try
				{
					base.Callback(result);
				}
				catch (Exception exception)
				{
					if (!HandleAtThreadBase(exception))
					{
						throw;
					}
				}
			}
		}

		private sealed class WaitThunk : Thunk<WaitCallback>
		{
			public WaitCallback ThunkFrame => UnhandledExceptionFrame;

			public WaitThunk(WaitCallback callback)
				: base(callback)
			{
			}

			[SecuritySafeCritical]
			private void UnhandledExceptionFrame(object state)
			{
				RuntimeHelpers.PrepareConstrainedRegions();
				try
				{
					base.Callback(state);
				}
				catch (Exception exception)
				{
					if (!HandleAtThreadBase(exception))
					{
						throw;
					}
				}
			}
		}

		private sealed class TimerThunk : Thunk<TimerCallback>
		{
			public TimerCallback ThunkFrame => UnhandledExceptionFrame;

			public TimerThunk(TimerCallback callback)
				: base(callback)
			{
			}

			[SecuritySafeCritical]
			private void UnhandledExceptionFrame(object state)
			{
				RuntimeHelpers.PrepareConstrainedRegions();
				try
				{
					base.Callback(state);
				}
				catch (Exception exception)
				{
					if (!HandleAtThreadBase(exception))
					{
						throw;
					}
				}
			}
		}

		private sealed class WaitOrTimerThunk : Thunk<WaitOrTimerCallback>
		{
			public WaitOrTimerCallback ThunkFrame => UnhandledExceptionFrame;

			public WaitOrTimerThunk(WaitOrTimerCallback callback)
				: base(callback)
			{
			}

			[SecuritySafeCritical]
			private void UnhandledExceptionFrame(object state, bool timedOut)
			{
				RuntimeHelpers.PrepareConstrainedRegions();
				try
				{
					base.Callback(state, timedOut);
				}
				catch (Exception exception)
				{
					if (!HandleAtThreadBase(exception))
					{
						throw;
					}
				}
			}
		}

		private sealed class SendOrPostThunk : Thunk<SendOrPostCallback>
		{
			public SendOrPostCallback ThunkFrame => UnhandledExceptionFrame;

			public SendOrPostThunk(SendOrPostCallback callback)
				: base(callback)
			{
			}

			[SecuritySafeCritical]
			private void UnhandledExceptionFrame(object state)
			{
				RuntimeHelpers.PrepareConstrainedRegions();
				try
				{
					base.Callback(state);
				}
				catch (Exception exception)
				{
					if (!HandleAtThreadBase(exception))
					{
						throw;
					}
				}
			}
		}

		[SecurityCritical]
		private sealed class IOCompletionThunk
		{
			private IOCompletionCallback callback;

			public unsafe IOCompletionCallback ThunkFrame => UnhandledExceptionFrame;

			public IOCompletionThunk(IOCompletionCallback callback)
			{
				this.callback = callback;
			}

			private unsafe void UnhandledExceptionFrame(uint error, uint bytesRead, NativeOverlapped* nativeOverlapped)
			{
				RuntimeHelpers.PrepareConstrainedRegions();
				try
				{
					callback(error, bytesRead, nativeOverlapped);
				}
				catch (Exception exception)
				{
					if (!HandleAtThreadBase(exception))
					{
						throw;
					}
				}
			}
		}

		[Serializable]
		private class InternalException : SystemException
		{
			public InternalException(string description)
				: base(InternalSR.ShipAssertExceptionMessage(description))
			{
			}

			protected InternalException(SerializationInfo info, StreamingContext context)
				: base(info, context)
			{
			}
		}

		[Serializable]
		private class FatalInternalException : InternalException
		{
			public FatalInternalException(string description)
				: base(description)
			{
			}

			protected FatalInternalException(SerializationInfo info, StreamingContext context)
				: base(info, context)
			{
			}
		}

		private const string defaultEventSource = "System.Runtime";

		private static ExceptionTrace exceptionTrace;

		private static EtwDiagnosticTrace diagnosticTrace;

		[SecurityCritical]
		private static ExceptionHandler asynchronousThreadExceptionHandler;

		public static ExceptionTrace Exception
		{
			get
			{
				if (exceptionTrace == null)
				{
					exceptionTrace = new ExceptionTrace("System.Runtime", Trace);
				}
				return exceptionTrace;
			}
		}

		public static EtwDiagnosticTrace Trace
		{
			get
			{
				if (diagnosticTrace == null)
				{
					diagnosticTrace = InitializeTracing();
				}
				return diagnosticTrace;
			}
		}

		public static ExceptionHandler AsynchronousThreadExceptionHandler
		{
			[SecuritySafeCritical]
			[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
			get
			{
				return asynchronousThreadExceptionHandler;
			}
			[SecurityCritical]
			set
			{
				asynchronousThreadExceptionHandler = value;
			}
		}

		internal static bool AssertsFailFast => false;

		internal static Type[] BreakOnExceptionTypes => null;

		internal static bool FastDebug => false;

		internal static bool StealthDebugger => false;

		[SecuritySafeCritical]
		private static EtwDiagnosticTrace InitializeTracing()
		{
			EtwDiagnosticTrace etwDiagnosticTrace = new EtwDiagnosticTrace("System.Runtime", EtwDiagnosticTrace.DefaultEtwProviderId);
			if (etwDiagnosticTrace.EtwProvider != null)
			{
				etwDiagnosticTrace.RefreshState = (Action)Delegate.Combine(etwDiagnosticTrace.RefreshState, (Action)delegate
				{
					UpdateLevel();
				});
			}
			UpdateLevel(etwDiagnosticTrace);
			return etwDiagnosticTrace;
		}

		[Conditional("DEBUG")]
		public static void Assert(bool condition, string description)
		{
		}

		[Conditional("DEBUG")]
		public static void Assert(string description)
		{
			AssertHelper.FireAssert(description);
		}

		public static void AssertAndThrow(bool condition, string description)
		{
			if (!condition)
			{
				AssertAndThrow(description);
			}
		}

		[MethodImpl(MethodImplOptions.NoInlining)]
		public static Exception AssertAndThrow(string description)
		{
			TraceCore.ShipAssertExceptionMessage(Trace, description);
			throw new InternalException(description);
		}

		public static void AssertAndThrowFatal(bool condition, string description)
		{
			if (!condition)
			{
				AssertAndThrowFatal(description);
			}
		}

		[MethodImpl(MethodImplOptions.NoInlining)]
		public static Exception AssertAndThrowFatal(string description)
		{
			TraceCore.ShipAssertExceptionMessage(Trace, description);
			throw new FatalInternalException(description);
		}

		public static void AssertAndFailFast(bool condition, string description)
		{
			if (!condition)
			{
				AssertAndFailFast(description);
			}
		}

		[MethodImpl(MethodImplOptions.NoInlining)]
		[SecuritySafeCritical]
		public static Exception AssertAndFailFast(string description)
		{
			string message = InternalSR.FailFastMessage(description);
			try
			{
				try
				{
					Exception.TraceFailFast(message);
				}
				finally
				{
					Environment.FailFast(message);
				}
			}
			catch
			{
				throw;
			}
			return null;
		}

		public static bool IsFatal(Exception exception)
		{
			while (exception != null)
			{
				if (exception is FatalException || (exception is OutOfMemoryException && !(exception is InsufficientMemoryException)) || exception is ThreadAbortException || exception is FatalInternalException)
				{
					return true;
				}
				if (exception is TypeInitializationException || exception is TargetInvocationException)
				{
					exception = exception.InnerException;
					continue;
				}
				if (!(exception is AggregateException))
				{
					break;
				}
				foreach (Exception innerException in ((AggregateException)exception).InnerExceptions)
				{
					if (IsFatal(innerException))
					{
						return true;
					}
				}
				break;
			}
			return false;
		}

		public static Action<T1> ThunkCallback<T1>(Action<T1> callback)
		{
			return new ActionThunk<T1>(callback).ThunkFrame;
		}

		public static AsyncCallback ThunkCallback(AsyncCallback callback)
		{
			return new AsyncThunk(callback).ThunkFrame;
		}

		public static WaitCallback ThunkCallback(WaitCallback callback)
		{
			return new WaitThunk(callback).ThunkFrame;
		}

		public static TimerCallback ThunkCallback(TimerCallback callback)
		{
			return new TimerThunk(callback).ThunkFrame;
		}

		public static WaitOrTimerCallback ThunkCallback(WaitOrTimerCallback callback)
		{
			return new WaitOrTimerThunk(callback).ThunkFrame;
		}

		public static SendOrPostCallback ThunkCallback(SendOrPostCallback callback)
		{
			return new SendOrPostThunk(callback).ThunkFrame;
		}

		[SecurityCritical]
		public static IOCompletionCallback ThunkCallback(IOCompletionCallback callback)
		{
			return new IOCompletionThunk(callback).ThunkFrame;
		}

		public static Guid CreateGuid(string guidString)
		{
			bool flag = false;
			Guid empty = Guid.Empty;
			try
			{
				empty = new Guid(guidString);
				flag = true;
				return empty;
			}
			finally
			{
				if (!flag)
				{
					AssertAndThrow("Creation of the Guid failed.");
				}
			}
		}

		public static bool TryCreateGuid(string guidString, out Guid result)
		{
			bool result2 = false;
			result = Guid.Empty;
			try
			{
				result = new Guid(guidString);
				result2 = true;
			}
			catch (ArgumentException)
			{
			}
			catch (FormatException)
			{
			}
			catch (OverflowException)
			{
			}
			return result2;
		}

		public static byte[] AllocateByteArray(int size)
		{
			try
			{
				return new byte[size];
			}
			catch (OutOfMemoryException innerException)
			{
				throw Exception.AsError(new InsufficientMemoryException(InternalSR.BufferAllocationFailed(size), innerException));
			}
		}

		public static char[] AllocateCharArray(int size)
		{
			try
			{
				return new char[size];
			}
			catch (OutOfMemoryException innerException)
			{
				throw Exception.AsError(new InsufficientMemoryException(InternalSR.BufferAllocationFailed(size * 2), innerException));
			}
		}

		[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
		private static void TraceExceptionNoThrow(Exception exception)
		{
			try
			{
				Exception.TraceUnhandledException(exception);
			}
			catch
			{
			}
		}

		[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
		private static bool HandleAtThreadBase(Exception exception)
		{
			if (exception == null)
			{
				return false;
			}
			TraceExceptionNoThrow(exception);
			try
			{
				return AsynchronousThreadExceptionHandler?.HandleException(exception) ?? false;
			}
			catch (Exception exception2)
			{
				TraceExceptionNoThrow(exception2);
			}
			return false;
		}

		private static void UpdateLevel(EtwDiagnosticTrace trace)
		{
			if (trace != null && (TraceCore.ActionItemCallbackInvokedIsEnabled(trace) || TraceCore.ActionItemScheduledIsEnabled(trace)))
			{
				trace.SetEnd2EndActivityTracingEnabled(isEnd2EndTracingEnabled: true);
			}
		}

		private static void UpdateLevel()
		{
			UpdateLevel(Trace);
		}
	}
	internal static class FxCop
	{
		public static class Category
		{
			public const string Design = "Microsoft.Design";

			public const string Globalization = "Microsoft.Globalization";

			public const string Maintainability = "Microsoft.Maintainability";

			public const string MSInternal = "Microsoft.MSInternal";

			public const string Naming = "Microsoft.Naming";

			public const string Performance = "Microsoft.Performance";

			public const string Reliability = "Microsoft.Reliability";

			public const string Security = "Microsoft.Security";

			public const string Usage = "Microsoft.Usage";

			public const string Configuration = "Configuration";

			public const string ReliabilityBasic = "Reliability";

			public const string Xaml = "XAML";
		}

		public static class Rule
		{
			public const string AptcaMethodsShouldOnlyCallAptcaMethods = "CA2116:AptcaMethodsShouldOnlyCallAptcaMethods";

			public const string AssembliesShouldHaveValidStrongNames = "CA2210:AssembliesShouldHaveValidStrongNames";

			public const string AvoidCallingProblematicMethods = "CA2001:AvoidCallingProblematicMethods";

			public const string AvoidExcessiveComplexity = "CA1502:AvoidExcessiveComplexity";

			public const string AvoidNamespacesWithFewTypes = "CA1020:AvoidNamespacesWithFewTypes";

			public const string AvoidOutParameters = "CA1021:AvoidOutParameters";

			public const string AvoidUncalledPrivateCode = "CA1811:AvoidUncalledPrivateCode";

			public const string AvoidUninstantiatedInternalClasses = "CA1812:AvoidUninstantiatedInternalClasses";

			public const string AvoidUnsealedAttributes = "CA1813:AvoidUnsealedAttributes";

			public const string CollectionPropertiesShouldBeReadOnly = "CA2227:CollectionPropertiesShouldBeReadOnly";

			public const string CollectionsShouldImplementGenericInterface = "CA1010:CollectionsShouldImplementGenericInterface";

			public const string ConfigurationPropertyAttributeRule = "Configuration102:ConfigurationPropertyAttributeRule";

			public const string ConfigurationValidatorAttributeRule = "Configuration104:ConfigurationValidatorAttributeRule";

			public const string ConsiderPassingBaseTypesAsParameters = "CA1011:ConsiderPassingBaseTypesAsParameters";

			public const string CommunicationObjectThrowIf = "Reliability106";

			public const string ConfigurationPropertyNameRule = "Configuration103:ConfigurationPropertyNameRule";

			public const string DefaultParametersShouldNotBeUsed = "CA1026:DefaultParametersShouldNotBeUsed";

			public const string DefineAccessorsForAttributeArguments = "CA1019:DefineAccessorsForAttributeArguments";

			public const string DiagnosticsUtilityIsFatal = "Reliability108";

			public const string DisposableFieldsShouldBeDisposed = "CA2213:DisposableFieldsShouldBeDisposed";

			public const string DoNotCallOverridableMethodsInConstructors = "CA2214:DoNotCallOverridableMethodsInConstructors";

			public const string DoNotCatchGeneralExceptionTypes = "CA1031:DoNotCatchGeneralExceptionTypes";

			public const string DoNotDeclareReadOnlyMutableReferenceTypes = "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes";

			public const string DoNotDeclareVisibleInstanceFields = "CA1051:DoNotDeclareVisibleInstanceFields";

			public const string DoNotLockOnObjectsWithWeakIdentity = "CA2002:DoNotLockOnObjectsWithWeakIdentity";

			public const string DoNotIgnoreMethodResults = "CA1806:DoNotIgnoreMethodResults";

			public const string DoNotIndirectlyExposeMethodsWithLinkDemands = "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands";

			public const string DoNotPassLiteralsAsLocalizedParameters = "CA1303:DoNotPassLiteralsAsLocalizedParameters";

			public const string DoNotRaiseReservedExceptionTypes = "CA2201:DoNotRaiseReservedExceptionTypes";

			public const string EnumsShouldHaveZeroValue = "CA1008:EnumsShouldHaveZeroValue";

			public const string FlagsEnumsShouldHavePluralNames = "CA1714:FlagsEnumsShouldHavePluralNames";

			public const string GenericMethodsShouldProvideTypeParameter = "CA1004:GenericMethodsShouldProvideTypeParameter";

			public const string IdentifiersShouldBeSpelledCorrectly = "CA1704:IdentifiersShouldBeSpelledCorrectly";

			public const string IdentifiersShouldHaveCorrectSuffix = "CA1710:IdentifiersShouldHaveCorrectSuffix";

			public const string IdentifiersShouldNotContainTypeNames = "CA1720:IdentifiersShouldNotContainTypeNames";

			public const string IdentifiersShouldNotHaveIncorrectSuffix = "CA1711:IdentifiersShouldNotHaveIncorrectSuffix";

			public const string IdentifiersShouldNotMatchKeywords = "CA1716:IdentifiersShouldNotMatchKeywords";

			public const string ImplementStandardExceptionConstructors = "CA1032:ImplementStandardExceptionConstructors";

			public const string InstantiateArgumentExceptionsCorrectly = "CA2208:InstantiateArgumentExceptionsCorrectly";

			public const string InitializeReferenceTypeStaticFieldsInline = "CA1810:InitializeReferenceTypeStaticFieldsInline";

			public const string InterfaceMethodsShouldBeCallableByChildTypes = "CA1033:InterfaceMethodsShouldBeCallableByChildTypes";

			public const string MarkISerializableTypesWithSerializable = "CA2237:MarkISerializableTypesWithSerializable";

			public const string InvariantAssertRule = "Reliability101:InvariantAssertRule";

			public const string IsFatalRule = "Reliability108:IsFatalRule";

			public const string MarkMembersAsStatic = "CA1822:MarkMembersAsStatic";

			public const string NestedTypesShouldNotBeVisible = "CA1034:NestedTypesShouldNotBeVisible";

			public const string NormalizeStringsToUppercase = "CA1308:NormalizeStringsToUppercase";

			public const string OperatorOverloadsHaveNamedAlternates = "CA2225:OperatorOverloadsHaveNamedAlternates";

			public const string PropertyNamesShouldNotMatchGetMethods = "CA1721:PropertyNamesShouldNotMatchGetMethods";

			public const string PropertyTypesMustBeXamlVisible = "XAML1002:PropertyTypesMustBeXamlVisible";

			public const string PropertyExternalTypesMustBeKnown = "XAML1010:PropertyExternalTypesMustBeKnown";

			public const string ReplaceRepetitiveArgumentsWithParamsArray = "CA1025:ReplaceRepetitiveArgumentsWithParamsArray";

			public const string ResourceStringsShouldBeSpelledCorrectly = "CA1703:ResourceStringsShouldBeSpelledCorrectly";

			public const string ReviewSuppressUnmanagedCodeSecurityUsage = "CA2118:ReviewSuppressUnmanagedCodeSecurityUsage";

			public const string ReviewUnusedParameters = "CA1801:ReviewUnusedParameters";

			public const string SecureAsserts = "CA2106:SecureAsserts";

			public const string SecureGetObjectDataOverrides = "CA2110:SecureGetObjectDataOverrides";

			public const string ShortAcronymsShouldBeUppercase = "CA1706:ShortAcronymsShouldBeUppercase";

			public const string SpecifyIFormatProvider = "CA1305:SpecifyIFormatProvider";

			public const string SpecifyMarshalingForPInvokeStringArguments = "CA2101:SpecifyMarshalingForPInvokeStringArguments";

			public const string StaticHolderTypesShouldNotHaveConstructors = "CA1053:StaticHolderTypesShouldNotHaveConstructors";

			public const string SystemAndMicrosoftNamespacesRequireApproval = "CA:SystemAndMicrosoftNamespacesRequireApproval";

			public const string UsePropertiesWhereAppropriate = "CA1024:UsePropertiesWhereAppropriate";

			public const string UriPropertiesShouldNotBeStrings = "CA1056:UriPropertiesShouldNotBeStrings";

			public const string VariableNamesShouldNotMatchFieldNames = "CA1500:VariableNamesShouldNotMatchFieldNames";

			public const string ThunkCallbackRule = "Reliability109:ThunkCallbackRule";

			public const string TransparentMethodsMustNotReferenceCriticalCode = "CA2140:TransparentMethodsMustNotReferenceCriticalCodeFxCopRule";

			public const string TypeConvertersMustBePublic = "XAML1004:TypeConvertersMustBePublic";

			public const string TypesMustHaveXamlCallableConstructors = "XAML1007:TypesMustHaveXamlCallableConstructors";

			public const string TypeNamesShouldNotMatchNamespaces = "CA1724:TypeNamesShouldNotMatchNamespaces";

			public const string TypesShouldHavePublicParameterlessConstructors = "XAML1009:TypesShouldHavePublicParameterlessConstructors";

			public const string UseEventsWhereAppropriate = "CA1030:UseEventsWhereAppropriate";

			public const string UseNewGuidHelperRule = "Reliability113:UseNewGuidHelperRule";

			public const string WrapExceptionsRule = "Reliability102:WrapExceptionsRule";
		}
	}
	internal static class HashHelper
	{
		public static byte[] ComputeHash(byte[] buffer)
		{
			int[] array = new int[16]
			{
				7, 12, 17, 22, 5, 9, 14, 20, 4, 11,
				16, 23, 6, 10, 15, 21
			};
			uint[] array2 = new uint[64]
			{
				3614090360u, 3905402710u, 606105819u, 3250441966u, 4118548399u, 1200080426u, 2821735955u, 4249261313u, 1770035416u, 2336552879u,
				4294925233u, 2304563134u, 1804603682u, 4254626195u, 2792965006u, 1236535329u, 4129170786u, 3225465664u, 643717713u, 3921069994u,
				3593408605u, 38016083u, 3634488961u, 3889429448u, 568446438u, 3275163606u, 4107603335u, 1163531501u, 2850285829u, 4243563512u,
				1735328473u, 2368359562u, 4294588738u, 2272392833u, 1839030562u, 4259657740u, 2763975236u, 1272893353u, 4139469664u, 3200236656u,
				681279174u, 3936430074u, 3572445317u, 76029189u, 3654602809u, 3873151461u, 530742520u, 3299628645u, 4096336452u, 1126891415u,
				2878612391u, 4237533241u, 1700485571u, 2399980690u, 4293915773u, 2240044497u, 1873313359u, 4264355552u, 2734768916u, 1309151649u,
				4149444226u, 3174756917u, 718787259u, 3951481745u
			};
			int num = (buffer.Length + 8) / 64 + 1;
			uint num2 = 1732584193u;
			uint num3 = 4023233417u;
			uint num4 = 2562383102u;
			uint num5 = 271733878u;
			for (int i = 0; i < num; i++)
			{
				byte[] array3 = buffer;
				int num6 = i * 64;
				if (num6 + 64 > buffer.Length)
				{
					array3 = new byte[64];
					for (int j = num6; j < buffer.Length; j++)
					{
						array3[j - num6] = buffer[j];
					}
					if (num6 <= buffer.Length)
					{
						array3[buffer.Length - num6] = 128;
					}
					if (i == num - 1)
					{
						array3[56] = (byte)(buffer.Length << 3);
						array3[57] = (byte)(buffer.Length >> 5);
						array3[58] = (byte)(buffer.Length >> 13);
						array3[59] = (byte)(buffer.Length >> 21);
					}
					num6 = 0;
				}
				uint num7 = num2;
				uint num8 = num3;
				uint num9 = num4;
				uint num10 = num5;
				for (int k = 0; k < 64; k++)
				{
					uint num11;
					int num12;
					if (k < 16)
					{
						num11 = (num8 & num9) | (~num8 & num10);
						num12 = k;
					}
					else if (k < 32)
					{
						num11 = (num8 & num10) | (num9 & ~num10);
						num12 = 5 * k + 1;
					}
					else if (k < 48)
					{
						num11 = num8 ^ num9 ^ num10;
						num12 = 3 * k + 5;
					}
					else
					{
						num11 = num9 ^ (num8 | ~num10);
						num12 = 7 * k;
					}
					num12 = (num12 & 0xF) * 4 + num6;
					uint num13 = num10;
					num10 = num9;
					num9 = num8;
					num8 = num7 + num11 + array2[k] + (uint)(array3[num12] + (array3[num12 + 1] << 8) + (array3[num12 + 2] << 16) + (array3[num12 + 3] << 24));
					num8 = (num8 << array[(k & 3) | ((k >> 2) & -4)]) | (num8 >> 32 - array[(k & 3) | ((k >> 2) & -4)]);
					num8 += num9;
					num7 = num13;
				}
				num2 += num7;
				num3 += num8;
				num4 += num9;
				num5 += num10;
			}
			return new byte[16]
			{
				(byte)num2,
				(byte)(num2 >> 8),
				(byte)(num2 >> 16),
				(byte)(num2 >> 24),
				(byte)num3,
				(byte)(num3 >> 8),
				(byte)(num3 >> 16),
				(byte)(num3 >> 24),
				(byte)num4,
				(byte)(num4 >> 8),
				(byte)(num4 >> 16),
				(byte)(num4 >> 24),
				(byte)num5,
				(byte)(num5 >> 8),
				(byte)(num5 >> 16),
				(byte)(num5 >> 24)
			};
		}
	}
	internal interface IAsyncEventArgs
	{
		object AsyncState { get; }

		Exception Exception { get; }
	}
	internal class IOThreadCancellationTokenSource : IDisposable
	{
		private static readonly Action<object> onCancel = Fx.ThunkCallback<object>(OnCancel);

		private readonly TimeSpan timeout;

		private CancellationTokenSource source;

		private CancellationToken? token;

		private IOThreadTimer timer;

		public CancellationToken Token
		{
			get
			{
				if (!token.HasValue)
				{
					if (timeout >= TimeoutHelper.MaxWait)
					{
						token = CancellationToken.None;
					}
					else
					{
						timer = new IOThreadTimer(onCancel, this, isTypicallyCanceledShortlyAfterBeingSet: true);
						source = new CancellationTokenSource();
						timer.Set(timeout);
						token = source.Token;
					}
				}
				return token.Value;
			}
		}

		public IOThreadCancellationTokenSource(TimeSpan timeout)
		{
			TimeoutHelper.ThrowIfNegativeArgument(timeout);
			this.timeout = timeout;
		}

		public IOThreadCancellationTokenSource(int timeout)
			: this(TimeSpan.FromMilliseconds(timeout))
		{
		}

		public void Dispose()
		{
			if (source != null && timer.Cancel())
			{
				source.Dispose();
				source = null;
			}
		}

		private static void OnCancel(object obj)
		{
			((IOThreadCancellationTokenSource)obj).Cancel();
		}

		private void Cancel()
		{
			source.Cancel();
			source.Dispose();
			source = null;
		}
	}
	internal class IOThreadScheduler
	{
		private static class Bits
		{
			public const int HiShift = 16;

			public const int HiOne = 65536;

			public const int LoHiBit = 32768;

			public const int HiHiBit = int.MinValue;

			public const int LoCountMask = 32767;

			public const int HiCountMask = 2147418112;

			public const int LoMask = 65535;

			public const int HiMask = -65536;

			public const int HiBits = -2147450880;

			public static int Count(int slot)
			{
				return (((slot >> 16) - slot + 2) & 0xFFFF) - 1;
			}

			public static int CountNoIdle(int slot)
			{
				return ((slot >> 16) - slot + 1) & 0xFFFF;
			}

			public static int IncrementLo(int slot)
			{
				return ((slot + 1) & 0xFFFF) | (slot & -65536);
			}

			public static bool IsComplete(int gate)
			{
				return (gate & -65536) == gate << 16;
			}
		}

		private struct Slot
		{
			private int gate;

			private Action<object> callback;

			private object state;

			public bool TryEnqueueWorkItem(Action<object> callback, object state, out bool wrapped)
			{
				int num = Interlocked.Increment(ref gate);
				wrapped = (num & 0x7FFF) != 1;
				if (wrapped)
				{
					if (((uint)num & 0x8000u) != 0 && Bits.IsComplete(num))
					{
						Interlocked.CompareExchange(ref gate, 0, num);
					}
					return false;
				}
				this.state = state;
				this.callback = callback;
				num = Interlocked.Add(ref gate, 32768);
				if ((num & 0x7FFF0000) == 0)
				{
					return true;
				}
				this.state = null;
				this.callback = null;
				if (num >> 16 != (num & 0x7FFF) || Interlocked.CompareExchange(ref gate, 0, num) != num)
				{
					num = Interlocked.Add(ref gate, int.MinValue);
					if (Bits.IsComplete(num))
					{
						Interlocked.CompareExchange(ref gate, 0, num);
					}
				}
				return false;
			}

			public void DequeueWorkItem(out Action<object> callback, out object state)
			{
				int num = Interlocked.Add(ref gate, 65536);
				if ((num & 0x8000) == 0)
				{
					callback = null;
					state = null;
				}
				else if ((num & 0x7FFF0000) == 65536)
				{
					callback = this.callback;
					state = this.state;
					this.state = null;
					this.callback = null;
					if ((num & 0x7FFF) != 1 || Interlocked.CompareExchange(ref gate, 0, num) != num)
					{
						num = Interlocked.Add(ref gate, int.MinValue);
						if (Bits.IsComplete(num))
						{
							Interlocked.CompareExchange(ref gate, 0, num);
						}
					}
				}
				else
				{
					callback = null;
					state = null;
					if (Bits.IsComplete(num))
					{
						Interlocked.CompareExchange(ref gate, 0, num);
					}
				}
			}
		}

		[SecurityCritical]
		private class ScheduledOverlapped
		{
			private unsafe readonly NativeOverlapped* nativeOverlapped;

			private IOThreadScheduler scheduler;

			public unsafe ScheduledOverlapped()
			{
				nativeOverlapped = new Overlapped().UnsafePack(Fx.ThunkCallback(IOCallback), null);
			}

			private unsafe void IOCallback(uint errorCode, uint numBytes, NativeOverlapped* nativeOverlapped)
			{
				IOThreadScheduler iOThreadScheduler = scheduler;
				scheduler = null;
				Action<object> callback;
				object state;
				try
				{
				}
				finally
				{
					iOThreadScheduler.CompletionCallback(out callback, out state);
				}
				bool flag = true;
				while (flag)
				{
					callback?.Invoke(state);
					try
					{
					}
					finally
					{
						flag = iOThreadScheduler.TryCoalesce(out callback, out state);
					}
				}
			}

			public unsafe void Post(IOThreadScheduler iots)
			{
				scheduler = iots;
				ThreadPool.UnsafeQueueNativeOverlapped(nativeOverlapped);
			}

			public unsafe void Cleanup()
			{
				if (scheduler != null)
				{
					throw Fx.AssertAndThrowFatal("Cleanup called on an overlapped that is in-flight.");
				}
				Overlapped.Free(nativeOverlapped);
			}
		}

		private const int MaximumCapacity = 32768;

		private static IOThreadScheduler current = new IOThreadScheduler(32, 32);

		private readonly ScheduledOverlapped overlapped;

		[SecurityCritical]
		private readonly Slot[] slots;

		[SecurityCritical]
		private readon

Room Architect Tool_Data/Managed/System.Transactions.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Diagnostics;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Security;
using System.Security.Permissions;
using System.Threading;
using System.Transactions.Configuration;
using Unity;

[assembly: BestFitMapping(false)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("System.Transactions.dll")]
[assembly: AssemblyDescription("System.Transactions.dll")]
[assembly: AssemblyDefaultAlias("System.Transactions.dll")]
[assembly: AssemblyCompany("Mono development team")]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright("(c) Various Mono authors")]
[assembly: SatelliteContractVersion("4.0.0.0")]
[assembly: AssemblyInformationalVersion("4.6.57.0")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: ComVisible(false)]
[assembly: AllowPartiallyTrustedCallers]
[assembly: CLSCompliant(true)]
[assembly: AssemblyDelaySign(true)]
[assembly: CompilationRelaxations(8)]
[assembly: AssemblyFileVersion("4.6.57.0")]
[assembly: AssemblyVersion("4.0.0.0")]
internal static class Consts
{
	public const string MonoVersion = "5.11.0.0";

	public const string MonoCompany = "Mono development team";

	public const string MonoProduct = "Mono Common Language Infrastructure";

	public const string MonoCopyright = "(c) Various Mono authors";

	public const int MonoCorlibVersion = 1051100001;

	public const string FxVersion = "4.0.0.0";

	public const string FxFileVersion = "4.6.57.0";

	public const string EnvironmentVersion = "4.0.30319.42000";

	public const string VsVersion = "0.0.0.0";

	public const string VsFileVersion = "11.0.0.0";

	private const string PublicKeyToken = "b77a5c561934e089";

	public const string AssemblyI18N = "I18N, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMicrosoft_JScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMono_Http = "Mono.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Posix = "Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Security = "Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Messaging_RabbitMQ = "Mono.Messaging.RabbitMQ, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyCorlib = "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Data = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Design = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing_Design = "System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Messaging = "System.Messaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Security = "System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Web = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Core = "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string WindowsBase_3_0 = "WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
internal sealed class Locale
{
	private Locale()
	{
	}

	public static string GetText(string msg)
	{
		return msg;
	}

	public static string GetText(string fmt, params object[] args)
	{
		return string.Format(fmt, args);
	}
}
namespace System
{
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoTODOAttribute : Attribute
	{
		private string comment;

		public string Comment => comment;

		public MonoTODOAttribute()
		{
		}

		public MonoTODOAttribute(string comment)
		{
			this.comment = comment;
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoDocumentationNoteAttribute : MonoTODOAttribute
	{
		public MonoDocumentationNoteAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoExtensionAttribute : MonoTODOAttribute
	{
		public MonoExtensionAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoInternalNoteAttribute : MonoTODOAttribute
	{
		public MonoInternalNoteAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoLimitationAttribute : MonoTODOAttribute
	{
		public MonoLimitationAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoNotSupportedAttribute : MonoTODOAttribute
	{
		public MonoNotSupportedAttribute(string comment)
			: base(comment)
		{
		}
	}
}
namespace System.Transactions
{
	[Serializable]
	public sealed class CommittableTransaction : Transaction, ISerializable, IDisposable, IAsyncResult
	{
		private TransactionOptions options;

		private AsyncCallback callback;

		private object user_defined_state;

		private IAsyncResult asyncResult;

		object IAsyncResult.AsyncState => user_defined_state;

		WaitHandle IAsyncResult.AsyncWaitHandle => asyncResult.AsyncWaitHandle;

		bool IAsyncResult.CompletedSynchronously => asyncResult.CompletedSynchronously;

		bool IAsyncResult.IsCompleted => asyncResult.IsCompleted;

		public CommittableTransaction()
			: this(default(TransactionOptions))
		{
		}

		public CommittableTransaction(TimeSpan timeout)
		{
			options = default(TransactionOptions);
			options.Timeout = timeout;
		}

		public CommittableTransaction(TransactionOptions options)
		{
			this.options = options;
		}

		public IAsyncResult BeginCommit(AsyncCallback asyncCallback, object asyncState)
		{
			callback = asyncCallback;
			user_defined_state = asyncState;
			AsyncCallback asyncCallback2 = null;
			if (asyncCallback != null)
			{
				asyncCallback2 = CommitCallback;
			}
			asyncResult = BeginCommitInternal(asyncCallback2);
			return this;
		}

		public void EndCommit(IAsyncResult asyncResult)
		{
			if (asyncResult != this)
			{
				throw new ArgumentException("The IAsyncResult parameter must be the same parameter as returned by BeginCommit.", "asyncResult");
			}
			EndCommitInternal(this.asyncResult);
		}

		private void CommitCallback(IAsyncResult ar)
		{
			if (asyncResult == null && ar.CompletedSynchronously)
			{
				asyncResult = ar;
			}
			callback(this);
		}

		public void Commit()
		{
			CommitInternal();
		}

		[MonoTODO("Not implemented")]
		void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
		{
			throw new NotImplementedException();
		}
	}
	public delegate Transaction HostCurrentTransactionCallback();
	public delegate void TransactionCompletedEventHandler(object sender, TransactionEventArgs e);
	public delegate void TransactionStartedEventHandler(object sender, TransactionEventArgs e);
	public enum DependentCloneOption
	{
		BlockCommitUntilComplete,
		RollbackIfNotComplete
	}
	[Serializable]
	[MonoTODO("Not supported yet")]
	public sealed class DependentTransaction : Transaction, ISerializable
	{
		private bool completed;

		internal bool Completed => completed;

		internal DependentTransaction(Transaction parent, DependentCloneOption option)
		{
		}

		[MonoTODO]
		public void Complete()
		{
			throw new NotImplementedException();
		}

		void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
		{
			completed = info.GetBoolean("completed");
		}

		internal DependentTransaction()
		{
			ThrowStub.ThrowNotSupportedException();
		}
	}
	public class Enlistment
	{
		internal bool done;

		internal Enlistment()
		{
			done = false;
		}

		public void Done()
		{
			done = true;
			InternalOnDone();
		}

		internal virtual void InternalOnDone()
		{
		}
	}
	[Flags]
	public enum EnlistmentOptions
	{
		None = 0,
		EnlistDuringPrepareRequired = 1
	}
	public enum EnterpriseServicesInteropOption
	{
		None,
		Automatic,
		Full
	}
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	public interface IDtcTransaction
	{
		void Abort(IntPtr reason, int retaining, int async);

		void Commit(int retaining, int commitType, int reserved);

		void GetTransactionInfo(IntPtr transactionInformation);
	}
	public interface IEnlistmentNotification
	{
		void Commit(Enlistment enlistment);

		void InDoubt(Enlistment enlistment);

		void Prepare(PreparingEnlistment preparingEnlistment);

		void Rollback(Enlistment enlistment);
	}
	public interface IPromotableSinglePhaseNotification : ITransactionPromoter
	{
		void Initialize();

		void Rollback(SinglePhaseEnlistment singlePhaseEnlistment);

		void SinglePhaseCommit(SinglePhaseEnlistment singlePhaseEnlistment);
	}
	public interface ISimpleTransactionSuperior : ITransactionPromoter
	{
		void Rollback();
	}
	public interface ISinglePhaseNotification : IEnlistmentNotification
	{
		void SinglePhaseCommit(SinglePhaseEnlistment singlePhaseEnlistment);
	}
	public interface ITransactionPromoter
	{
		byte[] Promote();
	}
	public enum IsolationLevel
	{
		Serializable,
		RepeatableRead,
		ReadCommitted,
		ReadUncommitted,
		Snapshot,
		Chaos,
		Unspecified
	}
	public class PreparingEnlistment : Enlistment
	{
		private bool prepared;

		private Transaction tx;

		private IEnlistmentNotification enlisted;

		private WaitHandle waitHandle;

		private Exception ex;

		internal bool IsPrepared => prepared;

		internal WaitHandle WaitHandle => waitHandle;

		internal IEnlistmentNotification EnlistmentNotification => enlisted;

		internal Exception Exception
		{
			get
			{
				return ex;
			}
			set
			{
				ex = value;
			}
		}

		internal PreparingEnlistment(Transaction tx, IEnlistmentNotification enlisted)
		{
			this.tx = tx;
			this.enlisted = enlisted;
			waitHandle = new ManualResetEvent(initialState: false);
		}

		public void ForceRollback()
		{
			ForceRollback(null);
		}

		internal override void InternalOnDone()
		{
			Prepared();
		}

		[MonoTODO]
		public void ForceRollback(Exception e)
		{
			tx.Rollback(e, enlisted);
			((ManualResetEvent)waitHandle).Set();
		}

		[MonoTODO]
		public void Prepared()
		{
			prepared = true;
			((ManualResetEvent)waitHandle).Set();
		}

		[MonoTODO]
		public byte[] RecoveryInformation()
		{
			throw new NotImplementedException();
		}

		internal PreparingEnlistment()
		{
			ThrowStub.ThrowNotSupportedException();
		}
	}
	public class SinglePhaseEnlistment : Enlistment
	{
		private Transaction tx;

		private object abortingEnlisted;

		internal SinglePhaseEnlistment()
		{
		}

		internal SinglePhaseEnlistment(Transaction tx, object abortingEnlisted)
		{
			this.tx = tx;
			this.abortingEnlisted = abortingEnlisted;
		}

		public void Aborted()
		{
			Aborted(null);
		}

		public void Aborted(Exception e)
		{
			if (tx != null)
			{
				tx.Rollback(e, abortingEnlisted);
			}
		}

		[MonoTODO]
		public void Committed()
		{
		}

		[MonoTODO("Not implemented")]
		public void InDoubt()
		{
			throw new NotImplementedException();
		}

		[MonoTODO("Not implemented")]
		public void InDoubt(Exception e)
		{
			throw new NotImplementedException();
		}
	}
	[Serializable]
	public sealed class SubordinateTransaction : Transaction
	{
		public SubordinateTransaction(IsolationLevel isoLevel, ISimpleTransactionSuperior superior)
		{
			throw new NotImplementedException();
		}
	}
	[Serializable]
	public class Transaction : IDisposable, ISerializable
	{
		private delegate void AsyncCommit();

		[ThreadStatic]
		private static Transaction ambient;

		private IsolationLevel level;

		private TransactionInformation info;

		private ArrayList dependents = new ArrayList();

		private List<IEnlistmentNotification> volatiles;

		private List<ISinglePhaseNotification> durables;

		private IPromotableSinglePhaseNotification pspe;

		private AsyncCommit asyncCommit;

		private bool committing;

		private bool committed;

		private bool aborted;

		private TransactionScope scope;

		private Exception innerException;

		private Guid tag = Guid.NewGuid();

		internal List<IEnlistmentNotification> Volatiles
		{
			get
			{
				if (volatiles == null)
				{
					volatiles = new List<IEnlistmentNotification>();
				}
				return volatiles;
			}
		}

		internal List<ISinglePhaseNotification> Durables
		{
			get
			{
				if (durables == null)
				{
					durables = new List<ISinglePhaseNotification>();
				}
				return durables;
			}
		}

		internal IPromotableSinglePhaseNotification Pspe => pspe;

		public static Transaction Current
		{
			get
			{
				EnsureIncompleteCurrentScope();
				return CurrentInternal;
			}
			set
			{
				EnsureIncompleteCurrentScope();
				CurrentInternal = value;
			}
		}

		internal static Transaction CurrentInternal
		{
			get
			{
				return ambient;
			}
			set
			{
				ambient = value;
			}
		}

		public IsolationLevel IsolationLevel
		{
			get
			{
				EnsureIncompleteCurrentScope();
				return level;
			}
		}

		public TransactionInformation TransactionInformation
		{
			get
			{
				EnsureIncompleteCurrentScope();
				return info;
			}
		}

		public Guid PromoterType
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		private bool Aborted
		{
			get
			{
				return aborted;
			}
			set
			{
				aborted = value;
				if (aborted)
				{
					info.Status = TransactionStatus.Aborted;
				}
			}
		}

		internal TransactionScope Scope
		{
			get
			{
				return scope;
			}
			set
			{
				scope = value;
			}
		}

		public event TransactionCompletedEventHandler TransactionCompleted;

		internal Transaction()
		{
			info = new TransactionInformation();
			level = IsolationLevel.Serializable;
		}

		internal Transaction(Transaction other)
		{
			level = other.level;
			info = other.info;
			dependents = other.dependents;
			volatiles = other.Volatiles;
			durables = other.Durables;
			pspe = other.Pspe;
		}

		[MonoTODO]
		void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
		{
			throw new NotImplementedException();
		}

		public Transaction Clone()
		{
			return new Transaction(this);
		}

		public void Dispose()
		{
			if (TransactionInformation.Status == TransactionStatus.Active)
			{
				Rollback();
			}
		}

		[MonoTODO]
		public DependentTransaction DependentClone(DependentCloneOption cloneOption)
		{
			DependentTransaction dependentTransaction = new DependentTransaction(this, cloneOption);
			dependents.Add(dependentTransaction);
			return dependentTransaction;
		}

		[MonoTODO("Only SinglePhase commit supported for durable resource managers.")]
		[PermissionSet(SecurityAction.LinkDemand)]
		public Enlistment EnlistDurable(Guid resourceManagerIdentifier, IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions)
		{
			throw new NotImplementedException("DTC unsupported, only SinglePhase commit supported for durable resource managers.");
		}

		[MonoTODO("Only Local Transaction Manager supported. Cannot have more than 1 durable resource per transaction. Only EnlistmentOptions.None supported yet.")]
		[PermissionSet(SecurityAction.LinkDemand)]
		public Enlistment EnlistDurable(Guid resourceManagerIdentifier, ISinglePhaseNotification singlePhaseNotification, EnlistmentOptions enlistmentOptions)
		{
			EnsureIncompleteCurrentScope();
			if (pspe != null || Durables.Count > 0)
			{
				throw new NotImplementedException("DTC unsupported, multiple durable resource managers aren't supported.");
			}
			if (enlistmentOptions != 0)
			{
				throw new NotImplementedException("EnlistmentOptions other than None aren't supported");
			}
			Durables.Add(singlePhaseNotification);
			return new Enlistment();
		}

		public bool EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification promotableSinglePhaseNotification)
		{
			EnsureIncompleteCurrentScope();
			if (pspe != null || Durables.Count > 0)
			{
				return false;
			}
			pspe = promotableSinglePhaseNotification;
			pspe.Initialize();
			return true;
		}

		public void SetDistributedTransactionIdentifier(IPromotableSinglePhaseNotification promotableNotification, Guid distributedTransactionIdentifier)
		{
			throw new NotImplementedException();
		}

		public bool EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification promotableSinglePhaseNotification, Guid promoterType)
		{
			throw new NotImplementedException();
		}

		public byte[] GetPromotedToken()
		{
			throw new NotImplementedException();
		}

		[MonoTODO("EnlistmentOptions being ignored")]
		public Enlistment EnlistVolatile(IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions)
		{
			return EnlistVolatileInternal(enlistmentNotification, enlistmentOptions);
		}

		[MonoTODO("EnlistmentOptions being ignored")]
		public Enlistment EnlistVolatile(ISinglePhaseNotification singlePhaseNotification, EnlistmentOptions enlistmentOptions)
		{
			return EnlistVolatileInternal(singlePhaseNotification, enlistmentOptions);
		}

		private Enlistment EnlistVolatileInternal(IEnlistmentNotification notification, EnlistmentOptions options)
		{
			EnsureIncompleteCurrentScope();
			Volatiles.Add(notification);
			return new Enlistment();
		}

		[MonoTODO("Only Local Transaction Manager supported. Cannot have more than 1 durable resource per transaction.")]
		[PermissionSet(SecurityAction.LinkDemand)]
		public Enlistment PromoteAndEnlistDurable(Guid manager, IPromotableSinglePhaseNotification promotableNotification, ISinglePhaseNotification notification, EnlistmentOptions options)
		{
			throw new NotImplementedException("DTC unsupported, multiple durable resource managers aren't supported.");
		}

		public override bool Equals(object obj)
		{
			return Equals(obj as Transaction);
		}

		private bool Equals(Transaction t)
		{
			if ((object)t == this)
			{
				return true;
			}
			if ((object)t == null)
			{
				return false;
			}
			if (level == t.level)
			{
				return info == t.info;
			}
			return false;
		}

		public static bool operator ==(Transaction x, Transaction y)
		{
			return x?.Equals(y) ?? ((object)y == null);
		}

		public static bool operator !=(Transaction x, Transaction y)
		{
			return !(x == y);
		}

		public override int GetHashCode()
		{
			return (int)level ^ info.GetHashCode() ^ dependents.GetHashCode();
		}

		public void Rollback()
		{
			Rollback(null);
		}

		public void Rollback(Exception e)
		{
			EnsureIncompleteCurrentScope();
			Rollback(e, null);
		}

		internal void Rollback(Exception ex, object abortingEnlisted)
		{
			if (aborted)
			{
				FireCompleted();
				return;
			}
			if (info.Status == TransactionStatus.Committed)
			{
				throw new TransactionException("Transaction has already been committed. Cannot accept any new work.");
			}
			innerException = ex;
			SinglePhaseEnlistment singlePhaseEnlistment = new SinglePhaseEnlistment();
			foreach (IEnlistmentNotification @volatile in Volatiles)
			{
				if (@volatile != abortingEnlisted)
				{
					@volatile.Rollback(singlePhaseEnlistment);
				}
			}
			List<ISinglePhaseNotification> list = Durables;
			if (list.Count > 0 && list[0] != abortingEnlisted)
			{
				list[0].Rollback(singlePhaseEnlistment);
			}
			if (pspe != null && pspe != abortingEnlisted)
			{
				pspe.Rollback(singlePhaseEnlistment);
			}
			Aborted = true;
			FireCompleted();
		}

		protected IAsyncResult BeginCommitInternal(AsyncCallback callback)
		{
			if (committed || committing)
			{
				throw new InvalidOperationException("Commit has already been called for this transaction.");
			}
			committing = true;
			asyncCommit = DoCommit;
			return asyncCommit.BeginInvoke(callback, null);
		}

		protected void EndCommitInternal(IAsyncResult ar)
		{
			asyncCommit.EndInvoke(ar);
		}

		internal void CommitInternal()
		{
			if (committed || committing)
			{
				throw new InvalidOperationException("Commit has already been called for this transaction.");
			}
			committing = true;
			try
			{
				DoCommit();
			}
			catch (TransactionException)
			{
				throw;
			}
			catch (Exception ex2)
			{
				throw new TransactionAbortedException("Transaction failed", ex2);
			}
		}

		private void DoCommit()
		{
			if (Scope != null)
			{
				Rollback(null, null);
				CheckAborted();
			}
			List<IEnlistmentNotification> list = Volatiles;
			List<ISinglePhaseNotification> list2 = Durables;
			if (list.Count == 1 && list2.Count == 0 && list[0] is ISinglePhaseNotification single)
			{
				DoSingleCommit(single);
				Complete();
				return;
			}
			if (list.Count > 0)
			{
				DoPreparePhase();
			}
			if (list2.Count > 0)
			{
				DoSingleCommit(list2[0]);
			}
			if (pspe != null)
			{
				DoSingleCommit(pspe);
			}
			if (list.Count > 0)
			{
				DoCommitPhase();
			}
			Complete();
		}

		private void Complete()
		{
			committing = false;
			committed = true;
			if (!aborted)
			{
				info.Status = TransactionStatus.Committed;
			}
			FireCompleted();
		}

		internal void InitScope(TransactionScope scope)
		{
			CheckAborted();
			if (committed)
			{
				throw new InvalidOperationException("Commit has already been called on this transaction.");
			}
			Scope = scope;
		}

		private static void PrepareCallbackWrapper(object state)
		{
			PreparingEnlistment preparingEnlistment = state as PreparingEnlistment;
			try
			{
				preparingEnlistment.EnlistmentNotification.Prepare(preparingEnlistment);
			}
			catch (Exception exception)
			{
				preparingEnlistment.Exception = exception;
				if (!preparingEnlistment.IsPrepared)
				{
					((ManualResetEvent)preparingEnlistment.WaitHandle).Set();
				}
			}
		}

		private void DoPreparePhase()
		{
			foreach (IEnlistmentNotification @volatile in Volatiles)
			{
				PreparingEnlistment preparingEnlistment = new PreparingEnlistment(this, @volatile);
				ThreadPool.QueueUserWorkItem(PrepareCallbackWrapper, preparingEnlistment);
				TimeSpan timeout = ((Scope != null) ? Scope.Timeout : TransactionManager.DefaultTimeout);
				if (!preparingEnlistment.WaitHandle.WaitOne(timeout, exitContext: true))
				{
					Aborted = true;
					throw new TimeoutException("Transaction timedout");
				}
				if (preparingEnlistment.Exception != null)
				{
					innerException = preparingEnlistment.Exception;
					Aborted = true;
					break;
				}
				if (!preparingEnlistment.IsPrepared)
				{
					Aborted = true;
					break;
				}
			}
			CheckAborted();
		}

		private void DoCommitPhase()
		{
			foreach (IEnlistmentNotification @volatile in Volatiles)
			{
				Enlistment enlistment = new Enlistment();
				@volatile.Commit(enlistment);
			}
		}

		private void DoSingleCommit(ISinglePhaseNotification single)
		{
			if (single != null)
			{
				single.SinglePhaseCommit(new SinglePhaseEnlistment(this, single));
				CheckAborted();
			}
		}

		private void DoSingleCommit(IPromotableSinglePhaseNotification single)
		{
			if (single != null)
			{
				single.SinglePhaseCommit(new SinglePhaseEnlistment(this, single));
				CheckAborted();
			}
		}

		private void CheckAborted()
		{
			if (aborted)
			{
				throw new TransactionAbortedException("Transaction has aborted", innerException);
			}
		}

		private void FireCompleted()
		{
			if (this.TransactionCompleted != null)
			{
				this.TransactionCompleted(this, new TransactionEventArgs(this));
			}
		}

		private static void EnsureIncompleteCurrentScope()
		{
			if (CurrentInternal == null || CurrentInternal.Scope == null || !CurrentInternal.Scope.IsComplete)
			{
				return;
			}
			throw new InvalidOperationException("The current TransactionScope is already complete");
		}
	}
	[Serializable]
	public class TransactionAbortedException : TransactionException
	{
		public TransactionAbortedException()
		{
		}

		public TransactionAbortedException(string message)
			: base(message)
		{
		}

		public TransactionAbortedException(string message, Exception innerException)
			: base(message, innerException)
		{
		}

		protected TransactionAbortedException(SerializationInfo info, StreamingContext context)
			: base(info, context)
		{
		}
	}
	public class TransactionEventArgs : EventArgs
	{
		private Transaction transaction;

		public Transaction Transaction => transaction;

		public TransactionEventArgs()
		{
		}

		internal TransactionEventArgs(Transaction transaction)
			: this()
		{
			this.transaction = transaction;
		}
	}
	[Serializable]
	public class TransactionException : SystemException
	{
		public TransactionException()
		{
		}

		public TransactionException(string message)
			: base(message)
		{
		}

		public TransactionException(string message, Exception innerException)
			: base(message, innerException)
		{
		}

		protected TransactionException(SerializationInfo info, StreamingContext context)
			: base(info, context)
		{
		}
	}
	[Serializable]
	public class TransactionInDoubtException : TransactionException
	{
		public TransactionInDoubtException()
		{
		}

		public TransactionInDoubtException(string message)
			: base(message)
		{
		}

		public TransactionInDoubtException(string message, Exception innerException)
			: base(message, innerException)
		{
		}

		protected TransactionInDoubtException(SerializationInfo info, StreamingContext context)
			: base(info, context)
		{
		}
	}
	public class TransactionInformation
	{
		private string local_id;

		private Guid dtcId = Guid.Empty;

		private DateTime creation_time;

		private TransactionStatus status;

		public DateTime CreationTime => creation_time;

		public Guid DistributedIdentifier
		{
			get
			{
				return dtcId;
			}
			internal set
			{
				dtcId = value;
			}
		}

		public string LocalIdentifier => local_id;

		public TransactionStatus Status
		{
			get
			{
				return status;
			}
			internal set
			{
				status = value;
			}
		}

		internal TransactionInformation()
		{
			status = TransactionStatus.Active;
			creation_time = DateTime.Now.ToUniversalTime();
			local_id = Guid.NewGuid().ToString() + ":1";
		}

		private TransactionInformation(TransactionInformation other)
		{
			local_id = other.local_id;
			dtcId = other.dtcId;
			creation_time = other.creation_time;
			status = other.status;
		}

		internal TransactionInformation Clone(TransactionInformation other)
		{
			return new TransactionInformation(other);
		}
	}
	[MonoTODO]
	public static class TransactionInterop
	{
		public static readonly Guid PromoterTypeDtc = new Guid("14229753-FFE1-428D-82B7-DF73045CB8DA");

		[MonoTODO]
		public static IDtcTransaction GetDtcTransaction(Transaction transaction)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static byte[] GetExportCookie(Transaction transaction, byte[] whereabouts)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static Transaction GetTransactionFromDtcTransaction(IDtcTransaction transactionNative)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static Transaction GetTransactionFromExportCookie(byte[] cookie)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static Transaction GetTransactionFromTransmitterPropagationToken(byte[] propagationToken)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static byte[] GetTransmitterPropagationToken(Transaction transaction)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public static byte[] GetWhereabouts()
		{
			throw new NotImplementedException();
		}
	}
	public static class TransactionManager
	{
		private static DefaultSettingsSection defaultSettings;

		private static MachineSettingsSection machineSettings;

		private static TimeSpan defaultTimeout;

		private static TimeSpan maxTimeout;

		public static TimeSpan DefaultTimeout
		{
			get
			{
				if (defaultSettings != null)
				{
					return defaultSettings.Timeout;
				}
				return defaultTimeout;
			}
		}

		[MonoTODO("Not implemented")]
		public static HostCurrentTransactionCallback HostCurrentCallback
		{
			get
			{
				throw new NotImplementedException();
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		public static TimeSpan MaximumTimeout
		{
			get
			{
				if (machineSettings != null)
				{
					return machineSettings.MaxTimeout;
				}
				return maxTimeout;
			}
		}

		public static event TransactionStartedEventHandler DistributedTransactionStarted;

		static TransactionManager()
		{
			defaultTimeout = new TimeSpan(0, 1, 0);
			maxTimeout = new TimeSpan(0, 10, 0);
			defaultSettings = ConfigurationManager.GetSection("system.transactions/defaultSettings") as DefaultSettingsSection;
			machineSettings = ConfigurationManager.GetSection("system.transactions/machineSettings") as MachineSettingsSection;
		}

		[MonoTODO("Not implemented")]
		public static void RecoveryComplete(Guid resourceManagerIdentifier)
		{
			throw new NotImplementedException();
		}

		[MonoTODO("Not implemented")]
		public static Enlistment Reenlist(Guid resourceManagerIdentifier, byte[] recoveryInformation, IEnlistmentNotification enlistmentNotification)
		{
			throw new NotImplementedException();
		}
	}
	[Serializable]
	public class TransactionManagerCommunicationException : TransactionException
	{
		public TransactionManagerCommunicationException()
		{
		}

		public TransactionManagerCommunicationException(string message)
			: base(message)
		{
		}

		public TransactionManagerCommunicationException(string message, Exception innerException)
			: base(message, innerException)
		{
		}

		protected TransactionManagerCommunicationException(SerializationInfo info, StreamingContext context)
			: base(info, context)
		{
		}
	}
	public struct TransactionOptions
	{
		private IsolationLevel level;

		private TimeSpan timeout;

		public IsolationLevel IsolationLevel
		{
			get
			{
				return level;
			}
			set
			{
				level = value;
			}
		}

		public TimeSpan Timeout
		{
			get
			{
				return timeout;
			}
			set
			{
				timeout = value;
			}
		}

		internal TransactionOptions(IsolationLevel level, TimeSpan timeout)
		{
			this.level = level;
			this.timeout = timeout;
		}

		public static bool operator ==(TransactionOptions x, TransactionOptions y)
		{
			if (x.level == y.level)
			{
				return x.timeout == y.timeout;
			}
			return false;
		}

		public static bool operator !=(TransactionOptions x, TransactionOptions y)
		{
			if (x.level == y.level)
			{
				return x.timeout != y.timeout;
			}
			return true;
		}

		public override bool Equals(object obj)
		{
			if (!(obj is TransactionOptions))
			{
				return false;
			}
			return this == (TransactionOptions)obj;
		}

		public override int GetHashCode()
		{
			return (int)level ^ timeout.GetHashCode();
		}
	}
	[Serializable]
	public class TransactionPromotionException : TransactionException
	{
		public TransactionPromotionException()
		{
		}

		public TransactionPromotionException(string message)
			: base(message)
		{
		}

		public TransactionPromotionException(string message, Exception innerException)
			: base(message, innerException)
		{
		}

		protected TransactionPromotionException(SerializationInfo info, StreamingContext context)
			: base(info, context)
		{
		}
	}
	public sealed class TransactionScope : IDisposable
	{
		private static TransactionOptions defaultOptions = new TransactionOptions(IsolationLevel.Serializable, TransactionManager.DefaultTimeout);

		private Transaction transaction;

		private Transaction oldTransaction;

		private TransactionScope parentScope;

		private TimeSpan timeout;

		private int nested;

		private bool disposed;

		private bool completed;

		private bool isRoot;

		private bool asyncFlowEnabled;

		internal bool IsComplete => completed;

		internal TimeSpan Timeout => timeout;

		public TransactionScope()
			: this(TransactionScopeOption.Required, TransactionManager.DefaultTimeout)
		{
		}

		public TransactionScope(TransactionScopeAsyncFlowOption asyncFlowOption)
			: this(TransactionScopeOption.Required, TransactionManager.DefaultTimeout, asyncFlowOption)
		{
		}

		public TransactionScope(Transaction transactionToUse)
			: this(transactionToUse, TransactionManager.DefaultTimeout)
		{
		}

		public TransactionScope(Transaction transactionToUse, TimeSpan scopeTimeout)
			: this(transactionToUse, scopeTimeout, EnterpriseServicesInteropOption.None)
		{
		}

		[MonoTODO("EnterpriseServicesInteropOption not supported.")]
		public TransactionScope(Transaction transactionToUse, TimeSpan scopeTimeout, EnterpriseServicesInteropOption interopOption)
		{
			Initialize(TransactionScopeOption.Required, transactionToUse, defaultOptions, interopOption, scopeTimeout, TransactionScopeAsyncFlowOption.Suppress);
		}

		public TransactionScope(TransactionScopeOption scopeOption)
			: this(scopeOption, TransactionManager.DefaultTimeout)
		{
		}

		public TransactionScope(TransactionScopeOption scopeOption, TimeSpan scopeTimeout)
			: this(scopeOption, scopeTimeout, TransactionScopeAsyncFlowOption.Suppress)
		{
		}

		public TransactionScope(TransactionScopeOption option, TransactionScopeAsyncFlowOption asyncFlow)
			: this(option, TransactionManager.DefaultTimeout, asyncFlow)
		{
		}

		public TransactionScope(TransactionScopeOption scopeOption, TimeSpan scopeTimeout, TransactionScopeAsyncFlowOption asyncFlow)
		{
			Initialize(scopeOption, null, defaultOptions, EnterpriseServicesInteropOption.None, scopeTimeout, asyncFlow);
		}

		public TransactionScope(TransactionScopeOption scopeOption, TransactionOptions transactionOptions)
			: this(scopeOption, transactionOptions, EnterpriseServicesInteropOption.None)
		{
		}

		[MonoTODO("EnterpriseServicesInteropOption not supported")]
		public TransactionScope(TransactionScopeOption scopeOption, TransactionOptions transactionOptions, EnterpriseServicesInteropOption interopOption)
		{
			Initialize(scopeOption, null, transactionOptions, interopOption, TransactionManager.DefaultTimeout, TransactionScopeAsyncFlowOption.Suppress);
		}

		public TransactionScope(Transaction transactionToUse, TransactionScopeAsyncFlowOption asyncFlowOption)
		{
			throw new NotImplementedException();
		}

		public TransactionScope(Transaction transactionToUse, TimeSpan scopeTimeout, TransactionScopeAsyncFlowOption asyncFlowOption)
		{
			throw new NotImplementedException();
		}

		public TransactionScope(TransactionScopeOption scopeOption, TransactionOptions transactionOptions, TransactionScopeAsyncFlowOption asyncFlowOption)
		{
			throw new NotImplementedException();
		}

		private void Initialize(TransactionScopeOption scopeOption, Transaction tx, TransactionOptions options, EnterpriseServicesInteropOption interop, TimeSpan scopeTimeout, TransactionScopeAsyncFlowOption asyncFlow)
		{
			completed = false;
			isRoot = false;
			nested = 0;
			asyncFlowEnabled = asyncFlow == TransactionScopeAsyncFlowOption.Enabled;
			if (scopeTimeout < TimeSpan.Zero)
			{
				throw new ArgumentOutOfRangeException("scopeTimeout");
			}
			timeout = scopeTimeout;
			oldTransaction = Transaction.CurrentInternal;
			Transaction.CurrentInternal = (transaction = InitTransaction(tx, scopeOption));
			if (transaction != null)
			{
				transaction.InitScope(this);
			}
			if (parentScope != null)
			{
				parentScope.nested++;
			}
		}

		private Transaction InitTransaction(Transaction tx, TransactionScopeOption scopeOption)
		{
			if (tx != null)
			{
				return tx;
			}
			switch (scopeOption)
			{
			case TransactionScopeOption.Suppress:
				if (Transaction.CurrentInternal != null)
				{
					parentScope = Transaction.CurrentInternal.Scope;
				}
				return null;
			case TransactionScopeOption.Required:
				if (Transaction.CurrentInternal == null)
				{
					isRoot = true;
					return new Transaction();
				}
				parentScope = Transaction.CurrentInternal.Scope;
				return Transaction.CurrentInternal;
			default:
				if (Transaction.CurrentInternal != null)
				{
					parentScope = Transaction.CurrentInternal.Scope;
				}
				isRoot = true;
				return new Transaction();
			}
		}

		public void Complete()
		{
			if (completed)
			{
				throw new InvalidOperationException("The current TransactionScope is already complete. You should dispose the TransactionScope.");
			}
			completed = true;
		}

		public void Dispose()
		{
			if (disposed)
			{
				return;
			}
			disposed = true;
			if (parentScope != null)
			{
				parentScope.nested--;
			}
			if (nested > 0)
			{
				transaction.Rollback();
				throw new InvalidOperationException("TransactionScope nested incorrectly");
			}
			if (Transaction.CurrentInternal != transaction && !asyncFlowEnabled)
			{
				if (transaction != null)
				{
					transaction.Rollback();
				}
				if (Transaction.CurrentInternal != null)
				{
					Transaction.CurrentInternal.Rollback();
				}
				throw new InvalidOperationException("Transaction.Current has changed inside of the TransactionScope");
			}
			if (asyncFlowEnabled)
			{
				if (oldTransaction != null)
				{
					oldTransaction.Scope = parentScope;
				}
				Transaction currentInternal = Transaction.CurrentInternal;
				if (!(transaction == null) || !(currentInternal == null))
				{
					currentInternal.Scope = parentScope;
					Transaction.CurrentInternal = oldTransaction;
					transaction.Scope = null;
					if (!IsComplete)
					{
						transaction.Rollback();
						currentInternal.Rollback();
					}
					else if (isRoot)
					{
						currentInternal.CommitInternal();
						transaction.CommitInternal();
					}
				}
				return;
			}
			if (Transaction.CurrentInternal == oldTransaction && oldTransaction != null)
			{
				oldTransaction.Scope = parentScope;
			}
			Transaction.CurrentInternal = oldTransaction;
			if (!(transaction == null))
			{
				transaction.Scope = null;
				if (!IsComplete)
				{
					transaction.Rollback();
				}
				else if (isRoot)
				{
					transaction.CommitInternal();
				}
			}
		}
	}
	public enum TransactionScopeAsyncFlowOption
	{
		Suppress,
		Enabled
	}
	public enum TransactionScopeOption
	{
		Required,
		RequiresNew,
		Suppress
	}
	public enum TransactionStatus
	{
		Active,
		Committed,
		Aborted,
		InDoubt
	}
}
namespace System.Transactions.Configuration
{
	public class DefaultSettingsSection : ConfigurationSection
	{
		[TimeSpanValidator(MinValueString = "00:00:00", MaxValueString = "10675199.02:48:05.4775807")]
		[ConfigurationProperty("timeout", DefaultValue = "00:01:00")]
		public TimeSpan Timeout
		{
			get
			{
				return (TimeSpan)((ConfigurationElement)this)["timeout"];
			}
			set
			{
				((ConfigurationElement)this)["timeout"] = value;
			}
		}

		[ConfigurationProperty("distributedTransactionManagerName", DefaultValue = "")]
		public string DistributedTransactionManagerName
		{
			get
			{
				return ((ConfigurationElement)this)["distributedTransactionManagerName"] as string;
			}
			set
			{
				((ConfigurationElement)this)["distributedTransactionManagerName"] = value;
			}
		}
	}
	public class MachineSettingsSection : ConfigurationSection
	{
		[TimeSpanValidator(MinValueString = "00:00:00", MaxValueString = "10675199.02:48:05.4775807")]
		[ConfigurationProperty("maxTimeout", DefaultValue = "00:10:00")]
		public TimeSpan MaxTimeout
		{
			get
			{
				return (TimeSpan)((ConfigurationElement)this)["maxTimeout"];
			}
			set
			{
				((ConfigurationElement)this)["maxTimeout"] = value;
			}
		}
	}
	public class TransactionsSectionGroup : ConfigurationSectionGroup
	{
		[ConfigurationProperty("defaultSettings")]
		public DefaultSettingsSection DefaultSettings => (DefaultSettingsSection)(object)((ConfigurationSectionGroup)this).Sections["defaultSettings"];

		[ConfigurationProperty("machineSettings")]
		public MachineSettingsSection MachineSettings => (MachineSettingsSection)(object)((ConfigurationSectionGroup)this).Sections["machineSettings"];

		public static TransactionsSectionGroup GetSectionGroup(Configuration config)
		{
			if (config == null)
			{
				throw new ArgumentNullException("config");
			}
			return config.GetSectionGroup("system.transactions") as TransactionsSectionGroup;
		}
	}
}
namespace System.Transactions
{
	[Serializable]
	public sealed class DistributedTransactionPermission : CodeAccessPermission, IUnrestrictedPermission
	{
		public DistributedTransactionPermission(PermissionState state)
		{
			ThrowStub.ThrowNotSupportedException();
		}

		public override IPermission Copy()
		{
			ThrowStub.ThrowNotSupportedException();
			return null;
		}

		public override void FromXml(SecurityElement securityElement)
		{
			ThrowStub.ThrowNotSupportedException();
		}

		public override IPermission Intersect(IPermission target)
		{
			ThrowStub.ThrowNotSupportedException();
			return null;
		}

		public override bool IsSubsetOf(IPermission target)
		{
			ThrowStub.ThrowNotSupportedException();
			return default(bool);
		}

		public bool IsUnrestricted()
		{
			ThrowStub.ThrowNotSupportedException();
			return default(bool);
		}

		public override SecurityElement ToXml()
		{
			ThrowStub.ThrowNotSupportedException();
			return null;
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	public sealed class DistributedTransactionPermissionAttribute : CodeAccessSecurityAttribute
	{
		public DistributedTransactionPermissionAttribute(SecurityAction action)
		{
		}

		public override IPermission CreatePermission()
		{
			ThrowStub.ThrowNotSupportedException();
			return null;
		}
	}
}
namespace Unity
{
	internal sealed class ThrowStub : ObjectDisposedException
	{
		public static void ThrowNotSupportedException()
		{
			throw new PlatformNotSupportedException();
		}
	}
}

Room Architect Tool_Data/Managed/System.Web.ApplicationServices.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Configuration.Provider;
using System.Diagnostics;
using System.Globalization;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Security;
using System.Security.Permissions;
using System.Web.Configuration;
using Unity;

[assembly: SecurityRules(SecurityRuleSet.Level2, SkipVerificationInFullTrust = true)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("System.Web.ApplicationServices.dll")]
[assembly: AssemblyDescription("System.Web.ApplicationServices.dll")]
[assembly: AssemblyDefaultAlias("System.Web.ApplicationServices.dll")]
[assembly: AssemblyCompany("Mono development team")]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: CompilationRelaxations(8)]
[assembly: AssemblyCopyright("(c) Various Mono authors")]
[assembly: AssemblyInformationalVersion("4.6.57.0")]
[assembly: AssemblyFileVersion("4.6.57.0")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: CLSCompliant(true)]
[assembly: AssemblyDelaySign(true)]
[assembly: ComVisible(false)]
[assembly: InternalsVisibleTo("System.Web, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
[assembly: SatelliteContractVersion("4.0.0.0")]
[assembly: AllowPartiallyTrustedCallers]
[assembly: AssemblyVersion("4.0.0.0")]
internal static class Consts
{
	public const string MonoVersion = "5.11.0.0";

	public const string MonoCompany = "Mono development team";

	public const string MonoProduct = "Mono Common Language Infrastructure";

	public const string MonoCopyright = "(c) Various Mono authors";

	public const int MonoCorlibVersion = 1051100001;

	public const string FxVersion = "4.0.0.0";

	public const string FxFileVersion = "4.6.57.0";

	public const string EnvironmentVersion = "4.0.30319.42000";

	public const string VsVersion = "0.0.0.0";

	public const string VsFileVersion = "11.0.0.0";

	private const string PublicKeyToken = "b77a5c561934e089";

	public const string AssemblyI18N = "I18N, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMicrosoft_JScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMono_Http = "Mono.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Posix = "Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Security = "Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Messaging_RabbitMQ = "Mono.Messaging.RabbitMQ, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyCorlib = "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Data = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Design = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing_Design = "System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Messaging = "System.Messaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Security = "System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Web = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Core = "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string WindowsBase_3_0 = "WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
internal static class ApplicationServicesStrings
{
	internal const string Can_not_use_encrypted_passwords_with_autogen_keys = "You must specify a non-autogenerated machine key to store passwords in the encrypted format. Either specify a different passwordFormat, or change the machineKey configuration to use a non-autogenerated decryption key.";

	internal const string CustomLoader_ForbiddenByHost = "The host forbids the use of custom loaders.";

	internal const string CustomLoader_MustImplementICustomLoader = "The provided type '{0}' must implement the ICustomLoader interface.";

	internal const string CustomLoader_NoAttributeFound = "The assembly '{0}' did not contain an assembly-level CustomLoaderAttribute.";

	internal const string CustomLoader_NotInFullTrust = "Custom loaders can only be used by fully-trusted applications (<trust level=\"Full\" />).";

	internal const string Membership_DuplicateEmail = "The E-mail address is already in use.";

	internal const string Membership_DuplicateProviderUserKey = "The provider user key is already in use.";

	internal const string Membership_DuplicateUserName = "The username is already in use.";

	internal const string Membership_InvalidAnswer = "The password-answer supplied is invalid.";

	internal const string Membership_InvalidEmail = "The E-mail supplied is invalid.";

	internal const string Membership_InvalidPassword = "The password supplied is invalid.  Passwords must conform to the password strength requirements configured for the default provider.";

	internal const string Membership_InvalidProviderUserKey = "The provider user key supplied is invalid. It must be of type System.Guid.";

	internal const string Membership_InvalidQuestion = "The password-question supplied is invalid.  Note that the current provider configuration requires a valid password question and answer.  As a result, a CreateUser overload that accepts question and answer parameters must also be used.";

	internal const string Membership_InvalidUserName = "The username supplied is invalid.";

	internal const string Membership_no_error = "No Error.";

	internal const string Membership_provider_name_invalid = "The membership provider name specified is invalid.";

	internal const string Membership_UserRejected = "The user was rejected.";

	internal const string Parameter_can_not_be_empty = "The parameter '{0}' must not be empty.";

	internal const string Platform_not_supported = "This member is not supported on the .NET Framework Client Profile.";

	internal const string Provider_Error = "The Provider encountered an unknown error.";

	internal const string Provider_must_implement_type = "Provider must implement the class '{0}'.";
}
namespace System
{
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoTODOAttribute : Attribute
	{
		private string comment;

		public string Comment => comment;

		public MonoTODOAttribute()
		{
		}

		public MonoTODOAttribute(string comment)
		{
			this.comment = comment;
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoDocumentationNoteAttribute : MonoTODOAttribute
	{
		public MonoDocumentationNoteAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoExtensionAttribute : MonoTODOAttribute
	{
		public MonoExtensionAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoInternalNoteAttribute : MonoTODOAttribute
	{
		public MonoInternalNoteAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoLimitationAttribute : MonoTODOAttribute
	{
		public MonoLimitationAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoNotSupportedAttribute : MonoTODOAttribute
	{
		public MonoNotSupportedAttribute(string comment)
			: base(comment)
		{
		}
	}
}
namespace System.Web.UI
{
	internal class KeyedList : IOrderedDictionary, IDictionary, ICollection, IEnumerable
	{
		private Hashtable objectTable = new Hashtable();

		private ArrayList objectList = new ArrayList();

		public int Count => objectList.Count;

		public bool IsFixedSize => false;

		public bool IsReadOnly => false;

		public bool IsSynchronized => false;

		public object this[int idx]
		{
			get
			{
				return ((DictionaryEntry)objectList[idx]).Value;
			}
			set
			{
				if (idx < 0 || idx >= Count)
				{
					throw new ArgumentOutOfRangeException("index");
				}
				object key = ((DictionaryEntry)objectList[idx]).Key;
				objectList[idx] = new DictionaryEntry(key, value);
				objectTable[key] = value;
			}
		}

		public object this[object key]
		{
			get
			{
				return objectTable[key];
			}
			set
			{
				if (objectTable.Contains(key))
				{
					objectTable[key] = value;
					objectTable[IndexOf(key)] = new DictionaryEntry(key, value);
				}
				else
				{
					Add(key, value);
				}
			}
		}

		public ICollection Keys
		{
			get
			{
				ArrayList arrayList = new ArrayList();
				for (int i = 0; i < objectList.Count; i++)
				{
					arrayList.Add(((DictionaryEntry)objectList[i]).Key);
				}
				return arrayList;
			}
		}

		public ICollection Values
		{
			get
			{
				ArrayList arrayList = new ArrayList();
				for (int i = 0; i < objectList.Count; i++)
				{
					arrayList.Add(((DictionaryEntry)objectList[i]).Value);
				}
				return arrayList;
			}
		}

		public object SyncRoot => this;

		public void Add(object key, object value)
		{
			objectTable.Add(key, value);
			objectList.Add(new DictionaryEntry(key, value));
		}

		public void Clear()
		{
			objectTable.Clear();
			objectList.Clear();
		}

		public bool Contains(object key)
		{
			return objectTable.Contains(key);
		}

		public void CopyTo(Array array, int idx)
		{
			objectTable.CopyTo(array, idx);
		}

		public void Insert(int idx, object key, object value)
		{
			if (idx > Count)
			{
				throw new ArgumentOutOfRangeException("index");
			}
			objectTable.Add(key, value);
			objectList.Insert(idx, new DictionaryEntry(key, value));
		}

		public void Remove(object key)
		{
			objectTable.Remove(key);
			int num = IndexOf(key);
			if (num >= 0)
			{
				objectList.RemoveAt(num);
			}
		}

		public void RemoveAt(int idx)
		{
			if (idx >= Count)
			{
				throw new ArgumentOutOfRangeException("index");
			}
			objectTable.Remove(((DictionaryEntry)objectList[idx]).Key);
			objectList.RemoveAt(idx);
		}

		IDictionaryEnumerator IDictionary.GetEnumerator()
		{
			return new KeyedListEnumerator(objectList);
		}

		IDictionaryEnumerator IOrderedDictionary.GetEnumerator()
		{
			return new KeyedListEnumerator(objectList);
		}

		IEnumerator IEnumerable.GetEnumerator()
		{
			return new KeyedListEnumerator(objectList);
		}

		private int IndexOf(object key)
		{
			for (int i = 0; i < objectList.Count; i++)
			{
				if (((DictionaryEntry)objectList[i]).Key.Equals(key))
				{
					return i;
				}
			}
			return -1;
		}
	}
	internal class KeyedListEnumerator : IDictionaryEnumerator, IEnumerator
	{
		private int index = -1;

		private ArrayList objs;

		public object Current
		{
			get
			{
				if (index < 0 || index >= objs.Count)
				{
					throw new InvalidOperationException();
				}
				return ((DictionaryEntry)objs[index]).Value;
			}
		}

		public DictionaryEntry Entry => (DictionaryEntry)Current;

		public object Key => Entry.Key;

		public object Value => Entry.Value;

		internal KeyedListEnumerator(ArrayList list)
		{
			objs = list;
		}

		public bool MoveNext()
		{
			index++;
			if (index >= objs.Count)
			{
				return false;
			}
			return true;
		}

		public void Reset()
		{
			index = -1;
		}
	}
}
namespace System.Web.Security
{
	internal interface IMembershipAdapter
	{
		MembershipProviderCollection Providers { get; }

		int UserIsOnlineTimeWindow { get; }

		bool IsDecryptionKeyAutogenerated { get; }

		bool UsingCustomEncryption { get; }

		byte[] EncryptOrDecryptData(bool encrypt, byte[] buffer, bool useLegacyMode);
	}
	[TypeForwardedFrom("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
	public enum MembershipCreateStatus
	{
		Success,
		InvalidUserName,
		InvalidPassword,
		InvalidQuestion,
		InvalidAnswer,
		InvalidEmail,
		DuplicateUserName,
		DuplicateEmail,
		UserRejected,
		InvalidProviderUserKey,
		DuplicateProviderUserKey,
		ProviderError
	}
	[Serializable]
	[TypeForwardedFrom("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
	public class MembershipCreateUserException : Exception
	{
		private MembershipCreateStatus _StatusCode = MembershipCreateStatus.ProviderError;

		public MembershipCreateStatus StatusCode => _StatusCode;

		public MembershipCreateUserException(MembershipCreateStatus statusCode)
			: base(GetMessageFromStatusCode(statusCode))
		{
			_StatusCode = statusCode;
		}

		public MembershipCreateUserException(string message)
			: base(message)
		{
		}

		protected MembershipCreateUserException(SerializationInfo info, StreamingContext context)
			: base(info, context)
		{
			_StatusCode = (MembershipCreateStatus)info.GetInt32("_StatusCode");
		}

		public MembershipCreateUserException()
		{
		}

		public MembershipCreateUserException(string message, Exception innerException)
			: base(message, innerException)
		{
		}

		[PermissionSet(SecurityAction.LinkDemand, Unrestricted = true)]
		public override void GetObjectData(SerializationInfo info, StreamingContext context)
		{
			base.GetObjectData(info, context);
			info.AddValue("_StatusCode", _StatusCode);
		}

		internal static string GetMessageFromStatusCode(MembershipCreateStatus statusCode)
		{
			return statusCode switch
			{
				MembershipCreateStatus.Success => "No Error.", 
				MembershipCreateStatus.InvalidUserName => "The username supplied is invalid.", 
				MembershipCreateStatus.InvalidPassword => "The password supplied is invalid.  Passwords must conform to the password strength requirements configured for the default provider.", 
				MembershipCreateStatus.InvalidQuestion => "The password-question supplied is invalid.  Note that the current provider configuration requires a valid password question and answer.  As a result, a CreateUser overload that accepts question and answer parameters must also be used.", 
				MembershipCreateStatus.InvalidAnswer => "The password-answer supplied is invalid.", 
				MembershipCreateStatus.InvalidEmail => "The E-mail supplied is invalid.", 
				MembershipCreateStatus.InvalidProviderUserKey => "The provider user key supplied is invalid. It must be of type System.Guid.", 
				MembershipCreateStatus.DuplicateUserName => "The username is already in use.", 
				MembershipCreateStatus.DuplicateEmail => "The E-mail address is already in use.", 
				MembershipCreateStatus.DuplicateProviderUserKey => "The provider user key is already in use.", 
				MembershipCreateStatus.UserRejected => "The user was rejected.", 
				_ => "The Provider encountered an unknown error.", 
			};
		}
	}
	[Serializable]
	[TypeForwardedFrom("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
	public class MembershipPasswordException : Exception
	{
		public MembershipPasswordException(string message)
			: base(message)
		{
		}

		protected MembershipPasswordException(SerializationInfo info, StreamingContext context)
			: base(info, context)
		{
		}

		public MembershipPasswordException()
		{
		}

		public MembershipPasswordException(string message, Exception innerException)
			: base(message, innerException)
		{
		}
	}
	[TypeForwardedFrom("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
	public enum MembershipPasswordFormat
	{
		Clear,
		Hashed,
		Encrypted
	}
	[TypeForwardedFrom("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
	public sealed class MembershipProviderCollection : ProviderCollection
	{
		public MembershipProvider this[string name] => (MembershipProvider)(object)((ProviderCollection)this)[name];

		public override void Add(ProviderBase provider)
		{
			if (provider == null)
			{
				throw new ArgumentNullException("provider");
			}
			if (!(provider is MembershipProvider))
			{
				throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Provider must implement the class '{0}'.", typeof(MembershipProvider).ToString()), "provider");
			}
			((ProviderCollection)this).Add(provider);
		}

		public void CopyTo(MembershipProvider[] array, int index)
		{
			((ProviderCollection)this).CopyTo((ProviderBase[])(object)array, index);
		}
	}
	[Serializable]
	[TypeForwardedFrom("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
	public sealed class MembershipUserCollection : IEnumerable, ICollection
	{
		private Hashtable _Indices;

		private ArrayList _Values;

		private bool _ReadOnly;

		public MembershipUser this[string name]
		{
			get
			{
				object obj = _Indices[name];
				if (obj == null || !(obj is int num))
				{
					return null;
				}
				if (num >= _Values.Count)
				{
					return null;
				}
				return (MembershipUser)_Values[num];
			}
		}

		public int Count => _Values.Count;

		public bool IsSynchronized => false;

		public object SyncRoot => this;

		public MembershipUserCollection()
		{
			_Indices = new Hashtable(10, StringComparer.CurrentCultureIgnoreCase);
			_Values = new ArrayList();
		}

		public void Add(MembershipUser user)
		{
			if (user == null)
			{
				throw new ArgumentNullException("user");
			}
			if (_ReadOnly)
			{
				throw new NotSupportedException();
			}
			int num = _Values.Add(user);
			try
			{
				_Indices.Add(user.UserName, num);
			}
			catch
			{
				_Values.RemoveAt(num);
				throw;
			}
		}

		public void Remove(string name)
		{
			if (_ReadOnly)
			{
				throw new NotSupportedException();
			}
			object obj = _Indices[name];
			if (obj == null || !(obj is int))
			{
				return;
			}
			int num = (int)obj;
			if (num >= _Values.Count)
			{
				return;
			}
			_Values.RemoveAt(num);
			_Indices.Remove(name);
			ArrayList arrayList = new ArrayList();
			foreach (DictionaryEntry index in _Indices)
			{
				if ((int)index.Value > num)
				{
					arrayList.Add(index.Key);
				}
			}
			foreach (string item in arrayList)
			{
				_Indices[item] = (int)_Indices[item] - 1;
			}
		}

		public IEnumerator GetEnumerator()
		{
			return _Values.GetEnumerator();
		}

		public void SetReadOnly()
		{
			if (!_ReadOnly)
			{
				_ReadOnly = true;
				_Values = ArrayList.ReadOnly(_Values);
			}
		}

		public void Clear()
		{
			_Values.Clear();
			_Indices.Clear();
		}

		void ICollection.CopyTo(Array array, int index)
		{
			_Values.CopyTo(array, index);
		}

		public void CopyTo(MembershipUser[] array, int index)
		{
			_Values.CopyTo(array, index);
		}
	}
	[TypeForwardedFrom("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
	public delegate void MembershipValidatePasswordEventHandler(object sender, ValidatePasswordEventArgs e);
	[TypeForwardedFrom("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
	public sealed class ValidatePasswordEventArgs : EventArgs
	{
		private string _userName;

		private string _password;

		private bool _isNewUser;

		private bool _cancel;

		private Exception _failureInformation;

		public string UserName => _userName;

		public string Password => _password;

		public bool IsNewUser => _isNewUser;

		public bool Cancel
		{
			get
			{
				return _cancel;
			}
			set
			{
				_cancel = value;
			}
		}

		public Exception FailureInformation
		{
			get
			{
				return _failureInformation;
			}
			set
			{
				_failureInformation = value;
			}
		}

		public ValidatePasswordEventArgs(string userName, string password, bool isNewUser)
		{
			_userName = userName;
			_password = password;
			_isNewUser = isNewUser;
			_cancel = false;
		}
	}
	internal interface IMembershipHelper
	{
		int UserIsOnlineTimeWindow { get; }

		MembershipProviderCollection Providers { get; }

		byte[] DecryptPassword(byte[] encodedPassword);

		byte[] EncryptPassword(byte[] password);
	}
	[TypeForwardedFrom("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
	public abstract class MembershipProvider : ProviderBase
	{
		private const string HELPER_TYPE_NAME = "System.Web.Security.MembershipHelper, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

		private static IMembershipHelper helper;

		private static readonly object validatingPasswordEvent;

		private EventHandlerList events = new EventHandlerList();

		internal static IMembershipHelper Helper => helper;

		public abstract string ApplicationName { get; set; }

		public abstract bool EnablePasswordReset { get; }

		public abstract bool EnablePasswordRetrieval { get; }

		public abstract bool RequiresQuestionAndAnswer { get; }

		public abstract int MaxInvalidPasswordAttempts { get; }

		public abstract int MinRequiredNonAlphanumericCharacters { get; }

		public abstract int MinRequiredPasswordLength { get; }

		public abstract int PasswordAttemptWindow { get; }

		public abstract MembershipPasswordFormat PasswordFormat { get; }

		public abstract string PasswordStrengthRegularExpression { get; }

		public abstract bool RequiresUniqueEmail { get; }

		public event MembershipValidatePasswordEventHandler ValidatingPassword
		{
			add
			{
				events.AddHandler(validatingPasswordEvent, value);
			}
			remove
			{
				events.RemoveHandler(validatingPasswordEvent, value);
			}
		}

		static MembershipProvider()
		{
			validatingPasswordEvent = new object();
			Type type = Type.GetType("System.Web.Security.MembershipHelper, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", throwOnError: false);
			if (type == null)
			{
				return;
			}
			try
			{
				helper = Activator.CreateInstance(type) as IMembershipHelper;
			}
			catch
			{
			}
		}

		public abstract bool ChangePassword(string username, string oldPassword, string newPassword);

		public abstract bool ChangePasswordQuestionAndAnswer(string username, string password, string newPasswordQuestion, string newPasswordAnswer);

		public abstract MembershipUser CreateUser(string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status);

		public abstract bool DeleteUser(string username, bool deleteAllRelatedData);

		public abstract MembershipUserCollection FindUsersByEmail(string emailToMatch, int pageIndex, int pageSize, out int totalRecords);

		public abstract MembershipUserCollection FindUsersByName(string usernameToMatch, int pageIndex, int pageSize, out int totalRecords);

		public abstract MembershipUserCollection GetAllUsers(int pageIndex, int pageSize, out int totalRecords);

		public abstract int GetNumberOfUsersOnline();

		public abstract string GetPassword(string username, string answer);

		public abstract MembershipUser GetUser(string username, bool userIsOnline);

		public abstract MembershipUser GetUser(object providerUserKey, bool userIsOnline);

		public abstract string GetUserNameByEmail(string email);

		public abstract string ResetPassword(string username, string answer);

		public abstract void UpdateUser(MembershipUser user);

		public abstract bool ValidateUser(string username, string password);

		public abstract bool UnlockUser(string userName);

		protected virtual void OnValidatingPassword(ValidatePasswordEventArgs e)
		{
			if (events[validatingPasswordEvent] is MembershipValidatePasswordEventHandler membershipValidatePasswordEventHandler)
			{
				membershipValidatePasswordEventHandler(this, e);
			}
		}

		protected virtual byte[] DecryptPassword(byte[] encodedPassword)
		{
			if (helper == null)
			{
				throw new PlatformNotSupportedException("This method is not available.");
			}
			return helper.DecryptPassword(encodedPassword);
		}

		protected virtual byte[] EncryptPassword(byte[] password)
		{
			return EncryptPassword(password, MembershipPasswordCompatibilityMode.Framework20);
		}

		[MonoTODO("Discover what actually is 4.0 password compatibility mode.")]
		protected virtual byte[] EncryptPassword(byte[] password, MembershipPasswordCompatibilityMode legacyPasswordCompatibilityMode)
		{
			if (helper == null)
			{
				throw new PlatformNotSupportedException("This method is not available.");
			}
			if (legacyPasswordCompatibilityMode == MembershipPasswordCompatibilityMode.Framework40)
			{
				throw new PlatformNotSupportedException("Framework 4.0 password encryption mode is not supported at this time.");
			}
			return helper.EncryptPassword(password);
		}
	}
	[Serializable]
	[TypeForwardedFrom("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
	public class MembershipUser
	{
		private string providerName;

		private string name;

		private object providerUserKey;

		private string email;

		private string passwordQuestion;

		private string comment;

		private bool isApproved;

		private bool isLockedOut;

		private DateTime creationDate;

		private DateTime lastLoginDate;

		private DateTime lastActivityDate;

		private DateTime lastPasswordChangedDate;

		private DateTime lastLockoutDate;

		public virtual string Comment
		{
			get
			{
				return comment;
			}
			set
			{
				comment = value;
			}
		}

		public virtual DateTime CreationDate => creationDate.ToLocalTime();

		public virtual string Email
		{
			get
			{
				return email;
			}
			set
			{
				email = value;
			}
		}

		public virtual bool IsApproved
		{
			get
			{
				return isApproved;
			}
			set
			{
				isApproved = value;
			}
		}

		public virtual bool IsLockedOut => isLockedOut;

		public virtual bool IsOnline
		{
			get
			{
				int userIsOnlineTimeWindow = (MembershipProvider.Helper ?? throw new PlatformNotSupportedException("The method is not available.")).UserIsOnlineTimeWindow;
				return LastActivityDate > DateTime.Now - TimeSpan.FromMinutes(userIsOnlineTimeWindow);
			}
		}

		public virtual DateTime LastActivityDate
		{
			get
			{
				return lastActivityDate.ToLocalTime();
			}
			set
			{
				lastActivityDate = value.ToUniversalTime();
			}
		}

		public virtual DateTime LastLoginDate
		{
			get
			{
				return lastLoginDate.ToLocalTime();
			}
			set
			{
				lastLoginDate = value.ToUniversalTime();
			}
		}

		public virtual DateTime LastPasswordChangedDate => lastPasswordChangedDate.ToLocalTime();

		public virtual DateTime LastLockoutDate => lastLockoutDate.ToLocalTime();

		public virtual string PasswordQuestion => passwordQuestion;

		public virtual string ProviderName => providerName;

		public virtual string UserName => name;

		public virtual object ProviderUserKey => providerUserKey;

		private MembershipProvider Provider => (MembershipProvider.Helper ?? throw new PlatformNotSupportedException("The method is not available.")).Providers[ProviderName] ?? throw new InvalidOperationException("Membership provider '" + ProviderName + "' not found.");

		protected MembershipUser()
		{
		}

		public MembershipUser(string providerName, string name, object providerUserKey, string email, string passwordQuestion, string comment, bool isApproved, bool isLockedOut, DateTime creationDate, DateTime lastLoginDate, DateTime lastActivityDate, DateTime lastPasswordChangedDate, DateTime lastLockoutDate)
		{
			this.providerName = providerName;
			this.name = name;
			this.providerUserKey = providerUserKey;
			this.email = email;
			this.passwordQuestion = passwordQuestion;
			this.comment = comment;
			this.isApproved = isApproved;
			this.isLockedOut = isLockedOut;
			this.creationDate = creationDate.ToUniversalTime();
			this.lastLoginDate = lastLoginDate.ToUniversalTime();
			this.lastActivityDate = lastActivityDate.ToUniversalTime();
			this.lastPasswordChangedDate = lastPasswordChangedDate.ToUniversalTime();
			this.lastLockoutDate = lastLockoutDate.ToUniversalTime();
		}

		private void UpdateSelf(MembershipUser fromUser)
		{
			try
			{
				Comment = fromUser.Comment;
			}
			catch (NotSupportedException)
			{
			}
			try
			{
				creationDate = fromUser.CreationDate;
			}
			catch (NotSupportedException)
			{
			}
			try
			{
				Email = fromUser.Email;
			}
			catch (NotSupportedException)
			{
			}
			try
			{
				IsApproved = fromUser.IsApproved;
			}
			catch (NotSupportedException)
			{
			}
			try
			{
				isLockedOut = fromUser.IsLockedOut;
			}
			catch (NotSupportedException)
			{
			}
			try
			{
				LastActivityDate = fromUser.LastActivityDate;
			}
			catch (NotSupportedException)
			{
			}
			try
			{
				lastLockoutDate = fromUser.LastLockoutDate;
			}
			catch (NotSupportedException)
			{
			}
			try
			{
				LastLoginDate = fromUser.LastLoginDate;
			}
			catch (NotSupportedException)
			{
			}
			try
			{
				lastPasswordChangedDate = fromUser.LastPasswordChangedDate;
			}
			catch (NotSupportedException)
			{
			}
			try
			{
				passwordQuestion = fromUser.PasswordQuestion;
			}
			catch (NotSupportedException)
			{
			}
			try
			{
				providerUserKey = fromUser.ProviderUserKey;
			}
			catch (NotSupportedException)
			{
			}
		}

		internal void UpdateUser()
		{
			MembershipUser user = Provider.GetUser(UserName, userIsOnline: false);
			UpdateSelf(user);
		}

		public virtual bool ChangePassword(string oldPassword, string newPassword)
		{
			bool result = Provider.ChangePassword(UserName, oldPassword, newPassword);
			UpdateUser();
			return result;
		}

		public virtual bool ChangePasswordQuestionAndAnswer(string password, string newPasswordQuestion, string newPasswordAnswer)
		{
			bool result = Provider.ChangePasswordQuestionAndAnswer(UserName, password, newPasswordQuestion, newPasswordAnswer);
			UpdateUser();
			return result;
		}

		public virtual string GetPassword()
		{
			return GetPassword(null);
		}

		public virtual string GetPassword(string passwordAnswer)
		{
			return Provider.GetPassword(UserName, passwordAnswer);
		}

		public virtual string ResetPassword()
		{
			return ResetPassword(null);
		}

		public virtual string ResetPassword(string passwordAnswer)
		{
			string result = Provider.ResetPassword(UserName, passwordAnswer);
			UpdateUser();
			return result;
		}

		public override string ToString()
		{
			return UserName;
		}

		public virtual bool UnlockUser()
		{
			bool result = Provider.UnlockUser(UserName);
			UpdateUser();
			return result;
		}
	}
	[TypeForwardedFrom("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
	public abstract class RoleProvider : ProviderBase
	{
		public abstract string ApplicationName { get; set; }

		public abstract void AddUsersToRoles(string[] usernames, string[] roleNames);

		public abstract void CreateRole(string roleName);

		public abstract bool DeleteRole(string roleName, bool throwOnPopulatedRole);

		public abstract string[] FindUsersInRole(string roleName, string usernameToMatch);

		public abstract string[] GetAllRoles();

		public abstract string[] GetRolesForUser(string username);

		public abstract string[] GetUsersInRole(string roleName);

		public abstract bool IsUserInRole(string username, string roleName);

		public abstract void RemoveUsersFromRoles(string[] usernames, string[] roleNames);

		public abstract bool RoleExists(string roleName);
	}
}
namespace System.Web.Configuration
{
	public enum MembershipPasswordCompatibilityMode
	{
		Framework20,
		Framework40
	}
}
namespace System.Web.Hosting
{
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false, Inherited = false)]
	public sealed class CustomLoaderAttribute : Attribute
	{
		public Type CustomLoaderType
		{
			[CompilerGenerated]
			get
			{
				ThrowStub.ThrowNotSupportedException();
				return null;
			}
		}

		public CustomLoaderAttribute(Type customLoaderType)
		{
		}
	}
}
namespace Unity
{
	internal sealed class ThrowStub : ObjectDisposedException
	{
		public static void ThrowNotSupportedException()
		{
			throw new PlatformNotSupportedException();
		}
	}
}

Room Architect Tool_Data/Managed/System.Web.dll

Decompiled 3 months ago
using System;
using System.CodeDom;
using System.CodeDom.Compiler;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.Design;
using System.ComponentModel.Design.Serialization;
using System.Configuration;
using System.Configuration.Internal;
using System.Configuration.Provider;
using System.Data;
using System.Data.Common;
using System.Data.Design;
using System.Data.OleDb;
using System.Data.SqlClient;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Design;
using System.EnterpriseServices;
using System.Globalization;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Linq.Expressions;
using System.Net;
using System.Net.Configuration;
using System.Net.Mail;
using System.Net.Sockets;
using System.Net.WebSockets;
using System.Reflection;
using System.Reflection.Emit;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Messaging;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.Runtime.Serialization.Formatters.Soap;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Authentication.ExtendedProtection;
using System.Security.Claims;
using System.Security.Cryptography;
using System.Security.Permissions;
using System.Security.Policy;
using System.Security.Principal;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using System.Web.Caching;
using System.Web.Compilation;
using System.Web.Configuration;
using System.Web.Configuration.nBrowser;
using System.Web.Handlers;
using System.Web.Hosting;
using System.Web.Instrumentation;
using System.Web.ModelBinding;
using System.Web.Profile;
using System.Web.Properties;
using System.Web.Routing;
using System.Web.Security;
using System.Web.Services.Configuration;
using System.Web.Services.Description;
using System.Web.Services.Discovery;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.Adapters;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.Adapters;
using System.Web.Util;
using System.Web.WebSockets;
using System.Xml;
using System.Xml.Serialization;
using System.Xml.XPath;
using System.Xml.Xsl;
using Microsoft.Win32;
using Mono.Data.Sqlite;
using Mono.Web.Util;
using Unity;

[assembly: WebResource("TreeView_lplus.gif", "image/gif")]
[assembly: WebResource("TreeView_lminus.gif", "image/gif")]
[assembly: WebResource("TreeView_l.gif", "image/gif")]
[assembly: WebResource("TreeView_i.gif", "image/gif")]
[assembly: WebResource("TreeView_dashplus.gif", "image/gif")]
[assembly: WebResource("TreeView_dashminus.gif", "image/gif")]
[assembly: WebResource("TreeView_dash.gif", "image/gif")]
[assembly: WebResource("TreeView_noexpand.gif", "image/gif")]
[assembly: InternalsVisibleTo("net_4_x_System.Web_test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("SystemWebTestShim, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("System.Web.Extensions, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("Microsoft.Web.Infrastructure, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: SecurityRules(SecurityRuleSet.Level2, SkipVerificationInFullTrust = true)]
[assembly: Dependency("System", LoadHint.Always)]
[assembly: CompilationRelaxations(CompilationRelaxations.NoStringInterning)]
[assembly: AssemblyFileVersion("4.0.0.0")]
[assembly: AssemblyDelaySign(true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: SatelliteContractVersion("4.0.0.0")]
[assembly: AssemblyTitle("System.Web.dll")]
[assembly: AssemblyDescription("System.Web.dll")]
[assembly: AssemblyCompany("Mono development team")]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: WebResource("TreeView_minus.gif", "image/gif")]
[assembly: AssemblyCopyright("(c) Various Mono authors")]
[assembly: ComVisible(false)]
[assembly: AssemblyDefaultAlias("System.Web.dll")]
[assembly: AssemblyInformationalVersion("0.0.0.1")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: AllowPartiallyTrustedCallers]
[assembly: TagPrefix("System.Web.UI.WebControls", "asp")]
[assembly: CLSCompliant(true)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: WebResource("TreeView_plus.gif", "image/gif")]
[assembly: WebResource("TreeView_rminus.gif", "image/gif")]
[assembly: WebResource("webform.js", "text/javascript")]
[assembly: WebResource("GridView.js", "text/javascript")]
[assembly: WebResource("MenuModern.js", "text/javascript")]
[assembly: WebResource("Menu.js", "text/javascript")]
[assembly: WebResource("TreeView.js", "text/javascript")]
[assembly: WebResource("computer.gif", "image/gif")]
[assembly: WebResource("folder.gif", "image/gif")]
[assembly: WebResource("file.gif", "image/gif")]
[assembly: WebResource("transparent.gif", "image/gif")]
[assembly: WebResource("arrow_down.gif", "image/gif")]
[assembly: WebResource("arrow_up.gif", "image/gif")]
[assembly: WebResource("warning.gif", "image/gif")]
[assembly: WebResource("star_full.gif", "image/gif")]
[assembly: WebResource("star_empty.gif", "image/gif")]
[assembly: WebResource("inbox.gif", "image/gif")]
[assembly: WebResource("dots.gif", "image/gif")]
[assembly: WebResource("dot_full.gif", "image/gif")]
[assembly: WebResource("TreeView_rplus.gif", "image/gif")]
[assembly: WebResource("TreeView_t.gif", "image/gif")]
[assembly: WebResource("TreeView_tminus.gif", "image/gif")]
[assembly: WebResource("TreeView_tplus.gif", "image/gif")]
[assembly: WebResource("arrow_minus.gif", "image/gif")]
[assembly: WebResource("arrow_noexpand.gif", "image/gif")]
[assembly: WebResource("TreeView_r.gif", "image/gif")]
[assembly: WebResource("arrow_plus.gif", "image/gif")]
[assembly: WebResource("box_empty.gif", "image/gif")]
[assembly: WebResource("box_minus.gif", "image/gif")]
[assembly: WebResource("box_noexpand.gif", "image/gif")]
[assembly: WebResource("box_plus.gif", "image/gif")]
[assembly: WebResource("contact.gif", "image/gif")]
[assembly: WebResource("dot_empty.gif", "image/gif")]
[assembly: WebResource("box_full.gif", "image/gif")]
[assembly: WebResource("WebUIValidation_2.0.js", "text/javascript")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("4.0.0.0")]
[assembly: TypeForwardedTo(typeof(MembershipCreateStatus))]
[assembly: TypeForwardedTo(typeof(MembershipCreateUserException))]
[assembly: TypeForwardedTo(typeof(MembershipPasswordException))]
[assembly: TypeForwardedTo(typeof(MembershipPasswordFormat))]
[assembly: TypeForwardedTo(typeof(MembershipProvider))]
[assembly: TypeForwardedTo(typeof(MembershipProviderCollection))]
[assembly: TypeForwardedTo(typeof(MembershipUser))]
[assembly: TypeForwardedTo(typeof(MembershipUserCollection))]
[assembly: TypeForwardedTo(typeof(MembershipValidatePasswordEventHandler))]
[assembly: TypeForwardedTo(typeof(RoleProvider))]
[assembly: TypeForwardedTo(typeof(ValidatePasswordEventArgs))]
[module: UnverifiableCode]
internal static class Consts
{
	public const string MonoVersion = "5.11.0.0";

	public const string MonoCompany = "Mono development team";

	public const string MonoProduct = "Mono Common Language Infrastructure";

	public const string MonoCopyright = "(c) Various Mono authors";

	public const int MonoCorlibVersion = 1051100001;

	public const string FxVersion = "4.0.0.0";

	public const string FxFileVersion = "4.6.57.0";

	public const string EnvironmentVersion = "4.0.30319.42000";

	public const string VsVersion = "0.0.0.0";

	public const string VsFileVersion = "11.0.0.0";

	private const string PublicKeyToken = "b77a5c561934e089";

	public const string AssemblyI18N = "I18N, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMicrosoft_JScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMono_Http = "Mono.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Posix = "Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Security = "Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Messaging_RabbitMQ = "Mono.Messaging.RabbitMQ, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyCorlib = "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Data = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Design = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing_Design = "System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Messaging = "System.Messaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Security = "System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Web = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Core = "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string WindowsBase_3_0 = "WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
internal sealed class Locale
{
	private Locale()
	{
	}

	public static string GetText(string msg)
	{
		return msg;
	}

	public static string GetText(string fmt, params object[] args)
	{
		return string.Format(fmt, args);
	}
}
internal static class SR
{
	public const string Parameter_Invalid = "The parameter '{0}' is invalid.";

	public const string Parameter_NullOrEmpty = "The string parameter '{0}' cannot be null or empty.";

	public const string Property_NullOrEmpty = "The value assigned to property '{0}' cannot be null or empty.";

	public const string Property_Invalid = "The value assigned to property '{0}' is invalid.";

	public const string Unexpected_Error = "An unexpected error occurred in '{0}'.";

	public const string PropertyCannotBeNullOrEmptyString = "Value of the '{0}' property cannot be null or an empty string.";

	public const string PropertyCannotBeNull = "Value of the '{0}' property cannot be null.";

	public const string Invalid_string_from_browser_caps = "The HttpBrowserCapabilities string '{1}' evaluated to '{2}'.  {0}  Check the browserCaps section of machine.config or web.config to correct the error.";

	public const string Unrecognized_construct_in_pattern = "Server cannot recognize construct '{0}' in pattern '{1}'.";

	public const string Caps_cannot_be_inited_twice = "Capabilities object cannot be initialized twice.";

	public const string Duplicate_browser_id = "Id '{0}' has already been specified and must be unique.";

	public const string Invalid_browser_root = "Invalid root element of browser definition file.  Must be contained in a <browsers> element.";

	public const string Browser_mutually_exclusive_attributes = "Browser attributes '{0}' and '{1}' cannot be specified together.";

	public const string Browser_refid_prohibits_identification = "The identification element cannot be used when the browser element includes a refID.";

	public const string Browser_invalid_element = "The '{0}' element is not allowed in a browser or gateway definition.";

	public const string Browser_Circular_Reference = "The browser id '{0}' is specified in a circular reference.";

	public const string Browser_attributes_required = "The '{1}' or '{2}' attribute is required on the {0} element of the browser definition file.";

	public const string Browser_parentID_Not_Found = "The browser or gateway element with ID '{0}' cannot be found.";

	public const string Browser_parentID_applied_to_default = "parentID attribute is not allowed on a default browser element.";

	public const string Browser_InvalidID = "The {0} '{1}' is not a valid identifier.";

	public const string Browser_Not_Allowed_InAppLevel = "Invalid element '{0}' in the application browser file, this element can only be used in a machine level browser file.";

	public const string Browser_InvalidStrongNameKey = "Invalid strong name key was generated.";

	public const string Browser_compile_error = "BrowserCap assembly failed to be compiled.";

	public const string DefaultBrowser_parentID_Not_Found = "The defaultBrowser element specified by parentID '{0}' cannot be found.";

	public const string Browser_empty_identification = "A non-empty <identification> element is required for any browser definition.";

	public const string Browser_W3SVC_Failure_Helper_Text = "Cannot restart W3SVC Service, this operation might require other privileges.";

	public const string DefaultSiteName = "Default Web Site";

	public const string ControlAdapters_TypeNotFound = "Unable to create type '{0}'.";

	public const string Failed_gac_install = "Failed to install assembly to gac.";

	public const string Failed_gac_uninstall = "Failed to uninstall assembly to gac.";

	public const string WrongType_of_Protected_provider = "The type specified does not extend ProtectedConfigurationProvider class.";

	public const string Make_sure_remote_server_is_enabled_for_config_access = "Unable to access the configuration system on the remote server. Make sure that the remote server allows remote configuration.";

	public const string Config_unable_to_get_section = "Unable to retrieve configuration section '{0}'.";

	public const string Config_failed_to_resolve_site_id = "Failed to resolve the site ID for '{0}'.";

	public const string Config_GetSectionWithPathArgInvalid = "WebConfigurationManager::GetSection(sectionName, path) can only be called from within a web application.";

	public const string Unable_to_create_temp_file = "Unable to create a new temp file.";

	public const string Config_allow_definition_error_application = "It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS.";

	public const string Config_allow_definition_error_machine = "It is an error to use a section registered as allowDefinition='MachineOnly' beyond machine.config.";

	public const string Config_allow_definition_error_webroot = "It is an error to use a section registered as allowDefinition='MachineToWebRoot' beyond the root web.config file.";

	public const string Config_base_unrecognized_element = "Unrecognized element";

	public const string Config_base_required_attribute_missing = "The required attribute '{0}' was not found.";

	public const string Config_base_required_attribute_empty = "The required attribute '{0}' cannot be empty.";

	public const string Config_base_unrecognized_attribute = "Unrecognized attribute '{0}'. Note that attribute names are case-sensitive.";

	public const string Config_base_elements_only = "Only XML elements are allowed.";

	public const string Config_base_no_child_nodes = "Child nodes are not allowed.";

	public const string Config_base_file_load_exception_no_message = "Could not load the assembly. The property '{0}' must be a valid assembly.";

	public const string Config_base_bad_image_exception_no_message = "Could not load the assembly. The file image '{0}' is invalid.";

	public const string Config_base_report_exception_type = "Could not load the assembly.  The unexpected exception was '{0}'.";

	public const string Config_property_generic = "The configuration property is invalid.";

	public const string Config_section_not_supported = "The configuration section is not supported: {0}.";

	public const string Unable_To_Register_Assembly = "Unable to register assembly '{0}'.";

	public const string Unable_To_UnRegister_Assembly = "Unable to un-register assembly '{0}'.";

	public const string Could_not_create_type_instance = "Server could not create {0}.";

	public const string Config_Invalid_enum_value = "The enumeration value must be one of the following: {0}.";

	public const string Config_element_below_app_illegal = "The element '{0}' cannot be defined below the application level.";

	public const string Config_provider_must_exist = "The provider '{0}' specified for the defaultProvider does not exist in the providers collection.";

	public const string File_is_read_only = "The file '{0}' is marked as read-only.";

	public const string Can_not_access_files_other_than_config = "Only config files can be accessed by this feature.";

	public const string Error_loading_XML_file = "The XML file {0} could not be loaded.  {1}";

	public const string Unknown_tag_in_caps_config = "Server found the unknown tag <{0}> in capabilities configuration.";

	public const string Cannot_specify_test_without_match = "Cannot specify test without match.";

	public const string Result_must_be_at_the_top_browser_section = "<result> must be at the top of the <browsercaps> section";

	public const string Type_doesnt_inherit_from_type = "Type '{0}' does not inherit from '{1}'.";

	public const string Type_cannot_be_resolved = "The type '{0}' cannot be resolved. Please verify the spelling is correct or that the full type name is provided.";

	public const string Problem_reading_caps_config = "Server cannot read capabilities configuration {0}.";

	public const string Special_module_cannot_be_added_manually = "Special module of type '{0}' cannot be added or removed manually.";

	public const string Special_module_cannot_be_removed_manually = "Special module of type '{0}' cannot be removed manually.";

	public const string Module_not_in_app = "There is no '{0}' module in the application to remove.";

	public const string Invalid_credentials = "Invalid user credentials are specified in the config file.";

	public const string Auth_Invalid_Login_Url = "The login URL specified for authentication is not valid.";

	public const string Invalid_value_for_globalization_attr = "The <globalization> tag contains an invalid value for the '{0}' attribute.";

	public const string Invalid_credentials_2 = "Could not create Windows user token from the credentials specified in the config file. Error from the operating system '{0}'";

	public const string Invalid_registry_config = "Error reading configuration information from the registry.";

	public const string Invalid_Passport_Redirect_URL = "Redirect URL specified for Passport Authentication is invalid.";

	public const string Invalid_redirect_return_url = "The return URL specified for request redirection is invalid.";

	public const string Config_section_not_present = "The application's configuration files must contain '{0}' section.";

	public const string Local_free_threads_cannot_exceed_free_threads = "The value for 'minLocalRequestFreeThreads' cannot exceed the value for 'minFreeThreads'.";

	public const string Min_free_threads_must_be_under_thread_pool_limits = "The value for 'minFreeThreads' must be less than the thread pool limit of {0} threads.";

	public const string Thread_pool_limit_must_be_greater_than_minFreeThreads = "The value for 'maxWorkerThreads' and 'maxIoThreads' multiplied by the number of processors must be greater than the value of <httpRuntime minFreeThreads/>, which is currently set to {0}.";

	public const string Config_max_request_length_disk_threshold_exceeds_max_request_length = "The property 'RequestLengthDiskThreshold' must be less than or equal to the 'MaxRequestLength' property.";

	public const string Config_max_request_length_smaller_than_max_request_length_disk_threshold = "The property 'MaxRequestLength' must be greater than or equal to the 'RequestLengthDiskThreshold' property.";

	public const string Capability_file_root_element = "The root element of a capabilities file must be '{0}'.";

	public const string File_element_only_valid_in_config = "File elements are not allowed in external capability files.";

	public const string HttpRuntimeSection_TargetFramework_Invalid = "The targetFramework attribute must either be empty or contain a valid framework version string.";

	public const string Clear_not_valid = "Cannot specify <clear> on this node.";

	public const string Config_base_cannot_remove_inherited_items = "Inherited items may not be removed.";

	public const string Nested_group_not_valid = "Cannot nest the <group> element.";

	public const string Dup_protocol_id = "Duplicate protocol ID: '{0}'.";

	public const string WebPartsSection_NoVerbs = "The rule must contain at least one verb.  The valid verbs are 'enterSharedScope' and 'modifyState'.";

	public const string WebPartsSection_InvalidVerb = "The verb '{0}' is not valid.  The valid verbs are 'enterSharedScope' and 'modifyState'.";

	public const string Transformer_types_already_added = "A transformer with name '{0}' has already been added, and has the same provider and consumer types as the transformer with name '{1}'.";

	public const string Transformer_attribute_error = "Error reading WebPartTransformerAttribute: '{0}'";

	public const string File_changed_since_read = "The file '{0}' has changed since it was read.";

	public const string Config_invalid_element = "Invalid element is detected: '{0}'.";

	public const string Config_control_rendering_compatibility_version_is_less_than_minimum_version = "The control rendering compatibility version must not be less than 3.5.";

	public const string InvalidExpressionSyntax = "The expression '{0}' is invalid. Expressions use the syntax <%$ prefix:value %>.";

	public const string InvalidExpressionPrefix = "The expression prefix '{0}' was not recognized.  Please correct the prefix or register the prefix in the <expressionBuilders> section of configuration.";

	public const string ExpressionBuilder_InvalidType = "The type '{0}' is not an ExpressionBuilder.";

	public const string MissingExpressionPrefix = "The expression '{0}' does not have a prefix.";

	public const string MissingExpressionValue = "The expression '{0}' does not have a value.";

	public const string ExpressionBuilder_LiteralExpressionsNotAllowed = "Literal expressions like '{0}' are not allowed. Use <asp:Literal runat=\"server\" Text=\"<%{1}%>\" /> instead.";

	public const string ResourceExpresionBuilder_PageResourceNotFound = "The resource class for this page was not found.  Please check if the resource file exists and try again.";

	public const string Failed_to_start_monitoring = "Failed to start monitoring changes to '{0}'.";

	public const string Invalid_file_name_for_monitoring = "Invalid file name for file monitoring: '{0}'. Common reasons for failure include:\r\n- The filename is not a valid Win32 file name.\r\n- The filename is not an absolute path.\r\n- The filename contains wildcard characters.\r\n- The file specified is a directory.\r\n- Access denied.";

	public const string Access_denied_for_monitoring = "Failed to start monitoring changes to '{0}' because access is denied.";

	public const string Directory_does_not_exist_for_monitoring = "Directory '{0}' does not exist. Failed to start monitoring file changes.";

	public const string NetBios_command_limit_reached = "Failed to start monitoring changes to '{0}' because the network BIOS command limit has been reached. For more information on this error, please refer to Microsoft knowledge base article 810886. Hosting on a UNC share is not supported for the Windows XP Platform.";

	public const string Directory_rename_notification = "Directory rename change notification for '{0}'.";

	public const string Change_notification_critical_dir = "Change Notification for critical directories.";

	public const string Path_not_found = "Path '{0}' was not found.";

	public const string Path_forbidden = "Path '{0}' is forbidden.";

	public const string Method_for_path_not_implemented = "{0} {1} is not implemented.";

	public const string Method_not_allowed = "The HTTP verb {0} used to access path '{1}' is not allowed.";

	public const string Cannot_call_defaulthttphandler_sync = "DefaultHttpHandler must be called asynchronously using BeginProcessRequest.";

	public const string Handler_access_denied = "The handler must be granted Script or Execute permission in order to execute.  This is set via &lt;system.webServer&gt;\\&lt;handlers accessPolicy&gt; configuration.";

	public const string Debugging_forbidden = "{0} application debugging not enabled.";

	public const string Debug_Access_Denied = "Debug access denied to '{0}'.";

	public const string Invalid_Debug_Request = "DEBUG request is not valid.";

	public const string Invalid_Debug_ID = "DebugSessionID corrupted or not provided.";

	public const string Error_Attaching_with_MDM = "HRESULT={0};ErrorString=Unable to do an AutoAttach.";

	public const string VaryByCustom_already_set = "VaryByCustom is already set.";

	public const string CacheProfile_Not_Found = "The '{0}' cache profile is not defined.  Please define it in the configuration file.";

	public const string Invalid_operation_cache_dependency = "The cache dependencies for the response have already been determined and cannot be modified.";

	public const string Invalid_sqlDependency_argument = "The '{0}' SqlDependency attribute for OutputCache directive is invalid.\r\n\r\nFor SQL Server 7.0 and SQL Server 2000, the valid format is \"database:tablename\", and table name must conform to the format of regular identifiers in SQL. To specify multiple pairs of values, use the ';' separator between pairs. (To specify ':', '\\' or ';', prefix it with the '\\' escape character.)\r\n\r\nFor dependencies that use SQL Server 9.0 notifications, specify the value 'CommandNotification'.";

	public const string Invalid_sqlDependency_argument2 = "The '{0}' SqlDependency attribute for OutputCache directive is invalid.\r\n\r\nDetailed error message: {1}";

	public const string Etag_already_set = "Etag is already set.";

	public const string Cant_both_set_and_generate_Etag = "Cannot set ETag and also generate it from files.";

	public const string Cacheability_for_field_must_be_private_or_nocache = "Cacheability for a field must either be Private or NoCache.";

	public const string Cache_dependency_used_more_that_once = "An attempt was made to reference a CacheDependency object from more than one Cache entry.";

	public const string Invalid_expiration_combination = "absoluteExpiration must be DateTime.MaxValue or slidingExpiration must be timeSpan.Zero.";

	public const string Invalid_Dependency_Type = "dependency argument to CacheDependency constructor can only be of type System.Web.Caching.CacheDependency";

	public const string Invalid_Parameters_To_Insert = "One of the following parameters must be specified: dependencies, absoluteExpiration, slidingExpiration.";

	public const string Invalid_sql_cache_dep_polltime = "The property 'pollTime' must be an integer value greater than or equal to 500(ms).";

	public const string Database_not_found = "Cannot find the '{0}' database in the configuration.";

	public const string Cant_connect_sql_cache_dep_database_polling = "Unable to connect to SQL database '{0}' for cache dependency polling.";

	public const string Cant_connect_sql_cache_dep_database_admin = "Unable to connect to the SQL database for cache dependency registration.";

	public const string Cant_connect_sql_cache_dep_database_admin_cmdtxt = "Failed during cache dependency registration.\r\n\r\nPlease make sure the database name and the table name are valid. Table names must conform to the format of regular identifiers in SQL.\r\n\r\nThe failing SQL command is:\r\n{0}\r\n";

	public const string Database_not_enabled_for_notification = "The database '{0}' is not enabled for SQL cache notification.\r\n\r\nTo enable a database for SQL cache notification, please use the System.Web.Caching.SqlCacheDependencyAdmin.EnableNotifications method, or the command line tool aspnet_regsql. To use the tool, please run 'aspnet_regsql.exe -?' for more information.";

	public const string Table_not_enabled_for_notification = "The '{0}' table in the database '{1}' is not enabled for SQL cache notification.\r\n\r\nPlease make sure the table exists, and the table name used for cache dependency matches exactly the table name used in cache notification registration.\r\n\r\nTo enable a table for SQL cache notification, please use SqlCacheDependencyAdmin.EnableTableForNotifications method, or the command line tool aspnet_regsql. To use the tool, please run 'aspnet_regsql.exe -?' for more information.\r\n\r\nTo get a list of enabled tables in the database, please use SqlCacheDependencyManager.GetTablesEnabledForNotifications method, or the command line tool aspnet_regsql.exe.";

	public const string Polling_not_enabled_for_sql_cache = "SQL cache notification is not enabled. To enable SQL cache dependency, please set the 'enabled' attribute to \"true\" in the <sqlCacheDependency> section in the configuration file.";

	public const string Polltime_zero_for_database_sql_cache = "SQL cache notification is not enabled for the database '{0}' because the pollTime attribute is set to zero in the configuration.";

	public const string Permission_denied_database_polling = "SQL cache dependency polling failed for SQL database '{0}' because of permission problem.";

	public const string Permission_denied_database_enable_notification = "You do not have sufficient permission on the database to enable SQL cache notification. You need to use a database owner account, such as 'sa' to add roles, to create the required tables and stored procedures, and to grant EXECUTE permission on those stored procedures.";

	public const string Permission_denied_table_enable_notification = "You do not have sufficient permission on the database to enable SQL cache notification for the table '{0}'. You need the permission to create a trigger on the table '{0}', and to insert a row into the table 'AspNet_SqlCacheTablesForChangeNotification'.";

	public const string Permission_denied_database_disable_notification = "You do not have sufficient permission on the database to disable SQL cache notification. You need the permission to remove the table 'AspNet_SqlCacheTablesForChangeNotification'.";

	public const string Permission_denied_table_disable_notification = "You do not have sufficient permission on the database to disable SQL cache notification for the table '{0}'. You need the permission to remove a trigger from the table '{0}', and to remove a row from the table 'AspNet_SqlCacheTablesForChangeNotification'.";

	public const string Cant_get_enabled_tables_sql_cache_dep = "Cannot get the tables enabled for SQL cache notification.";

	public const string Cant_disable_table_sql_cache_dep = "Cannot disable a table for SQL cache notification because the database is not enabled for SQL cache notification.";

	public const string Cache_null_table = "The table name parameter cannot be null or have a length of zero.";

	public const string Cache_null_table_in_tables = "The tables parameter cannot contain a table which is null or has a length of zero.";

	public const string Cache_dep_table_not_found = "The table '{0}' cannot be found in the database.";

	public const string UC_not_cached = "The CachePolicy cannot be used, since the control is not being cached.";

	public const string UCCachePolicy_unavailable = "The CachePolicy cannot be used after the PreRender phase.";

	public const string SqlCacheDependency_permission_denied = "Failed to use SqlCacheDependency because permission is denied. In order to use SqlCacheDependency, the application needs to be granted unrestricted SqlClientPermission. Please check with your administrator if the application does not have this permission.";

	public const string No_UniqueId_Cache_Dependency = "Unable to generate etag from dependencies. One of the dependencies couldn't generate a unique id.";

	public const string SqlCacheDependency_OutputCache_Conflict = "The page already has the 'SqlDependency=\"CommandNotification\"' attribute specified in the OutputCache directive.  On such a page, it is an error to create a SqlCacheDependency object using a SqlCommand object.\r\n\r\nThere are two ways to solve this problem:\r\n1.Do not use the 'SqlDependency=\"CommandNotification\"' attribute in the OutputCache directive.\r\n2.On the SqlCommand object set SqlCommand.NotificationAutoEnlist to false.  The side effect is that that SqlCommand object will not affect the output caching of the page.";

	public const string Cache_not_available = "Cache is not available";

	public const string Http_handler_not_found_for_request_type = "No http handler was found for request type '{0}'";

	public const string Request_not_available = "Request is not available in this context";

	public const string Response_not_available = "Response is not available in this context.";

	public const string Session_not_available = "Session state is not available in this context.";

	public const string Server_not_available = "Server operation is not available in this context.";

	public const string User_not_available = "User is not available in this context.";

	public const string Sync_not_supported = "Synchronous request processing is not supported.";

	public const string Type_not_factory_or_handler = "{0} does not implement IHttpHandlerFactory or IHttpHandler.";

	public const string Type_from_untrusted_assembly = "Type '{0}' cannot be instantiated under a partially trusted security policy (AllowPartiallyTrustedCallersAttribute is not present on the target assembly).";

	public const string Type_not_module = "{0} does not implement IHttpModule.";

	public const string Request_timed_out = "Request timed out.";

	public const string DynamicModuleRegistrationOff = "RegisterModule cannot be called when <httpRuntime allowDynamicModuleRegistration='false'>.";

	public const string Invalid_ControlState = "The state information is invalid for this page and might be corrupted.";

	public const string Too_late_for_ViewStateUserKey = "The ViewStateUserKey property needs to be set during Page_Init.";

	public const string Too_late_for_RegisterRequiresViewStateEncryption = "The RegisterRequiresViewStateEncryption() method needs to be called before or during Page_PreRender.";

	public const string MethodCannotBeCalledAfterAppStart = "This method cannot be called after Application_Start.";

	public const string Invalid_urlencoded_form_data = "The URL-encoded form data is not valid.";

	public const string Invalid_request_filter = "The request filter is not valid.";

	public const string Cannot_map_path_without_context = "Server cannot map the path without the full request context.";

	public const string Cross_app_not_allowed = "The virtual path '{0}' maps to another application, which is not allowed.";

	public const string Max_request_length_exceeded = "Maximum request length exceeded.";

	public const string Dangerous_input_detected = "A potentially dangerous {0} value was detected from the client ({1}).";

	public const string Dangerous_input_detected_descr = "ASP.NET has detected data in the request that is potentially dangerous because it might include HTML markup or script. The data might represent an attempt to compromise the security of your application, such as a cross-site scripting attack. If this type of input is appropriate in your application, you can include code in a web page to explicitly allow it. For more information, see http://go.microsoft.com/fwlink/?LinkID=212874.";

	public const string CollectionCountExceeded_HttpValueCollection = "The maximum number of form, query string, or posted file items has already been read from the request. To change the maximum allowed request collection count from its current value of {0}, change the \"aspnet:MaxHttpCollectionKeys\" setting. See http://go.microsoft.com/fwlink/?LinkId=238386 for more information.";

	public const string CollectionCountExceeded_JavaScriptObjectDeserializer = "The maximum number of items has already been deserialized into a single dictionary by the JavaScriptSerializer. To change the maximum allowed JSON dictionary entry count from its current value of {0}, change the \"aspnet:MaxJsonDeserializerMembers\" setting. See http://go.microsoft.com/fwlink/?LinkId=238386 for more information.";

	public const string Invalid_substitution_callback = "Invalid callback. Only static methods on controls, or methods on other objects, are allowed for substitution callbacks.";

	public const string Url_too_long = "The length of the URL for this request exceeds the configured maxUrlLength value.";

	public const string QueryString_too_long = "The length of the query string for this request exceeds the configured maxQueryStringLength value.";

	public const string Using_BufferlessStream_API_Not_Supported = "This API is not supported when using the HttpBufferlessInputStream.";

	public const string Using_InputStream_API_Not_Supported = "Request.BufferlessInputStream cannot be used because the Request's contents have already been read.";

	public const string Cannot_get_snapshot_if_not_buffered = "Server cannot get response snapshot if responses are not buffered.";

	public const string Cannot_use_snapshot_after_headers_sent = "Server cannot use snapshot after HTTP headers have been sent.";

	public const string Cannot_use_snapshot_for_TextWriter = "Server cannot use snapshot for TextWriter responses.";

	public const string Cannot_set_status_after_headers_sent = "Server cannot set status after HTTP headers have been sent.";

	public const string Cannot_set_content_type_after_headers_sent = "Server cannot set content type after HTTP headers have been sent.";

	public const string Filtering_not_allowed = "Filtering is not allowed.";

	public const string Cannot_append_header_after_headers_sent = "Server cannot append header after HTTP headers have been sent.";

	public const string Cannot_append_cookie_after_headers_sent = "Server cannot append cookies after HTTP headers have been sent.";

	public const string Cannot_modify_cookies_after_headers_sent = "Server cannot modify cookies after HTTP headers have been sent.";

	public const string Cannot_clear_headers_after_headers_sent = "Server cannot clear headers after HTTP headers have been sent.";

	public const string Cannot_call_method_after_headers_sent_generic = "This functionality is unavailable after HTTP headers have been sent.";

	public const string Cannot_flush_completed_response = "Server cannot flush a completed response.";

	public const string No_Route_Found_For_Redirect = "No matching route found for RedirectToRoute.";

	public const string Cannot_redirect_after_headers_sent = "Cannot redirect after HTTP headers have been sent.";

	public const string Cannot_set_header_encoding_after_headers_sent = "Cannot change headers encoding after HTTP headers have been sent.";

	public const string Invalid_header_encoding = "'{0}' cannot be used as Header Encoding.";

	public const string Cannot_redirect_to_newline = "Redirect URI cannot contain newline characters.";

	public const string Invalid_status_string = "HTTP status string is not valid.";

	public const string Invalid_value_for_CacheControl = "Property value for CacheControl is not valid. Value={0}.";

	public const string OutputStream_NotAvail = "OutputStream is not available when a custom TextWriter is used.";

	public const string Information_Disclosure_Warning = "This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using &lt;customErrors mode=\"Off\"/&gt;. Consider using &lt;customErrors mode=\"On\"/&gt; or &lt;customErrors mode=\"RemoteOnly\"/&gt; in production environments.";

	public const string InvalidOffsetOrCount = "The sum of {0} and {1} is greater than the length of the buffer.";

	public const string Access_denied_to_app_dir = "Server cannot access application directory '{0}'. The directory does not exist or is not accessible because of security settings.";

	public const string Access_denied_to_unicode_app_dir = "The server cannot access the application directory {0}.  This may be due to the presence of Unicode characters in the URL.  Unicode characters are supported only when running IIS 6 or newer in worker process isolation mode.";

	public const string Access_denied_to_path = "Access to path '{0}' was denied. The location does not exist or is not accessible because of security settings.";

	public const string Insufficient_trust_for_attribute = "The current trust level does not allow use of the '{0}' attribute";

	public const string XSP_init_error = "ASP.NET Initialization Error: {0}";

	public const string Unable_create_app_object = "Could not create application object.";

	public const string Could_not_create_type = "Could not create type '{0}'.";

	public const string StateManagedCollection_InvalidIndex = "Insertion index was out of range. Must be non-negative and less than or equal to size.";

	public const string StateManagedCollection_NoKnownTypes = "When implementing a derived StateManagedCollection, the implementation of CreateKnownType() must match the implementation of GetKnownTypes().";

	public const string VirtualPath_Length_Zero = "The file's virtual path must have a length greater than zero.";

	public const string Invalid_app_VirtualPath = "The virtual path '{0}' is not a valid absolute virtual path within the current application.";

	public const string Collection_CantAddNull = "Cannot add null to this collection.";

	public const string Collection_InvalidType = "Only objects of type {0} can be used with this collection.";

	public const string VirtualPath_AllowAppRelativePath = "The application relative virtual path '{0}' is not allowed here.";

	public const string VirtualPath_AllowRelativePath = "The relative virtual path '{0}' is not allowed here.";

	public const string VirtualPath_AllowAbsolutePath = "The absolute virtual path '{0}' is not allowed here.";

	public const string VirtualPath_CantMakeAppRelative = "The absolute virtual path '{0}' cannot be made application relative, because the path to the application is not known.";

	public const string VirtualPath_CantMakeAppAbsolute = "The application relative virtual path '{0}' cannot be made absolute, because the path to the application is not known.";

	public const string Bad_VirtualPath_in_VirtualFileBase = "The VirtualPathProvider returned a {0} object with VirtualPath set to '{1}' instead of the expected '{2}'.";

	public const string ControlRenderedOutsideServerForm = "Control '{0}' of type '{1}' must be placed inside a form tag with runat=server.";

	public const string RequiresNT = "This operation requires Windows NT, Windows 2000, or Windows XP.";

	public const string ListEnumVersionMismatch = "Collection was modified; enumeration operation may not execute.";

	public const string ListEnumCurrentOutOfRange = "The enumerator's current position is out of bounds of the list.";

	public const string HTMLTextWriterUnbalancedPop = "A PopEndTag was called without a corresponding PushEndTag.";

	public const string Server_too_busy = "Server Too Busy";

	public const string InvalidArgumentValue = "Invalid value for '{0}' parameter.";

	public const string CompilationMutex_Create = "Mutex could not be created.";

	public const string CompilationMutex_Null = "Mutex state is invalid.";

	public const string CompilationMutex_Drained = "Application is restarting.";

	public const string CompilationMutex_Failed = "Failed to acquire mutex lock.";

	public const string Failed_to_create_temp_dir = "Failed to create temporary files directory '{0}'. Access denied.";

	public const string Failed_to_execute_child_request = "Failed to execute child request.";

	public const string Cannot_impersonate = "An error occurred while attempting to impersonate.  Execution of this request cannot continue.";

	public const string No_codegen_access = "The current identity ({0}) does not have write access to '{1}'.";

	public const string Transaction_not_supported_in_low_trust = "Transactions are not supported under current trust level settings.";

	public const string Debugging_not_supported_in_low_trust = "Debugging is not supported under current trust level settings.";

	public const string Session_state_need_higher_trust = "Access to session state is not supported under current trust level settings.";

	public const string ExecuteUrl_not_supported = "Execute URL is not supported on this platform.";

	public const string Cannot_execute_url_in_this_context = "Insufficient context to Execute URL.";

	public const string Failed_to_execute_url = "Failed to Execute URL.";

	public const string Aspnet_not_installed = "ASP.NET ({0}) is not installed on this machine.";

	public const string Failed_to_initialize_AppDomain = "Failed to initialize the AppDomain:";

	public const string Cannot_create_AppDomain = "Failed to create AppDomain.";

	public const string Cannot_create_HostEnv = "Failed to create HostingEnvironment.";

	public const string Unknown_protocol_id = "Unknown protocol ID '{0}'.";

	public const string Only_1_HostEnv = "Only one HostingEnvironment is allowed in an AppDomain.";

	public const string Not_IRegisteredObject = "Type '{0}' does not implement IRegisteredObject interface.";

	public const string Wellknown_object_already_exists = "Well known object of type '{0}' already exists in this App Domain.";

	public const string Invalid_IIS_app = "'{0}' is not a valid IIS application.";

	public const string App_Virtual_Path = "Application virtual path: '{0}'";

	public const string Hosting_Phys_Path_Changed = "Physical application path changed from {0} to {1}.";

	public const string App_Domain_Restart = "AppDomainRestart";

	public const string Hosting_Env_Restart = "HostingEnvironment caused shutdown";

	public const string Hosting_Env_IdleTimeout = "Idle timeout";

	public const string Unhandled_Exception = "An unhandled exception occurred and the process was terminated.";

	public const string Provider_must_implement_the_interface = "The provider class '{0}' must implement the class '{1}'.";

	public const string Permission_set_not_found = "Could not find permission set named '{0}'.";

	public const string Require_stable_string_hash_codes = "ASP.NET cannot operate when String hash code randomization is enabled for the current machine. Please verify that the registry key HKEY_LOCAL_MACHINE\\Software\\Microsoft\\.NETFramework\\UseRandomizedStringHashAlgorithm does not exist or is set to [DWORD] 0.";

	public const string Server_variable_cannot_be_modified = "This server variable cannot be modified during request execution.";

	public const string Cache_url_invalid = "The format of the CACHE_URL server variable is invalid.";

	public const string Invalid_range = "Specified range is not valid.";

	public const string Invalid_use_of_response_filter = "Invalid use of response filter";

	public const string Invalid_response_filter = "Response filter is not valid.";

	public const string Invalid_size = "The size parameter must be between zero and the maximum Int32 value.";

	public const string Process_information_not_available = "Process metrics are available only when the ASP.NET process model is enabled.  When running on versions of IIS 6 or newer in worker process isolation mode, this feature is not supported.";

	public const string Error_trying_to_enumerate_files = "Server encountered an error while enumerating files.";

	public const string File_enumerator_access_denied = "File enumerator access was denied.";

	public const string File_does_not_exist = "File does not exist.";

	public const string File_is_hidden = "File is hidden.";

	public const string Missing_star_mapping = "Missing */ handler mapping.  The server cannot handle the directory.";

	public const string Resource_access_forbidden = "Access to resource is forbidden.";

	public const string SMTP_TypeCreationError = "Could not create an object of type '{0}'.  Please verify that the current platform configuration supports SMTP mail.";

	public const string Could_not_create_object_of_type = "Could not create an object of type '{0}'.";

	public const string Could_not_create_object_from_clsid = "Could not create an object with CLASSID '{0}'.";

	public const string Error_executing_child_request_for_path = "Error executing child request for {0}.";

	public const string Error_executing_child_request_for_handler = "Error executing child request for handler '{0}'.";

	public const string Invalid_path_for_child_request = "Invalid path for child request '{0}'. A virtual path is expected.";

	public const string Transacted_page_calls_aspcompat = "All pages that invoke other pages with aspcompat enabled must also have a <%@ page aspcompat=true %> directive.";

	public const string Invalid_path_for_remove = "Invalid path for HttpResponse.RemoveOutputCacheItem '{0}'. An absolute virtual path is expected.";

	public const string Get_computer_name_failed = "Could not obtain computer name.";

	public const string Cannot_map_path = "Failed to map the path '{0}'.";

	public const string Cannot_access_mappath_title = "Failed to access IIS metabase.";

	public const string Cannot_access_mappath_details = "The process account used to run ASP.NET must have read access to the IIS metabase (e.g. IIS://servername/W3SVC).   For information on modifying metabase permissions, please see <a href=\"http://support.microsoft.com/?kbid=267904\">http://support.microsoft.com/?kbid=267904</a>.";

	public const string Cannot_retrieve_request_data = "Cannot retrieve the basic request data.";

	public const string Cannot_read_posted_data = "Cannot read the posted data.";

	public const string Cannot_get_query_string = "Cannot get the query string.";

	public const string Cannot_get_query_string_bytes = "Cannot get query string bytes.";

	public const string Not_supported = "The operation is not supported.";

	public const string GetGacLocaltion_failed = "Unable to get the Global Assembly Cache path.";

	public const string Server_Support_Function_Error = "An error occurred while communicating with the remote host. The error code is 0x{0}.";

	public const string Server_Support_Function_Error_Disconnect = "The remote host closed the connection. The error code is 0x{0}.";

	public const string MachineKeyDataProtectorFactory_FactoryCreationFailed = "Could not create an instance of the configured DataProtector type.";

	public const string MachineKey_InvalidPurpose = "If a list of purposes is specified, the list cannot contain null entries or entries that are comprised solely of whitespace characters.";

	public const string Provider_Schema_Version_Not_Match = "The '{0}' requires a database schema compatible with schema version '{1}'.  However, the current database schema is not compatible with this version.  You may need to either install a compatible schema with aspnet_regsql.exe (available in the framework installation directory), or upgrade the provider to a newer version.";

	public const string Could_not_create_passport_identity = "An error occurred while trying to create a passport identity.  Please ensure that Passport Manager is installed on the machine and correctly configured.";

	public const string Passport_method_failed = "A call to a Passport Manager method has failed.  Please ensure that Passport Manager is installed on the machine and correctly configured.";

	public const string Auth_rule_names_cant_contain_char = "Authorization rule names cannot contain the '{0}' character.";

	public const string Auth_rule_must_specify_users_andor_roles = "Authorization rule must specify a list of users and/or roles.";

	public const string PageIndex_bad = "The pageIndex must be greater than or equal to zero.";

	public const string PageSize_bad = "The pageSize must be greater than zero.";

	public const string PageIndex_PageSize_bad = "The combination of pageIndex and pageSize cannot exceed the maximum value of System.Int32.";

	public const string Bad_machine_key = "Machine decryption key is invalid. It should be either \"AutoGenerate\", or 16 (for DES) or 48 (for 3DES and AES) Hex chars long, and may be followed by \",IsolateApps\". Exception message from the underlying layer: {0}";

	public const string PassportAuthFailed = "<html><head><title>Passport Sign-in Required</title></head><body>\r\n<h1>Access Denied</h1><p><h3>You must sign in with valid or different Microsoft <sup>&reg;</sup> .NET Passport credentials to access this page.</h3><p> {0} </body></html>\r\n";

	public const string PassportAuthFailed_Title = "Passport Sign-in Required";

	public const string PassportAuthFailed_Description = "You must sign in with valid or different Microsoft .NET Passport credentials to access this page.";

	public const string Unable_to_encrypt_cookie_ticket = "Unable to encrypt the authentication ticket. Try changing the decryption key configured for this application.";

	public const string Unable_to_get_cookie_authentication_validation_key = "Machine validation key is invalid. It is '{0}' chars long. It should be either \"AutoGenerate\" or between 40 and 128 Hex chars long, and may be followed by \",IsolateApps\".";

	public const string Unable_to_validate_data = "Unable to validate data.";

	public const string Unable_to_get_policy_file = "Unable to read the security policy file for trust level '{0}'.";

	public const string Wrong_validation_enum = "The validation must be one of these values: SHA1, HMACSHA256, HMACSHA384, HMACSHA512, MD5, 3DES, AES, or alg:[HashAlgorithm].";

	public const string Wrong_validation_enum_FX45 = "When using <machineKey compatibilityMode=\"Framework45\" /> or the MachineKey.Protect and MachineKey.Unprotect APIs, the 'validation' attribute must be one of these values: SHA1, HMACSHA256, HMACSHA384, HMACSHA512, or alg:[KeyedHashAlgorithm].";

	public const string Wrong_decryption_enum = "The decryption must be one of these values: Auto, DES, 3DES, AES or alg:[SymmetricAlgorithm].";

	public const string Role_is_not_empty = "This role cannot be deleted because there are users present in it.";

	public const string Assess_Denied_Title = "Access is denied.";

	public const string Assess_Denied_Description2 = "An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL.";

	public const string Assess_Denied_Section_Title2 = "Error message 401.2.";

	public const string Assess_Denied_Misc_Content2 = "Unauthorized: Logon failed due to server configuration.  Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server.  Contact the Web server's administrator for additional assistance.";

	public const string Assess_Denied_Description1 = "An error occurred while accessing the resources required to serve this request. This may have been caused by an incorrect user name and/or password.";

	public const string Assess_Denied_MiscTitle1 = "Error message 401.1";

	public const string Assess_Denied_MiscContent1 = "Logon credentials were not recognized. Make sure you are providing the correct user name and password. Otherwise, contact the Web server's administrator for help.";

	public const string Assess_Denied_Description3 = "An error occurred while accessing the resources required to serve this request. You might not have permission to view the requested resources.";

	public const string Assess_Denied_Section_Title3 = "Error message 401.3";

	public const string Assess_Denied_Misc_Content3 = "You do not have permission to view this directory or page using the credentials you supplied (access denied due to Access Control Lists). Ask the Web server's administrator to give you access to '{0}'.";

	public const string Assess_Denied_Misc_Content3_2 = "You do not have permission to view this directory or page using the credentials you supplied (access denied due to Access Control Lists). Ask the Web server's administrator to give you access.";

	public const string Auth_bad_url = "The URL specified in the config file is invalid.";

	public const string Virtual_path_outside_application_not_supported = "Virtual path outside of the current application is not supported.";

	public const string Invalid_decryption_key = "Decryption key specified has invalid hex characters.";

	public const string Invalid_validation_key = "Validation key specified has invalid hex characters.";

	public const string Passport_not_installed = "The PassportManager object could not be initialized. Please ensure that Microsoft Passport is correctly installed on the server.";

	public const string DbFileName_can_not_contain_invalid_chars = "The database filename cannot contain the following 3 characters: [ (open square brace), ] (close square brace) and ' (single quote)";

	public const string Provider_can_not_create_file_in_this_trust_level = "The SSE Provider did not find the database file specified in the connection string. At the configured trust level (below High trust level), the SSE provider cannot automatically create the database file.";

	public const string LocalDB_cannot_have_userinstance_flag = "The user instance login flag is not allowed when connecting to a LocalDB instance of SQL Server. The connection will be closed.";

	public const string MembershipPasswordAttribute_InvalidPasswordLength = "The '{0}' field is an invalid password. Password must have {1} or more characters.";

	public const string MembershipPasswordAttribute_InvalidPasswordNonAlphanumericCharacters = "The '{0}' field is an invalid password. Password must have {1} or more non-alphanumeric characters.";

	public const string MembershipPasswordAttribute_InvalidPasswordStrength = "The '{0}' field does not meet the complexity requirements for a valid password.";

	public const string MembershipPasswordAttribute_InvalidRegularExpression = "The MembershipPasswordAttribute was initialized with an invalid regular expression for password strength.";

	public const string LocalizableString_LocalizationFailed = "Cannot retrieve property '{0}' because localization failed.  Type '{1}' is not public or does not contain a public static string property with the name '{2}'.";

	public const string Role_provider_name_invalid = "The role provider name specified is invalid.";

	public const string Def_provider_not_found = "Default provider not found";

	public const string Provider_no_type_name = "Type name must be specified for this provider.";

	public const string MembershipSqlProvider_description = "SQL membership provider.";

	public const string RoleSqlProvider_description = "SQL role provider.";

	public const string RoleAuthStoreProvider_description = "Authorization store role provider.";

	public const string RoleWindowsTokenProvider_description = "Windows token role provider.";

	public const string ProfileSqlProvider_description = "SQL profile provider.";

	public const string Role_Principal_not_fully_constructed = "This RolePrincipal object is not fully constructed.";

	public const string Only_one_connection_string_allowed = "SqlWebEventProvider: Specify either a connectionString or connectionStringName, not both.";

	public const string Must_specify_connection_string_or_name = "SqlWebEventProvider: Either a connectionString or connectionStringName must be specified.";

	public const string Cannot_use_integrated_security = "SqlWebEventProvider: connectionString can only contain connection strings that use Sql Server authentication.  Trusted Connection security is not supported.";

	public const string Provider_application_name_too_long = "The application name is too long.";

	public const string Provider_bad_password_format = "Password format specified is invalid.";

	public const string Provider_can_not_retrieve_hashed_password = "Configured settings are invalid: Hashed passwords cannot be retrieved. Either set the password format to different type, or set enablePasswordRetrieval to false.";

	public const string Provider_unrecognized_attribute = "Attribute not recognized '{0}'";

	public const string Provider_can_not_decode_hashed_password = "Hashed passwords cannot be decoded.";

	public const string Profile_group_not_found = "The profile group '{0}' has not been defined.";

	public const string Profile_not_enabled = "Profile has not been enabled.";

	public const string API_supported_for_current_user_only = "Method is only supported if the user name parameter matches the user name in the current Windows Identity.";

	public const string API_failed_due_to_error = "API failed due to error '{0}'";

	public const string Profile_property_already_added = "This profile property has already been defined.";

	public const string Profile_provider_not_found = "The profile provider was not found '{0}'";

	public const string Can_not_issue_cookie_or_redirect = "Redirect failed because authentication ticket could not be stored in a cookie or URL due to configuration restrictions. Set EnableCrossAppRedirect to true in the <forms> configuration section in order to enable the ticket to be transferred to external locations via the URL.";

	public const string Profile_default_provider_not_found = "The profile default provider was not found.";

	public const string Value_must_be_boolean = "The value must be boolean (true or false) for property '{0}'.";

	public const string Value_must_be_positive_integer = "The value must be a positive 32-bit integer for property '{0}'.";

	public const string Value_must_be_non_negative_integer = "The value must be a non-negative 32-bit integer for property '{0}'.";

	public const string Value_too_big = "The value '{0}' cannot be greater than '{1}'.";

	public const string Profile_name_can_not_be_empty = "Profile property and group names must not be empty.";

	public const string Profile_name_can_not_contain_period = "Profile property and group names must not contain '.'.";

	public const string Provider_user_not_found = "The user was not found in the database.";

	public const string Provider_role_not_found = "The role '{0}' was not found.";

	public const string Provider_unknown_failure = "Stored procedure call failed.";

	public const string Provider_role_already_exists = "The role '{0}' already exists.";

	public const string Profile_default_provider_not_specified = "The default profile provider not specified.";

	public const string API_not_supported_at_this_level = "This API is not supported at this trust level.";

	public const string Profile_bad_name = "The property name specified is invalid.";

	public const string Profile_bad_group = "The specified group name: {0} of this property is invalid.";

	public const string Def_membership_provider_not_specified = "Default Membership Provider must be specified.";

	public const string Def_membership_provider_not_found = "Default Membership Provider could not be found.";

	public const string Provider_Error = "The Provider encountered an unknown error.";

	public const string Roles_feature_not_enabled = "The Role Manager feature has not been enabled.";

	public const string Def_role_provider_not_specified = "Default Role Provider must be specified.";

	public const string Def_role_provider_not_found = "Default Role Provider could not be found.";

	public const string Membership_PasswordRetrieval_not_supported = "This Membership Provider has not been configured to support password retrieval.";

	public const string Membership_UserNotFound = "The user was not found.";

	public const string Membership_WrongPassword = "The password supplied is wrong.";

	public const string Membership_WrongAnswer = "The password-answer supplied is wrong.";

	public const string Membership_InvalidPassword = "The password supplied is invalid.  Passwords must conform to the password strength requirements configured for the default provider.";

	public const string Membership_InvalidQuestion = "The password-question supplied is invalid.  Note that the current provider configuration requires a valid password question and answer.  As a result, a CreateUser overload that accepts question and answer parameters must also be used.";

	public const string Membership_InvalidAnswer = "The password-answer supplied is invalid.";

	public const string Membership_InvalidUserName = "The username supplied is invalid.";

	public const string Membership_InvalidEmail = "The E-mail supplied is invalid.";

	public const string Membership_DuplicateUserName = "The username is already in use.";

	public const string Membership_DuplicateEmail = "The E-mail address is already in use.";

	public const string Membership_UserRejected = "The User was rejected.";

	public const string Membership_InvalidProviderUserKey = "The provider user key supplied is invalid.  It must be of type System.Guid.";

	public const string Membership_DuplicateProviderUserKey = "The provider user key is already in use.";

	public const string Membership_AccountLockOut = "The user account has been locked out.";

	public const string Membership_Custom_Password_Validation_Failure = "The custom password validation failed.";

	public const string MinRequiredNonalphanumericCharacters_can_not_be_more_than_MinRequiredPasswordLength = "The minRequiredNonalphanumericCharacters cannot be greater than minRequiredPasswordLength.";

	public const string ADMembership_Description = "Active Directory membership provider.";

	public const string ADMembership_InvalidConnectionProtection = "The specified connection protection type, '{0}', is invalid.";

	public const string ADMembership_Connection_username_must_not_be_empty = "Connection-username must not be empty.";

	public const string ADMembership_Connection_password_must_not_be_empty = "Connection-password must not be empty.";

	public const string ADMembership_Schema_mappings_must_not_be_empty = "Schema mapping for property '{0}' must not be empty.";

	public const string ADMembership_Username_and_password_reqd = "If either of the properties connection-username or connection-password is specified, the other must also be specified.";

	public const string ADMembership_PasswordReset_without_question_not_supported = "The Active Directory membership provider does not support password reset without password question and answer.";

	public const string ADMembership_PasswordQuestionAnswerMapping_not_specified = "Attribute schema mappings for password-question and password-answer must be specified to enable password question and answer functionality.";

	public const string ADMembership_Provider_not_initialized = "The Active Directory Membership Provider has not been initialized.";

	public const string ADMembership_PasswordQ_not_supported = "Schema mapping for password question has not been specified.";

	public const string ADMembership_PasswordA_not_supported = "Schema mapping for password answer has not been specified.";

	public const string ADMembership_PasswordRetrieval_not_supported_AD = "The Active Directory membership provider does not support password retrieval.";

	public const string ADMembership_Username_mapping_invalid = "The property 'attributeMapUsername' must be mapped to 'sAMAccountName' or 'userPrincipalName'.";

	public const string ADMembership_Username_mapping_invalid_ADAM = "The property 'attributeMapUsername' must be mapped to 'userPrincipalName'.";

	public const string ADMembership_Wrong_syntax = "'{0}' must be mapped to a schema attribute of type '{1}'.";

	public const string ADMembership_MappedAttribute_does_not_exist = "The attribute '{0}' specified as a schema mapping for '{1}' does not exist.";

	public const string ADMembership_MappedAttribute_does_not_exist_on_user = "The attribute '{0}' specified as a schema mapping for '{1}' is not an attribute of the user class.";

	public const string ADMembership_OnlyLdap_supported = "Only LDAP connection strings are supported against Active Directory and ADAM.";

	public const string ADMembership_ServerlessADsPath_not_supported = "Serverless LDAP connection strings are not supported by the Active Directory membership provider.";

	public const string ADMembership_Secure_connection_not_established = "Unable to establish secure connection with the server";

	public const string ADMembership_Ssl_connection_not_established = "Unable to establish secure connection with the server using SSL.";

	public const string ADMembership_DefContainer_not_specified = "A default container (defaultNamingContext) has not been set for the specified server.";

	public const string ADMembership_DefContainer_does_not_exist = "The default users container does not exist in the specified domain.";

	public const string ADMembership_Container_must_be_specified = "For ADAM a container must be specified in the connection string.";

	public const string ADMembership_Valid_Targets = "This provider can target only Active Directory and ADAM directories.";

	public const string ADMembership_OnlineUsers_not_supported = "This Active Directory membership provider does not support the notion of online users.";

	public const string ADMembership_UserProperty_not_supported = "The property '{0}' is not supported by the Active Directory membership provider.";

	public const string ADMembership_Provider_SearchMethods_not_supported = "The Active Directory membership provider has not been configured to support search methods.";

	public const string ADMembership_No_ADAM_Partition = "Unable to find the ADAM application partition for the specified container.";

	public const string ADMembership_Setting_UserId_not_supported = "The Active Directory membership provider does not support setting of the providerUserKey attribute.";

	public const string ADMembership_Default_Creds_not_supported = "Default credentials are not supported when the connection protection is set to None.";

	public const string ADMembership_Container_not_superior = "User objects cannot be created in the specified container.";

	public const string ADMembership_Container_does_not_exist = "The container specified in the connection string does not exist.";

	public const string ADMembership_Property_not_found_on_object = "Property '{0}' on object '{1}' not found.";

	public const string ADMembership_Property_not_found = "Property '{0}' not found.";

	public const string ADMembership_BadPasswordAnswerMappings_not_specified = "Attribute schema mappings for bad password answer tracking must be specified to enable password reset functionality.";

	public const string ADMembership_Unknown_Error = "Unknown error ({0})";

	public const string ADMembership_GCPortsNotSupported = "LDAP connections on the GC port are not supported against Active Directory.";

	public const string ADMembership_attribute_not_single_valued = "Property '{0}' must be mapped to a single valued schema attribute.";

	public const string ADMembership_mapping_not_unique = "Property '{0}' cannot be mapped to schema attribute '{1}' as the attribute is already in use.";

	public const string ADMembership_InvalidProviderUserKey = "The provider user key supplied is invalid. It must be of type System.Security.Principal.SecurityIdentifier.";

	public const string ADMembership_unable_to_contact_domain = "The specified domain or server could not be contacted.";

	public const string ADMembership_unable_to_set_password_port = "Unable to set the password port and password method.";

	public const string ADMembership_invalid_path = "The specified connection string does not represent a valid LDAP adspath.";

	public const string ADMembership_Setting_ApplicationName_not_supported = "The Active Directory membership provider does not support setting of the ApplicationName property.";

	public const string ADMembership_Parameter_too_long = "The parameter '{0}' is too long.";

	public const string ADMembership_No_secure_conn_for_password = "Unable to setup a secure connection for setting/changing the password.";

	public const string ADMembership_Generated_password_not_complex = "Unable to generate a password that satisfies the required password complexity policy.";

	public const string ADMembership_UPN_contains_backslash = "Usernames must not contain '\\' when mapped to 'userPrincipalName'.";

	public const string Windows_Token_API_not_supported = "The configured Role Provider (WindowsTokenRoleProvider) relies upon Windows authentication to determine the groups that the user is allowed to be a member of. ASP.NET Role Manager cannot be used to manage Windows users and groups. Please use the SQLRoleProvider if you would like to support custom user/role assignment.";

	public const string Parameter_can_not_contain_comma = "The parameter '{0}' must not contain commas.";

	public const string Parameter_can_not_be_empty = "The parameter '{0}' must not be empty.";

	public const string Parameter_too_long = "The parameter '{0}' is too long: it must not exceed {1} chars in length.";

	public const string Parameter_array_empty = "The array parameter '{0}' should not be empty.";

	public const string Parameter_collection_empty = "The collection parameter '{0}' should not be empty.";

	public const string Parameter_duplicate_array_element = "The array '{0}' should not contain duplicate values.";

	public const string Membership_password_too_long = "The password is too long: it must not exceed 128 chars after encrypting.";

	public const string Provider_this_user_not_found = "The user '{0}' was not found.";

	public const string Provider_this_user_already_in_role = "The user '{0}' is already in role '{1}'.";

	public const string Provider_this_user_already_not_in_role = "The user '{0}' is already not in role '{1}'.";

	public const string SaveAs_requires_rooted_path = "The SaveAs method is configured to require a rooted path, and the path '{0}' is not rooted.";

	public const string Connection_name_not_specified = "The attribute 'connectionStringName' is missing or empty.";

	public const string Connection_string_not_found = "The connection name '{0}' was not found in the applications configuration or the connection string is empty.";

	public const string AppSetting_not_found = "The application setting '{0}' was not found in the applications configuration.";

	public const string AppSetting_not_convertible = "Could not convert the AppSetting '{0}' to the type '{1}' on property '{2}'.";

	public const string Provider_must_implement_type = "Provider must implement the class '{0}'.";

	public const string Feature_not_supported_at_this_level = "This feature is not supported at the configured trust level.";

	public const string Annoymous_id_module_not_enabled = "The Profile property '{0}' allows anonymous users to store data. This requires that the AnonymousIdentification feature be enabled.";

	public const string Anonymous_ClearAnonymousIdentifierNotSupported = "ClearAnonymousIdentifier is not supported when the feature is disabled or the user is anonymous.";

	public const string Anonymous_id_too_long = "The Anonymous Id specified is too long. It can be at most 128 chars long.";

	public const string Anonymous_id_too_long_2 = "The Anonymous Id specified is too long. It can be at most 512 chars long after encoding.";

	public const string Profile_could_not_create_type = "Attempting to load this property's type resulted in the following error: {0}";

	public const string DataAccessError_CanNotCreateDataDir_Title = "Access denied creating App_Data subdirectory";

	public const string DataAccessError_CanNotCreateDataDir_Description = "For security reasons, the identity '{0}' (under which this web application is running), does not have permissions to create the App_Data subdirectory within the application root directory.";

	public const string DataAccessError_CanNotCreateDataDir_Description_2 = "For security reasons, the identity under which this web application is running, does not have permissions to create the App_Data subdirectory within the application root directory.";

	public const string DataAccessError_MiscSectionTitle = "To grant the necessary permissions, follow these steps";

	public const string DataAccessError_MiscSection_1 = "In File Explorer, navigate to your application's directory.";

	public const string DataAccessError_MiscSection_2 = "Right-click on the \"App_Data\" subdirectory, within your application and select the \"Properties\" menu item.";

	public const string DataAccessError_MiscSection_2_CanNotCreateDataDir = "Create a folder named \"App_Data\": Right-click, choose \"New\" menu item, choose \"Folder\" sub-menu item, and then type \"App_Data\" (without quotes).";

	public const string DataAccessError_MiscSection_2_CanNotWriteToDBFile_a = "Navigate to the \"App_Data\" subdirectory.";

	public const string DataAccessError_MiscSection_2_CanNotWriteToDBFile_b = "Right-click on the Access Database file (by default, the file is named \"ASPNetDB.mdb\") and select the \"Properties\" menu item.";

	public const string DataAccessError_MiscSection_3 = "In the \"Properties\" dialog box that opens,  select the \"Security\" tab.";

	public const string DataAccessError_MiscSection_4 = "In the \"Enter the object names to select\" box, enter '{0}' (without quotes).";

	public const string DataAccessError_MiscSection_4_2 = "In the \"Enter the object names to select\" box, enter name of the identity used to run this web application.";

	public const string DataAccessError_MiscSection_ClickAdd = "Click Add";

	public const string DataAccessError_MiscSection_ClickOK = "Click OK";

	public const string DataAccessError_MiscSection_5 = "Make sure the account name is selected and then under Allow, check Write";

	public const string SqlExpressError_CanNotWriteToDataDir_Title = "Access denied creating Microsoft SQL Express Database file within App_Data subdirectory";

	public const string SqlExpressError_CanNotWriteToDbfFile_Title = "Access denied writing to Microsoft SQL Express Database file";

	public const string SqlExpressError_CanNotWriteToDataDir_Description = "For security reasons, the identity '{0}' (under which this web application is running), does not have permissions to create the SQL Express Database file within App_Data subdirectory.";

	public const string SqlExpressError_CanNotWriteToDbfFile_Description = "For security reasons, the identity '{0}' (under which this web application is running), does not have permissions to write to the SQL Express Database file configured for this application.";

	public const string SqlExpressError_CanNotWriteToDataDir_Description_2 = "For security reasons, the identity under which this web application is running, does not have permissions to create the SQL Express Database file within App_Data subdirectory.";

	public const string SqlExpressError_CanNotWriteToDbfFile_Description_2 = "For security reasons, the identity under which this web application is running, does not have permissions to write to the SQL Express Database file configured for this application.";

	public const string SqlExpressError_Description_1 = "ASP.NET stores the Microsoft SQL Express Database file used for services such as Membership and Profile in the App_Data subdirectory of your application.";

	public const string Membership_password_length_incorrect = "Password length specified must be between 1 and 128 characters.";

	public const string Membership_min_required_non_alphanumeric_characters_incorrect = "The value specified in parameter '{0}' should be in the range from zero to the value specified in the password length parameter.";

	public const string Membership_more_than_one_user_with_email = "More than one user has the specified e-mail address.";

	public const string Password_too_short = "The length of parameter '{0}' needs to be greater or equal to '{1}'.";

	public const string Password_need_more_non_alpha_numeric_chars = "Non alpha numeric characters in '{0}' needs to be greater than or equal to '{1}'.";

	public const string Password_does_not_match_regular_expression = "The parameter '{0}' does not match the regular expression specified in config file.";

	public const string Not_configured_to_support_password_resets = "This provider is not configured to allow password resets. To enable password reset, set enablePasswordReset to \"true\" in the configuration file.";

	public const string Property_not_serializable = "The type for the property '{0}' cannot be serialized using the binary serializer, since the type is not marked as serializable.";

	public const string Connection_not_secure_creating_secure_cookie = "The application is configured to issue secure cookies. These cookies require the browser to issue the request over SSL (https protocol). However, the current request is not over SSL.";

	public const string Profile_anonoymous_not_allowed_to_set_property = "This property cannot be set for anonymous users.";

	public const string AuthStore_Application_not_found = "The application was not found in the authorization store.";

	public const string AuthStore_Scope_not_found = "The scope was not found in the application.";

	public const string AuthStoreNotInstalled_Title = "The authorization store component is not installed";

	public const string AuthStoreNotInstalled_Description = "The AuthorizationStoreRoleProvider requires the authorization store components to be installed on the machine. The authorization store components are only installed and available by default on Windows Server 2003. Currently it appears that either the components have not been installed, or that the primary interop assembly has not been registered in the global assembly cache (GAC).  Both of these steps can be accomplished by downloading the Authorization Manager installation package from the web for your operating system, and installing the package on the machine.  Installations for other operating systems can be found by navigating to http://download.microsoft.com and searching with either the keyword \"AzMan\" or the keywords \"authorization manager\".";

	public const string AuthStore_policy_file_not_found = "The policy file '{0}' in the connection string could not be found.";

	public const string Wrong_profile_base_type = "The type specified in the configuration property \"inherits\" must inherit from the type System.Web.Profile.HttpProfileBase";

	public const string Command_not_recognized = "The command was not recognized.";

	public const string Configuration_for_path_not_found = "The configuration for virtual path '{0}' and site '{1}' cannot be opened.";

	public const string Configuration_for_physical_path_not_found = "The configuration for physical path '{0}' cannot be opened.";

	public const string Configuration_for_machine_config_not_found = "The configuration for machine.config cannot be opened.";

	public const string Configuration_Section_not_found = "The configuration section '{0}' was not found.";

	public const string RSA_Key_Container_not_found = "The RSA key container was not found.";

	public const string RSA_Key_Container_access_denied = "Could not access the RSA key container. Make sure that the ACLs on the container allow you to access it.";

	public const string RSA_Key_Container_already_exists = "The RSA key container already exists.";

	public const string SqlError_Connection_String = "An error occurred while attempting to initialize a System.Data.SqlClient.SqlConnection object. The value that was provided for the connection string may be wrong, or it may contain an invalid syntax.";

	public const string SqlExpress_MDF_File_Auto_Creation_MiscSectionTitle = "SQLExpress database file auto-creation error";

	public const string SqlExpress_MDF_File_Auto_Creation = "The connection string specifies a local Sql Server Express instance using a database location within the application's App_Data directory.  The provider attempted to automatically create the application services database because the provider determined that the database does not exist. The following configuration requirements are necessary to successfully check for existence of the application services database and automatically create the application services database:";

	public const string SqlExpress_MDF_File_Auto_Creation_1 = "If the application is running on either Windows 7 or Windows Server 2008R2, special configuration steps are necessary to enable automatic creation of the provider database.  Additional information is available at:  http://go.microsoft.com/fwlink/?LinkId=160102. If the application's App_Data directory does not already exist, the web server account must have read and write access to the application's directory.  This is necessary because the web server account will automatically create the App_Data directory if it does not already exist.";

	public const string SqlExpress_MDF_File_Auto_Creation_2 = "If the application's App_Data directory already exists, the web server account only requires read and write access to the application's App_Data directory.  This is necessary because the web server account will attempt to verify that the Sql Server Express database already exists within the application's App_Data directory.  Revoking read access on the App_Data directory from the web server account will prevent the provider from correctly determining if the Sql Server Express database already exists.  This will cause an error when the provider attempts to create a duplicate of an already existing database.  Write access is required because the web server account's credentials are used when creating the new database.";

	public const string SqlExpress_MDF_File_Auto_Creation_3 = "Sql Server Express must be installed on the machine.";

	public const string SqlExpress_MDF_File_Auto_Creation_4 = "The process identity for the web server account must have a local user profile.  See the readme document for details on how to create a local user profile for both machine and domain accounts.";

	public const string SqlExpress_file_not_found_in_connection_string = "SQL Express filename was not found in the connection string.";

	public const string SqlExpress_file_not_found = "The SQL Express filename specified was not found.";

	public const string Invalid_value_for_sessionstate_stateConnectionString = "The <sessionState> stateConnectionString is invalid. It must have the format tcpip=<server>:<port>, where <server> is a valid IPv4 address, a machine name using only ASCII characters, or a valid IPv6 address enclosed within square brackets, and <port> is an unsigned integer ranging from 0 to 65535 (e.g., tcpip=127.0.0.1:42424, tcpip=localhost:42424, or tcpip=[::1]:42424).";

	public const string No_database_allowed_in_sqlConnectionString = "The sqlConnectionString attribute or the connection string it refers to cannot contain the connection options 'Database', 'Initial Catalog' or 'AttachDbFileName'. In order to allow this, allowCustomSqlDatabase attribute must be set to true and the application needs to be granted unrestricted SqlClientPermission. Please check with your administrator if the application does not have this permission.";

	public const string No_database_allowed_in_sql_partition_resolver_string = "The SQL connection string (server='{1}', database='{2}') returned by an instance of the IPartitionResolver type '{0}' cannot contain the connection options 'Database', 'Initial Catalog' or 'AttachDbFileName'. In order to allow this, allowCustomSqlDatabase attribute must be set to true and the application needs to be granted unrestricted SqlClientPermission. Please check with your administrator if the application does not have this permission.";

	public const string Error_parsing_session_sqlConnectionString = "Error parsing <sessionState> sqlConnectionString attribute: {0}";

	public const string Error_parsing_sql_partition_resolver_string = "Error parsing the SQL connection string returned by an instance of the IPartitionResolver type '{0}': {1}";

	public const string Timeout_must_be_positive = "The argument to SetTimeout must be greater than 0.";

	public const string Cant_make_session_request = "Unable to make the session state request to the session state server. Please ensure that the ASP.NET State service is started and that the client and server ports are the same.  If the server is on a remote machine, please ensure that it accepts remote requests by checking the value of HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\aspnet_state\\Parameters\\AllowRemoteConnection.  If the server is on the local machine, and if the before mentioned registry value does not exist or is set to 0, then the state server connection string must use either 'localhost' or '127.0.0.1' as the server name.";

	public const string Cant_make_session_request_partition_resolver = "Unable to make the session state request to the session state server. The connection string (server='{1}', port='{2}') was returned by an instance of the IPartitionResolver type '{0}'. Please ensure that the ASP.NET State service is started and that the client and server ports are the same.  If the server is on a remote machine, please ensure that it accepts remote requests by checking the value of HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\aspnet_state\\Parameters\\AllowRemoteConnection.  If the server is on the local machine, and if the before mentioned registry value does not exist or is set to 0, then the state server connection string must use either 'localhost' or '127.0.0.1' as the server name.";

	public const string Need_v2_State_Server = "Unable to use session state server because this version of ASP.NET requires session state server version 2.0 or above.";

	public const string Need_v2_State_Server_partition_resolver = "Unable to use session state server because this version of ASP.NET requires session state server version 2.0 or above. The connection string (server='{1}', port='{2}') was returned by an instance of the IPartitionResolver type '{0}'.";

	public const string Cant_connect_sql_session_database = "Unable to connect to SQL Server session database.";

	public const string Cant_connect_sql_session_database_partition_resolver = "Unable to connect to SQL Server session database. The connection string (server='{1}', database='{2}') was returned by an instance of the IPartitionResolver type '{0}'.";

	public const string Login_failed_sql_session_database = "Failed to login to session state SQL server for user '{0}'.";

	public const string Bad_partition_resolver_connection_string = "Session state cannot connect to the server because a null connection string was returned by an instance of the IPartitionResolver type '{0}'.";

	public const string Bad_state_server_request = "Unable to make the session state request to the session state server. The session state server is running, but the request is not formatted correctly.";

	public const string Bad_state_server_request_partition_resolver = "Unable to make the session state request to the session state server. The session state server is running, but the request is not formatted correctly. The connection string (server='{1}', port='{2}') was returned by an instance of the IPartitionResolver type '{0}'.";

	public const string State_Server_detailed_error = "Unable to make the session state request to the session state server. Details: last phase='{0}', error code={1}, size of outgoing data={2}";

	public const string State_Server_detailed_error_phase0 = "Initialization";

	public const string State_Server_detailed_error_phase1 = "Connecting to the state server";

	public const string State_Server_detailed_error_phase2 = "Sending request to the state server";

	public const string State_Server_detailed_error_phase3 = "Reading response from the state server";

	public const string Error_parsing_state_server_partition_resolver_string = "Error parsing the state server connection string returned by an instance of the IPartitionResolver type '{0}'. The connection string must have the format tcpip=<server>:<port>, where <server> is either a valid IP address or a machine name using only ASCII characters, and <port> is an unsigned integer ranging from 0 to 65535.";

	public const string SessionIDManager_uninit = "SessionIDManager is not initialized. Call Initialize() method first.";

	public const string SessionIDManager_InitializeRequest_not_called = "ISessionIDManager.InitializeRequest has not been called for this request yet. In each request, please first call ISessionIDManager.InitializeRequest before calling other methods.";

	public const string Cant_save_session_id_because_response_was_flushed = "Session state has created a session id, but cannot save it because the response was already flushed by the application.";

	public const string Cant_save_session_id_because_id_is_invalid = "Cannot save the session id because it is invalid.  Session ID={0}";

	public const string Cant_serialize_session_state = "Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects, and as a result non-serializable objects or MarshalByRef objects are not permitted. The same restriction applies if similar serialization is done by the custom session state store in 'Custom' mode.";

	public const string Null_value_for_SessionStateItemCollection = "The SessionStateStoreData returned by ISessionStateStore has a null value for Items.";

	public const string Session_id_too_long = "The session ID is longer than the maximum limit of {0} characters. Session ID={1}";

	public const string Need_v2_SQL_Server = "Unable to use SQL Server because either ASP.NET version 2.0 Session State is not installed on the SQL server, or ASP.NET does not have permission to run the dbo.TempGetVersion stored procedure. If the ASP.NET Session State schema has not been installed, please install ASP.NET Session State SQL Server version 2.0 or above. If the schema has been installed, please grant execute permission on the dbo.TempGetVersion stored procedure to either the ASP.NET application pool identity, or the Sql Server user specified in the sqlConnectionString attribute.";

	public const string Need_v2_SQL_Server_partition_resolver = "Unable to use SQL Server because either ASP.NET version 2.0 Session State is not installed on the SQL server, or ASP.NET does not have permission to run the dbo.TempGetVersion stored procedure. If the ASP.NET Session State schema has not been installed, please install ASP.NET Session State SQL Server version 2.0 or above. If the schema has been installed, please grant execute permission on the dbo.TempGetVersion stored procedure to either the ASP.NET application pool identity, or the Sql Server user specified in the sqlConnectionString attribute. The connection string (server='{1}', database='{2}') was returned by an instance of the IPartitionResolver type '{0}'.";

	public const string Cant_have_multiple_session_module = "Another component has already added an HttpSessionState to the context. Please make sure only one session state module should be registered.";

	public const string Missing_session_custom_provider = "The custom session state store provider '{0}' is not found.";

	public const string Invalid_session_custom_provider = "The custom session state store provider name '{0}' is invalid.";

	public const string Invalid_session_state = "The session state information is invalid and might be corrupted.";

	public const string Invalid_cache_based_session_timeout = "For InProc and StateServer modes, the session timeout value cannot be larger than one year.";

	public const string Cant_use_partition_resolve = "Cannot use 'partitionResolver' unless the mode is 'StateServer' or 'SQLServer'.";

	public const string Previous_Page_Not_Authorized = "The current user is not allowed to access the previous page.";

	public const string Empty_path_has_no_directory = "Empty path has no directory.";

	public const string Path_must_be_rooted = "The virtual path '{0}' is not rooted.";

	public const string Cannot_exit_up_top_directory = "Cannot use a leading .. to exit above the top directory.";

	public const string Physical_path_not_allowed = "'{0}' is a physical path, but a virtual path was expected.";

	public const string Invalid_vpath = "'{0}' is not a valid virtual path.";

	public const string Cannot_access_AspCompat = "Cannot access ASP compatibility mode.";

	public const string Apartment_component_not_allowed = "The component '{0}' cannot be created.  Apartment threaded components can only be created on pages with an <%@ Page aspcompat=true %> page directive.";

	public const string Error_onpagestart = "An error was encountered while calling OnStartPage in ASP compatibility mode.";

	public const string Cannot_execute_transacted_code = "Cannot execute transacted code.";

	public const string Cannot_post_workitem = "Cannot post work item to thread pool.";

	public const string Cannot_call_ISAPI_functions = "Hosting platform does not support ISAPI functions.";

	public const string Bad_attachment = "Invalid mail attachment '{0}'.";

	public const string Wrong_SimpleWorkerRequest = "Invalid use of SimpleWorkerRequest constructor. Application path cannot be overridden in this context. Please use SimpleWorkerRequest constructor that does not override the application path.";

	public const string Atio2BadString = "Unable to convert two characters in the string '{0}' to a number starting at offset {1}.";

	public const string MakeMonthBadString = "Unable to convert characters in the string '{0}' to a month starting at offset {1}.";

	public const string UtilParseDateTimeBad = "'{0}' was not of the correct format. Expected a string to be of the form 'Thursday, 10-Jun-93 01:29:59 GMT', 'Thu, 10 Jan 1993 01:29:59 GMT', or 'Wed Jun 09 01:29:59 1993 GMT'.";

	public const string SmtpMail_not_supported_on_Win7_and_higher = "System.Web.Mail.SmtpMail is not supported on this version of Windows.  The recommended alternative is System.Net.Mail.SmtpClient.";

	public const string Illegal_special_dir = "The file '{0}' is in the special directory '{1}', which is not allowed.";

	public const string Precomp_stub_file = "This is a marker file generated by the precompilation tool, and should not be deleted!";

	public const string Already_precomp = "This application is already precompiled.";

	public const string Cant_delete_dir = "The target directory could not be deleted. Please delete it manually, or choose a different target.";

	public const string Dir_not_empty = "The target directory is not empty. Please delete it manually, or choose a di

Room Architect Tool_Data/Managed/System.Web.Services.dll

Decompiled 3 months ago
using System;
using System.CodeDom;
using System.CodeDom.Compiler;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Configuration;
using System.Data;
using System.Data.Design;
using System.Diagnostics;
using System.DirectoryServices;
using System.EnterpriseServices;
using System.Globalization;
using System.IO;
using System.Net;
using System.Net.Cache;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Security;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Security.Permissions;
using System.Security.Policy;
using System.Security.Principal;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Web.Caching;
using System.Web.Configuration;
using System.Web.Hosting;
using System.Web.Services.Configuration;
using System.Web.Services.Description;
using System.Web.Services.Diagnostics;
using System.Web.Services.Discovery;
using System.Web.Services.Protocols;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.Util;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;
using System.Xml.Serialization.Advanced;
using Microsoft.CSharp;
using Unity;

[assembly: CompilationRelaxations(CompilationRelaxations.NoStringInterning)]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright("(c) Various Mono authors")]
[assembly: SatelliteContractVersion("4.0.0.0")]
[assembly: AssemblyInformationalVersion("4.6.57.0")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: ComVisible(false)]
[assembly: AllowPartiallyTrustedCallers]
[assembly: AssemblyDescription("System.Web.Services.dll")]
[assembly: AssemblyTitle("System.Web.Services.dll")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: CLSCompliant(true)]
[assembly: AssemblyFileVersion("4.6.57.0")]
[assembly: AssemblyCompany("Mono development team")]
[assembly: AssemblyDefaultAlias("System.Web.Services.dll")]
[assembly: AssemblyDelaySign(true)]
[assembly: AssemblyVersion("4.0.0.0")]
internal static class Consts
{
	public const string MonoVersion = "5.11.0.0";

	public const string MonoCompany = "Mono development team";

	public const string MonoProduct = "Mono Common Language Infrastructure";

	public const string MonoCopyright = "(c) Various Mono authors";

	public const int MonoCorlibVersion = 1051100001;

	public const string FxVersion = "4.0.0.0";

	public const string FxFileVersion = "4.6.57.0";

	public const string EnvironmentVersion = "4.0.30319.42000";

	public const string VsVersion = "0.0.0.0";

	public const string VsFileVersion = "11.0.0.0";

	private const string PublicKeyToken = "b77a5c561934e089";

	public const string AssemblyI18N = "I18N, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMicrosoft_JScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMono_Http = "Mono.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Posix = "Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Security = "Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Messaging_RabbitMQ = "Mono.Messaging.RabbitMQ, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyCorlib = "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Data = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Design = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing_Design = "System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Messaging = "System.Messaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Security = "System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Web = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Core = "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string WindowsBase_3_0 = "WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
namespace System
{
	[Serializable]
	internal class InvariantComparer : IComparer
	{
		private CompareInfo m_compareInfo;

		internal static readonly System.InvariantComparer Default = new System.InvariantComparer();

		internal InvariantComparer()
		{
			m_compareInfo = CultureInfo.InvariantCulture.CompareInfo;
		}

		public int Compare(object a, object b)
		{
			string text = a as string;
			string text2 = b as string;
			if (text != null && text2 != null)
			{
				return m_compareInfo.Compare(text, text2);
			}
			return Comparer.Default.Compare(a, b);
		}
	}
}
namespace System.Configuration
{
	[ConfigurationPermission(SecurityAction.Assert, Unrestricted = true)]
	internal static class PrivilegedConfigurationManager
	{
		internal static ConnectionStringSettingsCollection ConnectionStrings => ConfigurationManager.ConnectionStrings;

		internal static object GetSection(string sectionName)
		{
			return ConfigurationManager.GetSection(sectionName);
		}
	}
}
namespace System.Web.Services
{
	internal static class PartialTrustHelpers
	{
		[SecurityCritical]
		private static bool isInPartialTrustOutsideAspNet;

		[SecurityCritical]
		private static bool isInPartialTrustOutsideAspNetInitialized;

		[SecuritySafeCritical]
		internal static void FailIfInPartialTrustOutsideAspNet()
		{
			if (!isInPartialTrustOutsideAspNetInitialized)
			{
				isInPartialTrustOutsideAspNet = !AppDomain.CurrentDomain.IsFullyTrusted && !HostingEnvironment.IsHosted;
				isInPartialTrustOutsideAspNetInitialized = true;
			}
			if (isInPartialTrustOutsideAspNet)
			{
				throw new SecurityException(Res.GetString("CannotRunInPartialTrustOutsideAspNet"));
			}
		}
	}
	internal class Soap
	{
		internal class Attribute
		{
			internal const string MustUnderstand = "mustUnderstand";

			internal const string Actor = "actor";

			internal const string EncodingStyle = "encodingStyle";

			internal const string Lang = "lang";

			internal const string ConformsTo = "conformsTo";

			private Attribute()
			{
			}
		}

		internal class Element
		{
			internal const string Envelope = "Envelope";

			internal const string Header = "Header";

			internal const string Body = "Body";

			internal const string Fault = "Fault";

			internal const string FaultActor = "faultactor";

			internal const string FaultCode = "faultcode";

			internal const string FaultDetail = "detail";

			internal const string FaultString = "faultstring";

			internal const string StackTrace = "StackTrace";

			internal const string Message = "Message";

			internal const string Claim = "Claim";

			private Element()
			{
			}
		}

		internal class Code
		{
			internal const string Server = "Server";

			internal const string VersionMismatch = "VersionMismatch";

			internal const string MustUnderstand = "MustUnderstand";

			internal const string Client = "Client";

			private Code()
			{
			}
		}

		internal const string XmlNamespace = "http://www.w3.org/XML/1998/namespace";

		internal const string Encoding = "http://schemas.xmlsoap.org/soap/encoding/";

		internal const string Namespace = "http://schemas.xmlsoap.org/soap/envelope/";

		internal const string ConformanceClaim = "http://ws-i.org/schemas/conformanceClaim/";

		internal const string BasicProfile1_1 = "http://ws-i.org/profiles/basic/1.1";

		internal const string Action = "SOAPAction";

		internal const string ArrayType = "Array";

		internal const string Prefix = "soap";

		internal const string ClaimPrefix = "wsi";

		internal const string DimeContentType = "application/dime";

		internal const string SoapContentType = "text/xml";

		private Soap()
		{
		}
	}
	internal sealed class Soap12
	{
		internal class Attribute
		{
			internal const string UpgradeEnvelopeQname = "qname";

			internal const string Role = "role";

			internal const string Relay = "relay";

			private Attribute()
			{
			}
		}

		internal sealed class Element
		{
			internal const string Upgrade = "Upgrade";

			internal const string UpgradeEnvelope = "SupportedEnvelope";

			internal const string FaultRole = "Role";

			internal const string FaultReason = "Reason";

			internal const string FaultReasonText = "Text";

			internal const string FaultCode = "Code";

			internal const string FaultNode = "Node";

			internal const string FaultCodeValue = "Value";

			internal const string FaultSubcode = "Subcode";

			internal const string FaultDetail = "Detail";

			private Element()
			{
			}
		}

		internal sealed class Code
		{
			internal const string VersionMismatch = "VersionMismatch";

			internal const string MustUnderstand = "MustUnderstand";

			internal const string DataEncodingUnknown = "DataEncodingUnknown";

			internal const string Sender = "Sender";

			internal const string Receiver = "Receiver";

			internal const string RpcProcedureNotPresentSubcode = "ProcedureNotPresent";

			internal const string RpcBadArgumentsSubcode = "BadArguments";

			internal const string EncodingMissingIDFaultSubcode = "MissingID";

			internal const string EncodingUntypedValueFaultSubcode = "UntypedValue";

			private Code()
			{
			}
		}

		internal const string Namespace = "http://www.w3.org/2003/05/soap-envelope";

		internal const string Encoding = "http://www.w3.org/2003/05/soap-encoding";

		internal const string RpcNamespace = "http://www.w3.org/2003/05/soap-rpc";

		internal const string Prefix = "soap12";

		private Soap12()
		{
		}
	}
	[AttributeUsage(AttributeTargets.Method)]
	public sealed class WebMethodAttribute : Attribute
	{
		private int transactionOption;

		private bool enableSession;

		private int cacheDuration;

		private bool bufferResponse;

		private string description;

		private string messageName;

		private bool transactionOptionSpecified;

		private bool enableSessionSpecified;

		private bool cacheDurationSpecified;

		private bool bufferResponseSpecified;

		private bool descriptionSpecified;

		private bool messageNameSpecified;

		public string Description
		{
			get
			{
				if (description != null)
				{
					return description;
				}
				return string.Empty;
			}
			set
			{
				description = value;
				descriptionSpecified = true;
			}
		}

		internal bool DescriptionSpecified => descriptionSpecified;

		public bool EnableSession
		{
			get
			{
				return enableSession;
			}
			set
			{
				enableSession = value;
				enableSessionSpecified = true;
			}
		}

		internal bool EnableSessionSpecified => enableSessionSpecified;

		public int CacheDuration
		{
			get
			{
				return cacheDuration;
			}
			set
			{
				cacheDuration = value;
				cacheDurationSpecified = true;
			}
		}

		internal bool CacheDurationSpecified => cacheDurationSpecified;

		public bool BufferResponse
		{
			get
			{
				return bufferResponse;
			}
			set
			{
				bufferResponse = value;
				bufferResponseSpecified = true;
			}
		}

		internal bool BufferResponseSpecified => bufferResponseSpecified;

		public TransactionOption TransactionOption
		{
			get
			{
				return (TransactionOption)transactionOption;
			}
			set
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Expected I4, but got Unknown
				transactionOption = (int)value;
				transactionOptionSpecified = true;
			}
		}

		internal bool TransactionOptionSpecified => transactionOptionSpecified;

		internal bool TransactionEnabled => transactionOption != 0;

		public string MessageName
		{
			get
			{
				if (messageName != null)
				{
					return messageName;
				}
				return string.Empty;
			}
			set
			{
				messageName = value;
				messageNameSpecified = true;
			}
		}

		internal bool MessageNameSpecified => messageNameSpecified;

		public WebMethodAttribute()
		{
			enableSession = false;
			transactionOption = 0;
			cacheDuration = 0;
			bufferResponse = true;
		}

		public WebMethodAttribute(bool enableSession)
			: this()
		{
			EnableSession = enableSession;
		}

		public WebMethodAttribute(bool enableSession, TransactionOption transactionOption)
			: this()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected I4, but got Unknown
			EnableSession = enableSession;
			this.transactionOption = (int)transactionOption;
			transactionOptionSpecified = true;
		}

		public WebMethodAttribute(bool enableSession, TransactionOption transactionOption, int cacheDuration)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected I4, but got Unknown
			EnableSession = enableSession;
			this.transactionOption = (int)transactionOption;
			transactionOptionSpecified = true;
			CacheDuration = cacheDuration;
			BufferResponse = true;
		}

		public WebMethodAttribute(bool enableSession, TransactionOption transactionOption, int cacheDuration, bool bufferResponse)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected I4, but got Unknown
			EnableSession = enableSession;
			this.transactionOption = (int)transactionOption;
			transactionOptionSpecified = true;
			CacheDuration = cacheDuration;
			BufferResponse = bufferResponse;
		}
	}
	internal class WebMethodReflector
	{
		private WebMethodReflector()
		{
		}

		internal static WebMethodAttribute GetAttribute(MethodInfo implementation, MethodInfo declaration)
		{
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			WebMethodAttribute webMethodAttribute = null;
			WebMethodAttribute webMethodAttribute2 = null;
			object[] customAttributes;
			if (declaration != null)
			{
				customAttributes = declaration.GetCustomAttributes(typeof(WebMethodAttribute), inherit: false);
				if (customAttributes.Length != 0)
				{
					webMethodAttribute = (WebMethodAttribute)customAttributes[0];
				}
			}
			customAttributes = implementation.GetCustomAttributes(typeof(WebMethodAttribute), inherit: false);
			if (customAttributes.Length != 0)
			{
				webMethodAttribute2 = (WebMethodAttribute)customAttributes[0];
			}
			if (webMethodAttribute == null)
			{
				return webMethodAttribute2;
			}
			if (webMethodAttribute2 == null)
			{
				return webMethodAttribute;
			}
			if (webMethodAttribute2.MessageNameSpecified)
			{
				throw new InvalidOperationException(Res.GetString("ContractOverride", implementation.Name, implementation.DeclaringType.FullName, declaration.DeclaringType.FullName, declaration.ToString(), "WebMethod.MessageName"));
			}
			return new WebMethodAttribute(webMethodAttribute2.EnableSessionSpecified ? webMethodAttribute2.EnableSession : webMethodAttribute.EnableSession)
			{
				TransactionOption = (webMethodAttribute2.TransactionOptionSpecified ? webMethodAttribute2.TransactionOption : webMethodAttribute.TransactionOption),
				CacheDuration = (webMethodAttribute2.CacheDurationSpecified ? webMethodAttribute2.CacheDuration : webMethodAttribute.CacheDuration),
				BufferResponse = (webMethodAttribute2.BufferResponseSpecified ? webMethodAttribute2.BufferResponse : webMethodAttribute.BufferResponse),
				Description = (webMethodAttribute2.DescriptionSpecified ? webMethodAttribute2.Description : webMethodAttribute.Description)
			};
		}

		internal static MethodInfo FindInterfaceMethodInfo(Type type, string signature)
		{
			Type[] interfaces = type.GetInterfaces();
			foreach (Type interfaceType in interfaces)
			{
				InterfaceMapping interfaceMap = type.GetInterfaceMap(interfaceType);
				MethodInfo[] targetMethods = interfaceMap.TargetMethods;
				for (int j = 0; j < targetMethods.Length; j++)
				{
					if (targetMethods[j].ToString() == signature)
					{
						return interfaceMap.InterfaceMethods[j];
					}
				}
			}
			return null;
		}

		internal static LogicalMethodInfo[] GetMethods(Type type)
		{
			if (type.IsInterface)
			{
				throw new InvalidOperationException(Res.GetString("NeedConcreteType", type.FullName));
			}
			ArrayList arrayList = new ArrayList();
			MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
			Hashtable hashtable = new Hashtable();
			Hashtable hashtable2 = new Hashtable();
			for (int i = 0; i < methods.Length; i++)
			{
				Type declaringType = methods[i].DeclaringType;
				if (declaringType == typeof(object) || declaringType == typeof(WebService))
				{
					continue;
				}
				string text = methods[i].ToString();
				MethodInfo methodInfo = FindInterfaceMethodInfo(declaringType, text);
				WebServiceBindingAttribute webServiceBindingAttribute = null;
				if (methodInfo != null)
				{
					object[] customAttributes = methodInfo.DeclaringType.GetCustomAttributes(typeof(WebServiceBindingAttribute), inherit: false);
					if (customAttributes.Length != 0)
					{
						if (customAttributes.Length > 1)
						{
							throw new ArgumentException(Res.GetString("OnlyOneWebServiceBindingAttributeMayBeSpecified1", methodInfo.DeclaringType.FullName), "type");
						}
						webServiceBindingAttribute = (WebServiceBindingAttribute)customAttributes[0];
						if (webServiceBindingAttribute.Name == null || webServiceBindingAttribute.Name.Length == 0)
						{
							webServiceBindingAttribute.Name = methodInfo.DeclaringType.Name;
						}
					}
					else
					{
						methodInfo = null;
					}
				}
				else if (!methods[i].IsPublic)
				{
					continue;
				}
				WebMethodAttribute attribute = GetAttribute(methods[i], methodInfo);
				if (attribute != null)
				{
					WebMethod value = new WebMethod(methodInfo, webServiceBindingAttribute, attribute);
					hashtable2.Add(methods[i], value);
					MethodInfo methodInfo2 = (MethodInfo)hashtable[text];
					if (methodInfo2 == null)
					{
						hashtable.Add(text, methods[i]);
						arrayList.Add(methods[i]);
					}
					else if (methodInfo2.DeclaringType.IsAssignableFrom(methods[i].DeclaringType))
					{
						hashtable[text] = methods[i];
						arrayList[arrayList.IndexOf(methodInfo2)] = methods[i];
					}
				}
			}
			return LogicalMethodInfo.Create((MethodInfo[])arrayList.ToArray(typeof(MethodInfo)), (LogicalMethodTypes)3, hashtable2);
		}

		internal static void IncludeTypes(LogicalMethodInfo[] methods, XmlReflectionImporter importer)
		{
			for (int i = 0; i < methods.Length; i++)
			{
				IncludeTypes(methods[i], importer);
			}
		}

		internal static void IncludeTypes(LogicalMethodInfo method, XmlReflectionImporter importer)
		{
			if (method.Declaration != null)
			{
				importer.IncludeTypes(method.Declaration.DeclaringType);
				importer.IncludeTypes(method.Declaration);
			}
			importer.IncludeTypes(method.DeclaringType);
			importer.IncludeTypes(method.CustomAttributeProvider);
		}
	}
	internal class WebMethod
	{
		internal MethodInfo declaration;

		internal WebServiceBindingAttribute binding;

		internal WebMethodAttribute attribute;

		internal WebMethod(MethodInfo declaration, WebServiceBindingAttribute binding, WebMethodAttribute attribute)
		{
			this.declaration = declaration;
			this.binding = binding;
			this.attribute = attribute;
		}
	}
	public class WebService : MarshalByValueComponent
	{
		private HttpContext context;

		internal static readonly string SoapVersionContextSlot = "WebServiceSoapVersion";

		[Browsable(false)]
		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		[Description("The ASP.NET application object for the current request.")]
		public HttpApplicationState Application => Context.Application;

		[Browsable(false)]
		[WebServicesDescription("WebServiceContext")]
		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		public HttpContext Context
		{
			get
			{
				PartialTrustHelpers.FailIfInPartialTrustOutsideAspNet();
				if (context == null)
				{
					context = HttpContext.Current;
				}
				if (context == null)
				{
					throw new InvalidOperationException(Res.GetString("WebMissingHelpContext"));
				}
				return context;
			}
		}

		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		[WebServicesDescription("WebServiceSession")]
		[Browsable(false)]
		public HttpSessionState Session => Context.Session;

		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		[Browsable(false)]
		[WebServicesDescription("WebServiceServer")]
		public HttpServerUtility Server => Context.Server;

		[Browsable(false)]
		[WebServicesDescription("WebServiceUser")]
		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		public IPrincipal User => Context.User;

		[ComVisible(false)]
		[WebServicesDescription("WebServiceSoapVersion")]
		[Browsable(false)]
		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		public SoapProtocolVersion SoapVersion
		{
			get
			{
				object obj = Context.Items[SoapVersionContextSlot];
				if (obj != null && obj is SoapProtocolVersion)
				{
					return (SoapProtocolVersion)obj;
				}
				return SoapProtocolVersion.Default;
			}
		}

		internal void SetContext(HttpContext context)
		{
			this.context = context;
		}
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface)]
	public sealed class WebServiceAttribute : Attribute
	{
		private string description;

		private string ns = "http://tempuri.org/";

		private string name;

		public const string DefaultNamespace = "http://tempuri.org/";

		public string Description
		{
			get
			{
				if (description != null)
				{
					return description;
				}
				return string.Empty;
			}
			set
			{
				description = value;
			}
		}

		public string Namespace
		{
			get
			{
				return ns;
			}
			set
			{
				ns = value;
			}
		}

		public string Name
		{
			get
			{
				if (name != null)
				{
					return name;
				}
				return string.Empty;
			}
			set
			{
				name = value;
			}
		}
	}
	internal class WebServiceReflector
	{
		private WebServiceReflector()
		{
		}

		internal static WebServiceAttribute GetAttribute(Type type)
		{
			object[] customAttributes = type.GetCustomAttributes(typeof(WebServiceAttribute), inherit: false);
			if (customAttributes.Length == 0)
			{
				return new WebServiceAttribute();
			}
			return (WebServiceAttribute)customAttributes[0];
		}

		internal static WebServiceAttribute GetAttribute(LogicalMethodInfo[] methodInfos)
		{
			if (methodInfos.Length == 0)
			{
				return new WebServiceAttribute();
			}
			return GetAttribute(GetMostDerivedType(methodInfos));
		}

		internal static Type GetMostDerivedType(LogicalMethodInfo[] methodInfos)
		{
			if (methodInfos.Length == 0)
			{
				return null;
			}
			Type type = methodInfos[0].DeclaringType;
			for (int i = 1; i < methodInfos.Length; i++)
			{
				Type declaringType = methodInfos[i].DeclaringType;
				if (declaringType.IsSubclassOf(type))
				{
					type = declaringType;
				}
			}
			return type;
		}
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple = true)]
	public sealed class WebServiceBindingAttribute : Attribute
	{
		private string name;

		private string ns;

		private string location;

		private WsiProfiles claims;

		private bool emitClaims;

		public WsiProfiles ConformsTo
		{
			get
			{
				return claims;
			}
			set
			{
				claims = value;
			}
		}

		public bool EmitConformanceClaims
		{
			get
			{
				return emitClaims;
			}
			set
			{
				emitClaims = value;
			}
		}

		public string Location
		{
			get
			{
				if (location != null)
				{
					return location;
				}
				return string.Empty;
			}
			set
			{
				location = value;
			}
		}

		public string Name
		{
			get
			{
				if (name != null)
				{
					return name;
				}
				return string.Empty;
			}
			set
			{
				name = value;
			}
		}

		public string Namespace
		{
			get
			{
				if (ns != null)
				{
					return ns;
				}
				return string.Empty;
			}
			set
			{
				ns = value;
			}
		}

		public WebServiceBindingAttribute()
		{
		}

		public WebServiceBindingAttribute(string name)
		{
			this.name = name;
		}

		public WebServiceBindingAttribute(string name, string ns)
		{
			this.name = name;
			this.ns = ns;
		}

		public WebServiceBindingAttribute(string name, string ns, string location)
		{
			this.name = name;
			this.ns = ns;
			this.location = location;
		}
	}
	internal class WebServiceBindingReflector
	{
		private WebServiceBindingReflector()
		{
		}

		internal static WebServiceBindingAttribute GetAttribute(Type type)
		{
			while (type != null)
			{
				object[] customAttributes = type.GetCustomAttributes(typeof(WebServiceBindingAttribute), inherit: false);
				if (customAttributes.Length != 0)
				{
					if (customAttributes.Length > 1)
					{
						throw new ArgumentException(Res.GetString("OnlyOneWebServiceBindingAttributeMayBeSpecified1", type.FullName), "type");
					}
					return (WebServiceBindingAttribute)customAttributes[0];
				}
				type = type.BaseType;
			}
			return null;
		}

		internal static WebServiceBindingAttribute GetAttribute(LogicalMethodInfo methodInfo, string binding)
		{
			if (methodInfo.Binding != null)
			{
				if (binding.Length > 0 && methodInfo.Binding.Name != binding)
				{
					throw new InvalidOperationException(Res.GetString("WebInvalidBindingName", binding, methodInfo.Binding.Name));
				}
				return methodInfo.Binding;
			}
			Type declaringType = methodInfo.DeclaringType;
			object[] customAttributes = declaringType.GetCustomAttributes(typeof(WebServiceBindingAttribute), inherit: false);
			WebServiceBindingAttribute webServiceBindingAttribute = null;
			object[] array = customAttributes;
			for (int i = 0; i < array.Length; i++)
			{
				WebServiceBindingAttribute webServiceBindingAttribute2 = (WebServiceBindingAttribute)array[i];
				if (webServiceBindingAttribute2.Name == binding)
				{
					if (webServiceBindingAttribute != null)
					{
						throw new ArgumentException(Res.GetString("MultipleBindingsWithSameName2", declaringType.FullName, binding, "methodInfo"));
					}
					webServiceBindingAttribute = webServiceBindingAttribute2;
				}
			}
			if (webServiceBindingAttribute == null && binding != null && binding.Length > 0)
			{
				throw new ArgumentException(Res.GetString("TypeIsMissingWebServiceBindingAttributeThat2", declaringType.FullName, binding), "methodInfo");
			}
			return webServiceBindingAttribute;
		}
	}
	[AttributeUsage(AttributeTargets.All)]
	internal class WebServicesDescriptionAttribute : DescriptionAttribute
	{
		private bool replaced;

		public override string Description
		{
			get
			{
				if (!replaced)
				{
					replaced = true;
					base.DescriptionValue = Res.GetString(base.Description);
				}
				return base.Description;
			}
		}

		internal WebServicesDescriptionAttribute(string description)
			: base(description)
		{
		}
	}
	[Flags]
	public enum WsiProfiles
	{
		None = 0,
		BasicProfile1_1 = 1
	}
	internal static class Res
	{
		public const string AsyncDuplicateUserState = "AsyncDuplicateUserState";

		public const string BPConformanceHeaderFault = "BPConformanceHeaderFault";

		public const string Binding = "Binding";

		public const string BindingInvalidAttribute = "BindingInvalidAttribute";

		public const string BindingMissingAttribute = "BindingMissingAttribute";

		public const string BindingMultipleParts = "BindingMultipleParts";

		public const string BothAndUseTheMessageNameUseTheMessageName3 = "BothAndUseTheMessageNameUseTheMessageName3";

		public const string CanTCallTheEndMethodOfAnAsyncCallMoreThan = "CanTCallTheEndMethodOfAnAsyncCallMoreThan";

		public const string CanTSpecifyElementOnEncodedMessagePartsPart = "CanTSpecifyElementOnEncodedMessagePartsPart";

		public const string CannotRunInPartialTrustOutsideAspNet = "CannotRunInPartialTrustOutsideAspNet";

		public const string ClientProtocolAllowAutoRedirect = "ClientProtocolAllowAutoRedirect";

		public const string ClientProtocolClientCertificates = "ClientProtocolClientCertificates";

		public const string ClientProtocolCookieContainer = "ClientProtocolCookieContainer";

		public const string ClientProtocolEnableDecompression = "ClientProtocolEnableDecompression";

		public const string ClientProtocolEncoding = "ClientProtocolEncoding";

		public const string ClientProtocolPreAuthenticate = "ClientProtocolPreAuthenticate";

		public const string ClientProtocolSoapVersion = "ClientProtocolSoapVersion";

		public const string ClientProtocolTimeout = "ClientProtocolTimeout";

		public const string ClientProtocolUrl = "ClientProtocolUrl";

		public const string ClientProtocolUserAgent = "ClientProtocolUserAgent";

		public const string CodeGenSupportParameterAttributes = "CodeGenSupportParameterAttributes";

		public const string CodeGenSupportReferenceParameters = "CodeGenSupportReferenceParameters";

		public const string CodeGenSupportReturnTypeAttributes = "CodeGenSupportReturnTypeAttributes";

		public const string CodeRemarks = "CodeRemarks";

		public const string CodegenWarningDetails = "CodegenWarningDetails";

		public const string ConfigKeyNotFoundInElementCollection = "ConfigKeyNotFoundInElementCollection";

		public const string ConfigKeysDoNotMatch = "ConfigKeysDoNotMatch";

		public const string ContractOverride = "ContractOverride";

		public const string Description = "Description";

		public const string DiscoveryIsNotPossibleBecauseTypeIsMissing1 = "DiscoveryIsNotPossibleBecauseTypeIsMissing1";

		public const string DuplicateInputOutputNames0 = "DuplicateInputOutputNames0";

		public const string EachMessagePartInAUseLiteralMessageMustSpecify0 = "EachMessagePartInAUseLiteralMessageMustSpecify0";

		public const string EachMessagePartInAnUseEncodedMessageMustSpecify0 = "EachMessagePartInAnUseEncodedMessageMustSpecify0";

		public const string EachMessagePartInRpcUseLiteralMessageMustSpecify0 = "EachMessagePartInRpcUseLiteralMessageMustSpecify0";

		public const string Element = "Element";

		public const string ElementTypeMustBeObjectOrSoapExtensionOrSoapReflectedException = "ElementTypeMustBeObjectOrSoapExtensionOrSoapReflectedException";

		public const string ElementTypeMustBeObjectOrSoapReflectedException = "ElementTypeMustBeObjectOrSoapReflectedException";

		public const string FailedToHandleRequest0 = "FailedToHandleRequest0";

		public const string Fault = "Fault";

		public const string FaultBinding = "FaultBinding";

		public const string HeaderFault = "HeaderFault";

		public const string HelpGeneratorInternalError = "HelpGeneratorInternalError";

		public const string IfAppSettingBaseUrlArgumentIsSpecifiedThen0 = "IfAppSettingBaseUrlArgumentIsSpecifiedThen0";

		public const string InitFailed = "InitFailed";

		public const string InputElement = "InputElement";

		public const string Invalid_priority_group_value = "Invalid_priority_group_value";

		public const string MessageHasNoParts1 = "MessageHasNoParts1";

		public const string Missing2 = "Missing2";

		public const string MissingBinding0 = "MissingBinding0";

		public const string MissingHttpOperationElement0 = "MissingHttpOperationElement0";

		public const string MissingInputBinding0 = "MissingInputBinding0";

		public const string MissingMatchElement0 = "MissingMatchElement0";

		public const string MissingMessage2 = "MissingMessage2";

		public const string MissingMessagePartForMessageFromNamespace3 = "MissingMessagePartForMessageFromNamespace3";

		public const string MissingOutputBinding0 = "MissingOutputBinding0";

		public const string MissingSoapBodyInputBinding0 = "MissingSoapBodyInputBinding0";

		public const string MissingSoapBodyOutputBinding0 = "MissingSoapBodyOutputBinding0";

		public const string MissingSoapOperationBinding0 = "MissingSoapOperationBinding0";

		public const string MultipleBindingsWithSameName2 = "MultipleBindingsWithSameName2";

		public const string NeedConcreteType = "NeedConcreteType";

		public const string NoInputHTTPFormatsWereRecognized0 = "NoInputHTTPFormatsWereRecognized0";

		public const string NoInputMIMEFormatsWereRecognized0 = "NoInputMIMEFormatsWereRecognized0";

		public const string NoMethodsWereFoundInTheWSDLForThisProtocol = "NoMethodsWereFoundInTheWSDLForThisProtocol";

		public const string NoOutputMIMEFormatsWereRecognized0 = "NoOutputMIMEFormatsWereRecognized0";

		public const string NotificationIsNotSupported0 = "NotificationIsNotSupported0";

		public const string OneWayIsNotSupported0 = "OneWayIsNotSupported0";

		public const string OnlyOneWebServiceBindingAttributeMayBeSpecified1 = "OnlyOneWebServiceBindingAttributeMayBeSpecified1";

		public const string OnlyOperationInputOrOperationOutputTypes = "OnlyOperationInputOrOperationOutputTypes";

		public const string OnlyXmlElementsOrTypesDerivingFromServiceDescriptionFormatExtension0 = "OnlyXmlElementsOrTypesDerivingFromServiceDescriptionFormatExtension0";

		public const string Operation = "Operation";

		public const string OperationBinding = "OperationBinding";

		public const string OperationFlowNotification = "OperationFlowNotification";

		public const string OperationFlowSolicitResponse = "OperationFlowSolicitResponse";

		public const string OperationMissingBinding = "OperationMissingBinding";

		public const string OperationOverload = "OperationOverload";

		public const string OutputElement = "OutputElement";

		public const string Part = "Part";

		public const string Port = "Port";

		public const string PortTypeOperationMissing = "PortTypeOperationMissing";

		public const string ProtocolDoesNotAsyncSerialize = "ProtocolDoesNotAsyncSerialize";

		public const string ProtocolWithNameIsNotRecognized1 = "ProtocolWithNameIsNotRecognized1";

		public const string RequestResponseIsNotSupported0 = "RequestResponseIsNotSupported0";

		public const string RequiredXmlFormatExtensionAttributeIsMissing1 = "RequiredXmlFormatExtensionAttributeIsMissing1";

		public const string Rxxxx = "Rxxxx";

		public const string SchemaSyntaxErrorDetails = "SchemaSyntaxErrorDetails";

		public const string SchemaValidationError = "SchemaValidationError";

		public const string SchemaValidationWarning = "SchemaValidationWarning";

		public const string ServiceDescriptionWasNotFound0 = "ServiceDescriptionWasNotFound0";

		public const string SolicitResponseIsNotSupported0 = "SolicitResponseIsNotSupported0";

		public const string SpecifyingATypeForUseLiteralMessagesIs0 = "SpecifyingATypeForUseLiteralMessagesIs0";

		public const string SpecifyingATypeForUseLiteralMessagesIsAny = "SpecifyingATypeForUseLiteralMessagesIsAny";

		public const string SpecifyingAnElementForUseEncodedMessageParts0 = "SpecifyingAnElementForUseEncodedMessageParts0";

		public const string StackTraceEnd = "StackTraceEnd";

		public const string StreamDoesNotRead = "StreamDoesNotRead";

		public const string StreamDoesNotSeek = "StreamDoesNotSeek";

		public const string TheBinding0FromNamespace1WasIgnored2 = "TheBinding0FromNamespace1WasIgnored2";

		public const string TheBindingNamedFromNamespaceWasNotFoundIn3 = "TheBindingNamedFromNamespaceWasNotFoundIn3";

		public const string TheDocumentWasNotRecognizedAsAKnownDocumentType = "TheDocumentWasNotRecognizedAsAKnownDocumentType";

		public const string TheDocumentWasUnderstoodButContainsErrors = "TheDocumentWasUnderstoodButContainsErrors";

		public const string TheEncodingIsNotSupported1 = "TheEncodingIsNotSupported1";

		public const string TheHTMLDocumentDoesNotContainDiscoveryInformation = "TheHTMLDocumentDoesNotContainDiscoveryInformation";

		public const string TheMethodDoesNotHaveARequestElementEither1 = "TheMethodDoesNotHaveARequestElementEither1";

		public const string TheMethodsAndUseTheSameRequestElementAndSoapActionXmlns6 = "TheMethodsAndUseTheSameRequestElementAndSoapActionXmlns6";

		public const string TheMethodsAndUseTheSameRequestElementXmlns4 = "TheMethodsAndUseTheSameRequestElementXmlns4";

		public const string TheMethodsAndUseTheSameSoapActionWhenTheService3 = "TheMethodsAndUseTheSameSoapActionWhenTheService3";

		public const string TheOperation0FromNamespace1WasIgnored2 = "TheOperation0FromNamespace1WasIgnored2";

		public const string TheOperationBinding0FromNamespace1WasIgnored = "TheOperationBinding0FromNamespace1WasIgnored";

		public const string TheOperationBindingFromNamespaceHadInvalid3 = "TheOperationBindingFromNamespaceHadInvalid3";

		public const string TheOperationFromNamespaceHadInvalidSyntax3 = "TheOperationFromNamespaceHadInvalidSyntax3";

		public const string TheRequestElementXmlnsWasNotRecognized2 = "TheRequestElementXmlnsWasNotRecognized2";

		public const string TheRootElementForTheRequestCouldNotBeDetermined0 = "TheRootElementForTheRequestCouldNotBeDetermined0";

		public const string TheSchemaDocumentContainsLinksThatCouldNotBeResolved = "TheSchemaDocumentContainsLinksThatCouldNotBeResolved";

		public const string TheSyntaxOfTypeMayNotBeExtended1 = "TheSyntaxOfTypeMayNotBeExtended1";

		public const string TheWSDLDocumentContainsLinksThatCouldNotBeResolved = "TheWSDLDocumentContainsLinksThatCouldNotBeResolved";

		public const string ThereIsNoSoapTransportImporterThatUnderstands1 = "ThereIsNoSoapTransportImporterThatUnderstands1";

		public const string ThereWasAnErrorDownloading0 = "ThereWasAnErrorDownloading0";

		public const string ThereWasAnErrorDuringAsyncProcessing = "ThereWasAnErrorDuringAsyncProcessing";

		public const string TraceCallEnter = "TraceCallEnter";

		public const string TraceCallEnterDetails = "TraceCallEnterDetails";

		public const string TraceCallExit = "TraceCallExit";

		public const string TraceCreateSerializer = "TraceCreateSerializer";

		public const string TraceExceptionCought = "TraceExceptionCought";

		public const string TraceExceptionDetails = "TraceExceptionDetails";

		public const string TraceExceptionIgnored = "TraceExceptionIgnored";

		public const string TraceExceptionThrown = "TraceExceptionThrown";

		public const string TracePostWorkItemIn = "TracePostWorkItemIn";

		public const string TracePostWorkItemOut = "TracePostWorkItemOut";

		public const string TraceReadHeaders = "TraceReadHeaders";

		public const string TraceReadRequest = "TraceReadRequest";

		public const string TraceReadResponse = "TraceReadResponse";

		public const string TraceUrl = "TraceUrl";

		public const string TraceUrlReferrer = "TraceUrlReferrer";

		public const string TraceUserHostAddress = "TraceUserHostAddress";

		public const string TraceUserHostName = "TraceUserHostName";

		public const string TraceWriteHeaders = "TraceWriteHeaders";

		public const string TraceWriteRequest = "TraceWriteRequest";

		public const string TraceWriteResponse = "TraceWriteResponse";

		public const string TypeIsMissingWebServiceBindingAttributeThat2 = "TypeIsMissingWebServiceBindingAttributeThat2";

		public const string UnableToHandleRequest0 = "UnableToHandleRequest0";

		public const string UnableToHandleRequestActionNotRecognized1 = "UnableToHandleRequestActionNotRecognized1";

		public const string UnableToHandleRequestActionRequired0 = "UnableToHandleRequestActionRequired0";

		public const string UnableToImportBindingFromNamespace2 = "UnableToImportBindingFromNamespace2";

		public const string UnableToImportOperation1 = "UnableToImportOperation1";

		public const string UriValueRelative = "UriValueRelative";

		public const string WebAsyncMissingEnd = "WebAsyncMissingEnd";

		public const string WebAsyncTransaction = "WebAsyncTransaction";

		public const string WebBadOutParameter = "WebBadOutParameter";

		public const string WebBadStreamState = "WebBadStreamState";

		public const string WebBothMethodAttrs = "WebBothMethodAttrs";

		public const string WebBothServiceAttrs = "WebBothServiceAttrs";

		public const string WebCannotAccessValue = "WebCannotAccessValue";

		public const string WebCannotAccessValueStage = "WebCannotAccessValueStage";

		public const string WebCannotUnderstandHeader = "WebCannotUnderstandHeader";

		public const string WebChangeTypeFailed = "WebChangeTypeFailed";

		public const string WebClientBindingAttributeRequired = "WebClientBindingAttributeRequired";

		public const string WebConfigExtensionError = "WebConfigExtensionError";

		public const string WebConfigInvalidExtensionPriority = "WebConfigInvalidExtensionPriority";

		public const string WebContractReferenceName = "WebContractReferenceName";

		public const string WebDescriptionHeaderAndBodyUseMismatch = "WebDescriptionHeaderAndBodyUseMismatch";

		public const string WebDescriptionMissing = "WebDescriptionMissing";

		public const string WebDescriptionMissingItem = "WebDescriptionMissingItem";

		public const string WebDescriptionPartElementRequired = "WebDescriptionPartElementRequired";

		public const string WebDescriptionPartElementWarning = "WebDescriptionPartElementWarning";

		public const string WebDescriptionPartTypeRequired = "WebDescriptionPartTypeRequired";

		public const string WebDescriptionPartTypeWarning = "WebDescriptionPartTypeWarning";

		public const string WebDescriptionTooManyMessages = "WebDescriptionTooManyMessages";

		public const string WebDiscoRefReport = "WebDiscoRefReport";

		public const string WebDiscoveryDocumentReferenceName = "WebDiscoveryDocumentReferenceName";

		public const string WebDuplicateBinding = "WebDuplicateBinding";

		public const string WebDuplicateFaultBinding = "WebDuplicateFaultBinding";

		public const string WebDuplicateFormatExtension = "WebDuplicateFormatExtension";

		public const string WebDuplicateImport = "WebDuplicateImport";

		public const string WebDuplicateMessage = "WebDuplicateMessage";

		public const string WebDuplicateMessagePart = "WebDuplicateMessagePart";

		public const string WebDuplicateOperation = "WebDuplicateOperation";

		public const string WebDuplicateOperationBinding = "WebDuplicateOperationBinding";

		public const string WebDuplicateOperationFault = "WebDuplicateOperationFault";

		public const string WebDuplicateOperationMessage = "WebDuplicateOperationMessage";

		public const string WebDuplicatePort = "WebDuplicatePort";

		public const string WebDuplicatePortType = "WebDuplicatePortType";

		public const string WebDuplicateService = "WebDuplicateService";

		public const string WebDuplicateUnknownElement = "WebDuplicateUnknownElement";

		public const string WebEmptyRef = "WebEmptyRef";

		public const string WebExtensionError = "WebExtensionError";

		public const string WebHeaderInvalidMustUnderstand = "WebHeaderInvalidMustUnderstand";

		public const string WebHeaderInvalidRelay = "WebHeaderInvalidRelay";

		public const string WebHeaderMissing = "WebHeaderMissing";

		public const string WebHeaderOneWayOut = "WebHeaderOneWayOut";

		public const string WebHeaderRead = "WebHeaderRead";

		public const string WebHeaderStatic = "WebHeaderStatic";

		public const string WebHeaderType = "WebHeaderType";

		public const string WebHeaderWrite = "WebHeaderWrite";

		public const string WebHttpHeader = "WebHttpHeader";

		public const string WebInOutParameter = "WebInOutParameter";

		public const string WebInvalidBindingName = "WebInvalidBindingName";

		public const string WebInvalidBindingPlacement = "WebInvalidBindingPlacement";

		public const string WebInvalidContentType = "WebInvalidContentType";

		public const string WebInvalidDocType = "WebInvalidDocType";

		public const string WebInvalidEnvelopeNamespace = "WebInvalidEnvelopeNamespace";

		public const string WebInvalidFormat = "WebInvalidFormat";

		public const string WebInvalidMethodName = "WebInvalidMethodName";

		public const string WebInvalidMethodNameCase = "WebInvalidMethodNameCase";

		public const string WebInvalidRequestFormat = "WebInvalidRequestFormat";

		public const string WebInvalidRequestFormatDetails = "WebInvalidRequestFormatDetails";

		public const string WebMethodMissingParams = "WebMethodMissingParams";

		public const string WebMethodStatic = "WebMethodStatic";

		public const string WebMissingBodyElement = "WebMissingBodyElement";

		public const string WebMissingClientProtocol = "WebMissingClientProtocol";

		public const string WebMissingCustomAttribute = "WebMissingCustomAttribute";

		public const string WebMissingDocument = "WebMissingDocument";

		public const string WebMissingEnvelopeElement = "WebMissingEnvelopeElement";

		public const string WebMissingHeader = "WebMissingHeader";

		public const string WebMissingHelpContext = "WebMissingHelpContext";

		public const string WebMissingParameter = "WebMissingParameter";

		public const string WebMissingPath = "WebMissingPath";

		public const string WebMissingResource = "WebMissingResource";

		public const string WebMultiDimArray = "WebMultiDimArray";

		public const string WebMultiplyDeclaredHeaderTypes = "WebMultiplyDeclaredHeaderTypes";

		public const string WebNegativeValue = "WebNegativeValue";

		public const string WebNoReturnValue = "WebNoReturnValue";

		public const string WebNullAsyncResultInBegin = "WebNullAsyncResultInBegin";

		public const string WebNullAsyncResultInEnd = "WebNullAsyncResultInEnd";

		public const string WebNullReaderForMessage = "WebNullReaderForMessage";

		public const string WebNullRef = "WebNullRef";

		public const string WebNullWriterForMessage = "WebNullWriterForMessage";

		public const string WebOneWayOutParameters = "WebOneWayOutParameters";

		public const string WebOneWayReturnValue = "WebOneWayReturnValue";

		public const string WebPathNotFound = "WebPathNotFound";

		public const string WebQNamePrefixUndefined = "WebQNamePrefixUndefined";

		public const string WebRefInvalidAttribute = "WebRefInvalidAttribute";

		public const string WebRefInvalidAttribute2 = "WebRefInvalidAttribute2";

		public const string WebReflectionError = "WebReflectionError";

		public const string WebReflectionErrorMethod = "WebReflectionErrorMethod";

		public const string WebRequestContent = "WebRequestContent";

		public const string WebRequestUnableToProcess = "WebRequestUnableToProcess";

		public const string WebRequestUnableToRead = "WebRequestUnableToRead";

		public const string WebResolveMissingClientProtocol = "WebResolveMissingClientProtocol";

		public const string WebResponseBadXml = "WebResponseBadXml";

		public const string WebResponseContent = "WebResponseContent";

		public const string WebResponseKnownError = "WebResponseKnownError";

		public const string WebResponseUnknownError = "WebResponseUnknownError";

		public const string WebResponseUnknownErrorEmptyBody = "WebResponseUnknownErrorEmptyBody";

		public const string WebResultNotXml = "WebResultNotXml";

		public const string WebSchemaNotFound = "WebSchemaNotFound";

		public const string WebServiceContext = "WebServiceContext";

		public const string WebServiceDescriptionIgnoredOptional = "WebServiceDescriptionIgnoredOptional";

		public const string WebServiceDescriptionIgnoredRequired = "WebServiceDescriptionIgnoredRequired";

		public const string WebServiceServer = "WebServiceServer";

		public const string WebServiceSession = "WebServiceSession";

		public const string WebServiceSoapVersion = "WebServiceSoapVersion";

		public const string WebServiceUser = "WebServiceUser";

		public const string WebShemaReferenceName = "WebShemaReferenceName";

		public const string WebSoap11EncodingStyleNotSupported1 = "WebSoap11EncodingStyleNotSupported1";

		public const string WebSuppressedExceptionMessage = "WebSuppressedExceptionMessage";

		public const string WebTextMatchBadCaptureIndex = "WebTextMatchBadCaptureIndex";

		public const string WebTextMatchBadGroupIndex = "WebTextMatchBadGroupIndex";

		public const string WebTextMatchIgnoredTypeWarning = "WebTextMatchIgnoredTypeWarning";

		public const string WebTextMatchMissingPattern = "WebTextMatchMissingPattern";

		public const string WebTimeout = "WebTimeout";

		public const string WebUnknownAttribute = "WebUnknownAttribute";

		public const string WebUnknownAttribute2 = "WebUnknownAttribute2";

		public const string WebUnknownAttribute3 = "WebUnknownAttribute3";

		public const string WebUnknownElement = "WebUnknownElement";

		public const string WebUnknownElement1 = "WebUnknownElement1";

		public const string WebUnknownElement2 = "WebUnknownElement2";

		public const string WebUnknownEncodingStyle = "WebUnknownEncodingStyle";

		public const string WebUnrecognizedRequestFormat = "WebUnrecognizedRequestFormat";

		public const string WebUnrecognizedRequestFormatUrl = "WebUnrecognizedRequestFormatUrl";

		public const string WebVirtualDisoRoot = "WebVirtualDisoRoot";

		public const string WebWsiContentTypeEncoding = "WebWsiContentTypeEncoding";

		public const string WebWsiViolation = "WebWsiViolation";

		public const string WhenUsingAMessageStyleOfParametersAsDocument0 = "WhenUsingAMessageStyleOfParametersAsDocument0";

		public const string WireSignature = "WireSignature";

		public const string WireSignatureEmpty = "WireSignatureEmpty";

		public const string WsdlGenRpcLitAnonimousType = "WsdlGenRpcLitAnonimousType";

		public const string WsdlInstanceValidationDetails = "WsdlInstanceValidationDetails";

		public const string XmlLang = "XmlLang";

		public const string XmlSchema = "XmlSchema";

		public const string XmlSchemaAttributeReference = "XmlSchemaAttributeReference";

		public const string XmlSchemaContentDef = "XmlSchemaContentDef";

		public const string XmlSchemaElementReference = "XmlSchemaElementReference";

		public const string XmlSchemaItem = "XmlSchemaItem";

		public const string XmlSchemaNamedItem = "XmlSchemaNamedItem";

		public const string indexMustBeBetweenAnd0Inclusive = "indexMustBeBetweenAnd0Inclusive";

		public const string internalError0 = "internalError0";

		public static string GetString(string name)
		{
			return name;
		}

		public static string GetString(string name, params object[] args)
		{
			return name;
		}
	}
}
namespace System.Web.Services.Protocols
{
	public class AnyReturnReader : MimeReturnReader
	{
		public override void Initialize(object o)
		{
		}

		public override object GetInitializer(LogicalMethodInfo methodInfo)
		{
			if (methodInfo.IsVoid)
			{
				return null;
			}
			return this;
		}

		public override object Read(WebResponse response, Stream responseStream)
		{
			return responseStream;
		}
	}
	internal class BufferedResponseStream : Stream
	{
		private Stream outputStream;

		private byte[] buffer;

		private int position;

		private bool flushEnabled = true;

		public override bool CanRead => false;

		public override bool CanSeek => false;

		public override bool CanWrite => true;

		public override long Length
		{
			get
			{
				throw new NotSupportedException(Res.GetString("StreamDoesNotSeek"));
			}
		}

		public override long Position
		{
			get
			{
				throw new NotSupportedException(Res.GetString("StreamDoesNotSeek"));
			}
			set
			{
				throw new NotSupportedException(Res.GetString("StreamDoesNotSeek"));
			}
		}

		internal bool FlushEnabled
		{
			set
			{
				flushEnabled = value;
			}
		}

		internal BufferedResponseStream(Stream outputStream, int buffersize)
		{
			buffer = new byte[buffersize];
			this.outputStream = outputStream;
		}

		protected override void Dispose(bool disposing)
		{
			try
			{
				if (disposing)
				{
					outputStream.Close();
				}
			}
			finally
			{
				base.Dispose(disposing);
			}
		}

		public override void Flush()
		{
			if (flushEnabled)
			{
				FlushWrite();
			}
		}

		public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
		{
			throw new NotSupportedException(Res.GetString("StreamDoesNotRead"));
		}

		public override int EndRead(IAsyncResult asyncResult)
		{
			throw new NotSupportedException(Res.GetString("StreamDoesNotRead"));
		}

		public override long Seek(long offset, SeekOrigin origin)
		{
			throw new NotSupportedException(Res.GetString("StreamDoesNotSeek"));
		}

		public override void SetLength(long value)
		{
			throw new NotSupportedException(Res.GetString("StreamDoesNotSeek"));
		}

		public override int Read(byte[] buffer, int offset, int count)
		{
			throw new NotSupportedException(Res.GetString("StreamDoesNotRead"));
		}

		public override int ReadByte()
		{
			throw new NotSupportedException(Res.GetString("StreamDoesNotRead"));
		}

		public override void Write(byte[] array, int offset, int count)
		{
			if (position > 0)
			{
				int num = buffer.Length - position;
				if (num > 0)
				{
					if (num > count)
					{
						num = count;
					}
					Array.Copy(array, offset, buffer, position, num);
					position += num;
					if (count == num)
					{
						return;
					}
					offset += num;
					count -= num;
				}
				FlushWrite();
			}
			if (count >= buffer.Length)
			{
				outputStream.Write(array, offset, count);
				return;
			}
			Array.Copy(array, offset, buffer, position, count);
			position = count;
		}

		private void FlushWrite()
		{
			if (position > 0)
			{
				outputStream.Write(buffer, 0, position);
				position = 0;
			}
			outputStream.Flush();
		}

		public override void WriteByte(byte value)
		{
			if (position == buffer.Length)
			{
				FlushWrite();
			}
			buffer[position++] = value;
		}
	}
	internal class ClientTypeCache
	{
		private Hashtable cache = new Hashtable();

		internal object this[Type key] => cache[key];

		internal void Add(Type key, object value)
		{
			lock (this)
			{
				if (cache[key] == value)
				{
					return;
				}
				Hashtable hashtable = new Hashtable();
				foreach (object key2 in cache.Keys)
				{
					hashtable.Add(key2, cache[key2]);
				}
				cache = hashtable;
				cache[key] = value;
			}
		}
	}
	[ComVisible(true)]
	public abstract class WebClientProtocol : Component
	{
		private static AsyncCallback getRequestStreamAsyncCallback;

		private static AsyncCallback getResponseAsyncCallback;

		private static volatile AsyncCallback readResponseAsyncCallback;

		private static ClientTypeCache cache;

		private static RequestCachePolicy bypassCache;

		private ICredentials credentials;

		private bool preAuthenticate;

		private Uri uri;

		private int timeout;

		private string connectionGroupName;

		private Encoding requestEncoding;

		private WebRequest pendingSyncRequest;

		private object nullToken = new object();

		private Hashtable asyncInvokes = Hashtable.Synchronized(new Hashtable());

		private static object s_InternalSyncObject;

		internal static object InternalSyncObject
		{
			get
			{
				if (s_InternalSyncObject == null)
				{
					object value = new object();
					Interlocked.CompareExchange(ref s_InternalSyncObject, value, null);
				}
				return s_InternalSyncObject;
			}
		}

		internal static RequestCachePolicy BypassCache
		{
			get
			{
				if (bypassCache == null)
				{
					bypassCache = new RequestCachePolicy(RequestCacheLevel.BypassCache);
				}
				return bypassCache;
			}
		}

		public ICredentials Credentials
		{
			get
			{
				return credentials;
			}
			set
			{
				credentials = value;
			}
		}

		public bool UseDefaultCredentials
		{
			get
			{
				if (credentials != CredentialCache.DefaultCredentials)
				{
					return false;
				}
				return true;
			}
			set
			{
				credentials = (value ? CredentialCache.DefaultCredentials : null);
			}
		}

		[DefaultValue("")]
		public string ConnectionGroupName
		{
			get
			{
				if (connectionGroupName != null)
				{
					return connectionGroupName;
				}
				return string.Empty;
			}
			set
			{
				connectionGroupName = value;
			}
		}

		internal WebRequest PendingSyncRequest
		{
			get
			{
				return pendingSyncRequest;
			}
			set
			{
				pendingSyncRequest = value;
			}
		}

		[WebServicesDescription("ClientProtocolPreAuthenticate")]
		[DefaultValue(false)]
		public bool PreAuthenticate
		{
			get
			{
				return preAuthenticate;
			}
			set
			{
				preAuthenticate = value;
			}
		}

		[WebServicesDescription("ClientProtocolUrl")]
		[SettingsBindable(true)]
		[DefaultValue("")]
		public string Url
		{
			get
			{
				if (!(uri == null))
				{
					return uri.ToString();
				}
				return string.Empty;
			}
			set
			{
				uri = new Uri(value);
			}
		}

		internal Hashtable AsyncInvokes => asyncInvokes;

		internal object NullToken => nullToken;

		internal Uri Uri
		{
			get
			{
				return uri;
			}
			set
			{
				uri = value;
			}
		}

		[DefaultValue(null)]
		[SettingsBindable(true)]
		[WebServicesDescription("ClientProtocolEncoding")]
		public Encoding RequestEncoding
		{
			get
			{
				return requestEncoding;
			}
			set
			{
				requestEncoding = value;
			}
		}

		[WebServicesDescription("ClientProtocolTimeout")]
		[DefaultValue(100000)]
		[SettingsBindable(true)]
		public int Timeout
		{
			get
			{
				return timeout;
			}
			set
			{
				timeout = ((value < -1) ? (-1) : value);
			}
		}

		static WebClientProtocol()
		{
			cache = new ClientTypeCache();
		}

		protected WebClientProtocol()
		{
			timeout = 100000;
		}

		internal WebClientProtocol(WebClientProtocol protocol)
		{
			credentials = protocol.credentials;
			uri = protocol.uri;
			timeout = protocol.timeout;
			connectionGroupName = protocol.connectionGroupName;
			requestEncoding = protocol.requestEncoding;
		}

		public virtual void Abort()
		{
			PendingSyncRequest?.Abort();
		}

		internal IAsyncResult BeginSend(Uri requestUri, WebClientAsyncResult asyncResult, bool callWriteAsyncRequest)
		{
			if (readResponseAsyncCallback == null)
			{
				lock (InternalSyncObject)
				{
					if (readResponseAsyncCallback == null)
					{
						getRequestStreamAsyncCallback = GetRequestStreamAsyncCallback;
						getResponseAsyncCallback = GetResponseAsyncCallback;
						readResponseAsyncCallback = ReadResponseAsyncCallback;
					}
				}
			}
			WebRequest webRequest = (asyncResult.Request = GetWebRequest(requestUri));
			InitializeAsyncRequest(webRequest, asyncResult.InternalAsyncState);
			if (callWriteAsyncRequest)
			{
				webRequest.BeginGetRequestStream(getRequestStreamAsyncCallback, asyncResult);
			}
			else
			{
				webRequest.BeginGetResponse(getResponseAsyncCallback, asyncResult);
			}
			if (!asyncResult.IsCompleted)
			{
				asyncResult.CombineCompletedSynchronously(innerCompletedSynchronously: false);
			}
			return asyncResult;
		}

		private static void ProcessAsyncException(WebClientAsyncResult client, Exception e, string method)
		{
			if (Tracing.On)
			{
				Tracing.ExceptionCatch(TraceEventType.Error, typeof(WebClientProtocol), method, e);
			}
			if (e is WebException ex && ex.Response != null)
			{
				client.Response = ex.Response;
				return;
			}
			if (client.IsCompleted)
			{
				throw new InvalidOperationException(Res.GetString("ThereWasAnErrorDuringAsyncProcessing"), e);
			}
			client.Complete(e);
		}

		private static void GetRequestStreamAsyncCallback(IAsyncResult asyncResult)
		{
			WebClientAsyncResult webClientAsyncResult = (WebClientAsyncResult)asyncResult.AsyncState;
			webClientAsyncResult.CombineCompletedSynchronously(asyncResult.CompletedSynchronously);
			bool flag = true;
			try
			{
				Stream stream = webClientAsyncResult.Request.EndGetRequestStream(asyncResult);
				flag = false;
				try
				{
					webClientAsyncResult.ClientProtocol.AsyncBufferedSerialize(webClientAsyncResult.Request, stream, webClientAsyncResult.InternalAsyncState);
				}
				finally
				{
					stream.Close();
				}
				webClientAsyncResult.Request.BeginGetResponse(getResponseAsyncCallback, webClientAsyncResult);
			}
			catch (Exception ex)
			{
				if (ex is ThreadAbortException || ex is StackOverflowException || ex is OutOfMemoryException)
				{
					throw;
				}
				ProcessAsyncException(webClientAsyncResult, ex, "GetRequestStreamAsyncCallback");
				if (flag && ex is WebException ex2 && ex2.Response != null)
				{
					webClientAsyncResult.Complete(ex);
				}
			}
		}

		private static void GetResponseAsyncCallback(IAsyncResult asyncResult)
		{
			WebClientAsyncResult webClientAsyncResult = (WebClientAsyncResult)asyncResult.AsyncState;
			webClientAsyncResult.CombineCompletedSynchronously(asyncResult.CompletedSynchronously);
			try
			{
				webClientAsyncResult.Response = webClientAsyncResult.ClientProtocol.GetWebResponse(webClientAsyncResult.Request, asyncResult);
			}
			catch (Exception ex)
			{
				if (ex is ThreadAbortException || ex is StackOverflowException || ex is OutOfMemoryException)
				{
					throw;
				}
				ProcessAsyncException(webClientAsyncResult, ex, "GetResponseAsyncCallback");
				if (webClientAsyncResult.Response == null)
				{
					return;
				}
			}
			ReadAsyncResponse(webClientAsyncResult);
		}

		private static void ReadAsyncResponse(WebClientAsyncResult client)
		{
			if (client.Response.ContentLength == 0L)
			{
				client.Complete();
				return;
			}
			try
			{
				client.ResponseStream = client.Response.GetResponseStream();
				ReadAsyncResponseStream(client);
			}
			catch (Exception ex)
			{
				if (ex is ThreadAbortException || ex is StackOverflowException || ex is OutOfMemoryException)
				{
					throw;
				}
				ProcessAsyncException(client, ex, "ReadAsyncResponse");
			}
		}

		private static void ReadAsyncResponseStream(WebClientAsyncResult client)
		{
			IAsyncResult asyncResult;
			do
			{
				byte[] array = client.Buffer;
				long contentLength = client.Response.ContentLength;
				if (array == null)
				{
					array = (client.Buffer = new byte[(contentLength == -1) ? 1024 : contentLength]);
				}
				else if (contentLength != -1 && contentLength > array.Length)
				{
					array = (client.Buffer = new byte[contentLength]);
				}
				asyncResult = client.ResponseStream.BeginRead(array, 0, array.Length, readResponseAsyncCallback, client);
			}
			while (asyncResult.CompletedSynchronously && !ProcessAsyncResponseStreamResult(client, asyncResult));
		}

		private static bool ProcessAsyncResponseStreamResult(WebClientAsyncResult client, IAsyncResult asyncResult)
		{
			int num = client.ResponseStream.EndRead(asyncResult);
			long contentLength = client.Response.ContentLength;
			bool flag;
			if (contentLength > 0 && num == contentLength)
			{
				client.ResponseBufferedStream = new MemoryStream(client.Buffer);
				flag = true;
			}
			else if (num > 0)
			{
				if (client.ResponseBufferedStream == null)
				{
					int capacity = (int)((contentLength == -1) ? client.Buffer.Length : contentLength);
					client.ResponseBufferedStream = new MemoryStream(capacity);
				}
				client.ResponseBufferedStream.Write(client.Buffer, 0, num);
				flag = false;
			}
			else
			{
				flag = true;
			}
			if (flag)
			{
				client.Complete();
			}
			return flag;
		}

		private static void ReadResponseAsyncCallback(IAsyncResult asyncResult)
		{
			WebClientAsyncResult webClientAsyncResult = (WebClientAsyncResult)asyncResult.AsyncState;
			webClientAsyncResult.CombineCompletedSynchronously(asyncResult.CompletedSynchronously);
			if (asyncResult.CompletedSynchronously)
			{
				return;
			}
			try
			{
				if (!ProcessAsyncResponseStreamResult(webClientAsyncResult, asyncResult))
				{
					ReadAsyncResponseStream(webClientAsyncResult);
				}
			}
			catch (Exception ex)
			{
				if (ex is ThreadAbortException || ex is StackOverflowException || ex is OutOfMemoryException)
				{
					throw;
				}
				ProcessAsyncException(webClientAsyncResult, ex, "ReadResponseAsyncCallback");
			}
		}

		internal void NotifyClientCallOut(WebRequest request)
		{
		}

		protected virtual WebRequest GetWebRequest(Uri uri)
		{
			if (uri == null)
			{
				throw new InvalidOperationException(Res.GetString("WebMissingPath"));
			}
			WebRequest webRequest2 = (PendingSyncRequest = WebRequest.Create(uri));
			webRequest2.Timeout = timeout;
			webRequest2.ConnectionGroupName = connectionGroupName;
			webRequest2.Credentials = Credentials;
			webRequest2.PreAuthenticate = PreAuthenticate;
			webRequest2.CachePolicy = BypassCache;
			return webRequest2;
		}

		protected virtual WebResponse GetWebResponse(WebRequest request)
		{
			TraceMethod caller = (Tracing.On ? new TraceMethod(this, "GetWebResponse") : null);
			WebResponse webResponse = null;
			try
			{
				if (Tracing.On)
				{
					Tracing.Enter("WebRequest.GetResponse", caller, new TraceMethod(request, "GetResponse"));
				}
				webResponse = request.GetResponse();
				if (Tracing.On)
				{
					Tracing.Exit("WebRequest.GetResponse", caller);
				}
			}
			catch (WebException ex)
			{
				if (ex.Response == null)
				{
					throw ex;
				}
				if (Tracing.On)
				{
					Tracing.ExceptionCatch(TraceEventType.Error, this, "GetWebResponse", ex);
				}
				webResponse = ex.Response;
			}
			return webResponse;
		}

		protected virtual WebResponse GetWebResponse(WebRequest request, IAsyncResult result)
		{
			return request.EndGetResponse(result);
		}

		[PermissionSet(SecurityAction.InheritanceDemand, Name = "FullTrust")]
		internal virtual void InitializeAsyncRequest(WebRequest request, object internalAsyncState)
		{
		}

		[PermissionSet(SecurityAction.InheritanceDemand, Name = "FullTrust")]
		internal virtual void AsyncBufferedSerialize(WebRequest request, Stream requestStream, object internalAsyncState)
		{
			throw new NotSupportedException(Res.GetString("ProtocolDoesNotAsyncSerialize"));
		}

		internal WebResponse EndSend(IAsyncResult asyncResult, ref object internalAsyncState, ref Stream responseStream)
		{
			if (asyncResult == null)
			{
				throw new ArgumentNullException(Res.GetString("WebNullAsyncResultInEnd"));
			}
			WebClientAsyncResult webClientAsyncResult = (WebClientAsyncResult)asyncResult;
			if (webClientAsyncResult.EndSendCalled)
			{
				throw new InvalidOperationException(Res.GetString("CanTCallTheEndMethodOfAnAsyncCallMoreThan"));
			}
			webClientAsyncResult.EndSendCalled = true;
			WebResponse result = webClientAsyncResult.WaitForResponse();
			internalAsyncState = webClientAsyncResult.InternalAsyncState;
			responseStream = webClientAsyncResult.ResponseBufferedStream;
			return result;
		}

		protected static object GetFromCache(Type type)
		{
			return cache[type];
		}

		protected static void AddToCache(Type type, object value)
		{
			cache.Add(type, value);
		}
	}
	[PermissionSet(SecurityAction.InheritanceDemand, Name = "FullTrust")]
	public class WebClientAsyncResult : IAsyncResult
	{
		private object userAsyncState;

		private bool completedSynchronously;

		private bool isCompleted;

		private volatile ManualResetEvent manualResetEvent;

		private AsyncCallback userCallback;

		internal WebClientProtocol ClientProtocol;

		internal object InternalAsyncState;

		internal Exception Exception;

		internal WebResponse Response;

		internal WebRequest Request;

		internal Stream ResponseStream;

		internal Stream ResponseBufferedStream;

		internal byte[] Buffer;

		internal bool EndSendCalled;

		public object AsyncState => userAsyncState;

		public WaitHandle AsyncWaitHandle
		{
			get
			{
				bool flag = isCompleted;
				if (manualResetEvent == null)
				{
					lock (this)
					{
						if (manualResetEvent == null)
						{
							manualResetEvent = new ManualResetEvent(flag);
						}
					}
				}
				if (!flag && isCompleted)
				{
					manualResetEvent.Set();
				}
				return manualResetEvent;
			}
		}

		public bool CompletedSynchronously => completedSynchronously;

		public bool IsCompleted => isCompleted;

		internal WebClientAsyncResult(WebClientProtocol clientProtocol, object internalAsyncState, WebRequest request, AsyncCallback userCallback, object userAsyncState)
		{
			ClientProtocol = clientProtocol;
			InternalAsyncState = internalAsyncState;
			this.userAsyncState = userAsyncState;
			this.userCallback = userCallback;
			Request = request;
			completedSynchronously = true;
		}

		public void Abort()
		{
			Request?.Abort();
		}

		internal void Complete()
		{
			try
			{
				if (ResponseStream != null)
				{
					ResponseStream.Close();
					ResponseStream = null;
				}
				if (ResponseBufferedStream != null)
				{
					ResponseBufferedStream.Position = 0L;
				}
			}
			catch (Exception ex)
			{
				if (ex is ThreadAbortException || ex is StackOverflowException || ex is OutOfMemoryException)
				{
					throw;
				}
				if (Exception == null)
				{
					Exception = ex;
				}
				if (Tracing.On)
				{
					Tracing.ExceptionCatch(TraceEventType.Error, this, "Complete", ex);
				}
			}
			isCompleted = true;
			try
			{
				if (manualResetEvent != null)
				{
					manualResetEvent.Set();
				}
			}
			catch (Exception ex2)
			{
				if (ex2 is ThreadAbortException || ex2 is StackOverflowException || ex2 is OutOfMemoryException)
				{
					throw;
				}
				if (Exception == null)
				{
					Exception = ex2;
				}
				if (Tracing.On)
				{
					Tracing.ExceptionCatch(TraceEventType.Error, this, "Complete", ex2);
				}
			}
			if (userCallback != null)
			{
				userCallback(this);
			}
		}

		internal void Complete(Exception e)
		{
			Exception = e;
			Complete();
		}

		internal WebResponse WaitForResponse()
		{
			if (!isCompleted)
			{
				AsyncWaitHandle.WaitOne();
			}
			if (Exception != null)
			{
				throw Exception;
			}
			return Response;
		}

		internal void CombineCompletedSynchronously(bool innerCompletedSynchronously)
		{
			completedSynchronously &= innerCompletedSynchronously;
		}

		internal WebClientAsyncResult()
		{
			ThrowStub.ThrowNotSupportedException();
		}
	}
	public delegate void InvokeCompletedEventHandler(object sender, InvokeCompletedEventArgs e);
	public class InvokeCompletedEventArgs : AsyncCompletedEventArgs
	{
		private object[] results;

		public object[] Results => results;

		internal InvokeCompletedEventArgs(object[] results, Exception exception, bool cancelled, object userState)
			: base(exception, cancelled, userState)
		{
			this.results = results;
		}

		internal InvokeCompletedEventArgs()
		{
			ThrowStub.ThrowNotSupportedException();
		}
	}
	internal class UserToken
	{
		private SendOrPostCallback callback;

		private object userState;

		internal SendOrPostCallback Callback => callback;

		internal object UserState => userState;

		internal UserToken(SendOrPostCallback callback, object userState)
		{
			this.callback = callback;
			this.userState = userState;
		}
	}
	[ComVisible(true)]
	public abstract class HttpWebClientProtocol : WebClientProtocol
	{
		private bool allowAutoRedirect;

		private bool enableDecompression;

		private CookieContainer cookieJar;

		private X509CertificateCollection clientCertificates;

		private IWebProxy proxy;

		private static string UserAgentDefault = "Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol " + Environment.Version.ToString() + ")";

		private string userAgent;

		private bool unsafeAuthenticatedConnectionSharing;

		[DefaultValue(false)]
		[WebServicesDescription("ClientProtocolAllowAutoRedirect")]
		public bool AllowAutoRedirect
		{
			get
			{
				return allowAutoRedirect;
			}
			set
			{
				allowAutoRedirect = value;
			}
		}

		[WebServicesDescription("ClientProtocolCookieContainer")]
		[DefaultValue(null)]
		public CookieContainer CookieContainer
		{
			get
			{
				return cookieJar;
			}
			set
			{
				cookieJar = value;
			}
		}

		[WebServicesDescription("ClientProtocolClientCertificates")]
		[Browsable(false)]
		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		public X509CertificateCollection ClientCertificates
		{
			get
			{
				if (clientCertificates == null)
				{
					clientCertificates = new X509CertificateCollection();
				}
				return clientCertificates;
			}
		}

		[DefaultValue(false)]
		[WebServicesDescription("ClientProtocolEnableDecompression")]
		public bool EnableDecompression
		{
			get
			{
				return enableDecompression;
			}
			set
			{
				enableDecompression = value;
			}
		}

		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		[WebServicesDescription("ClientProtocolUserAgent")]
		[Browsable(false)]
		public string UserAgent
		{
			get
			{
				if (userAgent != null)
				{
					return userAgent;
				}
				return string.Empty;
			}
			set
			{
				userAgent = value;
			}
		}

		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		[Browsable(false)]
		public IWebProxy Proxy
		{
			get
			{
				return proxy;
			}
			set
			{
				proxy = value;
			}
		}

		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		[Browsable(false)]
		public bool UnsafeAuthenticatedConnectionSharing
		{
			get
			{
				return unsafeAuthenticatedConnectionSharing;
			}
			set
			{
				unsafeAuthenticatedConnectionSharing = value;
			}
		}

		protected HttpWebClientProtocol()
		{
			allowAutoRedirect = false;
			userAgent = UserAgentDefault;
		}

		internal HttpWebClientProtocol(HttpWebClientProtocol protocol)
			: base(protocol)
		{
			allowAutoRedirect = protocol.allowAutoRedirect;
			enableDecompression = protocol.enableDecompression;
			cookieJar = protocol.cookieJar;
			clientCertificates = protocol.clientCertificates;
			proxy = protocol.proxy;
			userAgent = protocol.userAgent;
		}

		protected override WebRequest GetWebRequest(Uri uri)
		{
			WebRequest webRequest = base.GetWebRequest(uri);
			if (webRequest is HttpWebRequest httpWebRequest)
			{
				httpWebRequest.UserAgent = UserAgent;
				httpWebRequest.AllowAutoRedirect = allowAutoRedirect;
				httpWebRequest.AutomaticDecompression = (enableDecompression ? DecompressionMethods.GZip : DecompressionMethods.None);
				httpWebRequest.AllowWriteStreamBuffering = true;
				httpWebRequest.SendChunked = false;
				if (unsafeAuthenticatedConnectionSharing != httpWebRequest.UnsafeAuthenticatedConnectionSharing)
				{
					httpWebRequest.UnsafeAuthenticatedConnectionSharing = unsafeAuthenticatedConnectionSharing;
				}
				if (proxy != null)
				{
					httpWebRequest.Proxy = proxy;
				}
				if (clientCertificates != null && clientCertificates.Count > 0)
				{
					httpWebRequest.ClientCertificates.AddRange(clientCertificates);
				}
				httpWebRequest.CookieContainer = cookieJar;
			}
			return webRequest;
		}

		protected override WebResponse GetWebResponse(WebRequest request)
		{
			return base.GetWebResponse(request);
		}

		protected override WebResponse GetWebResponse(WebRequest request, IAsyncResult result)
		{
			return base.GetWebResponse(request, result);
		}

		protected void CancelAsync(object userState)
		{
			if (userState == null)
			{
				userState = base.NullToken;
			}
			OperationCompleted(userState, new object[1], null, canceled: true)?.Abort();
		}

		internal WebClientAsyncResult OperationCompleted(object userState, object[] parameters, Exception e, bool canceled)
		{
			WebClientAsyncResult webClientAsyncResult = (WebClientAsyncResult)base.AsyncInvokes[userState];
			if (webClientAsyncResult != null)
			{
				AsyncOperation obj = (AsyncOperation)webClientAsyncResult.AsyncState;
				UserToken userToken = (UserToken)obj.UserSuppliedState;
				InvokeCompletedEventArgs arg = new InvokeCompletedEventArgs(parameters, e, canceled, userState);
				base.AsyncInvokes.Remove(userState);
				obj.PostOperationCompleted(userToken.Callback, arg);
			}
			return webClientAsyncResult;
		}

		public static bool GenerateXmlMappings(Type type, ArrayList mappings)
		{
			if (typeof(SoapHttpClientProtocol).IsAssignableFrom(type))
			{
				string @namespace = (WebServiceBindingReflector.GetAttribute(type) ?? throw new InvalidOperationException(Res.GetString("WebClientBindingAttributeRequired"))).Namespace;
				bool serviceDefaultIsEncoded = SoapReflector.ServiceDefaultIsEncoded(type);
				ArrayList soapMethodList = new ArrayList();
				SoapClientType.GenerateXmlMappings(type, soapMethodList, @namespace, serviceDefaultIsEncoded, mappings);
				return true;
			}
			return false;
		}

		public static Hashtable GenerateXmlMappings(Type[] types, ArrayList mappings)
		{
			if (types == null)
			{
				throw new ArgumentNullException("types");
			}
			Hashtable hashtable = new Hashtable();
			foreach (Type type in types)
			{
				ArrayList value = new ArrayList();
				if (GenerateXmlMappings(type, mappings))
				{
					hashtable.Add(type, value);
					mappings.Add(value);
				}
			}
			return hashtable;
		}
	}
	internal class DiscoveryServerType : ServerType
	{
		private ServiceDescription description;

		private LogicalMethodInfo methodInfo;

		private Hashtable schemaTable = new Hashtable();

		private Hashtable wsdlTable = new Hashtable();

		private DiscoveryDocument discoDoc;

		public List<Action<Uri>> UriFixups { get; private set; }

		internal ServiceDescription Description => description;

		internal LogicalMethodInfo MethodInfo => methodInfo;

		internal DiscoveryDocument Disco => discoDoc;

		private void AddUriFixup(Action<Uri> fixup)
		{
			if (UriFixups != null)
			{
				UriFixups.Add(fixup);
			}
		}

		internal DiscoveryServerType(Type type, string uri, bool excludeSchemeHostPortFromCachingKey)
			: base(typeof(DiscoveryServerProtocol))
		{
			if (excludeSchemeHostPortFromCachingKey)
			{
				UriFixups = new List<Action<Uri>>();
			}
			uri = new Uri(uri, dontEscape: true).GetLeftPart(UriPartial.Path);
			methodInfo = new LogicalMethodInfo(typeof(DiscoveryServerProtocol).GetMethod("Discover", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic));
			ServiceDescriptionReflector serviceDescriptionReflector = new ServiceDescriptionReflector(UriFixups);
			serviceDescriptionReflector.Reflect(type, uri);
			XmlSchemas schemas = serviceDescriptionReflector.Schemas;
			description = serviceDescriptionReflector.ServiceDescription;
			_ = ServiceDescription.Serializer;
			AddSchemaImports(schemas, uri, serviceDescriptionReflector.ServiceDescriptions);
			for (int i = 1; i < serviceDescriptionReflector.ServiceDescriptions.Count; i++)
			{
				ServiceDescription serviceDescription = serviceDescriptionReflector.ServiceDescriptions[i];
				Import import = new Import();
				import.Namespace = serviceDescription.TargetNamespace;
				string text = "wsdl" + i.ToString(CultureInfo.InvariantCulture);
				import.Location = uri + "?wsdl=" + text;
				AddUriFixup(delegate(Uri current)
				{
					import.Location = CombineUris(current, import.Location);
				});
				serviceDescriptionReflector.ServiceDescription.Imports.Add(import);
				wsdlTable.Add(text, serviceDescription);
			}
			discoDoc = new DiscoveryDocument();
			ContractReference contractReference = new ContractReference(uri + "?wsdl", uri);
			AddUriFixup(delegate(Uri current)
			{
				contractReference.Ref = CombineUris(current, contractReference.Ref);
				contractReference.DocRef = CombineUris(current, contractReference.DocRef);
			});
			discoDoc.References.Add(contractReference);
			foreach (Service service in serviceDescriptionReflector.ServiceDescription.Services)
			{
				foreach (Port port in service.Ports)
				{
					SoapAddressBinding soapAddressBinding = (SoapAddressBinding)port.Extensions.Find(typeof(SoapAddressBinding));
					if (soapAddressBinding != null)
					{
						System.Web.Services.Discovery.SoapBinding binding = new System.Web.Services.Discovery.SoapBinding();
						binding.Binding = port.Binding;
						binding.Address = soapAddressBinding.Location;
						AddUriFixup(delegate(Uri current)
						{
							binding.Address = CombineUris(current, binding.Address);
						});
						discoDoc.References.Add(binding);
					}
				}
			}
		}

		internal void AddExternal(XmlSchema schema, string ns, string location)
		{
			if (schema == null)
			{
				return;
			}
			if (schema.TargetNamespace == ns)
			{
				XmlSchemaInclude include = new XmlSchemaInclude();
				include.SchemaLocation = location;
				AddUriFixup(delegate(Uri current)
				{
					include.SchemaLocation = CombineUris(current, include.SchemaLocation);
				});
				schema.Includes.Add(include);
				return;
			}
			XmlSchemaImport import = new XmlSchemaImport();
			import.SchemaLocation = location;
			AddUriFixup(delegate(Uri current)
			{
				import.SchemaLocation = CombineUris(current, import.SchemaLocation);
			});
			import.Namespace = ns;
			schema.Includes.Add(import);
		}

		private void AddSchemaImports(XmlSchemas schemas, string uri, ServiceDescriptionCollection descriptions)
		{
			int num = 0;
			foreach (XmlSchema schema in schemas)
			{
				if (schema == null)
				{
					continue;
				}
				if (schema.Id == null || schema.Id.Length == 0)
				{
					int num2 = num + 1;
					num = num2;
					schema.Id = "schema" + num2.ToString(CultureInfo.InvariantCulture);
				}
				string location = uri + "?schema=" + schema.Id;
				foreach (ServiceDescription description in descriptions)
				{
					if (description.Types.Schemas.Count == 0)
					{
						XmlSchema xmlSchema2 = new XmlSchema();
						xmlSchema2.TargetNamespace = description.TargetNamespace;
						schema.ElementFormDefault = XmlSchemaForm.Qualified;
						AddExternal(xmlSchema2, schema.TargetNamespace, location);
						description.Types.Schemas.Add(xmlSchema2);
					}
					else
					{
						AddExternal(description.Types.Schemas[0], schema.TargetNamespace, location);
					}
				}
				schemaTable.Add(schema.Id, schema);
			}
		}

		internal XmlSchema GetSchema(string id)
		{
			return (XmlSchema)schemaTable[id];
		}

		internal ServiceDescription GetServiceDescription(string id)
		{
			return (ServiceDescription)wsdlTable[id];
		}

		internal static string CombineUris(Uri schemeHostPort, string absolutePathAndQuery)
		{
			return string.Format(CultureInfo.InvariantCulture, "{0}://{1}{2}", schemeHostPort.Scheme, schemeHostPort.Authority, new Uri(absolutePathAndQuery).PathAndQuery);
		}
	}
	internal class DiscoveryServerProtocolFactory : ServerProtocolFactory
	{
		protected override ServerProtocol CreateIfRequestCompatible(HttpRequest request)
		{
			if (request.PathInfo.Length > 0)
			{
				return null;
			}
			if (request.HttpMethod != "GET")
			{
				return new UnsupportedRequestProtocol(405);
			}
			string text = request.QueryString[null];
			if (text == null)
			{
				text = "";
			}
			if (request.QueryString["schema"] == null && request.QueryString["wsdl"] == null && string.Compare(text, "wsdl", StringComparison.OrdinalIgnoreCase) != 0 && string.Compare(text, "disco", StringComparison.OrdinalIgnoreCase) != 0)
			{
				return null;
			}
			return new DiscoveryServerProtocol();
		}
	}
	internal sealed class DiscoveryServerProtocol : ServerProtocol
	{
		private DiscoveryServerType serverType;

		private object syncRoot = new object();

		internal override ServerType ServerType => serverType;

		internal override bool IsOneWay => false;

		internal override LogicalMethodInfo MethodInfo => serverType.MethodInfo;

		internal override bool Initialize()
		{
			if ((serverType = (DiscoveryServerType)GetFromCache(typeof(DiscoveryServerProtocol), base.Type)) == null && (serverType = (DiscoveryServerType)GetFromCache(typeof(DiscoveryServerProtocol), base.Type, excludeSchemeHostPort: true)) == null)
			{
				lock (ServerProtocol.InternalSyncObject)
				{
					if ((serverType = (DiscoveryServerType)GetFromCache(typeof(DiscoveryServerProtocol), base.Type)) == null && (serverType = (DiscoveryServerType)GetFromCache(typeof(DiscoveryServerProtocol), base.Type, excludeSchemeHostPort: true)) == null)
					{
						bool flag = IsCacheUnderPressure(typeof(DiscoveryServerProtocol), base.Type);
						string uri = RuntimeUtils.EscapeUri(base.Request.Url);
						serverType = new DiscoveryServerType(base.Type, uri, flag);
						AddToCache(typeof(DiscoveryServerProtocol), base.Type, serverType, flag);
					}
				}
			}
			return true;
		}

		internal override object[] ReadParameters()
		{
			return new object[0];
		}

		internal override void WriteReturns(object[] returnValues, Stream outputStream)
		{
			string text = base.Request.QueryString["schema"];
			Encoding encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false);
			if (text != null)
			{
				XmlSchema obj = serverType.GetSchema(text) ?? throw new InvalidOperationException(Res.GetString("WebSchemaNotFound"));
				base.Response.ContentType = ContentType.Compose("text/xml", encoding);
				obj.Write(new StreamWriter(outputStream, encoding));
				return;
			}
			text = base.Request.QueryString["wsdl"];
			if (text != null)
			{
				ServiceDescription serviceDescription = serverType.GetServiceDescription(text);
				if (serviceDescription == null)
				{
					throw new InvalidOperationException(Res.GetString("ServiceDescriptionWasNotFound0"));
				}
				base.Response.ContentType = ContentType.Compose("text/xml", encoding);
				if (serverType.UriFixups == null)
				{
					serviceDescription.Write(new StreamWriter(outputStream, encoding));
					return;
				}
				lock (syncRoot)
				{
					RunUriFixups();
					serviceDescription.Write(new StreamWriter(outputStream, encoding));
					return;
				}
			}
			string text2 = base.Request.QueryString[null];
			if (text2 != null && string.Compare(text2, "wsdl", StringComparison.OrdinalIgnoreCase) == 0)
			{
				base.Response.ContentType = ContentType.Compose("text/xml", encoding);
				if (serverType.UriFixups == null)
				{
					serverType.Description.Write(new StreamWriter(outputStream, encoding));
					return;
				}
				lock (syncRoot)
				{
					RunUriFixups();
					serverType.Description.Write(new StreamWriter(outputStream, encoding));
					return;
				}
			}
			if (text2 != null && string.Compare(text2, "disco", StringComparison.OrdinalIgnoreCase) == 0)
			{
				base.Response.ContentType = ContentType.Compose("text/xml", encoding);
				if (serverType.UriFixups == null)
				{
					serverType.Disco.Write(new StreamWriter(outputStream, encoding));
					return;
				}
				lock (syncRoot)
				{
					RunUriFixups();
					serverType.Disco.Write(new StreamWriter(outputStream, encoding));
					return;
				}
			}
			throw new InvalidOperationException(Res.GetString("internalError0"));
		}

		internal override bool WriteException(Exception e, Stream outputStream)
		{
			base.Response.Clear();
			base.Response.ClearHeaders();
			base.Response.ContentType = ContentType.Compose("text/plain", Encoding.UTF8);
			base.Response.StatusCode = 500;
			base.Response.StatusDescription = HttpWorkerRequest.GetStatusDescription(base.Response.StatusCode);
			StreamWriter streamWriter = new StreamWriter(outputStream, new UTF8Encoding(encoderShouldEmitUTF8Identifier: false));
			streamWriter.WriteLine(GenerateFaultString(e, htmlEscapeMessage: true));
			streamWriter.Flush();
			return true;
		}

		internal void Discover()
		{
		}

		private void RunUriFixups()
		{
			foreach (Action<Uri> uriFixup in serverType.UriFixups)
			{
				uriFixup(base.Context.Request.Url);
			}
		}
	}
	internal class DocumentationServerType : ServerType
	{
		private ServiceDescriptionCollection serviceDescriptions;

		private ServiceDescriptionCollection serviceDescriptionsWithPost;

		private XmlSchemas schemas;

		private XmlSchemas schemasWithPost;

		private LogicalMethodInfo methodInfo;

		public List<Action<Uri>> UriFixups { get; private set; }

		internal LogicalMethodInfo MethodInfo => methodInfo;

		internal XmlSchemas Schemas => schemas;

		internal ServiceDescriptionCollection ServiceDescriptions => serviceDescriptions;

		internal ServiceDescriptionCollection ServiceDescriptionsWithPost => serviceDescriptionsWithPost;

		internal XmlSchemas SchemasWithPost => schemasWithPost;

		private void AddUriFixup(Action<Uri> fixup)
		{
			if (UriFixups != null)
			{
				UriFixups.Add(fixup);
			}
		}

		internal DocumentationServerType(Type type, string uri, bool excludeSchemeHostPortFromCachingKey)
			: base(typeof(DocumentationServerProtocol))
		{
			if (excludeSchemeHostPortFromCachingKey)
			{
				UriFixups = new List<Action<Uri>>();
			}
			uri = new Uri(uri, dontEscape: true).GetLeftPart(UriPartial.Path);
			methodInfo = new LogicalMethodInfo(typeof(DocumentationServerProtocol).GetMethod("Documentation", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic));
			ServiceDescriptionReflector serviceDescriptionReflector = new ServiceDescriptionReflector(UriFixups);
			serviceDescriptionReflector.Reflect(type, uri);
			schemas = serviceDescriptionReflector.Schemas;
			serviceDescriptions = serviceDescriptionReflector.ServiceDescriptions;
			schemasWithPost = serviceDescriptionReflector.SchemasWithPost;
			serviceDescriptionsWithPost = serviceDescriptionReflector.ServiceDescriptionsWithPost;
		}
	}
	internal class DocumentationServerProtocolFactory : ServerProtocolFactory
	{
		protected override ServerProtocol CreateIfRequestCompatible(HttpRequest request)
		{
			if (request.PathInfo.Length > 0)
			{
				return null;
			}
			if (request.HttpMethod != "GET")
			{
				return new UnsupportedRequestProtocol(405);
			}
			return new DocumentationServerProtocol();
		}
	}
	internal sealed class DocumentationServerProtocol : ServerProtocol
	{
		private DocumentationServerType serverType;

		private IHttpHandler handler;

		private object syncRoot = new object();

		private const int MAX_PATH_SIZE = 1024;

		internal override ServerType ServerType => serverType;

		internal override bool IsOneWay => false;

		internal override LogicalMethodInfo MethodInfo => serverType.MethodInfo;

		internal override bool Initialize()
		{
			if ((serverType = (DocumentationServerType)GetFromCache(typeof(DocumentationServerProtocol), base.Type)) == null && (serverType = (DocumentationServerType)GetFromCache(typeof(DocumentationServerProtocol), base.Type, excludeSchemeHostPort: true)) == null)
			{
				lock (ServerProtocol.InternalSyncObject)
				{
					if ((serverType = (DocumentationServerType)GetFromCache(typeof(DocumentationServerProtocol), base.Type)) == null && (serverType = (DocumentationServerType)GetFromCache(typeof(DocumentationServerProtocol), base.Type, excludeSchemeHostPort: true)) == null)
					{
						bool flag = IsCacheUnderPressure(typeof(DocumentationServerProtocol), base.Type);
						string uri = RuntimeUtils.EscapeUri(base.Request.Url);
						serverType = new DocumentationServerType(base.Type, uri, flag);
						AddToCache(typeof(DocumentationServerProtocol), base.Type, serverType, flag);
					}
				}
			}
			WebServicesSection current = WebServicesSection.Current;
			if (current.WsdlHelpGenerator.Href != null && current.WsdlHelpGenerator.Href.Length > 0)
			{
				TraceMethod caller = (Tracing.On ? new TraceMethod(this, "Initialize") : null);
				if (Tracing.On)
				{
					Tracing.Enter("ASP.NET", caller, new TraceMethod(typeof(PageParser), "GetCompiledPageInstance", current.WsdlHelpGenerator.HelpGeneratorVirtualPath, current.WsdlHelpGenerator.HelpGeneratorPath, base.Context));
				}
				handler = GetCompiledPageInstance(current.WsdlHelpGenerator.HelpGeneratorVirtualPath, current.WsdlHelpGenerator.HelpGeneratorPath, base.Context);
				if (Tracing.On)
				{
					Tracing.Exit("ASP.NET", caller);
				}
			}
			return true;
		}

		[SecurityPermission(SecurityAction.Assert, Unrestricted = true)]
		[FileIOPermission(SecurityAction.Assert, Unrestricted = true)]
		private IHttpHandler GetCompiledPageInstance(string virtualPath, string inputFile, HttpContext context)
		{
			return PageParser.GetCompiledPageInstance(virtualPath, inputFile, context);
		}

		internal override object[] ReadParameters()
		{
			return new object[0];
		}

		internal override void WriteReturns(object[] returnValues, Stream outputStream)
		{
			try
			{
				if (handler == null)
				{
					return;
				}
				base.Context.Items.Add("wsdls", serverType.ServiceDescriptions);
				base.Context.Items.Add("schemas", serverType.Schemas);
				if (base.Context.Request.Url.IsLoopback || base.Context.Request.IsLocal)
				{
					base.Context.Items.Add("wsdlsWithPost", serverType.ServiceDescriptionsWithPost);
					base.Context.Items.Add("schemasWithPost", serverType.SchemasWithPost);
				}
				base.Context.Items.Add("conformanceWarnings", WebServicesSection.Current.EnabledConformanceWarnings);
				base.Response.ContentType = "text/html";
				if (serverType.UriFixups == null)
				{
					handler.ProcessRequest(base.Context);
					return;
				}
				lock (syncRoot)
				{
					RunUriFixups();
					handler.ProcessRequest(base.Context);
				}
			}
			catch (Exception ex)
			{
				if (ex is ThreadAbortException || ex is StackOverflowException || ex is OutOfMemoryException)
				{
					throw;
				}
				throw new InvalidOperationException(Res.GetString("HelpGeneratorInternalError"), ex);
			}
		}

		internal override bool WriteException(Exception e, Stream outputStream)
		{
			return false;
		}

		internal void Documentation()
		{
		}

		private void RunUriFixups()
		{
			foreach (Action<Uri> uriFixup in serverType.UriFixups)
			{
				uriFixup(base.Context.Request.Url);
			}
		}
	}
	public class HtmlFormParameterReader : ValueCollectionParameterReader
	{
		internal const string MimeType = "application/x-www-form-urlencoded";

		public override object[] Read(HttpRequest request)
		{
			if (!ContentType.MatchesBase(request.ContentType, "application/x-www-form-urlencoded"))
			{
				return null;
			}
			return Read(request.Form);
		}
	}
	public class HtmlFormParameterWriter : UrlEncodedParameterWriter
	{
		public override bool UsesWriteRequest => true;

		public override void InitializeRequest(WebRequest request, object[] values)
		{
			request.ContentType = ContentType.Compose("application/x-www-form-urlencoded", RequestEncoding);
		}

		public override void WriteRequest(Stream requestStream, object[] values)
		{
			if (values.Length != 0)
			{
				TextWriter textWriter = new StreamWriter(requestStream, new ASCIIEncoding());
				Encode(textWriter, values);
				textWriter.Flush();
			}
		}
	}
	internal class HttpClientMethod
	{
		internal Type readerType;

		internal object readerInitializer;

		internal Type writerType;

		internal object writerInitializer;

		internal LogicalMethodInfo methodInfo;
	}
	internal class HttpClientType
	{
		private Hashtable methods = new Hashtable();

		internal HttpClientType(Type type)
		{
			LogicalMethodInfo[] array = LogicalMethodInfo.Create(type.GetMethods(), LogicalMethodTypes.Sync);
			Hashtable hashtable = new Hashtable();
			foreach (LogicalMethodInfo logicalMethodInfo in array)
			{
				try
				{
					object[] customAttributes = logicalMethodInfo.GetCustomAttributes(typeof(HttpMethodAttribute));
					if (customAttributes.Length != 0)
					{
						HttpMethodAttribute httpMethodAttribute = (HttpMethodAttribute)customAttributes[0];
						HttpClientMethod httpClientMethod = new HttpClientMethod
						{
							readerType = httpMethodAttribute.ReturnFormatter,
							writerType = httpMethodAttribute.ParameterFormatter,
							methodInfo = logicalMethodInfo
						};
						AddFormatter(hashtable, httpClientMethod.readerType, httpClientMethod);
						AddFormatter(hashtable, httpClientMethod.writerType, httpClientMethod);
						methods.Add(logicalMethodInfo.Name, httpClientMethod);
					}
				}
				catch (Exception ex)
				{
					if (ex is ThreadAbortException || ex is StackOverflowException || ex is OutOfMemoryException)
					{
						throw;
					}
					throw new InvalidOperationException(Res.GetString("WebReflectionError", logicalMethodInfo.DeclaringType.FullName, logicalMethodInfo.Name), ex);
				}
			}
			foreach (Type key in hashtable.Keys)
			{
				ArrayList arrayList = (ArrayList)hashtable[key];
				LogicalMethodInfo[] array2 = new LogicalMethodInfo[arrayList.Count];
				for (int j = 0; j < arrayList.Count; j++)
				{
					array2[j] = ((HttpClientMethod)arrayList[j]).methodInfo;
				}
				object[] initializers = MimeFormatter.GetInitializers(key, array2);
				bool flag = typeof(MimeParameterWriter).IsAssignableFrom(key);
				for (int k = 0; k < arrayList.Count; k++)
				{
					if (flag)
					{
						((HttpClientMethod)arrayList[k]).writerInitializer = initializers[k];
					}
					else
					{
						((HttpClientMethod)arrayList[k]).readerInitializer = initializers[k];
					}
				}
			}
		}

		private static void AddFormatter(Hashtable formatterTypes, Type formatterType, HttpClientMethod method)
		{
			if (!(formatterType == null))
			{
				ArrayList arrayList = (ArrayList)formatterTypes[formatterType];
				if (arrayList == null)
				{
					arrayList = new ArrayList();
					formatterTypes.Add(formatterType, arrayList);
				}
				arrayList.Add(method);
			}
		}

		internal HttpClientMethod GetMethod(string name)
		{
			return (HttpClientMethod)methods[name];
		}
	}
	[ComVisible(true)]
	public abstract class HttpSimpleClientProtocol : HttpWebClientProtocol
	{
		private class InvokeAsyncState
		{
			internal object[] Parameters;

			internal MimeParameterWriter ParamWriter;

			internal HttpClientMethod Method;

			internal InvokeAsyncState(HttpClientMethod method, MimeParameterWriter paramWriter, object[] parameters)
			{
				Method = method;
				ParamWriter = paramWriter;
				Parameters = parameters;
			}
		}

		private HttpClientType clientType;

		protected HttpSimpleClientProtocol()
		{
			Type type = GetType();
			clientType = (HttpClientType)WebClientProtocol.GetFromCache(type);
			if (clientType != null)
			{
				return;
			}
			lock (WebClientProtocol.InternalSyncObject)
			{
				clientType = (HttpClientType)WebClientProtocol.GetFromCache(type);
				if (clientType == null)
				{
					clientType = new HttpClientType(type);
					WebClientProtocol.AddToCache(type, clientType);
				}
			}
		}

		protected object Invoke(string methodName, string requestUrl, object[] parameters)
		{
			WebResponse webResponse = null;
			HttpClientMethod clientMethod = GetClientMethod(methodName);
			MimeParameterWriter parameterWriter = GetParameterWriter(clientMethod);
			Uri uri = new Uri(requestUrl);
			if (parameterWriter != null)
			{
				parameterWriter.RequestEncoding = base.RequestEncoding;
				requestUrl = parameterWriter.GetRequestUrl(uri.AbsoluteUri, parameters);
				uri = new Uri(requestUrl, dontEscape: true);
			}
			WebRequest webRequest = null;
			try
			{
				webRequest = GetWebRequest(uri);
				NotifyClientCallOut(webRequest);
				base.PendingSyncRequest = webRequest;
				if (parameterWriter != null)
				{
					parameterWriter.InitializeRequest(webRequest, parameters);
					if (parameterWriter.UsesWriteRequest)
					{
						if (parameters.Length == 0)
						{
							webRequest.ContentLength = 0L;
						}
						else
						{
							Stream stream = null;
							try
							{
								stream = webRequest.GetRequestStream();
								parameterWriter.WriteRequest(stream, parameters);
							}
							finally
							{
								stream?.Close();
							}
						}
					}
				}
				webResponse = GetWebResponse(webRequest);
				Stream responseStream = null;
				if (webResponse.ContentLength != 0L)
				{
					responseStream = webResponse.GetResponseStream();
				}
				return ReadResponse(clientMethod, webResponse, responseStream);
			}
			finally
			{
				if (webRequest == base.PendingSyncRequest)
				{
					base.PendingSyncRequest = null;
				}
			}
		}

		protected IAsyncResult BeginInvoke(string methodName, string requestUrl, object[] parameters, AsyncCallback callback, object asyncState)
		{
			HttpClientMethod clientMethod = GetClientMethod(methodName);
			MimeParameterWriter parameterWriter = GetParameterWriter(clientMethod);
			Uri uri = new Uri(requestUrl);
			if (parameterWriter != null)
			{
				parameterWriter.RequestEncoding = base.RequestEncoding;
				requestUrl = parameterWriter.GetRequestUrl(uri.AbsoluteUri, parameters);
				uri = new Uri(requestUrl, dontEscape: true);
			}
			InvokeAsyncState internalAsyncState = new InvokeAsyncState(clientMethod, parameterWriter, parameters);
			WebClientAsyncResult asyncResult = new WebClientAsyncResult(this, internalAsyncStat

Room Architect Tool_Data/Managed/System.Windows.Forms.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.ComponentModel.Design.Serialization;
using System.Configuration;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Design;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.Drawing.Printing;
using System.Drawing.Text;
using System.Globalization;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Reflection;
using System.Reflection.Emit;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.Security;
using System.Security.Permissions;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Timers;
using System.Windows.Forms;
using System.Windows.Forms.CarbonInternal;
using System.Windows.Forms.ComponentModel.Com2Interop;
using System.Windows.Forms.Design;
using System.Windows.Forms.Layout;
using System.Windows.Forms.PropertyGridInternal;
using System.Windows.Forms.RTF;
using System.Windows.Forms.Theming;
using System.Windows.Forms.Theming.Default;
using System.Windows.Forms.Theming.VisualStyles;
using System.Windows.Forms.VisualStyles;
using System.Windows.Forms.WebBrowserDialogs;
using System.Xml;
using Accessibility;
using Microsoft.Win32;
using Mono.Unix.Native;
using Mono.WebBrowser;
using Mono.WebBrowser.DOM;

[assembly: AssemblyDefaultAlias("System.Windows.Forms.dll")]
[assembly: AssemblyProduct("MONO Common language infrastructure")]
[assembly: AssemblyCopyright("(c) various MONO Authors")]
[assembly: SatelliteContractVersion("2.0.0.0")]
[assembly: AssemblyInformationalVersion("2.0.50727.1433")]
[assembly: CLSCompliant(true)]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: ComVisible(false)]
[assembly: AllowPartiallyTrustedCallers]
[assembly: AssemblyDelaySign(true)]
[assembly: AssemblyKeyFile("../ecma.pub")]
[assembly: AssemblyFileVersion("2.0.50727.1433")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: CompilationRelaxations(CompilationRelaxations.NoStringInterning)]
[assembly: Dependency("System.Drawing,", LoadHint.Always)]
[assembly: Dependency("System,", LoadHint.Always)]
[assembly: StringFreezing]
[assembly: ComCompatibleVersion(1, 0, 3300, 0)]
[assembly: InternalsVisibleTo("UIAutomationWinforms, PublicKey=00240000048000009400000006020000002400005253413100040000110000004bb98b1af6c1df0df8c02c380e116b7a7f0c8c827aecfccddc6e29b7c754cd608b49dfcef4df9699ad182e50f66afa4e68dabc7b6aeeec0aa4719a5f8e0aae8c193080a706adc3443a8356b1f254142034995532ac176398e12a30f6a74a119a89ac47672c9ae24d7e90de686557166e3b873cd707884431a0451d9d6f7fe795")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: AssemblyTitle("System.Windows.Forms.dll")]
[assembly: AssemblyDescription("System.Windows.Forms.dll")]
[assembly: AssemblyCompany("MONO development team")]
[assembly: PermissionSet(SecurityAction.RequestMinimum, XML = "<PermissionSet class=\"System.Security.PermissionSet\"\nversion=\"1\">\n<IPermission class=\"System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\"\nversion=\"1\"\nFlags=\"SkipVerification\"/>\n</PermissionSet>\n")]
[assembly: AssemblyVersion("2.0.0.0")]
[module: UnverifiableCode]
internal static class Consts
{
	public const string MonoVersion = "2.6.5.0";

	public const string MonoCompany = "MONO development team";

	public const string MonoProduct = "MONO Common language infrastructure";

	public const string MonoCopyright = "(c) various MONO Authors";

	public const string FxVersion = "2.0.0.0";

	public const string VsVersion = "8.0.0.0";

	public const string FxFileVersion = "2.0.50727.1433";

	public const string VsFileVersion = "8.0.50727.1433";

	public const string AssemblyI18N = "I18N, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMono_Http = "Mono.Http, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Posix = "Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Security = "Mono.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Messaging_RabbitMQ = "Mono.Messaging.RabbitMQ, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyCorlib = "mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Data = "System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Design = "System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing = "System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing_Design = "System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Messaging = "System.Messaging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Security = "System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Web = "System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Core = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
namespace System
{
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoTODOAttribute : Attribute
	{
		private string comment;

		public string Comment => comment;

		public MonoTODOAttribute()
		{
		}

		public MonoTODOAttribute(string comment)
		{
			this.comment = comment;
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoDocumentationNoteAttribute : MonoTODOAttribute
	{
		public MonoDocumentationNoteAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoExtensionAttribute : MonoTODOAttribute
	{
		public MonoExtensionAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoInternalNoteAttribute : MonoTODOAttribute
	{
		public MonoInternalNoteAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoLimitationAttribute : MonoTODOAttribute
	{
		public MonoLimitationAttribute(string comment)
			: base(comment)
		{
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
	internal class MonoNotSupportedAttribute : MonoTODOAttribute
	{
		public MonoNotSupportedAttribute(string comment)
			: base(comment)
		{
		}
	}
}
namespace System.Windows.Forms
{
	internal sealed class Locale
	{
		public static string GetText(string msg)
		{
			return msg;
		}

		public static string GetText(string msg, params object[] args)
		{
			return string.Format(GetText(msg), args);
		}
	}
}
namespace System.Resources
{
	[Serializable]
	public sealed class ResXDataNode : ISerializable
	{
		private string name;

		private object value;

		private Type type;

		private ResXFileRef fileRef;

		private string comment;

		private Point pos;

		public string Comment
		{
			get
			{
				return comment;
			}
			set
			{
				comment = value;
			}
		}

		public ResXFileRef FileRef => fileRef;

		public string Name
		{
			get
			{
				return name;
			}
			set
			{
				name = value;
			}
		}

		internal object Value => value;

		public ResXDataNode(string name, object value)
			: this(name, value, Point.Empty)
		{
		}

		public ResXDataNode(string name, ResXFileRef fileRef)
		{
			if (name == null)
			{
				throw new ArgumentNullException("name");
			}
			if (fileRef == null)
			{
				throw new ArgumentNullException("fileRef");
			}
			if (name.Length == 0)
			{
				throw new ArgumentException("name");
			}
			this.name = name;
			this.fileRef = fileRef;
			pos = Point.Empty;
		}

		internal ResXDataNode(string name, object value, Point position)
		{
			if (name == null)
			{
				throw new ArgumentNullException("name");
			}
			if (name.Length == 0)
			{
				throw new ArgumentException("name");
			}
			Type type = ((value != null) ? value.GetType() : typeof(object));
			if (value != null && !type.IsSerializable)
			{
				throw new InvalidOperationException($"'{name}' of type '{type}' cannot be added because it is not serializable");
			}
			this.type = type;
			this.name = name;
			this.value = value;
			pos = position;
		}

		void ISerializable.GetObjectData(SerializationInfo si, StreamingContext context)
		{
			si.AddValue("Name", Name);
			si.AddValue("Comment", Comment);
		}

		public Point GetNodePosition()
		{
			return pos;
		}

		[MonoInternalNote("Move the type parsing process from ResxResourceReader")]
		public string GetValueTypeName(AssemblyName[] names)
		{
			return type.AssemblyQualifiedName;
		}

		[MonoInternalNote("Move the type parsing process from ResxResourceReader")]
		public string GetValueTypeName(ITypeResolutionService typeResolver)
		{
			return type.AssemblyQualifiedName;
		}

		[MonoInternalNote("Move the value parsing process from ResxResourceReader")]
		public object GetValue(AssemblyName[] names)
		{
			return value;
		}

		[MonoInternalNote("Move the value parsing process from ResxResourceReader")]
		public object GetValue(ITypeResolutionService typeResolver)
		{
			return value;
		}
	}
	[Serializable]
	[TypeConverter(typeof(Converter))]
	public class ResXFileRef
	{
		public class Converter : TypeConverter
		{
			public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
			{
				return (object)sourceType == typeof(string);
			}

			public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
			{
				return (object)destinationType == typeof(string);
			}

			public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
			{
				//IL_0114: Unknown result type (might be due to invalid IL or missing references)
				if (!(value is string))
				{
					return null;
				}
				string[] array = Parse((string)value);
				if (array.Length == 1)
				{
					throw new ArgumentException("value");
				}
				Type type = Type.GetType(array[1]);
				if ((object)type == typeof(string))
				{
					using (TextReader textReader = new StreamReader(encoding: (array.Length <= 2) ? Encoding.Default : Encoding.GetEncoding(array[2]), path: array[0]))
					{
						return textReader.ReadToEnd();
					}
				}
				byte[] array2;
				using (FileStream fileStream = new FileStream(array[0], FileMode.Open, FileAccess.Read, FileShare.Read))
				{
					array2 = new byte[fileStream.Length];
					fileStream.Read(array2, 0, (int)fileStream.Length);
				}
				if ((object)type == typeof(byte[]))
				{
					return array2;
				}
				if ((object)type == typeof(Bitmap) && Path.GetExtension(array[0]) == ".ico")
				{
					MemoryStream memoryStream = new MemoryStream(array2);
					return new Icon((Stream)memoryStream).ToBitmap();
				}
				if ((object)type == typeof(MemoryStream))
				{
					return new MemoryStream(array2);
				}
				return Activator.CreateInstance(type, BindingFlags.Instance | BindingFlags.Public | BindingFlags.CreateInstance, null, new object[1]
				{
					new MemoryStream(array2)
				}, culture);
			}

			public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
			{
				if ((object)destinationType != typeof(string))
				{
					return base.ConvertTo(context, culture, value, destinationType);
				}
				return ((ResXFileRef)value).ToString();
			}
		}

		private string filename;

		private string typename;

		private Encoding textFileEncoding;

		public string FileName => filename;

		public Encoding TextFileEncoding => textFileEncoding;

		public string TypeName => typename;

		public ResXFileRef(string fileName, string typeName)
		{
			if (fileName == null)
			{
				throw new ArgumentNullException("fileName");
			}
			if (typeName == null)
			{
				throw new ArgumentNullException("typeName");
			}
			filename = fileName;
			typename = typeName;
		}

		public ResXFileRef(string fileName, string typeName, Encoding textFileEncoding)
			: this(fileName, typeName)
		{
			this.textFileEncoding = textFileEncoding;
		}

		public override string ToString()
		{
			StringBuilder stringBuilder = new StringBuilder();
			if (filename != null)
			{
				stringBuilder.Append(filename);
			}
			stringBuilder.Append(';');
			if (typename != null)
			{
				stringBuilder.Append(typename);
			}
			if (textFileEncoding != null)
			{
				stringBuilder.Append(';');
				stringBuilder.Append(textFileEncoding.WebName);
			}
			return stringBuilder.ToString();
		}

		internal static string[] Parse(string fileRef)
		{
			if (fileRef == null)
			{
				throw new ArgumentNullException("fileRef");
			}
			return fileRef.Split(new char[1] { ';' });
		}
	}
	[Serializable]
	internal class ResXNullRef
	{
	}
	public class ResXResourceReader : IDisposable, IResourceReader, IEnumerable
	{
		private class ResXHeader
		{
			private string resMimeType;

			private string reader;

			private string version;

			private string writer;

			public string ResMimeType
			{
				get
				{
					return resMimeType;
				}
				set
				{
					resMimeType = value;
				}
			}

			public string Reader
			{
				get
				{
					return reader;
				}
				set
				{
					reader = value;
				}
			}

			public string Version
			{
				get
				{
					return version;
				}
				set
				{
					version = value;
				}
			}

			public string Writer
			{
				get
				{
					return writer;
				}
				set
				{
					writer = value;
				}
			}

			public bool IsValid
			{
				get
				{
					if (string.Compare(ResMimeType, ResXResourceWriter.ResMimeType) != 0)
					{
						return false;
					}
					if (Reader == null || Writer == null)
					{
						return false;
					}
					string text = Reader.Split(new char[1] { ',' })[0].Trim();
					if (text != typeof(ResXResourceReader).FullName)
					{
						return false;
					}
					string text2 = Writer.Split(new char[1] { ',' })[0].Trim();
					if (text2 != typeof(ResXResourceWriter).FullName)
					{
						return false;
					}
					return true;
				}
			}

			public void Verify()
			{
				if (!IsValid)
				{
					throw new ArgumentException("Invalid ResX input.  Could not find valid \"resheader\" tags for the ResX reader & writer type names.");
				}
			}
		}

		private string fileName;

		private Stream stream;

		private TextReader reader;

		private Hashtable hasht;

		private ITypeResolutionService typeresolver;

		private XmlTextReader xmlReader;

		private string basepath;

		private bool useResXDataNodes;

		private AssemblyName[] assemblyNames;

		private Hashtable hashtm;

		public string BasePath
		{
			get
			{
				return basepath;
			}
			set
			{
				basepath = value;
			}
		}

		public bool UseResXDataNodes
		{
			get
			{
				return useResXDataNodes;
			}
			set
			{
				if (xmlReader != null)
				{
					throw new InvalidOperationException();
				}
				useResXDataNodes = value;
			}
		}

		public ResXResourceReader(Stream stream)
		{
			if (stream == null)
			{
				throw new ArgumentNullException("stream");
			}
			if (!stream.CanRead)
			{
				throw new ArgumentException("Stream was not readable.");
			}
			this.stream = stream;
		}

		public ResXResourceReader(Stream stream, ITypeResolutionService typeResolver)
			: this(stream)
		{
			typeresolver = typeResolver;
		}

		public ResXResourceReader(string fileName)
		{
			this.fileName = fileName;
		}

		public ResXResourceReader(string fileName, ITypeResolutionService typeResolver)
			: this(fileName)
		{
			typeresolver = typeResolver;
		}

		public ResXResourceReader(TextReader reader)
		{
			this.reader = reader;
		}

		public ResXResourceReader(TextReader reader, ITypeResolutionService typeResolver)
			: this(reader)
		{
			typeresolver = typeResolver;
		}

		public ResXResourceReader(Stream stream, AssemblyName[] assemblyNames)
			: this(stream)
		{
			this.assemblyNames = assemblyNames;
		}

		public ResXResourceReader(string fileName, AssemblyName[] assemblyNames)
			: this(fileName)
		{
			this.assemblyNames = assemblyNames;
		}

		public ResXResourceReader(TextReader reader, AssemblyName[] assemblyNames)
			: this(reader)
		{
			this.assemblyNames = assemblyNames;
		}

		IEnumerator IEnumerable.GetEnumerator()
		{
			return ((IResourceReader)this).GetEnumerator();
		}

		void IDisposable.Dispose()
		{
			Dispose(disposing: true);
			GC.SuppressFinalize(this);
		}

		~ResXResourceReader()
		{
			Dispose(disposing: false);
		}

		private void LoadData()
		{
			hasht = new Hashtable();
			hashtm = new Hashtable();
			if (fileName != null)
			{
				stream = File.OpenRead(fileName);
			}
			try
			{
				xmlReader = null;
				if (stream != null)
				{
					xmlReader = new XmlTextReader(stream);
				}
				else if (reader != null)
				{
					xmlReader = new XmlTextReader(reader);
				}
				if (xmlReader == null)
				{
					throw new InvalidOperationException("ResourceReader is closed.");
				}
				xmlReader.WhitespaceHandling = WhitespaceHandling.None;
				ResXHeader resXHeader = new ResXHeader();
				try
				{
					while (xmlReader.Read())
					{
						if (xmlReader.NodeType == XmlNodeType.Element)
						{
							switch (xmlReader.LocalName)
							{
							case "resheader":
								ParseHeaderNode(resXHeader);
								break;
							case "data":
								ParseDataNode(meta: false);
								break;
							case "metadata":
								ParseDataNode(meta: true);
								break;
							}
						}
					}
				}
				catch (XmlException innerException)
				{
					throw new ArgumentException("Invalid ResX input.", innerException);
				}
				catch (Exception ex)
				{
					XmlException innerException2 = new XmlException(ex.Message, ex, xmlReader.LineNumber, xmlReader.LinePosition);
					throw new ArgumentException("Invalid ResX input.", innerException2);
				}
				resXHeader.Verify();
			}
			finally
			{
				if (fileName != null)
				{
					stream.Close();
					stream = null;
				}
				xmlReader = null;
			}
		}

		private void ParseHeaderNode(ResXHeader header)
		{
			string attribute = GetAttribute("name");
			if (attribute != null)
			{
				if (string.Compare(attribute, "resmimetype", ignoreCase: true) == 0)
				{
					header.ResMimeType = GetHeaderValue();
				}
				else if (string.Compare(attribute, "reader", ignoreCase: true) == 0)
				{
					header.Reader = GetHeaderValue();
				}
				else if (string.Compare(attribute, "version", ignoreCase: true) == 0)
				{
					header.Version = GetHeaderValue();
				}
				else if (string.Compare(attribute, "writer", ignoreCase: true) == 0)
				{
					header.Writer = GetHeaderValue();
				}
			}
		}

		private string GetHeaderValue()
		{
			string text = null;
			xmlReader.ReadStartElement();
			if (xmlReader.NodeType == XmlNodeType.Element)
			{
				return xmlReader.ReadElementString();
			}
			return xmlReader.Value.Trim();
		}

		private string GetAttribute(string name)
		{
			if (!xmlReader.HasAttributes)
			{
				return null;
			}
			for (int i = 0; i < xmlReader.AttributeCount; i++)
			{
				xmlReader.MoveToAttribute(i);
				if (string.Compare(xmlReader.Name, name, ignoreCase: true) == 0)
				{
					string value = xmlReader.Value;
					xmlReader.MoveToElement();
					return value;
				}
			}
			xmlReader.MoveToElement();
			return null;
		}

		private string GetDataValue(bool meta, out string comment)
		{
			string result = null;
			comment = null;
			while (xmlReader.Read() && (xmlReader.NodeType != XmlNodeType.EndElement || !(xmlReader.LocalName == ((!meta) ? "data" : "metadata"))))
			{
				if (xmlReader.NodeType == XmlNodeType.Element)
				{
					if (xmlReader.Name.Equals("value"))
					{
						xmlReader.WhitespaceHandling = WhitespaceHandling.Significant;
						result = xmlReader.ReadString();
						xmlReader.WhitespaceHandling = WhitespaceHandling.None;
					}
					else if (xmlReader.Name.Equals("comment"))
					{
						xmlReader.WhitespaceHandling = WhitespaceHandling.Significant;
						comment = xmlReader.ReadString();
						xmlReader.WhitespaceHandling = WhitespaceHandling.None;
						if (xmlReader.NodeType == XmlNodeType.EndElement && xmlReader.LocalName == ((!meta) ? "data" : "metadata"))
						{
							break;
						}
					}
				}
				else
				{
					result = xmlReader.Value.Trim();
				}
			}
			return result;
		}

		private void ParseDataNode(bool meta)
		{
			Hashtable hashtable = ((!meta || useResXDataNodes) ? hasht : hashtm);
			Point position = new Point(xmlReader.LineNumber, xmlReader.LinePosition);
			string attribute = GetAttribute("name");
			string attribute2 = GetAttribute("type");
			string attribute3 = GetAttribute("mimetype");
			Type type = ((attribute2 != null) ? ResolveType(attribute2) : null);
			if (attribute2 != null && (object)type == null)
			{
				throw new ArgumentException($"The type '{attribute2}' of the element '{attribute}' could not be resolved.");
			}
			if ((object)type == typeof(ResXNullRef))
			{
				if (useResXDataNodes)
				{
					hashtable[attribute] = new ResXDataNode(attribute, null, position);
				}
				else
				{
					hashtable[attribute] = null;
				}
				return;
			}
			string comment = null;
			string dataValue = GetDataValue(meta, out comment);
			object obj = null;
			if (attribute3 != null && attribute3.Length > 0)
			{
				if (attribute3 == ResXResourceWriter.BinSerializedObjectMimeType)
				{
					byte[] buffer = Convert.FromBase64String(dataValue);
					BinaryFormatter binaryFormatter = new BinaryFormatter();
					using MemoryStream serializationStream = new MemoryStream(buffer);
					obj = binaryFormatter.Deserialize(serializationStream);
				}
				else if (attribute3 == ResXResourceWriter.ByteArraySerializedObjectMimeType && (object)type != null)
				{
					TypeConverter converter = TypeDescriptor.GetConverter(type);
					if (converter.CanConvertFrom(typeof(byte[])))
					{
						obj = converter.ConvertFrom(Convert.FromBase64String(dataValue));
					}
				}
			}
			else if ((object)type != null)
			{
				if ((object)type == typeof(byte[]))
				{
					obj = Convert.FromBase64String(dataValue);
				}
				else
				{
					TypeConverter converter2 = TypeDescriptor.GetConverter(type);
					if (converter2.CanConvertFrom(typeof(string)))
					{
						if (BasePath != null && (object)type == typeof(ResXFileRef))
						{
							string[] array = ResXFileRef.Parse(dataValue);
							array[0] = Path.Combine(BasePath, array[0]);
							obj = converter2.ConvertFromInvariantString(string.Join(";", array));
						}
						else
						{
							obj = converter2.ConvertFromInvariantString(dataValue);
						}
					}
				}
			}
			else
			{
				obj = dataValue;
			}
			if (attribute == null)
			{
				throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Could not find a name for a resource. The resource value was '{0}'.", new object[1] { obj }));
			}
			if (useResXDataNodes)
			{
				ResXDataNode resXDataNode = new ResXDataNode(attribute, obj, position);
				resXDataNode.Comment = comment;
				hashtable[attribute] = resXDataNode;
			}
			else
			{
				hashtable[attribute] = obj;
			}
		}

		private Type ResolveType(string type)
		{
			if (typeresolver != null)
			{
				return typeresolver.GetType(type);
			}
			if (assemblyNames != null)
			{
				AssemblyName[] array = assemblyNames;
				foreach (AssemblyName assemblyRef in array)
				{
					Assembly assembly = Assembly.Load(assemblyRef);
					Type type2 = assembly.GetType(type, throwOnError: false);
					if ((object)type2 != null)
					{
						return type2;
					}
				}
			}
			return Type.GetType(type);
		}

		public void Close()
		{
			if (reader != null)
			{
				reader.Close();
				reader = null;
			}
		}

		public IDictionaryEnumerator GetEnumerator()
		{
			if (hasht == null)
			{
				LoadData();
			}
			return hasht.GetEnumerator();
		}

		protected virtual void Dispose(bool disposing)
		{
			if (disposing)
			{
				Close();
			}
		}

		public static ResXResourceReader FromFileContents(string fileContents)
		{
			return new ResXResourceReader(new StringReader(fileContents));
		}

		public static ResXResourceReader FromFileContents(string fileContents, ITypeResolutionService typeResolver)
		{
			return new ResXResourceReader(new StringReader(fileContents), typeResolver);
		}

		public static ResXResourceReader FromFileContents(string fileContents, AssemblyName[] assemblyNames)
		{
			return new ResXResourceReader(new StringReader(fileContents), assemblyNames);
		}

		public IDictionaryEnumerator GetMetadataEnumerator()
		{
			if (hashtm == null)
			{
				LoadData();
			}
			return hashtm.GetEnumerator();
		}
	}
	public class ResXResourceSet : ResourceSet
	{
		public ResXResourceSet(Stream stream)
		{
			Reader = new ResXResourceReader(stream);
			base.Table = new Hashtable();
			ReadResources();
		}

		public ResXResourceSet(string fileName)
		{
			Reader = new ResXResourceReader(fileName);
			base.Table = new Hashtable();
			ReadResources();
		}

		public override Type GetDefaultReader()
		{
			return typeof(ResXResourceReader);
		}

		public override Type GetDefaultWriter()
		{
			return typeof(ResXResourceWriter);
		}
	}
	public class ResXResourceWriter : IDisposable, IResourceWriter
	{
		private string filename;

		private Stream stream;

		private TextWriter textwriter;

		private XmlTextWriter writer;

		private bool written;

		private string base_path;

		public static readonly string BinSerializedObjectMimeType = "application/x-microsoft.net.object.binary.base64";

		public static readonly string ByteArraySerializedObjectMimeType = "application/x-microsoft.net.object.bytearray.base64";

		public static readonly string DefaultSerializedObjectMimeType = BinSerializedObjectMimeType;

		public static readonly string ResMimeType = "text/microsoft-resx";

		public static readonly string ResourceSchema = schema;

		public static readonly string SoapSerializedObjectMimeType = "application/x-microsoft.net.object.soap.base64";

		public static readonly string Version = "2.0";

		private static string schema = "\n  <xsd:schema id='root' xmlns='' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:msdata='urn:schemas-microsoft-com:xml-msdata'>\n    <xsd:element name='root' msdata:IsDataSet='true'>\n      <xsd:complexType>\n        <xsd:choice maxOccurs='unbounded'>\n          <xsd:element name='data'>\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name='value' type='xsd:string' minOccurs='0' msdata:Ordinal='1' />\n                <xsd:element name='comment' type='xsd:string' minOccurs='0' msdata:Ordinal='2' />\n              </xsd:sequence>\n              <xsd:attribute name='name' type='xsd:string' msdata:Ordinal='1' />\n              <xsd:attribute name='type' type='xsd:string' msdata:Ordinal='3' />\n              <xsd:attribute name='mimetype' type='xsd:string' msdata:Ordinal='4' />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name='resheader'>\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name='value' type='xsd:string' minOccurs='0' msdata:Ordinal='1' />\n              </xsd:sequence>\n              <xsd:attribute name='name' type='xsd:string' use='required' />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n".Replace("'", "\"");

		public string BasePath
		{
			get
			{
				return base_path;
			}
			set
			{
				base_path = value;
			}
		}

		public ResXResourceWriter(Stream stream)
		{
			if (stream == null)
			{
				throw new ArgumentNullException("stream");
			}
			if (!stream.CanWrite)
			{
				throw new ArgumentException("stream is not writable.", "stream");
			}
			this.stream = stream;
		}

		public ResXResourceWriter(TextWriter textWriter)
		{
			if (textWriter == null)
			{
				throw new ArgumentNullException("textWriter");
			}
			textwriter = textWriter;
		}

		public ResXResourceWriter(string fileName)
		{
			if (fileName == null)
			{
				throw new ArgumentNullException("fileName");
			}
			filename = fileName;
		}

		~ResXResourceWriter()
		{
			Dispose(disposing: false);
		}

		private void InitWriter()
		{
			if (filename != null)
			{
				stream = File.OpenWrite(filename);
			}
			if (textwriter == null)
			{
				textwriter = new StreamWriter(stream, Encoding.UTF8);
			}
			writer = new XmlTextWriter(textwriter);
			writer.Formatting = Formatting.Indented;
			writer.WriteStartDocument();
			writer.WriteStartElement("root");
			writer.WriteRaw(schema);
			WriteHeader("resmimetype", "text/microsoft-resx");
			WriteHeader("version", "1.3");
			WriteHeader("reader", typeof(ResXResourceReader).AssemblyQualifiedName);
			WriteHeader("writer", typeof(ResXResourceWriter).AssemblyQualifiedName);
		}

		private void WriteHeader(string name, string value)
		{
			writer.WriteStartElement("resheader");
			writer.WriteAttributeString("name", name);
			writer.WriteStartElement("value");
			writer.WriteString(value);
			writer.WriteEndElement();
			writer.WriteEndElement();
		}

		private void WriteNiceBase64(byte[] value, int offset, int length)
		{
			string text = Convert.ToBase64String(value, offset, length);
			StringBuilder stringBuilder = new StringBuilder(text, text.Length + (text.Length + 160) / 80 * 3);
			int i = 0;
			int num = 80 + Environment.NewLine.Length + 1;
			string value2 = Environment.NewLine + "\t";
			for (; i < stringBuilder.Length; i += num)
			{
				stringBuilder.Insert(i, value2);
			}
			stringBuilder.Insert(stringBuilder.Length, Environment.NewLine);
			writer.WriteString(stringBuilder.ToString());
		}

		private void WriteBytes(string name, Type type, byte[] value, int offset, int length)
		{
			WriteBytes(name, type, value, offset, length, string.Empty);
		}

		private void WriteBytes(string name, Type type, byte[] value, int offset, int length, string comment)
		{
			writer.WriteStartElement("data");
			writer.WriteAttributeString("name", name);
			if ((object)type != null)
			{
				writer.WriteAttributeString("type", type.AssemblyQualifiedName);
				if ((object)type != typeof(byte[]))
				{
					writer.WriteAttributeString("mimetype", ByteArraySerializedObjectMimeType);
				}
				writer.WriteStartElement("value");
				WriteNiceBase64(value, offset, length);
			}
			else
			{
				writer.WriteAttributeString("mimetype", BinSerializedObjectMimeType);
				writer.WriteStartElement("value");
				writer.WriteBase64(value, offset, length);
			}
			writer.WriteEndElement();
			if (comment != null && !comment.Equals(string.Empty))
			{
				writer.WriteStartElement("comment");
				writer.WriteString(comment);
				writer.WriteEndElement();
			}
			writer.WriteEndElement();
		}

		private void WriteBytes(string name, Type type, byte[] value)
		{
			WriteBytes(name, type, value, 0, value.Length);
		}

		private void WriteString(string name, string value)
		{
			WriteString(name, value, null);
		}

		private void WriteString(string name, string value, Type type)
		{
			WriteString(name, value, type, string.Empty);
		}

		private void WriteString(string name, string value, Type type, string comment)
		{
			writer.WriteStartElement("data");
			writer.WriteAttributeString("name", name);
			if ((object)type != null)
			{
				writer.WriteAttributeString("type", type.AssemblyQualifiedName);
			}
			writer.WriteStartElement("value");
			writer.WriteString(value);
			writer.WriteEndElement();
			if (comment != null && !comment.Equals(string.Empty))
			{
				writer.WriteStartElement("comment");
				writer.WriteString(comment);
				writer.WriteEndElement();
			}
			writer.WriteEndElement();
			writer.WriteWhitespace("\n  ");
		}

		public void AddResource(string name, byte[] value)
		{
			if (name == null)
			{
				throw new ArgumentNullException("name");
			}
			if (value == null)
			{
				throw new ArgumentNullException("value");
			}
			if (written)
			{
				throw new InvalidOperationException("The resource is already generated.");
			}
			if (writer == null)
			{
				InitWriter();
			}
			WriteBytes(name, value.GetType(), value);
		}

		public void AddResource(string name, object value)
		{
			AddResource(name, value, string.Empty);
		}

		private void AddResource(string name, object value, string comment)
		{
			if (value is string)
			{
				AddResource(name, (string)value);
				return;
			}
			if (value is byte[])
			{
				AddResource(name, (byte[])value);
				return;
			}
			if (name == null)
			{
				throw new ArgumentNullException("name");
			}
			if (value == null)
			{
				throw new ArgumentNullException("value");
			}
			if (!value.GetType().IsSerializable)
			{
				throw new InvalidOperationException($"The element '{name}' of type '{value.GetType().Name}' is not serializable.");
			}
			if (written)
			{
				throw new InvalidOperationException("The resource is already generated.");
			}
			if (writer == null)
			{
				InitWriter();
			}
			TypeConverter converter = TypeDescriptor.GetConverter(value);
			if (converter != null && converter.CanConvertTo(typeof(string)) && converter.CanConvertFrom(typeof(string)))
			{
				string value2 = converter.ConvertToInvariantString(value);
				WriteString(name, value2, value.GetType());
				return;
			}
			if (converter != null && converter.CanConvertTo(typeof(byte[])) && converter.CanConvertFrom(typeof(byte[])))
			{
				byte[] value3 = (byte[])converter.ConvertTo(value, typeof(byte[]));
				WriteBytes(name, value.GetType(), value3);
				return;
			}
			MemoryStream memoryStream = new MemoryStream();
			BinaryFormatter binaryFormatter = new BinaryFormatter();
			try
			{
				binaryFormatter.Serialize(memoryStream, value);
			}
			catch (Exception ex)
			{
				throw new InvalidOperationException(string.Concat("Cannot add a ", value.GetType(), "because it cannot be serialized: ", ex.Message));
			}
			WriteBytes(name, null, memoryStream.GetBuffer(), 0, (int)memoryStream.Length, comment);
			memoryStream.Close();
		}

		public void AddResource(string name, string value)
		{
			if (name == null)
			{
				throw new ArgumentNullException("name");
			}
			if (value == null)
			{
				throw new ArgumentNullException("value");
			}
			if (written)
			{
				throw new InvalidOperationException("The resource is already generated.");
			}
			if (writer == null)
			{
				InitWriter();
			}
			WriteString(name, value);
		}

		[MonoTODO("Stub, not implemented")]
		public virtual void AddAlias(string aliasName, AssemblyName assemblyName)
		{
		}

		public void AddResource(ResXDataNode node)
		{
			AddResource(node.Name, node.Value, node.Comment);
		}

		public void AddMetadata(string name, string value)
		{
			if (name == null)
			{
				throw new ArgumentNullException("name");
			}
			if (value == null)
			{
				throw new ArgumentNullException("value");
			}
			if (written)
			{
				throw new InvalidOperationException("The resource is already generated.");
			}
			if (writer == null)
			{
				InitWriter();
			}
			writer.WriteStartElement("metadata");
			writer.WriteAttributeString("name", name);
			writer.WriteAttributeString("xml:space", "preserve");
			writer.WriteElementString("value", value);
			writer.WriteEndElement();
		}

		public void AddMetadata(string name, byte[] value)
		{
			if (name == null)
			{
				throw new ArgumentNullException("name");
			}
			if (value == null)
			{
				throw new ArgumentNullException("value");
			}
			if (written)
			{
				throw new InvalidOperationException("The resource is already generated.");
			}
			if (writer == null)
			{
				InitWriter();
			}
			writer.WriteStartElement("metadata");
			writer.WriteAttributeString("name", name);
			writer.WriteAttributeString("type", value.GetType().AssemblyQualifiedName);
			writer.WriteStartElement("value");
			WriteNiceBase64(value, 0, value.Length);
			writer.WriteEndElement();
			writer.WriteEndElement();
		}

		public void AddMetadata(string name, object value)
		{
			if (value is string)
			{
				AddMetadata(name, (string)value);
				return;
			}
			if (value is byte[])
			{
				AddMetadata(name, (byte[])value);
				return;
			}
			if (name == null)
			{
				throw new ArgumentNullException("name");
			}
			if (value == null)
			{
				throw new ArgumentNullException("value");
			}
			if (!value.GetType().IsSerializable)
			{
				throw new InvalidOperationException($"The element '{name}' of type '{value.GetType().Name}' is not serializable.");
			}
			if (written)
			{
				throw new InvalidOperationException("The resource is already generated.");
			}
			if (writer == null)
			{
				InitWriter();
			}
			Type type = value.GetType();
			TypeConverter converter = TypeDescriptor.GetConverter(value);
			if (converter != null && converter.CanConvertTo(typeof(string)) && converter.CanConvertFrom(typeof(string)))
			{
				string text = converter.ConvertToInvariantString(value);
				writer.WriteStartElement("metadata");
				writer.WriteAttributeString("name", name);
				if ((object)type != null)
				{
					writer.WriteAttributeString("type", type.AssemblyQualifiedName);
				}
				writer.WriteStartElement("value");
				writer.WriteString(text);
				writer.WriteEndElement();
				writer.WriteEndElement();
				writer.WriteWhitespace("\n  ");
				return;
			}
			if (converter != null && converter.CanConvertTo(typeof(byte[])) && converter.CanConvertFrom(typeof(byte[])))
			{
				byte[] array = (byte[])converter.ConvertTo(value, typeof(byte[]));
				writer.WriteStartElement("metadata");
				writer.WriteAttributeString("name", name);
				if ((object)type != null)
				{
					writer.WriteAttributeString("type", type.AssemblyQualifiedName);
					writer.WriteAttributeString("mimetype", ByteArraySerializedObjectMimeType);
					writer.WriteStartElement("value");
					WriteNiceBase64(array, 0, array.Length);
				}
				else
				{
					writer.WriteAttributeString("mimetype", BinSerializedObjectMimeType);
					writer.WriteStartElement("value");
					writer.WriteBase64(array, 0, array.Length);
				}
				writer.WriteEndElement();
				writer.WriteEndElement();
				return;
			}
			MemoryStream memoryStream = new MemoryStream();
			BinaryFormatter binaryFormatter = new BinaryFormatter();
			try
			{
				binaryFormatter.Serialize(memoryStream, value);
			}
			catch (Exception ex)
			{
				throw new InvalidOperationException(string.Concat("Cannot add a ", value.GetType(), "because it cannot be serialized: ", ex.Message));
			}
			writer.WriteStartElement("metadata");
			writer.WriteAttributeString("name", name);
			if ((object)type != null)
			{
				writer.WriteAttributeString("type", type.AssemblyQualifiedName);
				writer.WriteAttributeString("mimetype", ByteArraySerializedObjectMimeType);
				writer.WriteStartElement("value");
				WriteNiceBase64(memoryStream.GetBuffer(), 0, memoryStream.GetBuffer().Length);
			}
			else
			{
				writer.WriteAttributeString("mimetype", BinSerializedObjectMimeType);
				writer.WriteStartElement("value");
				writer.WriteBase64(memoryStream.GetBuffer(), 0, memoryStream.GetBuffer().Length);
			}
			writer.WriteEndElement();
			writer.WriteEndElement();
			memoryStream.Close();
		}

		public void Close()
		{
			if (!written)
			{
				Generate();
			}
			if (writer != null)
			{
				writer.Close();
				stream = null;
				filename = null;
				textwriter = null;
			}
		}

		public virtual void Dispose()
		{
			Dispose(disposing: true);
			GC.SuppressFinalize(this);
		}

		public void Generate()
		{
			if (written)
			{
				throw new InvalidOperationException("The resource is already generated.");
			}
			written = true;
			writer.WriteEndElement();
			writer.Flush();
		}

		protected virtual void Dispose(bool disposing)
		{
			if (disposing)
			{
				Close();
			}
		}
	}
}
namespace System.Windows.Forms.Design
{
	[ToolboxItem(false)]
	[ClassInterface(ClassInterfaceType.AutoDispatch)]
	[ComVisible(true)]
	public class ComponentEditorForm : Form
	{
		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		[Browsable(false)]
		[EditorBrowsable(EditorBrowsableState.Never)]
		public new virtual bool AutoSize
		{
			get
			{
				return base.AutoSize;
			}
			set
			{
				base.AutoSize = value;
			}
		}

		[Browsable(false)]
		[EditorBrowsable(EditorBrowsableState.Never)]
		public new event EventHandler AutoSizeChanged
		{
			add
			{
				base.AutoSizeChanged += value;
			}
			remove
			{
				base.AutoSizeChanged -= value;
			}
		}

		[MonoTODO]
		public ComponentEditorForm(object component, Type[] pageTypes)
		{
		}

		[MonoTODO]
		protected override void OnActivated(EventArgs e)
		{
		}

		[MonoTODO]
		protected virtual void OnSelChangeSelector(object source, TreeViewEventArgs e)
		{
		}

		[MonoTODO]
		public override bool PreProcessMessage(ref Message msg)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public virtual DialogResult ShowForm()
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public virtual DialogResult ShowForm(int page)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public virtual DialogResult ShowForm(IWin32Window owner)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		public virtual DialogResult ShowForm(IWin32Window owner, int page)
		{
			throw new NotImplementedException();
		}

		[MonoTODO]
		protected override void OnHelpRequested(HelpEventArgs e)
		{
		}
	}
	[ComVisible(true)]
	[ClassInterface(ClassInterfaceType.AutoDispatch)]
	public abstract class ComponentEditorPage : Panel
	{
		private bool commitOnDeactivate;

		private IComponent component;

		private bool firstActivate = true;

		private Icon icon;

		private int loading;

		private bool loadRequired;

		private IComponentEditorPageSite pageSite;

		[EditorBrowsable(EditorBrowsableState.Never)]
		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		[Browsable(false)]
		public new virtual bool AutoSize
		{
			get
			{
				return base.AutoSize;
			}
			set
			{
				base.AutoSize = value;
			}
		}

		public bool CommitOnDeactivate
		{
			get
			{
				return commitOnDeactivate;
			}
			set
			{
				commitOnDeactivate = value;
			}
		}

		protected IComponent Component
		{
			get
			{
				return component;
			}
			set
			{
				component = value;
			}
		}

		[MonoTODO("Find out what this does.")]
		protected override CreateParams CreateParams
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		protected bool FirstActivate
		{
			get
			{
				return firstActivate;
			}
			set
			{
				firstActivate = value;
			}
		}

		public Icon Icon
		{
			get
			{
				return icon;
			}
			set
			{
				icon = value;
			}
		}

		protected int Loading
		{
			get
			{
				return loading;
			}
			set
			{
				loading = value;
			}
		}

		protected bool LoadRequired
		{
			get
			{
				return loadRequired;
			}
			set
			{
				loadRequired = value;
			}
		}

		protected IComponentEditorPageSite PageSite
		{
			get
			{
				return pageSite;
			}
			set
			{
				pageSite = value;
			}
		}

		public virtual string Title => base.Text;

		[Browsable(false)]
		[EditorBrowsable(EditorBrowsableState.Never)]
		public new event EventHandler AutoSizeChanged
		{
			add
			{
				base.AutoSizeChanged += value;
			}
			remove
			{
				base.AutoSizeChanged -= value;
			}
		}

		public ComponentEditorPage()
		{
		}

		public virtual void Activate()
		{
			base.Visible = true;
			firstActivate = false;
			if (loadRequired)
			{
				EnterLoadingMode();
				LoadComponent();
				ExitLoadingMode();
			}
		}

		public virtual void ApplyChanges()
		{
			SaveComponent();
		}

		public virtual void Deactivate()
		{
			base.Visible = false;
		}

		protected void EnterLoadingMode()
		{
			loading++;
		}

		protected void ExitLoadingMode()
		{
			loading--;
		}

		public virtual Control GetControl()
		{
			return this;
		}

		protected IComponent GetSelectedComponent()
		{
			return component;
		}

		protected bool IsFirstActivate()
		{
			return firstActivate;
		}

		protected bool IsLoading()
		{
			return loading != 0;
		}

		public virtual bool IsPageMessage(ref Message msg)
		{
			return PreProcessMessage(ref msg);
		}

		protected abstract void LoadComponent();

		[MonoTODO("Find out what this does.")]
		public virtual void OnApplyComplete()
		{
		}

		protected virtual void ReloadComponent()
		{
			loadRequired = true;
		}

		protected abstract void SaveComponent();

		public virtual void SetComponent(IComponent component)
		{
			this.component = component;
			ReloadComponent();
		}

		[MonoTODO("Find out what this does.")]
		protected virtual void SetDirty()
		{
		}

		public virtual void SetSite(IComponentEditorPageSite site)
		{
			pageSite = site;
			pageSite.GetControl().Controls.Add(this);
		}

		public virtual void ShowHelp()
		{
		}

		public virtual bool SupportsHelp()
		{
			return false;
		}
	}
	public class EventsTab : PropertyTab
	{
		private IServiceProvider serviceProvider;

		public override string HelpKeyword => TabName;

		public override string TabName => Locale.GetText("Events");

		private EventsTab()
		{
		}

		public EventsTab(IServiceProvider sp)
		{
			serviceProvider = sp;
		}

		public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object component, Attribute[] attributes)
		{
			IEventBindingService eventBindingService = null;
			EventDescriptorCollection eventDescriptorCollection = null;
			if (serviceProvider != null)
			{
				eventBindingService = (IEventBindingService)serviceProvider.GetService(typeof(IEventBindingService));
			}
			if (eventBindingService == null)
			{
				return new PropertyDescriptorCollection(null);
			}
			eventDescriptorCollection = ((attributes == null) ? TypeDescriptor.GetEvents(component) : TypeDescriptor.GetEvents(component, attributes));
			return eventBindingService.GetEventProperties(eventDescriptorCollection);
		}

		public override PropertyDescriptorCollection GetProperties(object component, Attribute[] attributes)
		{
			return GetProperties(null, component, attributes);
		}

		public override bool CanExtend(object extendee)
		{
			return false;
		}

		public override PropertyDescriptor GetDefaultProperty(object obj)
		{
			if (serviceProvider == null)
			{
				return null;
			}
			EventDescriptor defaultEvent = TypeDescriptor.GetDefaultEvent(obj);
			IEventBindingService eventBindingService = (IEventBindingService)serviceProvider.GetService(typeof(IEventBindingService));
			if (defaultEvent != null && eventBindingService != null)
			{
				return eventBindingService.GetEventProperty(defaultEvent);
			}
			return null;
		}
	}
	[Guid("06a9c74b-5e32-4561-be73-381b37869f4f")]
	public interface IUIService
	{
		IDictionary Styles { get; }

		bool CanShowComponentEditor(object component);

		IWin32Window GetDialogOwnerWindow();

		void SetUIDirty();

		bool ShowComponentEditor(object component, IWin32Window parent);

		void ShowError(Exception ex);

		void ShowError(string message);

		void ShowError(Exception ex, string message);

		DialogResult ShowDialog(Form form);

		void ShowMessage(string message);

		void ShowMessage(string message, string caption);

		DialogResult ShowMessage(string message, string caption, MessageBoxButtons buttons);

		bool ShowToolWindow(Guid toolWindow);
	}
	public interface IWindowsFormsEditorService
	{
		void CloseDropDown();

		void DropDownControl(Control control);

		DialogResult ShowDialog(Form dialog);
	}
	public abstract class PropertyTab : IExtenderProvider
	{
		private Bitmap bitmap;

		private object[] components;

		public virtual Bitmap Bitmap
		{
			get
			{
				//IL_0024: Unknown result type (might be due to invalid IL or missing references)
				//IL_002e: Expected O, but got Unknown
				if (bitmap == null)
				{
					Type type = GetType();
					bitmap = new Bitmap(type, type.Name + ".bmp");
				}
				return bitmap;
			}
		}

		public virtual object[] Components
		{
			get
			{
				return components;
			}
			set
			{
				components = value;
			}
		}

		public virtual string HelpKeyword => TabName;

		public abstract string TabName { get; }

		~PropertyTab()
		{
			Dispose(disposing: false);
		}

		public virtual bool CanExtend(object extendee)
		{
			return true;
		}

		public virtual void Dispose()
		{
			Dispose(disposing: true);
			GC.SuppressFinalize(this);
		}

		protected virtual void Dispose(bool disposing)
		{
			if (disposing && bitmap != null)
			{
				((Image)bitmap).Dispose();
				bitmap = null;
			}
		}

		public virtual PropertyDescriptor GetDefaultProperty(object component)
		{
			return TypeDescriptor.GetDefaultProperty(component);
		}

		public virtual PropertyDescriptorCollection GetProperties(object component)
		{
			return GetProperties(component, null);
		}

		public abstract PropertyDescriptorCollection GetProperties(object component, Attribute[] attributes);

		public virtual PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object component, Attribute[] attributes)
		{
			return GetProperties(component, attributes);
		}
	}
	[Flags]
	public enum ToolStripItemDesignerAvailability
	{
		None = 0,
		ToolStrip = 1,
		MenuStrip = 2,
		ContextMenuStrip = 4,
		StatusStrip = 8,
		All = 0xF
	}
	[AttributeUsage(AttributeTargets.Class)]
	public sealed class ToolStripItemDesignerAvailabilityAttribute : Attribute
	{
		private ToolStripItemDesignerAvailability visibility;

		public static readonly ToolStripItemDesignerAvailabilityAttribute Default = new ToolStripItemDesignerAvailabilityAttribute();

		public ToolStripItemDesignerAvailability ItemAdditionVisibility => visibility;

		public ToolStripItemDesignerAvailabilityAttribute()
		{
			visibility = ToolStripItemDesignerAvailability.None;
		}

		public ToolStripItemDesignerAvailabilityAttribute(ToolStripItemDesignerAvailability visibility)
		{
			this.visibility = visibility;
		}

		public override bool Equals(object obj)
		{
			if (!(obj is ToolStripItemDesignerAvailabilityAttribute))
			{
				return false;
			}
			return ItemAdditionVisibility == (obj as ToolStripItemDesignerAvailabilityAttribute).ItemAdditionVisibility;
		}

		public override int GetHashCode()
		{
			return (int)visibility;
		}

		public override bool IsDefaultAttribute()
		{
			return visibility == ToolStripItemDesignerAvailability.None;
		}
	}
	public abstract class WindowsFormsComponentEditor : ComponentEditor
	{
		public override bool EditComponent(ITypeDescriptorContext context, object component)
		{
			return EditComponent(context, component, null);
		}

		public virtual bool EditComponent(ITypeDescriptorContext context, object component, IWin32Window owner)
		{
			ComponentEditorForm componentEditorForm = new ComponentEditorForm(component, GetComponentEditorPages());
			if (componentEditorForm.ShowForm(owner, GetInitialComponentEditorPageIndex()) == DialogResult.OK)
			{
				return true;
			}
			return false;
		}

		public bool EditComponent(object component, IWin32Window owner)
		{
			return EditComponent(null, component, owner);
		}

		protected virtual Type[] GetComponentEditorPages()
		{
			return null;
		}

		protected virtual int GetInitialComponentEditorPageIndex()
		{
			return 0;
		}
	}
}
namespace System.Windows.Forms
{
	internal class DebugHelper
	{
		private struct Data
		{
			public MethodBase method;

			public object[] args;

			public Data(MethodBase m, object[] a)
			{
				method = m;
				args = a;
			}
		}

		private static Stack<Data> methods;

		static DebugHelper()
		{
			methods = new Stack<Data>();
			Debug.AutoFlush = true;
		}

		[Conditional("DEBUG")]
		internal static void DumpCallers()
		{
			StackTrace stackTrace = new StackTrace(fNeedFileInfo: true);
			int frameCount = stackTrace.FrameCount;
			for (int i = 1; i < frameCount; i++)
			{
				StackFrame frame = stackTrace.GetFrame(i);
				MethodBase method = frame.GetMethod();
				string fileName = frame.GetFileName();
				if (fileName != null && fileName.Length > 1)
				{
					fileName = fileName.Substring(fileName.LastIndexOf(Path.DirectorySeparatorChar) + 1);
				}
			}
		}

		[Conditional("DEBUG")]
		internal static void DumpCallers(int count)
		{
			StackTrace stackTrace = new StackTrace(fNeedFileInfo: true);
			int num = ((count <= stackTrace.FrameCount) ? count : stackTrace.FrameCount);
			for (int i = 1; i < num; i++)
			{
				StackFrame frame = stackTrace.GetFrame(i);
				MethodBase method = frame.GetMethod();
				string fileName = frame.GetFileName();
				if (fileName != null && fileName.Length > 1)
				{
					fileName = fileName.Substring(fileName.LastIndexOf(Path.DirectorySeparatorChar) + 1);
				}
			}
		}

		[Conditional("DEBUG")]
		internal static void Enter()
		{
			StackTrace stackTrace = new StackTrace();
			methods.Push(new Data(stackTrace.GetFrame(1).GetMethod(), null));
		}

		[Conditional("DEBUG")]
		internal static void Enter(object[] args)
		{
			StackTrace stackTrace = new StackTrace();
			methods.Push(new Data(stackTrace.GetFrame(1).GetMethod(), args));
		}

		[Conditional("DEBUG")]
		internal static void Leave()
		{
			if (methods.Count > 0)
			{
				methods.Pop();
			}
		}

		[Conditional("DEBUG")]
		internal static void Print()
		{
			if (methods.Count != 0)
			{
				Data data = methods.Peek();
			}
		}

		[Conditional("DEBUG")]
		internal static void Print(int index)
		{
			if (methods.Count != 0 && methods.Count > index && index >= 0)
			{
				Stack<Data> stack = new Stack<Data>(index - 1);
				for (int i = 0; i < index; i++)
				{
					stack.Push(methods.Pop());
				}
				Data data = methods.Peek();
				for (int j = 0; j < stack.Count; j++)
				{
					methods.Push(stack.Pop());
				}
				stack = null;
			}
		}

		[Conditional("DEBUG")]
		internal static void Print(string methodName, string parameterName)
		{
			if (methods.Count == 0)
			{
				return;
			}
			Stack<Data> stack = new Stack<Data>();
			Data data = methods.Peek();
			bool flag = false;
			for (int i = 0; i < methods.Count; i++)
			{
				data = methods.Peek();
				if (data.method.Name.Equals(methodName))
				{
					flag = true;
					break;
				}
				stack.Push(methods.Pop());
			}
			for (int j = 0; j < stack.Count; j++)
			{
				methods.Push(stack.Pop());
			}
			stack = null;
			if (!flag)
			{
				return;
			}
			ParameterInfo[] parameters = data.method.GetParameters();
			for (int k = 0; k < parameters.Length; k++)
			{
				if (!(parameters[k].Name == parameterName) || (object)parameters[k].ParameterType == typeof(IntPtr))
				{
				}
			}
		}

		[Conditional("DEBUG")]
		internal static void Print(string parameterName)
		{
			if (methods.Count == 0)
			{
				return;
			}
			ParameterInfo[] parameters = methods.Peek().method.GetParameters();
			for (int i = 0; i < parameters.Length; i++)
			{
				if (!(parameters[i].Name == parameterName) || (object)parameters[i].ParameterType == typeof(IntPtr))
				{
				}
			}
		}

		[Conditional("DEBUG")]
		internal static void WriteLine(object arg)
		{
		}

		[Conditional("DEBUG")]
		internal static void WriteLine(string format, params object[] arg)
		{
		}

		[Conditional("DEBUG")]
		internal static void WriteLine(string message)
		{
		}

		[Conditional("DEBUG")]
		internal static void Indent()
		{
		}

		[Conditional("DEBUG")]
		internal static void Unindent()
		{
		}

		[Conditional("TRACE")]
		internal static void TraceWriteLine(string format, params object[] arg)
		{
		}

		[Conditional("TRACE")]
		internal static void TraceWriteLine(string message)
		{
		}
	}
}
namespace System.Windows.Forms.PropertyGridInternal
{
	public class PropertiesTab : PropertyTab
	{
		public override string HelpKeyword => "vs.properties";

		public override string TabName => "Properties";

		public override PropertyDescriptorCollection GetProperties(object component, Attribute[] attributes)
		{
			return GetProperties(null, component, attributes);
		}

		public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object component, Attribute[] attributes)
		{
			if (component == null)
			{
				return new PropertyDescriptorCollection(null);
			}
			if (attributes == null)
			{
				attributes = new Attribute[1] { BrowsableAttribute.Yes };
			}
			PropertyDescriptorCollection propertyDescriptorCollection = null;
			TypeConverter converter = TypeDescriptor.GetConverter(component);
			if (converter != null && converter.GetPropertiesSupported())
			{
				propertyDescriptorCollection = converter.GetProperties(context, component, attributes);
			}
			if (propertyDescriptorCollection == null)
			{
				propertyDescriptorCollection = TypeDescriptor.GetProperties(component, attributes);
			}
			return propertyDescriptorCollection;
		}

		public override PropertyDescriptor GetDefaultProperty(object obj)
		{
			if (obj == null)
			{
				return null;
			}
			return TypeDescriptor.GetDefaultProperty(obj);
		}
	}
}
namespace System.Windows.Forms.RTF
{
	internal class Charcode
	{
		private StandardCharCode[] codes;

		private Hashtable reverse;

		private int size;

		private static Charcode ansi_generic;

		public int this[StandardCharCode c]
		{
			get
			{
				object obj = reverse[c];
				if (obj != null)
				{
					return (int)obj;
				}
				for (int i = 0; i < size; i++)
				{
					if (codes[i] == c)
					{
						return i;
					}
				}
				return -1;
			}
		}

		public StandardCharCode this[int c]
		{
			get
			{
				if (c < 0 || c >= size)
				{
					return StandardCharCode.nothing;
				}
				return codes[c];
			}
			private set
			{
				if (c >= 0 && c < size)
				{
					codes[c] = value;
					reverse[value] = c;
				}
			}
		}

		public static Charcode AnsiGeneric
		{
			get
			{
				if (ansi_generic != null)
				{
					return ansi_generic;
				}
				ansi_generic = new Charcode(256);
				ansi_generic[6] = StandardCharCode.formula;
				ansi_generic[30] = StandardCharCode.nobrkhyphen;
				ansi_generic[31] = StandardCharCode.opthyphen;
				ansi_generic[32] = StandardCharCode.space;
				ansi_generic[33] = StandardCharCode.exclam;
				ansi_generic[34] = StandardCharCode.quotedbl;
				ansi_generic[35] = StandardCharCode.numbersign;
				ansi_generic[36] = StandardCharCode.dollar;
				ansi_generic[37] = StandardCharCode.percent;
				ansi_generic[38] = StandardCharCode.ampersand;
				ansi_generic[92] = StandardCharCode.quoteright;
				ansi_generic[40] = StandardCharCode.parenleft;
				ansi_generic[41] = StandardCharCode.parenright;
				ansi_generic[42] = StandardCharCode.asterisk;
				ansi_generic[43] = StandardCharCode.plus;
				ansi_generic[44] = StandardCharCode.comma;
				ansi_generic[45] = StandardCharCode.hyphen;
				ansi_generic[46] = StandardCharCode.period;
				ansi_generic[47] = StandardCharCode.slash;
				ansi_generic[48] = StandardCharCode.zero;
				ansi_generic[49] = StandardCharCode.one;
				ansi_generic[50] = StandardCharCode.two;
				ansi_generic[51] = StandardCharCode.three;
				ansi_generic[52] = StandardCharCode.four;
				ansi_generic[53] = StandardCharCode.five;
				ansi_generic[54] = StandardCharCode.six;
				ansi_generic[55] = StandardCharCode.seven;
				ansi_generic[56] = StandardCharCode.eight;
				ansi_generic[57] = StandardCharCode.nine;
				ansi_generic[58] = StandardCharCode.colon;
				ansi_generic[59] = StandardCharCode.semicolon;
				ansi_generic[60] = StandardCharCode.less;
				ansi_generic[61] = StandardCharCode.equal;
				ansi_generic[62] = StandardCharCode.greater;
				ansi_generic[63] = StandardCharCode.question;
				ansi_generic[64] = StandardCharCode.at;
				ansi_generic[65] = StandardCharCode.A;
				ansi_generic[66] = StandardCharCode.B;
				ansi_generic[67] = StandardCharCode.C;
				ansi_generic[68] = StandardCharCode.D;
				ansi_generic[69] = StandardCharCode.E;
				ansi_generic[70] = StandardCharCode.F;
				ansi_generic[71] = StandardCharCode.G;
				ansi_generic[72] = StandardCharCode.H;
				ansi_generic[73] = StandardCharCode.I;
				ansi_generic[74] = StandardCharCode.J;
				ansi_generic[75] = StandardCharCode.K;
				ansi_generic[76] = StandardCharCode.L;
				ansi_generic[77] = StandardCharCode.M;
				ansi_generic[78] = StandardCharCode.N;
				ansi_generic[79] = StandardCharCode.O;
				ansi_generic[80] = StandardCharCode.P;
				ansi_generic[81] = StandardCharCode.Q;
				ansi_generic[82] = StandardCharCode.R;
				ansi_generic[83] = StandardCharCode.S;
				ansi_generic[84] = StandardCharCode.T;
				ansi_generic[85] = StandardCharCode.U;
				ansi_generic[86] = StandardCharCode.V;
				ansi_generic[87] = StandardCharCode.W;
				ansi_generic[88] = StandardCharCode.X;
				ansi_generic[89] = StandardCharCode.Y;
				ansi_generic[90] = StandardCharCode.Z;
				ansi_generic[91] = StandardCharCode.bracketleft;
				ansi_generic[92] = StandardCharCode.backslash;
				ansi_generic[93] = StandardCharCode.bracketright;
				ansi_generic[94] = StandardCharCode.asciicircum;
				ansi_generic[95] = StandardCharCode.underscore;
				ansi_generic[96] = StandardCharCode.quoteleft;
				ansi_generic[97] = StandardCharCode.a;
				ansi_generic[98] = StandardCharCode.b;
				ansi_generic[99] = StandardCharCode.c;
				ansi_generic[100] = StandardCharCode.d;
				ansi_generic[101] = StandardCharCode.e;
				ansi_generic[102] = StandardCharCode.f;
				ansi_generic[103] = StandardCharCode.g;
				ansi_generic[104] = StandardCharCode.h;
				ansi_generic[105] = StandardCharCode.i;
				ansi_generic[106] = StandardCharCode.j;
				ansi_generic[107] = StandardCharCode.k;
				ansi_generic[108] = StandardCharCode.l;
				ansi_generic[109] = StandardCharCode.m;
				ansi_generic[110] = StandardCharCode.n;
				ansi_generic[111] = StandardCharCode.o;
				ansi_generic[112] = StandardCharCode.p;
				ansi_generic[113] = StandardCharCode.q;
				ansi_generic[114] = StandardCharCode.r;
				ansi_generic[115] = StandardCharCode.s;
				ansi_generic[116] = StandardCharCode.t;
				ansi_generic[117] = StandardCharCode.u;
				ansi_generic[118] = StandardCharCode.v;
				ansi_generic[119] = StandardCharCode.w;
				ansi_generic[120] = StandardCharCode.x;
				ansi_generic[121] = StandardCharCode.y;
				ansi_generic[122] = StandardCharCode.z;
				ansi_generic[123] = StandardCharCode.braceleft;
				ansi_generic[124] = StandardCharCode.bar;
				ansi_generic[125] = StandardCharCode.braceright;
				ansi_generic[126] = StandardCharCode.asciitilde;
				ansi_generic[160] = StandardCharCode.nobrkspace;
				ansi_generic[161] = StandardCharCode.exclamdown;
				ansi_generic[162] = StandardCharCode.cent;
				ansi_generic[163] = StandardCharCode.sterling;
				ansi_generic[164] = StandardCharCode.currency;
				ansi_generic[165] = StandardCharCode.yen;
				ansi_generic[166] = StandardCharCode.brokenbar;
				ansi_generic[167] = StandardCharCode.section;
				ansi_generic[168] = StandardCharCode.dieresis;
				ansi_generic[169] = StandardCharCode.copyright;
				ansi_generic[170] = StandardCharCode.ordfeminine;
				ansi_generic[171] = StandardCharCode.guillemotleft;
				ansi_generic[172] = StandardCharCode.logicalnot;
				ansi_generic[173] = StandardCharCode.opthyphen;
				ansi_generic[174] = StandardCharCode.registered;
				ansi_generic[175] = StandardCharCode.macron;
				ansi_generic[176] = StandardCharCode.degree;
				ansi_generic[177] = StandardCharCode.plusminus;
				ansi_generic[178] = StandardCharCode.twosuperior;
				ansi_generic[179] = StandardCharCode.threesuperior;
				ansi_generic[180] = StandardCharCode.acute;
				ansi_generic[181] = StandardCharCode.mu;
				ansi_generic[182] = StandardCharCode.paragraph;
				ansi_generic[183] = StandardCharCode.periodcentered;
				ansi_generic[184] = StandardCharCode.cedilla;
				ansi_generic[185] = StandardCharCode.onesuperior;
				ansi_generic[186] = StandardCharCode.ordmasculine;
				ansi_generic[187] = StandardCharCode.guillemotright;
				ansi_generic[188] = StandardCharCode.onequarter;
				ansi_generic[189] = StandardCharCode.onehalf;
				ansi_generic[190] = StandardCharCode.threequarters;
				ansi_generic[191] = StandardCharCode.questiondown;
				ansi_generic[192] = StandardCharCode.Agrave;
				ansi_generic[193] = StandardCharCode.Aacute;
				ansi_generic[194] = StandardCharCode.Acircumflex;
				ansi_generic[195] = StandardCharCode.Atilde;
				ansi_generic[196] = StandardCharCode.Adieresis;
				ansi_generic[197] = StandardCharCode.Aring;
				ansi_generic[198] = StandardCharCode.AE;
				ansi_generic[199] = StandardCharCode.Ccedilla;
				ansi_generic[200] = StandardCharCode.Egrave;
				ansi_generic[201] = StandardCharCode.Eacute;
				ansi_generic[202] = StandardCharCode.Ecircumflex;
				ansi_generic[203] = StandardCharCode.Edieresis;
				ansi_generic[204] = StandardCharCode.Igrave;
				ansi_generic[205] = StandardCharCode.Iacute;
				ansi_generic[206] = StandardCharCode.Icircumflex;
				ansi_generic[207] = StandardCharCode.Idieresis;
				ansi_generic[208] = StandardCharCode.Eth;
				ansi_generic[209] = StandardCharCode.Ntilde;
				ansi_generic[210] = StandardCharCode.Ograve;
				ansi_generic[211] = StandardCharCode.Oacute;
				ansi_generic[212] = StandardCharCode.Ocircumflex;
				ansi_generic[213] = StandardCharCode.Otilde;
				ansi_generic[214] = StandardCharCode.Odieresis;
				ansi_generic[215] = StandardCharCode.multiply;
				ansi_generic[216] = StandardCharCode.Oslash;
				ansi_generic[217] = StandardCharCode.Ugrave;
				ansi_generic[218] = StandardCharCode.Uacute;
				ansi_generic[219] = StandardCharCode.Ucircumflex;
				ansi_generic[220] = StandardCharCode.Udieresis;
				ansi_generic[221] = StandardCharCode.Yacute;
				ansi_generic[222] = StandardCharCode.Thorn;
				ansi_generic[223] = StandardCharCode.germandbls;
				ansi_generic[224] = StandardCharCode.agrave;
				ansi_generic[225] = StandardCharCode.aacute;
				ansi_generic[226] = StandardCharCode.acircumflex;
				ansi_generic[227] = StandardCharCode.atilde;
				ansi_generic[228] = StandardCharCode.adieresis;
				ansi_generic[229] = StandardCharCode.aring;
				ansi_generic[230] = StandardCharCode.ae;
				ansi_generic[231] = StandardCharCode.ccedilla;
				ansi_generic[232] = StandardCharCode.egrave;
				ansi_generic[233] = StandardCharCode.eacute;
				ansi_generic[234] = StandardCharCode.ecircumflex;
				ansi_generic[235] = StandardCharCode.edieresis;
				ansi_generic[236] = StandardCharCode.igrave;
				ansi_generic[237] = StandardCharCode.iacute;
				ansi_generic[238] = StandardCharCode.icircumflex;
				ansi_generic[239] = StandardCharCode.idieresis;
				ansi_generic[240] = StandardCharCode.eth;
				ansi_generic[241] = StandardCharCode.ntilde;
				ansi_generic[242] = StandardCharCode.ograve;
				ansi_generic[243] = StandardCharCode.oacute;
				ansi_generic[244] = StandardCharCode.ocircumflex;
				ansi_generic[245] = StandardCharCode.otilde;
				ansi_generic[246] = StandardCharCode.odieresis;
				ansi_generic[247] = StandardCharCode.divide;
				ansi_generic[248] = StandardCharCode.oslash;
				ansi_generic[249] = StandardCharCode.ugrave;
				ansi_generic[250] = StandardCharCode.uacute;
				ansi_generic[251] = StandardCharCode.ucircumflex;
				ansi_generic[252] = StandardCharCode.udieresis;
				ansi_generic[253] = StandardCharCode.yacute;
				ansi_generic[254] = StandardCharCode.thorn;
				ansi_generic[255] = StandardCharCode.ydieresis;
				return ansi_generic;
			}
		}

		public static Charcode AnsiSymbol
		{
			get
			{
				Charcode charcode = new Charcode(256);
				charcode[6] = StandardCharCode.formula;
				charcode[30] = StandardCharCode.nobrkhyphen;
				charcode[31] = StandardCharCode.opthyphen;
				charcode[32] = StandardCharCode.space;
				charcode[33] = StandardCharCode.exclam;
				charcode[34] = StandardCharCode.universal;
				charcode[35] = StandardCharCode.mathnumbersign;
				charcode[36] = StandardCharCode.existential;
				charcode[37] = StandardCharCode.percent;
				charcode[38] = StandardCharCode.ampersand;
				charcode[92] = StandardCharCode.suchthat;
				charcode[40] = StandardCharCode.parenleft;
				charcode[41] = StandardCharCode.parenright;
				charcode[42] = StandardCharCode.mathasterisk;
				charcode[43] = StandardCharCode.mathplus;
				charcode[44] = StandardCharCode.comma;
				charcode[45] = StandardCharCode.mathminus;
				charcode[46] = StandardCharCode.period;
				charcode[47] = StandardCharCode.slash;
				charcode[48] = StandardCharCode.zero;
				charcode[49] = StandardCharCode.one;
				charcode[50] = StandardCharCode.two;
				charcode[51] = StandardCharCode.three;
				charcode[52] = StandardCharCode.four;
				charcode[53] = StandardCharCode.five;
				charcode[54] = StandardCharCode.six;
				charcode[55] = StandardCharCode.seven;
				charcode[56] = StandardCharCode.eight;
				charcode[57] = StandardCharCode.nine;
				charcode[58] = StandardCharCode.colon;
				charcode[59] = StandardCharCode.semicolon;
				charcode[60] = StandardCharCode.less;
				charcode[61] = StandardCharCode.mathequal;
				charcode[62] = StandardCharCode.greater;
				charcode[63] = StandardCharCode.question;
				charcode[64] = StandardCharCode.congruent;
				charcode[65] = StandardCharCode.Alpha;
				charcode[66] = StandardCharCode.Beta;
				charcode[67] = StandardCharCode.Chi;
				charcode[68] = StandardCharCode.Delta;
				charcode[69] = StandardCharCode.Epsilon;
				charcode[70] = StandardCharCode.Phi;
				charcode[71] = StandardCharCode.Gamma;
				charcode[72] = StandardCharCode.Eta;
				charcode[73] = StandardCharCode.Iota;
				charcode[75] = StandardCharCode.Kappa;
				charcode[76] = StandardCharCode.Lambda;
				charcode[77] = StandardCharCode.Mu;
				charcode[78] = StandardCharCode.Nu;
				charcode[79] = StandardCharCode.Omicron;
				charcode[80] = StandardCharCode.Pi;
				charcode[81] = StandardCharCode.Theta;
				charcode[82] = StandardCharCode.Rho;
				charcode[83] = StandardCharCode.Sigma;
				charcode[84] = StandardCharCode.Tau;
				charcode[85] = StandardCharCode.Upsilon;
				charcode[86] = StandardCharCode.varsigma;
				charcode[87] = StandardCharCode.Omega;
				charcode[88] = StandardCharCode.Xi;
				charcode[89] = StandardCharCode.Psi;
				charcode[90] = StandardCharCode.Zeta;
				charcode[91] = StandardCharCode.bracketleft;
				charcode[92] = StandardCharCode.backslash;
				charcode[93] = StandardCharCode.bracketright;
				charcode[94] = StandardCharCode.asciicircum;
				charcode[95] = StandardCharCode.underscore;
				charcode[96] = StandardCharCode.quoteleft;
				charcode[97] = StandardCharCode.alpha;
				charcode[98] = StandardCharCode.beta;
				charcode[99] = StandardCharCode.chi;
				charcode[100] = StandardCharCode.delta;
				charcode[101] = StandardCharCode.epsilon;
				charcode[102] = StandardCharCode.phi;
				charcode[103] = StandardCharCode.gamma;
				charcode[104] = StandardCharCode.eta;
				charcode[105] = StandardCharCode.iota;
				charcode[107] = StandardCharCode.kappa;
				charcode[108] = StandardCharCode.lambda;
				charcode[109] = StandardCharCode.mu;
				charcode[110] = StandardCharCode.nu;
				charcode[111] = StandardCharCode.omicron;
				charcode[112] = StandardCharCode.pi;
				charcode[113] = StandardCharCode.theta;
				charcode[114] = StandardCharCode.rho;
				charcode[115] = StandardCharCode.sigma;
				charcode[116] = StandardCharCode.tau;
				charcode[117] = StandardCharCode.upsilon;
				charcode[119] = StandardCharCode.omega;
				charcode[120] = StandardCharCode.xi;
				charcode[121] = StandardCharCode.psi;
				charcode[122] = StandardCharCode.zeta;
				charcode[123] = StandardCharCode.braceleft;
				charcode[124] = StandardCharCode.bar;
				charcode[125] = StandardCharCode.braceright;
				charcode[126] = StandardCharCode.mathtilde;
				return charcode;
			}
		}

		public Charcode()
			: this(256)
		{
		}

		private Charcode(int size)
		{
			this.size = size;
			codes = new StandardCharCode[size];
			reverse = new Hashtable(size);
		}
	}
	internal class Charset
	{
		private CharsetType id;

		private CharsetFlags flags;

		private Charcode code;

		private string file;

		public Charcode Code
		{
			get
			{
				return code;
			}
			set
			{
				code = value;
			}
		}

		public CharsetFlags Flags
		{
			get
			{
				return flags;
			}
			set
			{
				flags = value;
			}
		}

		public CharsetType ID
		{
			get
			{
				return id;
			}
			set
			{
				if (value != 0 && value == CharsetType.Symbol)
				{
					id = CharsetType.Symbol;
				}
				else
				{
					id = CharsetType.General;
				}
			}
		}

		public string File
		{
			get
			{
				return file;
			}
			set
			{
				if (file != value)
				{
					file = value;
				}
			}
		}

		public StandardCharCode this[int c] => code[c];

		public Charset()
		{
			flags = CharsetFlags.Read | CharsetFlags.Switch;
			id = CharsetType.General;
			file = string.Empty;
			ReadMap();
		}

		public bool ReadMap()
		{
			switch (id)
			{
			case CharsetType.General:
				if (file == string.Empty)
				{
					code = Charcode.AnsiGeneric;
					return true;
				}
				return true;
			case CharsetType.Symbol:
				if (file == string.Empty)
				{
					code = Charcode.AnsiSymbol;
					return true;
				}
				return true;
			default:
				return false;
			}
		}

		public char StdCharCode(string name)
		{
			return ' ';
		}

		public string StdCharName(char code)
		{
			return string.Empty;
		}
	}
	[Flags]
	internal enum CharsetFlags
	{
		None = 0,
		Read = 1,
		Switch = 2
	}
	internal enum CharsetType
	{
		General,
		Symbol
	}
	internal class ClassCallback
	{
		private ClassDelegate[] callbacks;

		public ClassDelegate this[TokenClass c]
		{
			get
			{
				return callbacks[(int)c];
			}
			set
			{
				callbacks[(int)c] = value;
			}
		}

		public ClassCallback()
		{
			callbacks = new ClassDelegate[Enum.GetValues(typeof(Major)).Length];
		}
	}
	internal class Color
	{
		private int red;

		private int green;

		private int blue;

		private int num;

		private Color next;

		public int Red
		{
			get
			{
				return red;
			}
			set
			{
				red = value;
			}
		}

		public int Green
		{
			get
			{
				return green;
			}
			set
			{
				green = value;
			}
		}

		public int Blue
		{
			get
			{
				return blue;
			}
			set
			{
				blue = value;
			}
		}

		public int Num
		{
			get
			{
				return num;
			}
			set
			{
				num = value;
			}
		}

		public Color(RTF rtf)
		{
			red = -1;
			green = -1;
			blue = -1;
			num = -1;
			lock (rtf)
			{
				if (rtf.Colors == null)
				{
					rtf.Colors = this;
					return;
				}
				Color colors = rtf.Colors;
				while (colors.next != null)
				{
					colors = colors.next;
				}
				colors.next = this;
			}
		}

		public static Color GetColor(RTF rtf, int color_number)
		{
			lock (rtf)
			{
				return GetColor(rtf.Colors, color_number);
			}
		}

		private static Color GetColor(Color start, int color_number)
		{
			if (color_number == -1)
			{
				return start;
			}
			Color color = start;
			while (color != null && color.num != color_number)
			{
				color = color.next;
			}
			return color;
		}
	}
	internal class DestinationCallback
	{
		private DestinationDelegate[] callbacks;

		public DestinationDelegate this[Minor c]
		{
			get
			{
				return callbacks[(int)c];
			}
			set
			{
				callbacks[(int)c] = value;
			}
		}

		public DestinationCallback()
		{
			callbacks = new DestinationDelegate[Enum.GetValues(typeof(Minor)).Length];
		}
	}
	internal class Font
	{
		private string name;

		private string alt_name;

		private int num;

		private int family;

		private CharsetType charset;

		private int pitch;

		private int type;

		private int codepage;

		private Font next;

		private RTF rtf;

		public string Name
		{
			get
			{
				return name;
			}
			set
			{
				name = value;
			}
		}

		public string AltName
		{
			get
			{
				return alt_name;
			}
			set
			{
				alt_name = value;
			}
		}

		public int Num
		{
			get
			{
				return num;
			}
			set
			{
				DeleteFont(rtf, value);
				num = value;
			}
		}

		public int Family
		{
			get
			{
				return family;
			}
			set
			{
				family = value;
			}
		}

		public CharsetType Charset
		{
			get
			{
				return charset;
			}
			set
			{
				charset = value;
			}
		}

		public int Pitch
		{
			get
			{
				return pitch;
			}
			set
			{
				pitch = value;
			}
		}

		public int Type
		{
			get
			{
				return type;
			}
			set
			{
				type = value;
			}
		}

		public int Codepage
		{
			get
			{
				return codepage;
			}
			set
			{
				codepage = value;
			}
		}

		public Font(RTF rtf)
		{
			this.rtf = rtf;
			num = -1;
			name = string.Empty;
			lock (rtf)
			{
				if (rtf.Fonts == null)
				{
					rtf.Fonts = this;
					return;
				}
				Font fonts = rtf.Fonts;
				while (fonts.next != null)
				{
					fonts = fonts.next;
				}
				fonts.next = this;
			}
		}

		public static bool DeleteFont(RTF rtf, int font_number)
		{
			lock (rtf)
			{
				Font fonts = rtf.Fonts;
				Font font = null;
				while (fonts != null && fonts.num != font_number)
				{
					font = fonts;
					fonts = fonts.next;
				}
				if (fonts != null)
				{
					if (fonts == rtf.Fonts)
					{
						rtf.Fonts = fonts.next;
					}
					else if (font != null)
					{
						font.next = fonts.next;
					}
					else
					{
						rtf.Fonts = fonts.next;
					}
					return true;
				}
			}
			return false;
		}

		public static Font GetFont(RTF rtf, int font_number)
		{
			lock (rtf)
			{
				return GetFont(rtf.Fonts, font_number);
			}
		}

		public static Font GetFont(Font start, int font_number)
		{
			if (font_number == -1)
			{
				return start;
			}
			Font font = start;
			while (font != null && font.num != font_number)
			{
				font = font.next;
			}
			return font;
		}
	}
	internal struct KeyStruct
	{
		public Major Major;

		public Minor Minor;

		public string Symbol;

		public KeyStruct(Major major, Minor minor, string symbol)
		{
			Major = major;
			Minor = minor;
			Symbol = symbol;
		}
	}
	internal class KeysInit
	{
		public static KeyStruct[] Init()
		{
			return new KeyStruct[684]
			{
				new KeyStruct(Major.SpecialChar, Minor.IIntVersion, "vern"),
				new KeyStruct(Major.SpecialChar, Minor.ICreateTime, "creatim"),
				new KeyStruct(Major.SpecialChar, Minor.IRevisionTime, "revtim"),
				new KeyStruct(Major.SpecialChar, Minor.IPrintTime, "printim"),
				new KeyStruct(Major.SpecialChar, Minor.IBackupTime, "buptim"),
				new KeyStruct(Major.SpecialChar, Minor.IEditTime, "edmins"),
				new KeyStruct(Major.SpecialChar, Minor.IYear, "yr"),
				new KeyStruct(Major.SpecialChar, Minor.IMonth, "mo"),
				new KeyStruct(Major.SpecialChar, Minor.IDay, "dy"),
				new KeyStruct(Major.SpecialChar, Minor.IHour, "hr"),
				new KeyStruct(Major.SpecialChar, Minor.IMinute, "min"),
				new KeyStruct(Major.SpecialChar, Minor.ISecond, "sec"),
				new KeyStruct(Major.SpecialChar, Minor.INPages, "nofpages"),
				new KeyStruct(Major.SpecialChar, Minor.INWords, "nofwords"),
				new KeyStruct(Major.SpecialChar, Minor.INChars, "nofchars"),
				new KeyStruct(Major.SpecialChar, Minor.IIntID, "id"),
				new KeyStruct(Major.SpecialChar, Minor.CurHeadDate, "chdate"),
				new KeyStruct(Major.SpecialChar, Minor.CurHeadDateLong, "chdpl"),
				new KeyStruct(Major.SpecialChar, Minor.CurHeadDateAbbrev, "chdpa"),
				new KeyStruct(Major.SpecialChar, Minor.CurHeadTime, "chtime"),
				new KeyStruct(Major.SpecialChar, Minor.CurHeadPage, "chpgn"),
				new KeyStruct(Major.SpecialChar, Minor.SectNum, "sectnum"),
				new KeyStruct(Major.SpecialChar, Minor.CurFNote, "chftn"),
				new KeyStruct(Major.SpecialChar, Minor.CurAnnotRef, "chatn"),
				new KeyStruct(Major.SpecialChar, Minor.FNoteSep, "chftnsep"),
				new KeyStruct(Major.SpecialChar, Minor.FNoteCont, "chftnsepc"),
				new KeyStruct(Major.SpecialChar, Minor.Cell, "cell"),
				new KeyStruct(Major.SpecialChar, Minor.Row, "row"),
				new KeyStruct(Major.SpecialChar, Minor.Par, "par"),
				new KeyStruct(Major.SpecialChar, Minor.Par, "\n"),
				new KeyStruct(Major.SpecialChar, Minor.Par, "\r"),
				new KeyStruct(Major.SpecialChar, Minor.Sect, "sect"),
				new KeyStruct(Major.SpecialChar, Minor.Page, "page"),
				new KeyStruct(Major.SpecialChar, Minor.Column, "column"),
				new KeyStruct(Major.SpecialChar, Minor.Line, "line"),
				new KeyStruct(Major.SpecialChar, Minor.SoftPage, "softpage"),
				new KeyStruct(Major.SpecialChar, Minor.SoftColumn, "softcol"),
				new KeyStruct(Major.SpecialChar, Minor.SoftLine, "softline"),
				new KeyStruct(Major.SpecialChar, Minor.SoftLineHt, "softlheight"),
				new KeyStruct(Major.SpecialChar, Minor.Tab, "tab"),
				new KeyStruct(Major.SpecialChar, Minor.EmDash, "emdash"),
				new KeyStruct(Major.SpecialChar, Minor.EnDash, "endash"),
				new KeyStruct(Major.SpecialChar, Minor.EmSpace, "emspace"),
				new KeyStruct(Major.SpecialChar, Minor.EnSpace, "enspace"),
				new KeyStruct(Major.SpecialChar, Minor.Bullet, "bullet"),
				new KeyStruct(Major.SpecialChar, Minor.LQuote, "lquote"),
				new KeyStruct(Major.SpecialChar, Minor.RQuote, "rquote"),
				new KeyStruct(Major.SpecialChar, Minor.LDblQuote, "ldblquote"),
				new KeyStruct(Major.SpecialChar, Minor.RDblQuote, "rdblquote"),
				new KeyStruct(Major.SpecialChar, Minor.Formula, "|"),
				new KeyStruct(Major.SpecialChar, Minor.NoBrkSpace, "~"),
				new KeyStruct(Major.SpecialChar, Minor.NoReqHyphen, "-"),
				new KeyStruct(Major.SpecialChar, Minor.NoBrkHyphen, "_"),
				new KeyStruct(Major.SpecialChar, Minor.LTRMark, "ltrmark"),
				new KeyStruct(Major.SpecialChar, Minor.RTLMark, "rtlmark"),
				new KeyStruct(Major.SpecialChar, Minor.NoWidthJoiner, "zwj"),
				new KeyStruct(Major.SpecialChar, Minor.NoWidthNonJoiner, "zwnj"),
				new KeyStruct(Major.SpecialChar, Minor.CurHeadPict, "chpict"),
				new KeyStruct(Major.CharAttr, Minor.Plain, "plain"),
				new KeyStruct(Major.CharAttr, Minor.Bold, "b"),
				new KeyStruct(Major.CharAttr, Minor.AllCaps, "caps"),
				new KeyStruct(Major.CharAttr, Minor.Deleted, "deleted"),
				new KeyStruct(Major.CharAttr, Minor.SubScript, "dn"),
				new KeyStruct(Major.CharAttr, Minor.SubScrShrink, "sub"),
				new KeyStruct(Major.CharAttr, Minor.NoSuperSub, "nosupersub"),
				new KeyStruct(Major.CharAttr, Minor.Expand, "expnd"),
				new KeyStruct(Major.CharAttr, Minor.ExpandTwips, "expndtw"),
				new KeyStruct(Major.CharAttr, Minor.Kerning, "kerning"),
				new KeyStruct(Major.CharAttr, Minor.FontNum, "f"),
				new KeyStruct(Major.CharAttr, Minor.FontSize, "fs"),
				new KeyStruct(Major.CharAttr, Minor.Italic, "i"),
				new KeyStruct(Major.CharAttr, Minor.Outline, "outl"),
				new KeyStruct(Major.CharAttr, Minor.Revised, "revised"),
				new KeyStruct(Major.CharAttr, Minor.RevAuthor, "revauth"),
				new KeyStruct(Major.CharAttr, Minor.RevDTTM, "revdttm"),
				new KeyStruct(Major.CharAttr, Minor.SmallCaps, "scaps"),
				new KeyStruct(Major.CharAttr, Minor.Shadow, "shad"),
				new KeyStruct(Major.CharAttr, Minor.StrikeThru, "strike"),
				new KeyStruct(Major.CharAttr, Minor.Underline, "ul"),
				new KeyStruct(Major.CharAttr, Minor.DotUnderline, "uld"),
				new KeyStruct(Major.CharAttr, Minor.DbUnderline, "uldb"),
				new KeyStruct(Major.CharAttr, Minor.NoUnderline, "ulnone"),
				new KeyStruct(Major.CharAttr, Minor.WordUnderline, "ulw"),
				new KeyStruct(Major.CharAttr, Minor.SuperScript, "up"),
				new KeyStruct(Major.CharAttr, Minor.SuperScrShrink, "super"),
				new KeyStruct(Major.CharAttr, Minor.Invisible, "v"),
				new KeyStruct(Major.CharAttr, Minor.ForeColor, "cf"),
				new KeyStruct(Major.CharAttr, Minor.BackColor, "cb"),
				new KeyStruct(Major.CharAttr, Minor.RTLChar, "rtlch"),
				new KeyStruct(Major.CharAttr, Minor.LTRChar, "ltrch"),
				new KeyStruct(Major.CharAttr, Minor.CharStyleNum, "cs"),
				new KeyStruct(Major.CharAttr, Minor.CharCharSet, "cchs"),
				new KeyStruct(Major.CharAttr, Minor.Language, "lang"),
				new KeyStruct(Major.CharAttr, Minor.Gray, "gray"),
				new KeyStruct(Major.ParAttr, Minor.ParDef, "pard"),
				new KeyStruct(Major.ParAttr, Minor.StyleNum, "s"),
				new KeyStruct(Major.ParAttr, Minor.Hyphenate, "hyphpar"),
				new KeyStruct(Major.ParAttr, Minor.InTable, "intbl"),
				new KeyStruct(Major.ParAttr, Minor.Keep, "keep"),
				new KeyStruct(Major.ParAttr, Minor.NoWidowControl, "nowidctlpar"),
				new KeyStruct(Major.ParAttr, Minor.KeepNext, "keepn"),
				new KeyStruct(Major.ParAttr, Minor.OutlineLevel, "level"),
				new KeyStruct(Major.ParAttr, Minor.NoLineNum, "noline"),
				new KeyStruct(Major.ParAttr, Minor.PBBefore, "pagebb"),
				new KeyStruct(Major.ParAttr, Minor.SideBySide, "sbys"),
				new KeyStruct(Major.ParAttr, Minor.QuadLeft, "ql"),
				new KeyStruct(Major.ParAttr, Minor.QuadRight, "qr"),
				new KeyStruct(Major.ParAttr, Minor.QuadJust, "qj"),
				new KeyStruct(Major.ParAttr, Minor.QuadCenter, "qc"),
				new KeyStruct(Major.ParAttr, Minor.FirstIndent, "fi"),
				new KeyStruct(Major.ParAttr, Minor.LeftIndent, "li"),
				new KeyStruct(Major.ParAttr, Minor.RightIndent, "ri"),
				new KeyStruct(Major.ParAttr, Minor.SpaceBefore, "sb"),
				new KeyStruct(Major.ParAttr, Minor.SpaceAfter, "sa"),
				new KeyStruct(Major.ParAttr, Minor.SpaceBetween, "sl"),
				new KeyStruct(Major.ParAttr, Minor.SpaceMultiply, "slmult"),
				new KeyStruct(Major.ParAttr, Minor.SubDocument, "subdocument"),
				new KeyStruct(Major.ParAttr, Minor.RTLPar, "rtlpar"),
				new KeyStruct(Major.ParAttr, Minor.LTRPar, "ltrpar"),
				new KeyStruct(Major.ParAttr, Minor.TabPos, "tx"),
				new KeyStruct(Major.ParAttr, Minor.TabLeft, "tql"),
				new KeyStruct(Major.ParAttr, Minor.TabRight, "tqr"),
				new KeyStruct(Major.ParAttr, Minor.TabCenter, "tqc"),
				new KeyStruct(Major.ParAttr, Minor.TabDecimal, "tqdec"),
				new KeyStruct(Major.ParAttr, Minor.TabBar, "tb"),
				new KeyStruct(Major.ParAttr, Minor.LeaderDot, "tldot"),
				new KeyStruct(Major.ParAttr, Minor.LeaderHyphen, "tlhyph"),
				new KeyStruct(Major.ParAttr, Minor.LeaderUnder, "tlul"),
				new KeyStruct(Major.ParAttr, Minor.LeaderThick, "tlth"),
				new KeyStruct(Major.ParAttr, Minor.LeaderEqual, "tleq"),
				new KeyStruct(Major.ParAttr, Minor.ParLevel, "pnlvl"),
				new KeyStruct(Major.ParAttr, Minor.ParBullet, "pnlvlblt"),
				new KeyStruct(Major.ParAttr, Minor.ParSimple, "pnlvlbody"),
				new KeyStruct(Major.ParAttr, Minor.ParNumCont, "pnlvlcont"),
				new KeyStruct(Major.ParAttr, Minor.ParNumOnce, "pnnumonce"),
				new KeyStruct(Major.ParAttr, Minor.ParNumAcross, "pnacross"),
				new KeyStruct(Major.ParAttr, Minor.ParHangIndent, "pnhang"),
				new KeyStruct(Major.ParAttr, Minor.ParNumRestart, "pnrestart"),
				new KeyStruct(Major.ParAttr, Minor.ParNumCardinal, "pncard"),
				new KeyStruct(Major.ParAttr, Minor.ParNumDecimal, "pndec"),
				new KeyStruct(Major.ParAttr, Minor.ParNumULetter, "pnucltr"),
				new KeyStruct(Major.ParAttr, Minor.ParNumURoman, "pnucrm"),
				new KeyStruct(Major.ParAttr, Minor.ParNumLLetter, "pnlcltr"),
				new KeyStruct(Major.ParAttr, Minor.ParNumLRoman, "pnlcrm"),
				new KeyStruct(Major.ParAttr, Minor.ParNumOrdinal, "pnord"),
				new KeyStruct(Major.ParAttr, Minor.ParNumOrdinalText, "pnordt"),
				new KeyStruct(Major.ParAttr, Minor.ParNumBold, "pnb"),
				new KeyStruct(Major.ParAttr, Minor.ParNumItalic, "pni"),
				new KeyStruct(Major.ParAttr, Minor.ParNumAllCaps, "pncaps"),
				new KeyStruct(Major.ParAttr, Minor.ParNumSmallCaps, "pnscaps"),
				new KeyStruct(Major.ParAttr, Minor.ParNumUnder, "pnul"),
				new KeyStruct(Major.ParAttr, Minor.ParNumDotUnder, "pnuld"),
				new KeyStruct(Major.ParAttr, Minor.ParNumDbUnder, "pnuldb"),
				new KeyStruct(Major.ParAttr, Minor.ParNumNoUnder, "pnulnone"),
				new KeyStruct(Major.ParAttr, Minor.ParNumWordUnder, "pnulw"),
				new KeyStruct(Major.ParAttr, Minor.ParNumStrikethru, "pnstrike"),
				new KeyStruct(Major.ParAttr, Minor.ParNumForeColor, "pncf"),
				new KeyStruct(Major.ParAttr, Minor.ParNumFont, "pnf"),
				new KeyStruct(Major.ParAttr, Minor.ParNumFontSize, "pnfs"),
				new KeyStruct(Major.ParAttr, Minor.ParNumIndent, "pnindent"),
				new KeyStruct(Major.ParAttr, Minor.ParNumSpacing, "pnsp"),
				new KeyStruct(Major.ParAttr, Minor.ParNumInclPrev, "pnprev"),
				new KeyStruct(Major.ParAttr, Minor.ParNumCenter, "pnqc"),
				new KeyStruct(Major.ParAttr, Minor.ParNumLeft, "pnql"),
				new KeyStruct(Major.ParAttr, Minor.ParNumRight, "pnqr"),
				new KeyStruct(Major.ParAttr, Minor.ParNumStartAt, "pnstart"),
				new KeyStruct(Major.ParAttr, Minor.BorderTop, "brdrt"),
				new KeyStruct(Major.ParAttr, Minor.BorderBottom, "brdrb"),
				new KeyStruct(Major.ParAttr, Minor.BorderLeft, "brdrl"),
				new KeyStruct(Major.ParAttr, Minor.BorderRight, "brdrr"),
				new KeyStruct(Major.ParAttr, Minor.BorderBetween, "brdrbtw"),
				new KeyStruct(Major.ParAttr, Minor.BorderBar, "brdrbar"),
				new KeyStruct(Major.ParAttr, Minor.BorderBox, "box"),
				new KeyStruct(Major.ParAttr, Minor.BorderSingle, "brdrs"),
				new KeyStruct(Major.ParAttr, Minor.BorderThick, "brdrth"),
				new KeyStruct(Major.ParAttr, Minor.BorderShadow, "brdrsh"),
				new KeyStruct(Major.ParAttr, Minor.BorderDouble, "brdrdb"),
				new KeyStruct(Major.ParAttr, Minor.BorderDot, "brdrdot"),
				new KeyStruct(Major.ParAttr, Minor.BorderDot, "brdrdash"),
				new KeyStruct(Major.ParAttr, Minor.BorderHair, "brdrhair"),
				new KeyStruct(Major.ParAttr, Minor.BorderWidth, "brdrw"),
				new KeyStruct(Major.ParAttr, Minor.BorderColor, "brdrcf"),
				new KeyStruct(Major.ParAttr, Minor.BorderSpace, "brsp"),
				new KeyStruct(Major.ParAttr, Minor.Shading, "shading"),
				new KeyStruct(Major.ParAttr, Minor.BgPatH, "bghoriz"),
				new KeyStruct(Major.ParAttr, Minor.BgPatV, "bgvert"),
				new KeyStruct(Major.ParAttr, Minor.FwdDiagBgPat, "bgfdiag"),
				new KeyStruct(Major.ParAttr, Minor.BwdDiagBgPat, "bgbdiag"),
				new KeyStruct(Major.ParAttr, Minor.HatchBgPat, "bgcross"),
				new KeyStruct(Major.ParAttr, Minor.DiagHatchBgPat, "bgdcross"),
				new KeyStruct(Major.ParAttr, Minor.DarkBgPatH, "bgdkhoriz"),
				new KeyStruct(Major.ParAttr, Minor.DarkBgPatV, "bgdkvert"),
				new KeyStruct(Major.ParAttr, Minor.FwdDarkBgPat, "bgdkfdiag"),
				new KeyStruct(Major.ParAttr, Minor.BwdDarkBgPat, "bgdkbdiag"),
				new KeyStruct(Major.ParAttr, Minor.DarkHatchBgPat, "bgdkcross"),
				new KeyStruct(Major.ParAttr, Minor.DarkDiagHatchBgPat, "bgdkdcross"),
				new KeyStruct(Major.ParAttr, Minor.BgPatLineColor, "cfpat"),
				new KeyStruct(Major.ParAttr, Minor.BgPatColor, "cbpat"),
				new KeyStruct(Major.SectAttr, Minor.SectDef, "sectd"),
				new KeyStruct(Major.SectAttr, Minor.ENoteHere, "endnhere"),
				new KeyStruct(Major.SectAttr, Minor.PrtBinFirst, "binfsxn"),
				new KeyStruct(Major.SectAttr, Minor.PrtBin, "binsxn"),
				new KeyStruct(Major.SectAttr, Minor.SectStyleNum, "ds"),
				new KeyStruct(Major.SectAttr, Minor.NoBreak, "sbknone"),
				new KeyStruct(Major.SectAttr, Minor.ColBreak, "sbkcol"),
				new KeyStruct(Major.SectAttr, Minor.PageBreak, "sbkpage"),
				new KeyStruct(Major.SectAttr, Minor.EvenBreak, "sbkeven"),
				new KeyStruct(Major.SectAttr, Minor.OddBreak, "sbkodd"),
				new KeyStruct(Major.SectAttr, Minor.Columns, "cols"),
				new KeyStruct(Major.SectAttr, Minor.ColumnSpace, "colsx"),
				new KeyStruct(Major.SectAttr, Minor.ColumnNumber, "colno"),
				new KeyStruct(Major.SectAttr, Minor.ColumnSpRight, "colsr"),
				new KeyStruct(Major.SectAttr, Minor.ColumnWidth, "colw"),
				new KeyStruct(Major.SectAttr, Minor.ColumnLine, "linebetcol"),
				new KeyStruct(Major.SectAttr, Minor.LineModulus, "linemod"),
				new KeyStruct(Major.SectAttr, Minor.LineDist, "linex"),
				new KeyStruct(Major.SectAttr, Minor.LineStarts, "linestarts"),
				new KeyStruct(Major.SectAttr, Minor.LineRestart, "linerestart"),
				new KeyStruct(Major.SectAttr, Minor.LineRestartPg, "lineppage"),
				new KeyStruct(Major.SectAttr, Minor.LineCont, "linecont"),
				new KeyStruct(Major.SectAttr, Minor.SectPageWid, "pgwsxn"),
				new KeyStruct(Major.SectAttr, Minor.SectPageHt, "pghsxn"),
				new KeyStruct(Major.SectAttr, Minor.SectMarginLeft, "marglsxn"),
				new KeyStruct(Major.SectAttr, Minor.SectMarginRight, "margrsxn"),
				new KeyStruct(Major.SectAttr, Minor.SectMarginTop, "margtsxn"),
				new KeyStruct(Major.SectAttr, Minor.SectMarginBottom, "margbsxn"),
				new KeyStruct(Major.SectAttr, Minor.SectMarginGutter, "guttersxn"),
				new KeyStruct(Major.SectAttr, Minor.SectLandscape, "lndscpsxn"),
				new KeyStruct(Major.SectAttr, Minor.TitleSpecial, "titlepg"),
				new KeyStruct(Major.SectAttr, Minor.HeaderY, "headery"),
				new KeyStruct(Major.SectAttr, Minor.FooterY, "footery"),
				new KeyStruct(Major.SectAttr, Minor.PageStarts, "pgnstarts"),
				new KeyStruct(Major.SectAttr, Minor.PageCont, "pgncont"),
				new KeyStruct(Major.SectAttr, Minor.PageRestart, "pgnrestart"),
				new KeyStruct(Major.SectAttr, Minor.PageNumRight, "pgnx"),
				new KeyStruct(Major.SectAttr, Minor.PageNumTop, "pgny"),
				new KeyStruct(Major.SectAttr, Minor.PageDecimal, "pgndec"),
				new KeyStruct(Major.SectAttr, Minor.PageURoman, "pgnucrm"),
				new KeyStruct(Major.SectAttr, Minor.PageLRoman, "pgnlcrm"),
				new KeyStruct(Major.SectAttr, Minor.PageULetter, "pgnucltr"),
				new KeyStruct(Major.SectAttr, Minor.PageLLetter, "pgnlcltr"),
				new KeyStruct(Major.SectAttr, Minor.PageNumHyphSep, "pgnhnsh"),
				new KeyStruct(Major.SectAttr, Minor.PageNumSpaceSep, "pgnhnsp"),
				new KeyStruct(Major.SectAttr, Minor.PageNumColonSep, "pgnhnsc"),
				new KeyStruct(Major.SectAttr, Minor.PageNumEmdashSep, "pgnhnsm"),
				new KeyStruct(Major.SectAttr, Minor.PageNumEndashSep, "pgnhnsn"),
				new KeyStruct(Major.SectAttr, Minor.TopVAlign, "vertalt"),
				new KeyStruct(Major.SectAttr, Minor.BottomVAlign, "vertalb"),
				new KeyStruct(Major.SectAttr, Minor.CenterVAlign, "vertalc"),
				new KeyStruct(Major.SectAttr, Minor.JustVAlign, "vertalj"),
				new KeyStruct(Major.SectAttr, Minor.RTLSect, "rtlsect"),
				new KeyStruct(Major.SectAttr, Minor.LTRSect, "ltrsect"),
				new KeyStruct(Major.DocAttr, Minor.DefTab, "deftab"),
				new KeyStruct(Major.DocAttr, Minor.HyphHotZone, "hyphhotz"),
				new KeyStruct(Major.DocAttr, Minor.HyphConsecLines, "hyphconsec"),
				new KeyStruct(Major.DocAttr, Minor.HyphCaps, "hyphcaps"),
				new KeyStruct(Major.DocAttr, Minor.HyphAuto, "hyphauto"),
				new KeyStruct(Major.DocAttr, Minor.LineStart, "linestart"),
				new KeyStruct(Major.DocAttr, Minor.FracWidth, "fracwidth"),
				new KeyStruct(Major.DocAttr, Minor.MakeBackup, "makeback"),
				new KeyStruct(Major.DocAttr, Minor.MakeBackup, "makebackup"),
				new KeyStruct(Major.DocAttr, Minor.RTFDefault, "defformat"),
				new KeyStruct(Major.DocAttr, Minor.PSOverlay, "psover"),
				new KeyStruct(Major.DocAttr, Minor.DocTemplate, "doctemp"),
				new KeyStruct(Major.DocAttr, Minor.DefLanguage, "deflang"),
				new KeyStruct(Major.DocAttr, Minor.FENoteType, "fet"),
				new KeyStruct(Major.DocAttr, Minor.FNoteEndSect, "endnotes"),
				new KeyStruct(Major.DocAttr, Minor.FNoteEndDoc, "enddoc"),
				new KeyStruct(Major.DocAttr, Minor.FNoteText, "ftntj"),
				new KeyStruct(Major.DocAttr, Minor.FNoteBottom, "ftnbj"),
				new KeyStruct(Major.DocAttr, Minor.ENoteEndSect, "aendnotes"),
				new KeyStruct(Major.DocAttr, Minor.ENoteEndDoc, "aenddoc"),
				new KeyStruct(Major.DocAttr, Minor.ENoteText, "aftntj"),
				new KeyStruct(Major.DocAttr, Minor.ENoteBottom, "aftnbj"),
				new KeyStruct(Major.DocAttr, Minor.FNoteStart, "ftnstart"),
				new KeyStruct(Major.DocAttr, Minor.ENoteStart, "aftnstart"),
				new KeyStruct(Major.DocAttr, Minor.FNoteRestartPage, "ftnrstpg"),
				new KeyStruct(Major.DocAttr, Minor.FNoteRestart, "ftnrestart"),
				new KeyStruct(Major.DocAttr, Minor.FNoteRestartCont, "ftnrstcont"),
				new KeyStruct(Major.DocAttr, Minor.ENoteRestart, "aftnrestart"),
				new KeyStruct(Major.DocAttr, Minor.ENoteRestartCont, "aftnrstcont"),
				new KeyStruct(Major.DocAttr, Minor.FNoteNumArabic, "ftnnar"),
				new KeyStruct(Major.DocAttr, Minor.FNoteNumLLetter, "ftnnalc"),
				new KeyStruct(Major.DocAttr, Minor.FNoteNumULetter, "ftnnauc"),
				new KeyStruct(Major.DocAttr, Minor.FNoteNumLRoman, "ftnnrlc"),
				new KeyStruct(Major.DocAttr, Minor.FNoteNumURoman, "ftnnruc"),
				new KeyStruct(Major.DocAttr, Minor.FNoteNumChicago, "ftnnchi"),
				new KeyStruct(Major.DocAttr, Minor.ENoteNumArabic, "aftnnar"),
				new KeyStruct(Major.DocAttr, Minor.ENoteNumLLetter, "aftnnalc"),
				new KeyStruct(Major.DocAttr, Minor.ENoteNumULetter, "aftnnauc"),
				new KeyStruct(Major.DocAttr, Minor.ENoteNumLRoman, "aftnnrlc"),
				new KeyStruct(Major.DocAttr, Minor.ENoteNumURoman, "aftnnruc"),
				new KeyStruct(Major.DocAttr, Minor.ENoteNumChicago, "aftnnchi"),
				new KeyStruct(Major.DocAttr, Minor.PaperWidth, "paperw"),
				new KeyStruct(Major.DocAttr, Minor.PaperHeight, "paperh"),
				new KeyStruct(Major.DocAttr, Minor.PaperSize, "psz"),
				new KeyStruct(Major.DocAttr, Minor.LeftMargin, "margl"),
				new KeyStruct(Major.DocAttr, Minor.RightMargin, "margr"),
				new KeyStruct(Major.DocAttr, Minor.TopMargin, "margt"),
				new KeyStruct(Major.DocAttr, Minor.BottomMargin, "margb"),
				new KeyStruct(Major.DocAttr, Minor.FacingPage, "facingp"),
				new KeyStruct(Major.DocAttr, Minor.GutterWid, "gutter"),
				new KeyStruct(Major.DocAttr, Minor.MirrorMargin, "margmirror"),
				new KeyStruct(Major.DocAttr, Minor.Landscape, "landscape"),
				new KeyStruct(Major.DocAttr, Minor.PageStart, "pgnstart"),
				new KeyStruct(Major.DocAttr, Minor.WidowCtrl, "widowctrl"),
				new KeyStruct(Major.DocAttr, Minor.LinkStyles, "linkstyles"),
				new KeyStruct(Major.DocAttr, Minor.NoAutoTabIndent, "notabind"),
				new KeyStruct(Major.DocAttr, Minor.WrapSpaces, "wraptrsp"),
				new KeyStruct(Major.DocAttr, Minor.PrintColorsBlack, "prcolbl"),
				new KeyStruct(Major.DocAttr, Minor.NoExtraSpaceRL, "noextrasprl"),
				new KeyStruct(Major.DocAttr, Minor.NoColumnBalance, "nocolbal"),
				new KeyStruct(Major.DocAttr, Minor.CvtMailMergeQuote, "cvmme"),
				new KeyStruct(Major.DocAttr, Minor.SuppressTopSpace, "sprstsp"),
				new KeyStruct(Major.DocAttr, Minor.SuppressPreParSpace, "sprsspbf"),
				new KeyStruct(Major.DocAttr, Minor.CombineTblBorders, "otblrul"),
				new KeyStruct(Major.DocAttr, Minor.TranspMetafiles, "transmf"),
				new KeyStruct(Major.DocAttr, Minor.SwapBorders, "swpbdr"),
				new KeyStruct(Major.DocAttr, Minor.ShowHardBreaks, "brkfrm"),
				new KeyStruct(Major.DocAttr, Minor.FormProtected, "formprot"),
				new KeyStruct(Major.DocAttr, Minor.AllProtected, "allprot"),
				new KeyStruct(Major.DocAttr, Minor.FormShading, "formshade"),
				new KeyStruct(Major.DocAttr, Minor.FormDisplay, "formdisp"),
				new KeyStruct(Major.DocAttr, Minor.PrintData, "printdata"),
				new KeyStruct(Major.DocAttr, Minor.RevProtected, "revprot"),
				new KeyStruct(Major.DocAttr, Minor.Revisions, "revisions"),
				new KeyStruct(Major.DocAttr, Minor.RevDisplay, "revprop"),
				new KeyStruct(Major.DocAttr, Minor.RevBar, "revbar"),
				new KeyStruct(Major.DocAttr, Minor.AnnotProtected, "annotprot"),
				new KeyStruct(Major.DocAttr, Minor.RTLDoc, "rtldoc"),
				new KeyStruct(Major.DocAttr, Minor.LTRDoc, "ltrdoc"),
				new KeyStruct(Major.StyleAttr, Minor.Additive, "additive"),
				new KeyStruct(Major.StyleAttr, Minor.BasedOn, "sbasedon"),
				new KeyStruct(Major.StyleAttr, Minor.Next, "snext"),
				new KeyStruct(Major.PictAttr, Minor.MacQD, "macpict"),
				new KeyStruct(Major.PictAttr, Minor.PMMetafile, "pmmetafile"),
				new KeyStruct(Major.PictAttr, Minor.WinMetafile, "wmetafile"),
				new KeyStruct(Major.PictAttr, Minor.DevIndBitmap, "dibitmap"),
				new KeyStruct(Major.PictAttr, Minor.WinBitmap, "wbitmap"),
				new KeyStruct(Major.PictAttr, Minor.PngBlip, "pngblip"),
				new KeyStruct(Major.PictAttr, Minor.PixelBits, "wbmbitspixel"),
				new KeyStruct(Major.PictAttr, Minor.BitmapPlanes, "wbmplanes"),
				new KeyStruct(Major.PictAttr, Minor.BitmapWid, "wbmwidthbytes"),
				new KeyStruct(Major.PictAttr, Minor.PicWid, "picw"),
				new KeyStruct(Major.PictAttr, Minor.PicHt, "pich"),
				new KeyStruct(Major.PictAttr, Minor.PicGoalWid, "picwgoal"),
				new KeyStruct(Major.PictAttr, Minor.PicGoalHt, "pichgoal"),
				new KeyStruct(Major.PictAttr, Minor.PicGoalWid, "picwGoal"),
				new KeyStruct(Major.PictAttr, Minor.PicGoalHt, "pichGoal"),
				new KeyStruct(Major.PictAttr, Minor.PicScaleX, "picscalex"),
				new KeyStruct(Major.PictAttr, Minor.PicScaleY, "picscaley"),
				new KeyStruct(Major.PictAttr, Minor.PicScaled, "picscaled"),
				new KeyStruct(Major.PictAttr, Minor.PicCropTop, "piccropt"),
				new KeyStruct(Major.PictAttr, Minor.PicCropBottom, "piccropb"),
				new KeyStruct(Major.PictAttr, Minor.PicCropLeft, "piccropl"),
				new KeyStruct(Major.PictAttr, Minor.PicCropRight, "piccropr"),
				new KeyStruct(Major.PictAttr, Minor.PicMFHasBitmap, "picbmp"),
				new KeyStruct(Major.PictAttr, Minor.PicMFBitsPerPixel, "picbpp"),
				new KeyStruct(Major.PictAttr, Minor.PicBinary, "bin"),
				new KeyStruct(Major.NeXTGrAttr, Minor.NeXTGWidth, "width"),
				new KeyStruct(Major.NeXTGrAttr, Minor.NeXTGHeight, "height"),
				new KeyStruct(Major.Destination, Minor.OptDest, "*"),
				new KeyStruct(Major.Destination, Minor.FontTbl, "fonttbl"),
				new KeyStruct(Major.Destination, Minor.FontAltName, "f

Room Architect Tool_Data/Managed/System.Xml.dll

Decompiled 3 months ago
using System;
using System.CodeDom;
using System.CodeDom.Compiler;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Configuration;
using System.Diagnostics;
using System.Diagnostics.SymbolStore;
using System.Globalization;
using System.IO;
using System.Net;
using System.Net.Cache;
using System.Reflection;
using System.Reflection.Emit;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Security;
using System.Security.Permissions;
using System.Security.Policy;
using System.Security.Principal;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;
using System.Xml.Serialization.Advanced;
using System.Xml.Serialization.Configuration;
using System.Xml.Utils;
using System.Xml.XPath;
using System.Xml.XmlConfiguration;
using System.Xml.Xsl;
using System.Xml.Xsl.IlGen;
using System.Xml.Xsl.Qil;
using System.Xml.Xsl.Runtime;
using System.Xml.Xsl.XPath;
using System.Xml.Xsl.Xslt;
using System.Xml.Xsl.XsltOld;
using System.Xml.Xsl.XsltOld.Debugger;
using MS.Internal.Xml.Cache;
using MS.Internal.Xml.XPath;
using Microsoft.CSharp;
using Microsoft.VisualBasic;
using Microsoft.Win32;
using Unity;

[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("System.Data.SqlXml, PublicKey=00000000000000000400000000000000")]
[assembly: InternalsVisibleTo("System.Xml.Linq, PublicKey=00000000000000000400000000000000")]
[assembly: InternalsVisibleTo("System.ServiceModel.Friend, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
[assembly: AssemblyTitle("System.Xml.dll")]
[assembly: AssemblyDescription("System.Xml.dll")]
[assembly: AssemblyDefaultAlias("System.Xml.dll")]
[assembly: AssemblyCompany("Mono development team")]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright("(c) Various Mono authors")]
[assembly: SatelliteContractVersion("4.0.0.0")]
[assembly: AssemblyInformationalVersion("4.6.57.0")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: ComVisible(false)]
[assembly: CLSCompliant(true)]
[assembly: AssemblyDelaySign(true)]
[assembly: AssemblyKeyFile("../ecma.pub")]
[assembly: AllowPartiallyTrustedCallers]
[assembly: InternalsVisibleTo("System.Xml.Linq, PublicKey=00000000000000000400000000000000", AllInternalsVisible = false)]
[assembly: AssemblyFileVersion("4.6.57.0")]
[assembly: CompilationRelaxations(CompilationRelaxations.NoStringInterning)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("4.0.0.0")]
[module: UnverifiableCode]
internal static class AssemblyRef
{
	internal const string SystemConfiguration = "System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	internal const string System = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string EcmaPublicKey = "b77a5c561934e089";

	public const string FrameworkPublicKeyFull = "00000000000000000400000000000000";

	public const string FrameworkPublicKeyFull2 = "00000000000000000400000000000000";

	public const string MicrosoftPublicKey = "b03f5f7f11d50a3a";

	public const string MicrosoftJScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string MicrosoftVSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string SystemData = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string SystemDesign = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string SystemDrawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string SystemWeb = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string SystemWebExtensions = "System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string SystemWindowsForms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
internal static class Consts
{
	public const string MonoVersion = "5.11.0.0";

	public const string MonoCompany = "Mono development team";

	public const string MonoProduct = "Mono Common Language Infrastructure";

	public const string MonoCopyright = "(c) Various Mono authors";

	public const int MonoCorlibVersion = 1051100001;

	public const string FxVersion = "4.0.0.0";

	public const string FxFileVersion = "4.6.57.0";

	public const string EnvironmentVersion = "4.0.30319.42000";

	public const string VsVersion = "0.0.0.0";

	public const string VsFileVersion = "11.0.0.0";

	private const string PublicKeyToken = "b77a5c561934e089";

	public const string AssemblyI18N = "I18N, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMicrosoft_JScript = "Microsoft.JScript, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblyMono_Http = "Mono.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Posix = "Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Security = "Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyMono_Messaging_RabbitMQ = "Mono.Messaging.RabbitMQ, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756";

	public const string AssemblyCorlib = "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Data = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Design = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Drawing_Design = "System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Messaging = "System.Messaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Security = "System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Web = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";

	public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string AssemblySystem_Core = "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";

	public const string WindowsBase_3_0 = "WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";

	public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
}
internal static class SR
{
	internal static string GetString(string name, params object[] args)
	{
		return GetString(CultureInfo.InvariantCulture, name, args);
	}

	internal static string GetString(CultureInfo culture, string name, params object[] args)
	{
		return string.Format(culture, name, args);
	}

	internal static string GetString(string name)
	{
		return name;
	}

	internal static string GetString(CultureInfo culture, string name)
	{
		return name;
	}

	internal static string Format(string resourceFormat, params object[] args)
	{
		if (args != null)
		{
			return string.Format(CultureInfo.InvariantCulture, resourceFormat, args);
		}
		return resourceFormat;
	}

	internal static string Format(string resourceFormat, object p1)
	{
		return string.Format(CultureInfo.InvariantCulture, resourceFormat, p1);
	}

	internal static string Format(string resourceFormat, object p1, object p2)
	{
		return string.Format(CultureInfo.InvariantCulture, resourceFormat, p1, p2);
	}

	internal static string Format(string resourceFormat, object p1, object p2, object p3)
	{
		return string.Format(CultureInfo.InvariantCulture, resourceFormat, p1, p2, p3);
	}
}
internal static class ThisAssembly
{
	public const string Version = "4.0.0.0";
}
namespace MS.Internal.Xml.XPath
{
	internal sealed class AbsoluteQuery : ContextQuery
	{
		public AbsoluteQuery()
		{
		}

		private AbsoluteQuery(AbsoluteQuery other)
			: base(other)
		{
		}

		public override object Evaluate(XPathNodeIterator context)
		{
			contextNode = context.Current.Clone();
			contextNode.MoveToRoot();
			count = 0;
			return this;
		}

		public override XPathNavigator MatchNode(XPathNavigator context)
		{
			if (context != null && context.NodeType == XPathNodeType.Root)
			{
				return context;
			}
			return null;
		}

		public override XPathNodeIterator Clone()
		{
			return new AbsoluteQuery(this);
		}
	}
	internal abstract class AstNode
	{
		public enum AstType
		{
			Axis,
			Operator,
			Filter,
			ConstantOperand,
			Function,
			Group,
			Root,
			Variable,
			Error
		}

		public abstract AstType Type { get; }

		public abstract XPathResultType ReturnType { get; }
	}
	internal sealed class AttributeQuery : BaseAxisQuery
	{
		private bool onAttribute;

		public AttributeQuery(Query qyParent, string Name, string Prefix, XPathNodeType Type)
			: base(qyParent, Name, Prefix, Type)
		{
		}

		private AttributeQuery(AttributeQuery other)
			: base(other)
		{
			onAttribute = other.onAttribute;
		}

		public override void Reset()
		{
			onAttribute = false;
			base.Reset();
		}

		public override XPathNavigator Advance()
		{
			do
			{
				if (!onAttribute)
				{
					currentNode = qyInput.Advance();
					if (currentNode == null)
					{
						return null;
					}
					position = 0;
					currentNode = currentNode.Clone();
					onAttribute = currentNode.MoveToFirstAttribute();
				}
				else
				{
					onAttribute = currentNode.MoveToNextAttribute();
				}
			}
			while (!onAttribute || !matches(currentNode));
			position++;
			return currentNode;
		}

		public override XPathNavigator MatchNode(XPathNavigator context)
		{
			if (context != null && context.NodeType == XPathNodeType.Attribute && matches(context))
			{
				XPathNavigator xPathNavigator = context.Clone();
				if (xPathNavigator.MoveToParent())
				{
					return qyInput.MatchNode(xPathNavigator);
				}
			}
			return null;
		}

		public override XPathNodeIterator Clone()
		{
			return new AttributeQuery(this);
		}
	}
	internal class Axis : AstNode
	{
		public enum AxisType
		{
			Ancestor,
			AncestorOrSelf,
			Attribute,
			Child,
			Descendant,
			DescendantOrSelf,
			Following,
			FollowingSibling,
			Namespace,
			Parent,
			Preceding,
			PrecedingSibling,
			Self,
			None
		}

		private AxisType axisType;

		private AstNode input;

		private string prefix;

		private string name;

		private XPathNodeType nodeType;

		protected bool abbrAxis;

		private string urn = string.Empty;

		public override AstType Type => AstType.Axis;

		public override XPathResultType ReturnType => XPathResultType.NodeSet;

		public AstNode Input
		{
			get
			{
				return input;
			}
			set
			{
				input = value;
			}
		}

		public string Prefix => prefix;

		public string Name => name;

		public XPathNodeType NodeType => nodeType;

		public AxisType TypeOfAxis => axisType;

		public bool AbbrAxis => abbrAxis;

		public string Urn
		{
			get
			{
				return urn;
			}
			set
			{
				urn = value;
			}
		}

		public Axis(AxisType axisType, AstNode input, string prefix, string name, XPathNodeType nodetype)
		{
			this.axisType = axisType;
			this.input = input;
			this.prefix = prefix;
			this.name = name;
			nodeType = nodetype;
		}

		public Axis(AxisType axisType, AstNode input)
			: this(axisType, input, string.Empty, string.Empty, XPathNodeType.All)
		{
			abbrAxis = true;
		}
	}
	internal abstract class BaseAxisQuery : Query
	{
		internal Query qyInput;

		private bool nameTest;

		private string name;

		private string prefix;

		private string nsUri;

		private XPathNodeType typeTest;

		protected XPathNavigator currentNode;

		protected int position;

		protected string Name => name;

		protected string Prefix => prefix;

		protected string Namespace => nsUri;

		protected bool NameTest => nameTest;

		protected XPathNodeType TypeTest => typeTest;

		public override int CurrentPosition => position;

		public override XPathNavigator Current => currentNode;

		public override double XsltDefaultPriority
		{
			get
			{
				if (qyInput.GetType() != typeof(ContextQuery))
				{
					return 0.5;
				}
				if (name.Length != 0)
				{
					return 0.0;
				}
				if (prefix.Length != 0)
				{
					return -0.25;
				}
				return -0.5;
			}
		}

		public override XPathResultType StaticType => XPathResultType.NodeSet;

		protected BaseAxisQuery(Query qyInput)
		{
			name = string.Empty;
			prefix = string.Empty;
			nsUri = string.Empty;
			this.qyInput = qyInput;
		}

		protected BaseAxisQuery(Query qyInput, string name, string prefix, XPathNodeType typeTest)
		{
			this.qyInput = qyInput;
			this.name = name;
			this.prefix = prefix;
			this.typeTest = typeTest;
			nameTest = prefix.Length != 0 || name.Length != 0;
			nsUri = string.Empty;
		}

		protected BaseAxisQuery(BaseAxisQuery other)
			: base(other)
		{
			qyInput = Query.Clone(other.qyInput);
			name = other.name;
			prefix = other.prefix;
			nsUri = other.nsUri;
			typeTest = other.typeTest;
			nameTest = other.nameTest;
			position = other.position;
			currentNode = other.currentNode;
		}

		public override void Reset()
		{
			position = 0;
			currentNode = null;
			qyInput.Reset();
		}

		public override void SetXsltContext(XsltContext context)
		{
			nsUri = context.LookupNamespace(prefix);
			qyInput.SetXsltContext(context);
		}

		public virtual bool matches(XPathNavigator e)
		{
			if (TypeTest == e.NodeType || TypeTest == XPathNodeType.All || (TypeTest == XPathNodeType.Text && (e.NodeType == XPathNodeType.Whitespace || e.NodeType == XPathNodeType.SignificantWhitespace)))
			{
				if (!NameTest)
				{
					return true;
				}
				if ((name.Equals(e.LocalName) || name.Length == 0) && nsUri.Equals(e.NamespaceURI))
				{
					return true;
				}
			}
			return false;
		}

		public override object Evaluate(XPathNodeIterator nodeIterator)
		{
			ResetCount();
			Reset();
			qyInput.Evaluate(nodeIterator);
			return this;
		}

		public override void PrintQuery(XmlWriter w)
		{
			w.WriteStartElement(GetType().Name);
			if (NameTest)
			{
				w.WriteAttributeString("name", (Prefix.Length != 0) ? (Prefix + ":" + Name) : Name);
			}
			if (TypeTest != XPathNodeType.Element)
			{
				w.WriteAttributeString("nodeType", TypeTest.ToString());
			}
			qyInput.PrintQuery(w);
			w.WriteEndElement();
		}
	}
	internal sealed class BooleanExpr : ValueQuery
	{
		private Query opnd1;

		private Query opnd2;

		private bool isOr;

		public override XPathResultType StaticType => XPathResultType.Boolean;

		public BooleanExpr(Operator.Op op, Query opnd1, Query opnd2)
		{
			if (opnd1.StaticType != XPathResultType.Boolean)
			{
				opnd1 = new BooleanFunctions(Function.FunctionType.FuncBoolean, opnd1);
			}
			if (opnd2.StaticType != XPathResultType.Boolean)
			{
				opnd2 = new BooleanFunctions(Function.FunctionType.FuncBoolean, opnd2);
			}
			this.opnd1 = opnd1;
			this.opnd2 = opnd2;
			isOr = op == Operator.Op.OR;
		}

		private BooleanExpr(BooleanExpr other)
			: base(other)
		{
			opnd1 = Query.Clone(other.opnd1);
			opnd2 = Query.Clone(other.opnd2);
			isOr = other.isOr;
		}

		public override void SetXsltContext(XsltContext context)
		{
			opnd1.SetXsltContext(context);
			opnd2.SetXsltContext(context);
		}

		public override object Evaluate(XPathNodeIterator nodeIterator)
		{
			object obj = opnd1.Evaluate(nodeIterator);
			if ((bool)obj == isOr)
			{
				return obj;
			}
			return opnd2.Evaluate(nodeIterator);
		}

		public override XPathNodeIterator Clone()
		{
			return new BooleanExpr(this);
		}

		public override void PrintQuery(XmlWriter w)
		{
			w.WriteStartElement(GetType().Name);
			w.WriteAttributeString("op", (isOr ? Operator.Op.OR : Operator.Op.AND).ToString());
			opnd1.PrintQuery(w);
			opnd2.PrintQuery(w);
			w.WriteEndElement();
		}
	}
	internal sealed class BooleanFunctions : ValueQuery
	{
		private Query arg;

		private Function.FunctionType funcType;

		public override XPathResultType StaticType => XPathResultType.Boolean;

		public BooleanFunctions(Function.FunctionType funcType, Query arg)
		{
			this.arg = arg;
			this.funcType = funcType;
		}

		private BooleanFunctions(BooleanFunctions other)
			: base(other)
		{
			arg = Query.Clone(other.arg);
			funcType = other.funcType;
		}

		public override void SetXsltContext(XsltContext context)
		{
			if (arg != null)
			{
				arg.SetXsltContext(context);
			}
		}

		public override object Evaluate(XPathNodeIterator nodeIterator)
		{
			return funcType switch
			{
				Function.FunctionType.FuncBoolean => toBoolean(nodeIterator), 
				Function.FunctionType.FuncNot => Not(nodeIterator), 
				Function.FunctionType.FuncTrue => true, 
				Function.FunctionType.FuncFalse => false, 
				Function.FunctionType.FuncLang => Lang(nodeIterator), 
				_ => false, 
			};
		}

		internal static bool toBoolean(double number)
		{
			if (number != 0.0)
			{
				return !double.IsNaN(number);
			}
			return false;
		}

		internal static bool toBoolean(string str)
		{
			return str.Length > 0;
		}

		internal bool toBoolean(XPathNodeIterator nodeIterator)
		{
			object obj = arg.Evaluate(nodeIterator);
			if (obj is XPathNodeIterator)
			{
				return arg.Advance() != null;
			}
			if (obj is string)
			{
				return toBoolean((string)obj);
			}
			if (obj is double)
			{
				return toBoolean((double)obj);
			}
			if (obj is bool)
			{
				return (bool)obj;
			}
			return true;
		}

		private bool Not(XPathNodeIterator nodeIterator)
		{
			return !(bool)arg.Evaluate(nodeIterator);
		}

		private bool Lang(XPathNodeIterator nodeIterator)
		{
			string text = arg.Evaluate(nodeIterator).ToString();
			string xmlLang = nodeIterator.Current.XmlLang;
			if (xmlLang.StartsWith(text, StringComparison.OrdinalIgnoreCase))
			{
				if (xmlLang.Length != text.Length)
				{
					return xmlLang[text.Length] == '-';
				}
				return true;
			}
			return false;
		}

		public override XPathNodeIterator Clone()
		{
			return new BooleanFunctions(this);
		}

		public override void PrintQuery(XmlWriter w)
		{
			w.WriteStartElement(GetType().Name);
			w.WriteAttributeString("name", funcType.ToString());
			if (arg != null)
			{
				arg.PrintQuery(w);
			}
			w.WriteEndElement();
		}
	}
	internal abstract class CacheAxisQuery : BaseAxisQuery
	{
		protected List<XPathNavigator> outputBuffer;

		public override XPathNavigator Current
		{
			get
			{
				if (count == 0)
				{
					return null;
				}
				return outputBuffer[count - 1];
			}
		}

		public override int CurrentPosition => count;

		public override int Count => outputBuffer.Count;

		public override QueryProps Properties => (QueryProps)23;

		public CacheAxisQuery(Query qyInput, string name, string prefix, XPathNodeType typeTest)
			: base(qyInput, name, prefix, typeTest)
		{
			outputBuffer = new List<XPathNavigator>();
			count = 0;
		}

		protected CacheAxisQuery(CacheAxisQuery other)
			: base(other)
		{
			outputBuffer = new List<XPathNavigator>(other.outputBuffer);
			count = other.count;
		}

		public override void Reset()
		{
			count = 0;
		}

		public override object Evaluate(XPathNodeIterator context)
		{
			base.Evaluate(context);
			outputBuffer.Clear();
			return this;
		}

		public override XPathNavigator Advance()
		{
			if (count < outputBuffer.Count)
			{
				return outputBuffer[count++];
			}
			return null;
		}
	}
	internal sealed class CacheChildrenQuery : ChildrenQuery
	{
		private XPathNavigator nextInput;

		private ClonableStack<XPathNavigator> elementStk;

		private ClonableStack<int> positionStk;

		private bool needInput;

		public CacheChildrenQuery(Query qyInput, string name, string prefix, XPathNodeType type)
			: base(qyInput, name, prefix, type)
		{
			elementStk = new ClonableStack<XPathNavigator>();
			positionStk = new ClonableStack<int>();
			needInput = true;
		}

		private CacheChildrenQuery(CacheChildrenQuery other)
			: base(other)
		{
			nextInput = Query.Clone(other.nextInput);
			elementStk = other.elementStk.Clone();
			positionStk = other.positionStk.Clone();
			needInput = other.needInput;
		}

		public override void Reset()
		{
			nextInput = null;
			elementStk.Clear();
			positionStk.Clear();
			needInput = true;
			base.Reset();
		}

		public override XPathNavigator Advance()
		{
			do
			{
				IL_0000:
				if (needInput)
				{
					if (elementStk.Count == 0)
					{
						currentNode = GetNextInput();
						if (currentNode == null)
						{
							return null;
						}
						if (!currentNode.MoveToFirstChild())
						{
							goto IL_0000;
						}
						position = 0;
					}
					else
					{
						currentNode = elementStk.Pop();
						position = positionStk.Pop();
						if (!DecideNextNode())
						{
							goto IL_0000;
						}
					}
					needInput = false;
				}
				else if (!currentNode.MoveToNext() || !DecideNextNode())
				{
					needInput = true;
					goto IL_0000;
				}
			}
			while (!matches(currentNode));
			position++;
			return currentNode;
		}

		private bool DecideNextNode()
		{
			nextInput = GetNextInput();
			if (nextInput != null && Query.CompareNodes(currentNode, nextInput) == XmlNodeOrder.After)
			{
				elementStk.Push(currentNode);
				positionStk.Push(position);
				currentNode = nextInput;
				nextInput = null;
				if (!currentNode.MoveToFirstChild())
				{
					return false;
				}
				position = 0;
			}
			return true;
		}

		private XPathNavigator GetNextInput()
		{
			XPathNavigator xPathNavigator;
			if (nextInput != null)
			{
				xPathNavigator = nextInput;
				nextInput = null;
			}
			else
			{
				xPathNavigator = qyInput.Advance();
				if (xPathNavigator != null)
				{
					xPathNavigator = xPathNavigator.Clone();
				}
			}
			return xPathNavigator;
		}

		public override XPathNodeIterator Clone()
		{
			return new CacheChildrenQuery(this);
		}
	}
	internal abstract class CacheOutputQuery : Query
	{
		internal Query input;

		protected List<XPathNavigator> outputBuffer;

		public override XPathNavigator Current
		{
			get
			{
				if (count == 0)
				{
					return null;
				}
				return outputBuffer[count - 1];
			}
		}

		public override XPathResultType StaticType => XPathResultType.NodeSet;

		public override int CurrentPosition => count;

		public override int Count => outputBuffer.Count;

		public override QueryProps Properties => (QueryProps)23;

		public CacheOutputQuery(Query input)
		{
			this.input = input;
			outputBuffer = new List<XPathNavigator>();
			count = 0;
		}

		protected CacheOutputQuery(CacheOutputQuery other)
			: base(other)
		{
			input = Query.Clone(other.input);
			outputBuffer = new List<XPathNavigator>(other.outputBuffer);
			count = other.count;
		}

		public override void Reset()
		{
			count = 0;
		}

		public override void SetXsltContext(XsltContext context)
		{
			input.SetXsltContext(context);
		}

		public override object Evaluate(XPathNodeIterator context)
		{
			outputBuffer.Clear();
			count = 0;
			return input.Evaluate(context);
		}

		public override XPathNavigator Advance()
		{
			if (count < outputBuffer.Count)
			{
				return outputBuffer[count++];
			}
			return null;
		}

		public override void PrintQuery(XmlWriter w)
		{
			w.WriteStartElement(GetType().Name);
			input.PrintQuery(w);
			w.WriteEndElement();
		}
	}
	internal class ChildrenQuery : BaseAxisQuery
	{
		private XPathNodeIterator iterator = XPathEmptyIterator.Instance;

		public ChildrenQuery(Query qyInput, string name, string prefix, XPathNodeType type)
			: base(qyInput, name, prefix, type)
		{
		}

		protected ChildrenQuery(ChildrenQuery other)
			: base(other)
		{
			iterator = Query.Clone(other.iterator);
		}

		public override void Reset()
		{
			iterator = XPathEmptyIterator.Instance;
			base.Reset();
		}

		public override XPathNavigator Advance()
		{
			while (!iterator.MoveNext())
			{
				XPathNavigator xPathNavigator = qyInput.Advance();
				if (xPathNavigator == null)
				{
					return null;
				}
				if (base.NameTest)
				{
					if (base.TypeTest == XPathNodeType.ProcessingInstruction)
					{
						iterator = new IteratorFilter(xPathNavigator.SelectChildren(base.TypeTest), base.Name);
					}
					else
					{
						iterator = xPathNavigator.SelectChildren(base.Name, base.Namespace);
					}
				}
				else
				{
					iterator = xPathNavigator.SelectChildren(base.TypeTest);
				}
				position = 0;
			}
			position++;
			currentNode = iterator.Current;
			return currentNode;
		}

		public sealed override XPathNavigator MatchNode(XPathNavigator context)
		{
			if (context != null && matches(context))
			{
				XPathNavigator xPathNavigator = context.Clone();
				if (xPathNavigator.NodeType != XPathNodeType.Attribute && xPathNavigator.MoveToParent())
				{
					return qyInput.MatchNode(xPathNavigator);
				}
				return null;
			}
			return null;
		}

		public override XPathNodeIterator Clone()
		{
			return new ChildrenQuery(this);
		}
	}
	internal sealed class ClonableStack<T> : List<T>
	{
		public ClonableStack()
		{
		}

		public ClonableStack(int capacity)
			: base(capacity)
		{
		}

		private ClonableStack(IEnumerable<T> collection)
			: base(collection)
		{
		}

		public void Push(T value)
		{
			Add(value);
		}

		public T Pop()
		{
			int index = base.Count - 1;
			T result = base[index];
			RemoveAt(index);
			return result;
		}

		public T Peek()
		{
			return base[base.Count - 1];
		}

		public ClonableStack<T> Clone()
		{
			return new ClonableStack<T>(this);
		}
	}
	internal class CompiledXpathExpr : XPathExpression
	{
		private class UndefinedXsltContext : XsltContext
		{
			private IXmlNamespaceResolver nsResolver;

			public override string DefaultNamespace => string.Empty;

			public override bool Whitespace => false;

			public UndefinedXsltContext(IXmlNamespaceResolver nsResolver)
				: base(dummy: false)
			{
				this.nsResolver = nsResolver;
			}

			public override string LookupNamespace(string prefix)
			{
				if (prefix.Length == 0)
				{
					return string.Empty;
				}
				return nsResolver.LookupNamespace(prefix) ?? throw XPathException.Create("Namespace prefix '{0}' is not defined.", prefix);
			}

			public override IXsltContextVariable ResolveVariable(string prefix, string name)
			{
				throw XPathException.Create("XsltContext is needed for this query because of an unknown function.");
			}

			public override IXsltContextFunction ResolveFunction(string prefix, string name, XPathResultType[] ArgTypes)
			{
				throw XPathException.Create("XsltContext is needed for this query because of an unknown function.");
			}

			public override bool PreserveWhitespace(XPathNavigator node)
			{
				return false;
			}

			public override int CompareDocument(string baseUri, string nextbaseUri)
			{
				return string.CompareOrdinal(baseUri, nextbaseUri);
			}
		}

		private Query query;

		private string expr;

		private bool needContext;

		internal Query QueryTree
		{
			get
			{
				if (needContext)
				{
					throw XPathException.Create("Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function.");
				}
				return query;
			}
		}

		public override string Expression => expr;

		public override XPathResultType ReturnType => query.StaticType;

		internal CompiledXpathExpr(Query query, string expression, bool needContext)
		{
			this.query = query;
			expr = expression;
			this.needContext = needContext;
		}

		public virtual void CheckErrors()
		{
		}

		public override void AddSort(object expr, IComparer comparer)
		{
			Query evalQuery;
			if (expr is string)
			{
				evalQuery = new QueryBuilder().Build((string)expr, out needContext);
			}
			else
			{
				if (!(expr is CompiledXpathExpr))
				{
					throw XPathException.Create("This is an invalid object. Only objects returned from Compile() can be passed as input.");
				}
				evalQuery = ((CompiledXpathExpr)expr).QueryTree;
			}
			SortQuery sortQuery = query as SortQuery;
			if (sortQuery == null)
			{
				sortQuery = (SortQuery)(query = new SortQuery(query));
			}
			sortQuery.AddSort(evalQuery, comparer);
		}

		public override void AddSort(object expr, XmlSortOrder order, XmlCaseOrder caseOrder, string lang, XmlDataType dataType)
		{
			AddSort(expr, new XPathComparerHelper(order, caseOrder, lang, dataType));
		}

		public override XPathExpression Clone()
		{
			return new CompiledXpathExpr(Query.Clone(query), expr, needContext);
		}

		public override void SetContext(XmlNamespaceManager nsManager)
		{
			SetContext((IXmlNamespaceResolver)nsManager);
		}

		public override void SetContext(IXmlNamespaceResolver nsResolver)
		{
			XsltContext xsltContext = nsResolver as XsltContext;
			if (xsltContext == null)
			{
				if (nsResolver == null)
				{
					nsResolver = new XmlNamespaceManager(new System.Xml.NameTable());
				}
				xsltContext = new UndefinedXsltContext(nsResolver);
			}
			query.SetXsltContext(xsltContext);
			needContext = false;
		}
	}
	internal sealed class XPathComparerHelper : IComparer
	{
		private XmlSortOrder order;

		private XmlCaseOrder caseOrder;

		private CultureInfo cinfo;

		private XmlDataType dataType;

		public XPathComparerHelper(XmlSortOrder order, XmlCaseOrder caseOrder, string lang, XmlDataType dataType)
		{
			if (lang == null)
			{
				cinfo = Thread.CurrentThread.CurrentCulture;
			}
			else
			{
				try
				{
					cinfo = new CultureInfo(lang);
				}
				catch (ArgumentException)
				{
					throw;
				}
			}
			if (order == XmlSortOrder.Descending)
			{
				switch (caseOrder)
				{
				case XmlCaseOrder.LowerFirst:
					caseOrder = XmlCaseOrder.UpperFirst;
					break;
				case XmlCaseOrder.UpperFirst:
					caseOrder = XmlCaseOrder.LowerFirst;
					break;
				}
			}
			this.order = order;
			this.caseOrder = caseOrder;
			this.dataType = dataType;
		}

		public int Compare(object x, object y)
		{
			switch (dataType)
			{
			case XmlDataType.Text:
			{
				string strA = Convert.ToString(x, cinfo);
				string strB = Convert.ToString(y, cinfo);
				int num2 = string.Compare(strA, strB, caseOrder != XmlCaseOrder.None, cinfo);
				if (num2 != 0 || caseOrder == XmlCaseOrder.None)
				{
					if (order != XmlSortOrder.Ascending)
					{
						return -num2;
					}
					return num2;
				}
				num2 = string.Compare(strA, strB, ignoreCase: false, cinfo);
				if (caseOrder != XmlCaseOrder.LowerFirst)
				{
					return -num2;
				}
				return num2;
			}
			case XmlDataType.Number:
			{
				double num = XmlConvert.ToXPathDouble(x);
				double value = XmlConvert.ToXPathDouble(y);
				int num2 = num.CompareTo(value);
				if (order != XmlSortOrder.Ascending)
				{
					return -num2;
				}
				return num2;
			}
			default:
				throw new InvalidOperationException(System.Xml.Res.GetString("Operation is not valid due to the current state of the object."));
			}
		}
	}
	internal class ContextQuery : Query
	{
		protected XPathNavigator contextNode;

		public override XPathNavigator Current => contextNode;

		public override XPathResultType StaticType => XPathResultType.NodeSet;

		public override int CurrentPosition => count;

		public override int Count => 1;

		public override QueryProps Properties => (QueryProps)23;

		public ContextQuery()
		{
			count = 0;
		}

		protected ContextQuery(ContextQuery other)
			: base(other)
		{
			contextNode = other.contextNode;
		}

		public override void Reset()
		{
			count = 0;
		}

		public override object Evaluate(XPathNodeIterator context)
		{
			contextNode = context.Current;
			count = 0;
			return this;
		}

		public override XPathNavigator Advance()
		{
			if (count == 0)
			{
				count = 1;
				return contextNode;
			}
			return null;
		}

		public override XPathNavigator MatchNode(XPathNavigator current)
		{
			return current;
		}

		public override XPathNodeIterator Clone()
		{
			return new ContextQuery(this);
		}
	}
	internal abstract class DescendantBaseQuery : BaseAxisQuery
	{
		protected bool matchSelf;

		protected bool abbrAxis;

		public DescendantBaseQuery(Query qyParent, string Name, string Prefix, XPathNodeType Type, bool matchSelf, bool abbrAxis)
			: base(qyParent, Name, Prefix, Type)
		{
			this.matchSelf = matchSelf;
			this.abbrAxis = abbrAxis;
		}

		public DescendantBaseQuery(DescendantBaseQuery other)
			: base(other)
		{
			matchSelf = other.matchSelf;
			abbrAxis = other.abbrAxis;
		}

		public override XPathNavigator MatchNode(XPathNavigator context)
		{
			if (context != null)
			{
				if (!abbrAxis)
				{
					throw XPathException.Create("'{0}' is an invalid XSLT pattern.");
				}
				XPathNavigator xPathNavigator = null;
				if (matches(context))
				{
					if (matchSelf && (xPathNavigator = qyInput.MatchNode(context)) != null)
					{
						return xPathNavigator;
					}
					XPathNavigator xPathNavigator2 = context.Clone();
					while (xPathNavigator2.MoveToParent())
					{
						if ((xPathNavigator = qyInput.MatchNode(xPathNavigator2)) != null)
						{
							return xPathNavigator;
						}
					}
				}
			}
			return null;
		}

		public override void PrintQuery(XmlWriter w)
		{
			w.WriteStartElement(GetType().Name);
			if (matchSelf)
			{
				w.WriteAttributeString("self", "yes");
			}
			if (base.NameTest)
			{
				w.WriteAttributeString("name", (base.Prefix.Length != 0) ? (base.Prefix + ":" + base.Name) : base.Name);
			}
			if (base.TypeTest != XPathNodeType.Element)
			{
				w.WriteAttributeString("nodeType", base.TypeTest.ToString());
			}
			qyInput.PrintQuery(w);
			w.WriteEndElement();
		}
	}
	internal class DescendantQuery : DescendantBaseQuery
	{
		private XPathNodeIterator nodeIterator;

		internal DescendantQuery(Query qyParent, string Name, string Prefix, XPathNodeType Type, bool matchSelf, bool abbrAxis)
			: base(qyParent, Name, Prefix, Type, matchSelf, abbrAxis)
		{
		}

		public DescendantQuery(DescendantQuery other)
			: base(other)
		{
			nodeIterator = Query.Clone(other.nodeIterator);
		}

		public override void Reset()
		{
			nodeIterator = null;
			base.Reset();
		}

		public override XPathNavigator Advance()
		{
			while (true)
			{
				if (nodeIterator == null)
				{
					position = 0;
					XPathNavigator xPathNavigator = qyInput.Advance();
					if (xPathNavigator == null)
					{
						return null;
					}
					if (base.NameTest)
					{
						if (base.TypeTest == XPathNodeType.ProcessingInstruction)
						{
							nodeIterator = new IteratorFilter(xPathNavigator.SelectDescendants(base.TypeTest, matchSelf), base.Name);
						}
						else
						{
							nodeIterator = xPathNavigator.SelectDescendants(base.Name, base.Namespace, matchSelf);
						}
					}
					else
					{
						nodeIterator = xPathNavigator.SelectDescendants(base.TypeTest, matchSelf);
					}
				}
				if (nodeIterator.MoveNext())
				{
					break;
				}
				nodeIterator = null;
			}
			position++;
			currentNode = nodeIterator.Current;
			return currentNode;
		}

		public override XPathNodeIterator Clone()
		{
			return new DescendantQuery(this);
		}
	}
	internal sealed class DescendantOverDescendantQuery : DescendantBaseQuery
	{
		private int level;

		public DescendantOverDescendantQuery(Query qyParent, bool matchSelf, string name, string prefix, XPathNodeType typeTest, bool abbrAxis)
			: base(qyParent, name, prefix, typeTest, matchSelf, abbrAxis)
		{
		}

		private DescendantOverDescendantQuery(DescendantOverDescendantQuery other)
			: base(other)
		{
			level = other.level;
		}

		public override void Reset()
		{
			level = 0;
			base.Reset();
		}

		public override XPathNavigator Advance()
		{
			while (true)
			{
				if (level == 0)
				{
					currentNode = qyInput.Advance();
					position = 0;
					if (currentNode == null)
					{
						return null;
					}
					if (matchSelf && matches(currentNode))
					{
						break;
					}
					currentNode = currentNode.Clone();
					if (!MoveToFirstChild())
					{
						continue;
					}
				}
				else if (!MoveUpUntillNext())
				{
					continue;
				}
				do
				{
					if (matches(currentNode))
					{
						position++;
						return currentNode;
					}
				}
				while (MoveToFirstChild());
			}
			position = 1;
			return currentNode;
		}

		private bool MoveToFirstChild()
		{
			if (currentNode.MoveToFirstChild())
			{
				level++;
				return true;
			}
			return false;
		}

		private bool MoveUpUntillNext()
		{
			while (!currentNode.MoveToNext())
			{
				level--;
				if (level == 0)
				{
					return false;
				}
				currentNode.MoveToParent();
			}
			return true;
		}

		public override XPathNodeIterator Clone()
		{
			return new DescendantOverDescendantQuery(this);
		}
	}
	internal sealed class DocumentOrderQuery : CacheOutputQuery
	{
		public DocumentOrderQuery(Query qyParent)
			: base(qyParent)
		{
		}

		private DocumentOrderQuery(DocumentOrderQuery other)
			: base(other)
		{
		}

		public override object Evaluate(XPathNodeIterator context)
		{
			base.Evaluate(context);
			XPathNavigator nav;
			while ((nav = input.Advance()) != null)
			{
				Insert(outputBuffer, nav);
			}
			return this;
		}

		public override XPathNavigator MatchNode(XPathNavigator context)
		{
			return input.MatchNode(context);
		}

		public override XPathNodeIterator Clone()
		{
			return new DocumentOrderQuery(this);
		}
	}
	internal sealed class EmptyQuery : Query
	{
		public override int CurrentPosition => 0;

		public override int Count => 0;

		public override QueryProps Properties => (QueryProps)23;

		public override XPathResultType StaticType => XPathResultType.NodeSet;

		public override XPathNavigator Current => null;

		public override XPathNavigator Advance()
		{
			return null;
		}

		public override XPathNodeIterator Clone()
		{
			return this;
		}

		public override object Evaluate(XPathNodeIterator context)
		{
			return this;
		}

		public override void Reset()
		{
		}
	}
	internal abstract class ExtensionQuery : Query
	{
		protected string prefix;

		protected string name;

		protected XsltContext xsltContext;

		private ResetableIterator queryIterator;

		public override XPathNavigator Current
		{
			get
			{
				if (queryIterator == null)
				{
					throw XPathException.Create("Expression must evaluate to a node-set.");
				}
				if (queryIterator.CurrentPosition == 0)
				{
					Advance();
				}
				return queryIterator.Current;
			}
		}

		public override int CurrentPosition
		{
			get
			{
				if (queryIterator != null)
				{
					return queryIterator.CurrentPosition;
				}
				return 0;
			}
		}

		protected string QName
		{
			get
			{
				if (prefix.Length == 0)
				{
					return name;
				}
				return prefix + ":" + name;
			}
		}

		public override int Count
		{
			get
			{
				if (queryIterator != null)
				{
					return queryIterator.Count;
				}
				return 1;
			}
		}

		public override XPathResultType StaticType => XPathResultType.Any;

		public ExtensionQuery(string prefix, string name)
		{
			this.prefix = prefix;
			this.name = name;
		}

		protected ExtensionQuery(ExtensionQuery other)
			: base(other)
		{
			prefix = other.prefix;
			name = other.name;
			xsltContext = other.xsltContext;
			queryIterator = (ResetableIterator)Query.Clone(other.queryIterator);
		}

		public override void Reset()
		{
			if (queryIterator != null)
			{
				queryIterator.Reset();
			}
		}

		public override XPathNavigator Advance()
		{
			if (queryIterator == null)
			{
				throw XPathException.Create("Expression must evaluate to a node-set.");
			}
			if (queryIterator.MoveNext())
			{
				return queryIterator.Current;
			}
			return null;
		}

		protected object ProcessResult(object value)
		{
			if (value is string)
			{
				return value;
			}
			if (value is double)
			{
				return value;
			}
			if (value is bool)
			{
				return value;
			}
			if (value is XPathNavigator)
			{
				return value;
			}
			if (value is int)
			{
				return (double)(int)value;
			}
			if (value == null)
			{
				queryIterator = XPathEmptyIterator.Instance;
				return this;
			}
			if (value is ResetableIterator resetableIterator)
			{
				queryIterator = (ResetableIterator)resetableIterator.Clone();
				return this;
			}
			if (value is XPathNodeIterator nodeIterator)
			{
				queryIterator = new XPathArrayIterator(nodeIterator);
				return this;
			}
			if (value is IXPathNavigable iXPathNavigable)
			{
				return iXPathNavigable.CreateNavigator();
			}
			if (value is short)
			{
				return (double)(short)value;
			}
			if (value is long)
			{
				return (double)(long)value;
			}
			if (value is uint)
			{
				return (double)(uint)value;
			}
			if (value is ushort)
			{
				return (double)(int)(ushort)value;
			}
			if (value is ulong)
			{
				return (double)(ulong)value;
			}
			if (value is float)
			{
				return (double)(float)value;
			}
			if (value is decimal)
			{
				return (double)(decimal)value;
			}
			return value.ToString();
		}
	}
	internal class Filter : AstNode
	{
		private AstNode input;

		private AstNode condition;

		public override AstType Type => AstType.Filter;

		public override XPathResultType ReturnType => XPathResultType.NodeSet;

		public AstNode Input => input;

		public AstNode Condition => condition;

		public Filter(AstNode input, AstNode condition)
		{
			this.input = input;
			this.condition = condition;
		}
	}
	internal sealed class FilterQuery : BaseAxisQuery
	{
		private Query cond;

		private bool noPosition;

		public Query Condition => cond;

		public override QueryProps Properties => QueryProps.Position | (qyInput.Properties & (QueryProps)24);

		public FilterQuery(Query qyParent, Query cond, bool noPosition)
			: base(qyParent)
		{
			this.cond = cond;
			this.noPosition = noPosition;
		}

		private FilterQuery(FilterQuery other)
			: base(other)
		{
			cond = Query.Clone(other.cond);
			noPosition = other.noPosition;
		}

		public override void Reset()
		{
			cond.Reset();
			base.Reset();
		}

		public override void SetXsltContext(XsltContext input)
		{
			base.SetXsltContext(input);
			cond.SetXsltContext(input);
			if (cond.StaticType != 0 && cond.StaticType != XPathResultType.Any && noPosition && qyInput is ReversePositionQuery reversePositionQuery)
			{
				qyInput = reversePositionQuery.input;
			}
		}

		public override XPathNavigator Advance()
		{
			while ((currentNode = qyInput.Advance()) != null)
			{
				if (EvaluatePredicate())
				{
					position++;
					return currentNode;
				}
			}
			return null;
		}

		internal bool EvaluatePredicate()
		{
			object obj = cond.Evaluate(qyInput);
			if (obj is XPathNodeIterator)
			{
				return cond.Advance() != null;
			}
			if (obj is string)
			{
				return ((string)obj).Length != 0;
			}
			if (obj is double)
			{
				return (double)obj == (double)qyInput.CurrentPosition;
			}
			if (obj is bool)
			{
				return (bool)obj;
			}
			return true;
		}

		public override XPathNavigator MatchNode(XPathNavigator current)
		{
			if (current == null)
			{
				return null;
			}
			XPathNavigator xPathNavigator = qyInput.MatchNode(current);
			if (xPathNavigator != null)
			{
				switch (cond.StaticType)
				{
				case XPathResultType.Number:
				{
					if (!(cond is OperandQuery operandQuery))
					{
						break;
					}
					double num = (double)operandQuery.val;
					if (qyInput is ChildrenQuery childrenQuery)
					{
						XPathNavigator xPathNavigator2 = current.Clone();
						xPathNavigator2.MoveToParent();
						int num2 = 0;
						xPathNavigator2.MoveToFirstChild();
						do
						{
							if (!childrenQuery.matches(xPathNavigator2))
							{
								continue;
							}
							num2++;
							if (current.IsSamePosition(xPathNavigator2))
							{
								if (num != (double)num2)
								{
									return null;
								}
								return xPathNavigator;
							}
						}
						while (xPathNavigator2.MoveToNext());
						return null;
					}
					if (!(qyInput is AttributeQuery attributeQuery))
					{
						break;
					}
					XPathNavigator xPathNavigator3 = current.Clone();
					xPathNavigator3.MoveToParent();
					int num3 = 0;
					xPathNavigator3.MoveToFirstAttribute();
					do
					{
						if (!attributeQuery.matches(xPathNavigator3))
						{
							continue;
						}
						num3++;
						if (current.IsSamePosition(xPathNavigator3))
						{
							if (num != (double)num3)
							{
								return null;
							}
							return xPathNavigator;
						}
					}
					while (xPathNavigator3.MoveToNextAttribute());
					return null;
				}
				case XPathResultType.NodeSet:
					cond.Evaluate(new XPathSingletonIterator(current, moved: true));
					if (cond.Advance() == null)
					{
						return null;
					}
					return xPathNavigator;
				case XPathResultType.Boolean:
					if (noPosition)
					{
						if (!(bool)cond.Evaluate(new XPathSingletonIterator(current, moved: true)))
						{
							return null;
						}
						return xPathNavigator;
					}
					break;
				case XPathResultType.String:
					if (noPosition)
					{
						if (((string)cond.Evaluate(new XPathSingletonIterator(current, moved: true))).Length == 0)
						{
							return null;
						}
						return xPathNavigator;
					}
					break;
				case (XPathResultType)4:
					return xPathNavigator;
				default:
					return null;
				}
				Evaluate(new XPathSingletonIterator(xPathNavigator, moved: true));
				XPathNavigator xPathNavigator4;
				while ((xPathNavigator4 = Advance()) != null)
				{
					if (xPathNavigator4.IsSamePosition(current))
					{
						return xPathNavigator;
					}
				}
			}
			return null;
		}

		public override XPathNodeIterator Clone()
		{
			return new FilterQuery(this);
		}

		public override void PrintQuery(XmlWriter w)
		{
			w.WriteStartElement(GetType().Name);
			if (!noPosition)
			{
				w.WriteAttributeString("position", "yes");
			}
			qyInput.PrintQuery(w);
			cond.PrintQuery(w);
			w.WriteEndElement();
		}
	}
	internal sealed class FollowingQuery : BaseAxisQuery
	{
		private XPathNavigator input;

		private XPathNodeIterator iterator;

		public FollowingQuery(Query qyInput, string name, string prefix, XPathNodeType typeTest)
			: base(qyInput, name, prefix, typeTest)
		{
		}

		private FollowingQuery(FollowingQuery other)
			: base(other)
		{
			input = Query.Clone(other.input);
			iterator = Query.Clone(other.iterator);
		}

		public override void Reset()
		{
			iterator = null;
			base.Reset();
		}

		public override XPathNavigator Advance()
		{
			if (iterator == null)
			{
				input = qyInput.Advance();
				if (input == null)
				{
					return null;
				}
				XPathNavigator xPathNavigator;
				do
				{
					xPathNavigator = input.Clone();
					input = qyInput.Advance();
				}
				while (xPathNavigator.IsDescendant(input));
				input = xPathNavigator;
				iterator = XPathEmptyIterator.Instance;
			}
			while (!iterator.MoveNext())
			{
				bool matchSelf;
				if (input.NodeType == XPathNodeType.Attribute || input.NodeType == XPathNodeType.Namespace)
				{
					input.MoveToParent();
					matchSelf = false;
				}
				else
				{
					while (!input.MoveToNext())
					{
						if (!input.MoveToParent())
						{
							return null;
						}
					}
					matchSelf = true;
				}
				if (base.NameTest)
				{
					iterator = input.SelectDescendants(base.Name, base.Namespace, matchSelf);
				}
				else
				{
					iterator = input.SelectDescendants(base.TypeTest, matchSelf);
				}
			}
			position++;
			currentNode = iterator.Current;
			return currentNode;
		}

		public override XPathNodeIterator Clone()
		{
			return new FollowingQuery(this);
		}
	}
	internal sealed class FollSiblingQuery : BaseAxisQuery
	{
		private ClonableStack<XPathNavigator> elementStk;

		private List<XPathNavigator> parentStk;

		private XPathNavigator nextInput;

		public FollSiblingQuery(Query qyInput, string name, string prefix, XPathNodeType type)
			: base(qyInput, name, prefix, type)
		{
			elementStk = new ClonableStack<XPathNavigator>();
			parentStk = new List<XPathNavigator>();
		}

		private FollSiblingQuery(FollSiblingQuery other)
			: base(other)
		{
			elementStk = other.elementStk.Clone();
			parentStk = new List<XPathNavigator>(other.parentStk);
			nextInput = Query.Clone(other.nextInput);
		}

		public override void Reset()
		{
			elementStk.Clear();
			parentStk.Clear();
			nextInput = null;
			base.Reset();
		}

		private bool Visited(XPathNavigator nav)
		{
			XPathNavigator xPathNavigator = nav.Clone();
			xPathNavigator.MoveToParent();
			for (int i = 0; i < parentStk.Count; i++)
			{
				if (xPathNavigator.IsSamePosition(parentStk[i]))
				{
					return true;
				}
			}
			parentStk.Add(xPathNavigator);
			return false;
		}

		private XPathNavigator FetchInput()
		{
			XPathNavigator xPathNavigator;
			do
			{
				xPathNavigator = qyInput.Advance();
				if (xPathNavigator == null)
				{
					return null;
				}
			}
			while (Visited(xPathNavigator));
			return xPathNavigator.Clone();
		}

		public override XPathNavigator Advance()
		{
			while (true)
			{
				if (currentNode == null)
				{
					if (nextInput == null)
					{
						nextInput = FetchInput();
					}
					if (elementStk.Count == 0)
					{
						if (nextInput == null)
						{
							break;
						}
						currentNode = nextInput;
						nextInput = FetchInput();
					}
					else
					{
						currentNode = elementStk.Pop();
					}
				}
				while (currentNode.IsDescendant(nextInput))
				{
					elementStk.Push(currentNode);
					currentNode = nextInput;
					nextInput = qyInput.Advance();
					if (nextInput != null)
					{
						nextInput = nextInput.Clone();
					}
				}
				while (currentNode.MoveToNext())
				{
					if (matches(currentNode))
					{
						position++;
						return currentNode;
					}
				}
				currentNode = null;
			}
			return null;
		}

		public override XPathNodeIterator Clone()
		{
			return new FollSiblingQuery(this);
		}
	}
	internal class ForwardPositionQuery : CacheOutputQuery
	{
		public ForwardPositionQuery(Query input)
			: base(input)
		{
		}

		protected ForwardPositionQuery(ForwardPositionQuery other)
			: base(other)
		{
		}

		public override object Evaluate(XPathNodeIterator context)
		{
			base.Evaluate(context);
			XPathNavigator xPathNavigator;
			while ((xPathNavigator = input.Advance()) != null)
			{
				outputBuffer.Add(xPathNavigator.Clone());
			}
			return this;
		}

		public override XPathNavigator MatchNode(XPathNavigator context)
		{
			return input.MatchNode(context);
		}

		public override XPathNodeIterator Clone()
		{
			return new ForwardPositionQuery(this);
		}
	}
	internal class Function : AstNode
	{
		public enum FunctionType
		{
			FuncLast,
			FuncPosition,
			FuncCount,
			FuncID,
			FuncLocalName,
			FuncNameSpaceUri,
			FuncName,
			FuncString,
			FuncBoolean,
			FuncNumber,
			FuncTrue,
			FuncFalse,
			FuncNot,
			FuncConcat,
			FuncStartsWith,
			FuncContains,
			FuncSubstringBefore,
			FuncSubstringAfter,
			FuncSubstring,
			FuncStringLength,
			FuncNormalize,
			FuncTranslate,
			FuncLang,
			FuncSum,
			FuncFloor,
			FuncCeiling,
			FuncRound,
			FuncUserDefined
		}

		private FunctionType functionType;

		private ArrayList argumentList;

		private string name;

		private string prefix;

		internal static XPathResultType[] ReturnTypes = new XPathResultType[28]
		{
			XPathResultType.Number,
			XPathResultType.Number,
			XPathResultType.Number,
			XPathResultType.NodeSet,
			XPathResultType.String,
			XPathResultType.String,
			XPathResultType.String,
			XPathResultType.String,
			XPathResultType.Boolean,
			XPathResultType.Number,
			XPathResultType.Boolean,
			XPathResultType.Boolean,
			XPathResultType.Boolean,
			XPathResultType.String,
			XPathResultType.Boolean,
			XPathResultType.Boolean,
			XPathResultType.String,
			XPathResultType.String,
			XPathResultType.String,
			XPathResultType.Number,
			XPathResultType.String,
			XPathResultType.String,
			XPathResultType.Boolean,
			XPathResultType.Number,
			XPathResultType.Number,
			XPathResultType.Number,
			XPathResultType.Number,
			XPathResultType.Any
		};

		public override AstType Type => AstType.Function;

		public override XPathResultType ReturnType => ReturnTypes[(int)functionType];

		public FunctionType TypeOfFunction => functionType;

		public ArrayList ArgumentList => argumentList;

		public string Prefix => prefix;

		public string Name => name;

		public Function(FunctionType ftype, ArrayList argumentList)
		{
			functionType = ftype;
			this.argumentList = new ArrayList(argumentList);
		}

		public Function(string prefix, string name, ArrayList argumentList)
		{
			functionType = FunctionType.FuncUserDefined;
			this.prefix = prefix;
			this.name = name;
			this.argumentList = new ArrayList(argumentList);
		}

		public Function(FunctionType ftype)
		{
			functionType = ftype;
		}

		public Function(FunctionType ftype, AstNode arg)
		{
			functionType = ftype;
			argumentList = new ArrayList();
			argumentList.Add(arg);
		}
	}
	internal sealed class FunctionQuery : ExtensionQuery
	{
		private IList<Query> args;

		private IXsltContextFunction function;

		public override XPathResultType StaticType
		{
			get
			{
				XPathResultType xPathResultType = ((function != null) ? function.ReturnType : XPathResultType.Any);
				if (xPathResultType == XPathResultType.Error)
				{
					xPathResultType = XPathResultType.Any;
				}
				return xPathResultType;
			}
		}

		public FunctionQuery(string prefix, string name, List<Query> args)
			: base(prefix, name)
		{
			this.args = args;
		}

		private FunctionQuery(FunctionQuery other)
			: base(other)
		{
			function = other.function;
			Query[] array = new Query[other.args.Count];
			for (int i = 0; i < array.Length; i++)
			{
				array[i] = Query.Clone(other.args[i]);
			}
			args = array;
			args = array;
		}

		public override void SetXsltContext(XsltContext context)
		{
			if (context == null)
			{
				throw XPathException.Create("Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function.");
			}
			if (xsltContext == context)
			{
				return;
			}
			xsltContext = context;
			foreach (Query arg in args)
			{
				arg.SetXsltContext(context);
			}
			XPathResultType[] array = new XPathResultType[args.Count];
			for (int i = 0; i < args.Count; i++)
			{
				array[i] = args[i].StaticType;
			}
			function = xsltContext.ResolveFunction(prefix, name, array);
			if (function == null)
			{
				throw XPathException.Create("The function '{0}()' is undefined.", base.QName);
			}
		}

		public override object Evaluate(XPathNodeIterator nodeIterator)
		{
			if (xsltContext == null)
			{
				throw XPathException.Create("Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function.");
			}
			object[] array = new object[args.Count];
			for (int i = 0; i < args.Count; i++)
			{
				array[i] = args[i].Evaluate(nodeIterator);
				if (array[i] is XPathNodeIterator)
				{
					array[i] = new XPathSelectionIterator(nodeIterator.Current, args[i]);
				}
			}
			try
			{
				return ProcessResult(function.Invoke(xsltContext, array, nodeIterator.Current));
			}
			catch (Exception innerException)
			{
				throw XPathException.Create("Function '{0}()' has failed.", base.QName, innerException);
			}
		}

		public override XPathNavigator MatchNode(XPathNavigator navigator)
		{
			if (name != "key" && prefix.Length != 0)
			{
				throw XPathException.Create("'{0}' is an invalid XSLT pattern.");
			}
			Evaluate(new XPathSingletonIterator(navigator, moved: true));
			XPathNavigator xPathNavigator = null;
			while ((xPathNavigator = Advance()) != null)
			{
				if (xPathNavigator.IsSamePosition(navigator))
				{
					return xPathNavigator;
				}
			}
			return xPathNavigator;
		}

		public override XPathNodeIterator Clone()
		{
			return new FunctionQuery(this);
		}

		public override void PrintQuery(XmlWriter w)
		{
			w.WriteStartElement(GetType().Name);
			w.WriteAttributeString("name", (prefix.Length != 0) ? (prefix + ":" + name) : name);
			foreach (Query arg in args)
			{
				arg.PrintQuery(w);
			}
			w.WriteEndElement();
		}
	}
	internal class Group : AstNode
	{
		private AstNode groupNode;

		public override AstType Type => AstType.Group;

		public override XPathResultType ReturnType => XPathResultType.NodeSet;

		public AstNode GroupNode => groupNode;

		public Group(AstNode groupNode)
		{
			this.groupNode = groupNode;
		}
	}
	internal sealed class GroupQuery : BaseAxisQuery
	{
		public override XPathResultType StaticType => qyInput.StaticType;

		public override QueryProps Properties => QueryProps.Position;

		public GroupQuery(Query qy)
			: base(qy)
		{
		}

		private GroupQuery(GroupQuery other)
			: base(other)
		{
		}

		public override XPathNavigator Advance()
		{
			currentNode = qyInput.Advance();
			if (currentNode != null)
			{
				position++;
			}
			return currentNode;
		}

		public override object Evaluate(XPathNodeIterator nodeIterator)
		{
			return qyInput.Evaluate(nodeIterator);
		}

		public override XPathNodeIterator Clone()
		{
			return new GroupQuery(this);
		}
	}
	internal sealed class IDQuery : CacheOutputQuery
	{
		public IDQuery(Query arg)
			: base(arg)
		{
		}

		private IDQuery(IDQuery other)
			: base(other)
		{
		}

		public override object Evaluate(XPathNodeIterator context)
		{
			object obj = base.Evaluate(context);
			XPathNavigator contextNode = context.Current.Clone();
			switch (GetXPathType(obj))
			{
			case XPathResultType.NodeSet:
			{
				XPathNavigator xPathNavigator;
				while ((xPathNavigator = input.Advance()) != null)
				{
					ProcessIds(contextNode, xPathNavigator.Value);
				}
				break;
			}
			case XPathResultType.String:
				ProcessIds(contextNode, (string)obj);
				break;
			case XPathResultType.Number:
				ProcessIds(contextNode, StringFunctions.toString((double)obj));
				break;
			case XPathResultType.Boolean:
				ProcessIds(contextNode, StringFunctions.toString((bool)obj));
				break;
			case (XPathResultType)4:
				ProcessIds(contextNode, ((XPathNavigator)obj).Value);
				break;
			}
			return this;
		}

		private void ProcessIds(XPathNavigator contextNode, string val)
		{
			string[] array = XmlConvert.SplitString(val);
			for (int i = 0; i < array.Length; i++)
			{
				if (contextNode.MoveToId(array[i]))
				{
					Insert(outputBuffer, contextNode);
				}
			}
		}

		public override XPathNavigator MatchNode(XPathNavigator context)
		{
			Evaluate(new XPathSingletonIterator(context, moved: true));
			XPathNavigator xPathNavigator;
			while ((xPathNavigator = Advance()) != null)
			{
				if (xPathNavigator.IsSamePosition(context))
				{
					return context;
				}
			}
			return null;
		}

		public override XPathNodeIterator Clone()
		{
			return new IDQuery(this);
		}
	}
	internal class IteratorFilter : XPathNodeIterator
	{
		private XPathNodeIterator innerIterator;

		private string name;

		private int position;

		public override XPathNavigator Current => innerIterator.Current;

		public override int CurrentPosition => position;

		internal IteratorFilter(XPathNodeIterator innerIterator, string name)
		{
			this.innerIterator = innerIterator;
			this.name = name;
		}

		private IteratorFilter(IteratorFilter it)
		{
			innerIterator = it.innerIterator.Clone();
			name = it.name;
			position = it.position;
		}

		public override XPathNodeIterator Clone()
		{
			return new IteratorFilter(this);
		}

		public override bool MoveNext()
		{
			while (innerIterator.MoveNext())
			{
				if (innerIterator.Current.LocalName == name)
				{
					position++;
					return true;
				}
			}
			return false;
		}
	}
	internal sealed class LogicalExpr : ValueQuery
	{
		private delegate bool cmpXslt(Operator.Op op, object val1, object val2);

		private struct NodeSet
		{
			private Query opnd;

			private XPathNavigator current;

			public string Value => current.Value;

			public NodeSet(object opnd)
			{
				this.opnd = (Query)opnd;
				current = null;
			}

			public bool MoveNext()
			{
				current = opnd.Advance();
				return current != null;
			}

			public void Reset()
			{
				opnd.Reset();
			}
		}

		private Operator.Op op;

		private Query opnd1;

		private Query opnd2;

		private static readonly cmpXslt[][] CompXsltE = new cmpXslt[5][]
		{
			new cmpXslt[5] { cmpNumberNumber, null, null, null, null },
			new cmpXslt[5] { cmpStringNumber, cmpStringStringE, null, null, null },
			new cmpXslt[5] { cmpBoolNumberE, cmpBoolStringE, cmpBoolBoolE, null, null },
			new cmpXslt[5] { cmpQueryNumber, cmpQueryStringE, cmpQueryBoolE, cmpQueryQueryE, null },
			new cmpXslt[5] { cmpRtfNumber, cmpRtfStringE, cmpRtfBoolE, cmpRtfQueryE, cmpRtfRtfE }
		};

		private static readonly cmpXslt[][] CompXsltO = new cmpXslt[5][]
		{
			new cmpXslt[5] { cmpNumberNumber, null, null, null, null },
			new cmpXslt[5] { cmpStringNumber, cmpStringStringO, null, null, null },
			new cmpXslt[5] { cmpBoolNumberO, cmpBoolStringO, cmpBoolBoolO, null, null },
			new cmpXslt[5] { cmpQueryNumber, cmpQueryStringO, cmpQueryBoolO, cmpQueryQueryO, null },
			new cmpXslt[5] { cmpRtfNumber, cmpRtfStringO, cmpRtfBoolO, cmpRtfQueryO, cmpRtfRtfO }
		};

		public override XPathResultType StaticType => XPathResultType.Boolean;

		public LogicalExpr(Operator.Op op, Query opnd1, Query opnd2)
		{
			this.op = op;
			this.opnd1 = opnd1;
			this.opnd2 = opnd2;
		}

		private LogicalExpr(LogicalExpr other)
			: base(other)
		{
			op = other.op;
			opnd1 = Query.Clone(other.opnd1);
			opnd2 = Query.Clone(other.opnd2);
		}

		public override void SetXsltContext(XsltContext context)
		{
			opnd1.SetXsltContext(context);
			opnd2.SetXsltContext(context);
		}

		public override object Evaluate(XPathNodeIterator nodeIterator)
		{
			Operator.Op op = this.op;
			object obj = opnd1.Evaluate(nodeIterator);
			object obj2 = opnd2.Evaluate(nodeIterator);
			int num = (int)GetXPathType(obj);
			int num2 = (int)GetXPathType(obj2);
			if (num < num2)
			{
				op = Operator.InvertOperator(op);
				object obj3 = obj;
				obj = obj2;
				obj2 = obj3;
				int num3 = num;
				num = num2;
				num2 = num3;
			}
			if (op == Operator.Op.EQ || op == Operator.Op.NE)
			{
				return CompXsltE[num][num2](op, obj, obj2);
			}
			return CompXsltO[num][num2](op, obj, obj2);
		}

		private static bool cmpQueryQueryE(Operator.Op op, object val1, object val2)
		{
			bool flag = op == Operator.Op.EQ;
			NodeSet nodeSet = new NodeSet(val1);
			NodeSet nodeSet2 = new NodeSet(val2);
			while (true)
			{
				if (!nodeSet.MoveNext())
				{
					return false;
				}
				if (!nodeSet2.MoveNext())
				{
					break;
				}
				string value = nodeSet.Value;
				do
				{
					if (value == nodeSet2.Value == flag)
					{
						return true;
					}
				}
				while (nodeSet2.MoveNext());
				nodeSet2.Reset();
			}
			return false;
		}

		private static bool cmpQueryQueryO(Operator.Op op, object val1, object val2)
		{
			NodeSet nodeSet = new NodeSet(val1);
			NodeSet nodeSet2 = new NodeSet(val2);
			while (true)
			{
				if (!nodeSet.MoveNext())
				{
					return false;
				}
				if (!nodeSet2.MoveNext())
				{
					break;
				}
				double n = NumberFunctions.Number(nodeSet.Value);
				do
				{
					if (cmpNumberNumber(op, n, NumberFunctions.Number(nodeSet2.Value)))
					{
						return true;
					}
				}
				while (nodeSet2.MoveNext());
				nodeSet2.Reset();
			}
			return false;
		}

		private static bool cmpQueryNumber(Operator.Op op, object val1, object val2)
		{
			NodeSet nodeSet = new NodeSet(val1);
			double n = (double)val2;
			while (nodeSet.MoveNext())
			{
				if (cmpNumberNumber(op, NumberFunctions.Number(nodeSet.Value), n))
				{
					return true;
				}
			}
			return false;
		}

		private static bool cmpQueryStringE(Operator.Op op, object val1, object val2)
		{
			NodeSet nodeSet = new NodeSet(val1);
			string n = (string)val2;
			while (nodeSet.MoveNext())
			{
				if (cmpStringStringE(op, nodeSet.Value, n))
				{
					return true;
				}
			}
			return false;
		}

		private static bool cmpQueryStringO(Operator.Op op, object val1, object val2)
		{
			NodeSet nodeSet = new NodeSet(val1);
			double n = NumberFunctions.Number((string)val2);
			while (nodeSet.MoveNext())
			{
				if (cmpNumberNumberO(op, NumberFunctions.Number(nodeSet.Value), n))
				{
					return true;
				}
			}
			return false;
		}

		private static bool cmpRtfQueryE(Operator.Op op, object val1, object val2)
		{
			string n = Rtf(val1);
			NodeSet nodeSet = new NodeSet(val2);
			while (nodeSet.MoveNext())
			{
				if (cmpStringStringE(op, n, nodeSet.Value))
				{
					return true;
				}
			}
			return false;
		}

		private static bool cmpRtfQueryO(Operator.Op op, object val1, object val2)
		{
			double n = NumberFunctions.Number(Rtf(val1));
			NodeSet nodeSet = new NodeSet(val2);
			while (nodeSet.MoveNext())
			{
				if (cmpNumberNumberO(op, n, NumberFunctions.Number(nodeSet.Value)))
				{
					return true;
				}
			}
			return false;
		}

		private static bool cmpQueryBoolE(Operator.Op op, object val1, object val2)
		{
			bool n = new NodeSet(val1).MoveNext();
			bool n2 = (bool)val2;
			return cmpBoolBoolE(op, n, n2);
		}

		private static bool cmpQueryBoolO(Operator.Op op, object val1, object val2)
		{
			double n = (new NodeSet(val1).MoveNext() ? 1.0 : 0.0);
			double n2 = NumberFunctions.Number((bool)val2);
			return cmpNumberNumberO(op, n, n2);
		}

		private static bool cmpBoolBoolE(Operator.Op op, bool n1, bool n2)
		{
			return op == Operator.Op.EQ == (n1 == n2);
		}

		private static bool cmpBoolBoolE(Operator.Op op, object val1, object val2)
		{
			bool n = (bool)val1;
			bool n2 = (bool)val2;
			return cmpBoolBoolE(op, n, n2);
		}

		private static bool cmpBoolBoolO(Operator.Op op, object val1, object val2)
		{
			double n = NumberFunctions.Number((bool)val1);
			double n2 = NumberFunctions.Number((bool)val2);
			return cmpNumberNumberO(op, n, n2);
		}

		private static bool cmpBoolNumberE(Operator.Op op, object val1, object val2)
		{
			bool n = (bool)val1;
			bool n2 = BooleanFunctions.toBoolean((double)val2);
			return cmpBoolBoolE(op, n, n2);
		}

		private static bool cmpBoolNumberO(Operator.Op op, object val1, object val2)
		{
			double n = NumberFunctions.Number((bool)val1);
			double n2 = (double)val2;
			return cmpNumberNumberO(op, n, n2);
		}

		private static bool cmpBoolStringE(Operator.Op op, object val1, object val2)
		{
			bool n = (bool)val1;
			bool n2 = BooleanFunctions.toBoolean((string)val2);
			return cmpBoolBoolE(op, n, n2);
		}

		private static bool cmpRtfBoolE(Operator.Op op, object val1, object val2)
		{
			bool n = BooleanFunctions.toBoolean(Rtf(val1));
			bool n2 = (bool)val2;
			return cmpBoolBoolE(op, n, n2);
		}

		private static bool cmpBoolStringO(Operator.Op op, object val1, object val2)
		{
			return cmpNumberNumberO(op, NumberFunctions.Number((bool)val1), NumberFunctions.Number((string)val2));
		}

		private static bool cmpRtfBoolO(Operator.Op op, object val1, object val2)
		{
			return cmpNumberNumberO(op, NumberFunctions.Number(Rtf(val1)), NumberFunctions.Number((bool)val2));
		}

		private static bool cmpNumberNumber(Operator.Op op, double n1, double n2)
		{
			return op switch
			{
				Operator.Op.LT => n1 < n2, 
				Operator.Op.GT => n1 > n2, 
				Operator.Op.LE => n1 <= n2, 
				Operator.Op.GE => n1 >= n2, 
				Operator.Op.EQ => n1 == n2, 
				Operator.Op.NE => n1 != n2, 
				_ => false, 
			};
		}

		private static bool cmpNumberNumberO(Operator.Op op, double n1, double n2)
		{
			return op switch
			{
				Operator.Op.LT => n1 < n2, 
				Operator.Op.GT => n1 > n2, 
				Operator.Op.LE => n1 <= n2, 
				Operator.Op.GE => n1 >= n2, 
				_ => false, 
			};
		}

		private static bool cmpNumberNumber(Operator.Op op, object val1, object val2)
		{
			double n = (double)val1;
			double n2 = (double)val2;
			return cmpNumberNumber(op, n, n2);
		}

		private static bool cmpStringNumber(Operator.Op op, object val1, object val2)
		{
			double n = (double)val2;
			double n2 = NumberFunctions.Number((string)val1);
			return cmpNumberNumber(op, n2, n);
		}

		private static bool cmpRtfNumber(Operator.Op op, object val1, object val2)
		{
			double n = (double)val2;
			double n2 = NumberFunctions.Number(Rtf(val1));
			return cmpNumberNumber(op, n2, n);
		}

		private static bool cmpStringStringE(Operator.Op op, string n1, string n2)
		{
			return op == Operator.Op.EQ == (n1 == n2);
		}

		private static bool cmpStringStringE(Operator.Op op, object val1, object val2)
		{
			string n = (string)val1;
			string n2 = (string)val2;
			return cmpStringStringE(op, n, n2);
		}

		private static bool cmpRtfStringE(Operator.Op op, object val1, object val2)
		{
			string n = Rtf(val1);
			string n2 = (string)val2;
			return cmpStringStringE(op, n, n2);
		}

		private static bool cmpRtfRtfE(Operator.Op op, object val1, object val2)
		{
			string n = Rtf(val1);
			string n2 = Rtf(val2);
			return cmpStringStringE(op, n, n2);
		}

		private static bool cmpStringStringO(Operator.Op op, object val1, object val2)
		{
			double n = NumberFunctions.Number((string)val1);
			double n2 = NumberFunctions.Number((string)val2);
			return cmpNumberNumberO(op, n, n2);
		}

		private static bool cmpRtfStringO(Operator.Op op, object val1, object val2)
		{
			double n = NumberFunctions.Number(Rtf(val1));
			double n2 = NumberFunctions.Number((string)val2);
			return cmpNumberNumberO(op, n, n2);
		}

		private static bool cmpRtfRtfO(Operator.Op op, object val1, object val2)
		{
			double n = NumberFunctions.Number(Rtf(val1));
			double n2 = NumberFunctions.Number(Rtf(val2));
			return cmpNumberNumberO(op, n, n2);
		}

		public override XPathNodeIterator Clone()
		{
			return new LogicalExpr(this);
		}

		private static string Rtf(object o)
		{
			return ((XPathNavigator)o).Value;
		}

		public override void PrintQuery(XmlWriter w)
		{
			w.WriteStartElement(GetType().Name);
			w.WriteAttributeString("op", op.ToString());
			opnd1.PrintQuery(w);
			opnd2.PrintQuery(w);
			w.WriteEndElement();
		}
	}
	internal sealed class MergeFilterQuery : CacheOutputQuery
	{
		private Query child;

		public MergeFilterQuery(Query input, Query child)
			: base(input)
		{
			this.child = child;
		}

		private MergeFilterQuery(MergeFilterQuery other)
			: base(other)
		{
			child = Query.Clone(other.child);
		}

		public override void SetXsltContext(XsltContext xsltContext)
		{
			base.SetXsltContext(xsltContext);
			child.SetXsltContext(xsltContext);
		}

		public override object Evaluate(XPathNodeIterator nodeIterator)
		{
			base.Evaluate(nodeIterator);
			while (input.Advance() != null)
			{
				child.Evaluate(input);
				XPathNavigator nav;
				while ((nav = child.Advance()) != null)
				{
					Insert(outputBuffer, nav);
				}
			}
			return this;
		}

		public override XPathNavigator MatchNode(XPathNavigator current)
		{
			XPathNavigator xPathNavigator = child.MatchNode(current);
			if (xPathNavigator == null)
			{
				return null;
			}
			xPathNavigator = input.MatchNode(xPathNavigator);
			if (xPathNavigator == null)
			{
				return null;
			}
			Evaluate(new XPathSingletonIterator(xPathNavigator.Clone(), moved: true));
			for (XPathNavigator xPathNavigator2 = Advance(); xPathNavigator2 != null; xPathNavigator2 = Advance())
			{
				if (xPathNavigator2.IsSamePosition(current))
				{
					return xPathNavigator;
				}
			}
			return null;
		}

		public override XPathNodeIterator Clone()
		{
			return new MergeFilterQuery(this);
		}

		public override void PrintQuery(XmlWriter w)
		{
			w.WriteStartElement(GetType().Name);
			input.PrintQuery(w);
			child.PrintQuery(w);
			w.WriteEndElement();
		}
	}
	internal sealed class NamespaceQuery : BaseAxisQuery
	{
		private bool onNamespace;

		public NamespaceQuery(Query qyParent, string Name, string Prefix, XPathNodeType Type)
			: base(qyParent, Name, Prefix, Type)
		{
		}

		private NamespaceQuery(NamespaceQuery other)
			: base(other)
		{
			onNamespace = other.onNamespace;
		}

		public override void Reset()
		{
			onNamespace = false;
			base.Reset();
		}

		public override XPathNavigator Advance()
		{
			do
			{
				if (!onNamespace)
				{
					currentNode = qyInput.Advance();
					if (currentNode == null)
					{
						return null;
					}
					position = 0;
					currentNode = currentNode.Clone();
					onNamespace = currentNode.MoveToFirstNamespace();
				}
				else
				{
					onNamespace = currentNode.MoveToNextNamespace();
				}
			}
			while (!onNamespace || !matches(currentNode));
			position++;
			return currentNode;
		}

		public override bool matches(XPathNavigator e)
		{
			if (e.Value.Length == 0)
			{
				return false;
			}
			if (base.NameTest)
			{
				return base.Name.Equals(e.LocalName);
			}
			return true;
		}

		public override XPathNodeIterator Clone()
		{
			return new NamespaceQuery(this);
		}
	}
	internal sealed class NodeFunctions : ValueQuery
	{
		private Query arg;

		private Function.FunctionType funcType;

		private XsltContext xsltContext;

		public override XPathResultType StaticType => Function.ReturnTypes[(int)funcType];

		public NodeFunctions(Function.FunctionType funcType, Query arg)
		{
			this.funcType = funcType;
			this.arg = arg;
		}

		public override void SetXsltContext(XsltContext context)
		{
			xsltContext = (context.Whitespace ? context : null);
			if (arg != null)
			{
				arg.SetXsltContext(context);
			}
		}

		private XPathNavigator EvaluateArg(XPathNodeIterator context)
		{
			if (arg == null)
			{
				return context.Current;
			}
			arg.Evaluate(context);
			return arg.Advance();
		}

		public override object Evaluate(XPathNodeIterator context)
		{
			switch (funcType)
			{
			case Function.FunctionType.FuncPosition:
				return (double)context.CurrentPosition;
			case Function.FunctionType.FuncLast:
				return (double)context.Count;
			case Function.FunctionType.FuncNameSpaceUri:
			{
				XPathNavigator xPathNavigator2 = EvaluateArg(context);
				if (xPathNavigator2 != null)
				{
					return xPathNavigator2.NamespaceURI;
				}
				break;
			}
			case Function.FunctionType.FuncLocalName:
			{
				XPathNavigator xPathNavigator2 = EvaluateArg(context);
				if (xPathNavigator2 != null)
				{
					return xPathNavigator2.LocalName;
				}
				break;
			}
			case Function.FunctionType.FuncName:
			{
				XPathNavigator xPathNavigator2 = EvaluateArg(context);
				if (xPathNavigator2 != null)
				{
					return xPathNavigator2.Name;
				}
				break;
			}
			case Function.FunctionType.FuncCount:
			{
				arg.Evaluate(context);
				int num = 0;
				if (xsltContext != null)
				{
					XPathNavigator xPathNavigator;
					while ((xPathNavigator = arg.Advance()) != null)
					{
						if (xPathNavigator.NodeType != XPathNodeType.Whitespace || xsltContext.PreserveWhitespace(xPathNavigator))
						{
							num++;
						}
					}
				}
				else
				{
					while (arg.Advance() != null)
					{
						num++;
					}
				}
				return (double)num;
			}
			}
			return string.Empty;
		}

		public override XPathNodeIterator Clone()
		{
			return new NodeFunctions(funcType, Query.Clone(arg))
			{
				xsltContext = xsltContext
			};
		}

		public override void PrintQuery(XmlWriter w)
		{
			w.WriteStartElement(GetType().Name);
			w.WriteAttributeString("name", funcType.ToString());
			if (arg != null)
			{
				arg.PrintQuery(w);
			}
			w.WriteEndElement();
		}
	}
	internal sealed class NumberFunctions : ValueQuery
	{
		private Query arg;

		private Function.FunctionType ftype;

		public override XPathResultType StaticType => XPathResultType.Number;

		public NumberFunctions(Function.FunctionType ftype, Query arg)
		{
			this.arg = arg;
			this.ftype = ftype;
		}

		private NumberFunctions(NumberFunctions other)
			: base(other)
		{
			arg = Query.Clone(other.arg);
			ftype = other.ftype;
		}

		public override void SetXsltContext(XsltContext context)
		{
			if (arg != null)
			{
				arg.SetXsltContext(context);
			}
		}

		internal static double Number(bool arg)
		{
			if (!arg)
			{
				return 0.0;
			}
			return 1.0;
		}

		internal static double Number(string arg)
		{
			return XmlConvert.ToXPathDouble(arg);
		}

		public override object Evaluate(XPathNodeIterator nodeIterator)
		{
			return ftype switch
			{
				Function.FunctionType.FuncNumber => Number(nodeIterator), 
				Function.FunctionType.FuncSum => Sum(nodeIterator), 
				Function.FunctionType.FuncFloor => Floor(nodeIterator), 
				Function.FunctionType.FuncCeiling => Ceiling(nodeIterator), 
				Function.FunctionType.FuncRound => Round(nodeIterator), 
				_ => null, 
			};
		}

		private double Number(XPathNodeIterator nodeIterator)
		{
			if (arg == null)
			{
				return XmlConvert.ToXPathDouble(nodeIterator.Current.Value);
			}
			object obj = arg.Evaluate(nodeIterator);
			switch (GetXPathType(obj))
			{
			case XPathResultType.NodeSet:
			{
				XPathNavigator xPathNavigator = arg.Advance();
				if (xPathNavigator != null)
				{
					return Number(xPathNavigator.Value);
				}
				break;
			}
			case XPathResultType.String:
				return Number((string)obj);
			case XPathResultType.Boolean:
				return Number((bool)obj);
			case XPathResultType.Number:
				return (double)obj;
			case (XPathResultType)4:
				return Number(((XPathNavigator)obj).Value);
			}
			return double.NaN;
		}

		private double Sum(XPathNodeIterator nodeIterator)
		{
			double num = 0.0;
			arg.Evaluate(nodeIterator);
			XPathNavigator xPathNavigator;
			while ((xPathNavigator = arg.Advance()) != null)
			{
				num += Number(xPathNavigator.Value);
			}
			return num;
		}

		private double Floor(XPathNodeIterator nodeIterator)
		{
			return Math.Floor((double)arg.Evaluate(nodeIterator));
		}

		private double Ceiling(XPathNodeIterator nodeIterator)
		{
			return Math.Ceiling((double)arg.Evaluate(nodeIterator));
		}

		private double Round(XPathNodeIterator nodeIterator)
		{
			return XmlConvert.XPathRound(XmlConvert.ToXPathDouble(arg.Evaluate(nodeIterator)));
		}

		public override XPathNodeIterator Clone()
		{
			return new NumberFunctions(this);
		}

		public override void PrintQuery(XmlWriter w)
		{
			w.WriteStartElement(GetType().Name);
			w.WriteAttributeString("name", ftype.ToString());
			if (arg != null)
			{
				arg.PrintQuery(w);
			}
			w.WriteEndElement();
		}
	}
	internal sealed class NumericExpr : ValueQuery
	{
		private Operator.Op op;

		private Query opnd1;

		private Query opnd2;

		public override XPathResultType StaticType => XPathResultType.Number;

		public NumericExpr(Operator.Op op, Query opnd1, Query opnd2)
		{
			if (opnd1.StaticType != 0)
			{
				opnd1 = new NumberFunctions(Function.FunctionType.FuncNumber, opnd1);
			}
			if (opnd2.StaticType != 0)
			{
				opnd2 = new NumberFunctions(Function.FunctionType.FuncNumber, opnd2);
			}
			this.op = op;
			this.opnd1 = opnd1;
			this.opnd2 = opnd2;
		}

		private NumericExpr(NumericExpr other)
			: base(other)
		{
			op = other.op;
			opnd1 = Query.Clone(other.opnd1);
			opnd2 = Query.Clone(other.opnd2);
		}

		public override void SetXsltContext(XsltContext context)
		{
			opnd1.SetXsltContext(context);
			opnd2.SetXsltContext(context);
		}

		public override object Evaluate(XPathNodeIterator nodeIterator)
		{
			return GetValue(op, XmlConvert.ToXPathDouble(opnd1.Evaluate(nodeIterator)), XmlConvert.ToXPathDouble(opnd2.Evaluate(nodeIterator)));
		}

		private static double GetValue(Operator.Op op, double n1, double n2)
		{
			return op switch
			{
				Operator.Op.PLUS => n1 + n2, 
				Operator.Op.MINUS => n1 - n2, 
				Operator.Op.MOD => n1 % n2, 
				Operator.Op.DIV => n1 / n2, 
				Operator.Op.MUL => n1 * n2, 
				_ => 0.0, 
			};
		}

		public override XPathNodeIterator Clone()
		{
			return new NumericExpr(this);
		}

		public override void PrintQuery(XmlWriter w)
		{
			w.WriteStartElement(GetType().Name);
			w.WriteAttributeString("op", op.ToString());
			opnd1.PrintQuery(w);
			opnd2.PrintQuery(w);
			w.WriteEndElement();
		}
	}
	internal class Operand : AstNode
	{
		private XPathResultType type;

		private object val;

		public override AstType Type => AstType.ConstantOperand;

		public override XPathResultType ReturnType => type;

		public object OperandValue => val;

		public Operand(string val)
		{
			type = XPathResultType.String;
			this.val = val;
		}

		public Operand(double val)
		{
			type = XPathResultType.Number;
			this.val = val;
		}

		public Operand(bool val)
		{
			type = XPathResultType.Boolean;
			this.val = val;
		}
	}
	internal sealed class OperandQuery : ValueQuery
	{
		internal object val;

		public override XPathResultType StaticType => GetXPathType(val);

		public OperandQuery(object val)
		{
			this.val = val;
		}

		public override object Evaluate(XPathNodeIterator nodeIterator)
		{
			return val;
		}

		public override XPathNodeIterator Clone()
		{
			return this;
		}

		public override void PrintQuery(XmlWriter w)
		{
			w.WriteStartElement(GetType().Name);
			w.WriteAttributeString("value", Convert.ToString(val, CultureInfo.InvariantCulture));
			w.WriteEndElement();
		}
	}
	internal class Operator : AstNode
	{
		public enum Op
		{
			INVALID,
			OR,
			AND,
			EQ,
			NE,
			LT,
			LE,
			GT,
			GE,
			PLUS,
			MINUS,
			MUL,
			DIV,
			MOD,
			UNION
		}

		private static Op[] invertOp = new Op[9]
		{
			Op.INVALID,
			Op.INVALID,
			Op.INVALID,
			Op.EQ,
			Op.NE,
			Op.GT,
			Op.GE,
			Op.LT,
			Op.LE
		};

		private Op opType;

		private AstNode opnd1;

		private AstNode opnd2;

		public override AstType Type => AstType.Operator;

		public override XPathResultType ReturnType
		{
			get
			{
				if (opType <= Op.GE)
				{
					return XPathResultType.Boolean;
				}
				if (opType <= Op.MOD)
				{
					return XPathResultType.Number;
				}
				return XPathResultType.NodeSet;
			}
		}

		public Op OperatorType => opType;

		public AstNode Operand1 => opnd1;

		public AstNode Operand2 => opnd2;

		public static Op InvertOperator(Op op)
		{
			return invertOp[(int)op];
		}

		public Operator(Op op, AstNode opnd1, AstNode opnd2)
		{
			opType = op;
			this.opnd1 = opnd1;
			this.opnd2 = opnd2;
		}
	}
	internal sealed class ParentQuery : CacheAxisQuery
	{
		public ParentQuery(Query qyInput, string Name, string Prefix, XPathNodeType Type)
			: base(qyInput, Name, Prefix, Type)
		{
		}

		private ParentQuery(ParentQuery other)
			: base(other)
		{
		}

		public override object Evaluate(XPathNodeIterator context)
		{
			base.Evaluate(context);
			XPathNavigator xPathNavigator;
			while ((xPathNavigator = qyInput.Advance()) != null)
			{
				xPathNavigator = xPathNavigator.Clone();
				if (xPathNavigator.MoveToParent() && matches(xPathNavigator))
				{
					Insert(outputBuffer, xPathNavigator);
				}
			}
			return this;
		}

		public override XPathNodeIterator Clone()
		{
			return new ParentQuery(this);
		}
	}
	internal sealed class PrecedingQuery : BaseAxisQuery
	{
		private XPathNodeIterator workIterator;

		private ClonableStack<XPathNavigator> ancestorStk;

		public override QueryProps Properties => base.Properties | QueryProps.Reverse;

		public PrecedingQuery(Query qyInput, string name, string prefix, XPathNodeType typeTest)
			: base(qyInput, name, prefix, typeTest)
		{
			ancestorStk = new ClonableStack<XPathNavigator>();
		}

		private PrecedingQuery(PrecedingQuery other)
			: base(other)
		{
			workIterator = Query.Clone(other.workIterator);
			ancestorStk = other.ancestorStk.Clone();
		}

		public override void Reset()
		{
			workIterator = null;
			ancestorStk.Clear();
			base.Reset();
		}

		public override XPathNavigator Advance()
		{
			if (workIterator == null)
			{
				XPathNavigator xPathNavigator = qyInput.Advance();
				if (xPathNavigator == null)
				{
					return null;
				}
				XPathNavigator xPathNavigator2 = xPathNavigator.Clone();
				do
				{
					xPathNavigator2.MoveTo(xPathNavigator);
				}
				while ((xPathNavigator = qyInput.Advance()) != null);
				if (xPathNavigator2.NodeType == XPathNodeType.Attribute || xPathNavigator2.NodeType == XPathNodeType.Namespace)
				{
					xPathNavigator2.MoveToParent();
				}
				do
				{
					ancestorStk.Push(xPathNavigator2.Clone());
				}
				while (xPathNavigator2.MoveToParent());
				workIterator = xPathNavigator2.SelectDescendants(XPathNodeType.All, matchSelf: true);
			}
			while (workIterator.MoveNext())
			{
				currentNode = workIterator.Current;
				if (currentNode.IsSamePosition(ancestorStk.Peek()))
				{
					ancestorStk.Pop();
					if (ancestorStk.Count == 0)
					{
						currentNode = null;
						workIterator = null;
						return null;
					}
				}
				else if (matches(currentNode))
				{
					position++;
					return currentNode;
				}
			}
			return null;
		}

		public override XPathNodeIterator Clone()
		{
			return new PrecedingQuery(this);
		}
	}
	internal class PreSiblingQuery : CacheAxisQuery
	{
		public override QueryProps Properties => base.Properties | QueryProps.Reverse;

		public PreSiblingQuery(Query qyInput, string name, string prefix, XPathNodeType typeTest)
			: base(qyInput, name, prefix, typeTest)
		{
		}

		protected PreSiblingQuery(PreSiblingQuery other)
			: base(other)
		{
		}

		private bool NotVisited(XPathNavigator nav, List<XPathNavigator> parentStk)
		{
			XPathNavigator xPathNavigator = nav.Clone();
			xPathNavigator.MoveToParent();
			for (int i = 0; i < parentStk.Count; i++)
			{
				if (xPathNavigator.IsSamePosition(parentStk[i]))
				{
					return false;
				}
			}
			parentStk.Add(xPathNavigator);
			return true;
		}

		public override object Evaluate(XPathNodeIterator context)
		{
			base.Evaluate(context);
			List<XPathNavigator> parentStk = new List<XPathNavigator>();
			Stack<XPathNavigator> stack = new Stack<XPathNavigator>();
			while ((currentNode = qyInput.Advance()) != null)
			{
				stack.Push(currentNode.Clone());
			}
			while (stack.Count != 0)
			{
				XPathNavigator xPathNavigator = stack.Pop();
				if (xPathNavigator.NodeType == XPathNodeType.Attribute || xPathNavigator.NodeType == XPathNodeType.Namespace || !NotVisited(xPathNavigator, parentStk))
				{
					continue;
				}
				XPathNavigator xPathNavigator2 = xPathNavigator.Clone();
				if (!xPathNavigator2.MoveToParent())
				{
					continue;
				}
				xPathNavigator2.MoveToFirstChild();
				while (!xPathNavigator2.IsSamePosition(xPathNavigator))
				{
					if (matches(xPathNavigator2))
					{
						Insert(outputBuffer, xPathNavigator2);
					}
					if (!xPathNavigator2.MoveToNext())
					{
						break;
					}
				}
			}
			return this;
		}

		public override XPathNodeIterator Clone()
		{
			return new PreSiblingQuery(this);
		}
	}
	internal enum QueryProps
	{
		None = 0,
		Position = 1,
		Count = 2,
		Cached = 4,
		Reverse = 8,
		Merge = 0x10
	}
	[DebuggerDisplay("{ToString()}")]
	internal abstract class Query : ResetableIterator
	{
		public const XPathResultType XPathResultType_Navigator = (XPathResultType)4;

		public override int Count
		{
			get
			{
				if (count == -1)
				{
					Query query = (Query)Clone();
					query.Reset();
					count = 0;
					while (query.MoveNext())
					{
						count++;
					}
				}
				return count;
			}
		}

		public virtual double XsltDefaultPriority => 0.5;

		public abstract XPathResultType StaticType { get; }

		public virtual QueryProps Properties => QueryProps.Merge;

		public Query()
		{
		}

		protected Query(Query other)
			: base(other)
		{
		}

		public override bool MoveNext()
		{
			return Advance() != null;
		}

		public virtual void SetXsltContext(XsltContext context)
		{
		}

		public abstract object Evaluate(XPathNodeIterator nodeIterator);

		public abstract XPathNavigator Advance();

		public virtual XPathNavigator MatchNode(XPathNavigator current)
		{
			throw XPathException.Create("'{0}' is an invalid XSLT pattern.");
		}

		public static Query Clone(Query input)
		{
			if (input != null)
			{
				return (Query)input.Clone();
			}
			return null;
		}

		protected static XPathNodeIterator Clone(XPathNodeIterator input)
		{
			return input?.Clone();
		}

		protected static XPathNavigator Clone(XPathNavigator input)
		{
			return input?.Clone();
		}

		public bool Insert(List<XPathNavigator> buffer, XPathNavigator nav)
		{
			int num = 0;
			int num2 = buffer.Count;
			if (num2 != 0)
			{
				switch (CompareNodes(buffer[num2 - 1], nav))
				{
				case XmlNodeOrder.Same:
					return false;
				case XmlNodeOrder.Before:
					buffer.Add(nav.Clone());
					return true;
				}
				num2--;
			}
			while (num < num2)
			{
				int median = GetMedian(num, num2);
				switch (CompareNodes(buffer[median], nav))
				{
				case XmlNodeOrder.Same:
					return false;
				case XmlNodeOrder.Before:
					num = median + 1;
					break;
				default:
					num2 = median;
					break;
				}
			}
			buffer.Insert(num, nav.Clone());
			return true;
		}

		private static int GetMedian(int l, int r)
		{
			return l + r >>> 1;
		}

		public static XmlNodeOrder CompareNodes(XPathNavigator l, XPathNavigator r)
		{
			XmlNodeOrder xmlNodeOrder = l.ComparePosition(r);
			if (xmlNodeOrder == XmlNodeOrder.Unknown)
			{
				XPathNavigator xPathNavigator = l.Clone();
				xPathNavigator.MoveToRoot();
				string baseURI = xPathNavigator.BaseURI;
				if (!xPathNavigator.MoveTo(r))
				{
					xPathNavigator = r.Clone();
				}
				xPathNavigator.MoveToRoot();
				string baseURI2 = xPathNavigator.BaseURI;
				int num = string.CompareOrdinal(baseURI, baseURI2);
				xmlNodeOrder = ((num >= 0) ? ((num > 0) ? XmlNodeOrder.After : XmlNodeOrder.Unknown) : XmlNodeOrder.Before);
			}
			return xmlNodeOrder;
		}

		[Conditional("DEBUG")]
		private void AssertDOD(List<XPathNavigator> buffer, XPathNavigator nav, int pos)
		{
			if (!(nav.GetType().ToString() == "Microsoft.VisualStudio.Modeling.StoreNavigator") && !(nav.GetType().ToString() == "System.Xml.DataDocumentXPathNavigator"))
			{
				if (0 < pos)
				{
					CompareNodes(buffer[pos - 1], nav);
				}
				if (pos < buffer.Count)
				{
					CompareNodes(nav, buffer[pos]);
				}
			}
		}

		[Conditional("DEBUG")]
		public static void AssertQuery(Query query)
		{
			if (query is FunctionQuery)
			{
				return;
			}
			query = Clone(query);
			XPathNavigator xPathNavigator = null;
			_ = query.Clone().Count;
			int num = 0;
			XPathNavigator xPathNavigator2;
			while ((xPathNavigator2 = query.Advance()) != null && !(xPathNavigator2.GetType().ToString() == "Microsoft.VisualStudio.Modeling.StoreNavigator") && !(xPathNavigator2.GetType().ToString() == "System.Xml.DataDocumentXPathNavigator"))
			{
				if (xPathNavigator != null && (xPathNavigator.NodeType != XPathNodeType.Namespace || xPathNavigator2.NodeType != XPathNodeType.Namespace))
				{
					CompareNodes(xPathNavigator, xPathNavigator2);
				}
				xPathNavigator = xPathNavigator2.Clone();
				num++;
			}
		}

		protected XPathResultType GetXPathType(object value)
		{
			if (value is XPathNodeIterator)
			{
				return XPathResultType.NodeSet;
			}
			if (value is string)
			{
				return XPathResultType.String;
			}
			if (value is double)
			{
				return XPathResultType.Number;
			}
			if (value is bool)
			{
				return XPathResultType.Boolean;
			}
			return (XPathResultType)4;
		}

		public virtual void PrintQuery(XmlWriter w)
		{
			w.WriteElementString(GetType().Name, string.Empty);
		}
	}
	internal sealed class QueryBuilder
	{
		private enum Flags
		{
			None = 0,
			SmartDesc = 1,
			PosFilter = 2,
			Filter = 4
		}

		private enum Props
		{
			None = 0,
			PosFilter = 1,
			HasPosition = 2,
			HasLast = 4,
			NonFlat = 8
		}

		private string query;

		private bool allowVar;

		private bool allowKey;

		private bool allowCurrent;

		private bool needContext;

		private BaseAxisQuery firstInput;

		private int parseDepth;

		private const int MaxParseDepth = 1024;

		private void Reset()
		{
			parseDepth = 0;
			needContext = false;
		}

		private Query ProcessAxis(Axis root, Flags flags, out Props props)
		{
			Query query = null;
			if (root.Prefix.Length > 0)
			{
				needContext = true;
			}
			firstInput = null;
			Query query2;
			if (root.Input != null)
			{
				Flags flags2 = Flags.None;
				if ((flags & Flags.PosFilter) == 0)
				{
					if (root.Input is Axis axis && root.TypeOfAxis == Axis.AxisType.Child && axis.TypeOfAxis == Axis.AxisType.DescendantOrSelf && axis.NodeType == XPathNodeType.All)
					{
						Query qyParent;
						if (axis.Input != null)
						{
							qyParent = ProcessNode(axis.Input, Flags.SmartDesc, out props);
						}
						else
						{
							qyParent = new ContextQuery();
							props = Props.None;
						}
						query = new DescendantQuery(qyParent, root.Name, root.Prefix, root.NodeType, matchSelf: false, axis.AbbrAxis);
						if ((props & Props.NonFlat) != 0)
						{
							query = new DocumentOrderQuery(query);
						}
						props |= Props.NonFlat;
						return query;
					}
					if (root.TypeOfAxis == Axis.AxisType.Descendant || root.TypeOfAxis == Axis.AxisType.DescendantOrSelf)
					{
						flags2 |= Flags.SmartDesc;
					}
				}
				query2 = ProcessNode(root.Input, flags2, out props);
			}
			else
			{
				query2 = new ContextQuery();
				props = Props.None;
			}
			switch (root.TypeOfAxis)
			{
			case Axis.AxisType.Ancestor:
				query = new XPathAncestorQuery(query2, root.Name, root.Prefix, root.NodeType, matchSelf: false);
				props |= Props.NonFlat;
				break;
			case Axis.AxisType.AncestorOrSelf:
				query = new XPathAncestorQuery(query2, root.Name, root.Prefix, root.NodeType, matchSelf: true);
				props |= Props.NonFlat;
				break;
			case Axis.AxisType.Child:
				query = (((props & Props.NonFlat) == 0) ? new ChildrenQuery(query2, root.Name, root.Prefix, root.NodeType) : new CacheChildrenQuery(query2, root.Name, root.Prefix, root.NodeType));
				break;
			case Axis.AxisType.Parent:
				query = new ParentQuery(query2, root.Name, root.Prefix, root.NodeType);
				break;
			case Axis.AxisType.Descendant:
				if ((flags & Flags.SmartDesc) != 0)
				{
					query = new DescendantOverDescendantQuery(query2, matchSelf: false, root.Name, root.Prefix, root.NodeType, abbrAxis: false);
				}
				else
				{
					query = new DescendantQuery(query2, root.Name, root.Prefix, root.NodeType, matchSelf: false, abbrAxis: false);
					if ((props & Props.NonFlat) != 0)
					{
						query = new DocumentOrderQuery(query);
					}
				}
				props |= Props.NonFlat;
				break;
			case Axis.AxisType.DescendantOrSelf:
				if ((flags & Flags.SmartDesc) != 0)
				{
					query = new DescendantOverDescendantQuery(query2, matchSelf: true, root.Name, root.Prefix, root.NodeType, root.AbbrAxis);
				}
				else
				{
					query = new DescendantQuery(query2, root.Name, root.Prefix, root.NodeType, matchSelf: true, root.AbbrAxis);
					if ((props & Props.NonFlat) != 0)
					{
						query = new DocumentOrderQuery(query);
					}
				}
				props |= Props.NonFlat;
				break;
			case Axis.AxisType.Preceding:
				query = new PrecedingQuery(query2, root.Name, root.Prefix, root.NodeType);
				props |= Props.NonFlat;
				break;
			case Axis.AxisType.Following:
				query = new FollowingQuery(query2, root.Name, root.Prefix, root.NodeType);
				props |= Props.NonFlat;
				break;
			case Axis.AxisType.FollowingSibling:
				query = new FollSiblingQuery(query2, root.Name, root.Prefix, root.NodeType);
				if ((props & Props.NonFlat) != 0)
				{
					query = new DocumentOrderQuery(query);
				}
				break;
			case Axis.AxisType.PrecedingSibling:
				query = new PreSiblingQuery(query2, root.Name, root.Prefix, root.NodeType);
				break;
			case Axis.AxisType.Attribute:
				query = new AttributeQuery(query2, root.Name, root.Prefix, root.NodeType);
				break;
			case Axis.AxisType.Self:
				query = new XPathSelfQuery(query2, root.Name, root.Prefix, root.NodeType);
				break;
			case Axis.AxisType.Namespace:
				query = (((root.NodeType != XPathNodeType.All && root.NodeType != XPathNodeType.Element && root.NodeType != XPathNodeType.Attribute) || root.Prefix.Length != 0) ? ((Query)new EmptyQuery()) : ((Query)new NamespaceQuery(query2, root.Name, root.Prefix, root.NodeType)));
				break;
			default:
				throw XPathException.Create("The XPath query '{0}' is not supported.", this.query);
			}
			return query;
		}

		private bool CanBeNumber(Query q)
		{
			if (q.StaticType != XPathResultType.Any)
			{
				return q.StaticType == XPathResultType.Number;
			}
			return true;
		}

		private Query ProcessFilter(Filter root, Flags flags, out Props props)
		{
			bool num = (flags & Flags.Filter) == 0;
			Props props2;
			Query query = ProcessNode(root.Condition, Flags.None, out props2);
			if (CanBeNumber(query) || (props2 & (Props)6) != 0)
			{
				props2 |= Props.HasPosition;
				flags |= Flags.PosFilter;
			}
			flags &= (Flags)(-2);
			Query query2 = ProcessNode(root.Input, flags | Flags.Filter, out props);
			if (root.Input.Type != AstNode.AstType.Filter)
			{
				props &= (Props)(-2);
			}
			if ((props2 & Props.HasPosition) != 0)
			{
				props |= Props.PosFilter;
			}
			if (query2 is FilterQuery filterQuery && (props2 & Props.HasPosition) == 0 && filterQuery.Condition.StaticType != XPathResultType.Any)
			{
				Query query3 = filterQuery.Condition;
				if (query3.StaticType == XPathResultType.Number)
				{
					query3 = new LogicalExpr(Operator.Op.EQ, new NodeFunctions(Function.FunctionType.FuncPosition, null), query3);
				}
				query = new BooleanExpr(Operator.Op.AND, query3, query);
				query2 = filterQuery.qyInput;
			}
			if ((props & Props.PosFilter) != 0 && query2 is DocumentOrderQuery)
			{
				query2 = ((DocumentOrderQuery)query2).input;
			}
			if (firstInput == null)
			{
				firstInput = query2 as BaseAxisQuery;
			}
			bool flag = (query2.Properties & QueryProps.Merge) != 0;
			bool flag2 = (query2.Properties & QueryProps.Reverse) != 0;
			if ((props2 & Props.HasPosition) != 0)
			{
				if (flag2)
				{
					query2 = new ReversePositionQuery(query2);
				}
				else if ((props2 & Props.HasLast) != 0)
				{
					query2 = new ForwardPositionQuery(query2);
				}
			}
			if (num && firstInput != null)
			{
				if (flag && (props & Props.PosFilter) != 0)
				{
					query2 = new FilterQuery(query2, query, noPosition: false);
					Query qyInput = firstInput.qyInput;
					if (!(qyInput is ContextQuery))
					{
						firstInput.qyInput = new ContextQuery();
						firstInput = null;
						return new MergeFilterQuery(qyInput, query2);
					}
					firstInput = null;
					return query2;
				}
				firstInput = null;
			}
			return new FilterQuery(query2, query, (props2 & Props.HasPosition) == 0);
		}

		private Query ProcessOperator(Operator root, out Props props)
		{
			Props props2;
			Query query = ProcessNode(root.Operand1, Flags.None, out props2);
			Props props3;
			Query query2 = ProcessNode(root.Operand2, Flags.None, out props3);
			props = props2 | props3;
			switch (root.OperatorType)
			{
			case Operator.Op.PLUS:
			case Operator.Op.MINUS:
			case Operator.Op.MUL:
			case Operator.Op.DIV:
			case Operator.Op.MOD:
				return new NumericExpr(root.OperatorType, query, query2);
			case Operator.Op.EQ:
			case Operator.Op.NE:
			case Operator.Op.LT:
			case Operator.Op.LE:
			case Operator.Op.GT:
			case Operator.Op.GE:
				return new LogicalExpr(root.OperatorType, query, query2);
			case Operator.Op.OR:
			case Operator.Op.AND:
				return new BooleanExpr(root.OperatorType, query, query2);
			case Operator.Op.UNION:
				props |= Props.NonFlat;
				return new UnionExpr(query, query2);
			default:
				return null;
			}
		}

		private Query ProcessVariable(Variable root)
		{
			needContext = true;
			if (!allowVar)
			{
				throw XPathException.Create("'{0}' is an invalid key pattern. It either contains a variable reference or 'key()' function.", query);
			}
			return new VariableQuery(root.Localname, root.Prefix);
		}

		private Query ProcessFunction(Function root, out Props props)
		{
			props = Props

Room Architect Tool_Data/Managed/System.Xml.Linq.dll

Decompiled 3 months ago
using System;
using System.Collections;
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.Serialization;
using System.Security;
using System.Security.Permissions;
using System.Text;
using System.Threading;
using System.Xml.Linq;
using System.Xml.Schema;
using System.Xml.Serialization;
using MS.Internal.Xml.Linq.ComponentModel;
using Unity;

[assembly: CompilationRelaxations(CompilationRelaxations.NoStringInterning)]
[assembly: ComVisible(false)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("System.Xml.Linq.dll")]
[assembly: AssemblyDescription("System.Xml.Linq.dll")]
[assembly: AssemblyDefaultAlias("System.Xml.Linq.dll")]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright("(c) Various Mono authors")]
[assembly: AssemblyCompany("Mono development team")]
[assembly: AssemblyInformationalVersion("4.6.57.0")]
[assembly: AssemblyFileVersion("4.6.57.0")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: CLSCompliant(true)]
[assembly: AssemblyDelaySign(true)]
[assembly: AssemblyKeyFile("../ecma.pub")]
[assembly: AllowPartiallyTrustedCallers]
[assembly: SatelliteContractVersion("4.0.0.0")]
[assembly: AssemblyVersion("4.0.0.0")]
namespace System.Xml.Schema
{
	internal class XNodeValidator
	{
		private XmlSchemaSet schemas;

		private ValidationEventHandler validationEventHandler;

		private XObject source;

		private bool addSchemaInfo;

		private XmlNamespaceManager namespaceManager;

		private XmlSchemaValidator validator;

		private Dictionary<XmlSchemaInfo, XmlSchemaInfo> schemaInfos;

		private ArrayList defaultAttributes;

		private XName xsiTypeName;

		private XName xsiNilName;

		public XNodeValidator(XmlSchemaSet schemas, ValidationEventHandler validationEventHandler)
		{
			this.schemas = schemas;
			this.validationEventHandler = validationEventHandler;
			XNamespace xNamespace = XNamespace.Get("http://www.w3.org/2001/XMLSchema-instance");
			xsiTypeName = xNamespace.GetName("type");
			xsiNilName = xNamespace.GetName("nil");
		}

		public void Validate(XObject source, XmlSchemaObject partialValidationType, bool addSchemaInfo)
		{
			this.source = source;
			this.addSchemaInfo = addSchemaInfo;
			XmlSchemaValidationFlags xmlSchemaValidationFlags = XmlSchemaValidationFlags.AllowXmlAttributes;
			XmlNodeType nodeType = source.NodeType;
			if (nodeType != XmlNodeType.Element)
			{
				if (nodeType != XmlNodeType.Attribute)
				{
					if (nodeType != XmlNodeType.Document)
					{
						goto IL_0070;
					}
					source = ((XDocument)source).Root;
					if (source == null)
					{
						throw new InvalidOperationException(Res.GetString("InvalidOperation_MissingRoot"));
					}
					xmlSchemaValidationFlags |= XmlSchemaValidationFlags.ProcessIdentityConstraints;
				}
				else
				{
					if (((XAttribute)source).IsNamespaceDeclaration)
					{
						goto IL_0070;
					}
					if (source.Parent == null)
					{
						throw new InvalidOperationException(Res.GetString("InvalidOperation_MissingParent"));
					}
				}
			}
			namespaceManager = new XmlNamespaceManager(schemas.NameTable);
			PushAncestorsAndSelf(source.Parent);
			validator = new XmlSchemaValidator(schemas.NameTable, schemas, namespaceManager, xmlSchemaValidationFlags);
			validator.ValidationEventHandler += ValidationCallback;
			validator.XmlResolver = null;
			if (partialValidationType != null)
			{
				validator.Initialize(partialValidationType);
			}
			else
			{
				validator.Initialize();
			}
			IXmlLineInfo originalLineInfo = SaveLineInfo(source);
			if (nodeType == XmlNodeType.Attribute)
			{
				ValidateAttribute((XAttribute)source);
			}
			else
			{
				ValidateElement((XElement)source);
			}
			validator.EndValidation();
			RestoreLineInfo(originalLineInfo);
			return;
			IL_0070:
			throw new InvalidOperationException(Res.GetString("InvalidOperation_BadNodeType", nodeType));
		}

		private XmlSchemaInfo GetDefaultAttributeSchemaInfo(XmlSchemaAttribute sa)
		{
			XmlSchemaInfo xmlSchemaInfo = new XmlSchemaInfo();
			xmlSchemaInfo.IsDefault = true;
			xmlSchemaInfo.IsNil = false;
			xmlSchemaInfo.SchemaAttribute = sa;
			XmlSchemaSimpleType xmlSchemaSimpleType = (XmlSchemaSimpleType)(xmlSchemaInfo.SchemaType = sa.AttributeSchemaType);
			if (xmlSchemaSimpleType.Datatype.Variety == XmlSchemaDatatypeVariety.Union)
			{
				string defaultValue = GetDefaultValue(sa);
				XmlSchemaSimpleType[] baseMemberTypes = ((XmlSchemaSimpleTypeUnion)xmlSchemaSimpleType.Content).BaseMemberTypes;
				foreach (XmlSchemaSimpleType xmlSchemaSimpleType2 in baseMemberTypes)
				{
					object obj = null;
					try
					{
						obj = xmlSchemaSimpleType2.Datatype.ParseValue(defaultValue, schemas.NameTable, namespaceManager);
					}
					catch (XmlSchemaException)
					{
					}
					if (obj != null)
					{
						xmlSchemaInfo.MemberType = xmlSchemaSimpleType2;
						break;
					}
				}
			}
			xmlSchemaInfo.Validity = XmlSchemaValidity.Valid;
			return xmlSchemaInfo;
		}

		private string GetDefaultValue(XmlSchemaAttribute sa)
		{
			XmlQualifiedName refName = sa.RefName;
			if (!refName.IsEmpty)
			{
				sa = schemas.GlobalAttributes[refName] as XmlSchemaAttribute;
				if (sa == null)
				{
					return null;
				}
			}
			string fixedValue = sa.FixedValue;
			if (fixedValue != null)
			{
				return fixedValue;
			}
			return sa.DefaultValue;
		}

		private string GetDefaultValue(XmlSchemaElement se)
		{
			XmlQualifiedName refName = se.RefName;
			if (!refName.IsEmpty)
			{
				se = schemas.GlobalElements[refName] as XmlSchemaElement;
				if (se == null)
				{
					return null;
				}
			}
			string fixedValue = se.FixedValue;
			if (fixedValue != null)
			{
				return fixedValue;
			}
			return se.DefaultValue;
		}

		private void ReplaceSchemaInfo(XObject o, XmlSchemaInfo schemaInfo)
		{
			if (schemaInfos == null)
			{
				schemaInfos = new Dictionary<XmlSchemaInfo, XmlSchemaInfo>(new XmlSchemaInfoEqualityComparer());
			}
			XmlSchemaInfo value = o.Annotation<XmlSchemaInfo>();
			if (value != null)
			{
				if (!schemaInfos.ContainsKey(value))
				{
					schemaInfos.Add(value, value);
				}
				o.RemoveAnnotations<XmlSchemaInfo>();
			}
			if (!schemaInfos.TryGetValue(schemaInfo, out value))
			{
				value = schemaInfo;
				schemaInfos.Add(value, value);
			}
			o.AddAnnotation(value);
		}

		private void PushAncestorsAndSelf(XElement e)
		{
			while (e != null)
			{
				XAttribute xAttribute = e.lastAttr;
				if (xAttribute != null)
				{
					do
					{
						xAttribute = xAttribute.next;
						if (xAttribute.IsNamespaceDeclaration)
						{
							string text = xAttribute.Name.LocalName;
							if (text == "xmlns")
							{
								text = string.Empty;
							}
							if (!namespaceManager.HasNamespace(text))
							{
								namespaceManager.AddNamespace(text, xAttribute.Value);
							}
						}
					}
					while (xAttribute != e.lastAttr);
				}
				e = e.parent as XElement;
			}
		}

		private void PushElement(XElement e, ref string xsiType, ref string xsiNil)
		{
			namespaceManager.PushScope();
			XAttribute xAttribute = e.lastAttr;
			if (xAttribute == null)
			{
				return;
			}
			do
			{
				xAttribute = xAttribute.next;
				if (xAttribute.IsNamespaceDeclaration)
				{
					string text = xAttribute.Name.LocalName;
					if (text == "xmlns")
					{
						text = string.Empty;
					}
					namespaceManager.AddNamespace(text, xAttribute.Value);
					continue;
				}
				XName name = xAttribute.Name;
				if (name == xsiTypeName)
				{
					xsiType = xAttribute.Value;
				}
				else if (name == xsiNilName)
				{
					xsiNil = xAttribute.Value;
				}
			}
			while (xAttribute != e.lastAttr);
		}

		private IXmlLineInfo SaveLineInfo(XObject source)
		{
			IXmlLineInfo lineInfoProvider = validator.LineInfoProvider;
			validator.LineInfoProvider = source;
			return lineInfoProvider;
		}

		private void RestoreLineInfo(IXmlLineInfo originalLineInfo)
		{
			validator.LineInfoProvider = originalLineInfo;
		}

		private void ValidateAttribute(XAttribute a)
		{
			IXmlLineInfo originalLineInfo = SaveLineInfo(a);
			XmlSchemaInfo schemaInfo = (addSchemaInfo ? new XmlSchemaInfo() : null);
			source = a;
			validator.ValidateAttribute(a.Name.LocalName, a.Name.NamespaceName, a.Value, schemaInfo);
			if (addSchemaInfo)
			{
				ReplaceSchemaInfo(a, schemaInfo);
			}
			RestoreLineInfo(originalLineInfo);
		}

		private void ValidateAttributes(XElement e)
		{
			XAttribute xAttribute = e.lastAttr;
			IXmlLineInfo originalLineInfo = SaveLineInfo(xAttribute);
			if (xAttribute != null)
			{
				do
				{
					xAttribute = xAttribute.next;
					if (!xAttribute.IsNamespaceDeclaration)
					{
						ValidateAttribute(xAttribute);
					}
				}
				while (xAttribute != e.lastAttr);
				source = e;
			}
			if (addSchemaInfo)
			{
				if (defaultAttributes == null)
				{
					defaultAttributes = new ArrayList();
				}
				else
				{
					defaultAttributes.Clear();
				}
				validator.GetUnspecifiedDefaultAttributes(defaultAttributes);
				foreach (XmlSchemaAttribute defaultAttribute in defaultAttributes)
				{
					xAttribute = new XAttribute(XNamespace.Get(defaultAttribute.QualifiedName.Namespace).GetName(defaultAttribute.QualifiedName.Name), GetDefaultValue(defaultAttribute));
					ReplaceSchemaInfo(xAttribute, GetDefaultAttributeSchemaInfo(defaultAttribute));
					e.Add(xAttribute);
				}
			}
			RestoreLineInfo(originalLineInfo);
		}

		private void ValidateElement(XElement e)
		{
			XmlSchemaInfo xmlSchemaInfo = (addSchemaInfo ? new XmlSchemaInfo() : null);
			string xsiType = null;
			string xsiNil = null;
			PushElement(e, ref xsiType, ref xsiNil);
			IXmlLineInfo originalLineInfo = SaveLineInfo(e);
			source = e;
			validator.ValidateElement(e.Name.LocalName, e.Name.NamespaceName, xmlSchemaInfo, xsiType, xsiNil, null, null);
			ValidateAttributes(e);
			validator.ValidateEndOfAttributes(xmlSchemaInfo);
			ValidateNodes(e);
			validator.ValidateEndElement(xmlSchemaInfo);
			if (addSchemaInfo)
			{
				if (xmlSchemaInfo.Validity == XmlSchemaValidity.Valid && xmlSchemaInfo.IsDefault)
				{
					e.Value = GetDefaultValue(xmlSchemaInfo.SchemaElement);
				}
				ReplaceSchemaInfo(e, xmlSchemaInfo);
			}
			RestoreLineInfo(originalLineInfo);
			namespaceManager.PopScope();
		}

		private void ValidateNodes(XElement e)
		{
			XNode xNode = e.content as XNode;
			IXmlLineInfo originalLineInfo = SaveLineInfo(xNode);
			if (xNode != null)
			{
				do
				{
					xNode = xNode.next;
					if (xNode is XElement e2)
					{
						ValidateElement(e2);
					}
					else if (xNode is XText xText)
					{
						string value = xText.Value;
						if (value.Length > 0)
						{
							validator.LineInfoProvider = xText;
							validator.ValidateText(value);
						}
					}
				}
				while (xNode != e.content);
				source = e;
			}
			else if (e.content is string text && text.Length > 0)
			{
				validator.ValidateText(text);
			}
			RestoreLineInfo(originalLineInfo);
		}

		private void ValidationCallback(object sender, ValidationEventArgs e)
		{
			if (validationEventHandler != null)
			{
				validationEventHandler(source, e);
			}
			else if (e.Severity == XmlSeverityType.Error)
			{
				throw e.Exception;
			}
		}
	}
	internal class XmlSchemaInfoEqualityComparer : IEqualityComparer<XmlSchemaInfo>
	{
		public bool Equals(XmlSchemaInfo si1, XmlSchemaInfo si2)
		{
			if (si1 == si2)
			{
				return true;
			}
			if (si1 == null || si2 == null)
			{
				return false;
			}
			if (si1.ContentType == si2.ContentType && si1.IsDefault == si2.IsDefault && si1.IsNil == si2.IsNil && si1.MemberType == si2.MemberType && si1.SchemaAttribute == si2.SchemaAttribute && si1.SchemaElement == si2.SchemaElement && si1.SchemaType == si2.SchemaType)
			{
				return si1.Validity == si2.Validity;
			}
			return false;
		}

		public int GetHashCode(XmlSchemaInfo si)
		{
			if (si == null)
			{
				return 0;
			}
			int num = (int)si.ContentType;
			if (si.IsDefault)
			{
				num ^= 1;
			}
			if (si.IsNil)
			{
				num ^= 1;
			}
			XmlSchemaSimpleType memberType = si.MemberType;
			if (memberType != null)
			{
				num ^= memberType.GetHashCode();
			}
			XmlSchemaAttribute schemaAttribute = si.SchemaAttribute;
			if (schemaAttribute != null)
			{
				num ^= schemaAttribute.GetHashCode();
			}
			XmlSchemaElement schemaElement = si.SchemaElement;
			if (schemaElement != null)
			{
				num ^= schemaElement.GetHashCode();
			}
			XmlSchemaType schemaType = si.SchemaType;
			if (schemaType != null)
			{
				num ^= schemaType.GetHashCode();
			}
			return num ^ (int)si.Validity;
		}
	}
	public static class Extensions
	{
		public static IXmlSchemaInfo GetSchemaInfo(this XElement source)
		{
			if (source == null)
			{
				throw new ArgumentNullException("source");
			}
			return source.Annotation<IXmlSchemaInfo>();
		}

		public static IXmlSchemaInfo GetSchemaInfo(this XAttribute source)
		{
			if (source == null)
			{
				throw new ArgumentNullException("source");
			}
			return source.Annotation<IXmlSchemaInfo>();
		}

		public static void Validate(this XDocument source, XmlSchemaSet schemas, ValidationEventHandler validationEventHandler)
		{
			source.Validate(schemas, validationEventHandler, addSchemaInfo: false);
		}

		public static void Validate(this XDocument source, XmlSchemaSet schemas, ValidationEventHandler validationEventHandler, bool addSchemaInfo)
		{
			if (source == null)
			{
				throw new ArgumentNullException("source");
			}
			if (schemas == null)
			{
				throw new ArgumentNullException("schemas");
			}
			new XNodeValidator(schemas, validationEventHandler).Validate(source, null, addSchemaInfo);
		}

		public static void Validate(this XElement source, XmlSchemaObject partialValidationType, XmlSchemaSet schemas, ValidationEventHandler validationEventHandler)
		{
			source.Validate(partialValidationType, schemas, validationEventHandler, addSchemaInfo: false);
		}

		public static void Validate(this XElement source, XmlSchemaObject partialValidationType, XmlSchemaSet schemas, ValidationEventHandler validationEventHandler, bool addSchemaInfo)
		{
			if (source == null)
			{
				throw new ArgumentNullException("source");
			}
			if (partialValidationType == null)
			{
				throw new ArgumentNullException("partialValidationType");
			}
			if (schemas == null)
			{
				throw new ArgumentNullException("schemas");
			}
			new XNodeValidator(schemas, validationEventHandler).Validate(source, partialValidationType, addSchemaInfo);
		}

		public static void Validate(this XAttribute source, XmlSchemaObject partialValidationType, XmlSchemaSet schemas, ValidationEventHandler validationEventHandler)
		{
			source.Validate(partialValidationType, schemas, validationEventHandler, addSchemaInfo: false);
		}

		public static void Validate(this XAttribute source, XmlSchemaObject partialValidationType, XmlSchemaSet schemas, ValidationEventHandler validationEventHandler, bool addSchemaInfo)
		{
			if (source == null)
			{
				throw new ArgumentNullException("source");
			}
			if (partialValidationType == null)
			{
				throw new ArgumentNullException("partialValidationType");
			}
			if (schemas == null)
			{
				throw new ArgumentNullException("schemas");
			}
			new XNodeValidator(schemas, validationEventHandler).Validate(source, partialValidationType, addSchemaInfo);
		}
	}
}
namespace System.Xml.XPath
{
	internal class XNodeNavigator : XPathNavigator, IXmlLineInfo
	{
		private const int DocumentContentMask = 386;

		private static readonly int[] ElementContentMasks = new int[10] { 0, 2, 0, 0, 24, 0, 0, 128, 256, 410 };

		private const int TextMask = 24;

		private static XAttribute XmlNamespaceDeclaration;

		private object source;

		private XElement parent;

		private XmlNameTable nameTable;

		public override string BaseURI
		{
			get
			{
				if (source is XObject xObject)
				{
					return xObject.BaseUri;
				}
				if (parent != null)
				{
					return parent.BaseUri;
				}
				return string.Empty;
			}
		}

		public override bool HasAttributes
		{
			get
			{
				if (source is XElement xElement)
				{
					XAttribute xAttribute = xElement.lastAttr;
					if (xAttribute != null)
					{
						do
						{
							xAttribute = xAttribute.next;
							if (!xAttribute.IsNamespaceDeclaration)
							{
								return true;
							}
						}
						while (xAttribute != xElement.lastAttr);
					}
				}
				return false;
			}
		}

		public override bool HasChildren
		{
			get
			{
				if (source is XContainer xContainer && xContainer.content != null)
				{
					XNode xNode = xContainer.content as XNode;
					if (xNode != null)
					{
						do
						{
							xNode = xNode.next;
							if (IsContent(xContainer, xNode))
							{
								return true;
							}
						}
						while (xNode != xContainer.content);
						return false;
					}
					if (((string)xContainer.content).Length != 0 && (xContainer.parent != null || xContainer is XElement))
					{
						return true;
					}
				}
				return false;
			}
		}

		public override bool IsEmptyElement
		{
			get
			{
				if (source is XElement xElement)
				{
					return xElement.IsEmpty;
				}
				return false;
			}
		}

		public override string LocalName => nameTable.Add(GetLocalName());

		public override string Name
		{
			get
			{
				string prefix = GetPrefix();
				if (prefix.Length == 0)
				{
					return nameTable.Add(GetLocalName());
				}
				return nameTable.Add(prefix + ":" + GetLocalName());
			}
		}

		public override string NamespaceURI => nameTable.Add(GetNamespaceURI());

		public override XmlNameTable NameTable => nameTable;

		public override XPathNodeType NodeType
		{
			get
			{
				if (source is XObject xObject)
				{
					switch (xObject.NodeType)
					{
					case XmlNodeType.Element:
						return XPathNodeType.Element;
					case XmlNodeType.Attribute:
						if (parent != null)
						{
							return XPathNodeType.Namespace;
						}
						return XPathNodeType.Attribute;
					case XmlNodeType.Document:
						return XPathNodeType.Root;
					case XmlNodeType.Comment:
						return XPathNodeType.Comment;
					case XmlNodeType.ProcessingInstruction:
						return XPathNodeType.ProcessingInstruction;
					default:
						return XPathNodeType.Text;
					}
				}
				return XPathNodeType.Text;
			}
		}

		public override string Prefix => nameTable.Add(GetPrefix());

		public override object UnderlyingObject
		{
			get
			{
				if (source is string)
				{
					source = parent.LastNode;
					parent = null;
				}
				return source;
			}
		}

		public override string Value
		{
			get
			{
				if (source is XObject xObject)
				{
					switch (xObject.NodeType)
					{
					case XmlNodeType.Element:
						return ((XElement)xObject).Value;
					case XmlNodeType.Attribute:
						return ((XAttribute)xObject).Value;
					case XmlNodeType.Document:
					{
						XElement root = ((XDocument)xObject).Root;
						if (root == null)
						{
							return string.Empty;
						}
						return root.Value;
					}
					case XmlNodeType.Text:
					case XmlNodeType.CDATA:
						return CollectText((XText)xObject);
					case XmlNodeType.Comment:
						return ((XComment)xObject).Value;
					case XmlNodeType.ProcessingInstruction:
						return ((XProcessingInstruction)xObject).Data;
					default:
						return string.Empty;
					}
				}
				return (string)source;
			}
		}

		int IXmlLineInfo.LineNumber
		{
			get
			{
				if (source is IXmlLineInfo xmlLineInfo)
				{
					return xmlLineInfo.LineNumber;
				}
				return 0;
			}
		}

		int IXmlLineInfo.LinePosition
		{
			get
			{
				if (source is IXmlLineInfo xmlLineInfo)
				{
					return xmlLineInfo.LinePosition;
				}
				return 0;
			}
		}

		public XNodeNavigator(XNode node, XmlNameTable nameTable)
		{
			source = node;
			this.nameTable = ((nameTable != null) ? nameTable : CreateNameTable());
		}

		public XNodeNavigator(XNodeNavigator other)
		{
			source = other.source;
			parent = other.parent;
			nameTable = other.nameTable;
		}

		private string GetLocalName()
		{
			if (source is XElement xElement)
			{
				return xElement.Name.LocalName;
			}
			if (source is XAttribute xAttribute)
			{
				if (parent != null && xAttribute.Name.NamespaceName.Length == 0)
				{
					return string.Empty;
				}
				return xAttribute.Name.LocalName;
			}
			if (source is XProcessingInstruction xProcessingInstruction)
			{
				return xProcessingInstruction.Target;
			}
			return string.Empty;
		}

		private string GetNamespaceURI()
		{
			if (source is XElement xElement)
			{
				return xElement.Name.NamespaceName;
			}
			if (source is XAttribute xAttribute)
			{
				if (parent != null)
				{
					return string.Empty;
				}
				return xAttribute.Name.NamespaceName;
			}
			return string.Empty;
		}

		private string GetPrefix()
		{
			if (source is XElement xElement)
			{
				string prefixOfNamespace = xElement.GetPrefixOfNamespace(xElement.Name.Namespace);
				if (prefixOfNamespace != null)
				{
					return prefixOfNamespace;
				}
				return string.Empty;
			}
			if (source is XAttribute xAttribute)
			{
				if (parent != null)
				{
					return string.Empty;
				}
				string prefixOfNamespace2 = xAttribute.GetPrefixOfNamespace(xAttribute.Name.Namespace);
				if (prefixOfNamespace2 != null)
				{
					return prefixOfNamespace2;
				}
			}
			return string.Empty;
		}

		public override bool CheckValidity(XmlSchemaSet schemas, ValidationEventHandler validationEventHandler)
		{
			throw new NotSupportedException(Res.GetString("NotSupported_CheckValidity"));
		}

		public override XPathNavigator Clone()
		{
			return new XNodeNavigator(this);
		}

		public override bool IsSamePosition(XPathNavigator navigator)
		{
			if (!(navigator is XNodeNavigator n))
			{
				return false;
			}
			return IsSamePosition(this, n);
		}

		public override bool MoveTo(XPathNavigator navigator)
		{
			if (navigator is XNodeNavigator xNodeNavigator)
			{
				source = xNodeNavigator.source;
				parent = xNodeNavigator.parent;
				return true;
			}
			return false;
		}

		public override bool MoveToAttribute(string localName, string namespaceName)
		{
			if (source is XElement xElement)
			{
				XAttribute xAttribute = xElement.lastAttr;
				if (xAttribute != null)
				{
					do
					{
						xAttribute = xAttribute.next;
						if (xAttribute.Name.LocalName == localName && xAttribute.Name.NamespaceName == namespaceName && !xAttribute.IsNamespaceDeclaration)
						{
							source = xAttribute;
							return true;
						}
					}
					while (xAttribute != xElement.lastAttr);
				}
			}
			return false;
		}

		public override bool MoveToChild(string localName, string namespaceName)
		{
			if (source is XContainer xContainer && xContainer.content != null)
			{
				XNode xNode = xContainer.content as XNode;
				if (xNode != null)
				{
					do
					{
						xNode = xNode.next;
						if (xNode is XElement xElement && xElement.Name.LocalName == localName && xElement.Name.NamespaceName == namespaceName)
						{
							source = xElement;
							return true;
						}
					}
					while (xNode != xContainer.content);
				}
			}
			return false;
		}

		public override bool MoveToChild(XPathNodeType type)
		{
			if (source is XContainer xContainer && xContainer.content != null)
			{
				XNode xNode = xContainer.content as XNode;
				if (xNode != null)
				{
					int num = GetElementContentMask(type);
					if ((0x18u & (uint)num) != 0 && xContainer.parent == null && xContainer is XDocument)
					{
						num &= -25;
					}
					do
					{
						xNode = xNode.next;
						if (((1 << (int)xNode.NodeType) & num) != 0)
						{
							source = xNode;
							return true;
						}
					}
					while (xNode != xContainer.content);
					return false;
				}
				string text = (string)xContainer.content;
				if (text.Length != 0)
				{
					int elementContentMask = GetElementContentMask(type);
					if ((0x18u & (uint)elementContentMask) != 0 && xContainer.parent == null && xContainer is XDocument)
					{
						return false;
					}
					if ((8u & (uint)elementContentMask) != 0)
					{
						source = text;
						parent = (XElement)xContainer;
						return true;
					}
				}
			}
			return false;
		}

		public override bool MoveToFirstAttribute()
		{
			if (source is XElement xElement)
			{
				XAttribute xAttribute = xElement.lastAttr;
				if (xAttribute != null)
				{
					do
					{
						xAttribute = xAttribute.next;
						if (!xAttribute.IsNamespaceDeclaration)
						{
							source = xAttribute;
							return true;
						}
					}
					while (xAttribute != xElement.lastAttr);
				}
			}
			return false;
		}

		public override bool MoveToFirstChild()
		{
			if (source is XContainer xContainer && xContainer.content != null)
			{
				XNode xNode = xContainer.content as XNode;
				if (xNode != null)
				{
					do
					{
						xNode = xNode.next;
						if (IsContent(xContainer, xNode))
						{
							source = xNode;
							return true;
						}
					}
					while (xNode != xContainer.content);
					return false;
				}
				string text = (string)xContainer.content;
				if (text.Length != 0 && (xContainer.parent != null || xContainer is XElement))
				{
					source = text;
					parent = (XElement)xContainer;
					return true;
				}
			}
			return false;
		}

		public override bool MoveToFirstNamespace(XPathNamespaceScope scope)
		{
			if (source is XElement e)
			{
				XAttribute xAttribute = null;
				switch (scope)
				{
				case XPathNamespaceScope.Local:
					xAttribute = GetFirstNamespaceDeclarationLocal(e);
					break;
				case XPathNamespaceScope.ExcludeXml:
					xAttribute = GetFirstNamespaceDeclarationGlobal(e);
					while (xAttribute != null && xAttribute.Name.LocalName == "xml")
					{
						xAttribute = GetNextNamespaceDeclarationGlobal(xAttribute);
					}
					break;
				case XPathNamespaceScope.All:
					xAttribute = GetFirstNamespaceDeclarationGlobal(e);
					if (xAttribute == null)
					{
						xAttribute = GetXmlNamespaceDeclaration();
					}
					break;
				}
				if (xAttribute != null)
				{
					source = xAttribute;
					parent = e;
					return true;
				}
			}
			return false;
		}

		public override bool MoveToId(string id)
		{
			throw new NotSupportedException(Res.GetString("NotSupported_MoveToId"));
		}

		public override bool MoveToNamespace(string localName)
		{
			if (source is XElement e)
			{
				if (localName == "xmlns")
				{
					return false;
				}
				if (localName != null && localName.Length == 0)
				{
					localName = "xmlns";
				}
				for (XAttribute xAttribute = GetFirstNamespaceDeclarationGlobal(e); xAttribute != null; xAttribute = GetNextNamespaceDeclarationGlobal(xAttribute))
				{
					if (xAttribute.Name.LocalName == localName)
					{
						source = xAttribute;
						parent = e;
						return true;
					}
				}
				if (localName == "xml")
				{
					source = GetXmlNamespaceDeclaration();
					parent = e;
					return true;
				}
			}
			return false;
		}

		public override bool MoveToNext()
		{
			XNode xNode = source as XNode;
			if (xNode != null)
			{
				XContainer xContainer = xNode.parent;
				if (xContainer != null && xNode != xContainer.content)
				{
					do
					{
						XNode next = xNode.next;
						if (IsContent(xContainer, next) && (!(xNode is XText) || !(next is XText)))
						{
							source = next;
							return true;
						}
						xNode = next;
					}
					while (xNode != xContainer.content);
				}
			}
			return false;
		}

		public override bool MoveToNext(string localName, string namespaceName)
		{
			XNode xNode = source as XNode;
			if (xNode != null)
			{
				XContainer xContainer = xNode.parent;
				if (xContainer != null && xNode != xContainer.content)
				{
					do
					{
						xNode = xNode.next;
						if (xNode is XElement xElement && xElement.Name.LocalName == localName && xElement.Name.NamespaceName == namespaceName)
						{
							source = xElement;
							return true;
						}
					}
					while (xNode != xContainer.content);
				}
			}
			return false;
		}

		public override bool MoveToNext(XPathNodeType type)
		{
			XNode xNode = source as XNode;
			if (xNode != null)
			{
				XContainer xContainer = xNode.parent;
				if (xContainer != null && xNode != xContainer.content)
				{
					int num = GetElementContentMask(type);
					if ((0x18u & (uint)num) != 0 && xContainer.parent == null && xContainer is XDocument)
					{
						num &= -25;
					}
					do
					{
						XNode next = xNode.next;
						if (((1 << (int)next.NodeType) & num) != 0 && (!(xNode is XText) || !(next is XText)))
						{
							source = next;
							return true;
						}
						xNode = next;
					}
					while (xNode != xContainer.content);
				}
			}
			return false;
		}

		public override bool MoveToNextAttribute()
		{
			XAttribute xAttribute = source as XAttribute;
			if (xAttribute != null && parent == null)
			{
				XElement xElement = (XElement)xAttribute.parent;
				if (xElement != null)
				{
					while (xAttribute != xElement.lastAttr)
					{
						xAttribute = xAttribute.next;
						if (!xAttribute.IsNamespaceDeclaration)
						{
							source = xAttribute;
							return true;
						}
					}
				}
			}
			return false;
		}

		public override bool MoveToNextNamespace(XPathNamespaceScope scope)
		{
			XAttribute xAttribute = source as XAttribute;
			if (xAttribute != null && parent != null && !IsXmlNamespaceDeclaration(xAttribute))
			{
				switch (scope)
				{
				case XPathNamespaceScope.Local:
					if (xAttribute.parent != parent)
					{
						return false;
					}
					xAttribute = GetNextNamespaceDeclarationLocal(xAttribute);
					break;
				case XPathNamespaceScope.ExcludeXml:
					do
					{
						xAttribute = GetNextNamespaceDeclarationGlobal(xAttribute);
					}
					while (xAttribute != null && (xAttribute.Name.LocalName == "xml" || HasNamespaceDeclarationInScope(xAttribute, parent)));
					break;
				case XPathNamespaceScope.All:
					do
					{
						xAttribute = GetNextNamespaceDeclarationGlobal(xAttribute);
					}
					while (xAttribute != null && HasNamespaceDeclarationInScope(xAttribute, parent));
					if (xAttribute == null && !HasNamespaceDeclarationInScope(GetXmlNamespaceDeclaration(), parent))
					{
						xAttribute = GetXmlNamespaceDeclaration();
					}
					break;
				}
				if (xAttribute != null)
				{
					source = xAttribute;
					return true;
				}
			}
			return false;
		}

		public override bool MoveToParent()
		{
			if (parent != null)
			{
				source = parent;
				parent = null;
				return true;
			}
			XObject xObject = (XObject)source;
			if (xObject.parent != null)
			{
				source = xObject.parent;
				return true;
			}
			return false;
		}

		public override bool MoveToPrevious()
		{
			if (source is XNode xNode)
			{
				XContainer xContainer = xNode.parent;
				if (xContainer != null)
				{
					XNode xNode2 = (XNode)xContainer.content;
					if (xNode2.next != xNode)
					{
						XNode xNode3 = null;
						do
						{
							xNode2 = xNode2.next;
							if (IsContent(xContainer, xNode2))
							{
								xNode3 = ((xNode3 is XText && xNode2 is XText) ? xNode3 : xNode2);
							}
						}
						while (xNode2.next != xNode);
						if (xNode3 != null)
						{
							source = xNode3;
							return true;
						}
					}
				}
			}
			return false;
		}

		public override XmlReader ReadSubtree()
		{
			if (!(source is XContainer node))
			{
				throw new InvalidOperationException(Res.GetString("InvalidOperation_BadNodeType", NodeType));
			}
			return new XNodeReader(node, nameTable);
		}

		bool IXmlLineInfo.HasLineInfo()
		{
			if (source is IXmlLineInfo xmlLineInfo)
			{
				return xmlLineInfo.HasLineInfo();
			}
			return false;
		}

		private static string CollectText(XText n)
		{
			string text = n.Value;
			if (n.parent != null)
			{
				while (n != n.parent.content)
				{
					n = n.next as XText;
					if (n == null)
					{
						break;
					}
					text += n.Value;
				}
			}
			return text;
		}

		private static XmlNameTable CreateNameTable()
		{
			NameTable obj = new NameTable();
			obj.Add(string.Empty);
			obj.Add("http://www.w3.org/2000/xmlns/");
			obj.Add("http://www.w3.org/XML/1998/namespace");
			return obj;
		}

		private static bool IsContent(XContainer c, XNode n)
		{
			if (c.parent != null || c is XElement)
			{
				return true;
			}
			return ((1 << (int)n.NodeType) & 0x182) != 0;
		}

		private static bool IsSamePosition(XNodeNavigator n1, XNodeNavigator n2)
		{
			if (n1.source == n2.source && n1.parent == n2.parent)
			{
				return true;
			}
			if ((n1.parent != null) ^ (n2.parent != null))
			{
				if (n1.source is XText xText)
				{
					if (xText.Value == n2.source)
					{
						return xText.parent == n2.parent;
					}
					return false;
				}
				if (n2.source is XText xText2)
				{
					if (xText2.Value == n1.source)
					{
						return xText2.parent == n1.parent;
					}
					return false;
				}
			}
			return false;
		}

		private static bool IsXmlNamespaceDeclaration(XAttribute a)
		{
			return a == GetXmlNamespaceDeclaration();
		}

		private static int GetElementContentMask(XPathNodeType type)
		{
			return ElementContentMasks[(int)type];
		}

		private static XAttribute GetFirstNamespaceDeclarationGlobal(XElement e)
		{
			do
			{
				XAttribute firstNamespaceDeclarationLocal = GetFirstNamespaceDeclarationLocal(e);
				if (firstNamespaceDeclarationLocal != null)
				{
					return firstNamespaceDeclarationLocal;
				}
				e = e.parent as XElement;
			}
			while (e != null);
			return null;
		}

		private static XAttribute GetFirstNamespaceDeclarationLocal(XElement e)
		{
			XAttribute xAttribute = e.lastAttr;
			if (xAttribute != null)
			{
				do
				{
					xAttribute = xAttribute.next;
					if (xAttribute.IsNamespaceDeclaration)
					{
						return xAttribute;
					}
				}
				while (xAttribute != e.lastAttr);
			}
			return null;
		}

		private static XAttribute GetNextNamespaceDeclarationGlobal(XAttribute a)
		{
			XElement xElement = (XElement)a.parent;
			if (xElement == null)
			{
				return null;
			}
			XAttribute nextNamespaceDeclarationLocal = GetNextNamespaceDeclarationLocal(a);
			if (nextNamespaceDeclarationLocal != null)
			{
				return nextNamespaceDeclarationLocal;
			}
			if (!(xElement.parent is XElement e))
			{
				return null;
			}
			return GetFirstNamespaceDeclarationGlobal(e);
		}

		private static XAttribute GetNextNamespaceDeclarationLocal(XAttribute a)
		{
			XElement xElement = (XElement)a.parent;
			if (xElement == null)
			{
				return null;
			}
			while (a != xElement.lastAttr)
			{
				a = a.next;
				if (a.IsNamespaceDeclaration)
				{
					return a;
				}
			}
			return null;
		}

		private static XAttribute GetXmlNamespaceDeclaration()
		{
			if (XmlNamespaceDeclaration == null)
			{
				Interlocked.CompareExchange(ref XmlNamespaceDeclaration, new XAttribute(XNamespace.Xmlns.GetName("xml"), "http://www.w3.org/XML/1998/namespace"), null);
			}
			return XmlNamespaceDeclaration;
		}

		private static bool HasNamespaceDeclarationInScope(XAttribute a, XElement e)
		{
			XName name = a.Name;
			while (e != null && e != a.parent)
			{
				if (e.Attribute(name) != null)
				{
					return true;
				}
				e = e.parent as XElement;
			}
			return false;
		}
	}
	[StructLayout(LayoutKind.Sequential, Size = 1)]
	internal struct XPathEvaluator
	{
		public object Evaluate<T>(XNode node, string expression, IXmlNamespaceResolver resolver) where T : class
		{
			object obj = node.CreateNavigator().Evaluate(expression, resolver);
			if (obj is XPathNodeIterator)
			{
				return EvaluateIterator<T>((XPathNodeIterator)obj);
			}
			if (!(obj is T))
			{
				throw new InvalidOperationException(Res.GetString("InvalidOperation_UnexpectedEvaluation", obj.GetType()));
			}
			return (T)obj;
		}

		private IEnumerable<T> EvaluateIterator<T>(XPathNodeIterator result)
		{
			foreach (XPathNavigator item in result)
			{
				object r = item.UnderlyingObject;
				if (!(r is T))
				{
					throw new InvalidOperationException(Res.GetString("InvalidOperation_UnexpectedEvaluation", r.GetType()));
				}
				yield return (T)r;
				XText t = r as XText;
				if (t == null || t.parent == null)
				{
					continue;
				}
				while (t != t.parent.content)
				{
					t = t.next as XText;
					if (t == null)
					{
						break;
					}
					yield return (T)(object)t;
				}
			}
		}
	}
	public static class Extensions
	{
		public static XPathNavigator CreateNavigator(this XNode node)
		{
			return node.CreateNavigator(null);
		}

		public static XPathNavigator CreateNavigator(this XNode node, XmlNameTable nameTable)
		{
			if (node == null)
			{
				throw new ArgumentNullException("node");
			}
			if (node is XDocumentType)
			{
				throw new ArgumentException(Res.GetString("Argument_CreateNavigator", XmlNodeType.DocumentType));
			}
			if (node is XText xText)
			{
				if (xText.parent is XDocument)
				{
					throw new ArgumentException(Res.GetString("Argument_CreateNavigator", XmlNodeType.Whitespace));
				}
				node = CalibrateText(xText);
			}
			return new XNodeNavigator(node, nameTable);
		}

		public static object XPathEvaluate(this XNode node, string expression)
		{
			return node.XPathEvaluate(expression, null);
		}

		public static object XPathEvaluate(this XNode node, string expression, IXmlNamespaceResolver resolver)
		{
			if (node == null)
			{
				throw new ArgumentNullException("node");
			}
			return default(XPathEvaluator).Evaluate<object>(node, expression, resolver);
		}

		public static XElement XPathSelectElement(this XNode node, string expression)
		{
			return node.XPathSelectElement(expression, null);
		}

		public static XElement XPathSelectElement(this XNode node, string expression, IXmlNamespaceResolver resolver)
		{
			return node.XPathSelectElements(expression, resolver).FirstOrDefault();
		}

		public static IEnumerable<XElement> XPathSelectElements(this XNode node, string expression)
		{
			return node.XPathSelectElements(expression, null);
		}

		public static IEnumerable<XElement> XPathSelectElements(this XNode node, string expression, IXmlNamespaceResolver resolver)
		{
			if (node == null)
			{
				throw new ArgumentNullException("node");
			}
			return (IEnumerable<XElement>)default(XPathEvaluator).Evaluate<XElement>(node, expression, resolver);
		}

		private static XText CalibrateText(XText n)
		{
			if (n.parent == null)
			{
				return n;
			}
			XNode xNode = (XNode)n.parent.content;
			while (true)
			{
				xNode = xNode.next;
				if (!(xNode is XText result))
				{
					continue;
				}
				do
				{
					if (xNode == n)
					{
						return result;
					}
					xNode = xNode.next;
				}
				while (xNode is XText);
			}
		}
	}
}
namespace System.Xml.Linq
{
	[Serializable]
	[KnownType(typeof(NameSerializer))]
	public sealed class XName : IEquatable<XName>, ISerializable
	{
		private XNamespace ns;

		private string localName;

		private int hashCode;

		public string LocalName => localName;

		public XNamespace Namespace => ns;

		public string NamespaceName => ns.NamespaceName;

		internal XName(XNamespace ns, string localName)
		{
			this.ns = ns;
			this.localName = XmlConvert.VerifyNCName(localName);
			hashCode = ns.GetHashCode() ^ localName.GetHashCode();
		}

		public override string ToString()
		{
			if (ns.NamespaceName.Length == 0)
			{
				return localName;
			}
			return "{" + ns.NamespaceName + "}" + localName;
		}

		public static XName Get(string expandedName)
		{
			if (expandedName == null)
			{
				throw new ArgumentNullException("expandedName");
			}
			if (expandedName.Length == 0)
			{
				throw new ArgumentException(Res.GetString("Argument_InvalidExpandedName", expandedName));
			}
			if (expandedName[0] == '{')
			{
				int num = expandedName.LastIndexOf('}');
				if (num <= 1 || num == expandedName.Length - 1)
				{
					throw new ArgumentException(Res.GetString("Argument_InvalidExpandedName", expandedName));
				}
				return XNamespace.Get(expandedName, 1, num - 1).GetName(expandedName, num + 1, expandedName.Length - num - 1);
			}
			return XNamespace.None.GetName(expandedName);
		}

		public static XName Get(string localName, string namespaceName)
		{
			return XNamespace.Get(namespaceName).GetName(localName);
		}

		[CLSCompliant(false)]
		public static implicit operator XName(string expandedName)
		{
			if (expandedName == null)
			{
				return null;
			}
			return Get(expandedName);
		}

		public override bool Equals(object obj)
		{
			return this == obj;
		}

		public override int GetHashCode()
		{
			return hashCode;
		}

		public static bool operator ==(XName left, XName right)
		{
			return (object)left == right;
		}

		public static bool operator !=(XName left, XName right)
		{
			return (object)left != right;
		}

		bool IEquatable<XName>.Equals(XName other)
		{
			return (object)this == other;
		}

		[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter)]
		void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
		{
			if (info == null)
			{
				throw new ArgumentNullException("info");
			}
			info.AddValue("name", ToString());
			info.SetType(typeof(NameSerializer));
		}

		internal XName()
		{
			ThrowStub.ThrowNotSupportedException();
		}
	}
	[Serializable]
	internal sealed class NameSerializer : IObjectReference, ISerializable
	{
		private string expandedName;

		private NameSerializer(SerializationInfo info, StreamingContext context)
		{
			if (info == null)
			{
				throw new ArgumentNullException("info");
			}
			expandedName = info.GetString("name");
		}

		object IObjectReference.GetRealObject(StreamingContext context)
		{
			return XName.Get(expandedName);
		}

		void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
		{
			throw new NotSupportedException();
		}
	}
	public sealed class XNamespace
	{
		internal const string xmlPrefixNamespace = "http://www.w3.org/XML/1998/namespace";

		internal const string xmlnsPrefixNamespace = "http://www.w3.org/2000/xmlns/";

		private static XHashtable<WeakReference> namespaces;

		private static WeakReference refNone;

		private static WeakReference refXml;

		private static WeakReference refXmlns;

		private string namespaceName;

		private int hashCode;

		private XHashtable<XName> names;

		private const int NamesCapacity = 8;

		private const int NamespacesCapacity = 32;

		public string NamespaceName => namespaceName;

		public static XNamespace None => EnsureNamespace(ref refNone, string.Empty);

		public static XNamespace Xml => EnsureNamespace(ref refXml, "http://www.w3.org/XML/1998/namespace");

		public static XNamespace Xmlns => EnsureNamespace(ref refXmlns, "http://www.w3.org/2000/xmlns/");

		internal XNamespace(string namespaceName)
		{
			this.namespaceName = namespaceName;
			hashCode = namespaceName.GetHashCode();
			names = new XHashtable<XName>(ExtractLocalName, 8);
		}

		public XName GetName(string localName)
		{
			if (localName == null)
			{
				throw new ArgumentNullException("localName");
			}
			return GetName(localName, 0, localName.Length);
		}

		public override string ToString()
		{
			return namespaceName;
		}

		public static XNamespace Get(string namespaceName)
		{
			if (namespaceName == null)
			{
				throw new ArgumentNullException("namespaceName");
			}
			return Get(namespaceName, 0, namespaceName.Length);
		}

		[CLSCompliant(false)]
		public static implicit operator XNamespace(string namespaceName)
		{
			if (namespaceName == null)
			{
				return null;
			}
			return Get(namespaceName);
		}

		public static XName operator +(XNamespace ns, string localName)
		{
			if (ns == null)
			{
				throw new ArgumentNullException("ns");
			}
			return ns.GetName(localName);
		}

		public override bool Equals(object obj)
		{
			return this == obj;
		}

		public override int GetHashCode()
		{
			return hashCode;
		}

		public static bool operator ==(XNamespace left, XNamespace right)
		{
			return (object)left == right;
		}

		public static bool operator !=(XNamespace left, XNamespace right)
		{
			return (object)left != right;
		}

		internal XName GetName(string localName, int index, int count)
		{
			if (names.TryGetValue(localName, index, count, out var value))
			{
				return value;
			}
			return names.Add(new XName(this, localName.Substring(index, count)));
		}

		internal static XNamespace Get(string namespaceName, int index, int count)
		{
			if (count == 0)
			{
				return None;
			}
			if (namespaces == null)
			{
				Interlocked.CompareExchange(ref namespaces, new XHashtable<WeakReference>(ExtractNamespace, 32), null);
			}
			XNamespace xNamespace;
			do
			{
				if (!namespaces.TryGetValue(namespaceName, index, count, out var value))
				{
					if (count == "http://www.w3.org/XML/1998/namespace".Length && string.CompareOrdinal(namespaceName, index, "http://www.w3.org/XML/1998/namespace", 0, count) == 0)
					{
						return Xml;
					}
					if (count == "http://www.w3.org/2000/xmlns/".Length && string.CompareOrdinal(namespaceName, index, "http://www.w3.org/2000/xmlns/", 0, count) == 0)
					{
						return Xmlns;
					}
					value = namespaces.Add(new WeakReference(new XNamespace(namespaceName.Substring(index, count))));
				}
				xNamespace = ((value != null) ? ((XNamespace)value.Target) : null);
			}
			while (xNamespace == null);
			return xNamespace;
		}

		private static string ExtractLocalName(XName n)
		{
			return n.LocalName;
		}

		private static string ExtractNamespace(WeakReference r)
		{
			XNamespace xNamespace;
			if (r == null || (xNamespace = (XNamespace)r.Target) == null)
			{
				return null;
			}
			return xNamespace.NamespaceName;
		}

		private static XNamespace EnsureNamespace(ref WeakReference refNmsp, string namespaceName)
		{
			XNamespace xNamespace;
			while (true)
			{
				WeakReference weakReference = refNmsp;
				if (weakReference != null)
				{
					xNamespace = (XNamespace)weakReference.Target;
					if (xNamespace != null)
					{
						break;
					}
				}
				Interlocked.CompareExchange(ref refNmsp, new WeakReference(new XNamespace(namespaceName)), weakReference);
			}
			return xNamespace;
		}

		internal XNamespace()
		{
			ThrowStub.ThrowNotSupportedException();
		}
	}
	internal sealed class XHashtable<TValue>
	{
		public delegate string ExtractKeyDelegate(TValue value);

		private sealed class XHashtableState
		{
			private struct Entry
			{
				public TValue Value;

				public int HashCode;

				public int Next;
			}

			private int[] buckets;

			private Entry[] entries;

			private int numEntries;

			private ExtractKeyDelegate extractKey;

			private const int EndOfList = 0;

			private const int FullList = -1;

			public XHashtableState(ExtractKeyDelegate extractKey, int capacity)
			{
				buckets = new int[capacity];
				entries = new Entry[capacity];
				this.extractKey = extractKey;
			}

			public XHashtableState Resize()
			{
				if (numEntries < buckets.Length)
				{
					return this;
				}
				int num = 0;
				for (int i = 0; i < buckets.Length; i++)
				{
					int num2 = buckets[i];
					if (num2 == 0)
					{
						num2 = Interlocked.CompareExchange(ref buckets[i], -1, 0);
					}
					while (num2 > 0)
					{
						if (extractKey(entries[num2].Value) != null)
						{
							num++;
						}
						num2 = ((entries[num2].Next != 0) ? entries[num2].Next : Interlocked.CompareExchange(ref entries[num2].Next, -1, 0));
					}
				}
				if (num < buckets.Length / 2)
				{
					num = buckets.Length;
				}
				else
				{
					num = buckets.Length * 2;
					if (num < 0)
					{
						throw new OverflowException();
					}
				}
				XHashtableState xHashtableState = new XHashtableState(extractKey, num);
				for (int j = 0; j < buckets.Length; j++)
				{
					for (int num3 = buckets[j]; num3 > 0; num3 = entries[num3].Next)
					{
						xHashtableState.TryAdd(entries[num3].Value, out var _);
					}
				}
				return xHashtableState;
			}

			public bool TryGetValue(string key, int index, int count, out TValue value)
			{
				int hashCode = ComputeHashCode(key, index, count);
				int entryIndex = 0;
				if (FindEntry(hashCode, key, index, count, ref entryIndex))
				{
					value = entries[entryIndex].Value;
					return true;
				}
				value = default(TValue);
				return false;
			}

			public bool TryAdd(TValue value, out TValue newValue)
			{
				newValue = value;
				string text = extractKey(value);
				if (text == null)
				{
					return true;
				}
				int num = ComputeHashCode(text, 0, text.Length);
				int num2 = Interlocked.Increment(ref numEntries);
				if (num2 < 0 || num2 >= buckets.Length)
				{
					return false;
				}
				entries[num2].Value = value;
				entries[num2].HashCode = num;
				Thread.MemoryBarrier();
				int entryIndex = 0;
				while (!FindEntry(num, text, 0, text.Length, ref entryIndex))
				{
					entryIndex = ((entryIndex != 0) ? Interlocked.CompareExchange(ref entries[entryIndex].Next, num2, 0) : Interlocked.CompareExchange(ref buckets[num & (buckets.Length - 1)], num2, 0));
					if (entryIndex <= 0)
					{
						return entryIndex == 0;
					}
				}
				newValue = entries[entryIndex].Value;
				return true;
			}

			private bool FindEntry(int hashCode, string key, int index, int count, ref int entryIndex)
			{
				int num = entryIndex;
				int num2 = ((num != 0) ? num : buckets[hashCode & (buckets.Length - 1)]);
				while (num2 > 0)
				{
					if (entries[num2].HashCode == hashCode)
					{
						string text = extractKey(entries[num2].Value);
						if (text == null)
						{
							if (entries[num2].Next > 0)
							{
								entries[num2].Value = default(TValue);
								num2 = entries[num2].Next;
								if (num == 0)
								{
									buckets[hashCode & (buckets.Length - 1)] = num2;
								}
								else
								{
									entries[num].Next = num2;
								}
								continue;
							}
						}
						else if (count == text.Length && string.CompareOrdinal(key, index, text, 0, count) == 0)
						{
							entryIndex = num2;
							return true;
						}
					}
					num = num2;
					num2 = entries[num2].Next;
				}
				entryIndex = num;
				return false;
			}

			private static int ComputeHashCode(string key, int index, int count)
			{
				int num = 352654597;
				int num2 = index + count;
				for (int i = index; i < num2; i++)
				{
					num += (num << 7) ^ key[i];
				}
				num -= num >> 17;
				num -= num >> 11;
				num -= num >> 5;
				return num & 0x7FFFFFFF;
			}
		}

		private XHashtableState state;

		private const int StartingHash = 352654597;

		public XHashtable(ExtractKeyDelegate extractKey, int capacity)
		{
			state = new XHashtableState(extractKey, capacity);
		}

		public bool TryGetValue(string key, int index, int count, out TValue value)
		{
			return state.TryGetValue(key, index, count, out value);
		}

		public TValue Add(TValue value)
		{
			TValue newValue;
			while (!state.TryAdd(value, out newValue))
			{
				lock (this)
				{
					XHashtableState xHashtableState = state.Resize();
					Thread.MemoryBarrier();
					state = xHashtableState;
				}
			}
			return newValue;
		}
	}
	public abstract class XObject : IXmlLineInfo
	{
		internal XContainer parent;

		internal object annotations;

		public string BaseUri
		{
			get
			{
				XObject xObject = this;
				while (true)
				{
					if (xObject != null && xObject.annotations == null)
					{
						xObject = xObject.parent;
						continue;
					}
					if (xObject == null)
					{
						break;
					}
					BaseUriAnnotation baseUriAnnotation = xObject.Annotation<BaseUriAnnotation>();
					if (baseUriAnnotation != null)
					{
						return baseUriAnnotation.baseUri;
					}
					xObject = xObject.parent;
				}
				return string.Empty;
			}
		}

		public XDocument Document
		{
			get
			{
				XObject xObject = this;
				while (xObject.parent != null)
				{
					xObject = xObject.parent;
				}
				return xObject as XDocument;
			}
		}

		public abstract XmlNodeType NodeType { get; }

		public XElement Parent => parent as XElement;

		int IXmlLineInfo.LineNumber => Annotation<LineInfoAnnotation>()?.lineNumber ?? 0;

		int IXmlLineInfo.LinePosition => Annotation<LineInfoAnnotation>()?.linePosition ?? 0;

		internal bool HasBaseUri => Annotation<BaseUriAnnotation>() != null;

		public event EventHandler<XObjectChangeEventArgs> Changed
		{
			add
			{
				if (value != null)
				{
					XObjectChangeAnnotation xObjectChangeAnnotation = Annotation<XObjectChangeAnnotation>();
					if (xObjectChangeAnnotation == null)
					{
						xObjectChangeAnnotation = new XObjectChangeAnnotation();
						AddAnnotation(xObjectChangeAnnotation);
					}
					XObjectChangeAnnotation xObjectChangeAnnotation2 = xObjectChangeAnnotation;
					xObjectChangeAnnotation2.changed = (EventHandler<XObjectChangeEventArgs>)Delegate.Combine(xObjectChangeAnnotation2.changed, value);
				}
			}
			remove
			{
				if (value == null)
				{
					return;
				}
				XObjectChangeAnnotation xObjectChangeAnnotation = Annotation<XObjectChangeAnnotation>();
				if (xObjectChangeAnnotation != null)
				{
					xObjectChangeAnnotation.changed = (EventHandler<XObjectChangeEventArgs>)Delegate.Remove(xObjectChangeAnnotation.changed, value);
					if (xObjectChangeAnnotation.changing == null && xObjectChangeAnnotation.changed == null)
					{
						RemoveAnnotations<XObjectChangeAnnotation>();
					}
				}
			}
		}

		public event EventHandler<XObjectChangeEventArgs> Changing
		{
			add
			{
				if (value != null)
				{
					XObjectChangeAnnotation xObjectChangeAnnotation = Annotation<XObjectChangeAnnotation>();
					if (xObjectChangeAnnotation == null)
					{
						xObjectChangeAnnotation = new XObjectChangeAnnotation();
						AddAnnotation(xObjectChangeAnnotation);
					}
					XObjectChangeAnnotation xObjectChangeAnnotation2 = xObjectChangeAnnotation;
					xObjectChangeAnnotation2.changing = (EventHandler<XObjectChangeEventArgs>)Delegate.Combine(xObjectChangeAnnotation2.changing, value);
				}
			}
			remove
			{
				if (value == null)
				{
					return;
				}
				XObjectChangeAnnotation xObjectChangeAnnotation = Annotation<XObjectChangeAnnotation>();
				if (xObjectChangeAnnotation != null)
				{
					xObjectChangeAnnotation.changing = (EventHandler<XObjectChangeEventArgs>)Delegate.Remove(xObjectChangeAnnotation.changing, value);
					if (xObjectChangeAnnotation.changing == null && xObjectChangeAnnotation.changed == null)
					{
						RemoveAnnotations<XObjectChangeAnnotation>();
					}
				}
			}
		}

		internal XObject()
		{
		}

		public void AddAnnotation(object annotation)
		{
			if (annotation == null)
			{
				throw new ArgumentNullException("annotation");
			}
			if (annotations == null)
			{
				annotations = ((!(annotation is object[])) ? annotation : new object[1] { annotation });
				return;
			}
			object[] array = annotations as object[];
			if (array == null)
			{
				annotations = new object[2] { annotations, annotation };
				return;
			}
			int i;
			for (i = 0; i < array.Length && array[i] != null; i++)
			{
			}
			if (i == array.Length)
			{
				Array.Resize(ref array, i * 2);
				annotations = array;
			}
			array[i] = annotation;
		}

		public object Annotation(Type type)
		{
			if (type == null)
			{
				throw new ArgumentNullException("type");
			}
			if (annotations != null)
			{
				if (!(annotations is object[] array))
				{
					if (type.IsInstanceOfType(annotations))
					{
						return annotations;
					}
				}
				else
				{
					foreach (object obj in array)
					{
						if (obj == null)
						{
							break;
						}
						if (type.IsInstanceOfType(obj))
						{
							return obj;
						}
					}
				}
			}
			return null;
		}

		public T Annotation<T>() where T : class
		{
			if (annotations != null)
			{
				if (!(annotations is object[] array))
				{
					return annotations as T;
				}
				foreach (object obj in array)
				{
					if (obj == null)
					{
						break;
					}
					if (obj is T result)
					{
						return result;
					}
				}
			}
			return null;
		}

		public IEnumerable<object> Annotations(Type type)
		{
			if (type == null)
			{
				throw new ArgumentNullException("type");
			}
			return AnnotationsIterator(type);
		}

		private IEnumerable<object> AnnotationsIterator(Type type)
		{
			if (annotations == null)
			{
				yield break;
			}
			if (!(annotations is object[] a))
			{
				if (type.IsInstanceOfType(annotations))
				{
					yield return annotations;
				}
				yield break;
			}
			foreach (object obj in a)
			{
				if (obj != null)
				{
					if (type.IsInstanceOfType(obj))
					{
						yield return obj;
					}
					continue;
				}
				break;
			}
		}

		public IEnumerable<T> Annotations<T>() where T : class
		{
			if (annotations == null)
			{
				yield break;
			}
			if (!(annotations is object[] a))
			{
				if (annotations is T val)
				{
					yield return val;
				}
				yield break;
			}
			foreach (object obj in a)
			{
				if (obj != null)
				{
					if (obj is T val2)
					{
						yield return val2;
					}
					continue;
				}
				break;
			}
		}

		public void RemoveAnnotations(Type type)
		{
			if (type == null)
			{
				throw new ArgumentNullException("type");
			}
			if (annotations == null)
			{
				return;
			}
			if (!(annotations is object[] array))
			{
				if (type.IsInstanceOfType(annotations))
				{
					annotations = null;
				}
				return;
			}
			int i = 0;
			int num = 0;
			for (; i < array.Length; i++)
			{
				object obj = array[i];
				if (obj == null)
				{
					break;
				}
				if (!type.IsInstanceOfType(obj))
				{
					array[num++] = obj;
				}
			}
			if (num == 0)
			{
				annotations = null;
				return;
			}
			while (num < i)
			{
				array[num++] = null;
			}
		}

		public void RemoveAnnotations<T>() where T : class
		{
			if (annotations == null)
			{
				return;
			}
			if (!(annotations is object[] array))
			{
				if (annotations is T)
				{
					annotations = null;
				}
				return;
			}
			int i = 0;
			int num = 0;
			for (; i < array.Length; i++)
			{
				object obj = array[i];
				if (obj == null)
				{
					break;
				}
				if (!(obj is T))
				{
					array[num++] = obj;
				}
			}
			if (num == 0)
			{
				annotations = null;
				return;
			}
			while (num < i)
			{
				array[num++] = null;
			}
		}

		bool IXmlLineInfo.HasLineInfo()
		{
			return Annotation<LineInfoAnnotation>() != null;
		}

		internal bool NotifyChanged(object sender, XObjectChangeEventArgs e)
		{
			bool result = false;
			XObject xObject = this;
			while (true)
			{
				if (xObject != null && xObject.annotations == null)
				{
					xObject = xObject.parent;
					continue;
				}
				if (xObject == null)
				{
					break;
				}
				XObjectChangeAnnotation xObjectChangeAnnotation = xObject.Annotation<XObjectChangeAnnotation>();
				if (xObjectChangeAnnotation != null)
				{
					result = true;
					if (xObjectChangeAnnotation.changed != null)
					{
						xObjectChangeAnnotation.changed(sender, e);
					}
				}
				xObject = xObject.parent;
			}
			return result;
		}

		internal bool NotifyChanging(object sender, XObjectChangeEventArgs e)
		{
			bool result = false;
			XObject xObject = this;
			while (true)
			{
				if (xObject != null && xObject.annotations == null)
				{
					xObject = xObject.parent;
					continue;
				}
				if (xObject == null)
				{
					break;
				}
				XObjectChangeAnnotation xObjectChangeAnnotation = xObject.Annotation<XObjectChangeAnnotation>();
				if (xObjectChangeAnnotation != null)
				{
					result = true;
					if (xObjectChangeAnnotation.changing != null)
					{
						xObjectChangeAnnotation.changing(sender, e);
					}
				}
				xObject = xObject.parent;
			}
			return result;
		}

		internal void SetBaseUri(string baseUri)
		{
			AddAnnotation(new BaseUriAnnotation(baseUri));
		}

		internal void SetLineInfo(int lineNumber, int linePosition)
		{
			AddAnnotation(new LineInfoAnnotation(lineNumber, linePosition));
		}

		internal bool SkipNotify()
		{
			XObject xObject = this;
			while (true)
			{
				if (xObject != null && xObject.annotations == null)
				{
					xObject = xObject.parent;
					continue;
				}
				if (xObject == null)
				{
					return true;
				}
				if (xObject.Annotations<XObjectChangeAnnotation>() != null)
				{
					break;
				}
				xObject = xObject.parent;
			}
			return false;
		}

		internal SaveOptions GetSaveOptionsFromAnnotations()
		{
			XObject xObject = this;
			object obj;
			while (true)
			{
				if (xObject != null && xObject.annotations == null)
				{
					xObject = xObject.parent;
					continue;
				}
				if (xObject == null)
				{
					return SaveOptions.None;
				}
				obj = xObject.Annotation(typeof(SaveOptions));
				if (obj != null)
				{
					break;
				}
				xObject = xObject.parent;
			}
			return (SaveOptions)obj;
		}
	}
	internal class BaseUriAnnotation
	{
		internal string baseUri;

		public BaseUriAnnotation(string baseUri)
		{
			this.baseUri = baseUri;
		}
	}
	internal class LineInfoAnnotation
	{
		internal int lineNumber;

		internal int linePosition;

		public LineInfoAnnotation(int lineNumber, int linePosition)
		{
			this.lineNumber = lineNumber;
			this.linePosition = linePosition;
		}
	}
	internal class LineInfoEndElementAnnotation : LineInfoAnnotation
	{
		public LineInfoEndElementAnnotation(int lineNumber, int linePosition)
			: base(lineNumber, linePosition)
		{
		}
	}
	internal class XObjectChangeAnnotation
	{
		internal EventHandler<XObjectChangeEventArgs> changing;

		internal EventHandler<XObjectChangeEventArgs> changed;
	}
	public enum XObjectChange
	{
		Add,
		Remove,
		Name,
		Value
	}
	public class XObjectChangeEventArgs : EventArgs
	{
		private XObjectChange objectChange;

		public static readonly XObjectChangeEventArgs Add = new XObjectChangeEventArgs(XObjectChange.Add);

		public static readonly XObjectChangeEventArgs Remove = new XObjectChangeEventArgs(XObjectChange.Remove);

		public static readonly XObjectChangeEventArgs Name = new XObjectChangeEventArgs(XObjectChange.Name);

		public static readonly XObjectChangeEventArgs Value = new XObjectChangeEventArgs(XObjectChange.Value);

		public XObjectChange ObjectChange => objectChange;

		public XObjectChangeEventArgs(XObjectChange objectChange)
		{
			this.objectChange = objectChange;
		}
	}
	public abstract class XNode : XObject
	{
		private static XNodeDocumentOrderComparer documentOrderComparer;

		private static XNodeEqualityComparer equalityComparer;

		internal XNode next;

		public XNode NextNode
		{
			get
			{
				if (parent != null && this != parent.content)
				{
					return next;
				}
				return null;
			}
		}

		public XNode PreviousNode
		{
			get
			{
				if (parent == null)
				{
					return null;
				}
				XNode xNode = ((XNode)parent.content).next;
				XNode result = null;
				while (xNode != this)
				{
					result = xNode;
					xNode = xNode.next;
				}
				return result;
			}
		}

		public static XNodeDocumentOrderComparer DocumentOrderComparer
		{
			get
			{
				if (documentOrderComparer == null)
				{
					documentOrderComparer = new XNodeDocumentOrderComparer();
				}
				return documentOrderComparer;
			}
		}

		public static XNodeEqualityComparer EqualityComparer
		{
			get
			{
				if (equalityComparer == null)
				{
					equalityComparer = new XNodeEqualityComparer();
				}
				return equalityComparer;
			}
		}

		internal XNode()
		{
		}

		public void AddAfterSelf(object content)
		{
			if (parent == null)
			{
				throw new InvalidOperationException(Res.GetString("InvalidOperation_MissingParent"));
			}
			new Inserter(parent, this).Add(content);
		}

		public void AddAfterSelf(params object[] content)
		{
			AddAfterSelf((object)content);
		}

		public void AddBeforeSelf(object content)
		{
			if (parent == null)
			{
				throw new InvalidOperationException(Res.GetString("InvalidOperation_MissingParent"));
			}
			XNode xNode = (XNode)parent.content;
			while (xNode.next != this)
			{
				xNode = xNode.next;
			}
			if (xNode == parent.content)
			{
				xNode = null;
			}
			new Inserter(parent, xNode).Add(content);
		}

		public void AddBeforeSelf(params object[] content)
		{
			AddBeforeSelf((object)content);
		}

		public IEnumerable<XElement> Ancestors()
		{
			return GetAncestors(null, self: false);
		}

		public IEnumerable<XElement> Ancestors(XName name)
		{
			if (!(name != null))
			{
				return XElement.EmptySequence;
			}
			return GetAncestors(name, self: false);
		}

		public static int CompareDocumentOrder(XNode n1, XNode n2)
		{
			if (n1 == n2)
			{
				return 0;
			}
			if (n1 == null)
			{
				return -1;
			}
			if (n2 == null)
			{
				return 1;
			}
			if (n1.parent != n2.parent)
			{
				int num = 0;
				XNode xNode = n1;
				while (xNode.parent != null)
				{
					xNode = xNode.parent;
					num++;
				}
				XNode xNode2 = n2;
				while (xNode2.parent != null)
				{
					xNode2 = xNode2.parent;
					num--;
				}
				if (xNode != xNode2)
				{
					throw new InvalidOperationException(Res.GetString("InvalidOperation_MissingAncestor"));
				}
				if (num < 0)
				{
					do
					{
						n2 = n2.parent;
						num++;
					}
					while (num != 0);
					if (n1 == n2)
					{
						return -1;
					}
				}
				else if (num > 0)
				{
					do
					{
						n1 = n1.parent;
						num--;
					}
					while (num != 0);
					if (n1 == n2)
					{
						return 1;
					}
				}
				while (n1.parent != n2.parent)
				{
					n1 = n1.parent;
					n2 = n2.parent;
				}
			}
			else if (n1.parent == null)
			{
				throw new InvalidOperationException(Res.GetString("InvalidOperation_MissingAncestor"));
			}
			XNode xNode3 = (XNode)n1.parent.content;
			do
			{
				xNode3 = xNode3.next;
				if (xNode3 == n1)
				{
					return -1;
				}
			}
			while (xNode3 != n2);
			return 1;
		}

		public XmlReader CreateReader()
		{
			return new XNodeReader(this, null);
		}

		public XmlReader CreateReader(ReaderOptions readerOptions)
		{
			return new XNodeReader(this, null, readerOptions);
		}

		public IEnumerable<XNode> NodesAfterSelf()
		{
			XNode i = this;
			while (i.parent != null && i != i.parent.content)
			{
				i = i.next;
				yield return i;
			}
		}

		public IEnumerable<XNode> NodesBeforeSelf()
		{
			if (parent == null)
			{
				yield break;
			}
			XNode i = (XNode)parent.content;
			do
			{
				i = i.next;
				if (i != this)
				{
					yield return i;
					continue;
				}
				break;
			}
			while (parent != null && parent == i.parent);
		}

		public IEnumerable<XElement> ElementsAfterSelf()
		{
			return GetElementsAfterSelf(null);
		}

		public IEnumerable<XElement> ElementsAfterSelf(XName name)
		{
			if (!(name != null))
			{
				return XElement.EmptySequence;
			}
			return GetElementsAfterSelf(name);
		}

		public IEnumerable<XElement> ElementsBeforeSelf()
		{
			return GetElementsBeforeSelf(null);
		}

		public IEnumerable<XElement> ElementsBeforeSelf(XName name)
		{
			if (!(name != null))
			{
				return XElement.EmptySequence;
			}
			return GetElementsBeforeSelf(name);
		}

		public bool IsAfter(XNode node)
		{
			return CompareDocumentOrder(this, node) > 0;
		}

		public bool IsBefore(XNode node)
		{
			return CompareDocumentOrder(this, node) < 0;
		}

		public static XNode ReadFrom(XmlReader reader)
		{
			if (reader == null)
			{
				throw new ArgumentNullException("reader");
			}
			if (reader.ReadState != ReadState.Interactive)
			{
				throw new InvalidOperationException(Res.GetString("InvalidOperation_ExpectedInteractive"));
			}
			switch (reader.NodeType)
			{
			case XmlNodeType.Text:
			case XmlNodeType.Whitespace:
			case XmlNodeType.SignificantWhitespace:
				return new XText(reader);
			case XmlNodeType.CDATA:
				return new XCData(reader);
			case XmlNodeType.Comment:
				return new XComment(reader);
			case XmlNodeType.DocumentType:
				return new XDocumentType(reader);
			case XmlNodeType.Element:
				return new XElement(reader);
			case XmlNodeType.ProcessingInstruction:
				return new XProcessingInstruction(reader);
			default:
				throw new InvalidOperationException(Res.GetString("InvalidOperation_UnexpectedNodeType", reader.NodeType));
			}
		}

		public void Remove()
		{
			if (parent == null)
			{
				throw new InvalidOperationException(Res.GetString("InvalidOperation_MissingParent"));
			}
			parent.RemoveNode(this);
		}

		public void ReplaceWith(object content)
		{
			if (parent == null)
			{
				throw new InvalidOperationException(Res.GetString("InvalidOperation_MissingParent"));
			}
			XContainer xContainer = parent;
			XNode xNode = (XNode)parent.content;
			while (xNode.next != this)
			{
				xNode = xNode.next;
			}
			if (xNode == parent.content)
			{
				xNode = null;
			}
			parent.RemoveNode(this);
			if (xNode != null && xNode.parent != xContainer)
			{
				throw new InvalidOperationException(Res.GetString("InvalidOperation_ExternalCode"));
			}
			new Inserter(xContainer, xNode).Add(content);
		}

		public void ReplaceWith(params object[] content)
		{
			ReplaceWith((object)content);
		}

		public override string ToString()
		{
			return GetXmlString(GetSaveOptionsFromAnnotations());
		}

		public string ToString(SaveOptions options)
		{
			return GetXmlString(options);
		}

		public static bool DeepEquals(XNode n1, XNode n2)
		{
			if (n1 == n2)
			{
				return true;
			}
			if (n1 == null || n2 == null)
			{
				return false;
			}
			return n1.DeepEquals(n2);
		}

		public abstract void WriteTo(XmlWriter writer);

		internal virtual void AppendText(StringBuilder sb)
		{
		}

		internal abstract XNode CloneNode();

		internal abstract bool DeepEquals(XNode node);

		internal IEnumerable<XElement> GetAncestors(XName name, bool self)
		{
			for (XElement e = (self ? this : parent) as XElement; e != null; e = e.parent as XElement)
			{
				if (name == null || e.name == name)
				{
					yield return e;
				}
			}
		}

		private IEnumerable<XElement> GetElementsAfterSelf(XName name)
		{
			XNode i = this;
			while (i.parent != null && i != i.parent.content)
			{
				i = i.next;
				if (i is XElement xElement && (name == null || xElement.name == name))
				{
					yield return xElement;
				}
			}
		}

		private IEnumerable<XElement> GetElementsBeforeSelf(XName name)
		{
			if (parent == null)
			{
				yield break;
			}
			XNode i = (XNode)parent.content;
			do
			{
				i = i.next;
				if (i != this)
				{
					if (i is XElement xElement && (name == null || xElement.name == name))
					{
						yield return xElement;
					}
					continue;
				}
				break;
			}
			while (parent != null && parent == i.parent);
		}

		internal abstract int GetDeepHashCode();

		internal static XmlReaderSettings GetXmlReaderSettings(LoadOptions o)
		{
			XmlReaderSettings xmlReaderSettings = new XmlReaderSettings();
			if ((o & LoadOptions.PreserveWhitespace) == 0)
			{
				xmlReaderSettings.IgnoreWhitespace = true;
			}
			xmlReaderSettings.DtdProcessing = DtdProcessing.Parse;
			xmlReaderSettings.MaxCharactersFromEntities = 10000000L;
			xmlReaderSettings.XmlResolver = null;
			return xmlReaderSettings;
		}

		internal static XmlWriterSettings GetXmlWriterSettings(SaveOptions o)
		{
			XmlWriterSettings xmlWriterSettings = new XmlWriterSettings();
			if ((o & SaveOptions.DisableFormatting) == 0)
			{
				xmlWriterSettings.Indent = true;
			}
			if ((o & SaveOptions.OmitDuplicateNamespaces) != 0)
			{
				xmlWriterSettings.NamespaceHandling |= NamespaceHandling.OmitDuplicates;
			}
			return xmlWriterSettings;
		}

		private string GetXmlString(SaveOptions o)
		{
			using StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture);
			XmlWriterSettings xmlWriterSettings = new XmlWriterSettings();
			xmlWriterSettings.OmitXmlDeclaration = true;
			if ((o & SaveOptions.DisableFormatting) == 0)
			{
				xmlWriterSettings.Indent = true;
			}
			if ((o & SaveOptions.OmitDuplicateNamespaces) != 0)
			{
				xmlWriterSettings.NamespaceHandling |= NamespaceHandling.OmitDuplicates;
			}
			if (this is XText)
			{
				xmlWriterSettings.ConformanceLevel = ConformanceLevel.Fragment;
			}
			using (XmlWriter writer = XmlWriter.Create(stringWriter, xmlWriterSettings))
			{
				if (this is XDocument xDocument)
				{
					xDocument.WriteContentTo(writer);
				}
				else
				{
					WriteTo(writer);
				}
			}
			return stringWriter.ToString();
		}
	}
	public sealed class XNodeDocumentOrderComparer : IComparer, IComparer<XNode>
	{
		public int Compare(XNode x, XNode y)
		{
			return XNode.CompareDocumentOrder(x, y);
		}

		int IComparer.Compare(object x, object y)
		{
			XNode xNode = x as XNode;
			if (xNode == null && x != null)
			{
				throw new ArgumentException(Res.GetString("Argument_MustBeDerivedFrom", typeof(XNode)), "x");
			}
			XNode xNode2 = y as XNode;
			if (xNode2 == null && y != null)
			{
				throw new ArgumentException(Res.GetString("Argument_MustBeDerivedFrom", typeof(XNode)), "y");
			}
			return Compare(xNode, xNode2);
		}
	}
	public sealed class XNodeEqualityComparer : IEqualityComparer, IEqualityComparer<XNode>
	{
		public bool Equals(XNode x, XNode y)
		{
			return XNode.DeepEquals(x, y);
		}

		public int GetHashCode(XNode obj)
		{
			return obj?.GetDeepHashCode() ?? 0;
		}

		bool IEqualityComparer.Equals(object x, object y)
		{
			XNode xNode = x as XNode;
			if (xNode == null && x != null)
			{
				throw new ArgumentException(Res.GetString("Argument_MustBeDerivedFrom", typeof(XNode)), "x");
			}
			XNode xNode2 = y as XNode;
			if (xNode2 == null && y != null)
			{
				throw new ArgumentException(Res.GetString("Argument_MustBeDerivedFrom", typeof(XNode)), "y");
			}
			return Equals(xNode, xNode2);
		}

		int IEqualityComparer.GetHashCode(object obj)
		{
			XNode xNode = obj as XNode;
			if (xNode == null && obj != null)
			{
				throw new ArgumentException(Res.GetString("Argument_MustBeDerivedFrom", typeof(XNode)), "obj");
			}
			return GetHashCode(xNode);
		}
	}
	public class XText : XNode
	{
		internal string text;

		public override XmlNodeType NodeType => XmlNodeType.Text;

		public string Value
		{
			get
			{
				return text;
			}
			set
			{
				if (value == null)
				{
					throw new ArgumentNullException("value");
				}
				bool num = NotifyChanging(this, XObjectChangeEventArgs.Value);
				text = value;
				if (num)
				{
					NotifyChanged(this, XObjectChangeEventArgs.Value);
				}
			}
		}

		public XText(string value)
		{
			if (value == null)
			{
				throw new ArgumentNullException("value");
			}
			text = value;
		}

		public XText(XText other)
		{
			if (other == null)
			{
				throw new ArgumentNullException("other");
			}
			text = other.text;
		}

		internal XText(XmlReader r)
		{
			text = r.Value;
			r.Read();
		}

		public override void WriteTo(XmlWriter writer)
		{
			if (writer == null)
			{
				throw new ArgumentNullException("writer");
			}
			if (parent is XDocument)
			{
				writer.WriteWhitespace(text);
			}
			else
			{
				writer.WriteString(text);
			}
		}

		internal override void AppendText(StringBuilder sb)
		{
			sb.Append(text);
		}

		internal override XNode CloneNode()
		{
			return new XText(this);
		}

		internal override bool DeepEquals(XNode node)
		{
			if (node != null && NodeType == node.NodeType)
			{
				return text == ((XText)node).text;
			}
			return false;
		}

		internal override int GetDeepHashCode()
		{
			return text.GetHashCode();
		}
	}
	public class XCData : XText
	{
		public override XmlNodeType NodeType => XmlNodeType.CDATA;

		public XCData(string value)
			: base(value)
		{
		}

		public XCData(XCData other)
			: base(other)
		{
		}

		internal XCData(XmlReader r)
			: base(r)
		{
		}

		public override void WriteTo(XmlWriter writer)
		{
			if (writer == null)
			{
				throw new ArgumentNullException("writer");
			}
			writer.WriteCData(text);
		}

		internal override XNode CloneNode()
		{
			return new XCData(this);
		}
	}
	public abstract class XContainer : XNode
	{
		internal object content;

		public XNode FirstNode => LastNode?.next;

		public XNode LastNode
		{
			get
			{
				if (content == null)
				{
					return null;
				}
				if (content is XNode result)
				{
					return result;
				}
				if (content is string text)
				{
					if (text.Length == 0)
					{
						return null;
					}
					XText xText = new XText(text);
					xText.parent = this;
					xText.next = xText;
					Interlocked.CompareExchange<object>(ref content, (object)xText, (object)text);
				}
				return (XNode)content;
			}
		}

		internal XContainer()
		{
		}

		internal XContainer(XContainer other)
		{
			if (other == null)
			{
				throw new ArgumentNullException("other");
			}
			if (other.content is string)
			{
				content = other.content;
				return;
			}
			XNode xNode = (XNode)other.content;
			if (xNode != null)
			{
				do
				{
					xNode = xNode.next;
					AppendNodeSkipNotify(xNode.CloneNode());
				}
				while (xNode != other.content);
			}
		}

		public void Add(object content)
		{
			if (SkipNotify())
			{
				AddContentSkipNotify(content);
			}
			else
			{
				if (content == null)
				{
					return;
				}
				if (content is XNode n)
				{
					AddNode(n);
					return;
				}
				if (content is string s)
				{
					AddString(s);
					return;
				}
				if (content is XAttribute a)
				{
					AddAttribute(a);
					return;
				}
				if (content is XStreamingElement other)
				{
					AddNode(new XElement(other));
					return;
				}
				if (content is object[] array)
				{
					object[] array2 = array;
					foreach (object obj in array2)
					{
						Add(obj);
					}
					return;
				}
				if (content is IEnumerable enumerable)
				{
					{
						foreach (object item in enumerable)
						{
							Add(item);
						}
						return;
					}
				}
				AddString(GetStringValue(content));
			}
		}

		public void Add(params object[] content)
		{
			Add((object)content);
		}

		public void AddFirst(object content)
		{
			new Inserter(this, null).Add(content);
		}

		public void AddFirst(params object[] content)
		{
			AddFirst((object)content);
		}

		public XmlWriter CreateWriter()
		{
			XmlWriterSettings xmlWriterSettings = new XmlWriterSettings();
			xmlWriterSettings.ConformanceLevel = ((!(this is XDocument)) ? ConformanceLevel.Fragment : ConformanceLevel.Document);
			return XmlWriter.Create(new XNodeBuilder(this), xmlWriterSettings);
		}

		public IEnumerable<XNode> DescendantNodes()
		{
			return GetDescendantNodes(self: false);
		}

		public IEnumerable<XElement> Descendants()
		{
			return GetDescendants(null, self: false);
		}

		public IEnumerable<XElement> Descendants(XName name)
		{
			if (!(name != null))
			{
				return XElement.EmptySequence;
			}
			return GetDescendants(name, self: false);
		}

		public XElement Element(XName name)
		{
			XNode xNode = content as XNode;
			if (xNode != null)
			{
				do
				{
					xNode = xNode.next;
					if (xNode is XElement xElement && xElement.name == name)
					{
						return xElement;
					}
				}
				while (xNode != content);
			}
			return null;
		}

		public IEnumerable<XElement> Elements()
		{
			return GetElements(null);
		}

		public IEnumerable<XElement> Elements(XName name)
		{
			if (!(name != null))
			{
				return XElement.EmptySequence;
			}
			return GetElements(name);
		}

		public IEnumerable<XNode> Nodes()
		{
			XNode i = LastNode;
			if (i != null)
			{
				do
				{
					i = i.next;
					yield return i;
				}
				while (i.parent == this && i != content);
			}
		}

		public void RemoveNodes()
		{
			if (SkipNotify())
			{
				RemoveNodesSkipNotify();
				return;
			}
			while (content != null)
			{
				if (content is string text)
				{
					if (text.Length > 0)
					{
						ConvertTextToNode();
					}
					else if (this is XElement)
					{
						NotifyChanging(this, XObjectChangeEventArgs.Value);
						if (text != content)
						{
							throw new InvalidOperationException(Res.GetString("InvalidOperation_ExternalCode"));
						}
						content = null;
						NotifyChanged(this, XObjectChangeEventArgs.Value);
					}
					else
					{
						content = null;
					}
				}
				if (content is XNode xNode)
				{
					XNode xNode2 = xNode.next;
					NotifyChanging(xNode2, XObjectChangeEventArgs.Remove);
					if (xNode != content || xNode2 != xNode.next)
					{
						throw new InvalidOperationException(Res.GetString("InvalidOperation_ExternalCode"));
					}
					if (xNode2 != xNode)
					{
						xNode.next = xNode2.next;
					}
					else
					{
						content = null;
					}
					xNode2.parent = null;
					xNode2.next = null;
					NotifyChanged(xNode2, XObjectChangeEventArgs.Remove);
				}
			}
		}

		public void ReplaceNodes(object content)
		{
			content = GetContentSnapshot(content);
			RemoveNodes();
			Add(content);
		}

		public void ReplaceNodes(params object[] content)
		{
			ReplaceNodes((object)content);
		}

		internal virtual void AddAttribute(XAttribute a)
		{
		}

		internal virtual void AddAttributeSkipNotify(XAttribute a)
		{
		}

		internal void AddContentSkipNotify(object content)
		{
			if (content == null)
			{
				return;
			}
			if (content is XNode n)
			{
				AddNodeSkipNotify(n);
				return;
			}
			if (content is string s)
			{
				AddStringSkipNotify(s);
				return;
			}
			if (content is XAttribute a)
			{
				AddAttributeSkipNotify(a);
				return;
			}
			if (content is XStreamingElement other)
			{
				AddNodeSkipNotify(new XElement(other));
				return;
			}
			if (content is object[] array)
			{
				object[] array2 = array;
				foreach (object obj in array2)
				{
					AddContentSkipNotify(obj);
				}
				return;
			}
			if (content is IEnumerable enumerable)
			{
				{
					foreach (object item in enumerable)
					{
						AddContentSkipNotify(item);
					}
					return;
				}
			}
			AddStringSkipNotify(GetStringValue(content));
		}

		internal void AddNode(XNode n)
		{
			ValidateNode(n, this);
			if (n.parent != null)
			{
				n = n.CloneNode();
			}
			else
			{
				XNode xNode = this;
				while (xNode.parent != null)
				{
					xNode = xNode.parent;
				}
				if (n == xNode)
				{
					n = n.CloneNode();
				}
			}
			ConvertTextToNode();
			AppendNode(n);
		}

		internal void AddNodeSkipNotify(XNode n)
		{
			ValidateNode(n, this);
			if (n.parent != null)
			{
				n = n.CloneNode();
			}
			else
			{
				XNode xNode = this;
				while (xNode.parent != null)
				{
					xNode = xNode.parent;
				}
				if (n == xNode)
				{
					n = n.CloneNode();
				}
			}
			ConvertTextToNode();
			AppendNodeSkipNotify(n);
		}

		internal void AddString(string s)
		{
			ValidateString(s);
			if (content == null)
			{
				if (s.Length > 0)
				{
					AppendNode(new XText(s));
				}
				else if (this is XElement)
				{
					NotifyChanging(this, XObjectChangeEventArgs.Value);
					if (content != null)
					{
						throw new InvalidOperationException(Res.GetString("InvalidOperation_ExternalCode"));
					}
					content = s;
					NotifyChanged(this, XObjectChangeEventArgs.Value);
				}
				else
				{
					content = s;
				}
			}
			else if (s.Length > 0)
			{
				ConvertTextToNode();
				if (content is XText xText && !(xText is XCData))
				{
					xText.Value += s;
				}
				else
				{
					AppendNode(new XText(s));
				}
			}
		}

		internal void AddStringSkipNotify(string s)
		{
			ValidateString(s);
			if (content == null)
			{
				content = s;
			}
			else if (s.Length > 0)
			{
				if (content is string)
				{
					content = (string)content + s;
				}
				else if (content is XText xText && !(xText is XCData))
				{
					xText.text += s;
				}
				else
				{
					AppendNodeSkipNotify(new XText(s));
				}
			}
		}

		internal void AppendNode(XNode n)
		{
			bool num = NotifyChanging(n, XObjectChangeEventArgs.Add);
			if (n.parent != null)
			{
				throw new InvalidOperationException(Res.GetString("InvalidOperation_ExternalCode"));
			}
			AppendNodeSkipNotify(n);
			if (num)
			{
				NotifyChanged(n, XObjectChangeEventArgs.Add);
			}
		}

		internal void AppendNodeSkipNotify(XNode n)
		{
			n.parent = this;
			if (content == null || content is string)
			{
				n.next = n;
			}
			else
			{
				XNode xNode = (XNode)content;
				n.next = xNode.next;
				xNode.next = n;
			}
			content = n;
		}

		internal override void AppendText(StringBuilder sb)
		{
			if (content is string value)
			{
				sb.Append(value);
				return;
			}
			XNode xNode = (XNode)content;
			if (xNode != null)
			{
				do
				{
					xNode = xNode.next;
					xNode.AppendText(sb);
				}
				while (xNode != content);
			}
		}

		private string GetTextOnly()
		{
			if (content == null)
			{
				return null;
			}
			string text = content as string;
			if (text == null)
			{
				XNode xNode = (XNode)content;
				do
				{
					xNode = xNode.next;
					if (xNode.NodeType != XmlNodeType.Text)
					{
						return null;
					}
					text += ((XText)xNode).Value;
				}
				while (xNode != content);
			}
			return text;
		}

		private string CollectText(ref XNode n)
		{
			string text = "";
			while (n != null && n.NodeType == XmlNodeType.Text)
			{
				text += ((XText)n).Value;
				n = ((n != content) ? n.next : null);
			}
			return text;
		}

		internal bool ContentsEqual(XContainer e)
		{
			if (content == e.content)
			{
				return true;
			}
			string textOnly = GetTextOnly();
			if (textOnly != null)
			{
				return textOnly == e.GetTextOnly();
			}
			XNode xNode = content as XNode;
			XNode xNode2 = e.content as XNode;
			if (xNode != null && xNode2 != null)
			{
				xNode = xNode.next;
				xNode2 = xNode2.next;
				while (!(CollectText(ref xNode) != e.CollectText(ref xNode2)))
				{
					if (xNode == null && xNode2 == null)
					{
						return true;
					}
					if (xNode == null || xNode2 == null || !xNode.DeepEquals(xNode2))
					{
						break;
					}
					xNode = ((xNode != content) ? xNode.next : null);
					xNode2 = ((xNode2 != e.content) ? xNode2.next : null);
				}
			}
			return false;
		}

		internal int ContentsHashCode()
		{
			string textOnly = GetTextOnly();
			if (textOnly != null)
			{
				return textOnly.GetHashCode();
			}
			int num = 0;
			XNode n = content as XNode;
			if (n != null)
			{
				do
				{
					n = n.next;
					string text = CollectText(ref n);
					if (text.Length > 0)
					{
						num ^= text.GetHashCode();
					}
					if (n == null)
					{
						break;
					}
					num ^= n.GetDeepHashCode();
				}
				while (n != content);
			}
			return num;
		}

		internal void ConvertTextToNode()
		{
			if (content is string text && text.Length > 0)
			{
				XText xText = new XText(text);
				xText.parent = this;
				xText.next = xText;
				content = xText;
			}
		}

		internal static string GetDateTimeString(DateTime value)
		{
			return XmlConvert.ToString(value, XmlDateTimeSerializationMode.RoundtripKind);
		}

		internal IEnumerable<XNode> GetDescendantNodes(bool self)
		{
			if (self)
			{
				yield return this;
			}
			XNode i = this;
			while (true)
			{
				XNode firstNode;
				if (i is XContainer xContainer && (firstNode = xContainer.FirstNode) != null)
				{
					i = firstNode;
				}
				else
				{
					while (i != null && i != this && i == i.parent.content)
					{
						i = i.parent;
					}
					if (i == null || i == this)
					{
						break;
					}
					i = i.next;
				}
				yield return i;
			}
		}

		internal IEnumerable<XElement> GetDescendants(XName name, bool self)
		{
			if (self)
			{
				XElement xElement = (XElement)this;
				if (name == null || xElement.name == name)
				{
					yield return xElement;
				}
			}
			XNode i = this;
			XContainer xContainer = this;
			while (true)
			{
				if (xContainer != null && xContainer.content is XNode)
				{
					i = ((XNode)xContainer.content).next;
				}
				else
				{
					while (i != this && i == i.parent.content)
					{
						i = i.parent;
					}
					if (i == this)
					{
						break;
					}
					i = i.next;
				}
				XElement e = i as XElement;
				if (e != null && (name == null || e.name == name))
				{
					yield return e;
				}
				xContainer = e;
			}
		}

		private IEnumerable<XElement> GetElements(XName name)
		{
			XNode i = content as XNode;
			if (i == null)
			{
				yield break;
			}
			do
			{
				i = i.next;
				if (i is XElement xElement && (name == null || xElement.name == name))
				{
					yield return xElement;
				}
			}
			while (i.parent == this && i != content);
		}

		internal static string GetStringValue(object value)
		{
			string text;
			if (value is string)
			{
				text = (string)value;
			}
			else if (value is double)
			{
				text = XmlConvert.ToString((double)value);
			}
			else if (value is float)
			{
				text = XmlConvert.ToString((float)value);
			}
			else if (value is decimal)
			{
				text = XmlConvert.ToString((decimal)value);
			}
			else if (value is bool)
			{
				text = XmlConvert.ToString((bool)value);
			}
			else if (value is DateTime)
			{
				text = GetDateTimeString((DateTime)value);
			}
			else if (value is DateTimeOffset)
			{
				text = XmlConvert.ToString((DateTimeOffset)value);
			}
			else if (value is TimeSpan)
			{
				text = XmlConvert.ToString((TimeSpan)value);
			}
			else
			{
				if (value is XObject)
				{
					throw new ArgumentException(Res.GetString("Argument_XObjectValue"));
				}
				text = value.ToString();
			}
			if (text == null)
			{
				throw new ArgumentException(Res.GetString("Argument_ConvertToString"));
			}
			return text;
		}

		internal void ReadContentFrom(XmlReader r)
		{
			if (r.ReadState != ReadState.Interactive)
			{
				throw new InvalidOperationException(Res.GetString("InvalidOperation_ExpectedInteractive"));
			}
			XContainer xContainer = this;
			NamespaceCache namespaceCache = default(NamespaceCache);
			NamespaceCache namespaceCache2 = default(NamespaceCache);
			do
			{
				switch (r.NodeType)
				{
				case XmlNodeType.Element:
				{
					XElement xElement = new XElement(namespaceCache.Get(r.NamespaceURI).GetName(r.LocalName));
					if (r.MoveToFirstAttribute())
					{
						do
						{
							xElement.AppendAttributeSkipNotify(new XAttribute(namespaceCache2.Get((r.Prefix.Length == 0) ? string.Empty : r.NamespaceURI).GetName(r.LocalName), r.Value));
						}
						while (r.MoveToNextAttribute());
						r.MoveToElement();
					}
					xContainer.AddNodeSkipNotify(xElement);
					if (!r.IsEmptyElement)
					{
						xContainer = xElement;
					}
					break;
				}
				case XmlNodeType.EndElement:
					if (xContainer.content == null)
					{
						xContainer.content = string.Empty;
					}
					if (xContainer == this)
					{
						return;
					}
					xContainer = xContainer.parent;
					break;
				case XmlNodeType.Text:
				case XmlNodeType.Whitespace:
				case XmlNodeType.SignificantWhitespace:
					xContainer.AddStringSkipNotify(r.Value);
					break;
				case XmlNodeType.CDATA:
					xContainer.AddNodeSkipNotify(new XCData(r.Value));
					break;
				case XmlNodeType.Comment:
					xContainer.AddNodeSkipNotify(new XComment(r.Value));
					break;
				case XmlNodeType.ProcessingInstruction:
					xContainer.AddNodeSkipNotify(new XProcessingInstruction(r.Name, r.Value));
					break;
				case XmlNodeType.DocumentType:
					xContainer.AddNodeSkipNotify(new XDocumentType(r.LocalName, r.GetAttribute("PUBLIC"), r.GetAttribute("SYSTEM"), r.Value, r.DtdInfo));
					break;
				case XmlNodeType.EntityReference:
					if (!r.CanResolveEntity)
					{
						throw new InvalidOperationException(Res.GetString("InvalidOperation_UnresolvedEntityReference"));
					}
					r.ResolveEntity();
					break;
				default:
					throw new InvalidOperationException(Res.GetString("InvalidOperation_UnexpectedNodeType", r.NodeType));
				case XmlNodeType.EndEntity:
					break;
				}
			}
			while (r.Read());
		}

		internal void ReadContentFrom(XmlReader r, LoadOptions o)
		{
			if ((o & (LoadOptions.SetBaseUri | LoadOptions.SetLineInfo)) == 0)
			{
				ReadContentFrom(r);
				return;
			}
			if (r.ReadState != ReadState.Interactive)
			{
				throw new InvalidOperationException(Res.GetString("InvalidOperation_ExpectedInteractive"));
			}
			XContainer xContainer = this;
			XNode xNode = null;
			NamespaceCache namespaceCache = default(NamespaceCache);
			NamespaceCache namespaceCache2 = default(NamespaceCache);
			string text = (((o & LoadOptions.SetBaseUri) != 0) ? r.BaseURI : null);
			IXmlLineInfo xmlLineInfo = (((o & LoadOptions.SetLineInfo) != 0) ? (r as IXmlLineInfo) : null);
			do
			{
				string baseURI = r.BaseURI;
				switch (r.NodeType)
				{
				case XmlNodeType.Element:
				{
					XElement xElement2 = new XElement(namespaceCache.Get(r.NamespaceURI).GetName(r.LocalName));
					if (text != null && text != baseURI)
					{
						xElement2.SetBaseUri(baseURI);
					}
					if (xmlLineInfo != null && xmlLineInfo.HasLineInfo())
					{
						xElement2.SetLineInfo(xmlLineInfo.LineNumber, xmlLineInfo.LinePosition);
					}
					if (r.MoveToFirstAttribute())
					{
						do
						{
							XAttribute xAttribute = new XAttribute(namespaceCache2.Get((r.Prefix.Length == 0) ? string.Empty : r.NamespaceURI).GetName(r.LocalName), r.Value);
							if (xmlLineInfo != null && xmlLineInfo.HasLineInfo())
							{
								xAttribute.SetLineInfo(xmlLineInfo.LineNumber, xmlLineInfo.LinePosition);
							}
							xElement2.AppendAttributeSkipNotify(xAttribute);
						}
						while (r.MoveToNextAttribute());
						r.MoveToElement();
					}
					xContainer.AddNodeSkipNotify(xElement2);
					if (!r.IsEmptyElement)
					{
						xContainer = xElement2;
						if (text != null)
						{
							text = baseURI;
						}
					}
					break;
				}
				case XmlNodeType.EndElement:
					if (xContainer.content == null)
					{
						xContainer.content = string.Empty;
					}
					if (xContainer is XElement xElement && xmlLineInfo != null && xmlLineInfo.HasLineInfo())
					{
						xElement.SetEndElementLineInfo(xmlLineInfo.LineNumber, xmlLineInfo.LinePosition);
					}
					if (xContainer == this)
					{
						return;
					}
					if (text != null && xContainer.HasBaseUri)
					{
						text = xContainer.parent.BaseUri;
					}
					xContainer = xContainer.parent;
					break;
				case XmlNodeType.Text:
				case XmlNodeType.Whitespace:
				case XmlNodeType.SignificantWhitespace:
					if ((text != null && text != baseURI) || (xmlLineInfo != null && xmlLineInfo.HasLineInfo()))
					{
						xNode = new XText(r.Value);
					}
					else
					{
						xContainer.AddStringSkipNotify(r.Value);
					}
					break;
				case XmlNodeType.CDATA:
					xNode = new XCData(r.Value);
					break;
				case XmlNodeType.Comment:
					xNode = new XComment(r.Value);
					break;
				case XmlNodeType.ProcessingInstruction:
					xNode = new XProcessingInstruction(r.Name, r.Value);
					break;
				case XmlNodeType.DocumentType:
					xNode = new XDocumentType(r.LocalName, r.GetAttribute("PUBLIC"), r.GetAttribute("SYSTEM"), r.Value, r.DtdInfo);
					break;
				case XmlNodeType.EntityReference:
					if (!r.CanResolveEntity)
					{
						throw new InvalidOperationException(Res.GetString("InvalidOperation_UnresolvedEntityReference"));
					}
					r.ResolveEntity();
					break;
				default:
					throw new InvalidOperationException(Res.GetString("InvalidOperation_UnexpectedNodeType", r.NodeType));
				case XmlNodeType.EndEntity:
					break;
				}
				if (xNode != null)
				{
					if (text != null && text != baseURI)
					{
						xNode.SetBaseUri(baseURI);
					}
					if (xmlLineInfo != null && xmlLineInfo.HasLineInfo())
					{
						xNode.SetLineInfo(xmlLineInfo.LineNumber, xmlLineInfo.LinePosition);
					}
					xContainer.AddNodeSkipNotify(xNode);
					xNode = null;
				}
			}
			while (r.Read());
		}

		internal void RemoveNode(XNode n)
		{
			bool flag = NotifyChanging(n, XObjectChangeEventArgs.Remove);
			if (n.parent != this)
			{
				throw new InvalidOperationException(Res.GetString("InvalidOperation_ExternalCode"));
			}
			XNode xNode = (XNode)content;
			while (xNode.next != n)
			{
				xNode = xNode.next;
			}
			if (xNode == n)
			{
				content = null;
			}
			else
			{
				if (content == n)
				{
					content = xNode;
				}
				xNode.next = n.next;
			}
			n.parent = null;
			n.next = null;
			if (flag)
			{
				NotifyChanged(n, XObjectChangeEventArgs.Remove);
			}
		}

		private void RemoveNodesSkipNotify()
		{
			XNode xNode = content as XNode;
			if (xNode != null)
			{
				do
				{
					XNode xNode2 = xNode.next;
					xNode.parent = null;
					xNode.next = null;
					xNode = xNode2;
				}
				while (xNode != content);
			}
			content = null;
		}

		internal virtual void ValidateNode(XNode node, XNode previous)
		{
		}

		internal virtual void ValidateString(string s)
		{
		}

		internal void WriteContentTo(XmlWriter writer)
		{
			if (content == null)
			{
				return;
			}
			if (content is string)
			{
				if (this is XDocument)
				{
					writer.WriteWhitespace((string)content);
				}
				else
				{
					writer.WriteString((string)content);
				}
				return;
			}
			XNode xNode = (XNode)content;
			do
			{
				xNode = xNode.next;
				xNode.WriteTo(writer);
			}
			while (xNode != content);
		}

		private static void AddContentToList(List<object> list, object content)
		{
			IEnumerable enumerable = ((content is string) ? null : (content as IEnumerable));
			if (enumerable == null)
			{
				list.Add(content);
				return;
			}
			foreach (object item in enumerable)
			{
				if (item != null)
				{
					AddContentToList(list, item);
				}
			}
		}

		internal static object GetContentSnapshot(object content)
		{
			if (content is string || !(content is IEnumerable))
			{
				return content;
			}
			List<object> list = new List<object>();
			AddContentToList(list, content);
			return list;
		}
	}
	internal struct Inserter
	{
		private XContainer parent;

		private XNode previous;

		private string text;

		public Inserter(XContainer parent, XNode anchor)
		{
			this.parent = parent;
			previous = anchor;
			text = null;
		}

		public void Add(object content)
		{
			AddContent(content);
			if (text == null)
			{
				return;
			}
			if (parent.content == null)
			{
				if (parent.SkipNotify())
				{
					parent.content = text;
				}
				else if (text.Length > 0)
				{
					InsertNode(new XText(text));
				}
				else if (parent is XElement)
				{
					parent.NotifyChanging(parent, XObjectChangeEventArgs.Value);
					if (parent.content != null)
					{
						throw new InvalidOperationException(Res.GetString("InvalidOperation_ExternalCode"));
					}
					parent.content = text;
					parent.NotifyChanged(parent, XObjectChangeEventArgs.Value);
				}
				else
				{
					parent.content = text;
				}
			}
			else if (text.Length > 0)
			{
				if (previous is XText && !(previous is XCData))
				{
					((XText)previous).Value += text;
					return;
				}
				parent.ConvertTextToNode();
				InsertNode(new XText(text));
			}
		}

		private void AddContent(object content)
		{
			if (content == null)
			{
				return;
			}
			if (content is XNode n)
			{
				AddNode(n);
				return;
			}
			if (content is string s)
			{
				AddString(s);
				return;
			}
			if (content is XStreamingElement other)
			{
				AddNode(new XElement(other));
				return;
			}
			if (content is object[] array)
			{
				object[] array2 = array;
				foreach (object content2 in array2)
				{
					AddContent(content2);
				}
				return;
			}
			if (content is IEnumerable enumerable)
			{
				{
					foreach (object item in enumerable)
					{
						AddContent(item);
					}
					return;
				}
			}
			if (content is XAttribute)
			{
				throw new ArgumentException(Res.GetString("Argument_AddAttribute"));
			}
			AddString(XContainer.GetStringValue(content));
		}

		private void AddNode(XNode n)
		{
			parent.ValidateNode(n, previous);
			if (n.parent != null)
			{
				n = n.CloneNode();
			}
			else
			{
				XNode xNode = parent;
				while (xNode.parent != null)
				{
					xNode = xNode.parent;
				}
				if (n == xNode)
				{
					n = n.CloneNode();
				}
			}
			parent.ConvertTextToNode();
			if (text != null)
			{
				if (text.Length > 0)
				{
					if (previous is XText && !(previous is XCData))
					{
						((XText)previous).Value += text;
					}
					else
					{
						InsertNode(new XText(text));
					}
				}
				text = null;
			}
			InsertNode(n);
		}

		private void AddString(string s)
		{
			parent.ValidateString(s);
			text += s;
		}

		private void InsertNode(XNode n)
		{
			bool num = parent.NotifyChanging(n, XObjectChangeEventArgs.Add);
			if (n.parent != null)
			{
				throw new InvalidOperationException(Res.GetString("InvalidOperation_ExternalCode"));
			}
			n.parent = parent;
			if (parent.content == null || parent.content is string)
			{
				n.next = n;
				parent.content = n;
			}
			else if (previous == null)
			{
				XNode xNode = (XNode)parent.content;
				n.next = xNode.next;
				xNode.next = n;
			}
			else
			{
				n.next = previous.next;
				previous.next = n;
				if (parent.content == previous)
				{
					parent.content = n;
				}
			}
			previous = n;
			if (num)
			{
				parent.NotifyChanged(n, XObjectChangeEventArgs.Add);
			}
		}
	}
	internal struct NamespaceCache
	{
		private XNamespace ns;

		private string namespaceName;

		public XNamespace Get(string namespaceName)
		{
			if ((object)namespaceName == this.namespaceName)
			{
				return ns;
			}
			this.namespaceName = namespaceName;
			ns = XNamespace.Get(namespaceName);
			return ns;
		}
	}
	[XmlSchemaProvider(null, IsAny = true)]
	[TypeDescriptionProvider(typeof(MS.Internal.Xml.Linq.ComponentModel.XTypeDescriptionProvider<XElement>))]
	public class XElement : XContainer, IXmlSerializable
	{
		private static IEnumerable<XElement> emptySequence;

		internal XName name;

		internal XAttribute lastAttr;

		public static IEnumerable<XElement> EmptySequence
		{
			get
			{
				if (emptySequence == null)
				{
					emptySequence = new XElement[0];
				}
				return emptySequence;
			}
		}

		public XAttribute FirstAttribute
		{
			get
			{
				if (lastAttr == null)
				{
					return null;
				}
				return lastAttr.next;
			}
		}

		public bool HasAttributes => lastAttr != null;

		public bool HasElements
		{
			get
			{
				XNode xNode = content as XNode;
				if (xNode != null)
				{
					do
					{
						if (xNode is XElement)
						{
							return true;
						}
						xNode = xNode.next;
					}
					while (xNode != content);
				}
				return false;
			}
		}

		public bool IsEmpty => content == null;

		public XAttribute LastAttribute

Room Architect Tool_Data/Managed/System.Xml.XPath.XDocument.dll

Decompiled 3 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Xml.Linq;
using System.Xml.XPath;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("System.Xml.XPath.XDocument")]
[assembly: AssemblyDescription("System.Xml.XPath.XDocument")]
[assembly: AssemblyDefaultAlias("System.Xml.XPath.XDocument")]
[assembly: AssemblyCompany("Mono development team")]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright("(c) Various Mono authors")]
[assembly: AssemblyInformationalVersion("4.0.0.0")]
[assembly: AssemblyFileVersion("4.0.0.0")]
[assembly: AssemblyVersion("4.1.1.0")]
[assembly: TypeForwardedTo(typeof(Extensions))]
namespace System.Xml.XPath;

public static class XDocumentExtensions
{
	private class XDocumentNavigable : IXPathNavigable
	{
		private XNode _node;

		public XDocumentNavigable(XNode n)
		{
			_node = n;
		}

		public XPathNavigator CreateNavigator()
		{
			return Extensions.CreateNavigator(_node);
		}
	}

	public static IXPathNavigable ToXPathNavigable(this XNode node)
	{
		return new XDocumentNavigable(node);
	}
}

Room Architect Tool_Data/Managed/Unity.Analytics.DataPrivacy.dll

Decompiled 3 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Text;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.Analytics.DataPrivacy.Tests")]
[assembly: InternalsVisibleTo("Unity.Analytics.DataPrivacy.WebRequest.Tests")]
[assembly: AssemblyVersion("0.0.0.0")]
namespace UnityEngine.Analytics;

public class DataPrivacy
{
	[Serializable]
	internal struct UserPostData
	{
		public string appid;

		public string userid;

		public long sessionid;

		public string platform;

		public uint platformid;

		public string sdk_ver;

		public bool debug_device;

		public string deviceid;

		public string plugin_ver;
	}

	[Serializable]
	internal struct TokenData
	{
		public string url;

		public string token;
	}

	private const string kVersion = "3.0.0";

	private const string kVersionString = "DataPrivacyPackage/3.0.0";

	internal const string kBaseUrl = "https://data-optout-service.uca.cloud.unity3d.com";

	private const string kTokenUrl = "https://data-optout-service.uca.cloud.unity3d.com/token";

	internal static UserPostData GetUserData()
	{
		//IL_002e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Unknown result type (might be due to invalid IL or missing references)
		//IL_0048: Unknown result type (might be due to invalid IL or missing references)
		//IL_0052: Expected I4, but got Unknown
		UserPostData result = default(UserPostData);
		result.appid = Application.cloudProjectId;
		result.userid = AnalyticsSessionInfo.userId;
		result.sessionid = AnalyticsSessionInfo.sessionId;
		RuntimePlatform platform = Application.platform;
		result.platform = ((object)(RuntimePlatform)(ref platform)).ToString();
		result.platformid = (uint)(int)Application.platform;
		result.sdk_ver = Application.unityVersion;
		result.debug_device = Debug.isDebugBuild;
		result.deviceid = SystemInfo.deviceUniqueIdentifier;
		result.plugin_ver = "DataPrivacyPackage/3.0.0";
		return result;
	}

	private static string GetUserAgent()
	{
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_002b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: Expected I4, but got Unknown
		object[] obj = new object[5]
		{
			Application.unityVersion,
			null,
			null,
			null,
			null
		};
		RuntimePlatform platform = Application.platform;
		obj[1] = ((object)(RuntimePlatform)(ref platform)).ToString();
		obj[2] = (uint)(int)Application.platform;
		obj[3] = (Debug.isDebugBuild ? "-dev" : "");
		obj[4] = "DataPrivacyPackage/3.0.0";
		return string.Format("UnityPlayer/{0} ({1}/{2}{3} {4})", obj);
	}

	private static string getErrorString(UnityWebRequest www)
	{
		string text = www.downloadHandler.text;
		string text2 = www.error;
		if (string.IsNullOrEmpty(text2))
		{
			text2 = "Empty response";
		}
		if (!string.IsNullOrEmpty(text))
		{
			text2 = text2 + ": " + text;
		}
		return text2;
	}

	public static void FetchPrivacyUrl(Action<string> success, Action<string> failure = null)
	{
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: Expected O, but got Unknown
		string s = JsonUtility.ToJson((object)GetUserData());
		UploadHandlerRaw val = new UploadHandlerRaw(Encoding.UTF8.GetBytes(s));
		((UploadHandler)val).contentType = "application/json";
		UnityWebRequest www = UnityWebRequest.Post("https://data-optout-service.uca.cloud.unity3d.com/token", "");
		www.uploadHandler = (UploadHandler)(object)val;
		www.SetRequestHeader("User-Agent", GetUserAgent());
		((AsyncOperation)www.SendWebRequest()).completed += delegate
		{
			string text = www.downloadHandler.text;
			if (!string.IsNullOrEmpty(www.error) || string.IsNullOrEmpty(text))
			{
				string errorString = getErrorString(www);
				if (failure != null)
				{
					failure(errorString);
				}
			}
			else
			{
				TokenData tokenData = default(TokenData);
				tokenData.url = "";
				try
				{
					tokenData = JsonUtility.FromJson<TokenData>(text);
				}
				catch (Exception ex)
				{
					if (failure != null)
					{
						failure(ex.ToString());
					}
				}
				success(tokenData.url);
			}
		};
	}
}
public class DataPrivacyButton : Button
{
	private bool urlOpened;

	private DataPrivacyButton()
	{
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_001d: Expected O, but got Unknown
		((UnityEvent)((Button)this).onClick).AddListener(new UnityAction(OpenDataPrivacyUrl));
	}

	private void OnFailure(string reason)
	{
		((Selectable)this).interactable = true;
		Debug.LogWarning((object)$"Failed to get data privacy url: {reason}");
	}

	private void OpenUrl(string url)
	{
		((Selectable)this).interactable = true;
		urlOpened = true;
		Application.OpenURL(url);
	}

	private void OpenDataPrivacyUrl()
	{
		((Selectable)this).interactable = false;
		DataPrivacy.FetchPrivacyUrl(OpenUrl, OnFailure);
	}

	private void OnApplicationFocus(bool hasFocus)
	{
		if (hasFocus && urlOpened)
		{
			urlOpened = false;
			RemoteSettings.ForceUpdate();
		}
	}
}

Room Architect Tool_Data/Managed/Unity.TextMeshPro.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Text;
using System.Text.RegularExpressions;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.Events;
using UnityEngine.Rendering;
using UnityEngine.Serialization;
using UnityEngine.TextCore;
using UnityEngine.TextCore.LowLevel;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.TextCore")]
[assembly: InternalsVisibleTo("Unity.FontEngine.Tests")]
[assembly: AssemblyVersion("0.0.0.0")]
namespace TMPro
{
	public class FastAction
	{
		private LinkedList<Action> delegates = new LinkedList<Action>();

		private Dictionary<Action, LinkedListNode<Action>> lookup = new Dictionary<Action, LinkedListNode<Action>>();

		public void Add(Action rhs)
		{
			if (!lookup.ContainsKey(rhs))
			{
				lookup[rhs] = delegates.AddLast(rhs);
			}
		}

		public void Remove(Action rhs)
		{
			if (lookup.TryGetValue(rhs, out var value))
			{
				lookup.Remove(rhs);
				delegates.Remove(value);
			}
		}

		public void Call()
		{
			for (LinkedListNode<Action> linkedListNode = delegates.First; linkedListNode != null; linkedListNode = linkedListNode.Next)
			{
				linkedListNode.Value();
			}
		}
	}
	public class FastAction<A>
	{
		private LinkedList<Action<A>> delegates = new LinkedList<Action<A>>();

		private Dictionary<Action<A>, LinkedListNode<Action<A>>> lookup = new Dictionary<Action<A>, LinkedListNode<Action<A>>>();

		public void Add(Action<A> rhs)
		{
			if (!lookup.ContainsKey(rhs))
			{
				lookup[rhs] = delegates.AddLast(rhs);
			}
		}

		public void Remove(Action<A> rhs)
		{
			if (lookup.TryGetValue(rhs, out var value))
			{
				lookup.Remove(rhs);
				delegates.Remove(value);
			}
		}

		public void Call(A a)
		{
			for (LinkedListNode<Action<A>> linkedListNode = delegates.First; linkedListNode != null; linkedListNode = linkedListNode.Next)
			{
				linkedListNode.Value(a);
			}
		}
	}
	public class FastAction<A, B>
	{
		private LinkedList<Action<A, B>> delegates = new LinkedList<Action<A, B>>();

		private Dictionary<Action<A, B>, LinkedListNode<Action<A, B>>> lookup = new Dictionary<Action<A, B>, LinkedListNode<Action<A, B>>>();

		public void Add(Action<A, B> rhs)
		{
			if (!lookup.ContainsKey(rhs))
			{
				lookup[rhs] = delegates.AddLast(rhs);
			}
		}

		public void Remove(Action<A, B> rhs)
		{
			if (lookup.TryGetValue(rhs, out var value))
			{
				lookup.Remove(rhs);
				delegates.Remove(value);
			}
		}

		public void Call(A a, B b)
		{
			for (LinkedListNode<Action<A, B>> linkedListNode = delegates.First; linkedListNode != null; linkedListNode = linkedListNode.Next)
			{
				linkedListNode.Value(a, b);
			}
		}
	}
	public class FastAction<A, B, C>
	{
		private LinkedList<Action<A, B, C>> delegates = new LinkedList<Action<A, B, C>>();

		private Dictionary<Action<A, B, C>, LinkedListNode<Action<A, B, C>>> lookup = new Dictionary<Action<A, B, C>, LinkedListNode<Action<A, B, C>>>();

		public void Add(Action<A, B, C> rhs)
		{
			if (!lookup.ContainsKey(rhs))
			{
				lookup[rhs] = delegates.AddLast(rhs);
			}
		}

		public void Remove(Action<A, B, C> rhs)
		{
			if (lookup.TryGetValue(rhs, out var value))
			{
				lookup.Remove(rhs);
				delegates.Remove(value);
			}
		}

		public void Call(A a, B b, C c)
		{
			for (LinkedListNode<Action<A, B, C>> linkedListNode = delegates.First; linkedListNode != null; linkedListNode = linkedListNode.Next)
			{
				linkedListNode.Value(a, b, c);
			}
		}
	}
	public class MaterialReferenceManager
	{
		private static MaterialReferenceManager s_Instance;

		private Dictionary<int, Material> m_FontMaterialReferenceLookup = new Dictionary<int, Material>();

		private Dictionary<int, TMP_FontAsset> m_FontAssetReferenceLookup = new Dictionary<int, TMP_FontAsset>();

		private Dictionary<int, TMP_SpriteAsset> m_SpriteAssetReferenceLookup = new Dictionary<int, TMP_SpriteAsset>();

		private Dictionary<int, TMP_ColorGradient> m_ColorGradientReferenceLookup = new Dictionary<int, TMP_ColorGradient>();

		public static MaterialReferenceManager instance
		{
			get
			{
				if (s_Instance == null)
				{
					s_Instance = new MaterialReferenceManager();
				}
				return s_Instance;
			}
		}

		public static void AddFontAsset(TMP_FontAsset fontAsset)
		{
			instance.AddFontAssetInternal(fontAsset);
		}

		private void AddFontAssetInternal(TMP_FontAsset fontAsset)
		{
			if (!m_FontAssetReferenceLookup.ContainsKey(fontAsset.hashCode))
			{
				m_FontAssetReferenceLookup.Add(fontAsset.hashCode, fontAsset);
				m_FontMaterialReferenceLookup.Add(fontAsset.materialHashCode, fontAsset.material);
			}
		}

		public static void AddSpriteAsset(TMP_SpriteAsset spriteAsset)
		{
			instance.AddSpriteAssetInternal(spriteAsset);
		}

		private void AddSpriteAssetInternal(TMP_SpriteAsset spriteAsset)
		{
			if (!m_SpriteAssetReferenceLookup.ContainsKey(spriteAsset.hashCode))
			{
				m_SpriteAssetReferenceLookup.Add(spriteAsset.hashCode, spriteAsset);
				m_FontMaterialReferenceLookup.Add(spriteAsset.hashCode, spriteAsset.material);
			}
		}

		public static void AddSpriteAsset(int hashCode, TMP_SpriteAsset spriteAsset)
		{
			instance.AddSpriteAssetInternal(hashCode, spriteAsset);
		}

		private void AddSpriteAssetInternal(int hashCode, TMP_SpriteAsset spriteAsset)
		{
			if (!m_SpriteAssetReferenceLookup.ContainsKey(hashCode))
			{
				m_SpriteAssetReferenceLookup.Add(hashCode, spriteAsset);
				m_FontMaterialReferenceLookup.Add(hashCode, spriteAsset.material);
				if (spriteAsset.hashCode == 0)
				{
					spriteAsset.hashCode = hashCode;
				}
			}
		}

		public static void AddFontMaterial(int hashCode, Material material)
		{
			instance.AddFontMaterialInternal(hashCode, material);
		}

		private void AddFontMaterialInternal(int hashCode, Material material)
		{
			m_FontMaterialReferenceLookup.Add(hashCode, material);
		}

		public static void AddColorGradientPreset(int hashCode, TMP_ColorGradient spriteAsset)
		{
			instance.AddColorGradientPreset_Internal(hashCode, spriteAsset);
		}

		private void AddColorGradientPreset_Internal(int hashCode, TMP_ColorGradient spriteAsset)
		{
			if (!m_ColorGradientReferenceLookup.ContainsKey(hashCode))
			{
				m_ColorGradientReferenceLookup.Add(hashCode, spriteAsset);
			}
		}

		public bool Contains(TMP_FontAsset font)
		{
			if (m_FontAssetReferenceLookup.ContainsKey(font.hashCode))
			{
				return true;
			}
			return false;
		}

		public bool Contains(TMP_SpriteAsset sprite)
		{
			if (m_FontAssetReferenceLookup.ContainsKey(sprite.hashCode))
			{
				return true;
			}
			return false;
		}

		public static bool TryGetFontAsset(int hashCode, out TMP_FontAsset fontAsset)
		{
			return instance.TryGetFontAssetInternal(hashCode, out fontAsset);
		}

		private bool TryGetFontAssetInternal(int hashCode, out TMP_FontAsset fontAsset)
		{
			fontAsset = null;
			if (m_FontAssetReferenceLookup.TryGetValue(hashCode, out fontAsset))
			{
				return true;
			}
			return false;
		}

		public static bool TryGetSpriteAsset(int hashCode, out TMP_SpriteAsset spriteAsset)
		{
			return instance.TryGetSpriteAssetInternal(hashCode, out spriteAsset);
		}

		private bool TryGetSpriteAssetInternal(int hashCode, out TMP_SpriteAsset spriteAsset)
		{
			spriteAsset = null;
			if (m_SpriteAssetReferenceLookup.TryGetValue(hashCode, out spriteAsset))
			{
				return true;
			}
			return false;
		}

		public static bool TryGetColorGradientPreset(int hashCode, out TMP_ColorGradient gradientPreset)
		{
			return instance.TryGetColorGradientPresetInternal(hashCode, out gradientPreset);
		}

		private bool TryGetColorGradientPresetInternal(int hashCode, out TMP_ColorGradient gradientPreset)
		{
			gradientPreset = null;
			if (m_ColorGradientReferenceLookup.TryGetValue(hashCode, out gradientPreset))
			{
				return true;
			}
			return false;
		}

		public static bool TryGetMaterial(int hashCode, out Material material)
		{
			return instance.TryGetMaterialInternal(hashCode, out material);
		}

		private bool TryGetMaterialInternal(int hashCode, out Material material)
		{
			material = null;
			if (m_FontMaterialReferenceLookup.TryGetValue(hashCode, out material))
			{
				return true;
			}
			return false;
		}
	}
	public struct MaterialReference
	{
		public int index;

		public TMP_FontAsset fontAsset;

		public TMP_SpriteAsset spriteAsset;

		public Material material;

		public bool isDefaultMaterial;

		public bool isFallbackMaterial;

		public Material fallbackMaterial;

		public float padding;

		public int referenceCount;

		public MaterialReference(int index, TMP_FontAsset fontAsset, TMP_SpriteAsset spriteAsset, Material material, float padding)
		{
			this.index = index;
			this.fontAsset = fontAsset;
			this.spriteAsset = spriteAsset;
			this.material = material;
			isDefaultMaterial = ((((Object)material).GetInstanceID() == ((Object)fontAsset.material).GetInstanceID()) ? true : false);
			isFallbackMaterial = false;
			fallbackMaterial = null;
			this.padding = padding;
			referenceCount = 0;
		}

		public static bool Contains(MaterialReference[] materialReferences, TMP_FontAsset fontAsset)
		{
			int instanceID = ((Object)fontAsset).GetInstanceID();
			for (int i = 0; i < materialReferences.Length && (Object)(object)materialReferences[i].fontAsset != (Object)null; i++)
			{
				if (((Object)materialReferences[i].fontAsset).GetInstanceID() == instanceID)
				{
					return true;
				}
			}
			return false;
		}

		public static int AddMaterialReference(Material material, TMP_FontAsset fontAsset, MaterialReference[] materialReferences, Dictionary<int, int> materialReferenceIndexLookup)
		{
			int instanceID = ((Object)material).GetInstanceID();
			if (materialReferenceIndexLookup.TryGetValue(instanceID, out var value))
			{
				return value;
			}
			value = (materialReferenceIndexLookup[instanceID] = materialReferenceIndexLookup.Count);
			materialReferences[value].index = value;
			materialReferences[value].fontAsset = fontAsset;
			materialReferences[value].spriteAsset = null;
			materialReferences[value].material = material;
			materialReferences[value].isDefaultMaterial = ((instanceID == ((Object)fontAsset.material).GetInstanceID()) ? true : false);
			materialReferences[value].referenceCount = 0;
			return value;
		}

		public static int AddMaterialReference(Material material, TMP_SpriteAsset spriteAsset, MaterialReference[] materialReferences, Dictionary<int, int> materialReferenceIndexLookup)
		{
			int instanceID = ((Object)material).GetInstanceID();
			if (materialReferenceIndexLookup.TryGetValue(instanceID, out var value))
			{
				return value;
			}
			value = (materialReferenceIndexLookup[instanceID] = materialReferenceIndexLookup.Count);
			materialReferences[value].index = value;
			materialReferences[value].fontAsset = materialReferences[0].fontAsset;
			materialReferences[value].spriteAsset = spriteAsset;
			materialReferences[value].material = material;
			materialReferences[value].isDefaultMaterial = true;
			materialReferences[value].referenceCount = 0;
			return value;
		}
	}
	public enum TextContainerAnchors
	{
		TopLeft,
		Top,
		TopRight,
		Left,
		Middle,
		Right,
		BottomLeft,
		Bottom,
		BottomRight,
		Custom
	}
	[RequireComponent(typeof(RectTransform))]
	[AddComponentMenu("Layout/Text Container")]
	public class TextContainer : UIBehaviour
	{
		private bool m_hasChanged;

		[SerializeField]
		private Vector2 m_pivot;

		[SerializeField]
		private TextContainerAnchors m_anchorPosition = TextContainerAnchors.Middle;

		[SerializeField]
		private Rect m_rect;

		private bool m_isDefaultWidth;

		private bool m_isDefaultHeight;

		private bool m_isAutoFitting;

		private Vector3[] m_corners = (Vector3[])(object)new Vector3[4];

		private Vector3[] m_worldCorners = (Vector3[])(object)new Vector3[4];

		[SerializeField]
		private Vector4 m_margins;

		private RectTransform m_rectTransform;

		private static Vector2 k_defaultSize = new Vector2(100f, 100f);

		private TextMeshPro m_textMeshPro;

		public bool hasChanged
		{
			get
			{
				return m_hasChanged;
			}
			set
			{
				m_hasChanged = value;
			}
		}

		public Vector2 pivot
		{
			get
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				return m_pivot;
			}
			set
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0010: 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)
				if (m_pivot != value)
				{
					m_pivot = value;
					m_anchorPosition = GetAnchorPosition(m_pivot);
					m_hasChanged = true;
					OnContainerChanged();
				}
			}
		}

		public TextContainerAnchors anchorPosition
		{
			get
			{
				return m_anchorPosition;
			}
			set
			{
				//IL_0018: Unknown result type (might be due to invalid IL or missing references)
				//IL_001d: Unknown result type (might be due to invalid IL or missing references)
				if (m_anchorPosition != value)
				{
					m_anchorPosition = value;
					m_pivot = GetPivot(m_anchorPosition);
					m_hasChanged = true;
					OnContainerChanged();
				}
			}
		}

		public Rect rect
		{
			get
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				return m_rect;
			}
			set
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0010: Unknown result type (might be due to invalid IL or missing references)
				if (m_rect != value)
				{
					m_rect = value;
					m_hasChanged = true;
					OnContainerChanged();
				}
			}
		}

		public Vector2 size
		{
			get
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				return new Vector2(((Rect)(ref m_rect)).width, ((Rect)(ref m_rect)).height);
			}
			set
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				//IL_001b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0024: Unknown result type (might be due to invalid IL or missing references)
				if (new Vector2(((Rect)(ref m_rect)).width, ((Rect)(ref m_rect)).height) != value)
				{
					SetRect(value);
					m_hasChanged = true;
					m_isDefaultWidth = false;
					m_isDefaultHeight = false;
					OnContainerChanged();
				}
			}
		}

		public float width
		{
			get
			{
				return ((Rect)(ref m_rect)).width;
			}
			set
			{
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				SetRect(new Vector2(value, ((Rect)(ref m_rect)).height));
				m_hasChanged = true;
				m_isDefaultWidth = false;
				OnContainerChanged();
			}
		}

		public float height
		{
			get
			{
				return ((Rect)(ref m_rect)).height;
			}
			set
			{
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				SetRect(new Vector2(((Rect)(ref m_rect)).width, value));
				m_hasChanged = true;
				m_isDefaultHeight = false;
				OnContainerChanged();
			}
		}

		public bool isDefaultWidth => m_isDefaultWidth;

		public bool isDefaultHeight => m_isDefaultHeight;

		public bool isAutoFitting
		{
			get
			{
				return m_isAutoFitting;
			}
			set
			{
				m_isAutoFitting = value;
			}
		}

		public Vector3[] corners => m_corners;

		public Vector3[] worldCorners => m_worldCorners;

		public Vector4 margins
		{
			get
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				return m_margins;
			}
			set
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0010: Unknown result type (might be due to invalid IL or missing references)
				if (m_margins != value)
				{
					m_margins = value;
					m_hasChanged = true;
					OnContainerChanged();
				}
			}
		}

		public RectTransform rectTransform
		{
			get
			{
				if ((Object)(object)m_rectTransform == (Object)null)
				{
					m_rectTransform = ((Component)this).GetComponent<RectTransform>();
				}
				return m_rectTransform;
			}
		}

		public TextMeshPro textMeshPro
		{
			get
			{
				if ((Object)(object)m_textMeshPro == (Object)null)
				{
					m_textMeshPro = ((Component)this).GetComponent<TextMeshPro>();
				}
				return m_textMeshPro;
			}
		}

		protected override void Awake()
		{
			Debug.LogWarning((object)("The Text Container component is now Obsolete and can safely be removed from [" + ((Object)((Component)this).gameObject).name + "]."), (Object)(object)this);
		}

		protected override void OnEnable()
		{
			OnContainerChanged();
		}

		protected override void OnDisable()
		{
		}

		private void OnContainerChanged()
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			UpdateCorners();
			if ((Object)(object)m_rectTransform != (Object)null)
			{
				m_rectTransform.sizeDelta = size;
				((Transform)m_rectTransform).hasChanged = true;
			}
			if ((Object)(object)textMeshPro != (Object)null)
			{
				((Graphic)m_textMeshPro).SetVerticesDirty();
				m_textMeshPro.margin = m_margins;
			}
		}

		protected override void OnRectTransformDimensionsChange()
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)rectTransform == (Object)null)
			{
				m_rectTransform = ((Component)this).gameObject.AddComponent<RectTransform>();
			}
			if (m_rectTransform.sizeDelta != k_defaultSize)
			{
				size = m_rectTransform.sizeDelta;
			}
			pivot = m_rectTransform.pivot;
			m_hasChanged = true;
			OnContainerChanged();
		}

		private void SetRect(Vector2 size)
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			m_rect = new Rect(((Rect)(ref m_rect)).x, ((Rect)(ref m_rect)).y, size.x, size.y);
		}

		private void UpdateCorners()
		{
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: 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_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Unknown result type (might be due to invalid IL or missing references)
			m_corners[0] = new Vector3((0f - m_pivot.x) * ((Rect)(ref m_rect)).width, (0f - m_pivot.y) * ((Rect)(ref m_rect)).height);
			m_corners[1] = new Vector3((0f - m_pivot.x) * ((Rect)(ref m_rect)).width, (1f - m_pivot.y) * ((Rect)(ref m_rect)).height);
			m_corners[2] = new Vector3((1f - m_pivot.x) * ((Rect)(ref m_rect)).width, (1f - m_pivot.y) * ((Rect)(ref m_rect)).height);
			m_corners[3] = new Vector3((1f - m_pivot.x) * ((Rect)(ref m_rect)).width, (0f - m_pivot.y) * ((Rect)(ref m_rect)).height);
			if ((Object)(object)m_rectTransform != (Object)null)
			{
				m_rectTransform.pivot = m_pivot;
			}
		}

		private Vector2 GetPivot(TextContainerAnchors anchor)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			Vector2 zero = Vector2.zero;
			switch (anchor)
			{
			case TextContainerAnchors.TopLeft:
				((Vector2)(ref zero))..ctor(0f, 1f);
				break;
			case TextContainerAnchors.Top:
				((Vector2)(ref zero))..ctor(0.5f, 1f);
				break;
			case TextContainerAnchors.TopRight:
				((Vector2)(ref zero))..ctor(1f, 1f);
				break;
			case TextContainerAnchors.Left:
				((Vector2)(ref zero))..ctor(0f, 0.5f);
				break;
			case TextContainerAnchors.Middle:
				((Vector2)(ref zero))..ctor(0.5f, 0.5f);
				break;
			case TextContainerAnchors.Right:
				((Vector2)(ref zero))..ctor(1f, 0.5f);
				break;
			case TextContainerAnchors.BottomLeft:
				((Vector2)(ref zero))..ctor(0f, 0f);
				break;
			case TextContainerAnchors.Bottom:
				((Vector2)(ref zero))..ctor(0.5f, 0f);
				break;
			case TextContainerAnchors.BottomRight:
				((Vector2)(ref zero))..ctor(1f, 0f);
				break;
			}
			return zero;
		}

		private TextContainerAnchors GetAnchorPosition(Vector2 pivot)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: 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_00d3: Unknown result type (might be due to invalid IL or missing references)
			if (pivot == new Vector2(0f, 1f))
			{
				return TextContainerAnchors.TopLeft;
			}
			if (pivot == new Vector2(0.5f, 1f))
			{
				return TextContainerAnchors.Top;
			}
			if (pivot == new Vector2(1f, 1f))
			{
				return TextContainerAnchors.TopRight;
			}
			if (pivot == new Vector2(0f, 0.5f))
			{
				return TextContainerAnchors.Left;
			}
			if (pivot == new Vector2(0.5f, 0.5f))
			{
				return TextContainerAnchors.Middle;
			}
			if (pivot == new Vector2(1f, 0.5f))
			{
				return TextContainerAnchors.Right;
			}
			if (pivot == new Vector2(0f, 0f))
			{
				return TextContainerAnchors.BottomLeft;
			}
			if (pivot == new Vector2(0.5f, 0f))
			{
				return TextContainerAnchors.Bottom;
			}
			if (pivot == new Vector2(1f, 0f))
			{
				return TextContainerAnchors.BottomRight;
			}
			return TextContainerAnchors.Custom;
		}
	}
	[DisallowMultipleComponent]
	[RequireComponent(typeof(MeshRenderer))]
	[RequireComponent(typeof(MeshFilter))]
	[AddComponentMenu("Mesh/TextMeshPro - Text")]
	[ExecuteAlways]
	public class TextMeshPro : TMP_Text, ILayoutElement
	{
		private bool m_currentAutoSizeMode;

		[SerializeField]
		private bool m_hasFontAssetChanged;

		private float m_previousLossyScaleY = -1f;

		[SerializeField]
		private Renderer m_renderer;

		private MeshFilter m_meshFilter;

		private bool m_isFirstAllocation;

		private int m_max_characters = 8;

		private int m_max_numberOfLines = 4;

		[SerializeField]
		protected TMP_SubMesh[] m_subTextObjects = new TMP_SubMesh[8];

		private bool m_isMaskingEnabled;

		private bool isMaskUpdateRequired;

		[SerializeField]
		private MaskingTypes m_maskType;

		private Matrix4x4 m_EnvMapMatrix;

		private Vector3[] m_RectTransformCorners = (Vector3[])(object)new Vector3[4];

		[NonSerialized]
		private bool m_isRegisteredForEvents;

		private int loopCountA;

		public int sortingLayerID
		{
			get
			{
				return m_renderer.sortingLayerID;
			}
			set
			{
				m_renderer.sortingLayerID = value;
			}
		}

		public int sortingOrder
		{
			get
			{
				return m_renderer.sortingOrder;
			}
			set
			{
				m_renderer.sortingOrder = value;
			}
		}

		public override bool autoSizeTextContainer
		{
			get
			{
				return m_autoSizeTextContainer;
			}
			set
			{
				if (m_autoSizeTextContainer != value)
				{
					m_autoSizeTextContainer = value;
					if (m_autoSizeTextContainer)
					{
						TMP_UpdateManager.RegisterTextElementForLayoutRebuild(this);
						((Graphic)this).SetLayoutDirty();
					}
				}
			}
		}

		[Obsolete("The TextContainer is now obsolete. Use the RectTransform instead.")]
		public TextContainer textContainer => null;

		public new Transform transform
		{
			get
			{
				if ((Object)(object)m_transform == (Object)null)
				{
					m_transform = ((Component)this).GetComponent<Transform>();
				}
				return m_transform;
			}
		}

		public Renderer renderer
		{
			get
			{
				if ((Object)(object)m_renderer == (Object)null)
				{
					m_renderer = ((Component)this).GetComponent<Renderer>();
				}
				return m_renderer;
			}
		}

		public override Mesh mesh
		{
			get
			{
				//IL_000f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0019: Expected O, but got Unknown
				if ((Object)(object)m_mesh == (Object)null)
				{
					m_mesh = new Mesh();
					((Object)m_mesh).hideFlags = (HideFlags)61;
					meshFilter.mesh = m_mesh;
				}
				return m_mesh;
			}
		}

		public MeshFilter meshFilter
		{
			get
			{
				if ((Object)(object)m_meshFilter == (Object)null)
				{
					m_meshFilter = ((Component)this).GetComponent<MeshFilter>();
				}
				return m_meshFilter;
			}
		}

		public MaskingTypes maskType
		{
			get
			{
				return m_maskType;
			}
			set
			{
				m_maskType = value;
				SetMask(m_maskType);
			}
		}

		public void SetMask(MaskingTypes type, Vector4 maskCoords)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			SetMask(type);
			SetMaskCoordinates(maskCoords);
		}

		public void SetMask(MaskingTypes type, Vector4 maskCoords, float softnessX, float softnessY)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			SetMask(type);
			SetMaskCoordinates(maskCoords, softnessX, softnessY);
		}

		public override void SetVerticesDirty()
		{
			if (!m_verticesAlreadyDirty && !((Object)(object)this == (Object)null) && ((UIBehaviour)this).IsActive())
			{
				TMP_UpdateManager.RegisterTextElementForGraphicRebuild(this);
				m_verticesAlreadyDirty = true;
			}
		}

		public override void SetLayoutDirty()
		{
			m_isPreferredWidthDirty = true;
			m_isPreferredHeightDirty = true;
			if (!m_layoutAlreadyDirty && !((Object)(object)this == (Object)null) && ((UIBehaviour)this).IsActive())
			{
				m_layoutAlreadyDirty = true;
				m_isLayoutDirty = true;
			}
		}

		public override void SetMaterialDirty()
		{
			((Graphic)this).UpdateMaterial();
		}

		public override void SetAllDirty()
		{
			m_isInputParsingRequired = true;
			((Graphic)this).SetLayoutDirty();
			((Graphic)this).SetVerticesDirty();
			((Graphic)this).SetMaterialDirty();
		}

		public override void Rebuild(CanvasUpdate update)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Invalid comparison between Unknown and I4
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)this == (Object)null)
			{
				return;
			}
			if ((int)update == 0)
			{
				if (m_autoSizeTextContainer)
				{
					m_rectTransform.sizeDelta = GetPreferredValues(float.PositiveInfinity, float.PositiveInfinity);
				}
			}
			else if ((int)update == 3)
			{
				OnPreRenderObject();
				m_verticesAlreadyDirty = false;
				m_layoutAlreadyDirty = false;
				if (m_isMaterialDirty)
				{
					((Graphic)this).UpdateMaterial();
					m_isMaterialDirty = false;
				}
			}
		}

		protected override void UpdateMaterial()
		{
			if (!((Object)(object)m_sharedMaterial == (Object)null))
			{
				if ((Object)(object)m_renderer == (Object)null)
				{
					m_renderer = renderer;
				}
				if (((Object)m_renderer.sharedMaterial).GetInstanceID() != ((Object)m_sharedMaterial).GetInstanceID())
				{
					m_renderer.sharedMaterial = m_sharedMaterial;
				}
			}
		}

		public override void UpdateMeshPadding()
		{
			m_padding = ShaderUtilities.GetPadding(m_sharedMaterial, m_enableExtraPadding, m_isUsingBold);
			m_isMaskingEnabled = ShaderUtilities.IsMaskingEnabled(m_sharedMaterial);
			m_havePropertiesChanged = true;
			checkPaddingRequired = false;
			if (m_textInfo != null)
			{
				for (int i = 1; i < m_textInfo.materialCount; i++)
				{
					m_subTextObjects[i].UpdateMeshPadding(m_enableExtraPadding, m_isUsingBold);
				}
			}
		}

		public override void ForceMeshUpdate()
		{
			m_havePropertiesChanged = true;
			OnPreRenderObject();
		}

		public override void ForceMeshUpdate(bool ignoreInactive)
		{
			m_havePropertiesChanged = true;
			m_ignoreActiveState = true;
			OnPreRenderObject();
		}

		public override TMP_TextInfo GetTextInfo(string text)
		{
			StringToCharArray(text, ref m_TextParsingBuffer);
			SetArraySizes(m_TextParsingBuffer);
			m_renderMode = TextRenderFlags.DontRender;
			ComputeMarginSize();
			GenerateTextMesh();
			m_renderMode = TextRenderFlags.Render;
			return base.textInfo;
		}

		public override void ClearMesh(bool updateMesh)
		{
			if ((Object)(object)m_textInfo.meshInfo[0].mesh == (Object)null)
			{
				m_textInfo.meshInfo[0].mesh = m_mesh;
			}
			m_textInfo.ClearMeshInfo(updateMesh);
		}

		public override void UpdateGeometry(Mesh mesh, int index)
		{
			mesh.RecalculateBounds();
		}

		public override void UpdateVertexData(TMP_VertexDataUpdateFlags flags)
		{
			int materialCount = m_textInfo.materialCount;
			for (int i = 0; i < materialCount; i++)
			{
				Mesh val = ((i != 0) ? m_subTextObjects[i].mesh : m_mesh);
				if ((flags & TMP_VertexDataUpdateFlags.Vertices) == TMP_VertexDataUpdateFlags.Vertices)
				{
					val.vertices = m_textInfo.meshInfo[i].vertices;
				}
				if ((flags & TMP_VertexDataUpdateFlags.Uv0) == TMP_VertexDataUpdateFlags.Uv0)
				{
					val.uv = m_textInfo.meshInfo[i].uvs0;
				}
				if ((flags & TMP_VertexDataUpdateFlags.Uv2) == TMP_VertexDataUpdateFlags.Uv2)
				{
					val.uv2 = m_textInfo.meshInfo[i].uvs2;
				}
				if ((flags & TMP_VertexDataUpdateFlags.Colors32) == TMP_VertexDataUpdateFlags.Colors32)
				{
					val.colors32 = m_textInfo.meshInfo[i].colors32;
				}
				val.RecalculateBounds();
			}
		}

		public override void UpdateVertexData()
		{
			int materialCount = m_textInfo.materialCount;
			for (int i = 0; i < materialCount; i++)
			{
				Mesh val;
				if (i == 0)
				{
					val = m_mesh;
				}
				else
				{
					m_textInfo.meshInfo[i].ClearUnusedVertices();
					val = m_subTextObjects[i].mesh;
				}
				val.vertices = m_textInfo.meshInfo[i].vertices;
				val.uv = m_textInfo.meshInfo[i].uvs0;
				val.uv2 = m_textInfo.meshInfo[i].uvs2;
				val.colors32 = m_textInfo.meshInfo[i].colors32;
				val.RecalculateBounds();
			}
		}

		public void UpdateFontAsset()
		{
			LoadFontAsset();
		}

		public void CalculateLayoutInputHorizontal()
		{
			if (!((Component)this).gameObject.activeInHierarchy)
			{
				return;
			}
			m_currentAutoSizeMode = m_enableAutoSizing;
			if (m_isCalculateSizeRequired || ((Transform)m_rectTransform).hasChanged)
			{
				m_minWidth = 0f;
				m_flexibleWidth = 0f;
				if (m_enableAutoSizing)
				{
					m_fontSize = m_fontSizeMax;
				}
				m_marginWidth = TMP_Text.k_LargePositiveFloat;
				m_marginHeight = TMP_Text.k_LargePositiveFloat;
				if (m_isInputParsingRequired || m_isTextTruncated)
				{
					ParseInputText();
				}
				GenerateTextMesh();
				m_renderMode = TextRenderFlags.Render;
				ComputeMarginSize();
				m_isLayoutDirty = true;
			}
		}

		public void CalculateLayoutInputVertical()
		{
			if (!((Component)this).gameObject.activeInHierarchy)
			{
				return;
			}
			if (m_isCalculateSizeRequired || ((Transform)m_rectTransform).hasChanged)
			{
				m_minHeight = 0f;
				m_flexibleHeight = 0f;
				if (m_enableAutoSizing)
				{
					m_currentAutoSizeMode = true;
					m_enableAutoSizing = false;
				}
				m_marginHeight = TMP_Text.k_LargePositiveFloat;
				GenerateTextMesh();
				m_enableAutoSizing = m_currentAutoSizeMode;
				m_renderMode = TextRenderFlags.Render;
				ComputeMarginSize();
				m_isLayoutDirty = true;
			}
			m_isCalculateSizeRequired = false;
		}

		protected override void Awake()
		{
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Expected O, but got Unknown
			m_renderer = ((Component)this).GetComponent<Renderer>();
			if ((Object)(object)m_renderer == (Object)null)
			{
				m_renderer = ((Component)this).gameObject.AddComponent<Renderer>();
			}
			if ((Object)(object)((Graphic)this).canvasRenderer != (Object)null)
			{
				((Object)((Graphic)this).canvasRenderer).hideFlags = (HideFlags)2;
			}
			else
			{
				((Object)((Component)this).gameObject.AddComponent<CanvasRenderer>()).hideFlags = (HideFlags)2;
			}
			m_rectTransform = base.rectTransform;
			m_transform = transform;
			m_meshFilter = ((Component)this).GetComponent<MeshFilter>();
			if ((Object)(object)m_meshFilter == (Object)null)
			{
				m_meshFilter = ((Component)this).gameObject.AddComponent<MeshFilter>();
			}
			if ((Object)(object)m_mesh == (Object)null)
			{
				m_mesh = new Mesh();
				((Object)m_mesh).hideFlags = (HideFlags)61;
				m_meshFilter.mesh = m_mesh;
				m_textInfo = new TMP_TextInfo(this);
			}
			((Object)m_meshFilter).hideFlags = (HideFlags)2;
			LoadDefaultSettings();
			LoadFontAsset();
			TMP_StyleSheet.LoadDefaultStyleSheet();
			if (m_TextParsingBuffer == null)
			{
				m_TextParsingBuffer = new UnicodeChar[m_max_characters];
			}
			m_cached_TextElement = new TMP_Character();
			m_isFirstAllocation = true;
			if ((Object)(object)m_fontAsset == (Object)null)
			{
				Debug.LogWarning((object)("Please assign a Font Asset to this " + ((Object)transform).name + " gameobject."), (Object)(object)this);
				return;
			}
			TMP_SubMesh[] componentsInChildren = ((Component)this).GetComponentsInChildren<TMP_SubMesh>();
			if (componentsInChildren.Length != 0)
			{
				for (int i = 0; i < componentsInChildren.Length; i++)
				{
					m_subTextObjects[i + 1] = componentsInChildren[i];
				}
			}
			m_isInputParsingRequired = true;
			m_havePropertiesChanged = true;
			m_isCalculateSizeRequired = true;
			m_isAwake = true;
		}

		protected override void OnEnable()
		{
			if (m_isAwake)
			{
				if (!m_isRegisteredForEvents)
				{
					m_isRegisteredForEvents = true;
				}
				TMP_UpdateManager.RegisterTextObjectForUpdate(this);
				meshFilter.sharedMesh = mesh;
				SetActiveSubMeshes(state: true);
				ComputeMarginSize();
				m_isInputParsingRequired = true;
				m_havePropertiesChanged = true;
				m_verticesAlreadyDirty = false;
				((Graphic)this).SetVerticesDirty();
			}
		}

		protected override void OnDisable()
		{
			if (m_isAwake)
			{
				TMP_UpdateManager.UnRegisterTextElementForRebuild(this);
				TMP_UpdateManager.UnRegisterTextObjectForUpdate(this);
				m_meshFilter.sharedMesh = null;
				SetActiveSubMeshes(state: false);
			}
		}

		protected override void OnDestroy()
		{
			if ((Object)(object)m_mesh != (Object)null)
			{
				Object.DestroyImmediate((Object)(object)m_mesh);
			}
			m_isRegisteredForEvents = false;
			TMP_UpdateManager.UnRegisterTextElementForRebuild(this);
			TMP_UpdateManager.UnRegisterTextObjectForUpdate(this);
		}

		protected override void LoadFontAsset()
		{
			ShaderUtilities.GetShaderPropertyIDs();
			if ((Object)(object)m_fontAsset == (Object)null)
			{
				if ((Object)(object)TMP_Settings.defaultFontAsset != (Object)null)
				{
					m_fontAsset = TMP_Settings.defaultFontAsset;
				}
				else
				{
					m_fontAsset = Resources.Load<TMP_FontAsset>("Fonts & Materials/LiberationSans SDF");
				}
				if ((Object)(object)m_fontAsset == (Object)null)
				{
					Debug.LogWarning((object)("The LiberationSans SDF Font Asset was not found. There is no Font Asset assigned to " + ((Object)((Component)this).gameObject).name + "."), (Object)(object)this);
					return;
				}
				if (m_fontAsset.characterLookupTable == null)
				{
					Debug.Log((object)"Dictionary is Null!");
				}
				m_renderer.sharedMaterial = m_fontAsset.material;
				m_sharedMaterial = m_fontAsset.material;
				m_sharedMaterial.SetFloat("_CullMode", 0f);
				m_sharedMaterial.SetFloat(ShaderUtilities.ShaderTag_ZTestMode, 4f);
				m_renderer.receiveShadows = false;
				m_renderer.shadowCastingMode = (ShadowCastingMode)0;
			}
			else
			{
				if (m_fontAsset.characterLookupTable == null)
				{
					m_fontAsset.ReadFontAssetDefinition();
				}
				if ((Object)(object)m_renderer.sharedMaterial == (Object)null || (Object)(object)m_renderer.sharedMaterial.GetTexture(ShaderUtilities.ID_MainTex) == (Object)null || ((Object)m_fontAsset.atlasTexture).GetInstanceID() != ((Object)m_renderer.sharedMaterial.GetTexture(ShaderUtilities.ID_MainTex)).GetInstanceID())
				{
					m_renderer.sharedMaterial = m_fontAsset.material;
					m_sharedMaterial = m_fontAsset.material;
				}
				else
				{
					m_sharedMaterial = m_renderer.sharedMaterial;
				}
				m_sharedMaterial.SetFloat(ShaderUtilities.ShaderTag_ZTestMode, 4f);
				if (m_sharedMaterial.passCount == 1)
				{
					m_renderer.receiveShadows = false;
					m_renderer.shadowCastingMode = (ShadowCastingMode)0;
				}
			}
			m_padding = GetPaddingForMaterial();
			m_isMaskingEnabled = ShaderUtilities.IsMaskingEnabled(m_sharedMaterial);
			GetSpecialCharacters(m_fontAsset);
		}

		private void UpdateEnvMapMatrix()
		{
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			if (m_sharedMaterial.HasProperty(ShaderUtilities.ID_EnvMap) && !((Object)(object)m_sharedMaterial.GetTexture(ShaderUtilities.ID_EnvMap) == (Object)null))
			{
				Vector3 val = Vector4.op_Implicit(m_sharedMaterial.GetVector(ShaderUtilities.ID_EnvMatrixRotation));
				m_EnvMapMatrix = Matrix4x4.TRS(Vector3.zero, Quaternion.Euler(val), Vector3.one);
				m_sharedMaterial.SetMatrix(ShaderUtilities.ID_EnvMatrix, m_EnvMapMatrix);
			}
		}

		private void SetMask(MaskingTypes maskType)
		{
			switch (maskType)
			{
			case MaskingTypes.MaskOff:
				m_sharedMaterial.DisableKeyword(ShaderUtilities.Keyword_MASK_SOFT);
				m_sharedMaterial.DisableKeyword(ShaderUtilities.Keyword_MASK_HARD);
				m_sharedMaterial.DisableKeyword(ShaderUtilities.Keyword_MASK_TEX);
				break;
			case MaskingTypes.MaskSoft:
				m_sharedMaterial.EnableKeyword(ShaderUtilities.Keyword_MASK_SOFT);
				m_sharedMaterial.DisableKeyword(ShaderUtilities.Keyword_MASK_HARD);
				m_sharedMaterial.DisableKeyword(ShaderUtilities.Keyword_MASK_TEX);
				break;
			case MaskingTypes.MaskHard:
				m_sharedMaterial.EnableKeyword(ShaderUtilities.Keyword_MASK_HARD);
				m_sharedMaterial.DisableKeyword(ShaderUtilities.Keyword_MASK_SOFT);
				m_sharedMaterial.DisableKeyword(ShaderUtilities.Keyword_MASK_TEX);
				break;
			}
		}

		private void SetMaskCoordinates(Vector4 coords)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			m_sharedMaterial.SetVector(ShaderUtilities.ID_ClipRect, coords);
		}

		private void SetMaskCoordinates(Vector4 coords, float softX, float softY)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			m_sharedMaterial.SetVector(ShaderUtilities.ID_ClipRect, coords);
			m_sharedMaterial.SetFloat(ShaderUtilities.ID_MaskSoftnessX, softX);
			m_sharedMaterial.SetFloat(ShaderUtilities.ID_MaskSoftnessY, softY);
		}

		private void EnableMasking()
		{
			if (m_sharedMaterial.HasProperty(ShaderUtilities.ID_ClipRect))
			{
				m_sharedMaterial.EnableKeyword(ShaderUtilities.Keyword_MASK_SOFT);
				m_sharedMaterial.DisableKeyword(ShaderUtilities.Keyword_MASK_HARD);
				m_sharedMaterial.DisableKeyword(ShaderUtilities.Keyword_MASK_TEX);
				m_isMaskingEnabled = true;
				UpdateMask();
			}
		}

		private void DisableMasking()
		{
			if (m_sharedMaterial.HasProperty(ShaderUtilities.ID_ClipRect))
			{
				m_sharedMaterial.DisableKeyword(ShaderUtilities.Keyword_MASK_SOFT);
				m_sharedMaterial.DisableKeyword(ShaderUtilities.Keyword_MASK_HARD);
				m_sharedMaterial.DisableKeyword(ShaderUtilities.Keyword_MASK_TEX);
				m_isMaskingEnabled = false;
				UpdateMask();
			}
		}

		private void UpdateMask()
		{
			if (m_isMaskingEnabled && m_isMaskingEnabled && (Object)(object)m_fontMaterial == (Object)null)
			{
				CreateMaterialInstance();
			}
		}

		protected override Material GetMaterial(Material mat)
		{
			if ((Object)(object)m_fontMaterial == (Object)null || ((Object)m_fontMaterial).GetInstanceID() != ((Object)mat).GetInstanceID())
			{
				m_fontMaterial = CreateMaterialInstance(mat);
			}
			m_sharedMaterial = m_fontMaterial;
			m_padding = GetPaddingForMaterial();
			((Graphic)this).SetVerticesDirty();
			((Graphic)this).SetMaterialDirty();
			return m_sharedMaterial;
		}

		protected override Material[] GetMaterials(Material[] mats)
		{
			int materialCount = m_textInfo.materialCount;
			if (m_fontMaterials == null)
			{
				m_fontMaterials = (Material[])(object)new Material[materialCount];
			}
			else if (m_fontMaterials.Length != materialCount)
			{
				TMP_TextInfo.Resize(ref m_fontMaterials, materialCount, isBlockAllocated: false);
			}
			for (int i = 0; i < materialCount; i++)
			{
				if (i == 0)
				{
					m_fontMaterials[i] = base.fontMaterial;
				}
				else
				{
					m_fontMaterials[i] = m_subTextObjects[i].material;
				}
			}
			m_fontSharedMaterials = m_fontMaterials;
			return m_fontMaterials;
		}

		protected override void SetSharedMaterial(Material mat)
		{
			m_sharedMaterial = mat;
			m_padding = GetPaddingForMaterial();
			((Graphic)this).SetMaterialDirty();
		}

		protected override Material[] GetSharedMaterials()
		{
			int materialCount = m_textInfo.materialCount;
			if (m_fontSharedMaterials == null)
			{
				m_fontSharedMaterials = (Material[])(object)new Material[materialCount];
			}
			else if (m_fontSharedMaterials.Length != materialCount)
			{
				TMP_TextInfo.Resize(ref m_fontSharedMaterials, materialCount, isBlockAllocated: false);
			}
			for (int i = 0; i < materialCount; i++)
			{
				if (i == 0)
				{
					m_fontSharedMaterials[i] = m_sharedMaterial;
				}
				else
				{
					m_fontSharedMaterials[i] = m_subTextObjects[i].sharedMaterial;
				}
			}
			return m_fontSharedMaterials;
		}

		protected override void SetSharedMaterials(Material[] materials)
		{
			int materialCount = m_textInfo.materialCount;
			if (m_fontSharedMaterials == null)
			{
				m_fontSharedMaterials = (Material[])(object)new Material[materialCount];
			}
			else if (m_fontSharedMaterials.Length != materialCount)
			{
				TMP_TextInfo.Resize(ref m_fontSharedMaterials, materialCount, isBlockAllocated: false);
			}
			for (int i = 0; i < materialCount; i++)
			{
				Texture texture = materials[i].GetTexture(ShaderUtilities.ID_MainTex);
				if (i == 0)
				{
					if (!((Object)(object)texture == (Object)null) && ((Object)texture).GetInstanceID() == ((Object)m_sharedMaterial.GetTexture(ShaderUtilities.ID_MainTex)).GetInstanceID())
					{
						m_sharedMaterial = (m_fontSharedMaterials[i] = materials[i]);
						m_padding = GetPaddingForMaterial(m_sharedMaterial);
					}
				}
				else if (!((Object)(object)texture == (Object)null) && ((Object)texture).GetInstanceID() == ((Object)m_subTextObjects[i].sharedMaterial.GetTexture(ShaderUtilities.ID_MainTex)).GetInstanceID() && m_subTextObjects[i].isDefaultMaterial)
				{
					m_subTextObjects[i].sharedMaterial = (m_fontSharedMaterials[i] = materials[i]);
				}
			}
		}

		protected override void SetOutlineThickness(float thickness)
		{
			thickness = Mathf.Clamp01(thickness);
			m_renderer.material.SetFloat(ShaderUtilities.ID_OutlineWidth, thickness);
			if ((Object)(object)m_fontMaterial == (Object)null)
			{
				m_fontMaterial = m_renderer.material;
			}
			m_fontMaterial = m_renderer.material;
			m_sharedMaterial = m_fontMaterial;
			m_padding = GetPaddingForMaterial();
		}

		protected override void SetFaceColor(Color32 color)
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			m_renderer.material.SetColor(ShaderUtilities.ID_FaceColor, Color32.op_Implicit(color));
			if ((Object)(object)m_fontMaterial == (Object)null)
			{
				m_fontMaterial = m_renderer.material;
			}
			m_sharedMaterial = m_fontMaterial;
		}

		protected override void SetOutlineColor(Color32 color)
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			m_renderer.material.SetColor(ShaderUtilities.ID_OutlineColor, Color32.op_Implicit(color));
			if ((Object)(object)m_fontMaterial == (Object)null)
			{
				m_fontMaterial = m_renderer.material;
			}
			m_sharedMaterial = m_fontMaterial;
		}

		private void CreateMaterialInstance()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			Material val = new Material(m_sharedMaterial);
			val.shaderKeywords = m_sharedMaterial.shaderKeywords;
			((Object)val).name = ((Object)val).name + " Instance";
			m_fontMaterial = val;
		}

		protected override void SetShaderDepth()
		{
			if (m_isOverlay)
			{
				m_sharedMaterial.SetFloat(ShaderUtilities.ShaderTag_ZTestMode, 0f);
				m_renderer.material.renderQueue = 4000;
				m_sharedMaterial = m_renderer.material;
			}
			else
			{
				m_sharedMaterial.SetFloat(ShaderUtilities.ShaderTag_ZTestMode, 4f);
				m_renderer.material.renderQueue = -1;
				m_sharedMaterial = m_renderer.material;
			}
		}

		protected override void SetCulling()
		{
			if (m_isCullingEnabled)
			{
				m_renderer.material.SetFloat("_CullMode", 2f);
				for (int i = 1; i < m_subTextObjects.Length && (Object)(object)m_subTextObjects[i] != (Object)null; i++)
				{
					Renderer val = m_subTextObjects[i].renderer;
					if ((Object)(object)val != (Object)null)
					{
						val.material.SetFloat(ShaderUtilities.ShaderTag_CullMode, 2f);
					}
				}
				return;
			}
			m_renderer.material.SetFloat("_CullMode", 0f);
			for (int j = 1; j < m_subTextObjects.Length && (Object)(object)m_subTextObjects[j] != (Object)null; j++)
			{
				Renderer val2 = m_subTextObjects[j].renderer;
				if ((Object)(object)val2 != (Object)null)
				{
					val2.material.SetFloat(ShaderUtilities.ShaderTag_CullMode, 0f);
				}
			}
		}

		private void SetPerspectiveCorrection()
		{
			if (m_isOrthographic)
			{
				m_sharedMaterial.SetFloat(ShaderUtilities.ID_PerspectiveFilter, 0f);
			}
			else
			{
				m_sharedMaterial.SetFloat(ShaderUtilities.ID_PerspectiveFilter, 0.875f);
			}
		}

		protected override float GetPaddingForMaterial(Material mat)
		{
			m_padding = ShaderUtilities.GetPadding(mat, m_enableExtraPadding, m_isUsingBold);
			m_isMaskingEnabled = ShaderUtilities.IsMaskingEnabled(m_sharedMaterial);
			m_isSDFShader = mat.HasProperty(ShaderUtilities.ID_WeightNormal);
			return m_padding;
		}

		protected override float GetPaddingForMaterial()
		{
			ShaderUtilities.GetShaderPropertyIDs();
			if ((Object)(object)m_sharedMaterial == (Object)null)
			{
				return 0f;
			}
			m_padding = ShaderUtilities.GetPadding(m_sharedMaterial, m_enableExtraPadding, m_isUsingBold);
			m_isMaskingEnabled = ShaderUtilities.IsMaskingEnabled(m_sharedMaterial);
			m_isSDFShader = m_sharedMaterial.HasProperty(ShaderUtilities.ID_WeightNormal);
			return m_padding;
		}

		protected override int SetArraySizes(UnicodeChar[] chars)
		{
			//IL_0af8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b14: Expected O, but got Unknown
			int num = 0;
			m_totalCharacterCount = 0;
			m_isUsingBold = false;
			m_isParsingText = false;
			tag_NoParsing = false;
			m_FontStyleInternal = m_fontStyle;
			m_FontWeightInternal = (((m_FontStyleInternal & FontStyles.Bold) == FontStyles.Bold) ? FontWeight.Bold : m_fontWeight);
			m_FontWeightStack.SetDefault(m_FontWeightInternal);
			m_currentFontAsset = m_fontAsset;
			m_currentMaterial = m_sharedMaterial;
			m_currentMaterialIndex = 0;
			m_materialReferenceStack.SetDefault(new MaterialReference(m_currentMaterialIndex, m_currentFontAsset, null, m_currentMaterial, m_padding));
			m_materialReferenceIndexLookup.Clear();
			MaterialReference.AddMaterialReference(m_currentMaterial, m_currentFontAsset, m_materialReferences, m_materialReferenceIndexLookup);
			if (m_textInfo == null)
			{
				m_textInfo = new TMP_TextInfo();
			}
			m_textElementType = TMP_TextElementType.Character;
			if ((Object)(object)m_linkedTextComponent != (Object)null)
			{
				m_linkedTextComponent.text = string.Empty;
				m_linkedTextComponent.ForceMeshUpdate();
			}
			for (int i = 0; i < chars.Length && chars[i].unicode != 0; i++)
			{
				if (m_textInfo.characterInfo == null || m_totalCharacterCount >= m_textInfo.characterInfo.Length)
				{
					TMP_TextInfo.Resize(ref m_textInfo.characterInfo, m_totalCharacterCount + 1, isBlockAllocated: true);
				}
				int num2 = chars[i].unicode;
				if (m_isRichText && num2 == 60)
				{
					int currentMaterialIndex = m_currentMaterialIndex;
					if (ValidateHtmlTag(chars, i + 1, out var endIndex))
					{
						int stringIndex = chars[i].stringIndex;
						i = endIndex;
						if ((m_FontStyleInternal & FontStyles.Bold) == FontStyles.Bold)
						{
							m_isUsingBold = true;
						}
						if (m_textElementType == TMP_TextElementType.Sprite)
						{
							m_materialReferences[m_currentMaterialIndex].referenceCount++;
							m_textInfo.characterInfo[m_totalCharacterCount].character = (char)(57344 + m_spriteIndex);
							m_textInfo.characterInfo[m_totalCharacterCount].spriteIndex = m_spriteIndex;
							m_textInfo.characterInfo[m_totalCharacterCount].fontAsset = m_currentFontAsset;
							m_textInfo.characterInfo[m_totalCharacterCount].spriteAsset = m_currentSpriteAsset;
							m_textInfo.characterInfo[m_totalCharacterCount].materialReferenceIndex = m_currentMaterialIndex;
							m_textInfo.characterInfo[m_totalCharacterCount].textElement = m_currentSpriteAsset.spriteCharacterTable[m_spriteIndex];
							m_textInfo.characterInfo[m_totalCharacterCount].elementType = m_textElementType;
							m_textInfo.characterInfo[m_totalCharacterCount].index = stringIndex;
							m_textInfo.characterInfo[m_totalCharacterCount].stringLength = chars[i].stringIndex - stringIndex + 1;
							m_textElementType = TMP_TextElementType.Character;
							m_currentMaterialIndex = currentMaterialIndex;
							num++;
							m_totalCharacterCount++;
						}
						continue;
					}
				}
				bool isAlternativeTypeface = false;
				bool flag = false;
				TMP_FontAsset currentFontAsset = m_currentFontAsset;
				Material currentMaterial = m_currentMaterial;
				int currentMaterialIndex2 = m_currentMaterialIndex;
				if (m_textElementType == TMP_TextElementType.Character)
				{
					if ((m_FontStyleInternal & FontStyles.UpperCase) == FontStyles.UpperCase)
					{
						if (char.IsLower((char)num2))
						{
							num2 = char.ToUpper((char)num2);
						}
					}
					else if ((m_FontStyleInternal & FontStyles.LowerCase) == FontStyles.LowerCase)
					{
						if (char.IsUpper((char)num2))
						{
							num2 = char.ToLower((char)num2);
						}
					}
					else if ((m_FontStyleInternal & FontStyles.SmallCaps) == FontStyles.SmallCaps && char.IsLower((char)num2))
					{
						num2 = char.ToUpper((char)num2);
					}
				}
				TMP_FontAsset fontAsset;
				TMP_Character tMP_Character = TMP_FontAssetUtilities.GetCharacterFromFontAsset((uint)num2, m_currentFontAsset, includeFallbacks: false, m_FontStyleInternal, m_FontWeightInternal, out isAlternativeTypeface, out fontAsset);
				if (tMP_Character == null && m_currentFontAsset.fallbackFontAssetTable != null && m_currentFontAsset.fallbackFontAssetTable.Count > 0)
				{
					tMP_Character = TMP_FontAssetUtilities.GetCharacterFromFontAssets((uint)num2, m_currentFontAsset.fallbackFontAssetTable, includeFallbacks: true, m_FontStyleInternal, m_FontWeightInternal, out isAlternativeTypeface, out fontAsset);
				}
				if (tMP_Character == null)
				{
					TMP_SpriteAsset tMP_SpriteAsset = base.spriteAsset;
					if ((Object)(object)tMP_SpriteAsset != (Object)null)
					{
						int spriteIndex = -1;
						tMP_SpriteAsset = TMP_SpriteAsset.SearchForSpriteByUnicode(tMP_SpriteAsset, (uint)num2, includeFallbacks: true, out spriteIndex);
						if (spriteIndex != -1)
						{
							m_textElementType = TMP_TextElementType.Sprite;
							m_textInfo.characterInfo[m_totalCharacterCount].elementType = m_textElementType;
							m_currentMaterialIndex = MaterialReference.AddMaterialReference(tMP_SpriteAsset.material, tMP_SpriteAsset, m_materialReferences, m_materialReferenceIndexLookup);
							m_materialReferences[m_currentMaterialIndex].referenceCount++;
							m_textInfo.characterInfo[m_totalCharacterCount].character = (char)num2;
							m_textInfo.characterInfo[m_totalCharacterCount].spriteIndex = spriteIndex;
							m_textInfo.characterInfo[m_totalCharacterCount].fontAsset = m_currentFontAsset;
							m_textInfo.characterInfo[m_totalCharacterCount].spriteAsset = tMP_SpriteAsset;
							m_textInfo.characterInfo[m_totalCharacterCount].textElement = tMP_SpriteAsset.spriteCharacterTable[m_spriteIndex];
							m_textInfo.characterInfo[m_totalCharacterCount].materialReferenceIndex = m_currentMaterialIndex;
							m_textInfo.characterInfo[m_totalCharacterCount].index = chars[i].stringIndex;
							m_textInfo.characterInfo[m_totalCharacterCount].stringLength = chars[i].length;
							m_textElementType = TMP_TextElementType.Character;
							m_currentMaterialIndex = currentMaterialIndex2;
							num++;
							m_totalCharacterCount++;
							continue;
						}
					}
				}
				if (tMP_Character == null && TMP_Settings.fallbackFontAssets != null && TMP_Settings.fallbackFontAssets.Count > 0)
				{
					tMP_Character = TMP_FontAssetUtilities.GetCharacterFromFontAssets((uint)num2, TMP_Settings.fallbackFontAssets, includeFallbacks: true, m_FontStyleInternal, m_FontWeightInternal, out isAlternativeTypeface, out fontAsset);
				}
				if (tMP_Character == null && (Object)(object)TMP_Settings.defaultFontAsset != (Object)null)
				{
					tMP_Character = TMP_FontAssetUtilities.GetCharacterFromFontAsset((uint)num2, TMP_Settings.defaultFontAsset, includeFallbacks: true, m_FontStyleInternal, m_FontWeightInternal, out isAlternativeTypeface, out fontAsset);
				}
				if (tMP_Character == null)
				{
					TMP_SpriteAsset defaultSpriteAsset = TMP_Settings.defaultSpriteAsset;
					if ((Object)(object)defaultSpriteAsset != (Object)null)
					{
						int spriteIndex2 = -1;
						defaultSpriteAsset = TMP_SpriteAsset.SearchForSpriteByUnicode(defaultSpriteAsset, (uint)num2, includeFallbacks: true, out spriteIndex2);
						if (spriteIndex2 != -1)
						{
							m_textElementType = TMP_TextElementType.Sprite;
							m_textInfo.characterInfo[m_totalCharacterCount].elementType = m_textElementType;
							m_currentMaterialIndex = MaterialReference.AddMaterialReference(defaultSpriteAsset.material, defaultSpriteAsset, m_materialReferences, m_materialReferenceIndexLookup);
							m_materialReferences[m_currentMaterialIndex].referenceCount++;
							m_textInfo.characterInfo[m_totalCharacterCount].character = (char)num2;
							m_textInfo.characterInfo[m_totalCharacterCount].spriteIndex = spriteIndex2;
							m_textInfo.characterInfo[m_totalCharacterCount].fontAsset = m_currentFontAsset;
							m_textInfo.characterInfo[m_totalCharacterCount].spriteAsset = defaultSpriteAsset;
							m_textInfo.characterInfo[m_totalCharacterCount].textElement = defaultSpriteAsset.spriteCharacterTable[m_spriteIndex];
							m_textInfo.characterInfo[m_totalCharacterCount].materialReferenceIndex = m_currentMaterialIndex;
							m_textInfo.characterInfo[m_totalCharacterCount].index = chars[i].stringIndex;
							m_textInfo.characterInfo[m_totalCharacterCount].stringLength = chars[i].length;
							m_textElementType = TMP_TextElementType.Character;
							m_currentMaterialIndex = currentMaterialIndex2;
							num++;
							m_totalCharacterCount++;
							continue;
						}
					}
				}
				if (tMP_Character == null)
				{
					int num3 = num2;
					num2 = (chars[i].unicode = ((TMP_Settings.missingGlyphCharacter == 0) ? 9633 : TMP_Settings.missingGlyphCharacter));
					tMP_Character = TMP_FontAssetUtilities.GetCharacterFromFontAsset((uint)num2, m_currentFontAsset, includeFallbacks: true, m_FontStyleInternal, m_FontWeightInternal, out isAlternativeTypeface, out fontAsset);
					if (tMP_Character == null && TMP_Settings.fallbackFontAssets != null && TMP_Settings.fallbackFontAssets.Count > 0)
					{
						tMP_Character = TMP_FontAssetUtilities.GetCharacterFromFontAssets((uint)num2, TMP_Settings.fallbackFontAssets, includeFallbacks: true, m_FontStyleInternal, m_FontWeightInternal, out isAlternativeTypeface, out fontAsset);
					}
					if (tMP_Character == null && (Object)(object)TMP_Settings.defaultFontAsset != (Object)null)
					{
						tMP_Character = TMP_FontAssetUtilities.GetCharacterFromFontAsset((uint)num2, TMP_Settings.defaultFontAsset, includeFallbacks: true, m_FontStyleInternal, m_FontWeightInternal, out isAlternativeTypeface, out fontAsset);
					}
					if (tMP_Character == null)
					{
						num2 = (chars[i].unicode = 32);
						tMP_Character = TMP_FontAssetUtilities.GetCharacterFromFontAsset((uint)num2, m_currentFontAsset, includeFallbacks: true, m_FontStyleInternal, m_FontWeightInternal, out isAlternativeTypeface, out fontAsset);
						if (!TMP_Settings.warningsDisabled)
						{
							Debug.LogWarning((object)("Character with ASCII value of " + num3 + " was not found in the Font Asset Glyph Table. It was replaced by a space."), (Object)(object)this);
						}
					}
				}
				if ((Object)(object)fontAsset != (Object)null && ((Object)fontAsset).GetInstanceID() != ((Object)m_currentFontAsset).GetInstanceID())
				{
					flag = true;
					m_currentFontAsset = fontAsset;
				}
				m_textInfo.characterInfo[m_totalCharacterCount].elementType = TMP_TextElementType.Character;
				m_textInfo.characterInfo[m_totalCharacterCount].textElement = tMP_Character;
				m_textInfo.characterInfo[m_totalCharacterCount].isUsingAlternateTypeface = isAlternativeTypeface;
				m_textInfo.characterInfo[m_totalCharacterCount].character = (char)num2;
				m_textInfo.characterInfo[m_totalCharacterCount].fontAsset = m_currentFontAsset;
				m_textInfo.characterInfo[m_totalCharacterCount].index = chars[i].stringIndex;
				m_textInfo.characterInfo[m_totalCharacterCount].stringLength = chars[i].length;
				if (flag)
				{
					if (TMP_Settings.matchMaterialPreset)
					{
						m_currentMaterial = TMP_MaterialManager.GetFallbackMaterial(m_currentMaterial, m_currentFontAsset.material);
					}
					else
					{
						m_currentMaterial = m_currentFontAsset.material;
					}
					m_currentMaterialIndex = MaterialReference.AddMaterialReference(m_currentMaterial, m_currentFontAsset, m_materialReferences, m_materialReferenceIndexLookup);
				}
				if (!char.IsWhiteSpace((char)num2) && num2 != 8203)
				{
					if (m_materialReferences[m_currentMaterialIndex].referenceCount < 16383)
					{
						m_materialReferences[m_currentMaterialIndex].referenceCount++;
					}
					else
					{
						m_currentMaterialIndex = MaterialReference.AddMaterialReference(new Material(m_currentMaterial), m_currentFontAsset, m_materialReferences, m_materialReferenceIndexLookup);
						m_materialReferences[m_currentMaterialIndex].referenceCount++;
					}
				}
				m_textInfo.characterInfo[m_totalCharacterCount].material = m_currentMaterial;
				m_textInfo.characterInfo[m_totalCharacterCount].materialReferenceIndex = m_currentMaterialIndex;
				m_materialReferences[m_currentMaterialIndex].isFallbackMaterial = flag;
				if (flag)
				{
					m_materialReferences[m_currentMaterialIndex].fallbackMaterial = currentMaterial;
					m_currentFontAsset = currentFontAsset;
					m_currentMaterial = currentMaterial;
					m_currentMaterialIndex = currentMaterialIndex2;
				}
				m_totalCharacterCount++;
			}
			if (m_isCalculatingPreferredValues)
			{
				m_isCalculatingPreferredValues = false;
				m_isInputParsingRequired = true;
				return m_totalCharacterCount;
			}
			m_textInfo.spriteCount = num;
			int num4 = (m_textInfo.materialCount = m_materialReferenceIndexLookup.Count);
			if (num4 > m_textInfo.meshInfo.Length)
			{
				TMP_TextInfo.Resize(ref m_textInfo.meshInfo, num4, isBlockAllocated: false);
			}
			if (num4 > m_subTextObjects.Length)
			{
				TMP_TextInfo.Resize(ref m_subTextObjects, Mathf.NextPowerOfTwo(num4 + 1));
			}
			if (m_textInfo.characterInfo.Length - m_totalCharacterCount > 256)
			{
				TMP_TextInfo.Resize(ref m_textInfo.characterInfo, Mathf.Max(m_totalCharacterCount + 1, 256), isBlockAllocated: true);
			}
			for (int j = 0; j < num4; j++)
			{
				if (j > 0)
				{
					if ((Object)(object)m_subTextObjects[j] == (Object)null)
					{
						m_subTextObjects[j] = TMP_SubMesh.AddSubTextObject(this, m_materialReferences[j]);
						m_textInfo.meshInfo[j].vertices = null;
					}
					if ((Object)(object)m_subTextObjects[j].sharedMaterial == (Object)null || ((Object)m_subTextObjects[j].sharedMaterial).GetInstanceID() != ((Object)m_materialReferences[j].material).GetInstanceID())
					{
						bool isDefaultMaterial = m_materialReferences[j].isDefaultMaterial;
						m_subTextObjects[j].isDefaultMaterial = isDefaultMaterial;
						if (!isDefaultMaterial || (Object)(object)m_subTextObjects[j].sharedMaterial == (Object)null || ((Object)m_subTextObjects[j].sharedMaterial.GetTexture(ShaderUtilities.ID_MainTex)).GetInstanceID() != ((Object)m_materialReferences[j].material.GetTexture(ShaderUtilities.ID_MainTex)).GetInstanceID())
						{
							m_subTextObjects[j].sharedMaterial = m_materialReferences[j].material;
							m_subTextObjects[j].fontAsset = m_materialReferences[j].fontAsset;
							m_subTextObjects[j].spriteAsset = m_materialReferences[j].spriteAsset;
						}
					}
					if (m_materialReferences[j].isFallbackMaterial)
					{
						m_subTextObjects[j].fallbackMaterial = m_materialReferences[j].material;
						m_subTextObjects[j].fallbackSourceMaterial = m_materialReferences[j].fallbackMaterial;
					}
				}
				int referenceCount = m_materialReferences[j].referenceCount;
				if (m_textInfo.meshInfo[j].vertices == null || m_textInfo.meshInfo[j].vertices.Length < referenceCount * ((!m_isVolumetricText) ? 4 : 8))
				{
					if (m_textInfo.meshInfo[j].vertices == null)
					{
						if (j == 0)
						{
							m_textInfo.meshInfo[j] = new TMP_MeshInfo(m_mesh, referenceCount + 1, m_isVolumetricText);
						}
						else
						{
							m_textInfo.meshInfo[j] = new TMP_MeshInfo(m_subTextObjects[j].mesh, referenceCount + 1, m_isVolumetricText);
						}
					}
					else
					{
						m_textInfo.meshInfo[j].ResizeMeshInfo((referenceCount > 1024) ? (referenceCount + 256) : Mathf.NextPowerOfTwo(referenceCount + 1), m_isVolumetricText);
					}
				}
				else if (m_VertexBufferAutoSizeReduction && referenceCount > 0 && m_textInfo.meshInfo[j].vertices.Length - referenceCount * ((!m_isVolumetricText) ? 4 : 8) > 1024)
				{
					m_textInfo.meshInfo[j].ResizeMeshInfo((referenceCount > 1024) ? (referenceCount + 256) : Mathf.NextPowerOfTwo(referenceCount + 1), m_isVolumetricText);
				}
			}
			for (int k = num4; k < m_subTextObjects.Length && (Object)(object)m_subTextObjects[k] != (Object)null; k++)
			{
				if (k < m_textInfo.meshInfo.Length)
				{
					m_textInfo.meshInfo[k].ClearUnusedVertices(0, updateMesh: true);
				}
			}
			return m_totalCharacterCount;
		}

		public override void ComputeMarginSize()
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)base.rectTransform != (Object)null)
			{
				Rect rect = m_rectTransform.rect;
				m_marginWidth = ((Rect)(ref rect)).width - m_margin.x - m_margin.z;
				rect = m_rectTransform.rect;
				m_marginHeight = ((Rect)(ref rect)).height - m_margin.y - m_margin.w;
				m_RectTransformCorners = GetTextContainerLocalCorners();
			}
		}

		protected override void OnDidApplyAnimationProperties()
		{
			m_havePropertiesChanged = true;
			isMaskUpdateRequired = true;
			((Graphic)this).SetVerticesDirty();
		}

		protected override void OnTransformParentChanged()
		{
			((Graphic)this).SetVerticesDirty();
			((Graphic)this).SetLayoutDirty();
		}

		protected override void OnRectTransformDimensionsChange()
		{
			ComputeMarginSize();
			((Graphic)this).SetVerticesDirty();
			((Graphic)this).SetLayoutDirty();
		}

		internal override void InternalUpdate()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			if (!m_havePropertiesChanged)
			{
				float y = ((Transform)m_rectTransform).lossyScale.y;
				if (y != m_previousLossyScaleY && m_text != string.Empty && m_text != null)
				{
					float scaleDelta = y / m_previousLossyScaleY;
					UpdateSDFScale(scaleDelta);
					m_previousLossyScaleY = y;
				}
			}
			if (m_isUsingLegacyAnimationComponent)
			{
				m_havePropertiesChanged = true;
				OnPreRenderObject();
			}
		}

		private void OnPreRenderObject()
		{
			if (!m_isAwake || (!((UIBehaviour)this).IsActive() && !m_ignoreActiveState))
			{
				return;
			}
			loopCountA = 0;
			if (m_havePropertiesChanged || m_isLayoutDirty)
			{
				if (isMaskUpdateRequired)
				{
					UpdateMask();
					isMaskUpdateRequired = false;
				}
				if (checkPaddingRequired)
				{
					UpdateMeshPadding();
				}
				if (m_isInputParsingRequired || m_isTextTruncated)
				{
					ParseInputText();
				}
				if (m_enableAutoSizing)
				{
					m_fontSize = Mathf.Clamp(m_fontSizeBase, m_fontSizeMin, m_fontSizeMax);
				}
				m_maxFontSize = m_fontSizeMax;
				m_minFontSize = m_fontSizeMin;
				m_lineSpacingDelta = 0f;
				m_charWidthAdjDelta = 0f;
				m_isCharacterWrappingEnabled = false;
				m_isTextTruncated = false;
				m_havePropertiesChanged = false;
				m_isLayoutDirty = false;
				m_ignoreActiveState = false;
				GenerateTextMesh();
			}
		}

		protected override void GenerateTextMesh()
		{
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Unknown result type (might be due to invalid IL or missing references)
			//IL_021b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0220: Unknown result type (might be due to invalid IL or missing references)
			//IL_0222: Unknown result type (might be due to invalid IL or missing references)
			//IL_0227: Unknown result type (might be due to invalid IL or missing references)
			//IL_022c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0231: Unknown result type (might be due to invalid IL or missing references)
			//IL_0233: Unknown result type (might be due to invalid IL or missing references)
			//IL_0238: Unknown result type (might be due to invalid IL or missing references)
			//IL_023d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0242: Unknown result type (might be due to invalid IL or missing references)
			//IL_0244: Unknown result type (might be due to invalid IL or missing references)
			//IL_0249: Unknown result type (might be due to invalid IL or missing references)
			//IL_024d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0252: Unknown result type (might be due to invalid IL or missing references)
			//IL_0257: Unknown result type (might be due to invalid IL or missing references)
			//IL_025e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0263: Unknown result type (might be due to invalid IL or missing references)
			//IL_026a: Unknown result type (might be due to invalid IL or missing references)
			//IL_026f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0276: Unknown result type (might be due to invalid IL or missing references)
			//IL_027b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0287: Unknown result type (might be due to invalid IL or missing references)
			//IL_0298: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_0305: Unknown result type (might be due to invalid IL or missing references)
			//IL_030a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0319: Unknown result type (might be due to invalid IL or missing references)
			//IL_031e: Unknown result type (might be due to invalid IL or missing references)
			//IL_032d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0332: Unknown result type (might be due to invalid IL or missing references)
			//IL_0412: Unknown result type (might be due to invalid IL or missing references)
			//IL_0417: Unknown result type (might be due to invalid IL or missing references)
			//IL_0468: Unknown result type (might be due to invalid IL or missing references)
			//IL_046d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0478: Unknown result type (might be due to invalid IL or missing references)
			//IL_047d: Unknown result type (might be due to invalid IL or missing references)
			//IL_339c: Unknown result type (might be due to invalid IL or missing references)
			//IL_33a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_3811: Unknown result type (might be due to invalid IL or missing references)
			//IL_3819: Unknown result type (might be due to invalid IL or missing references)
			//IL_381e: Unknown result type (might be due to invalid IL or missing references)
			//IL_3828: Unknown result type (might be due to invalid IL or missing references)
			//IL_3832: Unknown result type (might be due to invalid IL or missing references)
			//IL_3844: Unknown result type (might be due to invalid IL or missing references)
			//IL_3849: Unknown result type (might be due to invalid IL or missing references)
			//IL_384e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a70: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a75: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a91: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a96: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ab2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ab7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ad3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ad8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0942: Unknown result type (might be due to invalid IL or missing references)
			//IL_0947: Unknown result type (might be due to invalid IL or missing references)
			//IL_0958: Unknown result type (might be due to invalid IL or missing references)
			//IL_095d: Unknown result type (might be due to invalid IL or missing references)
			//IL_074b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0750: Unknown result type (might be due to invalid IL or missing references)
			//IL_38d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_38dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_38e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_38eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_38f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_3908: Unknown result type (might be due to invalid IL or missing references)
			//IL_3910: Unknown result type (might be due to invalid IL or missing references)
			//IL_3924: Unknown result type (might be due to invalid IL or missing references)
			//IL_3929: Unknown result type (might be due to invalid IL or missing references)
			//IL_392e: Unknown result type (might be due to invalid IL or missing references)
			//IL_3858: Unknown result type (might be due to invalid IL or missing references)
			//IL_3860: Unknown result type (might be due to invalid IL or missing references)
			//IL_3865: Unknown result type (might be due to invalid IL or missing references)
			//IL_386f: Unknown result type (might be due to invalid IL or missing references)
			//IL_3879: Unknown result type (might be due to invalid IL or missing references)
			//IL_3896: Unknown result type (might be due to invalid IL or missing references)
			//IL_38af: Unknown result type (might be due to invalid IL or missing references)
			//IL_38c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_38c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_38cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_3930: Unknown result type (might be due to invalid IL or missing references)
			//IL_3935: Unknown result type (might be due to invalid IL or missing references)
			//IL_3937: Unknown result type (might be due to invalid IL or missing references)
			//IL_393c: Unknown result type (might be due to invalid IL or missing references)
			//IL_3960: Unknown result type (might be due to invalid IL or missing references)
			//IL_3976: Unknown result type (might be due to invalid IL or missing references)
			//IL_397b: Unknown result type (might be due to invalid IL or missing references)
			//IL_3980: Unknown result type (might be due to invalid IL or missing references)
			//IL_3982: Unknown result type (might be due to invalid IL or missing references)
			//IL_3987: Unknown result type (might be due to invalid IL or missing references)
			//IL_398c: Unknown result type (might be due to invalid IL or missing references)
			//IL_3630: Unknown result type (might be due to invalid IL or missing references)
			//IL_363a: Unknown result type (might be due to invalid IL or missing references)
			//IL_365f: Unknown result type (might be due to invalid IL or missing references)
			//IL_366c: Unknown result type (might be due to invalid IL or missing references)
			//IL_3671: Unknown result type (might be due to invalid IL or missing references)
			//IL_3676: Unknown result type (might be due to invalid IL or missing references)
			//IL_35f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_35fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_360f: Unknown result type (might be due to invalid IL or missing references)
			//IL_361c: Unknown result type (might be due to invalid IL or missing references)
			//IL_3621: Unknown result type (might be due to invalid IL or missing references)
			//IL_3626: Unknown result type (might be due to invalid IL or missing references)
			//IL_0761: Unknown result type (might be due to invalid IL or missing references)
			//IL_0766: Unknown result type (might be due to invalid IL or missing references)
			//IL_0777: Unknown result type (might be due to invalid IL or missing references)
			//IL_077c: Unknown result type (might be due to invalid IL or missing references)
			//IL_37c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_37cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_37f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_37fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_3802: Unknown result type (might be due to invalid IL or missing references)
			//IL_3807: Unknown result type (might be due to invalid IL or missing references)
			//IL_3786: Unknown result type (might be due to invalid IL or missing references)
			//IL_3790: Unknown result type (might be due to invalid IL or missing references)
			//IL_37a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_37ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_37b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_37b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_36f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_36f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_36fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_3707: Unknown result type (might be due to invalid IL or missing references)
			//IL_3711: Unknown result type (might be due to invalid IL or missing references)
			//IL_3735: Unknown result type (might be due to invalid IL or missing references)
			//IL_3755: Unknown result type (might be due to invalid IL or missing references)
			//IL_3769: Unknown result type (might be due to invalid IL or missing references)
			//IL_376e: Unknown result type (might be due to invalid IL or missing references)
			//IL_3773: Unknown result type (might be due to invalid IL or missing references)
			//IL_3689: Unknown result type (might be due to invalid IL or missing references)
			//IL_3691: Unknown result type (might be due to invalid IL or missing references)
			//IL_3696: Unknown result type (might be due to invalid IL or missing references)
			//IL_36a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_36aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_36bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_36c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_36dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_36e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_36e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c66: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c6b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cfc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d01: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d1b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d20: Unknown result type (might be due to invalid IL or missing references)
			//IL_07a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_07a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_07b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_07bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_3ce1: Unknown result type (might be due to invalid IL or missing references)
			//IL_3cf2: Unknown result type (might be due to invalid IL or missing references)
			//IL_3ff1: Unknown result type (might be due to invalid IL or missing references)
			//IL_3ff3: Unknown result type (might be due to invalid IL or missing references)
			//IL_3ff5: Unknown result type (might be due to invalid IL or missing references)
			//IL_3ffa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e58: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e5d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e7a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e7f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e9e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ea3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ede: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ee3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f1b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f29: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f3b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f40: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f68: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f7a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f7f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fb1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fcb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fd9: Unknown result type (might be due to invalid IL or missing references)
			//IL_5220: Unknown result type (might be due to invalid IL or missing references)
			//IL_5225: Unknown result type (might be due to invalid IL or missing references)
			//IL_5227: Unknown result type (might be due to invalid IL or missing references)
			//IL_522c: Unknown result type (might be due to invalid IL or missing references)
			//IL_5249: Unknown result type (might be due to invalid IL or missing references)
			//IL_524e: Unknown result type (might be due to invalid IL or missing references)
			//IL_5250: Unknown result type (might be due to invalid IL or missing references)
			//IL_5255: Unknown result type (might be due to invalid IL or missing references)
			//IL_5272: Unknown result type (might be due to invalid IL or missing references)
			//IL_5277: Unknown result type (might be due to invalid IL or missing references)
			//IL_5279: Unknown result type (might be due to invalid IL or missing references)
			//IL_527e: Unknown result type (might be due to invalid IL or missing references)
			//IL_529b: Unknown result type (might be due to invalid IL or missing references)
			//IL_52a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_52a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_52a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_52c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_52e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_5309: Unknown result type (might be due to invalid IL or missing references)
			//IL_532b: Unknown result type (might be due to invalid IL or missing references)
			//IL_534d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1196: Unknown result type (might be due to invalid IL or missing references)
			//IL_1198: Unknown result type (might be due to invalid IL or missing references)
			//IL_11b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_11b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_11d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_11d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_11ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_11ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_1256: Unknown result type (might be due to invalid IL or missing references)
			//IL_125d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1265: Unknown result type (might be due to invalid IL or missing references)
			//IL_126c: Unknown result type (might be due to invalid IL or missing references)
			//IL_1280: Unknown result type (might be due to invalid IL or missing references)
			//IL_1285: Unknown result type (might be due to invalid IL or missing references)
			//IL_10e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_10f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_10f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_10fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_1105: Unknown result type (might be due to invalid IL or missing references)
			//IL_110a: Unknown result type (might be due to invalid IL or missing references)
			//IL_1112: Unknown result type (might be due to invalid IL or missing references)
			//IL_1114: Unknown result type (might be due to invalid IL or missing references)
			//IL_1116: Unknown result type (might be due to invalid IL or missing references)
			//IL_111b: Unknown result type (might be due to invalid IL or missing references)
			//IL_1120: Unknown result type (might be due to invalid IL or missing references)
			//IL_1122: Unknown result type (might be due to invalid IL or missing references)
			//IL_1127: Unknown result type (might be due to invalid IL or missing references)
			//IL_112f: Unknown result type (might be due to invalid IL or missing references)
			//IL_1131: Unknown result type (might be due to invalid IL or missing references)
			//IL_1133: Unknown result type (might be due to invalid IL or missing references)
			//IL_1138: Unknown result type (might be due to invalid IL or missing references)
			//IL_113d: Unknown result type (might be due to invalid IL or missing references)
			//IL_113f: Unknown result type (might be due to invalid IL or missing references)
			//IL_1144: Unknown result type (might be due to invalid IL or missing references)
			//IL_114c: Unknown result type (might be due to invalid IL or missing references)
			//IL_114e: Unknown result type (might be due to invalid IL or missing references)
			//IL_1150: Unknown result type (might be due to invalid IL or missing references)
			//IL_1155: Unknown result type (might be due to invalid IL or missing references)
			//IL_115a: Unknown result type (might be due to invalid IL or missing references)
			//IL_115c: Unknown result type (might be due to invalid IL or missing references)
			//IL_1161: Unknown result type (might be due to invalid IL or missing references)
			//IL_1169: Unknown result type (might be due to invalid IL or missing references)
			//IL_116b: Unknown result type (might be due to invalid IL or missing references)
			//IL_116d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1172: Unknown result type (might be due to invalid IL or missing references)
			//IL_1177: Unknown result type (might be due to invalid IL or missing references)
			//IL_1179: Unknown result type (might be due to invalid IL or missing references)
			//IL_117e: Unknown result type (might be due to invalid IL or missing references)
			//IL_5390: Unknown result type (might be due to invalid IL or missing references)
			//IL_53b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_53d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_543c: Unknown result type (might be due to invalid IL or missing references)
			//IL_5441: Unknown result type (might be due to invalid IL or missing references)
			//IL_54a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_54aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_4451: Unknown result type (might be due to invalid IL or missing references)
			//IL_44bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_452d: Unknown result type (might be due to invalid IL or missing references)
			//IL_459b: Unknown result type (might be due to invalid IL or missing references)
			//IL_1034: Unknown result type (might be due to invalid IL or missing references)
			//IL_1039: Unknown result type (might be due to invalid IL or missing references)
			//IL_1069: Unknown result type (might be due to invalid IL or missing references)
			//IL_106e: Unknown result type (might be due to invalid IL or missing references)
			//IL_1082: Unknown result type (might be due to invalid IL or missing references)
			//IL_1087: Unknown result type (might be due to invalid IL or missing references)
			//IL_10a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_10ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_10ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_10b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_10b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_10b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_10b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_10bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_10bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_10c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_10c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_10c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_10ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_10cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_10ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_10d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_54d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_54f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_551b: Unknown result type (might be due to invalid IL or missing references)
			//IL_5583: Unknown result type (might be due to invalid IL or missing references)
			//IL_5588: Unknown result type (might be due to invalid IL or missing references)
			//IL_55ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_55f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_4294: Unknown result type (might be due to invalid IL or missing references)
			//IL_4302: Unknown result type (might be due to invalid IL or missing references)
			//IL_4370: Unknown result type (might be due to invalid IL or missing references)
			//IL_43de: Unknown result type (might be due to invalid IL or missing references)
			//IL_4129: Unknown result type (might be due to invalid IL or missing references)
			//IL_4136: Unknown result type (might be due to invalid IL or missing references)
			//IL_4142: Unknown result type (might be due to invalid IL or missing references)
			//IL_4183: Unknown result type (might be due to invalid IL or missing references)
			//IL_4190: Unknown result type (might be due to invalid IL or missing references)
			//IL_419c: Unknown result type (might be due to invalid IL or missing references)
			//IL_41dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_41ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_41f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_4237: Unknown result type (might be due to invalid IL or missing references)
			//IL_4244: Unknown result type (might be due to invalid IL or missing references)
			//IL_4250: Unknown result type (might be due to invalid IL or missing references)
			//IL_46ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_46ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_46c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_4707: Unknown result type (might be due to invalid IL or missing references)
			//IL_4714: Unknown result type (might be due to invalid IL or missing references)
			//IL_4720: Unknown result type (might be due to invalid IL or missing references)
			//IL_5182: Unknown result type (might be due to invalid IL or missing references)
			//IL_5187: Unknown result type (might be due to invalid IL or missing references)
			//IL_519a: Unknown result type (might be due to invalid IL or missing references)
			//IL_519f: Unknown result type (might be due to invalid IL or missing references)
			//IL_51b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_51b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_51ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_51cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_1305: Unknown result type (might be due to invalid IL or missing references)
			//IL_130a: Unknown result type (might be due to invalid IL or missing references)
			//IL_5011: Unknown result type (might be due to invalid IL or missing references)
			//IL_5016: Unknown result type (might be due to invalid IL or missing references)
			//IL_5018: Unknown result type (might be due to invalid IL or missing references)
			//IL_501d: Unknown result type (might be due to invalid IL or missing references)
			//IL_5036: Unknown result type (might be due to invalid IL or missing references)
			//IL_503b: Unknown result type (might be due to invalid IL or missing references)
			//IL_503d: Unknown result type (might be due to invalid IL or missing references)
			//IL_5042: Unknown result type (might be due to invalid IL or missing references)
			//IL_505b: Unknown result type (might be due to invalid IL or missing references)
			//IL_5060: Unknown result type (might be due to invalid IL or missing references)
			//IL_5062: Unknown result type (might be due to invalid IL or missing references)
			//IL_5067: Unknown result type (might be due to invalid IL or missing references)
			//IL_5080: Unknown result type (might be due to invalid IL or missing references)
			//IL_5085: Unknown result type (might be due to invalid IL or missing references)
			//IL_5087: Unknown result type (might be due to invalid IL or missing references)
			//IL_508c: Unknown result type (might be due to invalid IL or missing references)
			//IL_5da4: Unknown result type (might be due to invalid IL or missing references)
			//IL_5da9: Unknown result type (might be due to invalid IL or missing references)
			//IL_5d5a: Unknown result type (might be due to invalid IL or missing references)
			//IL_5d5c: Unknown result type (might be due to invalid IL or missing references)
			//IL_5d68: Unknown result type (might be due to invalid IL or missing references)
			//IL_50f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_50f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_50f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_50fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_5117: Unknown result type (might be due to invalid IL or missing references)
			//IL_511c: Unknown result type (might be due to invalid IL or missing references)
			//IL_511e: Unknown result type (might be due to invalid IL or missing references)
			//IL_5123: Unknown result type (might be due to invalid IL or missing references)
			//IL_513c: Unknown result type (might be due to invalid IL or missing references)
			//IL_5141: Unknown result type (might be due to invalid IL or missing references)
			//IL_5143: Unknown result type (might be due to invalid IL or missing references)
			//IL_5148: Unknown result type (might be due to invalid IL or missing references)
			//IL_5161: Unknown result type (might be due to invalid IL or missing references)
			//IL_5166: Unknown result type (might be due to invalid IL or missing references)
			//IL_5168: Unknown result type (might be due to invalid IL or missing references)
			//IL_516d: Unknown result type (might be due to invalid IL or missing references)
			//IL_62a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_62a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_62b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_13c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_13c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_65e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_65e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_65e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_5ab6: Unknown result type (might be due to invalid IL or missing references)
			//IL_5ab8: Unknown result type (might be due to invalid IL or missing references)
			//IL_5ac4: Unknown result type (might be due to invalid IL or missing references)
			//IL_5993: Unknown result type (might be due to invalid IL or missing references)
			//IL_5998: Unknown result type (might be due to invalid IL or missing references)
			//IL_1405: Unknown result type (might be due to invalid IL or missing references)
			//IL_140a: Unknown result type (might be due to invalid IL or missing references)
			//IL_5f43: Unknown result type (might be due to invalid IL or missing references)
			//IL_5f45: Unknown result type (might be due to invalid IL or missing references)
			//IL_5f51: Unknown result type (might be due to invalid IL or missing references)
			//IL_63ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_63b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_63b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_63b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_5c2e: Unknown result type (might be due to invalid IL or missing references)
			//IL_5c30: Unknown result type (might be due to invalid IL or missing references)
			//IL_5c3c: Unknown result type (might be due to invalid IL or missing references)
			//IL_146f: Unknown result type (might be due to invalid IL or missing references)
			//IL_1474: Unknown result type (might be due to invalid IL or missing references)
			//IL_63c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_63f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_6421: Unknown result type (might be due to invalid IL or missing references)
			//IL_644a: Unknown result type (might be due to invalid IL or missing references)
			//IL_644c: Unknown result type (might be due to invalid IL or missing references)
			//IL_6450: Unknown result type (might be due to invalid IL or missing references)
			//IL_645a: Unknown result type (might be due to invalid IL or missing references)
			//IL_645c: Unknown result type (might be due to invalid IL or missing references)
			//IL_64af: Unknown result type (might be due to invalid IL or missing references)
			//IL_64b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_5ecd: Unknown result type (might be due to invalid IL or missing references)
			//IL_5ed2: Unknown result type (might be due to invalid IL or missing references)
			//IL_5c73: Unknown result type 

Room Architect Tool_Data/Managed/Unity.Timeline.dll

Decompiled 3 months ago
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using UnityEngine.Animations;
using UnityEngine.Audio;
using UnityEngine.Events;
using UnityEngine.Playables;
using UnityEngine.Serialization;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("UnityEngine.Timeline")]
[assembly: AssemblyDescription("Unity Timeline")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Unity Technologies")]
[assembly: AssemblyProduct("UnityEngine.Timeline")]
[assembly: AssemblyCopyright("Copyright \ufffd 2016")]
[assembly: AssemblyTrademark("")]
[assembly: InternalsVisibleTo("Unity.Timeline.Editor")]
[assembly: ComVisible(false)]
[assembly: Guid("6A10B290-9283-487F-913B-00D94CD3FAF5")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-Editor-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline.EditorTests")]
[assembly: InternalsVisibleTo("Unity.Timeline.Tests")]
[assembly: InternalsVisibleTo("Unity.Timeline.Tests.Common")]
[assembly: InternalsVisibleTo("Unity.Timeline.Tests.Performance")]
[assembly: InternalsVisibleTo("Unity.Timeline.Tests.Performance.Editor")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace UnityEngine.Timeline;

internal class ActivationMixerPlayable : PlayableBehaviour
{
	private ActivationTrack.PostPlaybackState m_PostPlaybackState;

	private bool m_BoundGameObjectInitialStateIsActive;

	private GameObject m_BoundGameObject;

	public ActivationTrack.PostPlaybackState postPlaybackState
	{
		get
		{
			return m_PostPlaybackState;
		}
		set
		{
			m_PostPlaybackState = value;
		}
	}

	public static ScriptPlayable<ActivationMixerPlayable> Create(PlayableGraph graph, int inputCount)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		return ScriptPlayable<ActivationMixerPlayable>.Create(graph, inputCount);
	}

	public override void OnPlayableDestroy(Playable playable)
	{
		if (!((Object)(object)m_BoundGameObject == (Object)null))
		{
			switch (m_PostPlaybackState)
			{
			case ActivationTrack.PostPlaybackState.Active:
				m_BoundGameObject.SetActive(true);
				break;
			case ActivationTrack.PostPlaybackState.Inactive:
				m_BoundGameObject.SetActive(false);
				break;
			case ActivationTrack.PostPlaybackState.Revert:
				m_BoundGameObject.SetActive(m_BoundGameObjectInitialStateIsActive);
				break;
			case ActivationTrack.PostPlaybackState.LeaveAsIs:
				break;
			}
		}
	}

	public override void ProcessFrame(Playable playable, FrameData info, object playerData)
	{
		//IL_004b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)m_BoundGameObject == (Object)null)
		{
			m_BoundGameObject = (GameObject)((playerData is GameObject) ? playerData : null);
			m_BoundGameObjectInitialStateIsActive = (Object)(object)m_BoundGameObject != (Object)null && m_BoundGameObject.activeSelf;
		}
		if ((Object)(object)m_BoundGameObject == (Object)null)
		{
			return;
		}
		int inputCount = PlayableExtensions.GetInputCount<Playable>(playable);
		bool active = false;
		for (int i = 0; i < inputCount; i++)
		{
			if (PlayableExtensions.GetInputWeight<Playable>(playable, i) > 0f)
			{
				active = true;
				break;
			}
		}
		m_BoundGameObject.SetActive(active);
	}
}
internal class ActivationPlayableAsset : PlayableAsset, ITimelineClipAsset
{
	public ClipCaps clipCaps => ClipCaps.None;

	public override Playable CreatePlayable(PlayableGraph graph, GameObject go)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		return Playable.Create(graph, 0);
	}
}
[Serializable]
[TrackClipType(typeof(ActivationPlayableAsset))]
[TrackBindingType(typeof(GameObject))]
public class ActivationTrack : TrackAsset
{
	public enum PostPlaybackState
	{
		Active,
		Inactive,
		Revert,
		LeaveAsIs
	}

	[SerializeField]
	private PostPlaybackState m_PostPlaybackState = PostPlaybackState.LeaveAsIs;

	private ActivationMixerPlayable m_ActivationMixer;

	public PostPlaybackState postPlaybackState
	{
		get
		{
			return m_PostPlaybackState;
		}
		set
		{
			m_PostPlaybackState = value;
			UpdateTrackMode();
		}
	}

	internal override bool CanCompileClips()
	{
		if (base.hasClips)
		{
			return base.CanCompileClips();
		}
		return true;
	}

	public override Playable CreateTrackMixer(PlayableGraph graph, GameObject go, int inputCount)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		ScriptPlayable<ActivationMixerPlayable> val = ActivationMixerPlayable.Create(graph, inputCount);
		m_ActivationMixer = val.GetBehaviour();
		UpdateTrackMode();
		return ScriptPlayable<ActivationMixerPlayable>.op_Implicit(val);
	}

	internal void UpdateTrackMode()
	{
		if (m_ActivationMixer != null)
		{
			m_ActivationMixer.postPlaybackState = m_PostPlaybackState;
		}
	}

	public override void GatherProperties(PlayableDirector director, IPropertyCollector driver)
	{
		GameObject gameObjectBinding = GetGameObjectBinding(director);
		if ((Object)(object)gameObjectBinding != (Object)null)
		{
			driver.AddFromName(gameObjectBinding, "m_IsActive");
		}
	}

	protected override void OnCreateClip(TimelineClip clip)
	{
		clip.displayName = "Active";
		base.OnCreateClip(clip);
	}
}
internal class AnimationOutputWeightProcessor : ITimelineEvaluateCallback
{
	private struct WeightInfo
	{
		public Playable mixer;

		public Playable parentMixer;

		public int port;

		public bool modulate;
	}

	private AnimationPlayableOutput m_Output;

	private AnimationMotionXToDeltaPlayable m_MotionXPlayable;

	private AnimationMixerPlayable m_PoseMixer;

	private AnimationLayerMixerPlayable m_LayerMixer;

	private readonly List<WeightInfo> m_Mixers = new List<WeightInfo>();

	public AnimationOutputWeightProcessor(AnimationPlayableOutput output)
	{
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: 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)
		m_Output = output;
		PlayableOutputExtensions.SetWeight<AnimationPlayableOutput>(output, 0f);
		FindMixers();
	}

	private static Playable FindFirstAnimationPlayable(Playable p)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0038: Unknown result type (might be due to invalid IL or missing references)
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		//IL_0004: Unknown result type (might be due to invalid IL or missing references)
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		Playable val = p;
		while (PlayableExtensions.IsValid<Playable>(val) && PlayableExtensions.GetInputCount<Playable>(val) > 0 && !((Playable)(ref val)).IsPlayableOfType<AnimationLayerMixerPlayable>() && !((Playable)(ref val)).IsPlayableOfType<AnimationMotionXToDeltaPlayable>() && !((Playable)(ref val)).IsPlayableOfType<AnimationMixerPlayable>())
		{
			val = PlayableExtensions.GetInput<Playable>(val, 0);
		}
		return val;
	}

	private void FindMixers()
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		//IL_0027: 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_0032: Unknown result type (might be due to invalid IL or missing references)
		//IL_0037: Unknown result type (might be due to invalid IL or missing references)
		//IL_0039: Unknown result type (might be due to invalid IL or missing references)
		//IL_0044: Unknown result type (might be due to invalid IL or missing references)
		//IL_0051: Unknown result type (might be due to invalid IL or missing references)
		//IL_005a: Unknown result type (might be due to invalid IL or missing references)
		//IL_005c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0061: Unknown result type (might be due to invalid IL or missing references)
		//IL_0066: Unknown result type (might be due to invalid IL or missing references)
		//IL_0067: Unknown result type (might be due to invalid IL or missing references)
		//IL_0068: Unknown result type (might be due to invalid IL or missing references)
		//IL_008b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0073: Unknown result type (might be due to invalid IL or missing references)
		//IL_0074: Unknown result type (might be due to invalid IL or missing references)
		//IL_0079: Unknown result type (might be due to invalid IL or missing references)
		//IL_007f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0085: Unknown result type (might be due to invalid IL or missing references)
		//IL_008a: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
		//IL_009d: Unknown result type (might be due to invalid IL or missing references)
		//IL_009e: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00af: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
		//IL_0103: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0116: Unknown result type (might be due to invalid IL or missing references)
		//IL_011b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0123: Unknown result type (might be due to invalid IL or missing references)
		//IL_012a: Unknown result type (might be due to invalid IL or missing references)
		m_Mixers.Clear();
		m_PoseMixer = AnimationMixerPlayable.Null;
		m_LayerMixer = AnimationLayerMixerPlayable.Null;
		m_MotionXPlayable = AnimationMotionXToDeltaPlayable.Null;
		Playable sourcePlayable = PlayableOutputExtensions.GetSourcePlayable<AnimationPlayableOutput>(m_Output);
		int sourceOutputPort = PlayableOutputExtensions.GetSourceOutputPort<AnimationPlayableOutput>(m_Output);
		if (!PlayableExtensions.IsValid<Playable>(sourcePlayable) || sourceOutputPort < 0 || sourceOutputPort >= PlayableExtensions.GetInputCount<Playable>(sourcePlayable))
		{
			return;
		}
		Playable val = FindFirstAnimationPlayable(PlayableExtensions.GetInput<Playable>(sourcePlayable, sourceOutputPort));
		Playable val2 = val;
		if (((Playable)(ref val2)).IsPlayableOfType<AnimationMotionXToDeltaPlayable>())
		{
			m_MotionXPlayable = (AnimationMotionXToDeltaPlayable)val2;
			val = PlayableExtensions.GetInput<AnimationMotionXToDeltaPlayable>(m_MotionXPlayable, 0);
		}
		if (PlayableExtensions.IsValid<Playable>(val) && ((Playable)(ref val)).IsPlayableOfType<AnimationMixerPlayable>())
		{
			m_PoseMixer = (AnimationMixerPlayable)val;
			Playable input = PlayableExtensions.GetInput<AnimationMixerPlayable>(m_PoseMixer, 0);
			if (PlayableExtensions.IsValid<Playable>(input) && ((Playable)(ref input)).IsPlayableOfType<AnimationLayerMixerPlayable>())
			{
				m_LayerMixer = (AnimationLayerMixerPlayable)input;
			}
		}
		else if (PlayableExtensions.IsValid<Playable>(val) && ((Playable)(ref val)).IsPlayableOfType<AnimationLayerMixerPlayable>())
		{
			m_LayerMixer = (AnimationLayerMixerPlayable)val;
		}
		if (PlayableExtensions.IsValid<AnimationLayerMixerPlayable>(m_LayerMixer))
		{
			int inputCount = PlayableExtensions.GetInputCount<AnimationLayerMixerPlayable>(m_LayerMixer);
			for (int i = 0; i < inputCount; i++)
			{
				FindMixers(AnimationLayerMixerPlayable.op_Implicit(m_LayerMixer), i, PlayableExtensions.GetInput<AnimationLayerMixerPlayable>(m_LayerMixer, i));
			}
		}
	}

	private void FindMixers(Playable parent, int port, Playable node)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: Unknown result type (might be due to invalid IL or missing references)
		//IL_009e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		//IL_0045: Unknown result type (might be due to invalid IL or missing references)
		//IL_0061: Unknown result type (might be due to invalid IL or missing references)
		//IL_0062: Unknown result type (might be due to invalid IL or missing references)
		//IL_0069: Unknown result type (might be due to invalid IL or missing references)
		//IL_006a: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
		if (!PlayableExtensions.IsValid<Playable>(node))
		{
			return;
		}
		Type playableType = ((Playable)(ref node)).GetPlayableType();
		if (playableType == typeof(AnimationMixerPlayable) || playableType == typeof(AnimationLayerMixerPlayable))
		{
			int inputCount = PlayableExtensions.GetInputCount<Playable>(node);
			for (int i = 0; i < inputCount; i++)
			{
				FindMixers(node, i, PlayableExtensions.GetInput<Playable>(node, i));
			}
			WeightInfo weightInfo = default(WeightInfo);
			weightInfo.parentMixer = parent;
			weightInfo.mixer = node;
			weightInfo.port = port;
			weightInfo.modulate = playableType == typeof(AnimationLayerMixerPlayable);
			WeightInfo item = weightInfo;
			m_Mixers.Add(item);
		}
		else
		{
			int inputCount2 = PlayableExtensions.GetInputCount<Playable>(node);
			for (int j = 0; j < inputCount2; j++)
			{
				FindMixers(parent, port, PlayableExtensions.GetInput<Playable>(node, j));
			}
		}
	}

	public void Evaluate()
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0073: Unknown result type (might be due to invalid IL or missing references)
		//IL_0078: Unknown result type (might be due to invalid IL or missing references)
		//IL_0031: Unknown result type (might be due to invalid IL or missing references)
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		//IL_009f: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0111: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
		//IL_0100: Unknown result type (might be due to invalid IL or missing references)
		PlayableOutputExtensions.SetWeight<AnimationPlayableOutput>(m_Output, 1f);
		for (int i = 0; i < m_Mixers.Count; i++)
		{
			WeightInfo weightInfo = m_Mixers[i];
			float num = (weightInfo.modulate ? PlayableExtensions.GetInputWeight<Playable>(weightInfo.parentMixer, weightInfo.port) : 1f);
			PlayableExtensions.SetInputWeight<Playable>(weightInfo.parentMixer, weightInfo.port, num * WeightUtility.NormalizeMixer(weightInfo.mixer));
		}
		float num2 = WeightUtility.NormalizeMixer(AnimationLayerMixerPlayable.op_Implicit(m_LayerMixer));
		if ((Object)(object)((AnimationPlayableOutput)(ref m_Output)).GetTarget() == (Object)null)
		{
			return;
		}
		if (!Application.isPlaying && PlayableExtensions.IsValid<AnimationMotionXToDeltaPlayable>(m_MotionXPlayable) && ((AnimationMotionXToDeltaPlayable)(ref m_MotionXPlayable)).IsAbsoluteMotion())
		{
			PlayableExtensions.SetInputWeight<AnimationMixerPlayable>(m_PoseMixer, 0, num2);
			PlayableExtensions.SetInputWeight<AnimationMixerPlayable>(m_PoseMixer, 1, 1f - num2);
			return;
		}
		if (!((AnimationMixerPlayable)(ref m_PoseMixer)).Equals(AnimationMixerPlayable.Null))
		{
			PlayableExtensions.SetInputWeight<AnimationMixerPlayable>(m_PoseMixer, 0, 1f);
			PlayableExtensions.SetInputWeight<AnimationMixerPlayable>(m_PoseMixer, 1, 0f);
		}
		PlayableOutputExtensions.SetWeight<AnimationPlayableOutput>(m_Output, num2);
	}
}
[Serializable]
[NotKeyable]
public class AnimationPlayableAsset : PlayableAsset, ITimelineClipAsset, IPropertyPreview, ISerializationCallbackReceiver
{
	public enum LoopMode
	{
		[Tooltip("Use the loop time setting from the source AnimationClip.")]
		UseSourceAsset,
		[Tooltip("The source AnimationClip loops during playback.")]
		On,
		[Tooltip("The source AnimationClip does not loop during playback.")]
		Off
	}

	private enum Versions
	{
		Initial,
		RotationAsEuler
	}

	private static class AnimationPlayableAssetUpgrade
	{
		public static void ConvertRotationToEuler(AnimationPlayableAsset asset)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			asset.m_EulerAngles = ((Quaternion)(ref asset.m_Rotation)).eulerAngles;
		}
	}

	[SerializeField]
	private AnimationClip m_Clip;

	[SerializeField]
	private Vector3 m_Position = Vector3.zero;

	[SerializeField]
	private Vector3 m_EulerAngles = Vector3.zero;

	[SerializeField]
	private bool m_UseTrackMatchFields = true;

	[SerializeField]
	private MatchTargetFields m_MatchTargetFields = MatchTargetFieldConstants.All;

	[SerializeField]
	private bool m_RemoveStartOffset = true;

	[SerializeField]
	private bool m_ApplyFootIK = true;

	[SerializeField]
	private LoopMode m_Loop;

	private static readonly int k_LatestVersion = 1;

	[SerializeField]
	[HideInInspector]
	private int m_Version;

	[SerializeField]
	[Obsolete("Use m_RotationEuler Instead", false)]
	[HideInInspector]
	private Quaternion m_Rotation = Quaternion.identity;

	public Vector3 position
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return m_Position;
		}
		set
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			m_Position = value;
		}
	}

	public Quaternion rotation
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			return Quaternion.Euler(m_EulerAngles);
		}
		set
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			m_EulerAngles = ((Quaternion)(ref value)).eulerAngles;
		}
	}

	public Vector3 eulerAngles
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return m_EulerAngles;
		}
		set
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			m_EulerAngles = value;
		}
	}

	public bool useTrackMatchFields
	{
		get
		{
			return m_UseTrackMatchFields;
		}
		set
		{
			m_UseTrackMatchFields = value;
		}
	}

	public MatchTargetFields matchTargetFields
	{
		get
		{
			return m_MatchTargetFields;
		}
		set
		{
			m_MatchTargetFields = value;
		}
	}

	public bool removeStartOffset
	{
		get
		{
			return m_RemoveStartOffset;
		}
		set
		{
			m_RemoveStartOffset = value;
		}
	}

	public bool applyFootIK
	{
		get
		{
			return m_ApplyFootIK;
		}
		set
		{
			m_ApplyFootIK = value;
		}
	}

	public LoopMode loop
	{
		get
		{
			return m_Loop;
		}
		set
		{
			m_Loop = value;
		}
	}

	internal bool hasRootTransforms
	{
		get
		{
			if ((Object)(object)m_Clip != (Object)null)
			{
				return HasRootTransforms(m_Clip);
			}
			return false;
		}
	}

	internal AppliedOffsetMode appliedOffsetMode { get; set; }

	public AnimationClip clip
	{
		get
		{
			return m_Clip;
		}
		set
		{
			if ((Object)(object)value != (Object)null)
			{
				((Object)this).name = "AnimationPlayableAsset of " + ((Object)value).name;
			}
			m_Clip = value;
		}
	}

	public override double duration
	{
		get
		{
			if ((Object)(object)clip == (Object)null || clip.empty)
			{
				return ((PlayableAsset)this).duration;
			}
			double num = clip.length;
			if (num < 1.401298464324817E-45)
			{
				return ((PlayableAsset)this).duration;
			}
			if (clip.frameRate > 0f)
			{
				num = (double)Mathf.Round(clip.length * clip.frameRate) / (double)clip.frameRate;
			}
			return num;
		}
	}

	public override IEnumerable<PlayableBinding> outputs
	{
		get
		{
			yield return AnimationPlayableBinding.Create(((Object)this).name, (Object)(object)this);
		}
	}

	public ClipCaps clipCaps
	{
		get
		{
			ClipCaps clipCaps = ClipCaps.All;
			if ((Object)(object)m_Clip == (Object)null || m_Loop == LoopMode.Off || (m_Loop == LoopMode.UseSourceAsset && !((Motion)m_Clip).isLooping))
			{
				clipCaps &= ~ClipCaps.Looping;
			}
			if ((Object)(object)m_Clip == (Object)null || m_Clip.empty)
			{
				clipCaps &= ~ClipCaps.ClipIn;
			}
			return clipCaps;
		}
	}

	public override Playable CreatePlayable(PlayableGraph graph, GameObject go)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		//IL_002b: Unknown result type (might be due to invalid IL or missing references)
		return CreatePlayable(graph, m_Clip, position, eulerAngles, removeStartOffset, appliedOffsetMode, applyFootIK, m_Loop);
	}

	internal static Playable CreatePlayable(PlayableGraph graph, AnimationClip clip, Vector3 positionOffset, Vector3 eulerOffset, bool removeStartOffset, AppliedOffsetMode mode, bool applyFootIK, LoopMode loop)
	{
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0049: Unknown result type (might be due to invalid IL or missing references)
		//IL_004a: 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)
		//IL_0059: Unknown result type (might be due to invalid IL or missing references)
		//IL_005b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0060: Unknown result type (might be due to invalid IL or missing references)
		//IL_0063: Unknown result type (might be due to invalid IL or missing references)
		//IL_0065: Unknown result type (might be due to invalid IL or missing references)
		//IL_006d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0079: Unknown result type (might be due to invalid IL or missing references)
		//IL_007a: Unknown result type (might be due to invalid IL or missing references)
		//IL_007f: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
		//IL_008a: Unknown result type (might be due to invalid IL or missing references)
		//IL_008b: Unknown result type (might be due to invalid IL or missing references)
		//IL_008c: Unknown result type (might be due to invalid IL or missing references)
		//IL_008d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0093: Unknown result type (might be due to invalid IL or missing references)
		//IL_0098: Unknown result type (might be due to invalid IL or missing references)
		//IL_009b: Unknown result type (might be due to invalid IL or missing references)
		//IL_009d: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)clip == (Object)null || clip.legacy)
		{
			return Playable.Null;
		}
		AnimationClipPlayable val = AnimationClipPlayable.Create(graph, clip);
		((AnimationClipPlayable)(ref val)).SetRemoveStartOffset(removeStartOffset);
		((AnimationClipPlayable)(ref val)).SetApplyFootIK(applyFootIK);
		((AnimationClipPlayable)(ref val)).SetOverrideLoopTime(loop != LoopMode.UseSourceAsset);
		((AnimationClipPlayable)(ref val)).SetLoopTime(loop == LoopMode.On);
		Playable val2 = AnimationClipPlayable.op_Implicit(val);
		if (ShouldApplyScaleRemove(mode))
		{
			AnimationRemoveScalePlayable val3 = AnimationRemoveScalePlayable.Create(graph, 1);
			((PlayableGraph)(ref graph)).Connect<Playable, AnimationRemoveScalePlayable>(val2, 0, val3, 0);
			PlayableExtensions.SetInputWeight<AnimationRemoveScalePlayable>(val3, 0, 1f);
			val2 = AnimationRemoveScalePlayable.op_Implicit(val3);
		}
		if (ShouldApplyOffset(mode, clip))
		{
			AnimationOffsetPlayable val4 = AnimationOffsetPlayable.Create(graph, positionOffset, Quaternion.Euler(eulerOffset), 1);
			((PlayableGraph)(ref graph)).Connect<Playable, AnimationOffsetPlayable>(val2, 0, val4, 0);
			PlayableExtensions.SetInputWeight<AnimationOffsetPlayable>(val4, 0, 1f);
			val2 = AnimationOffsetPlayable.op_Implicit(val4);
		}
		return val2;
	}

	private static bool ShouldApplyOffset(AppliedOffsetMode mode, AnimationClip clip)
	{
		if (mode == AppliedOffsetMode.NoRootTransform || mode == AppliedOffsetMode.SceneOffsetLegacy)
		{
			return false;
		}
		return HasRootTransforms(clip);
	}

	private static bool ShouldApplyScaleRemove(AppliedOffsetMode mode)
	{
		if (mode != AppliedOffsetMode.SceneOffsetLegacyEditor && mode != AppliedOffsetMode.SceneOffsetLegacy)
		{
			return mode == AppliedOffsetMode.TransformOffsetLegacy;
		}
		return true;
	}

	public void ResetOffsets()
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		position = Vector3.zero;
		eulerAngles = Vector3.zero;
	}

	public void GatherProperties(PlayableDirector director, IPropertyCollector driver)
	{
		driver.AddFromClip(m_Clip);
	}

	internal static bool HasRootTransforms(AnimationClip clip)
	{
		if ((Object)(object)clip == (Object)null || clip.empty)
		{
			return false;
		}
		if (!clip.hasRootMotion && !clip.hasGenericRootTransform && !clip.hasMotionCurves)
		{
			return clip.hasRootCurves;
		}
		return true;
	}

	void ISerializationCallbackReceiver.OnBeforeSerialize()
	{
		m_Version = k_LatestVersion;
	}

	void ISerializationCallbackReceiver.OnAfterDeserialize()
	{
		if (m_Version < k_LatestVersion)
		{
			OnUpgradeFromVersion(m_Version);
		}
	}

	private void OnUpgradeFromVersion(int oldVersion)
	{
		if (oldVersion < 1)
		{
			AnimationPlayableAssetUpgrade.ConvertRotationToEuler(this);
		}
	}
}
[Flags]
public enum MatchTargetFields
{
	PositionX = 1,
	PositionY = 2,
	PositionZ = 4,
	RotationX = 8,
	RotationY = 0x10,
	RotationZ = 0x20
}
public enum TrackOffset
{
	ApplyTransformOffsets,
	ApplySceneOffsets,
	Auto
}
internal enum AppliedOffsetMode
{
	NoRootTransform,
	TransformOffset,
	SceneOffset,
	TransformOffsetLegacy,
	SceneOffsetLegacy,
	SceneOffsetEditor,
	SceneOffsetLegacyEditor
}
internal static class MatchTargetFieldConstants
{
	public static MatchTargetFields All = MatchTargetFields.PositionX | MatchTargetFields.PositionY | MatchTargetFields.PositionZ | MatchTargetFields.RotationX | MatchTargetFields.RotationY | MatchTargetFields.RotationZ;

	public static MatchTargetFields None = (MatchTargetFields)0;

	public static MatchTargetFields Position = MatchTargetFields.PositionX | MatchTargetFields.PositionY | MatchTargetFields.PositionZ;

	public static MatchTargetFields Rotation = MatchTargetFields.RotationX | MatchTargetFields.RotationY | MatchTargetFields.RotationZ;

	public static bool HasAny(this MatchTargetFields me, MatchTargetFields fields)
	{
		return (me & fields) != None;
	}

	public static MatchTargetFields Toggle(this MatchTargetFields me, MatchTargetFields flag)
	{
		return me ^ flag;
	}
}
[Serializable]
[TrackClipType(typeof(AnimationPlayableAsset), false)]
[TrackBindingType(typeof(Animator))]
[SupportsChildTracks(typeof(AnimationTrack), 1)]
public class AnimationTrack : TrackAsset
{
	private static class AnimationTrackUpgrade
	{
		public static void ConvertRotationsToEuler(AnimationTrack track)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: 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)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			track.m_EulerAngles = ((Quaternion)(ref track.m_Rotation)).eulerAngles;
			track.m_InfiniteClipOffsetEulerAngles = ((Quaternion)(ref track.m_OpenClipOffsetRotation)).eulerAngles;
		}

		public static void ConvertRootMotion(AnimationTrack track)
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			track.m_TrackOffset = TrackOffset.Auto;
			if (!track.m_ApplyOffsets)
			{
				track.m_Position = Vector3.zero;
				track.m_EulerAngles = Vector3.zero;
			}
		}

		public static void ConvertInfiniteTrack(AnimationTrack track)
		{
			track.m_InfiniteClip = track.m_AnimClip;
			track.m_AnimClip = null;
		}
	}

	private const string k_DefaultInfiniteClipName = "Recorded";

	private const string k_DefaultRecordableClipName = "Recorded";

	[SerializeField]
	[FormerlySerializedAs("m_OpenClipPreExtrapolation")]
	private TimelineClip.ClipExtrapolation m_InfiniteClipPreExtrapolation;

	[SerializeField]
	[FormerlySerializedAs("m_OpenClipPostExtrapolation")]
	private TimelineClip.ClipExtrapolation m_InfiniteClipPostExtrapolation;

	[SerializeField]
	[FormerlySerializedAs("m_OpenClipOffsetPosition")]
	private Vector3 m_InfiniteClipOffsetPosition = Vector3.zero;

	[SerializeField]
	[FormerlySerializedAs("m_OpenClipOffsetEulerAngles")]
	private Vector3 m_InfiniteClipOffsetEulerAngles = Vector3.zero;

	[SerializeField]
	[FormerlySerializedAs("m_OpenClipTimeOffset")]
	private double m_InfiniteClipTimeOffset;

	[SerializeField]
	[FormerlySerializedAs("m_OpenClipRemoveOffset")]
	private bool m_InfiniteClipRemoveOffset;

	[SerializeField]
	private bool m_InfiniteClipApplyFootIK = true;

	[SerializeField]
	[HideInInspector]
	private AnimationPlayableAsset.LoopMode mInfiniteClipLoop;

	[SerializeField]
	private MatchTargetFields m_MatchTargetFields = MatchTargetFieldConstants.All;

	[SerializeField]
	private Vector3 m_Position = Vector3.zero;

	[SerializeField]
	private Vector3 m_EulerAngles = Vector3.zero;

	[SerializeField]
	private AvatarMask m_AvatarMask;

	[SerializeField]
	private bool m_ApplyAvatarMask = true;

	[SerializeField]
	private TrackOffset m_TrackOffset;

	[SerializeField]
	[HideInInspector]
	private AnimationClip m_InfiniteClip;

	[SerializeField]
	[Obsolete("Use m_InfiniteClipOffsetEulerAngles Instead", false)]
	[HideInInspector]
	private Quaternion m_OpenClipOffsetRotation = Quaternion.identity;

	[SerializeField]
	[Obsolete("Use m_RotationEuler Instead", false)]
	[HideInInspector]
	private Quaternion m_Rotation = Quaternion.identity;

	[SerializeField]
	[Obsolete("Use m_RootTransformOffsetMode", false)]
	[HideInInspector]
	private bool m_ApplyOffsets;

	public Vector3 position
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return m_Position;
		}
		set
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			m_Position = value;
		}
	}

	public Quaternion rotation
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			return Quaternion.Euler(m_EulerAngles);
		}
		set
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			m_EulerAngles = ((Quaternion)(ref value)).eulerAngles;
		}
	}

	public Vector3 eulerAngles
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return m_EulerAngles;
		}
		set
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			m_EulerAngles = value;
		}
	}

	[Obsolete("applyOffset is deprecated. Use trackOffset instead", true)]
	public bool applyOffsets
	{
		get
		{
			return false;
		}
		set
		{
		}
	}

	public TrackOffset trackOffset
	{
		get
		{
			return m_TrackOffset;
		}
		set
		{
			m_TrackOffset = value;
		}
	}

	public MatchTargetFields matchTargetFields
	{
		get
		{
			return m_MatchTargetFields;
		}
		set
		{
			m_MatchTargetFields = value & MatchTargetFieldConstants.All;
		}
	}

	public AnimationClip infiniteClip
	{
		get
		{
			return m_InfiniteClip;
		}
		internal set
		{
			m_InfiniteClip = value;
		}
	}

	internal bool infiniteClipRemoveOffset
	{
		get
		{
			return m_InfiniteClipRemoveOffset;
		}
		set
		{
			m_InfiniteClipRemoveOffset = value;
		}
	}

	public AvatarMask avatarMask
	{
		get
		{
			return m_AvatarMask;
		}
		set
		{
			m_AvatarMask = value;
		}
	}

	public bool applyAvatarMask
	{
		get
		{
			return m_ApplyAvatarMask;
		}
		set
		{
			m_ApplyAvatarMask = value;
		}
	}

	public override IEnumerable<PlayableBinding> outputs
	{
		get
		{
			yield return AnimationPlayableBinding.Create(((Object)this).name, (Object)(object)this);
		}
	}

	public bool inClipMode
	{
		get
		{
			if (base.clips != null)
			{
				return base.clips.Length != 0;
			}
			return false;
		}
	}

	public Vector3 infiniteClipOffsetPosition
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return m_InfiniteClipOffsetPosition;
		}
		set
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			m_InfiniteClipOffsetPosition = value;
		}
	}

	public Quaternion infiniteClipOffsetRotation
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			return Quaternion.Euler(m_InfiniteClipOffsetEulerAngles);
		}
		set
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			m_InfiniteClipOffsetEulerAngles = ((Quaternion)(ref value)).eulerAngles;
		}
	}

	public Vector3 infiniteClipOffsetEulerAngles
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return m_InfiniteClipOffsetEulerAngles;
		}
		set
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			m_InfiniteClipOffsetEulerAngles = value;
		}
	}

	internal bool infiniteClipApplyFootIK
	{
		get
		{
			return m_InfiniteClipApplyFootIK;
		}
		set
		{
			m_InfiniteClipApplyFootIK = value;
		}
	}

	internal double infiniteClipTimeOffset
	{
		get
		{
			return m_InfiniteClipTimeOffset;
		}
		set
		{
			m_InfiniteClipTimeOffset = value;
		}
	}

	public TimelineClip.ClipExtrapolation infiniteClipPreExtrapolation
	{
		get
		{
			return m_InfiniteClipPreExtrapolation;
		}
		set
		{
			m_InfiniteClipPreExtrapolation = value;
		}
	}

	public TimelineClip.ClipExtrapolation infiniteClipPostExtrapolation
	{
		get
		{
			return m_InfiniteClipPostExtrapolation;
		}
		set
		{
			m_InfiniteClipPostExtrapolation = value;
		}
	}

	internal AnimationPlayableAsset.LoopMode infiniteClipLoop
	{
		get
		{
			return mInfiniteClipLoop;
		}
		set
		{
			mInfiniteClipLoop = value;
		}
	}

	[EditorBrowsable(EditorBrowsableState.Never)]
	[Obsolete("openClipOffsetPosition has been deprecated. Use infiniteClipOffsetPosition instead. (UnityUpgradable) -> infiniteClipOffsetPosition", true)]
	public Vector3 openClipOffsetPosition
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return infiniteClipOffsetPosition;
		}
		set
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			infiniteClipOffsetPosition = value;
		}
	}

	[EditorBrowsable(EditorBrowsableState.Never)]
	[Obsolete("openClipOffsetRotation has been deprecated. Use infiniteClipOffsetRotation instead. (UnityUpgradable) -> infiniteClipOffsetRotation", true)]
	public Quaternion openClipOffsetRotation
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return infiniteClipOffsetRotation;
		}
		set
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			infiniteClipOffsetRotation = value;
		}
	}

	[EditorBrowsable(EditorBrowsableState.Never)]
	[Obsolete("openClipOffsetEulerAngles has been deprecated. Use infiniteClipOffsetEulerAngles instead. (UnityUpgradable) -> infiniteClipOffsetEulerAngles", true)]
	public Vector3 openClipOffsetEulerAngles
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return infiniteClipOffsetEulerAngles;
		}
		set
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			infiniteClipOffsetEulerAngles = value;
		}
	}

	[EditorBrowsable(EditorBrowsableState.Never)]
	[Obsolete("openClipPreExtrapolation has been deprecated. Use infiniteClipPreExtrapolation instead. (UnityUpgradable) -> infiniteClipPreExtrapolation", true)]
	public TimelineClip.ClipExtrapolation openClipPreExtrapolation
	{
		get
		{
			return infiniteClipPreExtrapolation;
		}
		set
		{
			infiniteClipPreExtrapolation = value;
		}
	}

	[EditorBrowsable(EditorBrowsableState.Never)]
	[Obsolete("openClipPostExtrapolation has been deprecated. Use infiniteClipPostExtrapolation instead. (UnityUpgradable) -> infiniteClipPostExtrapolation", true)]
	public TimelineClip.ClipExtrapolation openClipPostExtrapolation
	{
		get
		{
			return infiniteClipPostExtrapolation;
		}
		set
		{
			infiniteClipPostExtrapolation = value;
		}
	}

	internal override bool CanCompileClips()
	{
		if (!base.muted)
		{
			if (m_Clips.Count <= 0)
			{
				if ((Object)(object)m_InfiniteClip != (Object)null)
				{
					return !m_InfiniteClip.empty;
				}
				return false;
			}
			return true;
		}
		return false;
	}

	[ContextMenu("Reset Offsets")]
	private void ResetOffsets()
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		m_Position = Vector3.zero;
		m_EulerAngles = Vector3.zero;
		UpdateClipOffsets();
	}

	public TimelineClip CreateClip(AnimationClip clip)
	{
		if ((Object)(object)clip == (Object)null)
		{
			return null;
		}
		TimelineClip timelineClip = base.CreateClip<AnimationPlayableAsset>();
		AssignAnimationClip(timelineClip, clip);
		return timelineClip;
	}

	public void CreateInfiniteClip(string infiniteClipName)
	{
		if (inClipMode)
		{
			Debug.LogWarning((object)"CreateInfiniteClip cannot create an infinite clip for an AnimationTrack that contains one or more Timeline Clips.");
		}
		else if (!((Object)(object)m_InfiniteClip != (Object)null))
		{
			m_InfiniteClip = TimelineCreateUtilities.CreateAnimationClipForTrack(string.IsNullOrEmpty(infiniteClipName) ? "Recorded" : infiniteClipName, this, isLegacy: false);
		}
	}

	public TimelineClip CreateRecordableClip(string animClipName)
	{
		AnimationClip clip = TimelineCreateUtilities.CreateAnimationClipForTrack(string.IsNullOrEmpty(animClipName) ? "Recorded" : animClipName, this, isLegacy: false);
		TimelineClip timelineClip = CreateClip(clip);
		timelineClip.displayName = animClipName;
		timelineClip.recordable = true;
		timelineClip.start = 0.0;
		timelineClip.duration = 1.0;
		AnimationPlayableAsset animationPlayableAsset = timelineClip.asset as AnimationPlayableAsset;
		if ((Object)(object)animationPlayableAsset != (Object)null)
		{
			animationPlayableAsset.removeStartOffset = false;
		}
		return timelineClip;
	}

	protected override void OnCreateClip(TimelineClip clip)
	{
		TimelineClip.ClipExtrapolation clipExtrapolation = TimelineClip.ClipExtrapolation.None;
		if (!base.isSubTrack)
		{
			clipExtrapolation = TimelineClip.ClipExtrapolation.Hold;
		}
		clip.preExtrapolationMode = clipExtrapolation;
		clip.postExtrapolationMode = clipExtrapolation;
	}

	protected internal override int CalculateItemsHash()
	{
		return TrackAsset.GetAnimationClipHash(m_InfiniteClip).CombineHash(base.CalculateItemsHash());
	}

	internal void UpdateClipOffsets()
	{
	}

	private Playable CompileTrackPlayable(PlayableGraph graph, TrackAsset track, GameObject go, IntervalTree<RuntimeElement> tree, AppliedOffsetMode mode)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_0051: Unknown result type (might be due to invalid IL or missing references)
		//IL_0053: Unknown result type (might be due to invalid IL or missing references)
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		//IL_005a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0064: Unknown result type (might be due to invalid IL or missing references)
		//IL_0066: Unknown result type (might be due to invalid IL or missing references)
		//IL_0067: Unknown result type (might be due to invalid IL or missing references)
		//IL_007e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0081: Unknown result type (might be due to invalid IL or missing references)
		//IL_0089: Unknown result type (might be due to invalid IL or missing references)
		AnimationMixerPlayable val = AnimationMixerPlayable.Create(graph, track.clips.Length, false);
		for (int i = 0; i < track.clips.Length; i++)
		{
			TimelineClip timelineClip = track.clips[i];
			Object asset = timelineClip.asset;
			PlayableAsset val2 = (PlayableAsset)(object)((asset is PlayableAsset) ? asset : null);
			if (!((Object)(object)val2 == (Object)null))
			{
				AnimationPlayableAsset animationPlayableAsset = val2 as AnimationPlayableAsset;
				if ((Object)(object)animationPlayableAsset != (Object)null)
				{
					animationPlayableAsset.appliedOffsetMode = mode;
				}
				Playable val3 = val2.CreatePlayable(graph, go);
				if (PlayableExtensions.IsValid<Playable>(val3))
				{
					RuntimeClip item = new RuntimeClip(timelineClip, val3, AnimationMixerPlayable.op_Implicit(val));
					tree.Add(item);
					((PlayableGraph)(ref graph)).Connect<Playable, AnimationMixerPlayable>(val3, 0, val, i);
					PlayableExtensions.SetInputWeight<AnimationMixerPlayable>(val, i, 0f);
				}
			}
		}
		return ApplyTrackOffset(graph, AnimationMixerPlayable.op_Implicit(val), go, mode);
	}

	internal override Playable OnCreateClipPlayableGraph(PlayableGraph graph, GameObject go, IntervalTree<RuntimeElement> tree)
	{
		//IL_0091: Unknown result type (might be due to invalid IL or missing references)
		//IL_0099: Unknown result type (might be due to invalid IL or missing references)
		//IL_009e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0154: Unknown result type (might be due to invalid IL or missing references)
		//IL_0155: Unknown result type (might be due to invalid IL or missing references)
		//IL_015a: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00be: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_0169: Unknown result type (might be due to invalid IL or missing references)
		//IL_016a: Unknown result type (might be due to invalid IL or missing references)
		//IL_016f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0173: Unknown result type (might be due to invalid IL or missing references)
		//IL_0176: Unknown result type (might be due to invalid IL or missing references)
		//IL_017f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0199: Unknown result type (might be due to invalid IL or missing references)
		//IL_019b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0166: Unknown result type (might be due to invalid IL or missing references)
		//IL_00db: Unknown result type (might be due to invalid IL or missing references)
		//IL_00df: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
		if (base.isSubTrack)
		{
			throw new InvalidOperationException("Nested animation tracks should never be asked to create a graph directly");
		}
		List<AnimationTrack> list = new List<AnimationTrack>();
		if (CanCompileClips())
		{
			list.Add(this);
		}
		bool flag = AnimatesRootTransform();
		foreach (TrackAsset childTrack in GetChildTracks())
		{
			AnimationTrack animationTrack = childTrack as AnimationTrack;
			if ((Object)(object)animationTrack != (Object)null && animationTrack.CanCompileClips())
			{
				flag |= animationTrack.AnimatesRootTransform();
				list.Add(animationTrack);
			}
		}
		AppliedOffsetMode offsetMode = GetOffsetMode(go, flag);
		AnimationLayerMixerPlayable val = CreateGroupMixer(graph, go, list.Count);
		for (int i = 0; i < list.Count; i++)
		{
			Playable val2 = (list[i].inClipMode ? CompileTrackPlayable(graph, list[i], go, tree, offsetMode) : list[i].CreateInfiniteTrackPlayable(graph, go, tree, offsetMode));
			((PlayableGraph)(ref graph)).Connect<Playable, AnimationLayerMixerPlayable>(val2, 0, val, i);
			PlayableExtensions.SetInputWeight<AnimationLayerMixerPlayable>(val, i, (float)((!list[i].inClipMode) ? 1 : 0));
			if (list[i].applyAvatarMask && (Object)(object)list[i].avatarMask != (Object)null)
			{
				((AnimationLayerMixerPlayable)(ref val)).SetLayerMaskFromAvatarMask((uint)i, list[i].avatarMask);
			}
		}
		Playable val3 = AnimationLayerMixerPlayable.op_Implicit(val);
		if (!RequiresMotionXPlayable(offsetMode, go))
		{
			return val3;
		}
		AnimationMotionXToDeltaPlayable val4 = AnimationMotionXToDeltaPlayable.Create(graph);
		((PlayableGraph)(ref graph)).Connect<Playable, AnimationMotionXToDeltaPlayable>(val3, 0, val4, 0);
		PlayableExtensions.SetInputWeight<AnimationMotionXToDeltaPlayable>(val4, 0, 1f);
		((AnimationMotionXToDeltaPlayable)(ref val4)).SetAbsoluteMotion(UsesAbsoluteMotion(offsetMode));
		return AnimationMotionXToDeltaPlayable.op_Implicit(val4);
	}

	private bool RequiresMotionXPlayable(AppliedOffsetMode mode, GameObject gameObject)
	{
		switch (mode)
		{
		case AppliedOffsetMode.NoRootTransform:
			return false;
		case AppliedOffsetMode.SceneOffsetLegacy:
		{
			Animator binding = GetBinding(((Object)(object)gameObject != (Object)null) ? gameObject.GetComponent<PlayableDirector>() : null);
			if ((Object)(object)binding != (Object)null)
			{
				return binding.hasRootMotion;
			}
			return false;
		}
		default:
			return true;
		}
	}

	private static bool UsesAbsoluteMotion(AppliedOffsetMode mode)
	{
		if (mode != AppliedOffsetMode.SceneOffset)
		{
			return mode != AppliedOffsetMode.SceneOffsetLegacy;
		}
		return false;
	}

	private bool HasController(GameObject gameObject)
	{
		Animator binding = GetBinding(((Object)(object)gameObject != (Object)null) ? gameObject.GetComponent<PlayableDirector>() : null);
		if ((Object)(object)binding != (Object)null)
		{
			return (Object)(object)binding.runtimeAnimatorController != (Object)null;
		}
		return false;
	}

	internal Animator GetBinding(PlayableDirector director)
	{
		if ((Object)(object)director == (Object)null)
		{
			return null;
		}
		Object val = (Object)(object)this;
		if (base.isSubTrack)
		{
			val = (Object)(object)base.parent;
		}
		Object val2 = null;
		if ((Object)(object)director != (Object)null)
		{
			val2 = director.GetGenericBinding(val);
		}
		Animator val3 = null;
		if (val2 != (Object)null)
		{
			val3 = (Animator)(object)((val2 is Animator) ? val2 : null);
			GameObject val4 = (GameObject)(object)((val2 is GameObject) ? val2 : null);
			if ((Object)(object)val3 == (Object)null && (Object)(object)val4 != (Object)null)
			{
				val3 = val4.GetComponent<Animator>();
			}
		}
		return val3;
	}

	private static AnimationLayerMixerPlayable CreateGroupMixer(PlayableGraph graph, GameObject go, int inputCount)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		return AnimationLayerMixerPlayable.Create(graph, inputCount);
	}

	private Playable CreateInfiniteTrackPlayable(PlayableGraph graph, GameObject go, IntervalTree<RuntimeElement> tree, AppliedOffsetMode mode)
	{
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		//IL_002b: Unknown result type (might be due to invalid IL or missing references)
		//IL_003a: 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)
		//IL_0040: Unknown result type (might be due to invalid IL or missing references)
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		//IL_006d: Unknown result type (might be due to invalid IL or missing references)
		//IL_006e: Unknown result type (might be due to invalid IL or missing references)
		//IL_006f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0077: Unknown result type (might be due to invalid IL or missing references)
		//IL_0049: Unknown result type (might be due to invalid IL or missing references)
		//IL_0056: Unknown result type (might be due to invalid IL or missing references)
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		//IL_0060: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)m_InfiniteClip == (Object)null)
		{
			return Playable.Null;
		}
		AnimationMixerPlayable val = AnimationMixerPlayable.Create(graph, 1, false);
		Playable val2 = AnimationPlayableAsset.CreatePlayable(graph, m_InfiniteClip, m_InfiniteClipOffsetPosition, m_InfiniteClipOffsetEulerAngles, removeStartOffset: false, mode, infiniteClipApplyFootIK, AnimationPlayableAsset.LoopMode.Off);
		if (PlayableExtensions.IsValid<Playable>(val2))
		{
			tree.Add(new InfiniteRuntimeClip(val2));
			((PlayableGraph)(ref graph)).Connect<Playable, AnimationMixerPlayable>(val2, 0, val, 0);
			PlayableExtensions.SetInputWeight<AnimationMixerPlayable>(val, 0, 1f);
		}
		return ApplyTrackOffset(graph, AnimationMixerPlayable.op_Implicit(val), go, mode);
	}

	private Playable ApplyTrackOffset(PlayableGraph graph, Playable root, GameObject go, AppliedOffsetMode mode)
	{
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		//IL_0025: 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_0027: Unknown result type (might be due to invalid IL or missing references)
		//IL_0028: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0032: Unknown result type (might be due to invalid IL or missing references)
		//IL_0034: Unknown result type (might be due to invalid IL or missing references)
		//IL_003c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0048: Unknown result type (might be due to invalid IL or missing references)
		//IL_0049: Unknown result type (might be due to invalid IL or missing references)
		if (mode == AppliedOffsetMode.SceneOffsetLegacy || mode == AppliedOffsetMode.SceneOffset || mode == AppliedOffsetMode.NoRootTransform || !AnimatesRootTransform())
		{
			return root;
		}
		Vector3 val = position;
		Quaternion val2 = rotation;
		AnimationOffsetPlayable val3 = AnimationOffsetPlayable.Create(graph, val, val2, 1);
		((PlayableGraph)(ref graph)).Connect<Playable, AnimationOffsetPlayable>(root, 0, val3, 0);
		PlayableExtensions.SetInputWeight<AnimationOffsetPlayable>(val3, 0, 1f);
		return AnimationOffsetPlayable.op_Implicit(val3);
	}

	internal override void GetEvaluationTime(out double outStart, out double outDuration)
	{
		if (inClipMode)
		{
			base.GetEvaluationTime(out outStart, out outDuration);
			return;
		}
		outStart = 0.0;
		outDuration = TimelineClip.kMaxTimeValue;
	}

	internal override void GetSequenceTime(out double outStart, out double outDuration)
	{
		if (inClipMode)
		{
			base.GetSequenceTime(out outStart, out outDuration);
			return;
		}
		outStart = 0.0;
		outDuration = GetNotificationDuration();
		if ((Object)(object)m_InfiniteClip != (Object)null)
		{
			outDuration = Math.Max(outDuration, m_InfiniteClip.length);
		}
	}

	private void AssignAnimationClip(TimelineClip clip, AnimationClip animClip)
	{
		if (clip == null || (Object)(object)animClip == (Object)null)
		{
			return;
		}
		if (animClip.legacy)
		{
			throw new InvalidOperationException("Legacy Animation Clips are not supported");
		}
		AnimationPlayableAsset animationPlayableAsset = clip.asset as AnimationPlayableAsset;
		if ((Object)(object)animationPlayableAsset != (Object)null)
		{
			animationPlayableAsset.clip = animClip;
			((Object)animationPlayableAsset).name = ((Object)animClip).name;
			double num = ((PlayableAsset)animationPlayableAsset).duration;
			if (!double.IsInfinity(num) && num >= TimelineClip.kMinDuration && num < TimelineClip.kMaxTimeValue)
			{
				clip.duration = num;
			}
		}
		clip.displayName = ((Object)animClip).name;
	}

	public override void GatherProperties(PlayableDirector director, IPropertyCollector driver)
	{
	}

	private void GetAnimationClips(List<AnimationClip> animClips)
	{
		TimelineClip[] array = base.clips;
		for (int i = 0; i < array.Length; i++)
		{
			AnimationPlayableAsset animationPlayableAsset = array[i].asset as AnimationPlayableAsset;
			if ((Object)(object)animationPlayableAsset != (Object)null && (Object)(object)animationPlayableAsset.clip != (Object)null)
			{
				animClips.Add(animationPlayableAsset.clip);
			}
		}
		if ((Object)(object)m_InfiniteClip != (Object)null)
		{
			animClips.Add(m_InfiniteClip);
		}
		foreach (TrackAsset childTrack in GetChildTracks())
		{
			AnimationTrack animationTrack = childTrack as AnimationTrack;
			if ((Object)(object)animationTrack != (Object)null)
			{
				animationTrack.GetAnimationClips(animClips);
			}
		}
	}

	private AppliedOffsetMode GetOffsetMode(GameObject go, bool animatesRootTransform)
	{
		if (!animatesRootTransform)
		{
			return AppliedOffsetMode.NoRootTransform;
		}
		if (m_TrackOffset == TrackOffset.ApplyTransformOffsets)
		{
			return AppliedOffsetMode.TransformOffset;
		}
		if (m_TrackOffset == TrackOffset.ApplySceneOffsets)
		{
			if (!Application.isPlaying)
			{
				return AppliedOffsetMode.SceneOffsetEditor;
			}
			return AppliedOffsetMode.SceneOffset;
		}
		if (HasController(go))
		{
			if (!Application.isPlaying)
			{
				return AppliedOffsetMode.SceneOffsetLegacyEditor;
			}
			return AppliedOffsetMode.SceneOffsetLegacy;
		}
		return AppliedOffsetMode.TransformOffsetLegacy;
	}

	internal bool AnimatesRootTransform()
	{
		if (AnimationPlayableAsset.HasRootTransforms(m_InfiniteClip))
		{
			return true;
		}
		foreach (TimelineClip clip in GetClips())
		{
			AnimationPlayableAsset animationPlayableAsset = clip.asset as AnimationPlayableAsset;
			if ((Object)(object)animationPlayableAsset != (Object)null && animationPlayableAsset.hasRootTransforms)
			{
				return true;
			}
		}
		return false;
	}

	internal override void OnUpgradeFromVersion(int oldVersion)
	{
		if (oldVersion < 1)
		{
			AnimationTrackUpgrade.ConvertRotationsToEuler(this);
		}
		if (oldVersion < 2)
		{
			AnimationTrackUpgrade.ConvertRootMotion(this);
		}
		if (oldVersion < 3)
		{
			AnimationTrackUpgrade.ConvertInfiniteTrack(this);
		}
	}
}
internal interface ICurvesOwner
{
	AnimationClip curves { get; }

	bool hasCurves { get; }

	double duration { get; }

	string defaultCurvesName { get; }

	Object asset { get; }

	Object assetOwner { get; }

	TrackAsset targetTrack { get; }

	void CreateCurves(string curvesClipName);
}
[Serializable]
public class TimelineClip : ICurvesOwner, ISerializationCallbackReceiver
{
	private enum Versions
	{
		Initial,
		ClipInFromGlobalToLocal
	}

	private static class TimelineClipUpgrade
	{
		public static void UpgradeClipInFromGlobalToLocal(TimelineClip clip)
		{
			if (clip.m_ClipIn > 0.0 && clip.m_TimeScale > 1.401298464324817E-45)
			{
				clip.m_ClipIn *= clip.m_TimeScale;
			}
		}
	}

	public enum ClipExtrapolation
	{
		None,
		Hold,
		Loop,
		PingPong,
		Continue
	}

	public enum BlendCurveMode
	{
		Auto,
		Manual
	}

	private const int k_LatestVersion = 1;

	[SerializeField]
	[HideInInspector]
	private int m_Version;

	public static readonly ClipCaps kDefaultClipCaps = ClipCaps.Blending;

	public static readonly float kDefaultClipDurationInSeconds = 5f;

	public static readonly double kTimeScaleMin = 0.001;

	public static readonly double kTimeScaleMax = 1000.0;

	internal static readonly string kDefaultCurvesName = "Clip Parameters";

	internal static readonly double kMinDuration = 0.01666666753590107;

	internal static readonly double kMaxTimeValue = 1000000.0;

	[SerializeField]
	private double m_Start;

	[SerializeField]
	private double m_ClipIn;

	[SerializeField]
	private Object m_Asset;

	[SerializeField]
	[FormerlySerializedAs("m_HackDuration")]
	private double m_Duration;

	[SerializeField]
	private double m_TimeScale = 1.0;

	[SerializeField]
	private TrackAsset m_ParentTrack;

	[SerializeField]
	private double m_EaseInDuration;

	[SerializeField]
	private double m_EaseOutDuration;

	[SerializeField]
	private double m_BlendInDuration = -1.0;

	[SerializeField]
	private double m_BlendOutDuration = -1.0;

	[SerializeField]
	private AnimationCurve m_MixInCurve;

	[SerializeField]
	private AnimationCurve m_MixOutCurve;

	[SerializeField]
	private BlendCurveMode m_BlendInCurveMode;

	[SerializeField]
	private BlendCurveMode m_BlendOutCurveMode;

	[SerializeField]
	private List<string> m_ExposedParameterNames;

	[SerializeField]
	private AnimationClip m_AnimationCurves;

	[SerializeField]
	private bool m_Recordable;

	[SerializeField]
	private ClipExtrapolation m_PostExtrapolationMode;

	[SerializeField]
	private ClipExtrapolation m_PreExtrapolationMode;

	[SerializeField]
	private double m_PostExtrapolationTime;

	[SerializeField]
	private double m_PreExtrapolationTime;

	[SerializeField]
	private string m_DisplayName;

	public bool hasPreExtrapolation
	{
		get
		{
			if (m_PreExtrapolationMode != 0)
			{
				return m_PreExtrapolationTime > 0.0;
			}
			return false;
		}
	}

	public bool hasPostExtrapolation
	{
		get
		{
			if (m_PostExtrapolationMode != 0)
			{
				return m_PostExtrapolationTime > 0.0;
			}
			return false;
		}
	}

	public double timeScale
	{
		get
		{
			if (!clipCaps.HasAny(ClipCaps.SpeedMultiplier))
			{
				return 1.0;
			}
			return Math.Max(kTimeScaleMin, Math.Min(m_TimeScale, kTimeScaleMax));
		}
		set
		{
			UpdateDirty(m_TimeScale, value);
			m_TimeScale = (clipCaps.HasAny(ClipCaps.SpeedMultiplier) ? Math.Max(kTimeScaleMin, Math.Min(value, kTimeScaleMax)) : 1.0);
		}
	}

	public double start
	{
		get
		{
			return m_Start;
		}
		set
		{
			UpdateDirty(value, m_Start);
			double num = Math.Max(SanitizeTimeValue(value, m_Start), 0.0);
			if ((Object)(object)m_ParentTrack != (Object)null && m_Start != num)
			{
				m_ParentTrack.OnClipMove();
			}
			m_Start = num;
		}
	}

	public double duration
	{
		get
		{
			return m_Duration;
		}
		set
		{
			UpdateDirty(m_Duration, value);
			m_Duration = Math.Max(SanitizeTimeValue(value, m_Duration), double.Epsilon);
		}
	}

	public double end => m_Start + m_Duration;

	public double clipIn
	{
		get
		{
			if (!clipCaps.HasAny(ClipCaps.ClipIn))
			{
				return 0.0;
			}
			return m_ClipIn;
		}
		set
		{
			UpdateDirty(m_ClipIn, value);
			m_ClipIn = (clipCaps.HasAny(ClipCaps.ClipIn) ? Math.Max(Math.Min(SanitizeTimeValue(value, m_ClipIn), kMaxTimeValue), 0.0) : 0.0);
		}
	}

	public string displayName
	{
		get
		{
			return m_DisplayName;
		}
		set
		{
			m_DisplayName = value;
		}
	}

	public double clipAssetDuration
	{
		get
		{
			Object obj = m_Asset;
			IPlayableAsset val = (IPlayableAsset)(object)((obj is IPlayableAsset) ? obj : null);
			if (val == null)
			{
				return double.MaxValue;
			}
			return val.duration;
		}
	}

	public AnimationClip curves
	{
		get
		{
			return m_AnimationCurves;
		}
		internal set
		{
			m_AnimationCurves = value;
		}
	}

	string ICurvesOwner.defaultCurvesName => kDefaultCurvesName;

	public bool hasCurves
	{
		get
		{
			if ((Object)(object)m_AnimationCurves != (Object)null)
			{
				return !m_AnimationCurves.empty;
			}
			return false;
		}
	}

	public Object asset
	{
		get
		{
			return m_Asset;
		}
		set
		{
			m_Asset = value;
		}
	}

	Object ICurvesOwner.assetOwner => (Object)(object)parentTrack;

	TrackAsset ICurvesOwner.targetTrack => parentTrack;

	[Obsolete("underlyingAsset property is obsolete. Use asset property instead", true)]
	public Object underlyingAsset
	{
		get
		{
			return null;
		}
		set
		{
		}
	}

	public TrackAsset parentTrack
	{
		get
		{
			return m_ParentTrack;
		}
		set
		{
			if (!((Object)(object)m_ParentTrack == (Object)(object)value))
			{
				if ((Object)(object)m_ParentTrack != (Object)null)
				{
					m_ParentTrack.RemoveClip(this);
				}
				m_ParentTrack = value;
				if ((Object)(object)m_ParentTrack != (Object)null)
				{
					m_ParentTrack.AddClip(this);
				}
			}
		}
	}

	public double easeInDuration
	{
		get
		{
			if (!clipCaps.HasAny(ClipCaps.Blending))
			{
				return 0.0;
			}
			return Math.Min(Math.Max(m_EaseInDuration, 0.0), duration * 0.49);
		}
		set
		{
			m_EaseInDuration = (clipCaps.HasAny(ClipCaps.Blending) ? Math.Max(0.0, Math.Min(SanitizeTimeValue(value, m_EaseInDuration), duration * 0.49)) : 0.0);
		}
	}

	public double easeOutDuration
	{
		get
		{
			if (!clipCaps.HasAny(ClipCaps.Blending))
			{
				return 0.0;
			}
			return Math.Min(Math.Max(m_EaseOutDuration, 0.0), duration * 0.49);
		}
		set
		{
			m_EaseOutDuration = (clipCaps.HasAny(ClipCaps.Blending) ? Math.Max(0.0, Math.Min(SanitizeTimeValue(value, m_EaseOutDuration), duration * 0.49)) : 0.0);
		}
	}

	[Obsolete("Use easeOutTime instead (UnityUpgradable) -> easeOutTime", true)]
	public double eastOutTime => duration - easeOutDuration + m_Start;

	public double easeOutTime => duration - easeOutDuration + m_Start;

	public double blendInDuration
	{
		get
		{
			if (!clipCaps.HasAny(ClipCaps.Blending))
			{
				return 0.0;
			}
			return m_BlendInDuration;
		}
		set
		{
			m_BlendInDuration = (clipCaps.HasAny(ClipCaps.Blending) ? SanitizeTimeValue(value, m_BlendInDuration) : 0.0);
		}
	}

	public double blendOutDuration
	{
		get
		{
			if (!clipCaps.HasAny(ClipCaps.Blending))
			{
				return 0.0;
			}
			return m_BlendOutDuration;
		}
		set
		{
			m_BlendOutDuration = (clipCaps.HasAny(ClipCaps.Blending) ? SanitizeTimeValue(value, m_BlendOutDuration) : 0.0);
		}
	}

	public BlendCurveMode blendInCurveMode
	{
		get
		{
			return m_BlendInCurveMode;
		}
		set
		{
			m_BlendInCurveMode = value;
		}
	}

	public BlendCurveMode blendOutCurveMode
	{
		get
		{
			return m_BlendOutCurveMode;
		}
		set
		{
			m_BlendOutCurveMode = value;
		}
	}

	public bool hasBlendIn
	{
		get
		{
			if (clipCaps.HasAny(ClipCaps.Blending))
			{
				return m_BlendInDuration > 0.0;
			}
			return false;
		}
	}

	public bool hasBlendOut
	{
		get
		{
			if (clipCaps.HasAny(ClipCaps.Blending))
			{
				return m_BlendOutDuration > 0.0;
			}
			return false;
		}
	}

	public AnimationCurve mixInCurve
	{
		get
		{
			if (m_MixInCurve == null || m_MixInCurve.length < 2)
			{
				m_MixInCurve = GetDefaultMixInCurve();
			}
			return m_MixInCurve;
		}
		set
		{
			m_MixInCurve = value;
		}
	}

	public float mixInPercentage => (float)(mixInDuration / duration);

	public double mixInDuration
	{
		get
		{
			if (!hasBlendIn)
			{
				return easeInDuration;
			}
			return blendInDuration;
		}
	}

	public AnimationCurve mixOutCurve
	{
		get
		{
			if (m_MixOutCurve == null || m_MixOutCurve.length < 2)
			{
				m_MixOutCurve = GetDefaultMixOutCurve();
			}
			return m_MixOutCurve;
		}
		set
		{
			m_MixOutCurve = value;
		}
	}

	public double mixOutTime => duration - mixOutDuration + m_Start;

	public double mixOutDuration
	{
		get
		{
			if (!hasBlendOut)
			{
				return easeOutDuration;
			}
			return blendOutDuration;
		}
	}

	public float mixOutPercentage => (float)(mixOutDuration / duration);

	public bool recordable
	{
		get
		{
			return m_Recordable;
		}
		internal set
		{
			m_Recordable = value;
		}
	}

	[Obsolete("exposedParameter is deprecated and will be removed in a future release", true)]
	public List<string> exposedParameters => m_ExposedParameterNames ?? (m_ExposedParameterNames = new List<string>());

	public ClipCaps clipCaps
	{
		get
		{
			if (!(asset is ITimelineClipAsset timelineClipAsset))
			{
				return kDefaultClipCaps;
			}
			return timelineClipAsset.clipCaps;
		}
	}

	public AnimationClip animationClip
	{
		get
		{
			if (m_Asset == (Object)null)
			{
				return null;
			}
			AnimationPlayableAsset animationPlayableAsset = m_Asset as AnimationPlayableAsset;
			if (!((Object)(object)animationPlayableAsset != (Object)null))
			{
				return null;
			}
			return animationPlayableAsset.clip;
		}
	}

	public ClipExtrapolation postExtrapolationMode
	{
		get
		{
			if (!clipCaps.HasAny(ClipCaps.Extrapolation))
			{
				return ClipExtrapolation.None;
			}
			return m_PostExtrapolationMode;
		}
		internal set
		{
			m_PostExtrapolationMode = (clipCaps.HasAny(ClipCaps.Extrapolation) ? value : ClipExtrapolation.None);
		}
	}

	public ClipExtrapolation preExtrapolationMode
	{
		get
		{
			if (!clipCaps.HasAny(ClipCaps.Extrapolation))
			{
				return ClipExtrapolation.None;
			}
			return m_PreExtrapolationMode;
		}
		internal set
		{
			m_PreExtrapolationMode = (clipCaps.HasAny(ClipCaps.Extrapolation) ? value : ClipExtrapolation.None);
		}
	}

	public double extrapolatedStart
	{
		get
		{
			if (m_PreExtrapolationMode != 0)
			{
				return m_Start - m_PreExtrapolationTime;
			}
			return m_Start;
		}
	}

	public double extrapolatedDuration
	{
		get
		{
			double num = m_Duration;
			if (m_PostExtrapolationMode != 0)
			{
				num += Math.Min(m_PostExtrapolationTime, kMaxTimeValue);
			}
			if (m_PreExtrapolationMode != 0)
			{
				num += m_PreExtrapolationTime;
			}
			return num;
		}
	}

	private void UpgradeToLatestVersion()
	{
		if (m_Version < 1)
		{
			TimelineClipUpgrade.UpgradeClipInFromGlobalToLocal(this);
		}
	}

	internal TimelineClip(TrackAsset parent)
	{
		parentTrack = parent;
	}

	internal int Hash()
	{
		int hashCode = m_Start.GetHashCode();
		int hashCode2 = m_Duration.GetHashCode();
		int hashCode3 = m_TimeScale.GetHashCode();
		int hashCode4 = m_ClipIn.GetHashCode();
		int num = (int)m_PreExtrapolationMode;
		int hashCode5 = num.GetHashCode();
		num = (int)m_PostExtrapolationMode;
		return HashUtility.CombineHash(hashCode, hashCode2, hashCode3, hashCode4, hashCode5, num.GetHashCode());
	}

	public float EvaluateMixOut(double time)
	{
		if (!clipCaps.HasAny(ClipCaps.Blending))
		{
			return 1f;
		}
		if (mixOutDuration > (double)Mathf.Epsilon)
		{
			float num = (float)(time - mixOutTime) / (float)mixOutDuration;
			return Mathf.Clamp01(mixOutCurve.Evaluate(num));
		}
		return 1f;
	}

	public float EvaluateMixIn(double time)
	{
		if (!clipCaps.HasAny(ClipCaps.Blending))
		{
			return 1f;
		}
		if (mixInDuration > (double)Mathf.Epsilon)
		{
			float num = (float)(time - m_Start) / (float)mixInDuration;
			return Mathf.Clamp01(mixInCurve.Evaluate(num));
		}
		return 1f;
	}

	private static AnimationCurve GetDefaultMixInCurve()
	{
		return AnimationCurve.EaseInOut(0f, 0f, 1f, 1f);
	}

	private static AnimationCurve GetDefaultMixOutCurve()
	{
		return AnimationCurve.EaseInOut(0f, 1f, 1f, 0f);
	}

	public double ToLocalTime(double time)
	{
		if (time < 0.0)
		{
			return time;
		}
		time = (IsPreExtrapolatedTime(time) ? GetExtrapolatedTime(time - m_Start, m_PreExtrapolationMode, m_Duration) : ((!IsPostExtrapolatedTime(time)) ? (time - m_Start) : GetExtrapolatedTime(time - m_Start, m_PostExtrapolationMode, m_Duration)));
		time *= timeScale;
		time += clipIn;
		return time;
	}

	public double ToLocalTimeUnbound(double time)
	{
		return (time - m_Start) * timeScale + clipIn;
	}

	internal double FromLocalTimeUnbound(double time)
	{
		return (time - clipIn) / timeScale + m_Start;
	}

	private static double SanitizeTimeValue(double value, double defaultValue)
	{
		if (double.IsInfinity(value) || double.IsNaN(value))
		{
			Debug.LogError((object)"Invalid time value assigned");
			return defaultValue;
		}
		return Math.Max(0.0 - kMaxTimeValue, Math.Min(kMaxTimeValue, value));
	}

	internal void SetPostExtrapolationTime(double time)
	{
		m_PostExtrapolationTime = time;
	}

	internal void SetPreExtrapolationTime(double time)
	{
		m_PreExtrapolationTime = time;
	}

	public bool IsExtrapolatedTime(double sequenceTime)
	{
		if (!IsPreExtrapolatedTime(sequenceTime))
		{
			return IsPostExtrapolatedTime(sequenceTime);
		}
		return true;
	}

	public bool IsPreExtrapolatedTime(double sequenceTime)
	{
		if (preExtrapolationMode != 0 && sequenceTime < m_Start)
		{
			return sequenceTime >= m_Start - m_PreExtrapolationTime;
		}
		return false;
	}

	public bool IsPostExtrapolatedTime(double sequenceTime)
	{
		if (postExtrapolationMode != 0 && sequenceTime > end)
		{
			return sequenceTime - end < m_PostExtrapolationTime;
		}
		return false;
	}

	private static double GetExtrapolatedTime(double time, ClipExtrapolation mode, double duration)
	{
		if (duration == 0.0)
		{
			return 0.0;
		}
		switch (mode)
		{
		case ClipExtrapolation.Loop:
			if (time < 0.0)
			{
				time = duration - (0.0 - time) % duration;
			}
			else if (time > duration)
			{
				time %= duration;
			}
			break;
		case ClipExtrapolation.Hold:
			if (time < 0.0)
			{
				return 0.0;
			}
			if (time > duration)
			{
				return duration;
			}
			break;
		case ClipExtrapolation.PingPong:
			if (time < 0.0)
			{
				time = duration * 2.0 - (0.0 - time) % (duration * 2.0);
				time = duration - Math.Abs(time - duration);
			}
			else
			{
				time %= duration * 2.0;
				time = duration - Math.Abs(time - duration);
			}
			break;
		}
		return time;
	}

	public void CreateCurves(string curvesClipName)
	{
		if (!((Object)(object)m_AnimationCurves != (Object)null))
		{
			m_AnimationCurves = TimelineCreateUtilities.CreateAnimationClipForTrack(string.IsNullOrEmpty(curvesClipName) ? kDefaultCurvesName : curvesClipName, parentTrack, isLegacy: true);
		}
	}

	void ISerializationCallbackReceiver.OnBeforeSerialize()
	{
		m_Version = 1;
	}

	void ISerializationCallbackReceiver.OnAfterDeserialize()
	{
		if (m_Version < 1)
		{
			UpgradeToLatestVersion();
		}
	}

	public override string ToString()
	{
		return UnityString.Format("{0} ({1:F2}, {2:F2}):{3:F2} | {4}", new object[5] { displayName, start, end, clipIn, parentTrack });
	}

	private void UpdateDirty(double oldValue, double newValue)
	{
	}
}
[Serializable]
public class TimelineAsset : PlayableAsset, ISerializationCallbackReceiver, ITimelineClipAsset, IPropertyPreview
{
	private enum Versions
	{
		Initial
	}

	private static class TimelineAssetUpgrade
	{
	}

	[Obsolete("MediaType has been deprecated. It is no longer required, and will be removed in a future release.", false)]
	public enum MediaType
	{
		Animation = 0,
		Audio = 1,
		Texture = 2,
		[Obsolete("Use Texture MediaType instead. (UnityUpgradable) -> UnityEngine.Timeline.TimelineAsset/MediaType.Texture", false)]
		Video = 2,
		Script = 3,
		Hybrid = 4,
		Group = 5
	}

	public enum DurationMode
	{
		BasedOnClips,
		FixedLength
	}

	[Serializable]
	public class EditorSettings
	{
		internal static readonly float kMinFps = (float)TimeUtility.kFrameRateEpsilon;

		internal static readonly float kMaxFps = 1000f;

		internal static readonly float kDefaultFps = 60f;

		[HideInInspector]
		[SerializeField]
		private float m_Framerate = kDefaultFps;

		public float fps
		{
			get
			{
				return m_Framerate;
			}
			set
			{
				m_Framerate = GetValidFramerate(value);
			}
		}
	}

	private const int k_LatestVersion = 0;

	[SerializeField]
	[HideInInspector]
	private int m_Version;

	[HideInInspector]
	[SerializeField]
	private List<ScriptableObject> m_Tracks;

	[HideInInspector]
	[SerializeField]
	private double m_FixedDuration;

	[NonSerialized]
	[HideInInspector]
	private TrackAsset[] m_CacheOutputTracks;

	[NonSerialized]
	[HideInInspector]
	private List<TrackAsset> m_CacheRootTracks;

	[NonSerialized]
	[HideInInspector]
	private List<TrackAsset> m_CacheFlattenedTracks;

	[HideInInspector]
	[SerializeField]
	private EditorSettings m_EditorSettings = new EditorSettings();

	[SerializeField]
	private DurationMode m_DurationMode;

	[HideInInspector]
	[SerializeField]
	private MarkerTrack m_MarkerTrack;

	public EditorSettings editorSettings => m_EditorSettings;

	public override double duration
	{
		get
		{
			if (m_DurationMode == DurationMode.BasedOnClips)
			{
				return CalculateDuration();
			}
			return m_FixedDuration;
		}
	}

	public double fixedDuration
	{
		get
		{
			DiscreteTime discreteTime = (DiscreteTime)m_FixedDuration;
			if (discreteTime <= 0)
			{
				return 0.0;
			}
			return (double)discreteTime.OneTickBefore();
		}
		set
		{
			m_FixedDuration = Math.Max(0.0, value);
		}
	}

	public DurationMode durationMode
	{
		get
		{
			return m_DurationMode;
		}
		set
		{
			m_DurationMode = value;
		}
	}

	public override IEnumerable<PlayableBinding> outputs
	{
		get
		{
			foreach (TrackAsset outputTrack in GetOutputTracks())
			{
				foreach (PlayableBinding output in ((PlayableAsset)outputTrack).outputs)
				{
					yield return output;
				}
			}
		}
	}

	public ClipCaps clipCaps
	{
		get
		{
			ClipCaps clipCaps = ClipCaps.All;
			foreach (TrackAsset rootTrack in GetRootTracks())
			{
				TimelineClip[] clips = rootTrack.clips;
				foreach (TimelineClip timelineClip in clips)
				{
					clipCaps &= timelineClip.clipCaps;
				}
			}
			return clipCaps;
		}
	}

	public int outputTrackCount
	{
		get
		{
			UpdateOutputTrackCache();
			return m_CacheOutputTracks.Length;
		}
	}

	public int rootTrackCount
	{
		get
		{
			UpdateRootTrackCache();
			return m_CacheRootTracks.Count;
		}
	}

	internal IEnumerable<TrackAsset> flattenedTracks
	{
		get
		{
			if (m_CacheFlattenedTracks == null)
			{
				m_CacheFlattenedTracks = new List<TrackAsset>(m_Tracks.Count * 2);
				UpdateRootTrackCache();
				m_CacheFlattenedTracks.AddRange(m_CacheRootTracks);
				for (int i = 0; i < m_CacheRootTracks.Count; i++)
				{
					AddSubTracksRecursive(m_CacheRootTracks[i], ref m_CacheFlattenedTracks);
				}
			}
			return m_CacheFlattenedTracks;
		}
	}

	public MarkerTrack markerTrack => m_MarkerTrack;

	internal List<ScriptableObject> trackObjects => m_Tracks;

	private void UpgradeToLatestVersion()
	{
	}

	private void OnValidate()
	{
		editorSettings.fps = GetValidFramerate(editorSettings.fps);
	}

	private static float GetValidFramerate(float framerate)
	{
		return Mathf.Clamp(framerate, EditorSettings.kMinFps, EditorSettings.kMaxFps);
	}

	public TrackAsset GetRootTrack(int index)
	{
		UpdateRootTrackCache();
		return m_CacheRootTracks[index];
	}

	public IEnumerable<TrackAsset> GetRootTracks()
	{
		UpdateRootTrackCache();
		return m_CacheRootTracks;
	}

	public TrackAsset GetOutputTrack(int index)
	{
		UpdateOutputTrackCache();
		return m_CacheOutputTracks[index];
	}

	public IEnumerable<TrackAsset> GetOutputTracks()
	{
		UpdateOutputTrackCache();
		return m_CacheOutputTracks;
	}

	private void UpdateRootTrackCache()
	{
		if (m_CacheRootTracks != null)
		{
			return;
		}
		if (m_Tracks == null)
		{
			m_CacheRootTracks = new List<TrackAsset>();
			return;
		}
		m_CacheRootTracks = new List<TrackAsset>(m_Tracks.Count);
		if ((Object)(object)markerTrack != (Object)null)
		{
			m_CacheRootTracks.Add(markerTrack);
		}
		foreach (ScriptableObject track in m_Tracks)
		{
			TrackAsset trackAsset = track as TrackAsset;
			if ((Object)(object)trackAsset != (Object)null)
			{
				m_CacheRootTracks.Add(trackAsset);
			}
		}
	}

	private void UpdateOutputTrackCache()
	{
		if (m_CacheOutputTracks != null)
		{
			return;
		}
		List<TrackAsset> list = new List<TrackAsset>();
		foreach (TrackAsset flattenedTrack in flattenedTracks)
		{
			if ((Object)(object)flattenedTrack != (Object)null && ((object)flattenedTrack).GetType() != typeof(GroupTrack) && !flattenedTrack.isSubTrack)
			{
				list.Add(flattenedTrack);
			}
		}
		m_CacheOutputTracks = list.ToArray();
	}

	internal void AddTrackInternal(TrackAsset track)
	{
		m_Tracks.Add((ScriptableObject)(object)track);
		track.parent = (PlayableAsset)(object)this;
		Invalidate();
	}

	internal void RemoveTrack(TrackAsset track)
	{
		m_Tracks.Remove((ScriptableObject)(object)track);
		Invalidate();
		TrackAsset trackAsset = track.parent as TrackAsset;
		if ((Object)(object)trackAsset != (Object)null)
		{
			trackAsset.RemoveSubTrack(track);
		}
	}

	public override Playable CreatePlayable(PlayableGraph graph, GameObject go)
	{
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_0032: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Unknown result type (might be due to invalid IL or missing references)
		//IL_002c: Unknown result type (might be due to invalid IL or missing references)
		bool autoRebalance = false;
		bool createOutputs = ((PlayableGraph)(ref graph)).GetPlayableCount() == 0;
		ScriptPlayable<TimelinePlayable> val = TimelinePlayable.Create(graph, GetOutputTracks(), go, autoRebalance, createOutputs);
		PlayableExtensions.SetPropagateSetTime<ScriptPlayable<TimelinePlayable>>(val, true);
		if (!PlayableExtensions.IsValid<ScriptPlayable<TimelinePlayable>>(val))
		{
			return Playable.Null;
		}
		return ScriptPlayable<TimelinePlayable>.op_Implicit(val);
	}

	void ISerializationCallbackReceiver.OnBeforeSerialize()
	{
		m_Version = 0;
	}

	void ISerializationCallbackReceiver.OnAfterDeserialize()
	{
		Invalidate();
		if (m_Version < 0)
		{
			UpgradeToLatestVersion();
		}
	}

	private void __internalAwake()
	{
		if (m_Tracks == null)
		{
			m_Tracks = new List<ScriptableObject>();
		}
		for (int num = m_Tracks.Count - 1; num >= 0; num--)
		{
			TrackAsset trackAsset = m_Tracks[num] as TrackAsset;
			if ((Object)(object)trackAsset != (Object)null)
			{
				trackAsset.parent = (PlayableAsset)(object)this;
			}
		}
	}

	public void GatherProperties(PlayableDirector director, IPropertyCollector driver)
	{
		foreach (TrackAsset outputTrack in GetOutputTracks())
		{
			outputTrack.GatherProperties(director, driver);
		}
	}

	public void CreateMarkerTrack()
	{
		if ((Object)(object)m_MarkerTrack == (Object)null)
		{
			m_MarkerTrack = ScriptableObject.CreateInstance<MarkerTrack>();
			TimelineCreateUtilities.SaveAssetIntoObject((Object)(object)m_MarkerTrack, (Object)(object)this);
			m_MarkerTrack.parent = (PlayableAsset)(object)this;
			((Object)m_MarkerTrack).name = "Markers";
			Invalidate();
		}
	}

	internal void Invalidate()
	{
		m_CacheRootTracks = null;
		m_CacheOutputTracks = null;
		m_CacheFlattenedTracks = null;
	}

	private double CalculateDuration()
	{
		DiscreteTime discreteTime = new DiscreteTime(0);
		foreach (TrackAsset flattenedTrack in flattenedTracks)
		{
			if (!flattenedTrack.muted)
			{
				discreteTime = DiscreteTime.Max(discreteTime, (DiscreteTime)flattenedTrack.end);
			}
		}
		if (discreteTime <= 0)
		{
			return 0.0;
		}
		return (double)discreteTime.OneTickBefore();
	}

	private static void AddSubTracksRecursive(TrackAsset track, ref List<TrackAsset> allTracks)
	{
		if ((Object)(object)track == (Object)null)
		{
			return;
		}
		allTracks.AddRange(track.GetChildTracks());
		foreach (TrackAsset childTrack in track.GetChildTracks())
		{
			AddSubTracksRecursive(childTrack, ref allTracks);
		}
	}

	public TrackAsset CreateTrack(Type type, TrackAsset parent, string name)
	{
		if ((Object)(object)parent != (Object)null && (Object)(object)parent.timelineAsset != (Object)(object)this)
		{
			throw new InvalidOperationException("Addtrack cannot parent to a track not in the Timeline");
		}
		if (!typeof(TrackAsset).IsAssignableFrom(type))
		{
			throw new InvalidOperationException("Supplied type must be a track asset");
		}
		if ((Object)(object)parent != (Object)null && !TimelineCreateUtilities.ValidateParentTrack(parent, type))
		{
			throw new InvalidOperationException("Cannot assign a child of type " + type.Name + "to a parent of type " + ((object)parent).GetType().Name);
		}
		PlayableAsset masterAsset = (PlayableAsset)(((Object)(object)parent != (Object)null) ? ((IPropertyPreview)parent) : ((IPropertyPreview)this));
		string text = name;
		if (string.IsNullOrEmpty(text))
		{
			text = type.Name;
		}
		string text2 = text;
		text2 = ((!((Object)(object)parent != (Object)null)) ? TimelineCreateUtilities.GenerateUniqueActorName(trackObjects, text) : TimelineCreateUtilities.GenerateUniqueActorName(parent.subTracksObjects, text));
		TrackAsset trackAsset = AllocateTrack(parent, text2, type);
		if ((Object)(object)trackAsset != (Object)null)
		{
			((Object)trackAsset).name = text2;
			TimelineCreateUtilities.SaveAssetIntoObject((Object)(object)trackAsset, (Object)(object)masterAsset);
		}
		return trackAsset;
	}

	public T CreateTrack<T>(TrackAsset parent, string name) where T : TrackAsset, new()
	{
		return (T)CreateTrack(typeof(T), parent, name);
	}

	public bool DeleteClip(TimelineClip clip)
	{
		if (clip == null || (Object)(object)clip.parentTrack == (Object)null)
		{
			return false;
		}
		if ((Object)(object)this != (Object)(object)clip.parentTrack.timelineAsset)
		{
			Debug.LogError((object)"Cannot delete a clip from this timeline");
			return false;
		}
		if ((Object)(object)clip.curves != (Object)null)
		{
			TimelineUndo.PushDestroyUndo(this, (Object)(object)clip.parentTrack, (Object)(object)clip.curves, "Delete Curves");
		}
		if (clip.asset != (Object)null)
		{
			DeleteRecordedAnimation(clip);
			TimelineUndo.PushDestroyUndo(this, (Object)(object)clip.parentTrack, clip.asset, "Delete Clip Asset");
		}
		TrackAsset parentTrack = clip.parentTrack;
		parentTrack.RemoveClip(clip);
		parentTrack.CalculateExtrapolationTimes();
		return true;
	}

	public bool DeleteTrack(TrackAsset track)
	{
		if ((Object)(object)track.timelineAsset != (Object)(object)this)
		{
			return false;
		}
		_ = (Object)(object)(track.parent as TrackAsset) != (Object)null;
		foreach (TrackAsset childTrack in track.GetChildTracks())
		{
			DeleteTrack(childTrack);
		}
		DeleteRecordedAnimation(track);
		foreach (TimelineClip item in new List<TimelineClip>(track.clips))
		{
			DeleteClip(item);
		}
		RemoveTrack(track);
		TimelineUndo.PushDestroyUndo(this, (Object)(object)this, (Object)(object)track, "Delete Track");
		return true;
	}

	internal void MoveLastTrackBefore(TrackAsset asset)
	{
		if (m_Tracks == null || m_Tracks.Count < 2 || (Object)(object)asset == (Object)null)
		{
			return;
		}
		ScriptableObject val = m_Tracks[m_Tracks.Count - 1];
		if ((Object)(object)val == (Object)(object)asset)
		{
			return;
		}
		for (int i = 0; i < m_Tracks.Count - 1; i++)
		{
			if ((Object)(object)m_Tracks[i] == (Object)(object)asset)
			{
				for (int num = m_Tracks.Count - 1; num > i; num--)
				{
					m_Tracks[num] = m_Tracks[num - 1];
				}
				m_Tracks[i] = val;
				Invalidate();
				break;
			}
		}
	}

	internal TrackAsset AllocateTrack(TrackAsset trackAssetParent, string trackName, Type trackType)
	{
		if ((Object)(object)trackAssetParent != (Object)null && (Object)(object)trackAssetParent.timelineAsset != (Object)(object)this)
		{
			throw new InvalidOperationException("Addtrack cannot parent to a track not in the Timeline");
		}
		if (!typeof(TrackAsset).IsAssignableFrom(trackType))
		{
			throw new InvalidOperationException("Supplied type must be a track asset");
		}
		TrackAsset trackAsset = (TrackAsset)(object)ScriptableObject.CreateInstance(trackType);
		((Object)trackAsset).name = trackName;
		if ((Object)(object)trackAssetParent != (Object)null)
		{
			trackAssetParent.AddChild(trackAsset);
		}
		else
		{
			AddTrackInternal(trackAsset);
		}
		return trackAsset;
	}

	private void DeleteRecordedAnimation(TrackAsset track)
	{
		AnimationTrack animationTrack = track as AnimationTrack;
		if ((Object)(object)animationTrack != (Object)null && (Object)(object)animationTrack.infiniteClip != (Object)null)
		{
			TimelineUndo.PushDestroyUndo(this, (Object)(object)track, (Object)(object)animationTrack.infiniteClip, "Delete Track");
		}
		if ((Object)(object)track.curves != (Object)null)
		{
			TimelineUndo.PushDestroyUndo(this, (Object)(object)track, (Object)(object)track.curves, "Delete Track Parameters");
		}
	}

	private void DeleteRecordedAnimation(TimelineClip clip)
	{
		if (clip == null)
		{
			return;
		}
		if ((Object)(object)clip.curves != (Object)null)
		{
			TimelineUndo.PushDestroyUndo(this, (Object)(object)clip.parentTrack, (Object)(object)clip.curves, "Delete Clip Parameters");
		}
		if (clip.recordable)
		{
			AnimationPlayableAsset animationPlayableAsset = clip.asset as AnimationPlayableAsset;
			if (!((Object)(object)animationPlayableAsset == (Object)null) && !((Object)(object)animationPlayableAsset.clip == (Object)null))
			{
				TimelineUndo.PushDestroyUndo(this, (Object)(object)animationPlayableAsset, (Object)(object)animationPlayableAsset.clip, "Delete Recording");
			}
		}
	}
}
[Serializable]
[IgnoreOnPlayableTrack]
public abstract class TrackAsset : PlayableAsset, ISerializationCallbackReceiver, IPropertyPreview, ICurvesOwner
{
	internal enum Versions
	{
		Initial,
		RotationAsEuler,
		RootMotionUpgrade,
		AnimatedTrackProperties
	}

	private static class TrackAssetUpgrade
	{
	}

	private const int k_LatestVersion = 3;

	[SerializeField]
	[HideInInspector]
	private int m_Version;

	[Obsolete("Please use m_InfiniteClip (on AnimationTrack) instead.", false)]
	[SerializeField]
	[HideInInspector]
	[FormerlySerializedAs("m_animClip")]
	internal AnimationClip m_AnimClip;

	internal const string kDefaultCurvesName = "Track Parameters";

	[SerializeField]
	[HideInInspector]
	private bool m_Locked;

	[SerializeField]
	[HideInInspector]
	private bool m_Muted;

	[SerializeField]
	[HideInInspector]
	private string m_CustomPlayableFullTypename = string.Empty;

	[SerializeField]
	[HideInInspector]
	private AnimationClip m_Curves;

	[SerializeField]
	[HideInInspector]
	private PlayableAsset m_Parent;

	[SerializeField]
	[HideInInspector]
	private List<ScriptableObject> m_Children;

	[NonSerialized]
	private int m_ItemsHash;

	[NonSerialized]
	private TimelineClip[] m_ClipsCache;

	private DiscreteTime m_Start;

	private DiscreteTime m_End;

	private bool m_CacheSorted;

	private bool? m_SupportsNotifications;

	private static TrackAsset[] s_EmptyCache = new TrackAsset[0];

	private IEnumerable<TrackAsset> m_ChildTrackCache;

	private static Dictionary<Type, TrackBindingTypeAttribute> s_TrackBindingTypeAttributeCache = new Dictionary<Type, TrackBindingTypeAttribute>();

	[SerializeField]
	[HideInInspector]
	protected internal List<TimelineClip> m_Clips = new List<TimelineClip>();

	[SerializeField]
	[HideInInspector]
	private MarkerList m_Markers = new MarkerList(0);

	public double start
	{
		get
		{
			UpdateDuration();
			return (double)m_Start;
		}
	}

	public double end
	{
		get
		{
			UpdateDuration();
			return (double)m_End;
		}
	}

	public sealed override double duration
	{
		get
		{
			UpdateDuration();
			return (double)(m_End - m_Start);
		}
	}

	public bool muted
	{
		get
		{
			return m_Muted;
		}
		set
		{
			m_Muted = value;
		}
	}

	public bool mutedInHierarchy
	{
		get
		{
			if (muted)
			{
				return true;
			}
			TrackAsset trackAsset = this;
			while ((Object)(object)(trackAsset.parent as TrackAsset) != (Object)null)
			{
				trackAsset = (TrackAsset)(object)trackAsset.parent;
				if ((Object)(object)(trackAsset as GroupTrack) != (Object)null)
				{
					return trackAsset.mutedInHierarchy;
				}
			}
			return false;
		}
	}

	public TimelineAsset timelineAsset
	{
		get
		{
			TrackAsset trackAsset = this;
			while ((Object)(object)trackAsset != (Object)null)
			{
				if ((Object)(object)trackAsset.parent == (Object)null)
				{
					return null;
				}
				TimelineAsset timelineAsset = trackAsset.parent as TimelineAsset;
				if ((Object)(object)timelineAsset != (Object)null)
				{
					return timelineAsset;
				}
				trackAsset = trackAsset.parent as TrackAsset;
			}
			return null;
		}
	}

	public PlayableAsset parent
	{
		get
		{
			return m_Parent;
		}
		internal set
		{
			m_Parent = value;
		}
	}

	internal TimelineClip[] clips
	{
		get
		{
			if (m_Clips == null)
			{
				m_Clips = new List<TimelineClip>();
			}
			if (m_ClipsCache == null)
			{
				m_CacheSorted = false;
				m_ClipsCache = m_Clips.ToArray();
			}
			return m_ClipsCache;
		}
	}

	public virtual bool isEmpty
	{
		get
		{
			if (!hasClips && !hasCurves)
			{
				return GetMarkerCount() == 0;
			}
			return false;
		}
	}

	public bool hasClips
	{
		get
		{
			if (m_Clips != null)
			{
				return m_Clips.Count != 0;
			}
			return false;
		}
	}

	public bool hasCurves
	{
		get
		{
			if ((Object)(object)m_Curves != (Object)null)
			{
				return !m_Curves.empty;
			}
			return false;
		}
	}

	public bool isSubTrack
	{
		get
		{
			TrackAsset trackAsset = parent as TrackAsset;
			if ((Object)(object)trackAsset != (Object)null)
			{
				return ((object)trackAsset).GetType() == ((object)this).GetType();
			}
			return false;
		}
	}

	public override IEnumerable<PlayableBinding> outputs
	{
		get
		{
			if (!s_TrackBindingTypeAttributeCache.TryGetValue(((object)this).GetType(), out var value))
			{
				value = (TrackBindingTypeAttribute)Attribute.GetCustomAttribute(((object)this).GetType(), typeof(TrackBindingTypeAttribute));
				s_TrackBindingTypeAttributeCache.Add(((object)this).GetType(), value);
			}
			Type type = value?.type;
			yield return ScriptPlayableBinding.Create(((Object)this).name, (Object)(object)this, type);
		}
	}

	internal string customPlayableTypename
	{
		get
		{
			return m_CustomPlayableFullTypename;
		}
		set
		{
			m_CustomPlayableFullTypename = value;
		}
	}

	public AnimationClip curves
	{
		get
		{
			return m_Curves;
		}
		internal set
		{
			m_Curves = value;
		}
	}

	string ICurvesOwner.defaultCurvesName => "Track Parameters";

	Object ICurvesOwner.asset => (Object)(object)this;

	Object ICurvesOwner.assetOwner => (Object)(object)timelineAsset;

	TrackAsset ICurvesOwner.targetTrack => this;

	internal List<ScriptableObject> subTracksObjects => m_Children;

	public bool locked
	{
		get
		{
			return m_Locked;
		}
		set
		{
			m_Locked = value;
		}
	}

	public bool lockedInHierarchy
	{
		get
		{
			if (!locked)
			{
				return parentLocked;
			}
			return true;
		}
	}

	internal bool parentLocked
	{
		get
		{
			TrackAsset trackAsset = parent as TrackAsset;
			if ((Object)(object)trackAsset != (Object)null)
			{
				return trackAsset.lockedInHierarchy;
			}
			return false;
		}
	}

	public bool supportsNotifications
	{
		get
		{
			if (!m_SupportsNotifications.HasValue)
			{
				m_SupportsNotifications = NotificationUtilities.TrackTypeSupportsNotifications(((object)this).GetType());
			}
			return m_SupportsNotifications.Value;
		}
	}

	internal static event Action<TimelineClip, GameObject, Playable> OnClipPlayableCreate;

	internal static event Action<TrackAsset, GameObject, Playable> OnTrackAnimationPlayableCreate;

	protected virtual void OnBeforeTrackSerialize()
	{
	}

	protected virtual void OnAfterTrackDeserialize()
	{
	}

	internal virtual void OnUpgradeFromVersion(int oldVersion)
	{
	}

	void ISerializationCallbackReceiver.OnBeforeSerialize()
	{
		m_Version = 3;
		if (m_Children != null)
		{
			for (int num = m_Children.Count - 1; num >= 0; num--)
			{
				TrackAsset trackAsset = m_Children[num] as TrackAsset;
				if ((Object)(object)trackAsset != (Object)null && (Object)(object)trackAsset.parent != (Object)(object)this)
				{
					trackAsset.parent = (PlayableAsset)(object)this;
				}
			}
		}
		OnBeforeTrackSerialize();
	}

	void ISerializationCallbackReceiver.OnAfterDeserialize()
	{
		m_ClipsCache = null;
		Invalidate();
		if (m_Version < 3)
		{
			UpgradeToLatestVersion();
			OnUpgradeFromVersion(m_Version);
		}
		foreach (IMarker marker in GetMarkers())
		{
			marker.Initialize(this);
		}
		OnAfterTrackDeserialize();
	}

	private void UpgradeToLatestVersion()
	{
	}

	public IEnumerable<TimelineClip> GetClips()
	{
		return clips;
	}

	public IEnumerable<TrackAsset> GetChildTracks()
	{
		UpdateChildTrackCache();
		return m_ChildTrackCache;
	}

	private void __internalAwake()
	{
		if (m_Clips == null)
		{
			m_Clips = new List<TimelineClip>();
		}
		m_ChildTrackCache = null;
		if (m_Children == null)
		{
			m_Children = new List<ScriptableObject>();
		}
	}

	public void CreateCurves(string curvesClipName)
	{
		if (!((Object)(object)m_Curves != (Object)null))
		{
			m_Curves = TimelineCreateUtilities.CreateAnimationClipForTrack(string.IsNullOrEmpty(curvesClipName) ? "Track Parameters" : curvesClipName, this, isLegacy: true);
		}
	}

	public virtual Playable CreateTrackMixer(PlayableGraph graph, GameObject go, int inputCount)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		return Playable.Create(graph, inputCount);
	}

	public sealed override Playable CreatePlayable(PlayableGraph graph, GameObject go)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		return Playable.Null;
	}

	public TimelineClip CreateDefaultClip()
	{
		object[] customAttributes = ((object)this).GetType().GetCustomAttributes(typeof(TrackClipTypeAttribute), inherit: true);
		Type type = null;
		object[] array = customAttributes;
		for (int i = 0; i < array.Length; i++)
		{
			if (array[i] is TrackClipTypeAttribute trackClipTypeAttribute && typeof(IPlayableAsset).IsAssignableFrom(trackClipTypeAttribute.inspectedType) && typeof(ScriptableObject).IsAssignableFrom(trackClipTypeAttribute.inspectedType))
			{
				type = trackClipTypeAttribute.inspectedType;
				break;
			}
		}
		if (type == null)
		{
			Debug.LogWarning((object)("Cannot create a default clip for type " + ((object)this).GetType()));
			return null;
		}
		return CreateAndAddNewClipOfType(type);
	}

	public TimelineClip CreateClip<T>() where T : ScriptableObject, IPlayableAsset
	{
		return CreateClip(typeof(T));
	}

	public IMarker CreateMarker(Type type, double time)
	{
		return m_Markers.CreateMarker(type, time, this);
	}

	public T CreateMarker<T>(double time) where T : ScriptableObject, IMarker
	{
		return (T)CreateMarker(typeof(T), time);
	}

	public bool DeleteMarker(IMarker marker)
	{
		return m_Markers.Remove(marker);
	}

	public IEnumerable<IMarker> GetMarkers()
	{
		return m_Markers.GetMarkers();
	}

	public int GetMarkerCount()
	{
		return m_Markers.Count;
	}

	public IMarker GetMarker(int idx)
	{
		return m_Markers[idx];
	}

	internal TimelineClip CreateClip(Type requestedType)
	{
		if (ValidateClipType(requestedType))
		{
			return CreateAndAddNewClipOfType(requestedType);
		}
		throw new InvalidOperationException(string.Concat("Clips of type ", requestedType, " are not permitted on tracks of type ", ((object)this).GetType()));
	}

	internal TimelineClip CreateAndAddNewClipOfType(Type requestedType)
	{
		TimelineClip timelineClip = CreateClipOfType(requestedType);
		AddClip(timelineClip);
		return timelineClip;
	}

	internal TimelineClip CreateClipOfType(Type requestedType)
	{
		if (!ValidateClipType(requestedType))
		{
			throw new InvalidOperationException(string.Concat("Clips of type ", requestedType, " are not permitted on tracks of type ", ((object)this).GetType()));
		}
		ScriptableObject val = ScriptableObject.CreateInstance(requestedType);
		if ((Object)(object)val == (Object)null)
		{
			throw new InvalidOperationException("Could not create an instance of the ScriptableObject type " + requestedType.Name);
		}
		((Object)val).name = requestedType.Name;
		TimelineCreateUtilities.SaveAssetIntoObject((Object)(object)val, (Object)(object)this);
		return CreateClipFromAsset(val);
	}

	internal TimelineClip CreateClipFromPlayableAsset(IPlayableAsset asset)
	{
		if (asset == null)
		{
			throw new ArgumentNullException("asset");
		}
		if ((Object)(object)((asset is ScriptableObject) ? asset : null) == (Object)null)
		{
			throw new ArgumentException("CreateClipFromPlayableAsset  only supports ScriptableObject-deri

Room Architect Tool_Data/Managed/UnityEngine.AccessibilityModule.dll

Decompiled 3 months ago
using System;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Scripting;

[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine.Accessibility;

[UsedByNativeCode]
public static class VisionUtility
{
	private static readonly Color[] s_ColorBlindSafePalette = (Color[])(object)new Color[11]
	{
		Color32.op_Implicit(new Color32((byte)0, (byte)0, (byte)0, byte.MaxValue)),
		Color32.op_Implicit(new Color32((byte)73, (byte)0, (byte)146, byte.MaxValue)),
		Color32.op_Implicit(new Color32((byte)7, (byte)71, (byte)81, byte.MaxValue)),
		Color32.op_Implicit(new Color32((byte)0, (byte)146, (byte)146, byte.MaxValue)),
		Color32.op_Implicit(new Color32((byte)182, (byte)109, byte.MaxValue, byte.MaxValue)),
		Color32.op_Implicit(new Color32(byte.MaxValue, (byte)109, (byte)182, byte.MaxValue)),
		Color32.op_Implicit(new Color32((byte)109, (byte)182, byte.MaxValue, byte.MaxValue)),
		Color32.op_Implicit(new Color32((byte)36, byte.MaxValue, (byte)36, byte.MaxValue)),
		Color32.op_Implicit(new Color32(byte.MaxValue, (byte)182, (byte)219, byte.MaxValue)),
		Color32.op_Implicit(new Color32((byte)182, (byte)219, byte.MaxValue, byte.MaxValue)),
		Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, (byte)109, byte.MaxValue))
	};

	private static readonly float[] s_ColorBlindSafePaletteLuminanceValues = s_ColorBlindSafePalette.Select((Color c) => ComputePerceivedLuminance(c)).ToArray();

	internal static float ComputePerceivedLuminance(Color color)
	{
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		color = ((Color)(ref color)).linear;
		return Mathf.LinearToGammaSpace(0.2126f * color.r + 0.7152f * color.g + 0.0722f * color.b);
	}

	public static int GetColorBlindSafePalette(Color[] palette, float minimumLuminance, float maximumLuminance)
	{
		//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
		//IL_009c: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
		if (palette == null)
		{
			throw new ArgumentNullException("palette");
		}
		Color[] array = (from i in Enumerable.Range(0, s_ColorBlindSafePalette.Length)
			where s_ColorBlindSafePaletteLuminanceValues[i] >= minimumLuminance && s_ColorBlindSafePaletteLuminanceValues[i] <= maximumLuminance
			select s_ColorBlindSafePalette[i]).ToArray();
		int num = Mathf.Min(palette.Length, array.Length);
		if (num > 0)
		{
			int j = 0;
			for (int num2 = palette.Length; j < num2; j++)
			{
				ref Color reference = ref palette[j];
				reference = array[j % num];
			}
		}
		else
		{
			int k = 0;
			for (int num3 = palette.Length; k < num3; k++)
			{
				palette[k] = default(Color);
			}
		}
		return num;
	}
}

Room Architect Tool_Data/Managed/UnityEngine.AIModule.dll

Decompiled 3 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
using Unity.Jobs;
using UnityEngine;
using UnityEngine.AI;
using UnityEngine.Bindings;
using UnityEngine.Scripting;
using UnityEngine.Scripting.APIUpdating;

[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: UnityEngineModuleAssembly]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine.Experimental.AI
{
	public struct PolygonId : IEquatable<PolygonId>
	{
		internal ulong polyRef;

		public bool IsNull()
		{
			return polyRef == 0;
		}

		public static bool operator ==(PolygonId x, PolygonId y)
		{
			return x.polyRef == y.polyRef;
		}

		public static bool operator !=(PolygonId x, PolygonId y)
		{
			return x.polyRef != y.polyRef;
		}

		public override int GetHashCode()
		{
			return polyRef.GetHashCode();
		}

		public bool Equals(PolygonId rhs)
		{
			return rhs == this;
		}

		public override bool Equals(object obj)
		{
			if (obj == null || !(obj is PolygonId polygonId))
			{
				return false;
			}
			return polygonId == this;
		}
	}
	public struct NavMeshLocation
	{
		public PolygonId polygon { get; }

		public Vector3 position { get; }

		internal NavMeshLocation(Vector3 position, PolygonId polygon)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			this.position = position;
			this.polygon = polygon;
		}
	}
	[Flags]
	public enum PathQueryStatus
	{
		Failure = int.MinValue,
		Success = 0x40000000,
		InProgress = 0x20000000,
		StatusDetailMask = 0xFFFFFF,
		WrongMagic = 1,
		WrongVersion = 2,
		OutOfMemory = 4,
		InvalidParam = 8,
		BufferTooSmall = 0x10,
		OutOfNodes = 0x20,
		PartialResult = 0x40
	}
	public enum NavMeshPolyTypes
	{
		Ground,
		OffMeshConnection
	}
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	public struct NavMeshWorld
	{
		internal IntPtr world;

		public bool IsValid()
		{
			return world != IntPtr.Zero;
		}

		public static NavMeshWorld GetDefaultWorld()
		{
			GetDefaultWorld_Injected(out var ret);
			return ret;
		}

		private static void AddDependencyInternal(IntPtr navmesh, JobHandle handle)
		{
			AddDependencyInternal_Injected(navmesh, ref handle);
		}

		public void AddDependency(JobHandle job)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			AddDependencyInternal(world, job);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void GetDefaultWorld_Injected(out NavMeshWorld ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void AddDependencyInternal_Injected(IntPtr navmesh, ref JobHandle handle);
	}
	[NativeContainer]
	[NativeHeader("Modules/AI/NavMeshExperimental.bindings.h")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeHeader("Runtime/Math/Matrix4x4.h")]
	[NativeHeader("Modules/AI/Public/NavMeshBindingTypes.h")]
	public struct NavMeshQuery : IDisposable
	{
		[NativeDisableUnsafePtrRestriction]
		internal IntPtr m_NavMeshQuery;

		public NavMeshQuery(NavMeshWorld world, Allocator allocator, int pathNodePoolSize = 0)
		{
			m_NavMeshQuery = Create(world, pathNodePoolSize);
		}

		public void Dispose()
		{
			Destroy(m_NavMeshQuery);
			m_NavMeshQuery = IntPtr.Zero;
		}

		private static IntPtr Create(NavMeshWorld world, int nodePoolSize)
		{
			return Create_Injected(ref world, nodePoolSize);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void Destroy(IntPtr navMeshQuery);

		public unsafe PathQueryStatus BeginFindPath(NavMeshLocation start, NavMeshLocation end, int areaMask = -1, NativeArray<float> costs = default(NativeArray<float>))
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			void* costs2 = ((costs.Length <= 0) ? null : NativeArrayUnsafeUtility.GetUnsafePtr<float>(costs));
			return BeginFindPath(m_NavMeshQuery, start, end, areaMask, costs2);
		}

		public PathQueryStatus UpdateFindPath(int iterations, out int iterationsPerformed)
		{
			return UpdateFindPath(m_NavMeshQuery, iterations, out iterationsPerformed);
		}

		public PathQueryStatus EndFindPath(out int pathSize)
		{
			return EndFindPath(m_NavMeshQuery, out pathSize);
		}

		public unsafe int GetPathResult(NativeSlice<PolygonId> path)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			return GetPathResult(m_NavMeshQuery, NativeSliceUnsafeUtility.GetUnsafePtr<PolygonId>(path), path.Length);
		}

		[ThreadSafe]
		private unsafe static PathQueryStatus BeginFindPath(IntPtr navMeshQuery, NavMeshLocation start, NavMeshLocation end, int areaMask, void* costs)
		{
			return BeginFindPath_Injected(navMeshQuery, ref start, ref end, areaMask, costs);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[ThreadSafe]
		private static extern PathQueryStatus UpdateFindPath(IntPtr navMeshQuery, int iterations, out int iterationsPerformed);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[ThreadSafe]
		private static extern PathQueryStatus EndFindPath(IntPtr navMeshQuery, out int pathSize);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[ThreadSafe]
		private unsafe static extern int GetPathResult(IntPtr navMeshQuery, void* path, int maxPath);

		[ThreadSafe]
		private static bool IsValidPolygon(IntPtr navMeshQuery, PolygonId polygon)
		{
			return IsValidPolygon_Injected(navMeshQuery, ref polygon);
		}

		public bool IsValid(PolygonId polygon)
		{
			return polygon.polyRef != 0 && IsValidPolygon(m_NavMeshQuery, polygon);
		}

		public bool IsValid(NavMeshLocation location)
		{
			return IsValid(location.polygon);
		}

		[ThreadSafe]
		private static int GetAgentTypeIdForPolygon(IntPtr navMeshQuery, PolygonId polygon)
		{
			return GetAgentTypeIdForPolygon_Injected(navMeshQuery, ref polygon);
		}

		public int GetAgentTypeIdForPolygon(PolygonId polygon)
		{
			return GetAgentTypeIdForPolygon(m_NavMeshQuery, polygon);
		}

		[ThreadSafe]
		private static bool IsPositionInPolygon(IntPtr navMeshQuery, Vector3 position, PolygonId polygon)
		{
			return IsPositionInPolygon_Injected(navMeshQuery, ref position, ref polygon);
		}

		[ThreadSafe]
		private static PathQueryStatus GetClosestPointOnPoly(IntPtr navMeshQuery, PolygonId polygon, Vector3 position, out Vector3 nearest)
		{
			return GetClosestPointOnPoly_Injected(navMeshQuery, ref polygon, ref position, out nearest);
		}

		public NavMeshLocation CreateLocation(Vector3 position, PolygonId polygon)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			Vector3 nearest;
			PathQueryStatus closestPointOnPoly = GetClosestPointOnPoly(m_NavMeshQuery, polygon, position, out nearest);
			return ((closestPointOnPoly & PathQueryStatus.Success) == 0) ? default(NavMeshLocation) : new NavMeshLocation(nearest, polygon);
		}

		[ThreadSafe]
		private static NavMeshLocation MapLocation(IntPtr navMeshQuery, Vector3 position, Vector3 extents, int agentTypeID, int areaMask = -1)
		{
			MapLocation_Injected(navMeshQuery, ref position, ref extents, agentTypeID, areaMask, out var ret);
			return ret;
		}

		public NavMeshLocation MapLocation(Vector3 position, Vector3 extents, int agentTypeID, int areaMask = -1)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			return MapLocation(m_NavMeshQuery, position, extents, agentTypeID, areaMask);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[ThreadSafe]
		private unsafe static extern void MoveLocations(IntPtr navMeshQuery, void* locations, void* targets, void* areaMasks, int count);

		public unsafe void MoveLocations(NativeSlice<NavMeshLocation> locations, NativeSlice<Vector3> targets, NativeSlice<int> areaMasks)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			MoveLocations(m_NavMeshQuery, NativeSliceUnsafeUtility.GetUnsafePtr<NavMeshLocation>(locations), NativeSliceUnsafeUtility.GetUnsafeReadOnlyPtr<Vector3>(targets), NativeSliceUnsafeUtility.GetUnsafeReadOnlyPtr<int>(areaMasks), locations.Length);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[ThreadSafe]
		private unsafe static extern void MoveLocationsInSameAreas(IntPtr navMeshQuery, void* locations, void* targets, int count, int areaMask);

		public unsafe void MoveLocationsInSameAreas(NativeSlice<NavMeshLocation> locations, NativeSlice<Vector3> targets, int areaMask = -1)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			MoveLocationsInSameAreas(m_NavMeshQuery, NativeSliceUnsafeUtility.GetUnsafePtr<NavMeshLocation>(locations), NativeSliceUnsafeUtility.GetUnsafeReadOnlyPtr<Vector3>(targets), locations.Length, areaMask);
		}

		[ThreadSafe]
		private static NavMeshLocation MoveLocation(IntPtr navMeshQuery, NavMeshLocation location, Vector3 target, int areaMask)
		{
			MoveLocation_Injected(navMeshQuery, ref location, ref target, areaMask, out var ret);
			return ret;
		}

		public NavMeshLocation MoveLocation(NavMeshLocation location, Vector3 target, int areaMask = -1)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			return MoveLocation(m_NavMeshQuery, location, target, areaMask);
		}

		[ThreadSafe]
		private static bool GetPortalPoints(IntPtr navMeshQuery, PolygonId polygon, PolygonId neighbourPolygon, out Vector3 left, out Vector3 right)
		{
			return GetPortalPoints_Injected(navMeshQuery, ref polygon, ref neighbourPolygon, out left, out right);
		}

		public bool GetPortalPoints(PolygonId polygon, PolygonId neighbourPolygon, out Vector3 left, out Vector3 right)
		{
			return GetPortalPoints(m_NavMeshQuery, polygon, neighbourPolygon, out left, out right);
		}

		[ThreadSafe]
		private static Matrix4x4 PolygonLocalToWorldMatrix(IntPtr navMeshQuery, PolygonId polygon)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			PolygonLocalToWorldMatrix_Injected(navMeshQuery, ref polygon, out var ret);
			return ret;
		}

		public Matrix4x4 PolygonLocalToWorldMatrix(PolygonId polygon)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			return PolygonLocalToWorldMatrix(m_NavMeshQuery, polygon);
		}

		[ThreadSafe]
		private static Matrix4x4 PolygonWorldToLocalMatrix(IntPtr navMeshQuery, PolygonId polygon)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			PolygonWorldToLocalMatrix_Injected(navMeshQuery, ref polygon, out var ret);
			return ret;
		}

		public Matrix4x4 PolygonWorldToLocalMatrix(PolygonId polygon)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			return PolygonWorldToLocalMatrix(m_NavMeshQuery, polygon);
		}

		[ThreadSafe]
		private static NavMeshPolyTypes GetPolygonType(IntPtr navMeshQuery, PolygonId polygon)
		{
			return GetPolygonType_Injected(navMeshQuery, ref polygon);
		}

		public NavMeshPolyTypes GetPolygonType(PolygonId polygon)
		{
			return GetPolygonType(m_NavMeshQuery, polygon);
		}

		[ThreadSafe]
		private unsafe static PathQueryStatus Raycast(IntPtr navMeshQuery, NavMeshLocation start, Vector3 targetPosition, int areaMask, void* costs, out NavMeshHit hit, void* path, out int pathCount, int maxPath)
		{
			return Raycast_Injected(navMeshQuery, ref start, ref targetPosition, areaMask, costs, out hit, path, out pathCount, maxPath);
		}

		public unsafe PathQueryStatus Raycast(out NavMeshHit hit, NavMeshLocation start, Vector3 targetPosition, int areaMask = -1, NativeArray<float> costs = default(NativeArray<float>))
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			void* costs2 = ((costs.Length != 32) ? null : NativeArrayUnsafeUtility.GetUnsafePtr<float>(costs));
			int pathCount;
			PathQueryStatus pathQueryStatus = Raycast(m_NavMeshQuery, start, targetPosition, areaMask, costs2, out hit, null, out pathCount, 0);
			return pathQueryStatus & ~PathQueryStatus.BufferTooSmall;
		}

		public unsafe PathQueryStatus Raycast(out NavMeshHit hit, NativeSlice<PolygonId> path, out int pathCount, NavMeshLocation start, Vector3 targetPosition, int areaMask = -1, NativeArray<float> costs = default(NativeArray<float>))
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			void* costs2 = ((costs.Length != 32) ? null : NativeArrayUnsafeUtility.GetUnsafePtr<float>(costs));
			void* ptr = ((path.Length <= 0) ? null : NativeSliceUnsafeUtility.GetUnsafePtr<PolygonId>(path));
			int maxPath = ((ptr != null) ? path.Length : 0);
			return Raycast(m_NavMeshQuery, start, targetPosition, areaMask, costs2, out hit, ptr, out pathCount, maxPath);
		}

		[ThreadSafe]
		private unsafe static PathQueryStatus GetEdgesAndNeighbors(IntPtr navMeshQuery, PolygonId node, int maxVerts, int maxNei, void* verts, void* neighbors, void* edgeIndices, out int vertCount, out int neighborsCount)
		{
			return GetEdgesAndNeighbors_Injected(navMeshQuery, ref node, maxVerts, maxNei, verts, neighbors, edgeIndices, out vertCount, out neighborsCount);
		}

		public unsafe PathQueryStatus GetEdgesAndNeighbors(PolygonId node, NativeSlice<Vector3> edgeVertices, NativeSlice<PolygonId> neighbors, NativeSlice<byte> edgeIndices, out int verticesCount, out int neighborsCount)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			void* verts = ((edgeVertices.Length <= 0) ? null : NativeSliceUnsafeUtility.GetUnsafePtr<Vector3>(edgeVertices));
			void* neighbors2 = ((neighbors.Length <= 0) ? null : NativeSliceUnsafeUtility.GetUnsafePtr<PolygonId>(neighbors));
			void* edgeIndices2 = ((edgeIndices.Length <= 0) ? null : NativeSliceUnsafeUtility.GetUnsafePtr<byte>(edgeIndices));
			int length = edgeVertices.Length;
			int maxNei = ((neighbors.Length <= 0) ? edgeIndices.Length : neighbors.Length);
			return GetEdgesAndNeighbors(m_NavMeshQuery, node, length, maxNei, verts, neighbors2, edgeIndices2, out verticesCount, out neighborsCount);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern IntPtr Create_Injected(ref NavMeshWorld world, int nodePoolSize);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern PathQueryStatus BeginFindPath_Injected(IntPtr navMeshQuery, ref NavMeshLocation start, ref NavMeshLocation end, int areaMask, void* costs);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool IsValidPolygon_Injected(IntPtr navMeshQuery, ref PolygonId polygon);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern int GetAgentTypeIdForPolygon_Injected(IntPtr navMeshQuery, ref PolygonId polygon);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool IsPositionInPolygon_Injected(IntPtr navMeshQuery, ref Vector3 position, ref PolygonId polygon);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern PathQueryStatus GetClosestPointOnPoly_Injected(IntPtr navMeshQuery, ref PolygonId polygon, ref Vector3 position, out Vector3 nearest);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void MapLocation_Injected(IntPtr navMeshQuery, ref Vector3 position, ref Vector3 extents, int agentTypeID, int areaMask = -1, out NavMeshLocation ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void MoveLocation_Injected(IntPtr navMeshQuery, ref NavMeshLocation location, ref Vector3 target, int areaMask, out NavMeshLocation ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool GetPortalPoints_Injected(IntPtr navMeshQuery, ref PolygonId polygon, ref PolygonId neighbourPolygon, out Vector3 left, out Vector3 right);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void PolygonLocalToWorldMatrix_Injected(IntPtr navMeshQuery, ref PolygonId polygon, out Matrix4x4 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void PolygonWorldToLocalMatrix_Injected(IntPtr navMeshQuery, ref PolygonId polygon, out Matrix4x4 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern NavMeshPolyTypes GetPolygonType_Injected(IntPtr navMeshQuery, ref PolygonId polygon);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern PathQueryStatus Raycast_Injected(IntPtr navMeshQuery, ref NavMeshLocation start, ref Vector3 targetPosition, int areaMask, void* costs, out NavMeshHit hit, void* path, out int pathCount, int maxPath);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern PathQueryStatus GetEdgesAndNeighbors_Injected(IntPtr navMeshQuery, ref PolygonId node, int maxVerts, int maxNei, void* verts, void* neighbors, void* edgeIndices, out int vertCount, out int neighborsCount);
	}
}
namespace UnityEngine.AI
{
	[MovedFrom("UnityEngine")]
	public enum NavMeshPathStatus
	{
		PathComplete,
		PathPartial,
		PathInvalid
	}
	[StructLayout(LayoutKind.Sequential)]
	[MovedFrom("UnityEngine")]
	[NativeHeader("Modules/AI/NavMeshPath.bindings.h")]
	public sealed class NavMeshPath
	{
		internal IntPtr m_Ptr;

		internal Vector3[] m_Corners;

		public Vector3[] corners
		{
			get
			{
				CalculateCorners();
				return m_Corners;
			}
		}

		public extern NavMeshPathStatus status
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public NavMeshPath()
		{
			m_Ptr = InitializeNavMeshPath();
		}

		~NavMeshPath()
		{
			DestroyNavMeshPath(m_Ptr);
			m_Ptr = IntPtr.Zero;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("NavMeshPathScriptBindings::InitializeNavMeshPath")]
		private static extern IntPtr InitializeNavMeshPath();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("NavMeshPathScriptBindings::DestroyNavMeshPath", IsThreadSafe = true)]
		private static extern void DestroyNavMeshPath(IntPtr ptr);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("NavMeshPathScriptBindings::GetCornersNonAlloc", HasExplicitThis = true)]
		public extern int GetCornersNonAlloc([Out] Vector3[] results);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("NavMeshPathScriptBindings::CalculateCornersInternal", HasExplicitThis = true)]
		private extern Vector3[] CalculateCornersInternal();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("NavMeshPathScriptBindings::ClearCornersInternal", HasExplicitThis = true)]
		private extern void ClearCornersInternal();

		public void ClearCorners()
		{
			ClearCornersInternal();
			m_Corners = null;
		}

		private void CalculateCorners()
		{
			if (m_Corners == null)
			{
				m_Corners = CalculateCornersInternal();
			}
		}
	}
	[NativeHeader("Modules/AI/Builder/NavMeshBuilder.bindings.h")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	public static class NavMeshBuilder
	{
		public static void CollectSources(Bounds includedWorldBounds, int includedLayerMask, NavMeshCollectGeometry geometry, int defaultArea, List<NavMeshBuildMarkup> markups, List<NavMeshBuildSource> results)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			if (markups == null)
			{
				throw new ArgumentNullException("markups");
			}
			if (results == null)
			{
				throw new ArgumentNullException("results");
			}
			((Bounds)(ref includedWorldBounds)).extents = Vector3.Max(((Bounds)(ref includedWorldBounds)).extents, 0.001f * Vector3.one);
			NavMeshBuildSource[] collection = CollectSourcesInternal(includedLayerMask, includedWorldBounds, null, useBounds: true, geometry, defaultArea, markups.ToArray());
			results.Clear();
			results.AddRange(collection);
		}

		public static void CollectSources(Transform root, int includedLayerMask, NavMeshCollectGeometry geometry, int defaultArea, List<NavMeshBuildMarkup> markups, List<NavMeshBuildSource> results)
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			if (markups == null)
			{
				throw new ArgumentNullException("markups");
			}
			if (results == null)
			{
				throw new ArgumentNullException("results");
			}
			NavMeshBuildSource[] collection = CollectSourcesInternal(includedLayerMask, default(Bounds), root, useBounds: false, geometry, defaultArea, markups.ToArray());
			results.Clear();
			results.AddRange(collection);
		}

		private static NavMeshBuildSource[] CollectSourcesInternal(int includedLayerMask, Bounds includedWorldBounds, Transform root, bool useBounds, NavMeshCollectGeometry geometry, int defaultArea, NavMeshBuildMarkup[] markups)
		{
			return CollectSourcesInternal_Injected(includedLayerMask, ref includedWorldBounds, root, useBounds, geometry, defaultArea, markups);
		}

		public static NavMeshData BuildNavMeshData(NavMeshBuildSettings buildSettings, List<NavMeshBuildSource> sources, Bounds localBounds, Vector3 position, Quaternion rotation)
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			if (sources == null)
			{
				throw new ArgumentNullException("sources");
			}
			NavMeshData navMeshData = new NavMeshData(buildSettings.agentTypeID);
			navMeshData.position = position;
			navMeshData.rotation = rotation;
			NavMeshData navMeshData2 = navMeshData;
			UpdateNavMeshDataListInternal(navMeshData2, buildSettings, sources, localBounds);
			return navMeshData2;
		}

		public static bool UpdateNavMeshData(NavMeshData data, NavMeshBuildSettings buildSettings, List<NavMeshBuildSource> sources, Bounds localBounds)
		{
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)data == (Object)null)
			{
				throw new ArgumentNullException("data");
			}
			if (sources == null)
			{
				throw new ArgumentNullException("sources");
			}
			return UpdateNavMeshDataListInternal(data, buildSettings, sources, localBounds);
		}

		private static bool UpdateNavMeshDataListInternal(NavMeshData data, NavMeshBuildSettings buildSettings, object sources, Bounds localBounds)
		{
			return UpdateNavMeshDataListInternal_Injected(data, ref buildSettings, sources, ref localBounds);
		}

		public static AsyncOperation UpdateNavMeshDataAsync(NavMeshData data, NavMeshBuildSettings buildSettings, List<NavMeshBuildSource> sources, Bounds localBounds)
		{
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)data == (Object)null)
			{
				throw new ArgumentNullException("data");
			}
			if (sources == null)
			{
				throw new ArgumentNullException("sources");
			}
			return UpdateNavMeshDataAsyncListInternal(data, buildSettings, sources, localBounds);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeHeader("Modules/AI/NavMeshManager.h")]
		[NativeMethod("Purge")]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern void Cancel(NavMeshData data);

		private static AsyncOperation UpdateNavMeshDataAsyncListInternal(NavMeshData data, NavMeshBuildSettings buildSettings, object sources, Bounds localBounds)
		{
			return UpdateNavMeshDataAsyncListInternal_Injected(data, ref buildSettings, sources, ref localBounds);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern NavMeshBuildSource[] CollectSourcesInternal_Injected(int includedLayerMask, ref Bounds includedWorldBounds, Transform root, bool useBounds, NavMeshCollectGeometry geometry, int defaultArea, NavMeshBuildMarkup[] markups);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool UpdateNavMeshDataListInternal_Injected(NavMeshData data, ref NavMeshBuildSettings buildSettings, object sources, ref Bounds localBounds);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern AsyncOperation UpdateNavMeshDataAsyncListInternal_Injected(NavMeshData data, ref NavMeshBuildSettings buildSettings, object sources, ref Bounds localBounds);
	}
	[MovedFrom("UnityEngine")]
	public enum ObstacleAvoidanceType
	{
		NoObstacleAvoidance,
		LowQualityObstacleAvoidance,
		MedQualityObstacleAvoidance,
		GoodQualityObstacleAvoidance,
		HighQualityObstacleAvoidance
	}
	[NativeHeader("Modules/AI/NavMesh/NavMesh.bindings.h")]
	[MovedFrom("UnityEngine")]
	[NativeHeader("Modules/AI/Components/NavMeshAgent.bindings.h")]
	public sealed class NavMeshAgent : Behaviour
	{
		public Vector3 destination
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_destination_Injected(out var ret);
				return ret;
			}
			set
			{
				set_destination_Injected(ref value);
			}
		}

		public extern float stoppingDistance
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public Vector3 velocity
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_velocity_Injected(out var ret);
				return ret;
			}
			set
			{
				set_velocity_Injected(ref value);
			}
		}

		[NativeProperty("Position")]
		public Vector3 nextPosition
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_nextPosition_Injected(out var ret);
				return ret;
			}
			set
			{
				set_nextPosition_Injected(ref value);
			}
		}

		public Vector3 steeringTarget
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_steeringTarget_Injected(out var ret);
				return ret;
			}
		}

		public Vector3 desiredVelocity
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_desiredVelocity_Injected(out var ret);
				return ret;
			}
		}

		public extern float remainingDistance
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern float baseOffset
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool isOnOffMeshLink
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("IsOnOffMeshLink")]
			get;
		}

		public OffMeshLinkData currentOffMeshLinkData
		{
			[CompilerGenerated]
			get
			{
				return GetCurrentOffMeshLinkDataInternal();
			}
		}

		public OffMeshLinkData nextOffMeshLinkData
		{
			[CompilerGenerated]
			get
			{
				return GetNextOffMeshLinkDataInternal();
			}
		}

		public extern bool autoTraverseOffMeshLink
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool autoBraking
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool autoRepath
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool hasPath
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("HasPath")]
			get;
		}

		public extern bool pathPending
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("PathPending")]
			get;
		}

		public extern bool isPathStale
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("IsPathStale")]
			get;
		}

		public extern NavMeshPathStatus pathStatus
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		[NativeProperty("EndPositionOfCurrentPath")]
		public Vector3 pathEndPosition
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_pathEndPosition_Injected(out var ret);
				return ret;
			}
		}

		public extern bool isStopped
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("NavMeshAgentScriptBindings::GetIsStopped", HasExplicitThis = true)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("NavMeshAgentScriptBindings::SetIsStopped", HasExplicitThis = true)]
			set;
		}

		public NavMeshPath path
		{
			get
			{
				NavMeshPath result = new NavMeshPath();
				CopyPathTo(result);
				return result;
			}
			set
			{
				if (value == null)
				{
					throw new NullReferenceException();
				}
				SetPath(value);
			}
		}

		public Object navMeshOwner
		{
			[CompilerGenerated]
			get
			{
				return GetOwnerInternal();
			}
		}

		public extern int agentTypeID
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[Obsolete("Use areaMask instead.")]
		public int walkableMask
		{
			get
			{
				return areaMask;
			}
			set
			{
				areaMask = value;
			}
		}

		public extern int areaMask
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float speed
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float angularSpeed
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float acceleration
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool updatePosition
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool updateRotation
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool updateUpAxis
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float radius
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float height
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern ObstacleAvoidanceType obstacleAvoidanceType
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern int avoidancePriority
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool isOnNavMesh
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("InCrowdSystem")]
			get;
		}

		public bool SetDestination(Vector3 target)
		{
			return SetDestination_Injected(ref target);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void ActivateCurrentOffMeshLink(bool activated);

		[FreeFunction("NavMeshAgentScriptBindings::GetCurrentOffMeshLinkDataInternal", HasExplicitThis = true)]
		internal OffMeshLinkData GetCurrentOffMeshLinkDataInternal()
		{
			GetCurrentOffMeshLinkDataInternal_Injected(out var ret);
			return ret;
		}

		[FreeFunction("NavMeshAgentScriptBindings::GetNextOffMeshLinkDataInternal", HasExplicitThis = true)]
		internal OffMeshLinkData GetNextOffMeshLinkDataInternal()
		{
			GetNextOffMeshLinkDataInternal_Injected(out var ret);
			return ret;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void CompleteOffMeshLink();

		public bool Warp(Vector3 newPosition)
		{
			return Warp_Injected(ref newPosition);
		}

		public void Move(Vector3 offset)
		{
			Move_Injected(ref offset);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[Obsolete("Set isStopped to true instead.")]
		public extern void Stop();

		[Obsolete("Set isStopped to true instead.")]
		public void Stop(bool stopUpdates)
		{
			Stop();
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[Obsolete("Set isStopped to false instead.")]
		public extern void Resume();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void ResetPath();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool SetPath([NotNull] NavMeshPath path);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("CopyPath")]
		internal extern void CopyPathTo([NotNull] NavMeshPath path);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("DistanceToEdge")]
		public extern bool FindClosestEdge(out NavMeshHit hit);

		public bool Raycast(Vector3 targetPosition, out NavMeshHit hit)
		{
			return Raycast_Injected(ref targetPosition, out hit);
		}

		public bool CalculatePath(Vector3 targetPosition, NavMeshPath path)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			path.ClearCorners();
			return CalculatePathInternal(targetPosition, path);
		}

		[FreeFunction("NavMeshAgentScriptBindings::CalculatePathInternal", HasExplicitThis = true)]
		private bool CalculatePathInternal(Vector3 targetPosition, [NotNull] NavMeshPath path)
		{
			return CalculatePathInternal_Injected(ref targetPosition, path);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool SamplePathPosition(int areaMask, float maxDistance, out NavMeshHit hit);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[Obsolete("Use SetAreaCost instead.")]
		[NativeMethod("SetAreaCost")]
		public extern void SetLayerCost(int layer, float cost);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[Obsolete("Use GetAreaCost instead.")]
		[NativeMethod("GetAreaCost")]
		public extern float GetLayerCost(int layer);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void SetAreaCost(int areaIndex, float areaCost);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern float GetAreaCost(int areaIndex);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("GetCurrentPolygonOwner")]
		private extern Object GetOwnerInternal();

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern bool SetDestination_Injected(ref Vector3 target);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_destination_Injected(out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void set_destination_Injected(ref Vector3 value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_velocity_Injected(out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void set_velocity_Injected(ref Vector3 value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_nextPosition_Injected(out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void set_nextPosition_Injected(ref Vector3 value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_steeringTarget_Injected(out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_desiredVelocity_Injected(out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void GetCurrentOffMeshLinkDataInternal_Injected(out OffMeshLinkData ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void GetNextOffMeshLinkDataInternal_Injected(out OffMeshLinkData ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_pathEndPosition_Injected(out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern bool Warp_Injected(ref Vector3 newPosition);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void Move_Injected(ref Vector3 offset);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern bool Raycast_Injected(ref Vector3 targetPosition, out NavMeshHit hit);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern bool CalculatePathInternal_Injected(ref Vector3 targetPosition, NavMeshPath path);
	}
	[MovedFrom("UnityEngine")]
	public enum NavMeshObstacleShape
	{
		Capsule,
		Box
	}
	[NativeHeader("Modules/AI/Components/NavMeshObstacle.bindings.h")]
	[MovedFrom("UnityEngine")]
	public sealed class NavMeshObstacle : Behaviour
	{
		public extern float height
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float radius
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public Vector3 velocity
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_velocity_Injected(out var ret);
				return ret;
			}
			set
			{
				set_velocity_Injected(ref value);
			}
		}

		public extern bool carving
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool carveOnlyStationary
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty("MoveThreshold")]
		public extern float carvingMoveThreshold
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty("TimeToStationary")]
		public extern float carvingTimeToStationary
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern NavMeshObstacleShape shape
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public Vector3 center
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_center_Injected(out var ret);
				return ret;
			}
			set
			{
				set_center_Injected(ref value);
			}
		}

		public Vector3 size
		{
			[FreeFunction("NavMeshObstacleScriptBindings::GetSize", HasExplicitThis = true)]
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_size_Injected(out var ret);
				return ret;
			}
			[FreeFunction("NavMeshObstacleScriptBindings::SetSize", HasExplicitThis = true)]
			set
			{
				set_size_Injected(ref value);
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("NavMeshObstacleScriptBindings::FitExtents", HasExplicitThis = true)]
		internal extern void FitExtents();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_velocity_Injected(out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void set_velocity_Injected(ref Vector3 value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_center_Injected(out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void set_center_Injected(ref Vector3 value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_size_Injected(out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void set_size_Injected(ref Vector3 value);
	}
	[MovedFrom("UnityEngine")]
	public enum OffMeshLinkType
	{
		LinkTypeManual,
		LinkTypeDropDown,
		LinkTypeJumpAcross
	}
	[MovedFrom("UnityEngine")]
	[NativeHeader("Modules/AI/Components/OffMeshLink.bindings.h")]
	public struct OffMeshLinkData
	{
		internal int m_Valid;

		internal int m_Activated;

		internal int m_InstanceID;

		internal OffMeshLinkType m_LinkType;

		internal Vector3 m_StartPos;

		internal Vector3 m_EndPos;

		public bool valid
		{
			[CompilerGenerated]
			get
			{
				return m_Valid != 0;
			}
		}

		public bool activated
		{
			[CompilerGenerated]
			get
			{
				return m_Activated != 0;
			}
		}

		public OffMeshLinkType linkType
		{
			[CompilerGenerated]
			get
			{
				return m_LinkType;
			}
		}

		public Vector3 startPos
		{
			[CompilerGenerated]
			get
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				return m_StartPos;
			}
		}

		public Vector3 endPos
		{
			[CompilerGenerated]
			get
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				return m_EndPos;
			}
		}

		public OffMeshLink offMeshLink
		{
			[CompilerGenerated]
			get
			{
				return GetOffMeshLinkInternal(m_InstanceID);
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("OffMeshLinkScriptBindings::GetOffMeshLinkInternal")]
		internal static extern OffMeshLink GetOffMeshLinkInternal(int instanceID);
	}
	[MovedFrom("UnityEngine")]
	public sealed class OffMeshLink : Behaviour
	{
		public extern bool activated
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool occupied
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern float costOverride
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool biDirectional
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[Obsolete("Use area instead.")]
		public int navMeshLayer
		{
			get
			{
				return area;
			}
			set
			{
				area = value;
			}
		}

		public extern int area
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool autoUpdatePositions
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern Transform startTransform
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern Transform endTransform
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void UpdatePositions();
	}
	[MovedFrom("UnityEngine")]
	public struct NavMeshHit
	{
		private Vector3 m_Position;

		private Vector3 m_Normal;

		private float m_Distance;

		private int m_Mask;

		private int m_Hit;

		public Vector3 position
		{
			get
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				return m_Position;
			}
			set
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				m_Position = value;
			}
		}

		public Vector3 normal
		{
			get
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				return m_Normal;
			}
			set
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				m_Normal = value;
			}
		}

		public float distance
		{
			get
			{
				return m_Distance;
			}
			set
			{
				m_Distance = value;
			}
		}

		public int mask
		{
			get
			{
				return m_Mask;
			}
			set
			{
				m_Mask = value;
			}
		}

		public bool hit
		{
			get
			{
				return m_Hit != 0;
			}
			set
			{
				m_Hit = (value ? 1 : 0);
			}
		}
	}
	[UsedByNativeCode]
	[MovedFrom("UnityEngine")]
	public struct NavMeshTriangulation
	{
		public Vector3[] vertices;

		public int[] indices;

		public int[] areas;

		[Obsolete("Use areas instead.")]
		public int[] layers
		{
			[CompilerGenerated]
			get
			{
				return areas;
			}
		}
	}
	[NativeHeader("Modules/AI/NavMesh/NavMesh.bindings.h")]
	public sealed class NavMeshData : Object
	{
		public Bounds sourceBounds
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_sourceBounds_Injected(out var ret);
				return ret;
			}
		}

		public Vector3 position
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_position_Injected(out var ret);
				return ret;
			}
			set
			{
				set_position_Injected(ref value);
			}
		}

		public Quaternion rotation
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_rotation_Injected(out var ret);
				return ret;
			}
			set
			{
				set_rotation_Injected(ref value);
			}
		}

		public NavMeshData()
		{
			Internal_Create(this, 0);
		}

		public NavMeshData(int agentTypeID)
		{
			Internal_Create(this, agentTypeID);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		private static extern void Internal_Create([Writable] NavMeshData mono, int agentTypeID);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_sourceBounds_Injected(out Bounds ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_position_Injected(out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void set_position_Injected(ref Vector3 value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_rotation_Injected(out Quaternion ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void set_rotation_Injected(ref Quaternion value);
	}
	public struct NavMeshDataInstance
	{
		public bool valid
		{
			[CompilerGenerated]
			get
			{
				return id != 0 && NavMesh.IsValidNavMeshDataHandle(id);
			}
		}

		internal int id { get; set; }

		public Object owner
		{
			get
			{
				return NavMesh.InternalGetOwner(id);
			}
			set
			{
				int ownerID = ((value != (Object)null) ? value.GetInstanceID() : 0);
				if (!NavMesh.InternalSetOwner(id, ownerID))
				{
					Debug.LogError((object)"Cannot set 'owner' on an invalid NavMeshDataInstance");
				}
			}
		}

		public void Remove()
		{
			NavMesh.RemoveNavMeshDataInternal(id);
		}
	}
	public struct NavMeshLinkData
	{
		private Vector3 m_StartPosition;

		private Vector3 m_EndPosition;

		private float m_CostModifier;

		private int m_Bidirectional;

		private float m_Width;

		private int m_Area;

		private int m_AgentTypeID;

		public Vector3 startPosition
		{
			get
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				return m_StartPosition;
			}
			set
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				m_StartPosition = value;
			}
		}

		public Vector3 endPosition
		{
			get
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				return m_EndPosition;
			}
			set
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				m_EndPosition = value;
			}
		}

		public float costModifier
		{
			get
			{
				return m_CostModifier;
			}
			set
			{
				m_CostModifier = value;
			}
		}

		public bool bidirectional
		{
			get
			{
				return m_Bidirectional != 0;
			}
			set
			{
				m_Bidirectional = (value ? 1 : 0);
			}
		}

		public float width
		{
			get
			{
				return m_Width;
			}
			set
			{
				m_Width = value;
			}
		}

		public int area
		{
			get
			{
				return m_Area;
			}
			set
			{
				m_Area = value;
			}
		}

		public int agentTypeID
		{
			get
			{
				return m_AgentTypeID;
			}
			set
			{
				m_AgentTypeID = value;
			}
		}
	}
	public struct NavMeshLinkInstance
	{
		public bool valid
		{
			[CompilerGenerated]
			get
			{
				return id != 0 && NavMesh.IsValidLinkHandle(id);
			}
		}

		internal int id { get; set; }

		public Object owner
		{
			get
			{
				return NavMesh.InternalGetLinkOwner(id);
			}
			set
			{
				int ownerID = ((value != (Object)null) ? value.GetInstanceID() : 0);
				if (!NavMesh.InternalSetLinkOwner(id, ownerID))
				{
					Debug.LogError((object)"Cannot set 'owner' on an invalid NavMeshLinkInstance");
				}
			}
		}

		public void Remove()
		{
			NavMesh.RemoveLinkInternal(id);
		}
	}
	public struct NavMeshQueryFilter
	{
		private const int k_AreaCostElementCount = 32;

		internal float[] costs { get; private set; }

		public int areaMask { get; set; }

		public int agentTypeID { get; set; }

		public float GetAreaCost(int areaIndex)
		{
			if (costs == null)
			{
				if (areaIndex < 0 || areaIndex >= 32)
				{
					string message = $"The valid range is [0:{31}]";
					throw new IndexOutOfRangeException(message);
				}
				return 1f;
			}
			return costs[areaIndex];
		}

		public void SetAreaCost(int areaIndex, float cost)
		{
			if (costs == null)
			{
				costs = new float[32];
				for (int i = 0; i < 32; i++)
				{
					costs[i] = 1f;
				}
			}
			costs[areaIndex] = cost;
		}
	}
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeHeader("Modules/AI/NavMeshManager.h")]
	[MovedFrom("UnityEngine")]
	[NativeHeader("Modules/AI/NavMesh/NavMesh.bindings.h")]
	public static class NavMesh
	{
		public delegate void OnNavMeshPreUpdate();

		public const int AllAreas = -1;

		public static OnNavMeshPreUpdate onPreUpdate;

		[StaticAccessor("GetNavMeshManager()")]
		public static extern float avoidancePredictionTime
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[StaticAccessor("GetNavMeshManager()")]
		public static extern int pathfindingIterationsPerFrame
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[RequiredByNativeCode]
		private static void Internal_CallOnNavMeshPreUpdate()
		{
			if (onPreUpdate != null)
			{
				onPreUpdate();
			}
		}

		public static bool Raycast(Vector3 sourcePosition, Vector3 targetPosition, out NavMeshHit hit, int areaMask)
		{
			return Raycast_Injected(ref sourcePosition, ref targetPosition, out hit, areaMask);
		}

		public static bool CalculatePath(Vector3 sourcePosition, Vector3 targetPosition, int areaMask, NavMeshPath path)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			path.ClearCorners();
			return CalculatePathInternal(sourcePosition, targetPosition, areaMask, path);
		}

		private static bool CalculatePathInternal(Vector3 sourcePosition, Vector3 targetPosition, int areaMask, NavMeshPath path)
		{
			return CalculatePathInternal_Injected(ref sourcePosition, ref targetPosition, areaMask, path);
		}

		public static bool FindClosestEdge(Vector3 sourcePosition, out NavMeshHit hit, int areaMask)
		{
			return FindClosestEdge_Injected(ref sourcePosition, out hit, areaMask);
		}

		public static bool SamplePosition(Vector3 sourcePosition, out NavMeshHit hit, float maxDistance, int areaMask)
		{
			return SamplePosition_Injected(ref sourcePosition, out hit, maxDistance, areaMask);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor("GetNavMeshProjectSettings()")]
		[NativeName("SetAreaCost")]
		[Obsolete("Use SetAreaCost instead.")]
		public static extern void SetLayerCost(int layer, float cost);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[Obsolete("Use GetAreaCost instead.")]
		[StaticAccessor("GetNavMeshProjectSettings()")]
		[NativeName("GetAreaCost")]
		public static extern float GetLayerCost(int layer);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[Obsolete("Use GetAreaFromName instead.")]
		[StaticAccessor("GetNavMeshProjectSettings()")]
		[NativeName("GetAreaFromName")]
		public static extern int GetNavMeshLayerFromName(string layerName);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor("GetNavMeshProjectSettings()")]
		[NativeName("SetAreaCost")]
		public static extern void SetAreaCost(int areaIndex, float cost);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor("GetNavMeshProjectSettings()")]
		[NativeName("GetAreaCost")]
		public static extern float GetAreaCost(int areaIndex);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("GetAreaFromName")]
		[StaticAccessor("GetNavMeshProjectSettings()")]
		public static extern int GetAreaFromName(string areaName);

		public static NavMeshTriangulation CalculateTriangulation()
		{
			CalculateTriangulation_Injected(out var ret);
			return ret;
		}

		[Obsolete("use NavMesh.CalculateTriangulation() instead.")]
		public static void Triangulate(out Vector3[] vertices, out int[] indices)
		{
			NavMeshTriangulation navMeshTriangulation = CalculateTriangulation();
			vertices = navMeshTriangulation.vertices;
			indices = navMeshTriangulation.indices;
		}

		[Obsolete("AddOffMeshLinks has no effect and is deprecated.")]
		public static void AddOffMeshLinks()
		{
		}

		[Obsolete("RestoreNavMesh has no effect and is deprecated.")]
		public static void RestoreNavMesh()
		{
		}

		public static NavMeshDataInstance AddNavMeshData(NavMeshData navMeshData)
		{
			if ((Object)(object)navMeshData == (Object)null)
			{
				throw new ArgumentNullException("navMeshData");
			}
			NavMeshDataInstance result = default(NavMeshDataInstance);
			result.id = AddNavMeshDataInternal(navMeshData);
			return result;
		}

		public static NavMeshDataInstance AddNavMeshData(NavMeshData navMeshData, Vector3 position, Quaternion rotation)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)navMeshData == (Object)null)
			{
				throw new ArgumentNullException("navMeshData");
			}
			NavMeshDataInstance result = default(NavMeshDataInstance);
			result.id = AddNavMeshDataTransformedInternal(navMeshData, position, rotation);
			return result;
		}

		public static void RemoveNavMeshData(NavMeshDataInstance handle)
		{
			RemoveNavMeshDataInternal(handle.id);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("IsValidSurfaceID")]
		[StaticAccessor("GetNavMeshManager()")]
		internal static extern bool IsValidNavMeshDataHandle(int handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor("GetNavMeshManager()")]
		internal static extern bool IsValidLinkHandle(int handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern Object InternalGetOwner(int dataID);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor("GetNavMeshManager()")]
		[NativeName("SetSurfaceUserID")]
		internal static extern bool InternalSetOwner(int dataID, int ownerID);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern Object InternalGetLinkOwner(int linkID);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("SetLinkUserID")]
		[StaticAccessor("GetNavMeshManager()")]
		internal static extern bool InternalSetLinkOwner(int linkID, int ownerID);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("LoadData")]
		[StaticAccessor("GetNavMeshManager()")]
		internal static extern int AddNavMeshDataInternal(NavMeshData navMeshData);

		[NativeName("LoadData")]
		[StaticAccessor("GetNavMeshManager()")]
		internal static int AddNavMeshDataTransformedInternal(NavMeshData navMeshData, Vector3 position, Quaternion rotation)
		{
			return AddNavMeshDataTransformedInternal_Injected(navMeshData, ref position, ref rotation);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor("GetNavMeshManager()")]
		[NativeName("UnloadData")]
		internal static extern void RemoveNavMeshDataInternal(int handle);

		public static NavMeshLinkInstance AddLink(NavMeshLinkData link)
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			NavMeshLinkInstance result = default(NavMeshLinkInstance);
			result.id = AddLinkInternal(link, Vector3.zero, Quaternion.identity);
			return result;
		}

		public static NavMeshLinkInstance AddLink(NavMeshLinkData link, Vector3 position, Quaternion rotation)
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			NavMeshLinkInstance result = default(NavMeshLinkInstance);
			result.id = AddLinkInternal(link, position, rotation);
			return result;
		}

		public static void RemoveLink(NavMeshLinkInstance handle)
		{
			RemoveLinkInternal(handle.id);
		}

		[StaticAccessor("GetNavMeshManager()")]
		[NativeName("AddLink")]
		internal static int AddLinkInternal(NavMeshLinkData link, Vector3 position, Quaternion rotation)
		{
			return AddLinkInternal_Injected(ref link, ref position, ref rotation);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor("GetNavMeshManager()")]
		[NativeName("RemoveLink")]
		internal static extern void RemoveLinkInternal(int handle);

		public static bool SamplePosition(Vector3 sourcePosition, out NavMeshHit hit, float maxDistance, NavMeshQueryFilter filter)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return SamplePositionFilter(sourcePosition, out hit, maxDistance, filter.agentTypeID, filter.areaMask);
		}

		private static bool SamplePositionFilter(Vector3 sourcePosition, out NavMeshHit hit, float maxDistance, int type, int mask)
		{
			return SamplePositionFilter_Injected(ref sourcePosition, out hit, maxDistance, type, mask);
		}

		public static bool FindClosestEdge(Vector3 sourcePosition, out NavMeshHit hit, NavMeshQueryFilter filter)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return FindClosestEdgeFilter(sourcePosition, out hit, filter.agentTypeID, filter.areaMask);
		}

		private static bool FindClosestEdgeFilter(Vector3 sourcePosition, out NavMeshHit hit, int type, int mask)
		{
			return FindClosestEdgeFilter_Injected(ref sourcePosition, out hit, type, mask);
		}

		public static bool Raycast(Vector3 sourcePosition, Vector3 targetPosition, out NavMeshHit hit, NavMeshQueryFilter filter)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			return RaycastFilter(sourcePosition, targetPosition, out hit, filter.agentTypeID, filter.areaMask);
		}

		private static bool RaycastFilter(Vector3 sourcePosition, Vector3 targetPosition, out NavMeshHit hit, int type, int mask)
		{
			return RaycastFilter_Injected(ref sourcePosition, ref targetPosition, out hit, type, mask);
		}

		public static bool CalculatePath(Vector3 sourcePosition, Vector3 targetPosition, NavMeshQueryFilter filter, NavMeshPath path)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			path.ClearCorners();
			return CalculatePathFilterInternal(sourcePosition, targetPosition, path, filter.agentTypeID, filter.areaMask, filter.costs);
		}

		private static bool CalculatePathFilterInternal(Vector3 sourcePosition, Vector3 targetPosition, NavMeshPath path, int type, int mask, float[] costs)
		{
			return CalculatePathFilterInternal_Injected(ref sourcePosition, ref targetPosition, path, type, mask, costs);
		}

		[StaticAccessor("GetNavMeshProjectSettings()")]
		public static NavMeshBuildSettings CreateSettings()
		{
			CreateSettings_Injected(out var ret);
			return ret;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor("GetNavMeshProjectSettings()")]
		public static extern void RemoveSettings(int agentTypeID);

		public static NavMeshBuildSettings GetSettingsByID(int agentTypeID)
		{
			GetSettingsByID_Injected(agentTypeID, out var ret);
			return ret;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor("GetNavMeshProjectSettings()")]
		public static extern int GetSettingsCount();

		public static NavMeshBuildSettings GetSettingsByIndex(int index)
		{
			GetSettingsByIndex_Injected(index, out var ret);
			return ret;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public static extern string GetSettingsNameFromID(int agentTypeID);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("CleanupAfterCarving")]
		[StaticAccessor("GetNavMeshManager()")]
		public static extern void RemoveAllNavMeshData();

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool Raycast_Injected(ref Vector3 sourcePosition, ref Vector3 targetPosition, out NavMeshHit hit, int areaMask);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool CalculatePathInternal_Injected(ref Vector3 sourcePosition, ref Vector3 targetPosition, int areaMask, NavMeshPath path);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool FindClosestEdge_Injected(ref Vector3 sourcePosition, out NavMeshHit hit, int areaMask);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool SamplePosition_Injected(ref Vector3 sourcePosition, out NavMeshHit hit, float maxDistance, int areaMask);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void CalculateTriangulation_Injected(out NavMeshTriangulation ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern int AddNavMeshDataTransformedInternal_Injected(NavMeshData navMeshData, ref Vector3 position, ref Quaternion rotation);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern int AddLinkInternal_Injected(ref NavMeshLinkData link, ref Vector3 position, ref Quaternion rotation);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool SamplePositionFilter_Injected(ref Vector3 sourcePosition, out NavMeshHit hit, float maxDistance, int type, int mask);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool FindClosestEdgeFilter_Injected(ref Vector3 sourcePosition, out NavMeshHit hit, int type, int mask);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool RaycastFilter_Injected(ref Vector3 sourcePosition, ref Vector3 targetPosition, out NavMeshHit hit, int type, int mask);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool CalculatePathFilterInternal_Injected(ref Vector3 sourcePosition, ref Vector3 targetPosition, NavMeshPath path, int type, int mask, float[] costs);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void CreateSettings_Injected(out NavMeshBuildSettings ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void GetSettingsByID_Injected(int agentTypeID, out NavMeshBuildSettings ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void GetSettingsByIndex_Injected(int index, out NavMeshBuildSettings ret);
	}
	[Flags]
	public enum NavMeshBuildDebugFlags
	{
		None = 0,
		InputGeometry = 1,
		Voxels = 2,
		Regions = 4,
		RawContours = 8,
		SimplifiedContours = 0x10,
		PolygonMeshes = 0x20,
		PolygonMeshesDetail = 0x40,
		All = 0x7F
	}
	public enum NavMeshBuildSourceShape
	{
		Mesh,
		Terrain,
		Box,
		Sphere,
		Capsule,
		ModifierBox
	}
	public enum NavMeshCollectGeometry
	{
		RenderMeshes,
		PhysicsColliders
	}
	[UsedByNativeCode]
	[NativeHeader("Modules/AI/Public/NavMeshBindingTypes.h")]
	public struct NavMeshBuildSource
	{
		private Matrix4x4 m_Transform;

		private Vector3 m_Size;

		private NavMeshBuildSourceShape m_Shape;

		private int m_Area;

		private int m_InstanceID;

		private int m_ComponentID;

		public Matrix4x4 transform
		{
			get
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				return m_Transform;
			}
			set
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				m_Transform = value;
			}
		}

		public Vector3 size
		{
			get
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				return m_Size;
			}
			set
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				m_Size = value;
			}
		}

		public NavMeshBuildSourceShape shape
		{
			get
			{
				return m_Shape;
			}
			set
			{
				m_Shape = value;
			}
		}

		public int area
		{
			get
			{
				return m_Area;
			}
			set
			{
				m_Area = value;
			}
		}

		public Object sourceObject
		{
			get
			{
				return InternalGetObject(m_InstanceID);
			}
			set
			{
				m_InstanceID = ((value != (Object)null) ? value.GetInstanceID() : 0);
			}
		}

		public Component component
		{
			get
			{
				return InternalGetComponent(m_ComponentID);
			}
			set
			{
				m_ComponentID = (((Object)(object)value != (Object)null) ? ((Object)value).GetInstanceID() : 0);
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		private static extern Component InternalGetComponent(int instanceID);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		private static extern Object InternalGetObject(int instanceID);
	}
	[NativeHeader("Modules/AI/Public/NavMeshBindingTypes.h")]
	public struct NavMeshBuildMarkup
	{
		private int m_OverrideArea;

		private int m_Area;

		private int m_IgnoreFromBuild;

		private int m_InstanceID;

		public bool overrideArea
		{
			get
			{
				return m_OverrideArea != 0;
			}
			set
			{
				m_OverrideArea = (value ? 1 : 0);
			}
		}

		public int area
		{
			get
			{
				return m_Area;
			}
			set
			{
				m_Area = value;
			}
		}

		public bool ignoreFromBuild
		{
			get
			{
				return m_IgnoreFromBuild != 0;
			}
			set
			{
				m_IgnoreFromBuild = (value ? 1 : 0);
			}
		}

		public Transform root
		{
			get
			{
				return InternalGetRootGO(m_InstanceID);
			}
			set
			{
				m_InstanceID = (((Object)(object)value != (Object)null) ? ((Object)value).GetInstanceID() : 0);
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		private static extern Transform InternalGetRootGO(int instanceID);
	}
	[NativeHeader("Modules/AI/Public/NavMeshBuildSettings.h")]
	public struct NavMeshBuildSettings
	{
		private int m_AgentTypeID;

		private float m_AgentRadius;

		private float m_AgentHeight;

		private float m_AgentSlope;

		private float m_AgentClimb;

		private float m_LedgeDropHeight;

		private float m_MaxJumpAcrossDistance;

		private float m_MinRegionArea;

		private int m_OverrideVoxelSize;

		private float m_VoxelSize;

		private int m_OverrideTileSize;

		private int m_TileSize;

		private int m_AccuratePlacement;

		private NavMeshBuildDebugSettings m_Debug;

		public int agentTypeID
		{
			get
			{
				return m_AgentTypeID;
			}
			set
			{
				m_AgentTypeID = value;
			}
		}

		public float agentRadius
		{
			get
			{
				return m_AgentRadius;
			}
			set
			{
				m_AgentRadius = value;
			}
		}

		public float agentHeight
		{
			get
			{
				return m_AgentHeight;
			}
			set
			{
				m_AgentHeight = value;
			}
		}

		public float agentSlope
		{
			get
			{
				return m_AgentSlope;
			}
			set
			{
				m_AgentSlope = value;
			}
		}

		public float agentClimb
		{
			get
			{
				return m_AgentClimb;
			}
			set
			{
				m_AgentClimb = value;
			}
		}

		public float minRegionArea
		{
			get
			{
				return m_MinRegionArea;
			}
			set
			{
				m_MinRegionArea = value;
			}
		}

		public bool overrideVoxelSize
		{
			get
			{
				return m_OverrideVoxelSize != 0;
			}
			set
			{
				m_OverrideVoxelSize = (value ? 1 : 0);
			}
		}

		public float voxelSize
		{
			get
			{
				return m_VoxelSize;
			}
			set
			{
				m_VoxelSize = value;
			}
		}

		public bool overrideTileSize
		{
			get
			{
				return m_OverrideTileSize != 0;
			}
			set
			{
				m_OverrideTileSize = (value ? 1 : 0);
			}
		}

		public int tileSize
		{
			get
			{
				return m_TileSize;
			}
			set
			{
				m_TileSize = value;
			}
		}

		public NavMeshBuildDebugSettings debug
		{
			get
			{
				return m_Debug;
			}
			set
			{
				m_Debug = value;
			}
		}

		public string[] ValidationReport(Bounds buildBounds)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			return InternalValidationReport(this, buildBounds);
		}

		[FreeFunction]
		[NativeHeader("Modules/AI/Public/NavMeshBuildSettings.h")]
		private static string[] InternalValidationReport(NavMeshBuildSettings buildSettings, Bounds buildBounds)
		{
			return InternalValidationReport_Injected(ref buildSettings, ref buildBounds);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern string[] InternalValidationReport_Injected(ref NavMeshBuildSettings buildSettings, ref Bounds buildBounds);
	}
	[NativeHeader("Modules/AI/Public/NavMeshBuildDebugSettings.h")]
	public struct NavMeshBuildDebugSettings
	{
		private byte m_Flags;

		public NavMeshBuildDebugFlags flags
		{
			get
			{
				return (NavMeshBuildDebugFlags)m_Flags;
			}
			set
			{
				m_Flags = (byte)value;
			}
		}
	}
}

Room Architect Tool_Data/Managed/UnityEngine.AndroidJNIModule.dll

Decompiled 3 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using System.Text;
using UnityEngine;
using UnityEngine.Bindings;
using UnityEngine.Internal;
using UnityEngine.Scripting;

[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: UnityEngineModuleAssembly]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine;

public delegate void AndroidJavaRunnable();
public sealed class AndroidJavaException : Exception
{
	private string mJavaStackTrace;

	public override string StackTrace => mJavaStackTrace + base.StackTrace;

	internal AndroidJavaException(string message, string javaStackTrace)
		: base(message)
	{
		mJavaStackTrace = javaStackTrace;
	}
}
internal class GlobalJavaObjectRef
{
	private bool m_disposed = false;

	protected IntPtr m_jobject;

	public GlobalJavaObjectRef(IntPtr jobject)
	{
		m_jobject = ((!(jobject == IntPtr.Zero)) ? AndroidJNI.NewGlobalRef(jobject) : IntPtr.Zero);
	}

	~GlobalJavaObjectRef()
	{
		Dispose();
	}

	public static implicit operator IntPtr(GlobalJavaObjectRef obj)
	{
		return obj.m_jobject;
	}

	public void Dispose()
	{
		if (!m_disposed)
		{
			m_disposed = true;
			if (m_jobject != IntPtr.Zero)
			{
				AndroidJNISafe.DeleteGlobalRef(m_jobject);
			}
		}
	}
}
internal class AndroidJavaRunnableProxy : AndroidJavaProxy
{
	private AndroidJavaRunnable mRunnable;

	public AndroidJavaRunnableProxy(AndroidJavaRunnable runnable)
		: base("java/lang/Runnable")
	{
		mRunnable = runnable;
	}

	public void run()
	{
		mRunnable();
	}
}
public class AndroidJavaProxy
{
	public readonly AndroidJavaClass javaInterface;

	internal IntPtr proxyObject = IntPtr.Zero;

	private static readonly GlobalJavaObjectRef s_JavaLangSystemClass = new GlobalJavaObjectRef(AndroidJNISafe.FindClass("java/lang/System"));

	private static readonly IntPtr s_HashCodeMethodID = AndroidJNIHelper.GetMethodID(s_JavaLangSystemClass, "identityHashCode", "(Ljava/lang/Object;)I", isStatic: true);

	public AndroidJavaProxy(string javaInterface)
		: this(new AndroidJavaClass(javaInterface))
	{
	}

	public AndroidJavaProxy(AndroidJavaClass javaInterface)
	{
		this.javaInterface = javaInterface;
	}

	~AndroidJavaProxy()
	{
		AndroidJNISafe.DeleteWeakGlobalRef(proxyObject);
	}

	public virtual AndroidJavaObject Invoke(string methodName, object[] args)
	{
		Exception ex = null;
		BindingFlags bindingAttr = BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic;
		Type[] array = new Type[args.Length];
		for (int i = 0; i < args.Length; i++)
		{
			array[i] = ((args[i] != null) ? args[i].GetType() : typeof(AndroidJavaObject));
		}
		try
		{
			MethodInfo method = GetType().GetMethod(methodName, bindingAttr, null, array, null);
			if ((object)method != null)
			{
				return _AndroidJNIHelper.Box(method.Invoke(this, args));
			}
		}
		catch (TargetInvocationException ex2)
		{
			ex = ex2.InnerException;
		}
		catch (Exception ex3)
		{
			ex = ex3;
		}
		string[] array2 = new string[args.Length];
		for (int j = 0; j < array.Length; j++)
		{
			array2[j] = array[j].ToString();
		}
		if (ex != null)
		{
			throw new TargetInvocationException(string.Concat(GetType(), ".", methodName, "(", string.Join(",", array2), ")"), ex);
		}
		AndroidReflection.SetNativeExceptionOnProxy(GetRawProxy(), new Exception(string.Concat("No such proxy method: ", GetType(), ".", methodName, "(", string.Join(",", array2), ")")), methodNotFound: true);
		return null;
	}

	public virtual AndroidJavaObject Invoke(string methodName, AndroidJavaObject[] javaArgs)
	{
		object[] array = new object[javaArgs.Length];
		for (int i = 0; i < javaArgs.Length; i++)
		{
			array[i] = _AndroidJNIHelper.Unbox(javaArgs[i]);
			if (!(array[i] is AndroidJavaObject) && javaArgs[i] != null)
			{
				javaArgs[i].Dispose();
			}
		}
		return Invoke(methodName, array);
	}

	public virtual bool equals(AndroidJavaObject obj)
	{
		IntPtr obj2 = obj?.GetRawObject() ?? IntPtr.Zero;
		return AndroidJNI.IsSameObject(proxyObject, obj2);
	}

	public virtual int hashCode()
	{
		jvalue[] array = new jvalue[1];
		array[0].l = GetRawProxy();
		return AndroidJNISafe.CallStaticIntMethod(s_JavaLangSystemClass, s_HashCodeMethodID, array);
	}

	public virtual string toString()
	{
		return ToString() + " <c# proxy java object>";
	}

	internal AndroidJavaObject GetProxyObject()
	{
		return AndroidJavaObject.AndroidJavaObjectDeleteLocalRef(GetRawProxy());
	}

	internal IntPtr GetRawProxy()
	{
		IntPtr intPtr = IntPtr.Zero;
		if (proxyObject != IntPtr.Zero)
		{
			intPtr = AndroidJNI.NewLocalRef(proxyObject);
			if (intPtr == IntPtr.Zero)
			{
				AndroidJNI.DeleteWeakGlobalRef(proxyObject);
				proxyObject = IntPtr.Zero;
			}
		}
		if (intPtr == IntPtr.Zero)
		{
			intPtr = AndroidJNIHelper.CreateJavaProxy(this);
			proxyObject = AndroidJNI.NewWeakGlobalRef(intPtr);
		}
		return intPtr;
	}
}
public class AndroidJavaObject : IDisposable
{
	private static bool enableDebugPrints = false;

	internal GlobalJavaObjectRef m_jobject;

	internal GlobalJavaObjectRef m_jclass;

	public AndroidJavaObject(string className, string[] args)
		: this()
	{
		_AndroidJavaObject(className, new object[1] { args });
	}

	public AndroidJavaObject(string className, AndroidJavaObject[] args)
		: this()
	{
		_AndroidJavaObject(className, new object[1] { args });
	}

	public AndroidJavaObject(string className, AndroidJavaClass[] args)
		: this()
	{
		_AndroidJavaObject(className, new object[1] { args });
	}

	public AndroidJavaObject(string className, AndroidJavaProxy[] args)
		: this()
	{
		_AndroidJavaObject(className, new object[1] { args });
	}

	public AndroidJavaObject(string className, AndroidJavaRunnable[] args)
		: this()
	{
		_AndroidJavaObject(className, new object[1] { args });
	}

	public AndroidJavaObject(string className, params object[] args)
		: this()
	{
		_AndroidJavaObject(className, args);
	}

	internal AndroidJavaObject(IntPtr jobject)
		: this()
	{
		if (jobject == IntPtr.Zero)
		{
			throw new Exception("JNI: Init'd AndroidJavaObject with null ptr!");
		}
		IntPtr objectClass = AndroidJNISafe.GetObjectClass(jobject);
		m_jobject = new GlobalJavaObjectRef(jobject);
		m_jclass = new GlobalJavaObjectRef(objectClass);
		AndroidJNISafe.DeleteLocalRef(objectClass);
	}

	internal AndroidJavaObject()
	{
	}

	public void Dispose()
	{
		Dispose(disposing: true);
		GC.SuppressFinalize(this);
	}

	public void Call<T>(string methodName, T[] args)
	{
		_Call(methodName, args);
	}

	public void Call(string methodName, params object[] args)
	{
		_Call(methodName, args);
	}

	public void CallStatic<T>(string methodName, T[] args)
	{
		_CallStatic(methodName, args);
	}

	public void CallStatic(string methodName, params object[] args)
	{
		_CallStatic(methodName, args);
	}

	public FieldType Get<FieldType>(string fieldName)
	{
		return _Get<FieldType>(fieldName);
	}

	public void Set<FieldType>(string fieldName, FieldType val)
	{
		_Set(fieldName, val);
	}

	public FieldType GetStatic<FieldType>(string fieldName)
	{
		return _GetStatic<FieldType>(fieldName);
	}

	public void SetStatic<FieldType>(string fieldName, FieldType val)
	{
		_SetStatic(fieldName, val);
	}

	public IntPtr GetRawObject()
	{
		return _GetRawObject();
	}

	public IntPtr GetRawClass()
	{
		return _GetRawClass();
	}

	public ReturnType Call<ReturnType, T>(string methodName, T[] args)
	{
		return _Call<ReturnType>(methodName, new object[1] { args });
	}

	public ReturnType Call<ReturnType>(string methodName, params object[] args)
	{
		return _Call<ReturnType>(methodName, args);
	}

	public ReturnType CallStatic<ReturnType, T>(string methodName, T[] args)
	{
		return _CallStatic<ReturnType>(methodName, new object[1] { args });
	}

	public ReturnType CallStatic<ReturnType>(string methodName, params object[] args)
	{
		return _CallStatic<ReturnType>(methodName, args);
	}

	protected void DebugPrint(string msg)
	{
		if (enableDebugPrints)
		{
			Debug.Log((object)msg);
		}
	}

	protected void DebugPrint(string call, string methodName, string signature, object[] args)
	{
		if (enableDebugPrints)
		{
			StringBuilder stringBuilder = new StringBuilder();
			foreach (object obj in args)
			{
				stringBuilder.Append(", ");
				stringBuilder.Append((obj != null) ? obj.GetType().ToString() : "<null>");
			}
			Debug.Log((object)(call + "(\"" + methodName + "\"" + stringBuilder.ToString() + ") = " + signature));
		}
	}

	private void _AndroidJavaObject(string className, params object[] args)
	{
		DebugPrint("Creating AndroidJavaObject from " + className);
		if (args == null)
		{
			args = new object[1];
		}
		IntPtr jobject = AndroidJNISafe.FindClass(className.Replace('.', '/'));
		m_jclass = new GlobalJavaObjectRef(jobject);
		jvalue[] array = AndroidJNIHelper.CreateJNIArgArray(args);
		try
		{
			IntPtr constructorID = AndroidJNIHelper.GetConstructorID(m_jclass, args);
			IntPtr intPtr = AndroidJNISafe.NewObject(m_jclass, constructorID, array);
			m_jobject = new GlobalJavaObjectRef(intPtr);
			AndroidJNISafe.DeleteLocalRef(intPtr);
		}
		finally
		{
			AndroidJNIHelper.DeleteJNIArgArray(args, array);
		}
	}

	~AndroidJavaObject()
	{
		Dispose(disposing: true);
	}

	protected virtual void Dispose(bool disposing)
	{
		if (m_jobject != null)
		{
			m_jobject.Dispose();
			m_jobject = null;
		}
		if (m_jclass != null)
		{
			m_jclass.Dispose();
			m_jclass = null;
		}
	}

	protected void _Call(string methodName, params object[] args)
	{
		if (args == null)
		{
			args = new object[1];
		}
		IntPtr methodID = AndroidJNIHelper.GetMethodID(m_jclass, methodName, args, isStatic: false);
		jvalue[] array = AndroidJNIHelper.CreateJNIArgArray(args);
		try
		{
			AndroidJNISafe.CallVoidMethod(m_jobject, methodID, array);
		}
		finally
		{
			AndroidJNIHelper.DeleteJNIArgArray(args, array);
		}
	}

	protected ReturnType _Call<ReturnType>(string methodName, params object[] args)
	{
		if (args == null)
		{
			args = new object[1];
		}
		IntPtr methodID = AndroidJNIHelper.GetMethodID<ReturnType>(m_jclass, methodName, args, isStatic: false);
		jvalue[] array = AndroidJNIHelper.CreateJNIArgArray(args);
		try
		{
			if (AndroidReflection.IsPrimitive(typeof(ReturnType)))
			{
				if ((object)typeof(ReturnType) == typeof(int))
				{
					return (ReturnType)(object)AndroidJNISafe.CallIntMethod(m_jobject, methodID, array);
				}
				if ((object)typeof(ReturnType) == typeof(bool))
				{
					return (ReturnType)(object)AndroidJNISafe.CallBooleanMethod(m_jobject, methodID, array);
				}
				if ((object)typeof(ReturnType) == typeof(byte))
				{
					Debug.LogWarning((object)"Return type <Byte> for Java method call is obsolete, use return type <SByte> instead");
					return (ReturnType)(object)(byte)AndroidJNISafe.CallSByteMethod(m_jobject, methodID, array);
				}
				if ((object)typeof(ReturnType) == typeof(sbyte))
				{
					return (ReturnType)(object)AndroidJNISafe.CallSByteMethod(m_jobject, methodID, array);
				}
				if ((object)typeof(ReturnType) == typeof(short))
				{
					return (ReturnType)(object)AndroidJNISafe.CallShortMethod(m_jobject, methodID, array);
				}
				if ((object)typeof(ReturnType) == typeof(long))
				{
					return (ReturnType)(object)AndroidJNISafe.CallLongMethod(m_jobject, methodID, array);
				}
				if ((object)typeof(ReturnType) == typeof(float))
				{
					return (ReturnType)(object)AndroidJNISafe.CallFloatMethod(m_jobject, methodID, array);
				}
				if ((object)typeof(ReturnType) == typeof(double))
				{
					return (ReturnType)(object)AndroidJNISafe.CallDoubleMethod(m_jobject, methodID, array);
				}
				if ((object)typeof(ReturnType) == typeof(char))
				{
					return (ReturnType)(object)AndroidJNISafe.CallCharMethod(m_jobject, methodID, array);
				}
				return default(ReturnType);
			}
			if ((object)typeof(ReturnType) == typeof(string))
			{
				return (ReturnType)(object)AndroidJNISafe.CallStringMethod(m_jobject, methodID, array);
			}
			if ((object)typeof(ReturnType) == typeof(AndroidJavaClass))
			{
				IntPtr intPtr = AndroidJNISafe.CallObjectMethod(m_jobject, methodID, array);
				return (!(intPtr == IntPtr.Zero)) ? ((ReturnType)(object)AndroidJavaClassDeleteLocalRef(intPtr)) : default(ReturnType);
			}
			if ((object)typeof(ReturnType) == typeof(AndroidJavaObject))
			{
				IntPtr intPtr2 = AndroidJNISafe.CallObjectMethod(m_jobject, methodID, array);
				return (!(intPtr2 == IntPtr.Zero)) ? ((ReturnType)(object)AndroidJavaObjectDeleteLocalRef(intPtr2)) : default(ReturnType);
			}
			if (AndroidReflection.IsAssignableFrom(typeof(Array), typeof(ReturnType)))
			{
				IntPtr intPtr3 = AndroidJNISafe.CallObjectMethod(m_jobject, methodID, array);
				return (!(intPtr3 == IntPtr.Zero)) ? ((ReturnType)(object)AndroidJNIHelper.ConvertFromJNIArray<ReturnType>(intPtr3)) : default(ReturnType);
			}
			throw new Exception(string.Concat("JNI: Unknown return type '", typeof(ReturnType), "'"));
		}
		finally
		{
			AndroidJNIHelper.DeleteJNIArgArray(args, array);
		}
	}

	protected FieldType _Get<FieldType>(string fieldName)
	{
		IntPtr fieldID = AndroidJNIHelper.GetFieldID<FieldType>(m_jclass, fieldName, isStatic: false);
		if (AndroidReflection.IsPrimitive(typeof(FieldType)))
		{
			if ((object)typeof(FieldType) == typeof(int))
			{
				return (FieldType)(object)AndroidJNISafe.GetIntField(m_jobject, fieldID);
			}
			if ((object)typeof(FieldType) == typeof(bool))
			{
				return (FieldType)(object)AndroidJNISafe.GetBooleanField(m_jobject, fieldID);
			}
			if ((object)typeof(FieldType) == typeof(byte))
			{
				Debug.LogWarning((object)"Field type <Byte> for Java get field call is obsolete, use field type <SByte> instead");
				return (FieldType)(object)(byte)AndroidJNISafe.GetSByteField(m_jobject, fieldID);
			}
			if ((object)typeof(FieldType) == typeof(sbyte))
			{
				return (FieldType)(object)AndroidJNISafe.GetSByteField(m_jobject, fieldID);
			}
			if ((object)typeof(FieldType) == typeof(short))
			{
				return (FieldType)(object)AndroidJNISafe.GetShortField(m_jobject, fieldID);
			}
			if ((object)typeof(FieldType) == typeof(long))
			{
				return (FieldType)(object)AndroidJNISafe.GetLongField(m_jobject, fieldID);
			}
			if ((object)typeof(FieldType) == typeof(float))
			{
				return (FieldType)(object)AndroidJNISafe.GetFloatField(m_jobject, fieldID);
			}
			if ((object)typeof(FieldType) == typeof(double))
			{
				return (FieldType)(object)AndroidJNISafe.GetDoubleField(m_jobject, fieldID);
			}
			if ((object)typeof(FieldType) == typeof(char))
			{
				return (FieldType)(object)AndroidJNISafe.GetCharField(m_jobject, fieldID);
			}
			return default(FieldType);
		}
		if ((object)typeof(FieldType) == typeof(string))
		{
			return (FieldType)(object)AndroidJNISafe.GetStringField(m_jobject, fieldID);
		}
		if ((object)typeof(FieldType) == typeof(AndroidJavaClass))
		{
			IntPtr objectField = AndroidJNISafe.GetObjectField(m_jobject, fieldID);
			return (!(objectField == IntPtr.Zero)) ? ((FieldType)(object)AndroidJavaClassDeleteLocalRef(objectField)) : default(FieldType);
		}
		if ((object)typeof(FieldType) == typeof(AndroidJavaObject))
		{
			IntPtr objectField2 = AndroidJNISafe.GetObjectField(m_jobject, fieldID);
			return (!(objectField2 == IntPtr.Zero)) ? ((FieldType)(object)AndroidJavaObjectDeleteLocalRef(objectField2)) : default(FieldType);
		}
		if (AndroidReflection.IsAssignableFrom(typeof(Array), typeof(FieldType)))
		{
			IntPtr objectField3 = AndroidJNISafe.GetObjectField(m_jobject, fieldID);
			return (!(objectField3 == IntPtr.Zero)) ? ((FieldType)(object)AndroidJNIHelper.ConvertFromJNIArray<FieldType>(objectField3)) : default(FieldType);
		}
		throw new Exception(string.Concat("JNI: Unknown field type '", typeof(FieldType), "'"));
	}

	protected void _Set<FieldType>(string fieldName, FieldType val)
	{
		IntPtr fieldID = AndroidJNIHelper.GetFieldID<FieldType>(m_jclass, fieldName, isStatic: false);
		if (AndroidReflection.IsPrimitive(typeof(FieldType)))
		{
			if ((object)typeof(FieldType) == typeof(int))
			{
				AndroidJNISafe.SetIntField(m_jobject, fieldID, (int)(object)val);
			}
			else if ((object)typeof(FieldType) == typeof(bool))
			{
				AndroidJNISafe.SetBooleanField(m_jobject, fieldID, (bool)(object)val);
			}
			else if ((object)typeof(FieldType) == typeof(byte))
			{
				Debug.LogWarning((object)"Field type <Byte> for Java set field call is obsolete, use field type <SByte> instead");
				AndroidJNISafe.SetSByteField(m_jobject, fieldID, (sbyte)(byte)(object)val);
			}
			else if ((object)typeof(FieldType) == typeof(sbyte))
			{
				AndroidJNISafe.SetSByteField(m_jobject, fieldID, (sbyte)(object)val);
			}
			else if ((object)typeof(FieldType) == typeof(short))
			{
				AndroidJNISafe.SetShortField(m_jobject, fieldID, (short)(object)val);
			}
			else if ((object)typeof(FieldType) == typeof(long))
			{
				AndroidJNISafe.SetLongField(m_jobject, fieldID, (long)(object)val);
			}
			else if ((object)typeof(FieldType) == typeof(float))
			{
				AndroidJNISafe.SetFloatField(m_jobject, fieldID, (float)(object)val);
			}
			else if ((object)typeof(FieldType) == typeof(double))
			{
				AndroidJNISafe.SetDoubleField(m_jobject, fieldID, (double)(object)val);
			}
			else if ((object)typeof(FieldType) == typeof(char))
			{
				AndroidJNISafe.SetCharField(m_jobject, fieldID, (char)(object)val);
			}
		}
		else if ((object)typeof(FieldType) == typeof(string))
		{
			AndroidJNISafe.SetStringField(m_jobject, fieldID, (string)(object)val);
		}
		else if ((object)typeof(FieldType) == typeof(AndroidJavaClass))
		{
			AndroidJNISafe.SetObjectField(m_jobject, fieldID, (val != null) ? ((IntPtr)((AndroidJavaClass)(object)val).m_jclass) : IntPtr.Zero);
		}
		else if ((object)typeof(FieldType) == typeof(AndroidJavaObject))
		{
			AndroidJNISafe.SetObjectField(m_jobject, fieldID, (val != null) ? ((IntPtr)((AndroidJavaObject)(object)val).m_jobject) : IntPtr.Zero);
		}
		else
		{
			if (!AndroidReflection.IsAssignableFrom(typeof(Array), typeof(FieldType)))
			{
				throw new Exception(string.Concat("JNI: Unknown field type '", typeof(FieldType), "'"));
			}
			IntPtr val2 = AndroidJNIHelper.ConvertToJNIArray((Array)(object)val);
			AndroidJNISafe.SetObjectField(m_jclass, fieldID, val2);
		}
	}

	protected void _CallStatic(string methodName, params object[] args)
	{
		if (args == null)
		{
			args = new object[1];
		}
		IntPtr methodID = AndroidJNIHelper.GetMethodID(m_jclass, methodName, args, isStatic: true);
		jvalue[] array = AndroidJNIHelper.CreateJNIArgArray(args);
		try
		{
			AndroidJNISafe.CallStaticVoidMethod(m_jclass, methodID, array);
		}
		finally
		{
			AndroidJNIHelper.DeleteJNIArgArray(args, array);
		}
	}

	protected ReturnType _CallStatic<ReturnType>(string methodName, params object[] args)
	{
		if (args == null)
		{
			args = new object[1];
		}
		IntPtr methodID = AndroidJNIHelper.GetMethodID<ReturnType>(m_jclass, methodName, args, isStatic: true);
		jvalue[] array = AndroidJNIHelper.CreateJNIArgArray(args);
		try
		{
			if (AndroidReflection.IsPrimitive(typeof(ReturnType)))
			{
				if ((object)typeof(ReturnType) == typeof(int))
				{
					return (ReturnType)(object)AndroidJNISafe.CallStaticIntMethod(m_jclass, methodID, array);
				}
				if ((object)typeof(ReturnType) == typeof(bool))
				{
					return (ReturnType)(object)AndroidJNISafe.CallStaticBooleanMethod(m_jclass, methodID, array);
				}
				if ((object)typeof(ReturnType) == typeof(byte))
				{
					Debug.LogWarning((object)"Return type <Byte> for Java method call is obsolete, use return type <SByte> instead");
					return (ReturnType)(object)(byte)AndroidJNISafe.CallStaticSByteMethod(m_jclass, methodID, array);
				}
				if ((object)typeof(ReturnType) == typeof(sbyte))
				{
					return (ReturnType)(object)AndroidJNISafe.CallStaticSByteMethod(m_jclass, methodID, array);
				}
				if ((object)typeof(ReturnType) == typeof(short))
				{
					return (ReturnType)(object)AndroidJNISafe.CallStaticShortMethod(m_jclass, methodID, array);
				}
				if ((object)typeof(ReturnType) == typeof(long))
				{
					return (ReturnType)(object)AndroidJNISafe.CallStaticLongMethod(m_jclass, methodID, array);
				}
				if ((object)typeof(ReturnType) == typeof(float))
				{
					return (ReturnType)(object)AndroidJNISafe.CallStaticFloatMethod(m_jclass, methodID, array);
				}
				if ((object)typeof(ReturnType) == typeof(double))
				{
					return (ReturnType)(object)AndroidJNISafe.CallStaticDoubleMethod(m_jclass, methodID, array);
				}
				if ((object)typeof(ReturnType) == typeof(char))
				{
					return (ReturnType)(object)AndroidJNISafe.CallStaticCharMethod(m_jclass, methodID, array);
				}
				return default(ReturnType);
			}
			if ((object)typeof(ReturnType) == typeof(string))
			{
				return (ReturnType)(object)AndroidJNISafe.CallStaticStringMethod(m_jclass, methodID, array);
			}
			if ((object)typeof(ReturnType) == typeof(AndroidJavaClass))
			{
				IntPtr intPtr = AndroidJNISafe.CallStaticObjectMethod(m_jclass, methodID, array);
				return (!(intPtr == IntPtr.Zero)) ? ((ReturnType)(object)AndroidJavaClassDeleteLocalRef(intPtr)) : default(ReturnType);
			}
			if ((object)typeof(ReturnType) == typeof(AndroidJavaObject))
			{
				IntPtr intPtr2 = AndroidJNISafe.CallStaticObjectMethod(m_jclass, methodID, array);
				return (!(intPtr2 == IntPtr.Zero)) ? ((ReturnType)(object)AndroidJavaObjectDeleteLocalRef(intPtr2)) : default(ReturnType);
			}
			if (AndroidReflection.IsAssignableFrom(typeof(Array), typeof(ReturnType)))
			{
				IntPtr intPtr3 = AndroidJNISafe.CallStaticObjectMethod(m_jclass, methodID, array);
				return (!(intPtr3 == IntPtr.Zero)) ? ((ReturnType)(object)AndroidJNIHelper.ConvertFromJNIArray<ReturnType>(intPtr3)) : default(ReturnType);
			}
			throw new Exception(string.Concat("JNI: Unknown return type '", typeof(ReturnType), "'"));
		}
		finally
		{
			AndroidJNIHelper.DeleteJNIArgArray(args, array);
		}
	}

	protected FieldType _GetStatic<FieldType>(string fieldName)
	{
		IntPtr fieldID = AndroidJNIHelper.GetFieldID<FieldType>(m_jclass, fieldName, isStatic: true);
		if (AndroidReflection.IsPrimitive(typeof(FieldType)))
		{
			if ((object)typeof(FieldType) == typeof(int))
			{
				return (FieldType)(object)AndroidJNISafe.GetStaticIntField(m_jclass, fieldID);
			}
			if ((object)typeof(FieldType) == typeof(bool))
			{
				return (FieldType)(object)AndroidJNISafe.GetStaticBooleanField(m_jclass, fieldID);
			}
			if ((object)typeof(FieldType) == typeof(byte))
			{
				Debug.LogWarning((object)"Field type <Byte> for Java get field call is obsolete, use field type <SByte> instead");
				return (FieldType)(object)(byte)AndroidJNISafe.GetStaticSByteField(m_jclass, fieldID);
			}
			if ((object)typeof(FieldType) == typeof(sbyte))
			{
				return (FieldType)(object)AndroidJNISafe.GetStaticSByteField(m_jclass, fieldID);
			}
			if ((object)typeof(FieldType) == typeof(short))
			{
				return (FieldType)(object)AndroidJNISafe.GetStaticShortField(m_jclass, fieldID);
			}
			if ((object)typeof(FieldType) == typeof(long))
			{
				return (FieldType)(object)AndroidJNISafe.GetStaticLongField(m_jclass, fieldID);
			}
			if ((object)typeof(FieldType) == typeof(float))
			{
				return (FieldType)(object)AndroidJNISafe.GetStaticFloatField(m_jclass, fieldID);
			}
			if ((object)typeof(FieldType) == typeof(double))
			{
				return (FieldType)(object)AndroidJNISafe.GetStaticDoubleField(m_jclass, fieldID);
			}
			if ((object)typeof(FieldType) == typeof(char))
			{
				return (FieldType)(object)AndroidJNISafe.GetStaticCharField(m_jclass, fieldID);
			}
			return default(FieldType);
		}
		if ((object)typeof(FieldType) == typeof(string))
		{
			return (FieldType)(object)AndroidJNISafe.GetStaticStringField(m_jclass, fieldID);
		}
		if ((object)typeof(FieldType) == typeof(AndroidJavaClass))
		{
			IntPtr staticObjectField = AndroidJNISafe.GetStaticObjectField(m_jclass, fieldID);
			return (!(staticObjectField == IntPtr.Zero)) ? ((FieldType)(object)AndroidJavaClassDeleteLocalRef(staticObjectField)) : default(FieldType);
		}
		if ((object)typeof(FieldType) == typeof(AndroidJavaObject))
		{
			IntPtr staticObjectField2 = AndroidJNISafe.GetStaticObjectField(m_jclass, fieldID);
			return (!(staticObjectField2 == IntPtr.Zero)) ? ((FieldType)(object)AndroidJavaObjectDeleteLocalRef(staticObjectField2)) : default(FieldType);
		}
		if (AndroidReflection.IsAssignableFrom(typeof(Array), typeof(FieldType)))
		{
			IntPtr staticObjectField3 = AndroidJNISafe.GetStaticObjectField(m_jclass, fieldID);
			return (!(staticObjectField3 == IntPtr.Zero)) ? ((FieldType)(object)AndroidJNIHelper.ConvertFromJNIArray<FieldType>(staticObjectField3)) : default(FieldType);
		}
		throw new Exception(string.Concat("JNI: Unknown field type '", typeof(FieldType), "'"));
	}

	protected void _SetStatic<FieldType>(string fieldName, FieldType val)
	{
		IntPtr fieldID = AndroidJNIHelper.GetFieldID<FieldType>(m_jclass, fieldName, isStatic: true);
		if (AndroidReflection.IsPrimitive(typeof(FieldType)))
		{
			if ((object)typeof(FieldType) == typeof(int))
			{
				AndroidJNISafe.SetStaticIntField(m_jclass, fieldID, (int)(object)val);
			}
			else if ((object)typeof(FieldType) == typeof(bool))
			{
				AndroidJNISafe.SetStaticBooleanField(m_jclass, fieldID, (bool)(object)val);
			}
			else if ((object)typeof(FieldType) == typeof(byte))
			{
				Debug.LogWarning((object)"Field type <Byte> for Java set field call is obsolete, use field type <SByte> instead");
				AndroidJNISafe.SetStaticSByteField(m_jclass, fieldID, (sbyte)(byte)(object)val);
			}
			else if ((object)typeof(FieldType) == typeof(sbyte))
			{
				AndroidJNISafe.SetStaticSByteField(m_jclass, fieldID, (sbyte)(object)val);
			}
			else if ((object)typeof(FieldType) == typeof(short))
			{
				AndroidJNISafe.SetStaticShortField(m_jclass, fieldID, (short)(object)val);
			}
			else if ((object)typeof(FieldType) == typeof(long))
			{
				AndroidJNISafe.SetStaticLongField(m_jclass, fieldID, (long)(object)val);
			}
			else if ((object)typeof(FieldType) == typeof(float))
			{
				AndroidJNISafe.SetStaticFloatField(m_jclass, fieldID, (float)(object)val);
			}
			else if ((object)typeof(FieldType) == typeof(double))
			{
				AndroidJNISafe.SetStaticDoubleField(m_jclass, fieldID, (double)(object)val);
			}
			else if ((object)typeof(FieldType) == typeof(char))
			{
				AndroidJNISafe.SetStaticCharField(m_jclass, fieldID, (char)(object)val);
			}
		}
		else if ((object)typeof(FieldType) == typeof(string))
		{
			AndroidJNISafe.SetStaticStringField(m_jclass, fieldID, (string)(object)val);
		}
		else if ((object)typeof(FieldType) == typeof(AndroidJavaClass))
		{
			AndroidJNISafe.SetStaticObjectField(m_jclass, fieldID, (val != null) ? ((IntPtr)((AndroidJavaClass)(object)val).m_jclass) : IntPtr.Zero);
		}
		else if ((object)typeof(FieldType) == typeof(AndroidJavaObject))
		{
			AndroidJNISafe.SetStaticObjectField(m_jclass, fieldID, (val != null) ? ((IntPtr)((AndroidJavaObject)(object)val).m_jobject) : IntPtr.Zero);
		}
		else
		{
			if (!AndroidReflection.IsAssignableFrom(typeof(Array), typeof(FieldType)))
			{
				throw new Exception(string.Concat("JNI: Unknown field type '", typeof(FieldType), "'"));
			}
			IntPtr val2 = AndroidJNIHelper.ConvertToJNIArray((Array)(object)val);
			AndroidJNISafe.SetStaticObjectField(m_jclass, fieldID, val2);
		}
	}

	internal static AndroidJavaObject AndroidJavaObjectDeleteLocalRef(IntPtr jobject)
	{
		try
		{
			return new AndroidJavaObject(jobject);
		}
		finally
		{
			AndroidJNISafe.DeleteLocalRef(jobject);
		}
	}

	internal static AndroidJavaClass AndroidJavaClassDeleteLocalRef(IntPtr jclass)
	{
		try
		{
			return new AndroidJavaClass(jclass);
		}
		finally
		{
			AndroidJNISafe.DeleteLocalRef(jclass);
		}
	}

	protected IntPtr _GetRawObject()
	{
		return m_jobject;
	}

	protected IntPtr _GetRawClass()
	{
		return m_jclass;
	}
}
public class AndroidJavaClass : AndroidJavaObject
{
	public AndroidJavaClass(string className)
	{
		_AndroidJavaClass(className);
	}

	internal AndroidJavaClass(IntPtr jclass)
	{
		if (jclass == IntPtr.Zero)
		{
			throw new Exception("JNI: Init'd AndroidJavaClass with null ptr!");
		}
		m_jclass = new GlobalJavaObjectRef(jclass);
		m_jobject = new GlobalJavaObjectRef(IntPtr.Zero);
	}

	private void _AndroidJavaClass(string className)
	{
		DebugPrint("Creating AndroidJavaClass from " + className);
		IntPtr jobject = AndroidJNISafe.FindClass(className.Replace('.', '/'));
		m_jclass = new GlobalJavaObjectRef(jobject);
		m_jobject = new GlobalJavaObjectRef(IntPtr.Zero);
	}
}
internal class AndroidReflection
{
	private const string RELECTION_HELPER_CLASS_NAME = "com/unity3d/player/ReflectionHelper";

	private static readonly GlobalJavaObjectRef s_ReflectionHelperClass = new GlobalJavaObjectRef(AndroidJNISafe.FindClass("com/unity3d/player/ReflectionHelper"));

	private static readonly IntPtr s_ReflectionHelperGetConstructorID = GetStaticMethodID("com/unity3d/player/ReflectionHelper", "getConstructorID", "(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/reflect/Constructor;");

	private static readonly IntPtr s_ReflectionHelperGetMethodID = GetStaticMethodID("com/unity3d/player/ReflectionHelper", "getMethodID", "(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Z)Ljava/lang/reflect/Method;");

	private static readonly IntPtr s_ReflectionHelperGetFieldID = GetStaticMethodID("com/unity3d/player/ReflectionHelper", "getFieldID", "(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Z)Ljava/lang/reflect/Field;");

	private static readonly IntPtr s_ReflectionHelperNewProxyInstance = GetStaticMethodID("com/unity3d/player/ReflectionHelper", "newProxyInstance", "(JLjava/lang/Class;)Ljava/lang/Object;");

	private static readonly IntPtr s_ReflectionHelperSetNativeExceptionOnProxy = GetStaticMethodID("com/unity3d/player/ReflectionHelper", "setNativeExceptionOnProxy", "(Ljava/lang/Object;JZ)V");

	public static bool IsPrimitive(Type t)
	{
		return t.IsPrimitive;
	}

	public static bool IsAssignableFrom(Type t, Type from)
	{
		return t.IsAssignableFrom(from);
	}

	private static IntPtr GetStaticMethodID(string clazz, string methodName, string signature)
	{
		IntPtr intPtr = AndroidJNISafe.FindClass(clazz);
		try
		{
			return AndroidJNISafe.GetStaticMethodID(intPtr, methodName, signature);
		}
		finally
		{
			AndroidJNISafe.DeleteLocalRef(intPtr);
		}
	}

	public static IntPtr GetConstructorMember(IntPtr jclass, string signature)
	{
		jvalue[] array = new jvalue[2];
		try
		{
			array[0].l = jclass;
			array[1].l = AndroidJNISafe.NewString(signature);
			return AndroidJNISafe.CallStaticObjectMethod(s_ReflectionHelperClass, s_ReflectionHelperGetConstructorID, array);
		}
		finally
		{
			AndroidJNISafe.DeleteLocalRef(array[1].l);
		}
	}

	public static IntPtr GetMethodMember(IntPtr jclass, string methodName, string signature, bool isStatic)
	{
		jvalue[] array = new jvalue[4];
		try
		{
			array[0].l = jclass;
			array[1].l = AndroidJNISafe.NewString(methodName);
			array[2].l = AndroidJNISafe.NewString(signature);
			array[3].z = isStatic;
			return AndroidJNISafe.CallStaticObjectMethod(s_ReflectionHelperClass, s_ReflectionHelperGetMethodID, array);
		}
		finally
		{
			AndroidJNISafe.DeleteLocalRef(array[1].l);
			AndroidJNISafe.DeleteLocalRef(array[2].l);
		}
	}

	public static IntPtr GetFieldMember(IntPtr jclass, string fieldName, string signature, bool isStatic)
	{
		jvalue[] array = new jvalue[4];
		try
		{
			array[0].l = jclass;
			array[1].l = AndroidJNISafe.NewString(fieldName);
			array[2].l = AndroidJNISafe.NewString(signature);
			array[3].z = isStatic;
			return AndroidJNISafe.CallStaticObjectMethod(s_ReflectionHelperClass, s_ReflectionHelperGetFieldID, array);
		}
		finally
		{
			AndroidJNISafe.DeleteLocalRef(array[1].l);
			AndroidJNISafe.DeleteLocalRef(array[2].l);
		}
	}

	public static IntPtr NewProxyInstance(IntPtr delegateHandle, IntPtr interfaze)
	{
		jvalue[] array = new jvalue[2];
		array[0].j = delegateHandle.ToInt64();
		array[1].l = interfaze;
		return AndroidJNISafe.CallStaticObjectMethod(s_ReflectionHelperClass, s_ReflectionHelperNewProxyInstance, array);
	}

	public static void SetNativeExceptionOnProxy(IntPtr proxy, Exception e, bool methodNotFound)
	{
		jvalue[] array = new jvalue[3];
		array[0].l = proxy;
		array[1].j = GCHandle.ToIntPtr(GCHandle.Alloc(e)).ToInt64();
		array[2].z = methodNotFound;
		AndroidJNISafe.CallStaticVoidMethod(s_ReflectionHelperClass, s_ReflectionHelperSetNativeExceptionOnProxy, array);
	}
}
[UsedByNativeCode]
internal sealed class _AndroidJNIHelper
{
	public static IntPtr CreateJavaProxy(IntPtr delegateHandle, AndroidJavaProxy proxy)
	{
		return AndroidReflection.NewProxyInstance(delegateHandle, proxy.javaInterface.GetRawClass());
	}

	public static IntPtr CreateJavaRunnable(AndroidJavaRunnable jrunnable)
	{
		return AndroidJNIHelper.CreateJavaProxy(new AndroidJavaRunnableProxy(jrunnable));
	}

	[RequiredByNativeCode]
	public static IntPtr InvokeJavaProxyMethod(AndroidJavaProxy proxy, IntPtr jmethodName, IntPtr jargs)
	{
		try
		{
			int num = 0;
			if (jargs != IntPtr.Zero)
			{
				num = AndroidJNISafe.GetArrayLength(jargs);
			}
			AndroidJavaObject[] array = new AndroidJavaObject[num];
			for (int i = 0; i < num; i++)
			{
				IntPtr objectArrayElement = AndroidJNISafe.GetObjectArrayElement(jargs, i);
				array[i] = ((!(objectArrayElement != IntPtr.Zero)) ? null : new AndroidJavaObject(objectArrayElement));
			}
			using AndroidJavaObject androidJavaObject = proxy.Invoke(AndroidJNI.GetStringChars(jmethodName), array);
			if (androidJavaObject == null)
			{
				return IntPtr.Zero;
			}
			return AndroidJNI.NewLocalRef(androidJavaObject.GetRawObject());
		}
		catch (Exception e)
		{
			AndroidReflection.SetNativeExceptionOnProxy(proxy.GetRawProxy(), e, methodNotFound: false);
			return IntPtr.Zero;
		}
	}

	public static jvalue[] CreateJNIArgArray(object[] args)
	{
		jvalue[] array = new jvalue[args.GetLength(0)];
		int num = 0;
		foreach (object obj in args)
		{
			if (obj == null)
			{
				array[num].l = IntPtr.Zero;
			}
			else if (AndroidReflection.IsPrimitive(obj.GetType()))
			{
				if (obj is int)
				{
					array[num].i = (int)obj;
				}
				else if (obj is bool)
				{
					array[num].z = (bool)obj;
				}
				else if (obj is byte)
				{
					Debug.LogWarning((object)"Passing Byte arguments to Java methods is obsolete, pass SByte parameters instead");
					array[num].b = (sbyte)(byte)obj;
				}
				else if (obj is sbyte)
				{
					array[num].b = (sbyte)obj;
				}
				else if (obj is short)
				{
					array[num].s = (short)obj;
				}
				else if (obj is long)
				{
					array[num].j = (long)obj;
				}
				else if (obj is float)
				{
					array[num].f = (float)obj;
				}
				else if (obj is double)
				{
					array[num].d = (double)obj;
				}
				else if (obj is char)
				{
					array[num].c = (char)obj;
				}
			}
			else if (obj is string)
			{
				array[num].l = AndroidJNISafe.NewString((string)obj);
			}
			else if (obj is AndroidJavaClass)
			{
				array[num].l = ((AndroidJavaClass)obj).GetRawClass();
			}
			else if (obj is AndroidJavaObject)
			{
				array[num].l = ((AndroidJavaObject)obj).GetRawObject();
			}
			else if (obj is Array)
			{
				array[num].l = ConvertToJNIArray((Array)obj);
			}
			else if (obj is AndroidJavaProxy)
			{
				array[num].l = ((AndroidJavaProxy)obj).GetRawProxy();
			}
			else
			{
				if (!(obj is AndroidJavaRunnable))
				{
					throw new Exception(string.Concat("JNI; Unknown argument type '", obj.GetType(), "'"));
				}
				array[num].l = AndroidJNIHelper.CreateJavaRunnable((AndroidJavaRunnable)obj);
			}
			num++;
		}
		return array;
	}

	public static object UnboxArray(AndroidJavaObject obj)
	{
		if (obj == null)
		{
			return null;
		}
		AndroidJavaClass androidJavaClass = new AndroidJavaClass("java/lang/reflect/Array");
		AndroidJavaObject androidJavaObject = obj.Call<AndroidJavaObject>("getClass", new object[0]);
		AndroidJavaObject androidJavaObject2 = androidJavaObject.Call<AndroidJavaObject>("getComponentType", new object[0]);
		string text = androidJavaObject2.Call<string>("getName", new object[0]);
		int num = androidJavaClass.CallStatic<int>("getLength", new object[1] { obj });
		Array array;
		if (!androidJavaObject2.Call<bool>("isPrimitive", new object[0]))
		{
			array = (("java.lang.String" == text) ? ((Array)new string[num]) : ((Array)((!("java.lang.Class" == text)) ? new AndroidJavaObject[num] : new AndroidJavaClass[num])));
		}
		else if ("int" == text)
		{
			array = new int[num];
		}
		else if ("boolean" == text)
		{
			array = new bool[num];
		}
		else if ("byte" == text)
		{
			array = new sbyte[num];
		}
		else if ("short" == text)
		{
			array = new short[num];
		}
		else if ("long" == text)
		{
			array = new long[num];
		}
		else if ("float" == text)
		{
			array = new float[num];
		}
		else if ("double" == text)
		{
			array = new double[num];
		}
		else
		{
			if (!("char" == text))
			{
				throw new Exception("JNI; Unknown argument type '" + text + "'");
			}
			array = new char[num];
		}
		for (int i = 0; i < num; i++)
		{
			array.SetValue(Unbox(androidJavaClass.CallStatic<AndroidJavaObject>("get", new object[2] { obj, i })), i);
		}
		return array;
	}

	public static object Unbox(AndroidJavaObject obj)
	{
		if (obj == null)
		{
			return null;
		}
		using AndroidJavaObject androidJavaObject = obj.Call<AndroidJavaObject>("getClass", new object[0]);
		string text = androidJavaObject.Call<string>("getName", new object[0]);
		if ("java.lang.Integer" == text)
		{
			return obj.Call<int>("intValue", new object[0]);
		}
		if ("java.lang.Boolean" == text)
		{
			return obj.Call<bool>("booleanValue", new object[0]);
		}
		if ("java.lang.Byte" == text)
		{
			return obj.Call<sbyte>("byteValue", new object[0]);
		}
		if ("java.lang.Short" == text)
		{
			return obj.Call<short>("shortValue", new object[0]);
		}
		if ("java.lang.Long" == text)
		{
			return obj.Call<long>("longValue", new object[0]);
		}
		if ("java.lang.Float" == text)
		{
			return obj.Call<float>("floatValue", new object[0]);
		}
		if ("java.lang.Double" == text)
		{
			return obj.Call<double>("doubleValue", new object[0]);
		}
		if ("java.lang.Character" == text)
		{
			return obj.Call<char>("charValue", new object[0]);
		}
		if ("java.lang.String" == text)
		{
			return obj.Call<string>("toString", new object[0]);
		}
		if ("java.lang.Class" == text)
		{
			return new AndroidJavaClass(obj.GetRawObject());
		}
		if (androidJavaObject.Call<bool>("isArray", new object[0]))
		{
			return UnboxArray(obj);
		}
		return obj;
	}

	public static AndroidJavaObject Box(object obj)
	{
		if (obj == null)
		{
			return null;
		}
		if (AndroidReflection.IsPrimitive(obj.GetType()))
		{
			if (obj is int)
			{
				return new AndroidJavaObject("java.lang.Integer", (int)obj);
			}
			if (obj is bool)
			{
				return new AndroidJavaObject("java.lang.Boolean", (bool)obj);
			}
			if (obj is byte)
			{
				return new AndroidJavaObject("java.lang.Byte", (sbyte)obj);
			}
			if (obj is sbyte)
			{
				return new AndroidJavaObject("java.lang.Byte", (sbyte)obj);
			}
			if (obj is short)
			{
				return new AndroidJavaObject("java.lang.Short", (short)obj);
			}
			if (obj is long)
			{
				return new AndroidJavaObject("java.lang.Long", (long)obj);
			}
			if (obj is float)
			{
				return new AndroidJavaObject("java.lang.Float", (float)obj);
			}
			if (obj is double)
			{
				return new AndroidJavaObject("java.lang.Double", (double)obj);
			}
			if (obj is char)
			{
				return new AndroidJavaObject("java.lang.Character", (char)obj);
			}
			throw new Exception(string.Concat("JNI; Unknown argument type '", obj.GetType(), "'"));
		}
		if (obj is string)
		{
			return new AndroidJavaObject("java.lang.String", (string)obj);
		}
		if (obj is AndroidJavaClass)
		{
			return new AndroidJavaObject(((AndroidJavaClass)obj).GetRawClass());
		}
		if (obj is AndroidJavaObject)
		{
			return (AndroidJavaObject)obj;
		}
		if (obj is Array)
		{
			return AndroidJavaObject.AndroidJavaObjectDeleteLocalRef(ConvertToJNIArray((Array)obj));
		}
		if (obj is AndroidJavaProxy)
		{
			return ((AndroidJavaProxy)obj).GetProxyObject();
		}
		if (obj is AndroidJavaRunnable)
		{
			return AndroidJavaObject.AndroidJavaObjectDeleteLocalRef(AndroidJNIHelper.CreateJavaRunnable((AndroidJavaRunnable)obj));
		}
		throw new Exception(string.Concat("JNI; Unknown argument type '", obj.GetType(), "'"));
	}

	public static void DeleteJNIArgArray(object[] args, jvalue[] jniArgs)
	{
		int num = 0;
		foreach (object obj in args)
		{
			if (obj is string || obj is AndroidJavaRunnable || obj is Array)
			{
				AndroidJNISafe.DeleteLocalRef(jniArgs[num].l);
			}
			num++;
		}
	}

	public static IntPtr ConvertToJNIArray(Array array)
	{
		Type elementType = array.GetType().GetElementType();
		if (AndroidReflection.IsPrimitive(elementType))
		{
			if ((object)elementType == typeof(int))
			{
				return AndroidJNISafe.ToIntArray((int[])array);
			}
			if ((object)elementType == typeof(bool))
			{
				return AndroidJNISafe.ToBooleanArray((bool[])array);
			}
			if ((object)elementType == typeof(byte))
			{
				Debug.LogWarning((object)"AndroidJNIHelper: converting Byte array is obsolete, use SByte array instead");
				return AndroidJNISafe.ToByteArray((byte[])array);
			}
			if ((object)elementType == typeof(sbyte))
			{
				return AndroidJNISafe.ToSByteArray((sbyte[])array);
			}
			if ((object)elementType == typeof(short))
			{
				return AndroidJNISafe.ToShortArray((short[])array);
			}
			if ((object)elementType == typeof(long))
			{
				return AndroidJNISafe.ToLongArray((long[])array);
			}
			if ((object)elementType == typeof(float))
			{
				return AndroidJNISafe.ToFloatArray((float[])array);
			}
			if ((object)elementType == typeof(double))
			{
				return AndroidJNISafe.ToDoubleArray((double[])array);
			}
			if ((object)elementType == typeof(char))
			{
				return AndroidJNISafe.ToCharArray((char[])array);
			}
			return IntPtr.Zero;
		}
		if ((object)elementType == typeof(string))
		{
			string[] array2 = (string[])array;
			int length = array.GetLength(0);
			IntPtr intPtr = AndroidJNISafe.FindClass("java/lang/String");
			IntPtr intPtr2 = AndroidJNI.NewObjectArray(length, intPtr, IntPtr.Zero);
			for (int i = 0; i < length; i++)
			{
				IntPtr intPtr3 = AndroidJNISafe.NewString(array2[i]);
				AndroidJNI.SetObjectArrayElement(intPtr2, i, intPtr3);
				AndroidJNISafe.DeleteLocalRef(intPtr3);
			}
			AndroidJNISafe.DeleteLocalRef(intPtr);
			return intPtr2;
		}
		if ((object)elementType == typeof(AndroidJavaObject))
		{
			AndroidJavaObject[] array3 = (AndroidJavaObject[])array;
			int length2 = array.GetLength(0);
			IntPtr[] array4 = new IntPtr[length2];
			IntPtr intPtr4 = AndroidJNISafe.FindClass("java/lang/Object");
			IntPtr intPtr5 = IntPtr.Zero;
			for (int j = 0; j < length2; j++)
			{
				if (array3[j] != null)
				{
					ref IntPtr reference = ref array4[j];
					reference = array3[j].GetRawObject();
					IntPtr rawClass = array3[j].GetRawClass();
					if (intPtr5 != rawClass)
					{
						intPtr5 = ((!(intPtr5 == IntPtr.Zero)) ? intPtr4 : rawClass);
					}
				}
				else
				{
					ref IntPtr reference2 = ref array4[j];
					reference2 = IntPtr.Zero;
				}
			}
			IntPtr result = AndroidJNISafe.ToObjectArray(array4, intPtr5);
			AndroidJNISafe.DeleteLocalRef(intPtr4);
			return result;
		}
		throw new Exception(string.Concat("JNI; Unknown array type '", elementType, "'"));
	}

	public static ArrayType ConvertFromJNIArray<ArrayType>(IntPtr array)
	{
		Type elementType = typeof(ArrayType).GetElementType();
		if (AndroidReflection.IsPrimitive(elementType))
		{
			if ((object)elementType == typeof(int))
			{
				return (ArrayType)(object)AndroidJNISafe.FromIntArray(array);
			}
			if ((object)elementType == typeof(bool))
			{
				return (ArrayType)(object)AndroidJNISafe.FromBooleanArray(array);
			}
			if ((object)elementType == typeof(byte))
			{
				Debug.LogWarning((object)"AndroidJNIHelper: converting from Byte array is obsolete, use SByte array instead");
				return (ArrayType)(object)AndroidJNISafe.FromByteArray(array);
			}
			if ((object)elementType == typeof(sbyte))
			{
				return (ArrayType)(object)AndroidJNISafe.FromSByteArray(array);
			}
			if ((object)elementType == typeof(short))
			{
				return (ArrayType)(object)AndroidJNISafe.FromShortArray(array);
			}
			if ((object)elementType == typeof(long))
			{
				return (ArrayType)(object)AndroidJNISafe.FromLongArray(array);
			}
			if ((object)elementType == typeof(float))
			{
				return (ArrayType)(object)AndroidJNISafe.FromFloatArray(array);
			}
			if ((object)elementType == typeof(double))
			{
				return (ArrayType)(object)AndroidJNISafe.FromDoubleArray(array);
			}
			if ((object)elementType == typeof(char))
			{
				return (ArrayType)(object)AndroidJNISafe.FromCharArray(array);
			}
			return default(ArrayType);
		}
		if ((object)elementType == typeof(string))
		{
			int arrayLength = AndroidJNISafe.GetArrayLength(array);
			string[] array2 = new string[arrayLength];
			for (int i = 0; i < arrayLength; i++)
			{
				IntPtr objectArrayElement = AndroidJNI.GetObjectArrayElement(array, i);
				array2[i] = AndroidJNISafe.GetStringChars(objectArrayElement);
				AndroidJNISafe.DeleteLocalRef(objectArrayElement);
			}
			return (ArrayType)(object)array2;
		}
		if ((object)elementType == typeof(AndroidJavaObject))
		{
			int arrayLength2 = AndroidJNISafe.GetArrayLength(array);
			AndroidJavaObject[] array3 = new AndroidJavaObject[arrayLength2];
			for (int j = 0; j < arrayLength2; j++)
			{
				IntPtr objectArrayElement2 = AndroidJNI.GetObjectArrayElement(array, j);
				array3[j] = new AndroidJavaObject(objectArrayElement2);
				AndroidJNISafe.DeleteLocalRef(objectArrayElement2);
			}
			return (ArrayType)(object)array3;
		}
		throw new Exception(string.Concat("JNI: Unknown generic array type '", elementType, "'"));
	}

	public static IntPtr GetConstructorID(IntPtr jclass, object[] args)
	{
		return AndroidJNIHelper.GetConstructorID(jclass, GetSignature(args));
	}

	public static IntPtr GetMethodID(IntPtr jclass, string methodName, object[] args, bool isStatic)
	{
		return AndroidJNIHelper.GetMethodID(jclass, methodName, GetSignature(args), isStatic);
	}

	public static IntPtr GetMethodID<ReturnType>(IntPtr jclass, string methodName, object[] args, bool isStatic)
	{
		return AndroidJNIHelper.GetMethodID(jclass, methodName, GetSignature<ReturnType>(args), isStatic);
	}

	public static IntPtr GetFieldID<ReturnType>(IntPtr jclass, string fieldName, bool isStatic)
	{
		return AndroidJNIHelper.GetFieldID(jclass, fieldName, GetSignature(typeof(ReturnType)), isStatic);
	}

	public static IntPtr GetConstructorID(IntPtr jclass, string signature)
	{
		IntPtr intPtr = IntPtr.Zero;
		try
		{
			intPtr = AndroidReflection.GetConstructorMember(jclass, signature);
			return AndroidJNISafe.FromReflectedMethod(intPtr);
		}
		catch (Exception ex)
		{
			IntPtr methodID = AndroidJNISafe.GetMethodID(jclass, "<init>", signature);
			if (methodID != IntPtr.Zero)
			{
				return methodID;
			}
			throw ex;
		}
		finally
		{
			AndroidJNISafe.DeleteLocalRef(intPtr);
		}
	}

	public static IntPtr GetMethodID(IntPtr jclass, string methodName, string signature, bool isStatic)
	{
		IntPtr intPtr = IntPtr.Zero;
		try
		{
			intPtr = AndroidReflection.GetMethodMember(jclass, methodName, signature, isStatic);
			return AndroidJNISafe.FromReflectedMethod(intPtr);
		}
		catch (Exception ex)
		{
			IntPtr methodIDFallback = GetMethodIDFallback(jclass, methodName, signature, isStatic);
			if (methodIDFallback != IntPtr.Zero)
			{
				return methodIDFallback;
			}
			throw ex;
		}
		finally
		{
			AndroidJNISafe.DeleteLocalRef(intPtr);
		}
	}

	private static IntPtr GetMethodIDFallback(IntPtr jclass, string methodName, string signature, bool isStatic)
	{
		try
		{
			return (!isStatic) ? AndroidJNISafe.GetMethodID(jclass, methodName, signature) : AndroidJNISafe.GetStaticMethodID(jclass, methodName, signature);
		}
		catch (Exception)
		{
		}
		return IntPtr.Zero;
	}

	public static IntPtr GetFieldID(IntPtr jclass, string fieldName, string signature, bool isStatic)
	{
		IntPtr intPtr = IntPtr.Zero;
		try
		{
			intPtr = AndroidReflection.GetFieldMember(jclass, fieldName, signature, isStatic);
			return AndroidJNISafe.FromReflectedField(intPtr);
		}
		catch (Exception ex)
		{
			IntPtr intPtr2 = ((!isStatic) ? AndroidJNISafe.GetFieldID(jclass, fieldName, signature) : AndroidJNISafe.GetStaticFieldID(jclass, fieldName, signature));
			if (intPtr2 != IntPtr.Zero)
			{
				return intPtr2;
			}
			throw ex;
		}
		finally
		{
			AndroidJNISafe.DeleteLocalRef(intPtr);
		}
	}

	public static string GetSignature(object obj)
	{
		if (obj == null)
		{
			return "Ljava/lang/Object;";
		}
		Type type = ((!(obj is Type)) ? obj.GetType() : ((Type)obj));
		if (AndroidReflection.IsPrimitive(type))
		{
			if (type.Equals(typeof(int)))
			{
				return "I";
			}
			if (type.Equals(typeof(bool)))
			{
				return "Z";
			}
			if (type.Equals(typeof(byte)))
			{
				Debug.LogWarning((object)"AndroidJNIHelper.GetSignature: using Byte parameters is obsolete, use SByte parameters instead");
				return "B";
			}
			if (type.Equals(typeof(sbyte)))
			{
				return "B";
			}
			if (type.Equals(typeof(short)))
			{
				return "S";
			}
			if (type.Equals(typeof(long)))
			{
				return "J";
			}
			if (type.Equals(typeof(float)))
			{
				return "F";
			}
			if (type.Equals(typeof(double)))
			{
				return "D";
			}
			if (type.Equals(typeof(char)))
			{
				return "C";
			}
			return "";
		}
		if (type.Equals(typeof(string)))
		{
			return "Ljava/lang/String;";
		}
		if (obj is AndroidJavaProxy)
		{
			AndroidJavaObject androidJavaObject = new AndroidJavaObject(((AndroidJavaProxy)obj).javaInterface.GetRawClass());
			return "L" + androidJavaObject.Call<string>("getName", new object[0]) + ";";
		}
		if (type.Equals(typeof(AndroidJavaRunnable)))
		{
			return "Ljava/lang/Runnable;";
		}
		if (type.Equals(typeof(AndroidJavaClass)))
		{
			return "Ljava/lang/Class;";
		}
		if (type.Equals(typeof(AndroidJavaObject)))
		{
			if (obj == type)
			{
				return "Ljava/lang/Object;";
			}
			AndroidJavaObject androidJavaObject2 = (AndroidJavaObject)obj;
			using AndroidJavaObject androidJavaObject3 = androidJavaObject2.Call<AndroidJavaObject>("getClass", new object[0]);
			return "L" + androidJavaObject3.Call<string>("getName", new object[0]) + ";";
		}
		if (AndroidReflection.IsAssignableFrom(typeof(Array), type))
		{
			if (type.GetArrayRank() != 1)
			{
				throw new Exception("JNI: System.Array in n dimensions is not allowed");
			}
			StringBuilder stringBuilder = new StringBuilder();
			stringBuilder.Append('[');
			stringBuilder.Append(GetSignature(type.GetElementType()));
			return stringBuilder.ToString();
		}
		throw new Exception(string.Concat("JNI: Unknown signature for type '", type, "' (obj = ", obj, ") ", (type != obj) ? "instance" : "equal"));
	}

	public static string GetSignature(object[] args)
	{
		StringBuilder stringBuilder = new StringBuilder();
		stringBuilder.Append('(');
		foreach (object obj in args)
		{
			stringBuilder.Append(GetSignature(obj));
		}
		stringBuilder.Append(")V");
		return stringBuilder.ToString();
	}

	public static string GetSignature<ReturnType>(object[] args)
	{
		StringBuilder stringBuilder = new StringBuilder();
		stringBuilder.Append('(');
		foreach (object obj in args)
		{
			stringBuilder.Append(GetSignature(obj));
		}
		stringBuilder.Append(')');
		stringBuilder.Append(GetSignature(typeof(ReturnType)));
		return stringBuilder.ToString();
	}
}
[StructLayout(LayoutKind.Explicit)]
[NativeType(/*Could not decode attribute arguments.*/)]
public struct jvalue
{
	[FieldOffset(0)]
	public bool z;

	[FieldOffset(0)]
	public sbyte b;

	[FieldOffset(0)]
	public char c;

	[FieldOffset(0)]
	public short s;

	[FieldOffset(0)]
	public int i;

	[FieldOffset(0)]
	public long j;

	[FieldOffset(0)]
	public float f;

	[FieldOffset(0)]
	public double d;

	[FieldOffset(0)]
	public IntPtr l;
}
[UsedByNativeCode]
[StaticAccessor(/*Could not decode attribute arguments.*/)]
[NativeHeader("Modules/AndroidJNI/Public/AndroidJNIBindingsHelpers.h")]
[NativeConditional("PLATFORM_ANDROID")]
public static class AndroidJNIHelper
{
	public static extern bool debug
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public static IntPtr GetConstructorID(IntPtr javaClass)
	{
		return GetConstructorID(javaClass, "");
	}

	public static IntPtr GetConstructorID(IntPtr javaClass, [DefaultValue("")] string signature)
	{
		return _AndroidJNIHelper.GetConstructorID(javaClass, signature);
	}

	public static IntPtr GetMethodID(IntPtr javaClass, string methodName)
	{
		return GetMethodID(javaClass, methodName, "", isStatic: false);
	}

	public static IntPtr GetMethodID(IntPtr javaClass, string methodName, [DefaultValue("")] string signature)
	{
		return GetMethodID(javaClass, methodName, signature, isStatic: false);
	}

	public static IntPtr GetMethodID(IntPtr javaClass, string methodName, [DefaultValue("")] string signature, [DefaultValue("false")] bool isStatic)
	{
		return _AndroidJNIHelper.GetMethodID(javaClass, methodName, signature, isStatic);
	}

	public static IntPtr GetFieldID(IntPtr javaClass, string fieldName)
	{
		return GetFieldID(javaClass, fieldName, "", isStatic: false);
	}

	public static IntPtr GetFieldID(IntPtr javaClass, string fieldName, [DefaultValue("")] string signature)
	{
		return GetFieldID(javaClass, fieldName, signature, isStatic: false);
	}

	public static IntPtr GetFieldID(IntPtr javaClass, string fieldName, [DefaultValue("")] string signature, [DefaultValue("false")] bool isStatic)
	{
		return _AndroidJNIHelper.GetFieldID(javaClass, fieldName, signature, isStatic);
	}

	public static IntPtr CreateJavaRunnable(AndroidJavaRunnable jrunnable)
	{
		return _AndroidJNIHelper.CreateJavaRunnable(jrunnable);
	}

	public static IntPtr CreateJavaProxy(AndroidJavaProxy proxy)
	{
		GCHandle value = GCHandle.Alloc(proxy);
		try
		{
			return _AndroidJNIHelper.CreateJavaProxy(GCHandle.ToIntPtr(value), proxy);
		}
		catch
		{
			value.Free();
			throw;
		}
	}

	public static IntPtr ConvertToJNIArray(Array array)
	{
		return _AndroidJNIHelper.ConvertToJNIArray(array);
	}

	public static jvalue[] CreateJNIArgArray(object[] args)
	{
		return _AndroidJNIHelper.CreateJNIArgArray(args);
	}

	public static void DeleteJNIArgArray(object[] args, jvalue[] jniArgs)
	{
		_AndroidJNIHelper.DeleteJNIArgArray(args, jniArgs);
	}

	public static IntPtr GetConstructorID(IntPtr jclass, object[] args)
	{
		return _AndroidJNIHelper.GetConstructorID(jclass, args);
	}

	public static IntPtr GetMethodID(IntPtr jclass, string methodName, object[] args, bool isStatic)
	{
		return _AndroidJNIHelper.GetMethodID(jclass, methodName, args, isStatic);
	}

	public static string GetSignature(object obj)
	{
		return _AndroidJNIHelper.GetSignature(obj);
	}

	public static string GetSignature(object[] args)
	{
		return _AndroidJNIHelper.GetSignature(args);
	}

	public static ArrayType ConvertFromJNIArray<ArrayType>(IntPtr array)
	{
		return _AndroidJNIHelper.ConvertFromJNIArray<ArrayType>(array);
	}

	public static IntPtr GetMethodID<ReturnType>(IntPtr jclass, string methodName, object[] args, bool isStatic)
	{
		return _AndroidJNIHelper.GetMethodID<ReturnType>(jclass, methodName, args, isStatic);
	}

	public static IntPtr GetFieldID<FieldType>(IntPtr jclass, string fieldName, bool isStatic)
	{
		return _AndroidJNIHelper.GetFieldID<FieldType>(jclass, fieldName, isStatic);
	}

	public static string GetSignature<ReturnType>(object[] args)
	{
		return _AndroidJNIHelper.GetSignature<ReturnType>(args);
	}
}
[NativeConditional("PLATFORM_ANDROID")]
[StaticAccessor(/*Could not decode attribute arguments.*/)]
[NativeHeader("Modules/AndroidJNI/Public/AndroidJNIBindingsHelpers.h")]
public static class AndroidJNI
{
	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern int AttachCurrentThread();

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern int DetachCurrentThread();

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern int GetVersion();

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr FindClass(string name);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr FromReflectedMethod(IntPtr refMethod);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr FromReflectedField(IntPtr refField);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr ToReflectedMethod(IntPtr clazz, IntPtr methodID, bool isStatic);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr ToReflectedField(IntPtr clazz, IntPtr fieldID, bool isStatic);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr GetSuperclass(IntPtr clazz);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern bool IsAssignableFrom(IntPtr clazz1, IntPtr clazz2);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern int Throw(IntPtr obj);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern int ThrowNew(IntPtr clazz, string message);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr ExceptionOccurred();

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void ExceptionDescribe();

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void ExceptionClear();

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void FatalError(string message);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern int PushLocalFrame(int capacity);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr PopLocalFrame(IntPtr ptr);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr NewGlobalRef(IntPtr obj);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void DeleteGlobalRef(IntPtr obj);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr NewWeakGlobalRef(IntPtr obj);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void DeleteWeakGlobalRef(IntPtr obj);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr NewLocalRef(IntPtr obj);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void DeleteLocalRef(IntPtr obj);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern bool IsSameObject(IntPtr obj1, IntPtr obj2);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern int EnsureLocalCapacity(int capacity);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr AllocObject(IntPtr clazz);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr NewObject(IntPtr clazz, IntPtr methodID, jvalue[] args);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr GetObjectClass(IntPtr obj);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern bool IsInstanceOf(IntPtr obj, IntPtr clazz);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr GetMethodID(IntPtr clazz, string name, string sig);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr GetFieldID(IntPtr clazz, string name, string sig);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr GetStaticMethodID(IntPtr clazz, string name, string sig);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr GetStaticFieldID(IntPtr clazz, string name, string sig);

	public static IntPtr NewString(string chars)
	{
		return NewStringFromStr(chars);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	private static extern IntPtr NewStringFromStr(string chars);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr NewString(char[] chars);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr NewStringUTF(string bytes);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern string GetStringChars(IntPtr str);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern int GetStringLength(IntPtr str);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern int GetStringUTFLength(IntPtr str);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern string GetStringUTFChars(IntPtr str);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern string CallStringMethod(IntPtr obj, IntPtr methodID, jvalue[] args);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr CallObjectMethod(IntPtr obj, IntPtr methodID, jvalue[] args);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern int CallIntMethod(IntPtr obj, IntPtr methodID, jvalue[] args);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern bool CallBooleanMethod(IntPtr obj, IntPtr methodID, jvalue[] args);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern short CallShortMethod(IntPtr obj, IntPtr methodID, jvalue[] args);

	[Obsolete("AndroidJNI.CallByteMethod is obsolete. Use AndroidJNI.CallSByteMethod method instead")]
	public static byte CallByteMethod(IntPtr obj, IntPtr methodID, jvalue[] args)
	{
		return (byte)CallSByteMethod(obj, methodID, args);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern sbyte CallSByteMethod(IntPtr obj, IntPtr methodID, jvalue[] args);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern char CallCharMethod(IntPtr obj, IntPtr methodID, jvalue[] args);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern float CallFloatMethod(IntPtr obj, IntPtr methodID, jvalue[] args);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern double CallDoubleMethod(IntPtr obj, IntPtr methodID, jvalue[] args);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern long CallLongMethod(IntPtr obj, IntPtr methodID, jvalue[] args);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void CallVoidMethod(IntPtr obj, IntPtr methodID, jvalue[] args);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern string GetStringField(IntPtr obj, IntPtr fieldID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr GetObjectField(IntPtr obj, IntPtr fieldID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern bool GetBooleanField(IntPtr obj, IntPtr fieldID);

	[Obsolete("AndroidJNI.GetByteField is obsolete. Use AndroidJNI.GetSByteField method instead")]
	public static byte GetByteField(IntPtr obj, IntPtr fieldID)
	{
		return (byte)GetSByteField(obj, fieldID);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern sbyte GetSByteField(IntPtr obj, IntPtr fieldID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern char GetCharField(IntPtr obj, IntPtr fieldID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern short GetShortField(IntPtr obj, IntPtr fieldID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern int GetIntField(IntPtr obj, IntPtr fieldID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern long GetLongField(IntPtr obj, IntPtr fieldID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern float GetFloatField(IntPtr obj, IntPtr fieldID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern double GetDoubleField(IntPtr obj, IntPtr fieldID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void SetStringField(IntPtr obj, IntPtr fieldID, string val);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void SetObjectField(IntPtr obj, IntPtr fieldID, IntPtr val);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void SetBooleanField(IntPtr obj, IntPtr fieldID, bool val);

	[Obsolete("AndroidJNI.SetByteField is obsolete. Use AndroidJNI.SetSByteField method instead")]
	public static void SetByteField(IntPtr obj, IntPtr fieldID, byte val)
	{
		SetSByteField(obj, fieldID, (sbyte)val);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void SetSByteField(IntPtr obj, IntPtr fieldID, sbyte val);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void SetCharField(IntPtr obj, IntPtr fieldID, char val);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void SetShortField(IntPtr obj, IntPtr fieldID, short val);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void SetIntField(IntPtr obj, IntPtr fieldID, int val);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void SetLongField(IntPtr obj, IntPtr fieldID, long val);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void SetFloatField(IntPtr obj, IntPtr fieldID, float val);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void SetDoubleField(IntPtr obj, IntPtr fieldID, double val);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern string CallStaticStringMethod(IntPtr clazz, IntPtr methodID, jvalue[] args);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr CallStaticObjectMethod(IntPtr clazz, IntPtr methodID, jvalue[] args);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern int CallStaticIntMethod(IntPtr clazz, IntPtr methodID, jvalue[] args);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern bool CallStaticBooleanMethod(IntPtr clazz, IntPtr methodID, jvalue[] args);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern short CallStaticShortMethod(IntPtr clazz, IntPtr methodID, jvalue[] args);

	[Obsolete("AndroidJNI.CallStaticByteMethod is obsolete. Use AndroidJNI.CallStaticSByteMethod method instead")]
	public static byte CallStaticByteMethod(IntPtr clazz, IntPtr methodID, jvalue[] args)
	{
		return (byte)CallStaticSByteMethod(clazz, methodID, args);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern sbyte CallStaticSByteMethod(IntPtr clazz, IntPtr methodID, jvalue[] args);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern char CallStaticCharMethod(IntPtr clazz, IntPtr methodID, jvalue[] args);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern float CallStaticFloatMethod(IntPtr clazz, IntPtr methodID, jvalue[] args);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern double CallStaticDoubleMethod(IntPtr clazz, IntPtr methodID, jvalue[] args);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern long CallStaticLongMethod(IntPtr clazz, IntPtr methodID, jvalue[] args);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void CallStaticVoidMethod(IntPtr clazz, IntPtr methodID, jvalue[] args);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern string GetStaticStringField(IntPtr clazz, IntPtr fieldID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr GetStaticObjectField(IntPtr clazz, IntPtr fieldID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern bool GetStaticBooleanField(IntPtr clazz, IntPtr fieldID);

	[Obsolete("AndroidJNI.GetStaticByteField is obsolete. Use AndroidJNI.GetStaticSByteField method instead")]
	public static byte GetStaticByteField(IntPtr clazz, IntPtr fieldID)
	{
		return (byte)GetStaticSByteField(clazz, fieldID);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern sbyte GetStaticSByteField(IntPtr clazz, IntPtr fieldID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern char GetStaticCharField(IntPtr clazz, IntPtr fieldID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern short GetStaticShortField(IntPtr clazz, IntPtr fieldID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern int GetStaticIntField(IntPtr clazz, IntPtr fieldID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern long GetStaticLongField(IntPtr clazz, IntPtr fieldID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern float GetStaticFloatField(IntPtr clazz, IntPtr fieldID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern double GetStaticDoubleField(IntPtr clazz, IntPtr fieldID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void SetStaticStringField(IntPtr clazz, IntPtr fieldID, string val);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void SetStaticObjectField(IntPtr clazz, IntPtr fieldID, IntPtr val);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void SetStaticBooleanField(IntPtr clazz, IntPtr fieldID, bool val);

	[Obsolete("AndroidJNI.SetStaticByteField is obsolete. Use AndroidJNI.SetStaticSByteField method instead")]
	public static void SetStaticByteField(IntPtr clazz, IntPtr fieldID, byte val)
	{
		SetStaticSByteField(clazz, fieldID, (sbyte)val);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void SetStaticSByteField(IntPtr clazz, IntPtr fieldID, sbyte val);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void SetStaticCharField(IntPtr clazz, IntPtr fieldID, char val);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void SetStaticShortField(IntPtr clazz, IntPtr fieldID, short val);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void SetStaticIntField(IntPtr clazz, IntPtr fieldID, int val);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void SetStaticLongField(IntPtr clazz, IntPtr fieldID, long val);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void SetStaticFloatField(IntPtr clazz, IntPtr fieldID, float val);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void SetStaticDoubleField(IntPtr clazz, IntPtr fieldID, double val);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr ToBooleanArray(bool[] array);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	[Obsolete("AndroidJNI.ToByteArray is obsolete. Use AndroidJNI.ToSByteArray method instead")]
	public static extern IntPtr ToByteArray(byte[] array);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr ToSByteArray(sbyte[] array);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr ToCharArray(char[] array);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr ToShortArray(short[] array);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr ToIntArray(int[] array);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr ToLongArray(long[] array);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr ToFloatArray(float[] array);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr ToDoubleArray(double[] array);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr ToObjectArray(IntPtr[] array, IntPtr arrayClass);

	public static IntPtr ToObjectArray(IntPtr[] array)
	{
		return ToObjectArray(array, IntPtr.Zero);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern bool[] FromBooleanArray(IntPtr array);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	[Obsolete("AndroidJNI.FromByteArray is obsolete. Use AndroidJNI.FromSByteArray method instead")]
	public static extern byte[] FromByteArray(IntPtr array);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern sbyte[] FromSByteArray(IntPtr array);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern char[] FromCharArray(IntPtr array);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern short[] FromShortArray(IntPtr array);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern int[] FromIntArray(IntPtr array);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern long[] FromLongArray(IntPtr array);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern float[] FromFloatArray(IntPtr array);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern double[] FromDoubleArray(IntPtr array);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr[] FromObjectArray(IntPtr array);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern int GetArrayLength(IntPtr array);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr NewBooleanArray(int size);

	[Obsolete("AndroidJNI.NewByteArray is obsolete. Use AndroidJNI.NewSByteArray method instead")]
	public static IntPtr NewByteArray(int size)
	{
		return NewSByteArray(size);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr NewSByteArray(int size);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr NewCharArray(int size);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr NewShortArray(int size);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr NewIntArray(int size);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr NewLongArray(int size);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr NewFloatArray(int size);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr NewDoubleArray(int size);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr NewObjectArray(int size, IntPtr clazz, IntPtr obj);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern bool GetBooleanArrayElement(IntPtr array, int index);

	[Obsolete("AndroidJNI.GetByteArrayElement is obsolete. Use AndroidJNI.GetSByteArrayElement method instead")]
	public static byte GetByteArrayElement(IntPtr array, int index)
	{
		return (byte)GetSByteArrayElement(array, index);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern sbyte GetSByteArrayElement(IntPtr array, int index);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern char GetCharArrayElement(IntPtr array, int index);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern short GetShortArrayElement(IntPtr array, int index);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern int GetIntArrayElement(IntPtr array, int index);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern long GetLongArrayElement(IntPtr array, int index);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern float GetFloatArrayElement(IntPtr array, int index);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern double GetDoubleArrayElement(IntPtr array, int index);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern IntPtr GetObjectArrayElement(IntPtr array, int index);

	[Obsolete("AndroidJNI.SetBooleanArrayElement(IntPtr, int, byte) is obsolete. Use AndroidJNI.SetBooleanArrayElement(IntPtr, int, bool) method instead")]
	public static void SetBooleanArrayElement(IntPtr array, int index, byte val)
	{
		SetBooleanArrayElement(array, index, val != 0);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void SetBooleanArrayElement(IntPtr array, int index, bool val);

	[Obsolete("AndroidJNI.SetByteArrayElement is obsolete. Use AndroidJNI.SetSByteArrayElement method instead")]
	public static void SetByteArrayElement(IntPtr array, int index, sbyte val)
	{
		SetSByteArrayElement(array, index, val);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void SetSByteArrayElement(IntPtr array, int index, sbyte val);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void SetCharArrayElement(IntPtr array, int index, char val);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void SetShortArrayElement(IntPtr array, int index, short val);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void SetIntArrayElement(IntPtr array, int index, int val);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void SetLongArrayElement(IntPtr array, int index, long val);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void SetFloatArrayElement(IntPtr array, int index, float val);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void SetDoubleArrayElement(IntPtr array, int index, double val);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[ThreadSafe]
	public static extern void SetObjectArrayElement(IntPtr array, int index, IntPtr obj);
}
internal class AndroidJNISafe
{
	public static void CheckException()
	{
		IntPtr intPtr = AndroidJNI.ExceptionOccurred();
		if (intPtr != IntPtr.Zero)
		{
			AndroidJNI.ExceptionClear();
			IntPtr intPtr2 = AndroidJNI.FindClass("java/lang/Throwable");
			IntPtr intPtr3 = AndroidJNI.FindClass("android/util/Log");
			try
			{
				IntPtr methodID = AndroidJNI.GetMethodID(intPtr2, "toString", "()Ljava/lang/String;");
				IntPtr staticMethodID = AndroidJNI.GetStaticMethodID(intPtr3, "getStackTraceString", "(Ljava/lang/Throwable;)Ljava/lang/String;");
				string message = AndroidJNI.CallStringMethod(intPtr, methodID, new jvalue[0]);
				jvalue[] array = new jvalue[1];
				array[0].l = intPtr;
				string javaStackTrace = AndroidJNI.CallStaticStringMethod(intPtr3, staticMethodID, array);
				throw new AndroidJavaException(message, javaStackTrace);
			}
			finally
			{
				DeleteLocalRef(intPtr);
				DeleteLocalRef(intPtr2);
				DeleteLocalRef(intPtr3);
			}
		}
	}

	public static void DeleteGlobalRef(IntPtr globalref)
	{
		if (globalref != IntPtr.Zero)
		{
			AndroidJNI.DeleteGlobalRef(globalref);
		}
	}

	public static void DeleteWeakGlobalRef(IntPtr globalref)
	{
		if (globalref != IntPtr.Zero)
		{
			AndroidJNI.DeleteWeakGlobalRef(globalref);
		}
	}

	public static void DeleteLocalRef(IntPtr localref)
	{
		if (localref != IntPtr.Zero)
		{
			AndroidJNI.DeleteLocalRef(localref);
		}
	}

	public static IntPtr NewString(string chars)
	{
		try
		{
			return AndroidJNI.NewString(chars);
		}
		finally
		{
			CheckException();
		}
	}

	public static IntPtr NewStringUTF(string bytes)
	{
		try
		{
			return AndroidJNI.NewStringUTF(bytes);
		}
		finally
		{
			CheckException();
		}
	}

	public static string GetStringChars(IntPtr str)
	{
		try
		{
			return AndroidJNI.GetStringChars(str);
		}
		finally
		{
			CheckException();
		}
	}

	public static string GetStringUTFChars(IntPtr str)
	{
		try
		{
			return AndroidJNI.GetStringUTFChars(str);
		}
		finally
		{
			CheckException();
		}
	}

	public static IntPtr GetObjectClass(IntPtr ptr)
	{
		try
		{
			return AndroidJNI.GetObjectClass(ptr);
		}
		finally
		{
			CheckException();
		}
	}

	public static IntPtr GetStaticMethodID(IntPtr clazz, string name, string sig)
	{
		try
		{
			return AndroidJNI.GetStaticMethodID(clazz, name, sig);
		}
		finally
		{
			CheckException();
		}
	}

	public static IntPtr GetMethodID(IntPtr obj, string name, string sig)
	{
		try
		{
			return AndroidJNI.GetMethodID(obj, name, sig);
		}
		finally
		{
			CheckException();
		}
	}

	public static IntPtr GetFieldID(IntPtr clazz, string name, string sig)
	{
		try
		{
			return AndroidJNI.GetFieldID(clazz, name, sig);
		}
		finally
		{
			CheckException();
		}
	}

	public static IntPtr GetStaticFieldID(IntPtr clazz, string name, string sig)
	{
		try
		{
			return AndroidJNI.GetStaticFieldID(clazz, name, sig);
		}
		finally
		{
			CheckException();
		}
	}

	public static IntPtr FromReflectedMethod(IntPtr refMethod)
	{
		try
		{
			return AndroidJNI.FromReflectedMethod(refMethod);
		}
		finally
		{
			CheckException();
		}
	}

	public static IntPtr FromReflectedField(IntPtr refField)
	{
		try
		{
			return AndroidJNI.FromReflectedField(refField);
		}
		finally
		{
			CheckException();
		}
	}

	public static IntPtr FindClass(string name)
	{
		try
		{
			return AndroidJNI.FindClass(name);
		}
		finally
		{
			CheckException();
		}
	}

	public static IntPtr NewObject(IntPtr clazz, IntPtr methodID, jvalue[] args)
	{
		try
		{
			return AndroidJNI.NewObject(clazz, methodID, args);
		}
		finally
		{
			CheckException();
		}
	}

	public static void SetStaticObjectField(IntPtr clazz, IntPtr fieldID, IntPtr val)
	{
		try
		{
			AndroidJNI.SetStaticObjectField(clazz, fieldID, val);
		}
		finally
		{
			CheckException();
		}
	}

	public static void SetStaticStringField(IntPtr clazz, IntPtr fieldID, string val)
	{
		try
		{
			AndroidJNI.SetStaticStringField(clazz, fieldID, val);
		}
		finally
		{
			CheckException();
		}
	}

	public static void SetStaticCharField(IntPtr clazz, IntPtr fieldID, char val)
	{
		try
		{
			AndroidJNI.SetStaticCharField(clazz, fieldID, val);
		}
		finally
		{
			CheckException();
		}
	}

	public static void SetStaticDoubleField(IntPtr clazz, IntPtr fieldID, double val)
	{
		try
		{
			AndroidJNI.SetStaticDoubleField(clazz, fieldID, val);
		}
		finally
		{
			CheckException();
		}
	}

	public static void SetStaticFloatField(IntPtr clazz, IntPtr fieldID, float val)
	{
		try
		{
			AndroidJNI.SetStaticFloatField(clazz, fieldID, val);
		}
		finally
		{
			CheckException();
		}
	}

	public static void SetStaticLongField(IntPtr clazz, IntPtr fieldID, long val)
	{
		try
		{
			AndroidJNI.SetStaticLongField(clazz, fieldID, val);
		}
		finally
		{
			CheckException();
		}
	}

	public static void SetStaticShortField(IntPtr clazz, IntPtr fieldID, short val)
	{
		try
		{
			AndroidJNI.SetStaticShortField(clazz, fieldID, val);
		}
		finally
		{
			CheckException();
		}
	}

	public static void SetStaticSByteField(IntPtr clazz, IntPtr fieldID, sbyte val)
	{
		try
		{
			AndroidJNI.SetStaticSByteField(clazz, fieldID, val);
		}
		finally
		{
			CheckException();
		}
	}

	public static void SetStaticBooleanField(IntPtr clazz, IntPtr fieldID, bool val)
	{
		try
		{
			AndroidJNI.SetStaticBooleanField(clazz, fieldID, val);
		}
		finally
		{
			CheckException();
		}
	}

	public static void SetStaticIntField(IntPtr clazz, IntPtr fieldID, int val)
	{
		try
		{
			AndroidJNI.SetStaticIntField(clazz, fieldID, val);
		}
		finally
		{
			CheckException();
		}
	}

	public static IntPtr GetStaticObjectField(IntPtr clazz, IntPtr fieldID)
	{
		try
		{
			return AndroidJNI.GetStaticObjectField(clazz, fieldID);
		}
		finally
		{
			CheckException();
		}
	}

	public static string GetStaticStringField(IntPtr clazz, IntPtr fieldID)
	{
		try
		{
			return AndroidJNI.GetStaticStringField(clazz, fieldID);
		}
		finally
		{
			CheckException();
		}
	}

	public static char GetStaticCharField(IntPtr clazz, IntPtr fieldID)
	{
		try
		{
			return AndroidJNI.GetStaticCharField(clazz, fieldID);
		}
		finally
		{
			CheckException();
		}
	}

	public static double GetStaticDoubleField(IntPtr clazz, IntPtr fieldID)
	{
		try
		{
			return AndroidJNI.GetStaticDoubleField(clazz, fieldID);
		}
		finally
		{
			CheckException();
		}
	}

	public static float GetStaticFloatField(IntPtr clazz, IntPtr fieldID)
	{
		try
		{
			return AndroidJNI.GetStaticFloatField(clazz, fieldID);
		}
		finally
		{
			CheckException();
		}
	}

	public static long GetStaticLongField(IntPtr clazz, IntPtr fieldID)
	{
		try
		{
			return AndroidJNI.GetStaticLongField(clazz, fieldID);
		}
		finally
		{
			CheckException();
		}
	}

	public static short GetStaticShortField(IntPtr clazz, IntPtr fieldID)
	{
		try
		{
			return AndroidJNI.GetStaticShortField(clazz, fieldID);
		}
		finally
		{
			CheckException();
		}
	}

	public static sbyte GetStaticSByteField(IntPtr clazz, IntPtr fieldID)
	{
		try
		{
			return AndroidJNI.GetStaticSByteField(clazz, fieldID);
		}
		finally
		{
			CheckException();
		}
	}

	public static bool GetStaticBooleanField(IntPtr clazz, IntPtr fieldID)
	{
		try
		{
			return AndroidJNI.GetStaticBooleanField(clazz, fieldID);
		}
		finally
		{
			CheckException();
		}
	}

	public static int GetStaticIntField(IntPtr clazz, IntPtr fieldID)
	{
		try
		{
			return AndroidJNI.GetStaticIntField(clazz, fieldID);
		}
		finally
		{
			CheckException();
		}
	}

	public static void CallStaticVoidMethod(IntPtr clazz, IntPtr methodID, jvalue[] args)
	{
		try
		{
			AndroidJNI.CallStaticVoidMethod(clazz, methodID, args);
		}
		finally
		{
			CheckException();
		}
	}

	public static IntPtr CallStaticObjectMethod(IntPtr clazz, IntPtr methodID, jvalue[] args)
	{
		try
		{
			return AndroidJNI.CallStaticObjectMethod(clazz, methodID, args);
		}
		finally
		{
			CheckException();
		}
	}

	public static string CallStaticStringMethod(IntPtr clazz, IntPtr methodID, jvalue[] args)
	{
		try
		{
			return AndroidJNI.CallStaticStringMethod(clazz, methodID, args);
		}
		finally
		{
			CheckException();
		}
	}

	public static char CallStaticCharMethod(IntPtr clazz, IntPtr methodID, jvalue[] args)
	{
		try
		{
			return AndroidJNI.CallStaticCharMethod(clazz, methodID, args);
		}
		finally
		{
			CheckException();
		}
	}

	public static double CallStaticDoubleMethod(IntPtr clazz, IntPtr methodID, jvalue[] args)
	{
		try
		{
			return AndroidJNI.CallStaticDoubleMethod(clazz, methodID, args);
		}
		finally
		{
			CheckException();
		}
	}

	public static float CallStaticFloatMethod(IntPtr clazz, IntPtr methodID, jvalue[] args)
	{
		try
		{
			return AndroidJNI.CallStaticFloatMethod(clazz, methodID, args);
		}
		finally
		{
			CheckException();
		}
	}

	public static long CallStaticLongMethod(IntPtr clazz, IntPtr methodID, jvalue[] args)
	{
		try
		{
			return AndroidJNI.CallStaticLongMethod(clazz, methodID, args);
		}
		finally
		{
			CheckException();
		}
	}

	public static short CallStaticShortMethod(IntPtr clazz, IntPtr methodID, jvalue[] args)
	{
		try
		{
			return AndroidJNI.CallStaticShortMethod(clazz, methodID, args);
		}
		finally
		{
			CheckException();
		}
	}

	public static sbyte CallStaticSByteMethod(IntPtr clazz, IntPtr methodID, jvalue[] args)
	{
		try
		{
			return AndroidJNI.CallStaticSByteMethod(clazz, methodID, args);
		}
		finally
		{
			CheckException();
		}
	}

	public static bool CallStaticBooleanMethod(IntPtr clazz, IntPtr methodID, jvalue[] args)
	{
		try
		{
			return AndroidJNI.CallStaticBooleanMethod(clazz, methodID, args);
		}
		finally
		{
			CheckException();
		}
	}

	public static int CallStaticIntMethod(IntPtr clazz, IntPtr methodID, jvalue[] args)
	{
		try
		{
			return AndroidJNI.CallStaticIntMethod(clazz, methodID, args);
		}
		finally
		{
			CheckException();
		}
	}

	public static void SetObjectField(IntPtr obj, IntPtr fieldID, IntPtr val)
	{
		try
		{
			AndroidJNI.SetObjectField(obj, fieldID, val);
		}
		finally
		{
			CheckException();
		}
	}

	public static void SetStringField(IntPtr obj, IntPtr fieldID, string val)
	{
		try
		{
			AndroidJNI.SetStringField(obj, fieldID, val);
		}
		finally
		{
			CheckException();
		}
	}

	public static void SetCharField(IntPtr obj, IntPtr fieldID, char val)
	{
		try
		{
			AndroidJNI.SetCharField(obj, fieldID, val);
		}
		finally
		{
			CheckException();
		}
	}

	public static void SetDoubleField(IntPtr obj, IntPtr fieldID, double val)
	{
		try
		{
			AndroidJNI.SetDoubleField(obj, fieldID, val);
		}
		finally
		{
			CheckException();
		}
	}

	public static void SetFloatField(IntPtr obj, IntPtr fieldID, float val)
	{
		try
		{
			AndroidJNI.SetFloatField(obj, fieldID, val);
		}
		finally
		{
			CheckException();
		}
	}

	public static void SetLongField(IntPtr obj, IntPtr fieldID, long val)
	{
		try
		{
			AndroidJNI.SetLongField(obj, fieldID, val);
		}
		finally
		{
			CheckException();
		}
	}

	public static void SetShortField(IntPtr obj, IntPtr fieldID, short val)
	{
		try
		{
			AndroidJNI.SetShortField(obj, fieldID, val);
		}
		finally
		{
			CheckException();
		}
	}

	public static void SetSByteField(IntPtr obj, IntPtr fieldID, sbyte val)
	{
		try
		{
			AndroidJNI.SetSByteField(obj, fieldID, val);
		}
		finally
		{
			CheckException();
		}
	}

	public static void SetBooleanField(IntPtr obj, IntPtr fieldID, bool val)
	{
		try
		{
			AndroidJNI.SetBooleanField(obj, fieldID, val);
		}
		finally
		{
			CheckException();
		}
	}

	public static void SetIntField(IntPtr obj, IntPtr fieldID, int val)
	{
		try
		{
			AndroidJNI.SetIntField(obj, fieldID, val);
		}
		finally
		{
			CheckException();
		}
	}

	public static IntPtr GetObjectField(IntPtr obj, IntPtr fieldID)
	{
		try
		{
			return AndroidJNI.GetObjectField(obj, fieldID);
		}
		finally
		{
			CheckException();
		}
	}

	public static string GetStringField(IntPtr obj, IntPtr fieldID)
	{
		try
		{
			return AndroidJNI.GetStringField(obj, fieldID);
		}
		finally
		{
			CheckException();
		}
	}

	public static char GetCharField(IntPtr obj, IntPtr fieldID)
	{
		try
		{
			return AndroidJNI.GetCharField(obj, fieldID);
		}
		finally
		{
			CheckException();
		}
	}

	public static double GetDoubleField(IntPtr obj, IntPtr fieldID)
	{
		try
		{
			return AndroidJNI.GetDoubleField(obj, fieldID);
		}
		finally
		{
			CheckException();
		}
	}

	public static float GetFloatField(IntPtr obj, IntPtr fieldID)
	{
		try
		{
			return AndroidJNI.GetFloatField(obj, fieldID);
		}
		finally
		{
			CheckException();
		}
	}

	public static long GetLongField(IntPtr obj, IntPtr fieldID)
	{
		try
		{
			return AndroidJNI.GetLongField(obj, fieldID);
		}
		finally
		{
			CheckException();
		}
	}

	public static short GetShortField(IntPtr obj, IntPtr fieldID)
	{
		try
		{
			return AndroidJNI.GetShortField(obj, fieldID);
		}
		finally
		{
			CheckException();
		}
	}

	public static sbyte GetSByteField(IntPtr obj, IntPtr fieldID)
	{
		try
		{
			return AndroidJNI.GetSByteField(obj, fieldID);
		}
		finally
		{
			CheckException();
		}
	}

	public static bool GetBooleanField(IntPtr obj, IntPtr fieldID)
	{
		try
		{
			return AndroidJNI.GetBooleanField(obj, fieldID);
		}
		finally
		{
			CheckException();
		}
	}

	public static int GetIntField(IntPtr obj, IntPtr fieldID)
	{
		try
		{
			return AndroidJNI.GetIntField(obj, fieldID);
		}
		finally
		{
			CheckException();
		}
	}

	public static void CallVoidMethod(IntPtr obj, IntPtr methodID, jvalue[] args)
	{
		try
		{
			AndroidJNI.CallVoidMethod(obj, methodID, args);
		}
		finally
		{
			CheckException();
		}
	}

	public static IntPtr CallObjectMethod(IntPtr obj, IntPtr methodID, jvalue[] args)
	{
		try
		{
			return AndroidJNI.CallObjectMethod(obj, methodID, args);
		}
		finally
		{
			CheckException();
		}
	}

	public static string CallStringMethod(IntPtr obj, IntPtr methodID, jvalue[] args)
	{
		try
		{
			return AndroidJNI.CallStringMethod(obj, methodID, args);
		}
		finally
		{
			CheckException();
		}
	}

	public static char CallCharMethod(IntPtr obj, IntPtr methodID, jvalue[] args)
	{
		try
		{
			return AndroidJNI.CallCharMethod(obj, methodID, args);
		}
		finally
		{
			CheckException();
		}
	}

	public static double CallDoubleMethod(IntPtr obj, IntPtr methodID, jvalue[] args)
	{
		try
		{
			return AndroidJNI.CallDoubleMethod(obj, methodID, args);
		}
		finally
		{
			CheckException();
		}
	}

	public static float CallFloatMethod(IntPtr obj, IntPtr methodID, jvalue[] args)
	{
		try
		{
			return AndroidJNI.CallFloatMethod(obj, methodID, args);
		}
		finally
		{
			CheckException();
		}
	}

	public static long CallLongMethod(IntPtr obj, IntPtr methodID, jvalue[] args)
	{
		try
		{
			return AndroidJNI.CallLongMethod(obj, methodID, args);
		}
		finally
		{
			CheckException();
		}
	}

	public static short CallShortMethod(IntPtr obj, IntPtr methodID, jvalue[] args)
	{
		try
		{
			return AndroidJNI.CallShortMethod(obj, methodID, args);
		}
		finally
		{
			CheckException();
		}
	}

	public static sbyte CallSByteMethod(IntPtr obj, IntPtr methodID, jvalue[] args)
	{
		try
		{
			return AndroidJNI.CallSByteMethod(obj, methodID, args);
		}
		finally
		{
			CheckException();
		}
	}

	public static bool CallBooleanMethod(IntPtr obj, IntPtr methodID, jvalue[] args)
	{
		try
		{
			return AndroidJNI.CallBooleanMethod(obj, methodID, args);
		}
		finally
		{
			C

Room Architect Tool_Data/Managed/UnityEngine.AnimationModule.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
using Unity.Jobs.LowLevel.Unsafe;
using UnityEngine;
using UnityEngine.Animations;
using UnityEngine.Bindings;
using UnityEngine.Internal;
using UnityEngine.Playables;
using UnityEngine.Scripting;
using UnityEngine.Scripting.APIUpdating;

[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine.Animations
{
	public static class AnimationPlayableBinding
	{
		public static PlayableBinding Create(string name, Object key)
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Expected O, but got Unknown
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			return PlayableBinding.CreateInternal(name, key, typeof(Animator), new CreateOutputMethod(CreateAnimationOutput));
		}

		private static PlayableOutput CreateAnimationOutput(PlayableGraph graph, string name)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			return AnimationPlayableOutput.Create(graph, name, null);
		}
	}
}
namespace UnityEngine.Playables
{
	public static class AnimationPlayableUtilities
	{
		public static void Play(Animator animator, Playable playable, PlayableGraph graph)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			AnimationPlayableOutput animationPlayableOutput = AnimationPlayableOutput.Create(graph, "AnimationClip", animator);
			PlayableOutputExtensions.SetSourcePlayable<AnimationPlayableOutput, Playable>(animationPlayableOutput, playable);
			PlayableOutputExtensions.SetSourceOutputPort<AnimationPlayableOutput>(animationPlayableOutput, 0);
			graph.SyncUpdateAndTimeMode(animator);
			((PlayableGraph)(ref graph)).Play();
		}

		public static AnimationClipPlayable PlayClip(Animator animator, AnimationClip clip, out PlayableGraph graph)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			graph = PlayableGraph.Create();
			AnimationPlayableOutput animationPlayableOutput = AnimationPlayableOutput.Create(graph, "AnimationClip", animator);
			AnimationClipPlayable animationClipPlayable = AnimationClipPlayable.Create(graph, clip);
			PlayableOutputExtensions.SetSourcePlayable<AnimationPlayableOutput, AnimationClipPlayable>(animationPlayableOutput, animationClipPlayable);
			graph.SyncUpdateAndTimeMode(animator);
			((PlayableGraph)(ref graph)).Play();
			return animationClipPlayable;
		}

		public static AnimationMixerPlayable PlayMixer(Animator animator, int inputCount, out PlayableGraph graph)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			graph = PlayableGraph.Create();
			AnimationPlayableOutput animationPlayableOutput = AnimationPlayableOutput.Create(graph, "Mixer", animator);
			AnimationMixerPlayable animationMixerPlayable = AnimationMixerPlayable.Create(graph, inputCount);
			PlayableOutputExtensions.SetSourcePlayable<AnimationPlayableOutput, AnimationMixerPlayable>(animationPlayableOutput, animationMixerPlayable);
			graph.SyncUpdateAndTimeMode(animator);
			((PlayableGraph)(ref graph)).Play();
			return animationMixerPlayable;
		}

		public static AnimationLayerMixerPlayable PlayLayerMixer(Animator animator, int inputCount, out PlayableGraph graph)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			graph = PlayableGraph.Create();
			AnimationPlayableOutput animationPlayableOutput = AnimationPlayableOutput.Create(graph, "Mixer", animator);
			AnimationLayerMixerPlayable animationLayerMixerPlayable = AnimationLayerMixerPlayable.Create(graph, inputCount);
			PlayableOutputExtensions.SetSourcePlayable<AnimationPlayableOutput, AnimationLayerMixerPlayable>(animationPlayableOutput, animationLayerMixerPlayable);
			graph.SyncUpdateAndTimeMode(animator);
			((PlayableGraph)(ref graph)).Play();
			return animationLayerMixerPlayable;
		}

		public static AnimatorControllerPlayable PlayAnimatorController(Animator animator, RuntimeAnimatorController controller, out PlayableGraph graph)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			graph = PlayableGraph.Create();
			AnimationPlayableOutput animationPlayableOutput = AnimationPlayableOutput.Create(graph, "AnimatorControllerPlayable", animator);
			AnimatorControllerPlayable animatorControllerPlayable = AnimatorControllerPlayable.Create(graph, controller);
			PlayableOutputExtensions.SetSourcePlayable<AnimationPlayableOutput, AnimatorControllerPlayable>(animationPlayableOutput, animatorControllerPlayable);
			graph.SyncUpdateAndTimeMode(animator);
			((PlayableGraph)(ref graph)).Play();
			return animatorControllerPlayable;
		}
	}
}
namespace UnityEngine
{
	public interface IAnimationClipSource
	{
		void GetAnimationClips(List<AnimationClip> results);
	}
}
namespace UnityEngine.Experimental.Animations
{
	[JobProducerType(typeof(ProcessAnimationJobStruct<>))]
	public interface IAnimationJob
	{
		void ProcessAnimation(AnimationStream stream);

		void ProcessRootMotion(AnimationStream stream);
	}
	public interface IAnimationJobPlayable : IPlayable
	{
		T GetJobData<T>() where T : struct, IAnimationJob;

		void SetJobData<T>(T jobData) where T : struct, IAnimationJob;
	}
	public interface IAnimationWindowPreview
	{
		void StartPreview();

		void StopPreview();

		void UpdatePreviewGraph(PlayableGraph graph);

		Playable BuildPreviewGraph(PlayableGraph graph, Playable inputPlayable);
	}
}
namespace UnityEngine.Animations
{
	[RequiredByNativeCode]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Field)]
	public class NotKeyableAttribute : Attribute
	{
	}
}
namespace UnityEngine.Experimental.Animations
{
	internal enum JobMethodIndex
	{
		ProcessRootMotionMethodIndex,
		ProcessAnimationMethodIndex,
		MethodIndexCount
	}
	[StructLayout(LayoutKind.Sequential, Size = 1)]
	internal struct ProcessAnimationJobStruct<T> where T : struct, IAnimationJob
	{
		public delegate void ExecuteJobFunction(ref T data, IntPtr animationStreamPtr, IntPtr unusedPtr, ref JobRanges ranges, int jobIndex);

		private static IntPtr jobReflectionData;

		public static IntPtr GetJobReflectionData()
		{
			if (jobReflectionData == IntPtr.Zero)
			{
				jobReflectionData = JobsUtility.CreateJobReflectionData(typeof(T), (JobType)0, (object)new ExecuteJobFunction(Execute), (object)null, (object)null);
			}
			return jobReflectionData;
		}

		public unsafe static void Execute(ref T data, IntPtr animationStreamPtr, IntPtr methodIndex, ref JobRanges ranges, int jobIndex)
		{
			AnimationStream stream = default(AnimationStream);
			UnsafeUtility.CopyPtrToStructure<AnimationStream>((void*)animationStreamPtr, ref stream);
			switch ((JobMethodIndex)methodIndex.ToInt32())
			{
			case JobMethodIndex.ProcessRootMotionMethodIndex:
				data.ProcessRootMotion(stream);
				break;
			case JobMethodIndex.ProcessAnimationMethodIndex:
				data.ProcessAnimation(stream);
				break;
			default:
				throw new NotImplementedException("Invalid Animation jobs method index.");
			}
		}
	}
}
namespace UnityEngine
{
	[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
	[RequiredByNativeCode]
	public sealed class SharedBetweenAnimatorsAttribute : Attribute
	{
	}
	[RequiredByNativeCode]
	public abstract class StateMachineBehaviour : ScriptableObject
	{
		public virtual void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
		{
		}

		public virtual void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
		{
		}

		public virtual void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
		{
		}

		public virtual void OnStateMove(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
		{
		}

		public virtual void OnStateIK(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
		{
		}

		public virtual void OnStateMachineEnter(Animator animator, int stateMachinePathHash)
		{
		}

		public virtual void OnStateMachineExit(Animator animator, int stateMachinePathHash)
		{
		}

		public virtual void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex, AnimatorControllerPlayable controller)
		{
		}

		public virtual void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex, AnimatorControllerPlayable controller)
		{
		}

		public virtual void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex, AnimatorControllerPlayable controller)
		{
		}

		public virtual void OnStateMove(Animator animator, AnimatorStateInfo stateInfo, int layerIndex, AnimatorControllerPlayable controller)
		{
		}

		public virtual void OnStateIK(Animator animator, AnimatorStateInfo stateInfo, int layerIndex, AnimatorControllerPlayable controller)
		{
		}

		public virtual void OnStateMachineEnter(Animator animator, int stateMachinePathHash, AnimatorControllerPlayable controller)
		{
		}

		public virtual void OnStateMachineExit(Animator animator, int stateMachinePathHash, AnimatorControllerPlayable controller)
		{
		}
	}
}
namespace UnityEngine.Animations
{
	[UsedByNativeCode]
	[RequireComponent(typeof(Transform))]
	[NativeHeader("Modules/Animation/Constraints/AimConstraint.h")]
	[NativeHeader("Modules/Animation/Constraints/Constraint.bindings.h")]
	public sealed class AimConstraint : Behaviour, IConstraint, IConstraintInternal
	{
		public enum WorldUpType
		{
			SceneUp,
			ObjectUp,
			ObjectRotationUp,
			Vector,
			None
		}

		public extern float weight
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool constraintActive
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool locked
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public Vector3 rotationAtRest
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_rotationAtRest_Injected(out var ret);
				return ret;
			}
			set
			{
				set_rotationAtRest_Injected(ref value);
			}
		}

		public Vector3 rotationOffset
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_rotationOffset_Injected(out var ret);
				return ret;
			}
			set
			{
				set_rotationOffset_Injected(ref value);
			}
		}

		public extern Axis rotationAxis
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public Vector3 aimVector
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_aimVector_Injected(out var ret);
				return ret;
			}
			set
			{
				set_aimVector_Injected(ref value);
			}
		}

		public Vector3 upVector
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_upVector_Injected(out var ret);
				return ret;
			}
			set
			{
				set_upVector_Injected(ref value);
			}
		}

		public Vector3 worldUpVector
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_worldUpVector_Injected(out var ret);
				return ret;
			}
			set
			{
				set_worldUpVector_Injected(ref value);
			}
		}

		public extern Transform worldUpObject
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern WorldUpType worldUpType
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public int sourceCount => GetSourceCountInternal(this);

		private AimConstraint()
		{
			Internal_Create(this);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void Internal_Create([Writable] AimConstraint self);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("ConstraintBindings::GetSourceCount")]
		private static extern int GetSourceCountInternal([NotNull] AimConstraint self);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "ConstraintBindings::GetSources", HasExplicitThis = true)]
		public extern void GetSources([NotNull] List<ConstraintSource> sources);

		public void SetSources(List<ConstraintSource> sources)
		{
			if (sources == null)
			{
				throw new ArgumentNullException("sources");
			}
			SetSourcesInternal(this, sources);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("ConstraintBindings::SetSources")]
		private static extern void SetSourcesInternal([NotNull] AimConstraint self, List<ConstraintSource> sources);

		public int AddSource(ConstraintSource source)
		{
			return AddSource_Injected(ref source);
		}

		public void RemoveSource(int index)
		{
			ValidateSourceIndex(index);
			RemoveSourceInternal(index);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("RemoveSource")]
		private extern void RemoveSourceInternal(int index);

		public ConstraintSource GetSource(int index)
		{
			ValidateSourceIndex(index);
			return GetSourceInternal(index);
		}

		[NativeName("GetSource")]
		private ConstraintSource GetSourceInternal(int index)
		{
			GetSourceInternal_Injected(index, out var ret);
			return ret;
		}

		public void SetSource(int index, ConstraintSource source)
		{
			ValidateSourceIndex(index);
			SetSourceInternal(index, source);
		}

		[NativeName("SetSource")]
		private void SetSourceInternal(int index, ConstraintSource source)
		{
			SetSourceInternal_Injected(index, ref source);
		}

		private void ValidateSourceIndex(int index)
		{
			if (sourceCount == 0)
			{
				throw new InvalidOperationException("The AimConstraint component has no sources.");
			}
			if (index < 0 || index >= sourceCount)
			{
				throw new ArgumentOutOfRangeException("index", $"Constraint source index {index} is out of bounds (0-{sourceCount}).");
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_rotationAtRest_Injected(out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void set_rotationAtRest_Injected(ref Vector3 value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_rotationOffset_Injected(out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void set_rotationOffset_Injected(ref Vector3 value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_aimVector_Injected(out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void set_aimVector_Injected(ref Vector3 value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_upVector_Injected(out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void set_upVector_Injected(ref Vector3 value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_worldUpVector_Injected(out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void set_worldUpVector_Injected(ref Vector3 value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern int AddSource_Injected(ref ConstraintSource source);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void GetSourceInternal_Injected(int index, out ConstraintSource ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void SetSourceInternal_Injected(int index, ref ConstraintSource source);
	}
}
namespace UnityEngine
{
	[NativeHeader("Modules/Animation/ScriptBindings/AnimationClip.bindings.h")]
	[NativeType("Modules/Animation/AnimationClip.h")]
	public sealed class AnimationClip : Motion
	{
		[NativeProperty(/*Could not decode attribute arguments.*/)]
		public extern float length
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		internal extern float startTime
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		internal extern float stopTime
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		public extern float frameRate
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		public extern WrapMode wrapMode
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		public Bounds localBounds
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_localBounds_Injected(out var ret);
				return ret;
			}
			set
			{
				set_localBounds_Injected(ref value);
			}
		}

		public new extern bool legacy
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("IsLegacy")]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("SetLegacy")]
			set;
		}

		public extern bool humanMotion
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("IsHumanMotion")]
			get;
		}

		public extern bool empty
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("IsEmpty")]
			get;
		}

		public extern bool hasGenericRootTransform
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("HasGenericRootTransform")]
			get;
		}

		public extern bool hasMotionFloatCurves
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("HasMotionFloatCurves")]
			get;
		}

		public extern bool hasMotionCurves
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("HasMotionCurves")]
			get;
		}

		public extern bool hasRootCurves
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("HasRootCurves")]
			get;
		}

		internal extern bool hasRootMotion
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction(Name = "AnimationClipBindings::Internal_GetHasRootMotion", HasExplicitThis = true)]
			get;
		}

		public AnimationEvent[] events
		{
			get
			{
				return (AnimationEvent[])GetEventsInternal();
			}
			set
			{
				SetEventsInternal(value);
			}
		}

		public AnimationClip()
		{
			Internal_CreateAnimationClip(this);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("AnimationClipBindings::Internal_CreateAnimationClip")]
		private static extern void Internal_CreateAnimationClip([Writable] AnimationClip self);

		public void SampleAnimation(GameObject go, float time)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			SampleAnimation(go, this, time, wrapMode);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction]
		[NativeHeader("Modules/Animation/AnimationUtility.h")]
		internal static extern void SampleAnimation([NotNull] GameObject go, [NotNull] AnimationClip clip, float inTime, WrapMode wrapMode);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("AnimationClipBindings::Internal_SetCurve", HasExplicitThis = true)]
		public extern void SetCurve([NotNull] string relativePath, Type type, [NotNull] string propertyName, AnimationCurve curve);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void EnsureQuaternionContinuity();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void ClearCurves();

		public void AddEvent(AnimationEvent evt)
		{
			if (evt == null)
			{
				throw new ArgumentNullException("evt");
			}
			AddEventInternal(evt);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		internal extern void AddEventInternal(object evt);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		internal extern void SetEventsInternal(Array value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		internal extern Array GetEventsInternal();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_localBounds_Injected(out Bounds ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void set_localBounds_Injected(ref Bounds value);
	}
}
namespace UnityEngine.Animations
{
	[RequiredByNativeCode]
	[NativeHeader("Modules/Animation/ScriptBindings/AnimationClipPlayable.bindings.h")]
	[NativeHeader("Modules/Animation/Director/AnimationClipPlayable.h")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	public struct AnimationClipPlayable : IPlayable, IEquatable<AnimationClipPlayable>
	{
		private PlayableHandle m_Handle;

		internal AnimationClipPlayable(PlayableHandle handle)
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			if (((PlayableHandle)(ref handle)).IsValid() && !((PlayableHandle)(ref handle)).IsPlayableOfType<AnimationClipPlayable>())
			{
				throw new InvalidCastException("Can't set handle: the playable is not an AnimationClipPlayable.");
			}
			m_Handle = handle;
		}

		public static AnimationClipPlayable Create(PlayableGraph graph, AnimationClip clip)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			PlayableHandle handle = CreateHandle(graph, clip);
			return new AnimationClipPlayable(handle);
		}

		private static PlayableHandle CreateHandle(PlayableGraph graph, AnimationClip clip)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			PlayableHandle handle = PlayableHandle.Null;
			if (!CreateHandleInternal(graph, clip, ref handle))
			{
				return PlayableHandle.Null;
			}
			return handle;
		}

		public PlayableHandle GetHandle()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			return m_Handle;
		}

		public static implicit operator Playable(AnimationClipPlayable playable)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			return new Playable(playable.GetHandle());
		}

		public static explicit operator AnimationClipPlayable(Playable playable)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			return new AnimationClipPlayable(((Playable)(ref playable)).GetHandle());
		}

		public bool Equals(AnimationClipPlayable other)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			return GetHandle() == other.GetHandle();
		}

		public AnimationClip GetAnimationClip()
		{
			return GetAnimationClipInternal(ref m_Handle);
		}

		public bool GetApplyFootIK()
		{
			return GetApplyFootIKInternal(ref m_Handle);
		}

		public void SetApplyFootIK(bool value)
		{
			SetApplyFootIKInternal(ref m_Handle, value);
		}

		public bool GetApplyPlayableIK()
		{
			return GetApplyPlayableIKInternal(ref m_Handle);
		}

		public void SetApplyPlayableIK(bool value)
		{
			SetApplyPlayableIKInternal(ref m_Handle, value);
		}

		internal bool GetRemoveStartOffset()
		{
			return GetRemoveStartOffsetInternal(ref m_Handle);
		}

		internal void SetRemoveStartOffset(bool value)
		{
			SetRemoveStartOffsetInternal(ref m_Handle, value);
		}

		internal bool GetOverrideLoopTime()
		{
			return GetOverrideLoopTimeInternal(ref m_Handle);
		}

		internal void SetOverrideLoopTime(bool value)
		{
			SetOverrideLoopTimeInternal(ref m_Handle, value);
		}

		internal bool GetLoopTime()
		{
			return GetLoopTimeInternal(ref m_Handle);
		}

		internal void SetLoopTime(bool value)
		{
			SetLoopTimeInternal(ref m_Handle, value);
		}

		internal float GetSampleRate()
		{
			return GetSampleRateInternal(ref m_Handle);
		}

		internal void SetSampleRate(float value)
		{
			SetSampleRateInternal(ref m_Handle, value);
		}

		[NativeThrows]
		private static bool CreateHandleInternal(PlayableGraph graph, AnimationClip clip, ref PlayableHandle handle)
		{
			return CreateHandleInternal_Injected(ref graph, clip, ref handle);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern AnimationClip GetAnimationClipInternal(ref PlayableHandle handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern bool GetApplyFootIKInternal(ref PlayableHandle handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern void SetApplyFootIKInternal(ref PlayableHandle handle, bool value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern bool GetApplyPlayableIKInternal(ref PlayableHandle handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern void SetApplyPlayableIKInternal(ref PlayableHandle handle, bool value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern bool GetRemoveStartOffsetInternal(ref PlayableHandle handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern void SetRemoveStartOffsetInternal(ref PlayableHandle handle, bool value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern bool GetOverrideLoopTimeInternal(ref PlayableHandle handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern void SetOverrideLoopTimeInternal(ref PlayableHandle handle, bool value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern bool GetLoopTimeInternal(ref PlayableHandle handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern void SetLoopTimeInternal(ref PlayableHandle handle, bool value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern float GetSampleRateInternal(ref PlayableHandle handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern void SetSampleRateInternal(ref PlayableHandle handle, float value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool CreateHandleInternal_Injected(ref PlayableGraph graph, AnimationClip clip, ref PlayableHandle handle);
	}
}
namespace UnityEngine.Experimental.Animations
{
	[NativeHeader("Modules/Animation/Director/AnimationHumanStream.h")]
	[RequiredByNativeCode]
	[NativeHeader("Modules/Animation/ScriptBindings/AnimationHumanStream.bindings.h")]
	public struct AnimationHumanStream
	{
		private IntPtr stream;

		public bool isValid => stream != IntPtr.Zero;

		public float humanScale
		{
			get
			{
				ThrowIfInvalid();
				return GetHumanScale();
			}
		}

		public float leftFootHeight
		{
			get
			{
				ThrowIfInvalid();
				return GetFootHeight(left: true);
			}
		}

		public float rightFootHeight
		{
			get
			{
				ThrowIfInvalid();
				return GetFootHeight(left: false);
			}
		}

		public Vector3 bodyLocalPosition
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				ThrowIfInvalid();
				return InternalGetBodyLocalPosition();
			}
			set
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				ThrowIfInvalid();
				InternalSetBodyLocalPosition(value);
			}
		}

		public Quaternion bodyLocalRotation
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				ThrowIfInvalid();
				return InternalGetBodyLocalRotation();
			}
			set
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				ThrowIfInvalid();
				InternalSetBodyLocalRotation(value);
			}
		}

		public Vector3 bodyPosition
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				ThrowIfInvalid();
				return InternalGetBodyPosition();
			}
			set
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				ThrowIfInvalid();
				InternalSetBodyPosition(value);
			}
		}

		public Quaternion bodyRotation
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				ThrowIfInvalid();
				return InternalGetBodyRotation();
			}
			set
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				ThrowIfInvalid();
				InternalSetBodyRotation(value);
			}
		}

		public Vector3 leftFootVelocity
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				ThrowIfInvalid();
				return GetLeftFootVelocity();
			}
		}

		public Vector3 rightFootVelocity
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				ThrowIfInvalid();
				return GetRightFootVelocity();
			}
		}

		private void ThrowIfInvalid()
		{
			if (!isValid)
			{
				throw new InvalidOperationException("The AnimationHumanStream is invalid.");
			}
		}

		public float GetMuscle(MuscleHandle muscle)
		{
			ThrowIfInvalid();
			return InternalGetMuscle(muscle);
		}

		public void SetMuscle(MuscleHandle muscle, float value)
		{
			ThrowIfInvalid();
			InternalSetMuscle(muscle, value);
		}

		public void ResetToStancePose()
		{
			ThrowIfInvalid();
			InternalResetToStancePose();
		}

		public Vector3 GetGoalPositionFromPose(AvatarIKGoal index)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			ThrowIfInvalid();
			return InternalGetGoalPositionFromPose(index);
		}

		public Quaternion GetGoalRotationFromPose(AvatarIKGoal index)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			ThrowIfInvalid();
			return InternalGetGoalRotationFromPose(index);
		}

		public Vector3 GetGoalLocalPosition(AvatarIKGoal index)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			ThrowIfInvalid();
			return InternalGetGoalLocalPosition(index);
		}

		public void SetGoalLocalPosition(AvatarIKGoal index, Vector3 pos)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			ThrowIfInvalid();
			InternalSetGoalLocalPosition(index, pos);
		}

		public Quaternion GetGoalLocalRotation(AvatarIKGoal index)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			ThrowIfInvalid();
			return InternalGetGoalLocalRotation(index);
		}

		public void SetGoalLocalRotation(AvatarIKGoal index, Quaternion rot)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			ThrowIfInvalid();
			InternalSetGoalLocalRotation(index, rot);
		}

		public Vector3 GetGoalPosition(AvatarIKGoal index)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			ThrowIfInvalid();
			return InternalGetGoalPosition(index);
		}

		public void SetGoalPosition(AvatarIKGoal index, Vector3 pos)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			ThrowIfInvalid();
			InternalSetGoalPosition(index, pos);
		}

		public Quaternion GetGoalRotation(AvatarIKGoal index)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			ThrowIfInvalid();
			return InternalGetGoalRotation(index);
		}

		public void SetGoalRotation(AvatarIKGoal index, Quaternion rot)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			ThrowIfInvalid();
			InternalSetGoalRotation(index, rot);
		}

		public void SetGoalWeightPosition(AvatarIKGoal index, float value)
		{
			ThrowIfInvalid();
			InternalSetGoalWeightPosition(index, value);
		}

		public void SetGoalWeightRotation(AvatarIKGoal index, float value)
		{
			ThrowIfInvalid();
			InternalSetGoalWeightRotation(index, value);
		}

		public float GetGoalWeightPosition(AvatarIKGoal index)
		{
			ThrowIfInvalid();
			return InternalGetGoalWeightPosition(index);
		}

		public float GetGoalWeightRotation(AvatarIKGoal index)
		{
			ThrowIfInvalid();
			return InternalGetGoalWeightRotation(index);
		}

		public Vector3 GetHintPosition(AvatarIKHint index)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			ThrowIfInvalid();
			return InternalGetHintPosition(index);
		}

		public void SetHintPosition(AvatarIKHint index, Vector3 pos)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			ThrowIfInvalid();
			InternalSetHintPosition(index, pos);
		}

		public void SetHintWeightPosition(AvatarIKHint index, float value)
		{
			ThrowIfInvalid();
			InternalSetHintWeightPosition(index, value);
		}

		public float GetHintWeightPosition(AvatarIKHint index)
		{
			ThrowIfInvalid();
			return InternalGetHintWeightPosition(index);
		}

		public void SetLookAtPosition(Vector3 lookAtPosition)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			ThrowIfInvalid();
			InternalSetLookAtPosition(lookAtPosition);
		}

		public void SetLookAtClampWeight(float weight)
		{
			ThrowIfInvalid();
			InternalSetLookAtClampWeight(weight);
		}

		public void SetLookAtBodyWeight(float weight)
		{
			ThrowIfInvalid();
			InternalSetLookAtBodyWeight(weight);
		}

		public void SetLookAtHeadWeight(float weight)
		{
			ThrowIfInvalid();
			InternalSetLookAtHeadWeight(weight);
		}

		public void SetLookAtEyesWeight(float weight)
		{
			ThrowIfInvalid();
			InternalSetLookAtEyesWeight(weight);
		}

		public void SolveIK()
		{
			ThrowIfInvalid();
			InternalSolveIK();
		}

		[NativeMethod(IsThreadSafe = true)]
		private float GetHumanScale()
		{
			return GetHumanScale_Injected(ref this);
		}

		[NativeMethod(IsThreadSafe = true)]
		private float GetFootHeight(bool left)
		{
			return GetFootHeight_Injected(ref this, left);
		}

		[NativeMethod(Name = "ResetToStancePose", IsThreadSafe = true)]
		private void InternalResetToStancePose()
		{
			InternalResetToStancePose_Injected(ref this);
		}

		[NativeMethod(Name = "AnimationHumanStreamBindings::GetGoalPositionFromPose", IsFreeFunction = true, IsThreadSafe = true, HasExplicitThis = true)]
		private Vector3 InternalGetGoalPositionFromPose(AvatarIKGoal index)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			InternalGetGoalPositionFromPose_Injected(ref this, index, out var ret);
			return ret;
		}

		[NativeMethod(Name = "AnimationHumanStreamBindings::GetGoalRotationFromPose", IsFreeFunction = true, IsThreadSafe = true, HasExplicitThis = true)]
		private Quaternion InternalGetGoalRotationFromPose(AvatarIKGoal index)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			InternalGetGoalRotationFromPose_Injected(ref this, index, out var ret);
			return ret;
		}

		[NativeMethod(Name = "AnimationHumanStreamBindings::GetBodyLocalPosition", IsFreeFunction = true, IsThreadSafe = true, HasExplicitThis = true)]
		private Vector3 InternalGetBodyLocalPosition()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			InternalGetBodyLocalPosition_Injected(ref this, out var ret);
			return ret;
		}

		[NativeMethod(Name = "AnimationHumanStreamBindings::SetBodyLocalPosition", IsFreeFunction = true, IsThreadSafe = true, HasExplicitThis = true)]
		private void InternalSetBodyLocalPosition(Vector3 value)
		{
			InternalSetBodyLocalPosition_Injected(ref this, ref value);
		}

		[NativeMethod(Name = "AnimationHumanStreamBindings::GetBodyLocalRotation", IsFreeFunction = true, IsThreadSafe = true, HasExplicitThis = true)]
		private Quaternion InternalGetBodyLocalRotation()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			InternalGetBodyLocalRotation_Injected(ref this, out var ret);
			return ret;
		}

		[NativeMethod(Name = "AnimationHumanStreamBindings::SetBodyLocalRotation", IsFreeFunction = true, IsThreadSafe = true, HasExplicitThis = true)]
		private void InternalSetBodyLocalRotation(Quaternion value)
		{
			InternalSetBodyLocalRotation_Injected(ref this, ref value);
		}

		[NativeMethod(Name = "AnimationHumanStreamBindings::GetBodyPosition", IsFreeFunction = true, IsThreadSafe = true, HasExplicitThis = true)]
		private Vector3 InternalGetBodyPosition()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			InternalGetBodyPosition_Injected(ref this, out var ret);
			return ret;
		}

		[NativeMethod(Name = "AnimationHumanStreamBindings::SetBodyPosition", IsFreeFunction = true, IsThreadSafe = true, HasExplicitThis = true)]
		private void InternalSetBodyPosition(Vector3 value)
		{
			InternalSetBodyPosition_Injected(ref this, ref value);
		}

		[NativeMethod(Name = "AnimationHumanStreamBindings::GetBodyRotation", IsFreeFunction = true, IsThreadSafe = true, HasExplicitThis = true)]
		private Quaternion InternalGetBodyRotation()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			InternalGetBodyRotation_Injected(ref this, out var ret);
			return ret;
		}

		[NativeMethod(Name = "AnimationHumanStreamBindings::SetBodyRotation", IsFreeFunction = true, IsThreadSafe = true, HasExplicitThis = true)]
		private void InternalSetBodyRotation(Quaternion value)
		{
			InternalSetBodyRotation_Injected(ref this, ref value);
		}

		[NativeMethod(Name = "GetMuscle", IsThreadSafe = true)]
		private float InternalGetMuscle(MuscleHandle muscle)
		{
			return InternalGetMuscle_Injected(ref this, ref muscle);
		}

		[NativeMethod(Name = "SetMuscle", IsThreadSafe = true)]
		private void InternalSetMuscle(MuscleHandle muscle, float value)
		{
			InternalSetMuscle_Injected(ref this, ref muscle, value);
		}

		[NativeMethod(Name = "AnimationHumanStreamBindings::GetLeftFootVelocity", IsFreeFunction = true, IsThreadSafe = true, HasExplicitThis = true)]
		private Vector3 GetLeftFootVelocity()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			GetLeftFootVelocity_Injected(ref this, out var ret);
			return ret;
		}

		[NativeMethod(Name = "AnimationHumanStreamBindings::GetRightFootVelocity", IsFreeFunction = true, IsThreadSafe = true, HasExplicitThis = true)]
		private Vector3 GetRightFootVelocity()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			GetRightFootVelocity_Injected(ref this, out var ret);
			return ret;
		}

		[NativeMethod(Name = "AnimationHumanStreamBindings::GetGoalLocalPosition", IsFreeFunction = true, IsThreadSafe = true, HasExplicitThis = true)]
		private Vector3 InternalGetGoalLocalPosition(AvatarIKGoal index)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			InternalGetGoalLocalPosition_Injected(ref this, index, out var ret);
			return ret;
		}

		[NativeMethod(Name = "AnimationHumanStreamBindings::SetGoalLocalPosition", IsFreeFunction = true, IsThreadSafe = true, HasExplicitThis = true)]
		private void InternalSetGoalLocalPosition(AvatarIKGoal index, Vector3 pos)
		{
			InternalSetGoalLocalPosition_Injected(ref this, index, ref pos);
		}

		[NativeMethod(Name = "AnimationHumanStreamBindings::GetGoalLocalRotation", IsFreeFunction = true, IsThreadSafe = true, HasExplicitThis = true)]
		private Quaternion InternalGetGoalLocalRotation(AvatarIKGoal index)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			InternalGetGoalLocalRotation_Injected(ref this, index, out var ret);
			return ret;
		}

		[NativeMethod(Name = "AnimationHumanStreamBindings::SetGoalLocalRotation", IsFreeFunction = true, IsThreadSafe = true, HasExplicitThis = true)]
		private void InternalSetGoalLocalRotation(AvatarIKGoal index, Quaternion rot)
		{
			InternalSetGoalLocalRotation_Injected(ref this, index, ref rot);
		}

		[NativeMethod(Name = "AnimationHumanStreamBindings::GetGoalPosition", IsFreeFunction = true, IsThreadSafe = true, HasExplicitThis = true)]
		private Vector3 InternalGetGoalPosition(AvatarIKGoal index)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			InternalGetGoalPosition_Injected(ref this, index, out var ret);
			return ret;
		}

		[NativeMethod(Name = "AnimationHumanStreamBindings::SetGoalPosition", IsFreeFunction = true, IsThreadSafe = true, HasExplicitThis = true)]
		private void InternalSetGoalPosition(AvatarIKGoal index, Vector3 pos)
		{
			InternalSetGoalPosition_Injected(ref this, index, ref pos);
		}

		[NativeMethod(Name = "AnimationHumanStreamBindings::GetGoalRotation", IsFreeFunction = true, IsThreadSafe = true, HasExplicitThis = true)]
		private Quaternion InternalGetGoalRotation(AvatarIKGoal index)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			InternalGetGoalRotation_Injected(ref this, index, out var ret);
			return ret;
		}

		[NativeMethod(Name = "AnimationHumanStreamBindings::SetGoalRotation", IsFreeFunction = true, IsThreadSafe = true, HasExplicitThis = true)]
		private void InternalSetGoalRotation(AvatarIKGoal index, Quaternion rot)
		{
			InternalSetGoalRotation_Injected(ref this, index, ref rot);
		}

		[NativeMethod(Name = "SetGoalWeightPosition", IsThreadSafe = true)]
		private void InternalSetGoalWeightPosition(AvatarIKGoal index, float value)
		{
			InternalSetGoalWeightPosition_Injected(ref this, index, value);
		}

		[NativeMethod(Name = "SetGoalWeightRotation", IsThreadSafe = true)]
		private void InternalSetGoalWeightRotation(AvatarIKGoal index, float value)
		{
			InternalSetGoalWeightRotation_Injected(ref this, index, value);
		}

		[NativeMethod(Name = "GetGoalWeightPosition", IsThreadSafe = true)]
		private float InternalGetGoalWeightPosition(AvatarIKGoal index)
		{
			return InternalGetGoalWeightPosition_Injected(ref this, index);
		}

		[NativeMethod(Name = "GetGoalWeightRotation", IsThreadSafe = true)]
		private float InternalGetGoalWeightRotation(AvatarIKGoal index)
		{
			return InternalGetGoalWeightRotation_Injected(ref this, index);
		}

		[NativeMethod(Name = "AnimationHumanStreamBindings::GetHintPosition", IsFreeFunction = true, IsThreadSafe = true, HasExplicitThis = true)]
		private Vector3 InternalGetHintPosition(AvatarIKHint index)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			InternalGetHintPosition_Injected(ref this, index, out var ret);
			return ret;
		}

		[NativeMethod(Name = "AnimationHumanStreamBindings::SetHintPosition", IsFreeFunction = true, IsThreadSafe = true, HasExplicitThis = true)]
		private void InternalSetHintPosition(AvatarIKHint index, Vector3 pos)
		{
			InternalSetHintPosition_Injected(ref this, index, ref pos);
		}

		[NativeMethod(Name = "SetHintWeightPosition", IsThreadSafe = true)]
		private void InternalSetHintWeightPosition(AvatarIKHint index, float value)
		{
			InternalSetHintWeightPosition_Injected(ref this, index, value);
		}

		[NativeMethod(Name = "GetHintWeightPosition", IsThreadSafe = true)]
		private float InternalGetHintWeightPosition(AvatarIKHint index)
		{
			return InternalGetHintWeightPosition_Injected(ref this, index);
		}

		[NativeMethod(Name = "AnimationHumanStreamBindings::SetLookAtPosition", IsFreeFunction = true, IsThreadSafe = true, HasExplicitThis = true)]
		private void InternalSetLookAtPosition(Vector3 lookAtPosition)
		{
			InternalSetLookAtPosition_Injected(ref this, ref lookAtPosition);
		}

		[NativeMethod(Name = "SetLookAtClampWeight", IsThreadSafe = true)]
		private void InternalSetLookAtClampWeight(float weight)
		{
			InternalSetLookAtClampWeight_Injected(ref this, weight);
		}

		[NativeMethod(Name = "SetLookAtBodyWeight", IsThreadSafe = true)]
		private void InternalSetLookAtBodyWeight(float weight)
		{
			InternalSetLookAtBodyWeight_Injected(ref this, weight);
		}

		[NativeMethod(Name = "SetLookAtHeadWeight", IsThreadSafe = true)]
		private void InternalSetLookAtHeadWeight(float weight)
		{
			InternalSetLookAtHeadWeight_Injected(ref this, weight);
		}

		[NativeMethod(Name = "SetLookAtEyesWeight", IsThreadSafe = true)]
		private void InternalSetLookAtEyesWeight(float weight)
		{
			InternalSetLookAtEyesWeight_Injected(ref this, weight);
		}

		[NativeMethod(Name = "SolveIK", IsThreadSafe = true)]
		private void InternalSolveIK()
		{
			InternalSolveIK_Injected(ref this);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern float GetHumanScale_Injected(ref AnimationHumanStream _unity_self);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern float GetFootHeight_Injected(ref AnimationHumanStream _unity_self, bool left);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalResetToStancePose_Injected(ref AnimationHumanStream _unity_self);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalGetGoalPositionFromPose_Injected(ref AnimationHumanStream _unity_self, AvatarIKGoal index, out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalGetGoalRotationFromPose_Injected(ref AnimationHumanStream _unity_self, AvatarIKGoal index, out Quaternion ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalGetBodyLocalPosition_Injected(ref AnimationHumanStream _unity_self, out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalSetBodyLocalPosition_Injected(ref AnimationHumanStream _unity_self, ref Vector3 value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalGetBodyLocalRotation_Injected(ref AnimationHumanStream _unity_self, out Quaternion ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalSetBodyLocalRotation_Injected(ref AnimationHumanStream _unity_self, ref Quaternion value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalGetBodyPosition_Injected(ref AnimationHumanStream _unity_self, out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalSetBodyPosition_Injected(ref AnimationHumanStream _unity_self, ref Vector3 value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalGetBodyRotation_Injected(ref AnimationHumanStream _unity_self, out Quaternion ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalSetBodyRotation_Injected(ref AnimationHumanStream _unity_self, ref Quaternion value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern float InternalGetMuscle_Injected(ref AnimationHumanStream _unity_self, ref MuscleHandle muscle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalSetMuscle_Injected(ref AnimationHumanStream _unity_self, ref MuscleHandle muscle, float value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void GetLeftFootVelocity_Injected(ref AnimationHumanStream _unity_self, out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void GetRightFootVelocity_Injected(ref AnimationHumanStream _unity_self, out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalGetGoalLocalPosition_Injected(ref AnimationHumanStream _unity_self, AvatarIKGoal index, out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalSetGoalLocalPosition_Injected(ref AnimationHumanStream _unity_self, AvatarIKGoal index, ref Vector3 pos);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalGetGoalLocalRotation_Injected(ref AnimationHumanStream _unity_self, AvatarIKGoal index, out Quaternion ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalSetGoalLocalRotation_Injected(ref AnimationHumanStream _unity_self, AvatarIKGoal index, ref Quaternion rot);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalGetGoalPosition_Injected(ref AnimationHumanStream _unity_self, AvatarIKGoal index, out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalSetGoalPosition_Injected(ref AnimationHumanStream _unity_self, AvatarIKGoal index, ref Vector3 pos);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalGetGoalRotation_Injected(ref AnimationHumanStream _unity_self, AvatarIKGoal index, out Quaternion ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalSetGoalRotation_Injected(ref AnimationHumanStream _unity_self, AvatarIKGoal index, ref Quaternion rot);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalSetGoalWeightPosition_Injected(ref AnimationHumanStream _unity_self, AvatarIKGoal index, float value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalSetGoalWeightRotation_Injected(ref AnimationHumanStream _unity_self, AvatarIKGoal index, float value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern float InternalGetGoalWeightPosition_Injected(ref AnimationHumanStream _unity_self, AvatarIKGoal index);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern float InternalGetGoalWeightRotation_Injected(ref AnimationHumanStream _unity_self, AvatarIKGoal index);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalGetHintPosition_Injected(ref AnimationHumanStream _unity_self, AvatarIKHint index, out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalSetHintPosition_Injected(ref AnimationHumanStream _unity_self, AvatarIKHint index, ref Vector3 pos);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalSetHintWeightPosition_Injected(ref AnimationHumanStream _unity_self, AvatarIKHint index, float value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern float InternalGetHintWeightPosition_Injected(ref AnimationHumanStream _unity_self, AvatarIKHint index);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalSetLookAtPosition_Injected(ref AnimationHumanStream _unity_self, ref Vector3 lookAtPosition);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalSetLookAtClampWeight_Injected(ref AnimationHumanStream _unity_self, float weight);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalSetLookAtBodyWeight_Injected(ref AnimationHumanStream _unity_self, float weight);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalSetLookAtHeadWeight_Injected(ref AnimationHumanStream _unity_self, float weight);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalSetLookAtEyesWeight_Injected(ref AnimationHumanStream _unity_self, float weight);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalSolveIK_Injected(ref AnimationHumanStream _unity_self);
	}
}
namespace UnityEngine.Animations
{
	[NativeHeader("Runtime/Director/Core/HPlayable.h")]
	[NativeHeader("Modules/Animation/Director/AnimationLayerMixerPlayable.h")]
	[NativeHeader("Modules/Animation/ScriptBindings/AnimationLayerMixerPlayable.bindings.h")]
	[RequiredByNativeCode]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	public struct AnimationLayerMixerPlayable : IPlayable, IEquatable<AnimationLayerMixerPlayable>
	{
		private PlayableHandle m_Handle;

		private static readonly AnimationLayerMixerPlayable m_NullPlayable = new AnimationLayerMixerPlayable(PlayableHandle.Null);

		public static AnimationLayerMixerPlayable Null => m_NullPlayable;

		internal AnimationLayerMixerPlayable(PlayableHandle handle)
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			if (((PlayableHandle)(ref handle)).IsValid() && !((PlayableHandle)(ref handle)).IsPlayableOfType<AnimationLayerMixerPlayable>())
			{
				throw new InvalidCastException("Can't set handle: the playable is not an AnimationLayerMixerPlayable.");
			}
			m_Handle = handle;
		}

		public static AnimationLayerMixerPlayable Create(PlayableGraph graph, int inputCount = 0)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			PlayableHandle handle = CreateHandle(graph, inputCount);
			return new AnimationLayerMixerPlayable(handle);
		}

		private static PlayableHandle CreateHandle(PlayableGraph graph, int inputCount = 0)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			PlayableHandle handle = PlayableHandle.Null;
			if (!CreateHandleInternal(graph, ref handle))
			{
				return PlayableHandle.Null;
			}
			((PlayableHandle)(ref handle)).SetInputCount(inputCount);
			return handle;
		}

		public PlayableHandle GetHandle()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			return m_Handle;
		}

		public static implicit operator Playable(AnimationLayerMixerPlayable playable)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			return new Playable(playable.GetHandle());
		}

		public static explicit operator AnimationLayerMixerPlayable(Playable playable)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			return new AnimationLayerMixerPlayable(((Playable)(ref playable)).GetHandle());
		}

		public bool Equals(AnimationLayerMixerPlayable other)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			return GetHandle() == other.GetHandle();
		}

		public bool IsLayerAdditive(uint layerIndex)
		{
			if (layerIndex >= ((PlayableHandle)(ref m_Handle)).GetInputCount())
			{
				throw new ArgumentOutOfRangeException("layerIndex", $"layerIndex {layerIndex} must be in the range of 0 to {((PlayableHandle)(ref m_Handle)).GetInputCount() - 1}.");
			}
			return IsLayerAdditiveInternal(ref m_Handle, layerIndex);
		}

		public void SetLayerAdditive(uint layerIndex, bool value)
		{
			if (layerIndex >= ((PlayableHandle)(ref m_Handle)).GetInputCount())
			{
				throw new ArgumentOutOfRangeException("layerIndex", $"layerIndex {layerIndex} must be in the range of 0 to {((PlayableHandle)(ref m_Handle)).GetInputCount() - 1}.");
			}
			SetLayerAdditiveInternal(ref m_Handle, layerIndex, value);
		}

		public void SetLayerMaskFromAvatarMask(uint layerIndex, AvatarMask mask)
		{
			if (layerIndex >= ((PlayableHandle)(ref m_Handle)).GetInputCount())
			{
				throw new ArgumentOutOfRangeException("layerIndex", $"layerIndex {layerIndex} must be in the range of 0 to {((PlayableHandle)(ref m_Handle)).GetInputCount() - 1}.");
			}
			if ((Object)(object)mask == (Object)null)
			{
				throw new ArgumentNullException("mask");
			}
			SetLayerMaskFromAvatarMaskInternal(ref m_Handle, layerIndex, mask);
		}

		[NativeThrows]
		private static bool CreateHandleInternal(PlayableGraph graph, ref PlayableHandle handle)
		{
			return CreateHandleInternal_Injected(ref graph, ref handle);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern bool IsLayerAdditiveInternal(ref PlayableHandle handle, uint layerIndex);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern void SetLayerAdditiveInternal(ref PlayableHandle handle, uint layerIndex, bool value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern void SetLayerMaskFromAvatarMaskInternal(ref PlayableHandle handle, uint layerIndex, AvatarMask mask);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool CreateHandleInternal_Injected(ref PlayableGraph graph, ref PlayableHandle handle);
	}
	[NativeHeader("Runtime/Director/Core/HPlayable.h")]
	[NativeHeader("Modules/Animation/Director/AnimationMixerPlayable.h")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[RequiredByNativeCode]
	[NativeHeader("Modules/Animation/ScriptBindings/AnimationMixerPlayable.bindings.h")]
	public struct AnimationMixerPlayable : IPlayable, IEquatable<AnimationMixerPlayable>
	{
		private PlayableHandle m_Handle;

		private static readonly AnimationMixerPlayable m_NullPlayable = new AnimationMixerPlayable(PlayableHandle.Null);

		public static AnimationMixerPlayable Null => m_NullPlayable;

		internal AnimationMixerPlayable(PlayableHandle handle)
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			if (((PlayableHandle)(ref handle)).IsValid() && !((PlayableHandle)(ref handle)).IsPlayableOfType<AnimationMixerPlayable>())
			{
				throw new InvalidCastException("Can't set handle: the playable is not an AnimationMixerPlayable.");
			}
			m_Handle = handle;
		}

		public static AnimationMixerPlayable Create(PlayableGraph graph, int inputCount = 0, bool normalizeWeights = false)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			PlayableHandle handle = CreateHandle(graph, inputCount, normalizeWeights);
			return new AnimationMixerPlayable(handle);
		}

		private static PlayableHandle CreateHandle(PlayableGraph graph, int inputCount = 0, bool normalizeWeights = false)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			PlayableHandle handle = PlayableHandle.Null;
			if (!CreateHandleInternal(graph, normalizeWeights, ref handle))
			{
				return PlayableHandle.Null;
			}
			((PlayableHandle)(ref handle)).SetInputCount(inputCount);
			return handle;
		}

		public PlayableHandle GetHandle()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			return m_Handle;
		}

		public static implicit operator Playable(AnimationMixerPlayable playable)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			return new Playable(playable.GetHandle());
		}

		public static explicit operator AnimationMixerPlayable(Playable playable)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			return new AnimationMixerPlayable(((Playable)(ref playable)).GetHandle());
		}

		public bool Equals(AnimationMixerPlayable other)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			return GetHandle() == other.GetHandle();
		}

		[NativeThrows]
		private static bool CreateHandleInternal(PlayableGraph graph, bool normalizeWeights, ref PlayableHandle handle)
		{
			return CreateHandleInternal_Injected(ref graph, normalizeWeights, ref handle);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool CreateHandleInternal_Injected(ref PlayableGraph graph, bool normalizeWeights, ref PlayableHandle handle);
	}
	[RequiredByNativeCode]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeHeader("Modules/Animation/ScriptBindings/AnimationMotionXToDeltaPlayable.bindings.h")]
	internal struct AnimationMotionXToDeltaPlayable : IPlayable, IEquatable<AnimationMotionXToDeltaPlayable>
	{
		private PlayableHandle m_Handle;

		private static readonly AnimationMotionXToDeltaPlayable m_NullPlayable = new AnimationMotionXToDeltaPlayable(PlayableHandle.Null);

		public static AnimationMotionXToDeltaPlayable Null => m_NullPlayable;

		private AnimationMotionXToDeltaPlayable(PlayableHandle handle)
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			if (((PlayableHandle)(ref handle)).IsValid() && !((PlayableHandle)(ref handle)).IsPlayableOfType<AnimationMotionXToDeltaPlayable>())
			{
				throw new InvalidCastException("Can't set handle: the playable is not an AnimationMotionXToDeltaPlayable.");
			}
			m_Handle = handle;
		}

		public static AnimationMotionXToDeltaPlayable Create(PlayableGraph graph)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			PlayableHandle handle = CreateHandle(graph);
			return new AnimationMotionXToDeltaPlayable(handle);
		}

		private static PlayableHandle CreateHandle(PlayableGraph graph)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			PlayableHandle handle = PlayableHandle.Null;
			if (!CreateHandleInternal(graph, ref handle))
			{
				return PlayableHandle.Null;
			}
			((PlayableHandle)(ref handle)).SetInputCount(1);
			return handle;
		}

		public PlayableHandle GetHandle()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			return m_Handle;
		}

		public static implicit operator Playable(AnimationMotionXToDeltaPlayable playable)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			return new Playable(playable.GetHandle());
		}

		public static explicit operator AnimationMotionXToDeltaPlayable(Playable playable)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			return new AnimationMotionXToDeltaPlayable(((Playable)(ref playable)).GetHandle());
		}

		public bool Equals(AnimationMotionXToDeltaPlayable other)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			return GetHandle() == other.GetHandle();
		}

		public bool IsAbsoluteMotion()
		{
			return IsAbsoluteMotionInternal(ref m_Handle);
		}

		public void SetAbsoluteMotion(bool value)
		{
			SetAbsoluteMotionInternal(ref m_Handle, value);
		}

		[NativeThrows]
		private static bool CreateHandleInternal(PlayableGraph graph, ref PlayableHandle handle)
		{
			return CreateHandleInternal_Injected(ref graph, ref handle);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern bool IsAbsoluteMotionInternal(ref PlayableHandle handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern void SetAbsoluteMotionInternal(ref PlayableHandle handle, bool value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool CreateHandleInternal_Injected(ref PlayableGraph graph, ref PlayableHandle handle);
	}
	[NativeHeader("Modules/Animation/ScriptBindings/AnimationOffsetPlayable.bindings.h")]
	[NativeHeader("Modules/Animation/Director/AnimationOffsetPlayable.h")]
	[NativeHeader("Runtime/Director/Core/HPlayable.h")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[RequiredByNativeCode]
	internal struct AnimationOffsetPlayable : IPlayable, IEquatable<AnimationOffsetPlayable>
	{
		private PlayableHandle m_Handle;

		private static readonly AnimationOffsetPlayable m_NullPlayable = new AnimationOffsetPlayable(PlayableHandle.Null);

		public static AnimationOffsetPlayable Null => m_NullPlayable;

		internal AnimationOffsetPlayable(PlayableHandle handle)
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			if (((PlayableHandle)(ref handle)).IsValid() && !((PlayableHandle)(ref handle)).IsPlayableOfType<AnimationOffsetPlayable>())
			{
				throw new InvalidCastException("Can't set handle: the playable is not an AnimationOffsetPlayable.");
			}
			m_Handle = handle;
		}

		public static AnimationOffsetPlayable Create(PlayableGraph graph, Vector3 position, Quaternion rotation, int inputCount)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			PlayableHandle handle = CreateHandle(graph, position, rotation, inputCount);
			return new AnimationOffsetPlayable(handle);
		}

		private static PlayableHandle CreateHandle(PlayableGraph graph, Vector3 position, Quaternion rotation, int inputCount)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			PlayableHandle handle = PlayableHandle.Null;
			if (!CreateHandleInternal(graph, position, rotation, ref handle))
			{
				return PlayableHandle.Null;
			}
			((PlayableHandle)(ref handle)).SetInputCount(inputCount);
			return handle;
		}

		public PlayableHandle GetHandle()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			return m_Handle;
		}

		public static implicit operator Playable(AnimationOffsetPlayable playable)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			return new Playable(playable.GetHandle());
		}

		public static explicit operator AnimationOffsetPlayable(Playable playable)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			return new AnimationOffsetPlayable(((Playable)(ref playable)).GetHandle());
		}

		public bool Equals(AnimationOffsetPlayable other)
		{
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			return Equals(other.GetHandle());
		}

		public Vector3 GetPosition()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			return GetPositionInternal(ref m_Handle);
		}

		public void SetPosition(Vector3 value)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			SetPositionInternal(ref m_Handle, value);
		}

		public Quaternion GetRotation()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			return GetRotationInternal(ref m_Handle);
		}

		public void SetRotation(Quaternion value)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			SetRotationInternal(ref m_Handle, value);
		}

		[NativeThrows]
		private static bool CreateHandleInternal(PlayableGraph graph, Vector3 position, Quaternion rotation, ref PlayableHandle handle)
		{
			return CreateHandleInternal_Injected(ref graph, ref position, ref rotation, ref handle);
		}

		[NativeThrows]
		private static Vector3 GetPositionInternal(ref PlayableHandle handle)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			GetPositionInternal_Injected(ref handle, out var ret);
			return ret;
		}

		[NativeThrows]
		private static void SetPositionInternal(ref PlayableHandle handle, Vector3 value)
		{
			SetPositionInternal_Injected(ref handle, ref value);
		}

		[NativeThrows]
		private static Quaternion GetRotationInternal(ref PlayableHandle handle)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			GetRotationInternal_Injected(ref handle, out var ret);
			return ret;
		}

		[NativeThrows]
		private static void SetRotationInternal(ref PlayableHandle handle, Quaternion value)
		{
			SetRotationInternal_Injected(ref handle, ref value);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool CreateHandleInternal_Injected(ref PlayableGraph graph, ref Vector3 position, ref Quaternion rotation, ref PlayableHandle handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void GetPositionInternal_Injected(ref PlayableHandle handle, out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void SetPositionInternal_Injected(ref PlayableHandle handle, ref Vector3 value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void GetRotationInternal_Injected(ref PlayableHandle handle, out Quaternion ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void SetRotationInternal_Injected(ref PlayableHandle handle, ref Quaternion value);
	}
	[NativeHeader("Runtime/Director/Core/HPlayable.h")]
	[NativeHeader("Modules/Animation/Director/AnimationPlayableExtensions.h")]
	[NativeHeader("Modules/Animation/AnimationClip.h")]
	public static class AnimationPlayableExtensions
	{
		public static void SetAnimatedProperties<U>(this U playable, AnimationClip clip) where U : struct, IPlayable
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			PlayableHandle playable2 = ((IPlayable)playable).GetHandle();
			SetAnimatedPropertiesInternal(ref playable2, clip);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		internal static extern void SetAnimatedPropertiesInternal(ref PlayableHandle playable, AnimationClip animatedProperties);
	}
	[NativeHeader("Runtime/Director/Core/HPlayable.h")]
	[NativeHeader("Runtime/Director/Core/HPlayableOutput.h")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeHeader("Modules/Animation/ScriptBindings/AnimationPlayableGraphExtensions.bindings.h")]
	[NativeHeader("Modules/Animation/Animator.h")]
	internal static class AnimationPlayableGraphExtensions
	{
		internal static void SyncUpdateAndTimeMode(this PlayableGraph graph, Animator animator)
		{
			InternalSyncUpdateAndTimeMode(ref graph, animator);
		}

		internal static void DestroyOutput(this PlayableGraph graph, PlayableOutputHandle handle)
		{
			InternalDestroyOutput(ref graph, ref handle);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		internal static extern bool InternalCreateAnimationOutput(ref PlayableGraph graph, string name, out PlayableOutputHandle handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		internal static extern void InternalSyncUpdateAndTimeMode(ref PlayableGraph graph, [NotNull] Animator animator);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern void InternalDestroyOutput(ref PlayableGraph graph, ref PlayableOutputHandle handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern int InternalAnimationOutputCount(ref PlayableGraph graph);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern bool InternalGetAnimationOutput(ref PlayableGraph graph, int index, out PlayableOutputHandle handle);
	}
	[NativeHeader("Runtime/Director/Core/HPlayableOutput.h")]
	[NativeHeader("Modules/Animation/Director/AnimationPlayableOutput.h")]
	[NativeHeader("Modules/Animation/ScriptBindings/AnimationPlayableOutput.bindings.h")]
	[NativeHeader("Modules/Animation/Animator.h")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[RequiredByNativeCode]
	[NativeHeader("Runtime/Director/Core/HPlayableGraph.h")]
	public struct AnimationPlayableOutput : IPlayableOutput
	{
		private PlayableOutputHandle m_Handle;

		public static AnimationPlayableOutput Null => new AnimationPlayableOutput(PlayableOutputHandle.Null);

		internal AnimationPlayableOutput(PlayableOutputHandle handle)
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			if (((PlayableOutputHandle)(ref handle)).IsValid() && !((PlayableOutputHandle)(ref handle)).IsPlayableOutputOfType<AnimationPlayableOutput>())
			{
				throw new InvalidCastException("Can't set handle: the playable is not an AnimationPlayableOutput.");
			}
			m_Handle = handle;
		}

		public static AnimationPlayableOutput Create(PlayableGraph graph, string name, Animator target)
		{
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			if (!AnimationPlayableGraphExtensions.InternalCreateAnimationOutput(ref graph, name, out var handle))
			{
				return Null;
			}
			AnimationPlayableOutput result = new AnimationPlayableOutput(handle);
			result.SetTarget(target);
			return result;
		}

		public PlayableOutputHandle GetHandle()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			return m_Handle;
		}

		public static implicit operator PlayableOutput(AnimationPlayableOutput output)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			return new PlayableOutput(output.GetHandle());
		}

		public static explicit operator AnimationPlayableOutput(PlayableOutput output)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			return new AnimationPlayableOutput(((PlayableOutput)(ref output)).GetHandle());
		}

		public Animator GetTarget()
		{
			return InternalGetTarget(ref m_Handle);
		}

		public void SetTarget(Animator value)
		{
			InternalSetTarget(ref m_Handle, value);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern Animator InternalGetTarget(ref PlayableOutputHandle handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern void InternalSetTarget(ref PlayableOutputHandle handle, Animator target);
	}
}
namespace UnityEngine.Experimental.Animations
{
	public enum AnimationStreamSource
	{
		DefaultValues,
		PreviousInputs
	}
	[NativeHeader("Modules/Animation/ScriptBindings/AnimationPlayableOutputExtensions.bindings.h")]
	[NativeHeader("Modules/Animation/AnimatorDefines.h")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	public static class AnimationPlayableOutputExtensions
	{
		public static AnimationStreamSource GetAnimationStreamSource(this AnimationPlayableOutput output)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			return InternalGetAnimationStreamSource(output.GetHandle());
		}

		public static void SetAnimationStreamSource(this AnimationPlayableOutput output, AnimationStreamSource streamSource)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			InternalSetAnimationStreamSource(output.GetHandle(), streamSource);
		}

		[NativeThrows]
		private static AnimationStreamSource InternalGetAnimationStreamSource(PlayableOutputHandle output)
		{
			return InternalGetAnimationStreamSource_Injected(ref output);
		}

		[NativeThrows]
		private static void InternalSetAnimationStreamSource(PlayableOutputHandle output, AnimationStreamSource streamSource)
		{
			InternalSetAnimationStreamSource_Injected(ref output, streamSource);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern AnimationStreamSource InternalGetAnimationStreamSource_Injected(ref PlayableOutputHandle output);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalSetAnimationStreamSource_Injected(ref PlayableOutputHandle output, AnimationStreamSource streamSource);
	}
}
namespace UnityEngine.Animations
{
	[RequiredByNativeCode]
	[NativeHeader("Modules/Animation/ScriptBindings/AnimationPosePlayable.bindings.h")]
	[NativeHeader("Modules/Animation/Director/AnimationPosePlayable.h")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeHeader("Runtime/Director/Core/HPlayable.h")]
	internal struct AnimationPosePlayable : IPlayable, IEquatable<AnimationPosePlayable>
	{
		private PlayableHandle m_Handle;

		private static readonly AnimationPosePlayable m_NullPlayable = new AnimationPosePlayable(PlayableHandle.Null);

		public static AnimationPosePlayable Null => m_NullPlayable;

		internal AnimationPosePlayable(PlayableHandle handle)
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			if (((PlayableHandle)(ref handle)).IsValid() && !((PlayableHandle)(ref handle)).IsPlayableOfType<AnimationPosePlayable>())
			{
				throw new InvalidCastException("Can't set handle: the playable is not an AnimationPosePlayable.");
			}
			m_Handle = handle;
		}

		public static AnimationPosePlayable Create(PlayableGraph graph)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			PlayableHandle handle = CreateHandle(graph);
			return new AnimationPosePlayable(handle);
		}

		private static PlayableHandle CreateHandle(PlayableGraph graph)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: 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)
			PlayableHandle handle = PlayableHandle.Null;
			if (!CreateHandleInternal(graph, ref handle))
			{
				return PlayableHandle.Null;
			}
			return handle;
		}

		public PlayableHandle GetHandle()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			return m_Handle;
		}

		public static implicit operator Playable(AnimationPosePlayable playable)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			return new Playable(playable.GetHandle());
		}

		public static explicit operator AnimationPosePlayable(Playable playable)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			return new AnimationPosePlayable(((Playable)(ref playable)).GetHandle());
		}

		public bool Equals(AnimationPosePlayable other)
		{
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			return Equals(other.GetHandle());
		}

		public bool GetMustReadPreviousPose()
		{
			return GetMustReadPreviousPoseInternal(ref m_Handle);
		}

		public void SetMustReadPreviousPose(bool value)
		{
			SetMustReadPreviousPoseInternal(ref m_Handle, value);
		}

		public bool GetReadDefaultPose()
		{
			return GetReadDefaultPoseInternal(ref m_Handle);
		}

		public void SetReadDefaultPose(bool value)
		{
			SetReadDefaultPoseInternal(ref m_Handle, value);
		}

		public bool GetApplyFootIK()
		{
			return GetApplyFootIKInternal(ref m_Handle);
		}

		public void SetApplyFootIK(bool value)
		{
			SetApplyFootIKInternal(ref m_Handle, value);
		}

		[NativeThrows]
		private static bool CreateHandleInternal(PlayableGraph graph, ref PlayableHandle handle)
		{
			return CreateHandleInternal_Injected(ref graph, ref handle);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern bool GetMustReadPreviousPoseInternal(ref PlayableHandle handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern void SetMustReadPreviousPoseInternal(ref PlayableHandle handle, bool value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern bool GetReadDefaultPoseInternal(ref PlayableHandle handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern void SetReadDefaultPoseInternal(ref PlayableHandle handle, bool value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern bool GetApplyFootIKInternal(ref PlayableHandle handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern void SetApplyFootIKInternal(ref PlayableHandle handle, bool value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool CreateHandleInternal_Injected(ref PlayableGraph graph, ref PlayableHandle handle);
	}
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeHeader("Runtime/Director/Core/HPlayable.h")]
	[RequiredByNativeCode]
	[NativeHeader("Modules/Animation/Director/AnimationRemoveScalePlayable.h")]
	[NativeHeader("Modules/Animation/ScriptBindings/AnimationRemoveScalePlayable.bindings.h")]
	internal struct AnimationRemoveScalePlayable : IPlayable, IEquatable<AnimationRemoveScalePlayable>
	{
		private PlayableHandle m_Handle;

		private static readonly AnimationRemoveScalePlayable m_NullPlayable = new AnimationRemoveScalePlayable(PlayableHandle.Null);

		public static AnimationRemoveScalePlayable Null => m_NullPlayable;

		internal AnimationRemoveScalePlayable(PlayableHandle handle)
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			if (((PlayableHandle)(ref handle)).IsValid() && !((PlayableHandle)(ref handle)).IsPlayableOfType<AnimationRemoveScalePlayable>())
			{
				throw new InvalidCastException("Can't set handle: the playable is not an AnimationRemoveScalePlayable.");
			}
			m_Handle = handle;
		}

		public static AnimationRemoveScalePlayable Create(PlayableGraph graph, int inputCount)
		{
			//IL_0001: Unknown 

Room Architect Tool_Data/Managed/UnityEngine.ARModule.dll

Decompiled 3 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;
using UnityEngine.Rendering;
using UnityEngine.Scripting;

[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine.XR
{
	public enum ARRenderMode
	{
		StandardBackground,
		MaterialAsBackground
	}
	public class ARBackgroundRenderer
	{
		protected Camera m_Camera = null;

		protected Material m_BackgroundMaterial = null;

		protected Texture m_BackgroundTexture = null;

		private ARRenderMode m_RenderMode = ARRenderMode.StandardBackground;

		private CommandBuffer m_CommandBuffer = null;

		private CameraClearFlags m_CameraClearFlags = (CameraClearFlags)1;

		public Material backgroundMaterial
		{
			get
			{
				return m_BackgroundMaterial;
			}
			set
			{
				if (!((Object)(object)m_BackgroundMaterial == (Object)(object)value))
				{
					RemoveCommandBuffersIfNeeded();
					m_BackgroundMaterial = value;
					if (this.backgroundRendererChanged != null)
					{
						this.backgroundRendererChanged();
					}
					ReapplyCommandBuffersIfNeeded();
				}
			}
		}

		public Texture backgroundTexture
		{
			get
			{
				return m_BackgroundTexture;
			}
			set
			{
				if (!Object.op_Implicit((Object)(object)(m_BackgroundTexture = value)))
				{
					RemoveCommandBuffersIfNeeded();
					m_BackgroundTexture = value;
					if (this.backgroundRendererChanged != null)
					{
						this.backgroundRendererChanged();
					}
					ReapplyCommandBuffersIfNeeded();
				}
			}
		}

		public Camera camera
		{
			get
			{
				return (!((Object)(object)m_Camera != (Object)null)) ? Camera.main : m_Camera;
			}
			set
			{
				if (!((Object)(object)m_Camera == (Object)(object)value))
				{
					RemoveCommandBuffersIfNeeded();
					m_Camera = value;
					if (this.backgroundRendererChanged != null)
					{
						this.backgroundRendererChanged();
					}
					ReapplyCommandBuffersIfNeeded();
				}
			}
		}

		public ARRenderMode mode
		{
			get
			{
				return m_RenderMode;
			}
			set
			{
				if (value != m_RenderMode)
				{
					m_RenderMode = value;
					switch (m_RenderMode)
					{
					case ARRenderMode.StandardBackground:
						DisableARBackgroundRendering();
						break;
					case ARRenderMode.MaterialAsBackground:
						EnableARBackgroundRendering();
						break;
					default:
						throw new Exception("Unhandled render mode.");
					}
					if (this.backgroundRendererChanged != null)
					{
						this.backgroundRendererChanged();
					}
				}
			}
		}

		public event Action backgroundRendererChanged = null;

		protected bool EnableARBackgroundRendering()
		{
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Expected O, but got Unknown
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)m_BackgroundMaterial == (Object)null)
			{
				return false;
			}
			Camera val = ((!((Object)(object)m_Camera != (Object)null)) ? Camera.main : m_Camera);
			if ((Object)(object)val == (Object)null)
			{
				return false;
			}
			m_CameraClearFlags = val.clearFlags;
			val.clearFlags = (CameraClearFlags)3;
			m_CommandBuffer = new CommandBuffer();
			Texture texture = m_BackgroundTexture;
			if ((Object)(object)texture == (Object)null && m_BackgroundMaterial.HasProperty("_MainTex"))
			{
				texture = m_BackgroundMaterial.GetTexture("_MainTex");
			}
			m_CommandBuffer.Blit(texture, RenderTargetIdentifier.op_Implicit((BuiltinRenderTextureType)2), m_BackgroundMaterial);
			val.AddCommandBuffer((CameraEvent)10, m_CommandBuffer);
			val.AddCommandBuffer((CameraEvent)4, m_CommandBuffer);
			return true;
		}

		protected void DisableARBackgroundRendering()
		{
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			if (m_CommandBuffer != null)
			{
				Camera val = m_Camera ?? Camera.main;
				if (!((Object)(object)val == (Object)null))
				{
					val.clearFlags = m_CameraClearFlags;
					val.RemoveCommandBuffer((CameraEvent)10, m_CommandBuffer);
					val.RemoveCommandBuffer((CameraEvent)4, m_CommandBuffer);
				}
			}
		}

		private bool ReapplyCommandBuffersIfNeeded()
		{
			if (m_RenderMode != ARRenderMode.MaterialAsBackground)
			{
				return false;
			}
			EnableARBackgroundRendering();
			return true;
		}

		private bool RemoveCommandBuffersIfNeeded()
		{
			if (m_RenderMode != ARRenderMode.MaterialAsBackground)
			{
				return false;
			}
			DisableARBackgroundRendering();
			return true;
		}
	}
}
namespace UnityEngine.XR.Tango
{
	internal enum PoseStatus
	{
		Initializing,
		Valid,
		Invalid,
		Unknown
	}
	[NativeHeader("ARScriptingClasses.h")]
	[UsedByNativeCode]
	internal struct PoseData
	{
		public double orientation_x;

		public double orientation_y;

		public double orientation_z;

		public double orientation_w;

		public double translation_x;

		public double translation_y;

		public double translation_z;

		public PoseStatus statusCode;

		public Quaternion rotation => new Quaternion((float)orientation_x, (float)orientation_y, (float)orientation_z, (float)orientation_w);

		public Vector3 position => new Vector3((float)translation_x, (float)translation_y, (float)translation_z);
	}
	[NativeConditional("PLATFORM_ANDROID")]
	[NativeHeader("Modules/AR/Tango/TangoScriptApi.h")]
	internal static class TangoInputTracking
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool Internal_TryGetPoseAtTime(out PoseData pose);

		internal static bool TryGetPoseAtTime(out PoseData pose)
		{
			return Internal_TryGetPoseAtTime(out pose);
		}
	}
}

Room Architect Tool_Data/Managed/UnityEngine.AssetBundleModule.dll

Decompiled 3 months ago
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;
using UnityEngine.Scripting;
using UnityEngineInternal;

[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Assembly-CSharp-Editor-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine
{
	public enum AssetBundleLoadResult
	{
		Success,
		Cancelled,
		NotMatchingCrc,
		FailedCache,
		NotValidAssetBundle,
		NoSerializedData,
		NotCompatible,
		AlreadyLoaded,
		FailedRead,
		FailedDecompression,
		FailedWrite,
		FailedDeleteRecompressionTarget,
		RecompressionTargetIsLoaded,
		RecompressionTargetExistsButNotArchive
	}
	[NativeHeader("Modules/AssetBundle/Public/AssetBundleLoadAssetUtility.h")]
	[NativeHeader("Modules/AssetBundle/Public/AssetBundleSaveAndLoadHelper.h")]
	[NativeHeader("Modules/AssetBundle/Public/AssetBundleUtility.h")]
	[ExcludeFromPreset]
	[NativeHeader("Runtime/Scripting/ScriptingObjectWithIntPtrField.h")]
	[NativeHeader("Runtime/Scripting/ScriptingExportUtility.h")]
	[NativeHeader("Modules/AssetBundle/Public/AssetBundleLoadAssetOperation.h")]
	[NativeHeader("Modules/AssetBundle/Public/AssetBundleLoadFromManagedStreamAsyncOperation.h")]
	[NativeHeader("Modules/AssetBundle/Public/AssetBundleLoadFromFileAsyncOperation.h")]
	[NativeHeader("AssetBundleScriptingClasses.h")]
	[NativeHeader("Runtime/Scripting/ScriptingUtility.h")]
	[NativeHeader("Modules/AssetBundle/Public/AssetBundleLoadFromMemoryAsyncOperation.h")]
	public class AssetBundle : Object
	{
		[Obsolete("mainAsset has been made obsolete. Please use the new AssetBundle build system introduced in 5.0 and check BuildAssetBundles documentation for details.")]
		public Object mainAsset => returnMainAsset(this);

		public extern bool isStreamedSceneAssetBundle
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetIsStreamedSceneAssetBundle")]
			get;
		}

		private AssetBundle()
		{
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("LoadMainObjectFromAssetBundle", true)]
		internal static extern Object returnMainAsset(AssetBundle bundle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UnloadAllAssetBundles")]
		public static extern void UnloadAllAssetBundles(bool unloadAllObjects);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("GetAllAssetBundles")]
		internal static extern AssetBundle[] GetAllLoadedAssetBundles_Native();

		public static IEnumerable<AssetBundle> GetAllLoadedAssetBundles()
		{
			return GetAllLoadedAssetBundles_Native();
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("LoadFromFileAsync")]
		internal static extern AssetBundleCreateRequest LoadFromFileAsync_Internal(string path, uint crc, ulong offset);

		public static AssetBundleCreateRequest LoadFromFileAsync(string path)
		{
			return LoadFromFileAsync_Internal(path, 0u, 0uL);
		}

		public static AssetBundleCreateRequest LoadFromFileAsync(string path, uint crc)
		{
			return LoadFromFileAsync_Internal(path, crc, 0uL);
		}

		public static AssetBundleCreateRequest LoadFromFileAsync(string path, uint crc, ulong offset)
		{
			return LoadFromFileAsync_Internal(path, crc, offset);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("LoadFromFile")]
		internal static extern AssetBundle LoadFromFile_Internal(string path, uint crc, ulong offset);

		public static AssetBundle LoadFromFile(string path)
		{
			return LoadFromFile_Internal(path, 0u, 0uL);
		}

		public static AssetBundle LoadFromFile(string path, uint crc)
		{
			return LoadFromFile_Internal(path, crc, 0uL);
		}

		public static AssetBundle LoadFromFile(string path, uint crc, ulong offset)
		{
			return LoadFromFile_Internal(path, crc, offset);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("LoadFromMemoryAsync")]
		internal static extern AssetBundleCreateRequest LoadFromMemoryAsync_Internal(byte[] binary, uint crc);

		public static AssetBundleCreateRequest LoadFromMemoryAsync(byte[] binary)
		{
			return LoadFromMemoryAsync_Internal(binary, 0u);
		}

		public static AssetBundleCreateRequest LoadFromMemoryAsync(byte[] binary, uint crc)
		{
			return LoadFromMemoryAsync_Internal(binary, crc);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("LoadFromMemory")]
		internal static extern AssetBundle LoadFromMemory_Internal(byte[] binary, uint crc);

		public static AssetBundle LoadFromMemory(byte[] binary)
		{
			return LoadFromMemory_Internal(binary, 0u);
		}

		public static AssetBundle LoadFromMemory(byte[] binary, uint crc)
		{
			return LoadFromMemory_Internal(binary, crc);
		}

		internal static void ValidateLoadFromStream(Stream stream)
		{
			if (stream == null)
			{
				throw new ArgumentNullException("ManagedStream object must be non-null", "stream");
			}
			if (!stream.CanRead)
			{
				throw new ArgumentException("ManagedStream object must be readable (stream.CanRead must return true)", "stream");
			}
			if (!stream.CanSeek)
			{
				throw new ArgumentException("ManagedStream object must be seekable (stream.CanSeek must return true)", "stream");
			}
		}

		public static AssetBundleCreateRequest LoadFromStreamAsync(Stream stream, uint crc, uint managedReadBufferSize)
		{
			ValidateLoadFromStream(stream);
			return LoadFromStreamAsyncInternal(stream, crc, managedReadBufferSize);
		}

		public static AssetBundleCreateRequest LoadFromStreamAsync(Stream stream, uint crc)
		{
			ValidateLoadFromStream(stream);
			return LoadFromStreamAsyncInternal(stream, crc, 0u);
		}

		public static AssetBundleCreateRequest LoadFromStreamAsync(Stream stream)
		{
			ValidateLoadFromStream(stream);
			return LoadFromStreamAsyncInternal(stream, 0u, 0u);
		}

		public static AssetBundle LoadFromStream(Stream stream, uint crc, uint managedReadBufferSize)
		{
			ValidateLoadFromStream(stream);
			return LoadFromStreamInternal(stream, crc, managedReadBufferSize);
		}

		public static AssetBundle LoadFromStream(Stream stream, uint crc)
		{
			ValidateLoadFromStream(stream);
			return LoadFromStreamInternal(stream, crc, 0u);
		}

		public static AssetBundle LoadFromStream(Stream stream)
		{
			ValidateLoadFromStream(stream);
			return LoadFromStreamInternal(stream, 0u, 0u);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("LoadFromStreamAsyncInternal")]
		internal static extern AssetBundleCreateRequest LoadFromStreamAsyncInternal(Stream stream, uint crc, uint managedReadBufferSize);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("LoadFromStreamInternal")]
		internal static extern AssetBundle LoadFromStreamInternal(Stream stream, uint crc, uint managedReadBufferSize);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("Contains")]
		public extern bool Contains(string name);

		[EditorBrowsable(EditorBrowsableState.Never)]
		[Obsolete("Method Load has been deprecated. Script updater cannot update it as the loading behaviour has changed. Please use LoadAsset instead and check the documentation for details.", true)]
		public Object Load(string name)
		{
			return null;
		}

		[Obsolete("Method Load has been deprecated. Script updater cannot update it as the loading behaviour has changed. Please use LoadAsset instead and check the documentation for details.", true)]
		[EditorBrowsable(EditorBrowsableState.Never)]
		public Object Load<T>(string name)
		{
			return null;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		[Obsolete("Method Load has been deprecated. Script updater cannot update it as the loading behaviour has changed. Please use LoadAsset instead and check the documentation for details.", true)]
		private Object Load(string name, Type type)
		{
			return null;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		[Obsolete("Method LoadAsync has been deprecated. Script updater cannot update it as the loading behaviour has changed. Please use LoadAssetAsync instead and check the documentation for details.", true)]
		private AssetBundleRequest LoadAsync(string name, Type type)
		{
			return null;
		}

		[Obsolete("Method LoadAll has been deprecated. Script updater cannot update it as the loading behaviour has changed. Please use LoadAllAssets instead and check the documentation for details.", true)]
		[EditorBrowsable(EditorBrowsableState.Never)]
		private Object[] LoadAll(Type type)
		{
			return null;
		}

		[Obsolete("Method LoadAll has been deprecated. Script updater cannot update it as the loading behaviour has changed. Please use LoadAllAssets instead and check the documentation for details.", true)]
		[EditorBrowsable(EditorBrowsableState.Never)]
		public Object[] LoadAll()
		{
			return null;
		}

		[Obsolete("Method LoadAll has been deprecated. Script updater cannot update it as the loading behaviour has changed. Please use LoadAllAssets instead and check the documentation for details.", true)]
		[EditorBrowsable(EditorBrowsableState.Never)]
		public T[] LoadAll<T>() where T : Object
		{
			return null;
		}

		public Object LoadAsset(string name)
		{
			return LoadAsset(name, typeof(Object));
		}

		public T LoadAsset<T>(string name) where T : Object
		{
			return (T)(object)LoadAsset(name, typeof(T));
		}

		[TypeInferenceRule(/*Could not decode attribute arguments.*/)]
		public Object LoadAsset(string name, Type type)
		{
			if (name == null)
			{
				throw new NullReferenceException("The input asset name cannot be null.");
			}
			if (name.Length == 0)
			{
				throw new ArgumentException("The input asset name cannot be empty.");
			}
			if ((object)type == null)
			{
				throw new NullReferenceException("The input type cannot be null.");
			}
			return LoadAsset_Internal(name, type);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[TypeInferenceRule(/*Could not decode attribute arguments.*/)]
		[NativeMethod("LoadAsset_Internal")]
		[NativeThrows]
		private extern Object LoadAsset_Internal(string name, Type type);

		public AssetBundleRequest LoadAssetAsync(string name)
		{
			return LoadAssetAsync(name, typeof(Object));
		}

		public AssetBundleRequest LoadAssetAsync<T>(string name)
		{
			return LoadAssetAsync(name, typeof(T));
		}

		public AssetBundleRequest LoadAssetAsync(string name, Type type)
		{
			if (name == null)
			{
				throw new NullReferenceException("The input asset name cannot be null.");
			}
			if (name.Length == 0)
			{
				throw new ArgumentException("The input asset name cannot be empty.");
			}
			if ((object)type == null)
			{
				throw new NullReferenceException("The input type cannot be null.");
			}
			return LoadAssetAsync_Internal(name, type);
		}

		public Object[] LoadAssetWithSubAssets(string name)
		{
			return LoadAssetWithSubAssets(name, typeof(Object));
		}

		internal static T[] ConvertObjects<T>(Object[] rawObjects) where T : Object
		{
			if (rawObjects == null)
			{
				return null;
			}
			T[] array = new T[rawObjects.Length];
			for (int i = 0; i < array.Length; i++)
			{
				array[i] = (T)(object)rawObjects[i];
			}
			return array;
		}

		public T[] LoadAssetWithSubAssets<T>(string name) where T : Object
		{
			return ConvertObjects<T>(LoadAssetWithSubAssets(name, typeof(T)));
		}

		public Object[] LoadAssetWithSubAssets(string name, Type type)
		{
			if (name == null)
			{
				throw new NullReferenceException("The input asset name cannot be null.");
			}
			if (name.Length == 0)
			{
				throw new ArgumentException("The input asset name cannot be empty.");
			}
			if ((object)type == null)
			{
				throw new NullReferenceException("The input type cannot be null.");
			}
			return LoadAssetWithSubAssets_Internal(name, type);
		}

		public AssetBundleRequest LoadAssetWithSubAssetsAsync(string name)
		{
			return LoadAssetWithSubAssetsAsync(name, typeof(Object));
		}

		public AssetBundleRequest LoadAssetWithSubAssetsAsync<T>(string name)
		{
			return LoadAssetWithSubAssetsAsync(name, typeof(T));
		}

		public AssetBundleRequest LoadAssetWithSubAssetsAsync(string name, Type type)
		{
			if (name == null)
			{
				throw new NullReferenceException("The input asset name cannot be null.");
			}
			if (name.Length == 0)
			{
				throw new ArgumentException("The input asset name cannot be empty.");
			}
			if ((object)type == null)
			{
				throw new NullReferenceException("The input type cannot be null.");
			}
			return LoadAssetWithSubAssetsAsync_Internal(name, type);
		}

		public Object[] LoadAllAssets()
		{
			return LoadAllAssets(typeof(Object));
		}

		public T[] LoadAllAssets<T>() where T : Object
		{
			return ConvertObjects<T>(LoadAllAssets(typeof(T)));
		}

		public Object[] LoadAllAssets(Type type)
		{
			if ((object)type == null)
			{
				throw new NullReferenceException("The input type cannot be null.");
			}
			return LoadAssetWithSubAssets_Internal("", type);
		}

		public AssetBundleRequest LoadAllAssetsAsync()
		{
			return LoadAllAssetsAsync(typeof(Object));
		}

		public AssetBundleRequest LoadAllAssetsAsync<T>()
		{
			return LoadAllAssetsAsync(typeof(T));
		}

		public AssetBundleRequest LoadAllAssetsAsync(Type type)
		{
			if ((object)type == null)
			{
				throw new NullReferenceException("The input type cannot be null.");
			}
			return LoadAssetWithSubAssetsAsync_Internal("", type);
		}

		[Obsolete("This method is deprecated.Use GetAllAssetNames() instead.", false)]
		public string[] AllAssetNames()
		{
			return GetAllAssetNames();
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("LoadAssetAsync_Internal")]
		[NativeThrows]
		private extern AssetBundleRequest LoadAssetAsync_Internal(string name, Type type);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("Unload")]
		public extern void Unload(bool unloadAllLoadedObjects);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("GetAllAssetNames")]
		public extern string[] GetAllAssetNames();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("GetAllScenePaths")]
		public extern string[] GetAllScenePaths();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		[NativeMethod("LoadAssetWithSubAssets_Internal")]
		internal extern Object[] LoadAssetWithSubAssets_Internal(string name, Type type);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("LoadAssetWithSubAssetsAsync_Internal")]
		[NativeThrows]
		private extern AssetBundleRequest LoadAssetWithSubAssetsAsync_Internal(string name, Type type);

		public static AssetBundleRecompressOperation RecompressAssetBundleAsync(string inputPath, string outputPath, BuildCompression method, uint expectedCRC = 0u, ThreadPriority priority = 0)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return RecompressAssetBundleAsync_Internal(inputPath, outputPath, method, expectedCRC, priority);
		}

		[NativeThrows]
		[FreeFunction("RecompressAssetBundleAsync_Internal")]
		internal static AssetBundleRecompressOperation RecompressAssetBundleAsync_Internal(string inputPath, string outputPath, BuildCompression method, uint expectedCRC, ThreadPriority priority)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return RecompressAssetBundleAsync_Internal_Injected(inputPath, outputPath, ref method, expectedCRC, priority);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern AssetBundleRecompressOperation RecompressAssetBundleAsync_Internal_Injected(string inputPath, string outputPath, ref BuildCompression method, uint expectedCRC, ThreadPriority priority);
	}
	[StructLayout(LayoutKind.Sequential)]
	[RequiredByNativeCode]
	[NativeHeader("Modules/AssetBundle/Public/AssetBundleLoadFromAsyncOperation.h")]
	public class AssetBundleCreateRequest : AsyncOperation
	{
		public extern AssetBundle assetBundle
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetAssetBundleBlocking")]
			get;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("SetEnableCompatibilityChecks")]
		private extern void SetEnableCompatibilityChecks(bool set);

		internal void DisableCompatibilityChecks()
		{
			SetEnableCompatibilityChecks(set: false);
		}
	}
	[NativeHeader("Modules/AssetBundle/Public/AssetBundleManifest.h")]
	public class AssetBundleManifest : Object
	{
		private AssetBundleManifest()
		{
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("GetAllAssetBundles")]
		public extern string[] GetAllAssetBundles();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("GetAllAssetBundlesWithVariant")]
		public extern string[] GetAllAssetBundlesWithVariant();

		[NativeMethod("GetAssetBundleHash")]
		public Hash128 GetAssetBundleHash(string assetBundleName)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			GetAssetBundleHash_Injected(assetBundleName, out var ret);
			return ret;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("GetDirectDependencies")]
		public extern string[] GetDirectDependencies(string assetBundleName);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("GetAllDependencies")]
		public extern string[] GetAllDependencies(string assetBundleName);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void GetAssetBundleHash_Injected(string assetBundleName, out Hash128 ret);
	}
	[StructLayout(LayoutKind.Sequential)]
	[NativeHeader("Modules/AssetBundle/Public/AssetBundleRecompressOperation.h")]
	[RequiredByNativeCode]
	public class AssetBundleRecompressOperation : AsyncOperation
	{
		public extern string humanReadableResult
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetResultStr")]
			get;
		}

		public extern string inputPath
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetInputPath")]
			get;
		}

		public extern string outputPath
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetOutputPath")]
			get;
		}

		public extern AssetBundleLoadResult result
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetResult")]
			get;
		}

		public extern bool success
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetSuccess")]
			get;
		}
	}
	[StructLayout(LayoutKind.Sequential)]
	[RequiredByNativeCode]
	[NativeHeader("Modules/AssetBundle/Public/AssetBundleLoadAssetOperation.h")]
	public class AssetBundleRequest : AsyncOperation
	{
		public extern Object asset
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetLoadedAsset")]
			get;
		}

		public extern Object[] allAssets
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetAllLoadedAssets")]
			get;
		}
	}
}
namespace UnityEngine.Experimental.AssetBundlePatching
{
	[NativeHeader("Modules/AssetBundle/Public/AssetBundlePatching.h")]
	public static class AssetBundleUtility
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction]
		public static extern void PatchAssetBundles(AssetBundle[] bundles, string[] filenames);
	}
}
namespace UnityEngine
{
	public enum CompressionType
	{
		None,
		Lzma,
		Lz4,
		Lz4HC
	}
	public enum CompressionLevel
	{
		None,
		Fastest,
		Fast,
		Normal,
		High,
		Maximum
	}
	[Serializable]
	[UsedByNativeCode]
	public struct BuildCompression
	{
		public static readonly BuildCompression Uncompressed = new BuildCompression(CompressionType.None, CompressionLevel.Maximum, 131072u);

		public static readonly BuildCompression LZ4 = new BuildCompression(CompressionType.Lz4HC, CompressionLevel.Maximum, 131072u);

		public static readonly BuildCompression LZMA = new BuildCompression(CompressionType.Lzma, CompressionLevel.Maximum, 131072u);

		public static readonly BuildCompression UncompressedRuntime = Uncompressed;

		public static readonly BuildCompression LZ4Runtime = new BuildCompression(CompressionType.Lz4, CompressionLevel.Maximum, 131072u);

		[NativeName("compression")]
		private CompressionType _compression;

		[NativeName("level")]
		private CompressionLevel _level;

		[NativeName("blockSize")]
		private uint _blockSize;

		public CompressionType compression
		{
			get
			{
				return _compression;
			}
			private set
			{
				_compression = value;
			}
		}

		public CompressionLevel level
		{
			get
			{
				return _level;
			}
			private set
			{
				_level = value;
			}
		}

		public uint blockSize
		{
			get
			{
				return _blockSize;
			}
			private set
			{
				_blockSize = value;
			}
		}

		private BuildCompression(CompressionType in_compression, CompressionLevel in_level, uint in_blockSize)
		{
			this = default(BuildCompression);
			compression = in_compression;
			level = in_level;
			blockSize = in_blockSize;
		}
	}
}

Room Architect Tool_Data/Managed/UnityEngine.AudioModule.dll

Decompiled 3 months ago
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
using UnityEngine;
using UnityEngine.Audio;
using UnityEngine.Bindings;
using UnityEngine.Internal;
using UnityEngine.Playables;
using UnityEngine.Scripting;

[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("Unity.Audio.Tests")]
[assembly: InternalsVisibleTo("Unity.Audio.DSPGraph")]
[assembly: InternalsVisibleTo("Unity.Audio.DSPGraph.Tests")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace Unity.Audio
{
	[VisibleToOtherModules]
	internal interface IHandle<HandleType> : IValidatable, IEquatable<HandleType> where HandleType : struct, IHandle<HandleType>
	{
	}
	[VisibleToOtherModules]
	internal interface IValidatable
	{
		bool Valid { get; }
	}
}
namespace UnityEngine
{
	public enum AudioSpeakerMode
	{
		[Obsolete("Raw speaker mode is not supported. Do not use.", true)]
		Raw,
		Mono,
		Stereo,
		Quad,
		Surround,
		Mode5point1,
		Mode7point1,
		Prologic
	}
	public enum AudioDataLoadState
	{
		Unloaded,
		Loading,
		Loaded,
		Failed
	}
	public struct AudioConfiguration
	{
		public AudioSpeakerMode speakerMode;

		public int dspBufferSize;

		public int sampleRate;

		public int numRealVoices;

		public int numVirtualVoices;
	}
	public enum AudioCompressionFormat
	{
		PCM,
		Vorbis,
		ADPCM,
		MP3,
		VAG,
		HEVAG,
		XMA,
		AAC,
		GCADPCM,
		ATRAC9
	}
	public enum AudioClipLoadType
	{
		DecompressOnLoad,
		CompressedInMemory,
		Streaming
	}
	public enum AudioVelocityUpdateMode
	{
		Auto,
		Fixed,
		Dynamic
	}
	public enum FFTWindow
	{
		Rectangular,
		Triangle,
		Hamming,
		Hanning,
		Blackman,
		BlackmanHarris
	}
	public enum AudioRolloffMode
	{
		Logarithmic,
		Linear,
		Custom
	}
	public enum AudioSourceCurveType
	{
		CustomRolloff,
		SpatialBlend,
		ReverbZoneMix,
		Spread
	}
	public enum AudioReverbPreset
	{
		Off,
		Generic,
		PaddedCell,
		Room,
		Bathroom,
		Livingroom,
		Stoneroom,
		Auditorium,
		Concerthall,
		Cave,
		Arena,
		Hangar,
		CarpetedHallway,
		Hallway,
		StoneCorridor,
		Alley,
		Forest,
		City,
		Mountains,
		Quarry,
		Plain,
		ParkingLot,
		SewerPipe,
		Underwater,
		Drugged,
		Dizzy,
		Psychotic,
		User
	}
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeHeader("Modules/Audio/Public/ScriptBindings/Audio.bindings.h")]
	public sealed class AudioSettings
	{
		public delegate void AudioConfigurationChangeHandler(bool deviceWasChanged);

		public static extern AudioSpeakerMode driverCapabilities
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("GetSpeakerModeCaps")]
			get;
		}

		public static AudioSpeakerMode speakerMode
		{
			get
			{
				return GetSpeakerMode();
			}
			set
			{
				Debug.LogWarning((object)"Setting AudioSettings.speakerMode is deprecated and has been replaced by audio project settings and the AudioSettings.GetConfiguration/AudioSettings.Reset API.");
				AudioConfiguration configuration = GetConfiguration();
				configuration.speakerMode = value;
				if (!SetConfiguration(configuration))
				{
					Debug.LogWarning((object)"Setting AudioSettings.speakerMode failed");
				}
			}
		}

		internal static extern int profilerCaptureFlags
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public static extern double dspTime
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod(Name = "GetDSPTime", IsThreadSafe = true)]
			get;
		}

		public static int outputSampleRate
		{
			get
			{
				return GetSampleRate();
			}
			set
			{
				Debug.LogWarning((object)"Setting AudioSettings.outputSampleRate is deprecated and has been replaced by audio project settings and the AudioSettings.GetConfiguration/AudioSettings.Reset API.");
				AudioConfiguration configuration = GetConfiguration();
				configuration.sampleRate = value;
				if (!SetConfiguration(configuration))
				{
					Debug.LogWarning((object)"Setting AudioSettings.outputSampleRate failed");
				}
			}
		}

		internal static extern bool unityAudioDisabled
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("IsAudioDisabled")]
			get;
		}

		public static event AudioConfigurationChangeHandler OnAudioConfigurationChanged;

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern AudioSpeakerMode GetSpeakerMode();

		[NativeThrows]
		[NativeMethod(Name = "AudioSettings::SetConfiguration", IsFreeFunction = true)]
		private static bool SetConfiguration(AudioConfiguration config)
		{
			return SetConfiguration_Injected(ref config);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(Name = "AudioSettings::GetSampleRate", IsFreeFunction = true)]
		private static extern int GetSampleRate();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(Name = "AudioSettings::GetDSPBufferSize", IsFreeFunction = true)]
		public static extern void GetDSPBufferSize(out int bufferLength, out int numBuffers);

		[Obsolete("AudioSettings.SetDSPBufferSize is deprecated and has been replaced by audio project settings and the AudioSettings.GetConfiguration/AudioSettings.Reset API.")]
		public static void SetDSPBufferSize(int bufferLength, int numBuffers)
		{
			Debug.LogWarning((object)"AudioSettings.SetDSPBufferSize is deprecated and has been replaced by audio project settings and the AudioSettings.GetConfiguration/AudioSettings.Reset API.");
			AudioConfiguration configuration = GetConfiguration();
			configuration.dspBufferSize = bufferLength;
			if (!SetConfiguration(configuration))
			{
				Debug.LogWarning((object)"SetDSPBufferSize failed");
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("GetCurrentSpatializerDefinitionName")]
		public static extern string GetSpatializerPluginName();

		public static AudioConfiguration GetConfiguration()
		{
			GetConfiguration_Injected(out var ret);
			return ret;
		}

		public static bool Reset(AudioConfiguration config)
		{
			return SetConfiguration(config);
		}

		[RequiredByNativeCode]
		internal static void InvokeOnAudioConfigurationChanged(bool deviceWasChanged)
		{
			if (AudioSettings.OnAudioConfigurationChanged != null)
			{
				AudioSettings.OnAudioConfigurationChanged(deviceWasChanged);
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(Name = "AudioSettings::GetCurrentAmbisonicDefinitionName", IsFreeFunction = true)]
		internal static extern string GetAmbisonicDecoderPluginName();

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool SetConfiguration_Injected(ref AudioConfiguration config);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void GetConfiguration_Injected(out AudioConfiguration ret);
	}
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeHeader("Modules/Audio/Public/ScriptBindings/Audio.bindings.h")]
	public sealed class AudioClip : Object
	{
		public delegate void PCMReaderCallback(float[] data);

		public delegate void PCMSetPositionCallback(int position);

		[NativeProperty("LengthSec")]
		public extern float length
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		[NativeProperty("SampleCount")]
		public extern int samples
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		[NativeProperty("ChannelCount")]
		public extern int channels
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern int frequency
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		[Obsolete("Use AudioClip.loadState instead to get more detailed information about the loading process.")]
		public extern bool isReadyToPlay
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("ReadyToPlay")]
			get;
		}

		public extern AudioClipLoadType loadType
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern bool preloadAudioData
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern bool ambisonic
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern bool loadInBackground
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern AudioDataLoadState loadState
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod(Name = "AudioClipBindings::GetLoadState", HasExplicitThis = true)]
			get;
		}

		private event PCMReaderCallback m_PCMReaderCallback = null;

		private event PCMSetPositionCallback m_PCMSetPositionCallback = null;

		private AudioClip()
		{
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool GetData(AudioClip clip, [Out] float[] data, int numSamples, int samplesOffset);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool SetData(AudioClip clip, float[] data, int numsamples, int samplesOffset);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern AudioClip Construct_Internal();

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern string GetName();

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void CreateUserSound(string name, int lengthSamples, int channels, int frequency, bool stream);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool LoadAudioData();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool UnloadAudioData();

		public bool GetData(float[] data, int offsetSamples)
		{
			if (channels <= 0)
			{
				Debug.Log((object)("AudioClip.GetData failed; AudioClip " + GetName() + " contains no data"));
				return false;
			}
			int numSamples = ((data != null) ? (data.Length / channels) : 0);
			return GetData(this, data, numSamples, offsetSamples);
		}

		public bool SetData(float[] data, int offsetSamples)
		{
			if (channels <= 0)
			{
				Debug.Log((object)("AudioClip.SetData failed; AudioClip " + GetName() + " contains no data"));
				return false;
			}
			if (offsetSamples < 0 || offsetSamples >= samples)
			{
				throw new ArgumentException("AudioClip.SetData failed; invalid offsetSamples");
			}
			if (data == null || data.Length == 0)
			{
				throw new ArgumentException("AudioClip.SetData failed; invalid data");
			}
			return SetData(this, data, data.Length / channels, offsetSamples);
		}

		[Obsolete("The _3D argument of AudioClip is deprecated. Use the spatialBlend property of AudioSource instead to morph between 2D and 3D playback.")]
		public static AudioClip Create(string name, int lengthSamples, int channels, int frequency, bool _3D, bool stream)
		{
			return Create(name, lengthSamples, channels, frequency, stream);
		}

		[Obsolete("The _3D argument of AudioClip is deprecated. Use the spatialBlend property of AudioSource instead to morph between 2D and 3D playback.")]
		public static AudioClip Create(string name, int lengthSamples, int channels, int frequency, bool _3D, bool stream, PCMReaderCallback pcmreadercallback)
		{
			return Create(name, lengthSamples, channels, frequency, stream, pcmreadercallback, null);
		}

		[Obsolete("The _3D argument of AudioClip is deprecated. Use the spatialBlend property of AudioSource instead to morph between 2D and 3D playback.")]
		public static AudioClip Create(string name, int lengthSamples, int channels, int frequency, bool _3D, bool stream, PCMReaderCallback pcmreadercallback, PCMSetPositionCallback pcmsetpositioncallback)
		{
			return Create(name, lengthSamples, channels, frequency, stream, pcmreadercallback, pcmsetpositioncallback);
		}

		public static AudioClip Create(string name, int lengthSamples, int channels, int frequency, bool stream)
		{
			return Create(name, lengthSamples, channels, frequency, stream, null, null);
		}

		public static AudioClip Create(string name, int lengthSamples, int channels, int frequency, bool stream, PCMReaderCallback pcmreadercallback)
		{
			return Create(name, lengthSamples, channels, frequency, stream, pcmreadercallback, null);
		}

		public static AudioClip Create(string name, int lengthSamples, int channels, int frequency, bool stream, PCMReaderCallback pcmreadercallback, PCMSetPositionCallback pcmsetpositioncallback)
		{
			if (name == null)
			{
				throw new NullReferenceException();
			}
			if (lengthSamples <= 0)
			{
				throw new ArgumentException("Length of created clip must be larger than 0");
			}
			if (channels <= 0)
			{
				throw new ArgumentException("Number of channels in created clip must be greater than 0");
			}
			if (frequency <= 0)
			{
				throw new ArgumentException("Frequency in created clip must be greater than 0");
			}
			AudioClip audioClip = Construct_Internal();
			if (pcmreadercallback != null)
			{
				audioClip.m_PCMReaderCallback += pcmreadercallback;
			}
			if (pcmsetpositioncallback != null)
			{
				audioClip.m_PCMSetPositionCallback += pcmsetpositioncallback;
			}
			audioClip.CreateUserSound(name, lengthSamples, channels, frequency, stream);
			return audioClip;
		}

		[RequiredByNativeCode]
		private void InvokePCMReaderCallback_Internal(float[] data)
		{
			if (this.m_PCMReaderCallback != null)
			{
				this.m_PCMReaderCallback(data);
			}
		}

		[RequiredByNativeCode]
		private void InvokePCMSetPositionCallback_Internal(int position)
		{
			if (this.m_PCMSetPositionCallback != null)
			{
				this.m_PCMSetPositionCallback(position);
			}
		}
	}
	public class AudioBehaviour : Behaviour
	{
	}
	[RequireComponent(typeof(Transform))]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	public sealed class AudioListener : AudioBehaviour
	{
		public static extern float volume
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty("ListenerPause")]
		public static extern bool pause
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern AudioVelocityUpdateMode velocityUpdateMode
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern void GetOutputDataHelper([Out] float[] samples, int channel);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern void GetSpectrumDataHelper([Out] float[] samples, int channel, FFTWindow window);

		[Obsolete("GetOutputData returning a float[] is deprecated, use GetOutputData and pass a pre allocated array instead.")]
		public static float[] GetOutputData(int numSamples, int channel)
		{
			float[] array = new float[numSamples];
			GetOutputDataHelper(array, channel);
			return array;
		}

		public static void GetOutputData(float[] samples, int channel)
		{
			GetOutputDataHelper(samples, channel);
		}

		[Obsolete("GetSpectrumData returning a float[] is deprecated, use GetSpectrumData and pass a pre allocated array instead.")]
		public static float[] GetSpectrumData(int numSamples, int channel, FFTWindow window)
		{
			float[] array = new float[numSamples];
			GetSpectrumDataHelper(array, channel, window);
			return array;
		}

		public static void GetSpectrumData(float[] samples, int channel, FFTWindow window)
		{
			GetSpectrumDataHelper(samples, channel, window);
		}
	}
	[RequireComponent(typeof(Transform))]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	public sealed class AudioSource : AudioBehaviour
	{
		public extern float volume
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public float pitch
		{
			get
			{
				return GetPitch(this);
			}
			set
			{
				SetPitch(this, value);
			}
		}

		[NativeProperty("SecPosition")]
		public extern float time
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty("SamplePosition")]
		public extern int timeSamples
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod(IsThreadSafe = true)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod(IsThreadSafe = true)]
			set;
		}

		[NativeProperty("AudioClip")]
		public extern AudioClip clip
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern AudioMixerGroup outputAudioMixerGroup
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool isPlaying
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("IsPlayingScripting")]
			get;
		}

		public extern bool isVirtual
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("GetLastVirtualState")]
			get;
		}

		public extern bool loop
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool ignoreListenerVolume
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool playOnAwake
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool ignoreListenerPause
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern AudioVelocityUpdateMode velocityUpdateMode
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty("StereoPan")]
		public extern float panStereo
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty("SpatialBlendMix")]
		public extern float spatialBlend
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool spatialize
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool spatializePostEffects
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float reverbZoneMix
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool bypassEffects
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool bypassListenerEffects
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool bypassReverbZones
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float dopplerLevel
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float spread
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern int priority
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool mute
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float minDistance
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float maxDistance
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern AudioRolloffMode rolloffMode
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[Obsolete("minVolume is not supported anymore. Use min-, maxDistance and rolloffMode instead.", true)]
		public float minVolume
		{
			get
			{
				Debug.LogError((object)"minVolume is not supported anymore. Use min-, maxDistance and rolloffMode instead.");
				return 0f;
			}
			set
			{
				Debug.LogError((object)"minVolume is not supported anymore. Use min-, maxDistance and rolloffMode instead.");
			}
		}

		[Obsolete("maxVolume is not supported anymore. Use min-, maxDistance and rolloffMode instead.", true)]
		public float maxVolume
		{
			get
			{
				Debug.LogError((object)"maxVolume is not supported anymore. Use min-, maxDistance and rolloffMode instead.");
				return 0f;
			}
			set
			{
				Debug.LogError((object)"maxVolume is not supported anymore. Use min-, maxDistance and rolloffMode instead.");
			}
		}

		[Obsolete("rolloffFactor is not supported anymore. Use min-, maxDistance and rolloffMode instead.", true)]
		public float rolloffFactor
		{
			get
			{
				Debug.LogError((object)"rolloffFactor is not supported anymore. Use min-, maxDistance and rolloffMode instead.");
				return 0f;
			}
			set
			{
				Debug.LogError((object)"rolloffFactor is not supported anymore. Use min-, maxDistance and rolloffMode instead.");
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern float GetPitch(AudioSource source);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void SetPitch(AudioSource source, float pitch);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void PlayHelper(AudioSource source, ulong delay);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void Play(double delay);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void PlayOneShotHelper(AudioSource source, AudioClip clip, float volumeScale);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void Stop(bool stopOneShots);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern void SetCustomCurveHelper(AudioSource source, AudioSourceCurveType type, AnimationCurve curve);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern AnimationCurve GetCustomCurveHelper(AudioSource source, AudioSourceCurveType type);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void GetOutputDataHelper(AudioSource source, [Out] float[] samples, int channel);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern void GetSpectrumDataHelper(AudioSource source, [Out] float[] samples, int channel, FFTWindow window);

		[ExcludeFromDocs]
		public void Play()
		{
			PlayHelper(this, 0uL);
		}

		public void Play([DefaultValue("0")] ulong delay)
		{
			PlayHelper(this, delay);
		}

		public void PlayDelayed(float delay)
		{
			Play((!(delay < 0f)) ? (0.0 - (double)delay) : 0.0);
		}

		public void PlayScheduled(double time)
		{
			Play((!(time < 0.0)) ? time : 0.0);
		}

		[ExcludeFromDocs]
		public void PlayOneShot(AudioClip clip)
		{
			PlayOneShot(clip, 1f);
		}

		public void PlayOneShot(AudioClip clip, [DefaultValue("1.0F")] float volumeScale)
		{
			if ((Object)(object)clip == (Object)null)
			{
				Debug.LogWarning((object)"PlayOneShot was called with a null AudioClip.");
			}
			else
			{
				PlayOneShotHelper(this, clip, volumeScale);
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void SetScheduledStartTime(double time);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void SetScheduledEndTime(double time);

		public void Stop()
		{
			Stop(stopOneShots: true);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void Pause();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void UnPause();

		[ExcludeFromDocs]
		public static void PlayClipAtPoint(AudioClip clip, Vector3 position)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			PlayClipAtPoint(clip, position, 1f);
		}

		public static void PlayClipAtPoint(AudioClip clip, Vector3 position, [DefaultValue("1.0F")] float volume)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject("One shot audio");
			val.transform.position = position;
			AudioSource audioSource = (AudioSource)(object)val.AddComponent(typeof(AudioSource));
			audioSource.clip = clip;
			audioSource.spatialBlend = 1f;
			audioSource.volume = volume;
			audioSource.Play();
			Object.Destroy((Object)(object)val, clip.length * ((!(Time.timeScale < 0.01f)) ? Time.timeScale : 0.01f));
		}

		public void SetCustomCurve(AudioSourceCurveType type, AnimationCurve curve)
		{
			SetCustomCurveHelper(this, type, curve);
		}

		public AnimationCurve GetCustomCurve(AudioSourceCurveType type)
		{
			return GetCustomCurveHelper(this, type);
		}

		[Obsolete("GetOutputData returning a float[] is deprecated, use GetOutputData and pass a pre allocated array instead.")]
		public float[] GetOutputData(int numSamples, int channel)
		{
			float[] array = new float[numSamples];
			GetOutputDataHelper(this, array, channel);
			return array;
		}

		public void GetOutputData(float[] samples, int channel)
		{
			GetOutputDataHelper(this, samples, channel);
		}

		[Obsolete("GetSpectrumData returning a float[] is deprecated, use GetSpectrumData and pass a pre allocated array instead.")]
		public float[] GetSpectrumData(int numSamples, int channel, FFTWindow window)
		{
			float[] array = new float[numSamples];
			GetSpectrumDataHelper(this, array, channel, window);
			return array;
		}

		public void GetSpectrumData(float[] samples, int channel, FFTWindow window)
		{
			GetSpectrumDataHelper(this, samples, channel, window);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool SetSpatializerFloat(int index, float value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool GetSpatializerFloat(int index, out float value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool GetAmbisonicDecoderFloat(int index, out float value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool SetAmbisonicDecoderFloat(int index, float value);
	}
	[NativeHeader("Modules/Audio/Public/AudioReverbZone.h")]
	[RequireComponent(typeof(Transform))]
	public sealed class AudioReverbZone : Behaviour
	{
		public extern float minDistance
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float maxDistance
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern AudioReverbPreset reverbPreset
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern int room
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern int roomHF
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern int roomLF
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float decayTime
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float decayHFRatio
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern int reflections
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float reflectionsDelay
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern int reverb
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float reverbDelay
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float HFReference
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float LFReference
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[Obsolete("Warning! roomRolloffFactor is no longer supported.")]
		public float roomRolloffFactor
		{
			get
			{
				Debug.LogWarning((object)"Warning! roomRolloffFactor is no longer supported.");
				return 10f;
			}
			set
			{
				Debug.LogWarning((object)"Warning! roomRolloffFactor is no longer supported.");
			}
		}

		public extern float diffusion
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float density
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}
	}
	[RequireComponent(typeof(AudioBehaviour))]
	public sealed class AudioLowPassFilter : Behaviour
	{
		public AnimationCurve customCutoffCurve
		{
			get
			{
				return GetCustomLowpassLevelCurveCopy();
			}
			set
			{
				SetCustomLowpassLevelCurveHelper(this, value);
			}
		}

		public extern float cutoffFrequency
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float lowpassResonanceQ
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern AnimationCurve GetCustomLowpassLevelCurveCopy();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(Name = "AudioLowPassFilterBindings::SetCustomLowpassLevelCurveHelper", IsFreeFunction = true)]
		[NativeThrows]
		private static extern void SetCustomLowpassLevelCurveHelper(AudioLowPassFilter source, AnimationCurve curve);
	}
	[RequireComponent(typeof(AudioBehaviour))]
	public sealed class AudioHighPassFilter : Behaviour
	{
		public extern float cutoffFrequency
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float highpassResonanceQ
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}
	}
	[RequireComponent(typeof(AudioBehaviour))]
	public sealed class AudioDistortionFilter : Behaviour
	{
		public extern float distortionLevel
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}
	}
	[RequireComponent(typeof(AudioBehaviour))]
	public sealed class AudioEchoFilter : Behaviour
	{
		public extern float delay
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float decayRatio
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float dryMix
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float wetMix
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}
	}
	[RequireComponent(typeof(AudioBehaviour))]
	public sealed class AudioChorusFilter : Behaviour
	{
		public extern float dryMix
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float wetMix1
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float wetMix2
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float wetMix3
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float delay
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float rate
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float depth
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[Obsolete("Warning! Feedback is deprecated. This property does nothing.")]
		public float feedback
		{
			get
			{
				Debug.LogWarning((object)"Warning! Feedback is deprecated. This property does nothing.");
				return 0f;
			}
			set
			{
				Debug.LogWarning((object)"Warning! Feedback is deprecated. This property does nothing.");
			}
		}
	}
	[RequireComponent(typeof(AudioBehaviour))]
	public sealed class AudioReverbFilter : Behaviour
	{
		public extern AudioReverbPreset reverbPreset
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float dryLevel
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float room
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float roomHF
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[Obsolete("Warning! roomRolloffFactor is no longer supported.")]
		public float roomRolloffFactor
		{
			get
			{
				Debug.LogWarning((object)"Warning! roomRolloffFactor is no longer supported.");
				return 10f;
			}
			set
			{
				Debug.LogWarning((object)"Warning! roomRolloffFactor is no longer supported.");
			}
		}

		public extern float decayTime
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float decayHFRatio
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float reflectionsLevel
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float reflectionsDelay
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float reverbLevel
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float reverbDelay
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float diffusion
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float density
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public float hfReference { get; set; }

		public extern float roomLF
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public float lfReference { get; set; }
	}
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	public sealed class Microphone
	{
		public static extern string[] devices
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("GetRecordDevices")]
			get;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsThreadSafe = true)]
		private static extern int GetMicrophoneDeviceIDFromName(string name);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern AudioClip StartRecord(int deviceID, bool loop, float lengthSec, int frequency);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void EndRecord(int deviceID);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool IsRecording(int deviceID);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsThreadSafe = true)]
		private static extern int GetRecordPosition(int deviceID);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void GetDeviceCaps(int deviceID, out int minFreq, out int maxFreq);

		public static AudioClip Start(string deviceName, bool loop, int lengthSec, int frequency)
		{
			int microphoneDeviceIDFromName = GetMicrophoneDeviceIDFromName(deviceName);
			if (microphoneDeviceIDFromName == -1)
			{
				throw new ArgumentException("Couldn't acquire device ID for device name " + deviceName);
			}
			if (lengthSec <= 0)
			{
				throw new ArgumentException("Length of recording must be greater than zero seconds (was: " + lengthSec + " seconds)");
			}
			if (lengthSec > 3600)
			{
				throw new ArgumentException("Length of recording must be less than one hour (was: " + lengthSec + " seconds)");
			}
			if (frequency <= 0)
			{
				throw new ArgumentException("Frequency of recording must be greater than zero (was: " + frequency + " Hz)");
			}
			return StartRecord(microphoneDeviceIDFromName, loop, lengthSec, frequency);
		}

		public static void End(string deviceName)
		{
			int microphoneDeviceIDFromName = GetMicrophoneDeviceIDFromName(deviceName);
			if (microphoneDeviceIDFromName != -1)
			{
				EndRecord(microphoneDeviceIDFromName);
			}
		}

		public static bool IsRecording(string deviceName)
		{
			int microphoneDeviceIDFromName = GetMicrophoneDeviceIDFromName(deviceName);
			if (microphoneDeviceIDFromName == -1)
			{
				return false;
			}
			return IsRecording(microphoneDeviceIDFromName);
		}

		public static int GetPosition(string deviceName)
		{
			int microphoneDeviceIDFromName = GetMicrophoneDeviceIDFromName(deviceName);
			if (microphoneDeviceIDFromName == -1)
			{
				return 0;
			}
			return GetRecordPosition(microphoneDeviceIDFromName);
		}

		public static void GetDeviceCaps(string deviceName, out int minFreq, out int maxFreq)
		{
			minFreq = 0;
			maxFreq = 0;
			int microphoneDeviceIDFromName = GetMicrophoneDeviceIDFromName(deviceName);
			if (microphoneDeviceIDFromName != -1)
			{
				GetDeviceCaps(microphoneDeviceIDFromName, out minFreq, out maxFreq);
			}
		}
	}
}
namespace UnityEngine.Experimental.Audio
{
	[NativeHeader("AudioScriptingClasses.h")]
	[NativeHeader("Modules/Audio/Public/AudioClip.h")]
	[NativeHeader("Modules/Audio/Public/ScriptBindings/AudioClipExtensions.bindings.h")]
	internal static class AudioClipExtensionsInternal
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
		public static extern uint Internal_CreateAudioClipSampleProvider(this AudioClip audioClip, ulong start, long end, bool loop, bool allowDrop);
	}
}
namespace UnityEngine.Audio
{
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeHeader("Modules/Audio/Public/ScriptBindings/AudioClipPlayable.bindings.h")]
	[NativeHeader("Modules/Audio/Public/Director/AudioClipPlayable.h")]
	[NativeHeader("Runtime/Director/Core/HPlayable.h")]
	[RequiredByNativeCode]
	public struct AudioClipPlayable : IPlayable, IEquatable<AudioClipPlayable>
	{
		private PlayableHandle m_Handle;

		internal AudioClipPlayable(PlayableHandle handle)
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			if (((PlayableHandle)(ref handle)).IsValid() && !((PlayableHandle)(ref handle)).IsPlayableOfType<AudioClipPlayable>())
			{
				throw new InvalidCastException("Can't set handle: the playable is not an AudioClipPlayable.");
			}
			m_Handle = handle;
		}

		public static AudioClipPlayable Create(PlayableGraph graph, AudioClip clip, bool looping)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			PlayableHandle handle = CreateHandle(graph, clip, looping);
			AudioClipPlayable audioClipPlayable = new AudioClipPlayable(handle);
			if ((Object)(object)clip != (Object)null)
			{
				PlayableExtensions.SetDuration<AudioClipPlayable>(audioClipPlayable, (double)clip.length);
			}
			return audioClipPlayable;
		}

		private static PlayableHandle CreateHandle(PlayableGraph graph, AudioClip clip, bool looping)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			PlayableHandle handle = PlayableHandle.Null;
			if (!InternalCreateAudioClipPlayable(ref graph, clip, looping, ref handle))
			{
				return PlayableHandle.Null;
			}
			return handle;
		}

		public PlayableHandle GetHandle()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			return m_Handle;
		}

		public static implicit operator Playable(AudioClipPlayable playable)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			return new Playable(playable.GetHandle());
		}

		public static explicit operator AudioClipPlayable(Playable playable)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			return new AudioClipPlayable(((Playable)(ref playable)).GetHandle());
		}

		public bool Equals(AudioClipPlayable other)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			return GetHandle() == other.GetHandle();
		}

		public AudioClip GetClip()
		{
			return GetClipInternal(ref m_Handle);
		}

		public void SetClip(AudioClip value)
		{
			SetClipInternal(ref m_Handle, value);
		}

		public bool GetLooped()
		{
			return GetLoopedInternal(ref m_Handle);
		}

		public void SetLooped(bool value)
		{
			SetLoopedInternal(ref m_Handle, value);
		}

		internal float GetVolume()
		{
			return GetVolumeInternal(ref m_Handle);
		}

		internal void SetVolume(float value)
		{
			if (value < 0f || value > 1f)
			{
				throw new ArgumentException("Trying to set AudioClipPlayable volume outside of range (0.0 - 1.0): " + value);
			}
			SetVolumeInternal(ref m_Handle, value);
		}

		internal float GetStereoPan()
		{
			return GetStereoPanInternal(ref m_Handle);
		}

		internal void SetStereoPan(float value)
		{
			if (value < -1f || value > 1f)
			{
				throw new ArgumentException("Trying to set AudioClipPlayable stereo pan outside of range (-1.0 - 1.0): " + value);
			}
			SetStereoPanInternal(ref m_Handle, value);
		}

		internal float GetSpatialBlend()
		{
			return GetSpatialBlendInternal(ref m_Handle);
		}

		internal void SetSpatialBlend(float value)
		{
			if (value < 0f || value > 1f)
			{
				throw new ArgumentException("Trying to set AudioClipPlayable spatial blend outside of range (0.0 - 1.0): " + value);
			}
			SetSpatialBlendInternal(ref m_Handle, value);
		}

		[Obsolete("IsPlaying() has been deprecated. Use IsChannelPlaying() instead (UnityUpgradable) -> IsChannelPlaying()", true)]
		[EditorBrowsable(EditorBrowsableState.Never)]
		public bool IsPlaying()
		{
			return IsChannelPlaying();
		}

		public bool IsChannelPlaying()
		{
			return GetIsChannelPlayingInternal(ref m_Handle);
		}

		public double GetStartDelay()
		{
			return GetStartDelayInternal(ref m_Handle);
		}

		internal void SetStartDelay(double value)
		{
			SetStartDelayInternal(ref m_Handle, value);
		}

		public double GetPauseDelay()
		{
			return GetPauseDelayInternal(ref m_Handle);
		}

		internal void GetPauseDelay(double value)
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Invalid comparison between Unknown and I4
			double pauseDelayInternal = GetPauseDelayInternal(ref m_Handle);
			if ((int)((PlayableHandle)(ref m_Handle)).GetPlayState() == 1 && (value < 0.05 || (pauseDelayInternal != 0.0 && pauseDelayInternal < 0.05)))
			{
				throw new ArgumentException("AudioClipPlayable.pauseDelay: Setting new delay when existing delay is too small or 0.0 (" + pauseDelayInternal + "), audio system will not be able to change in time");
			}
			SetPauseDelayInternal(ref m_Handle, value);
		}

		public void Seek(double startTime, double startDelay)
		{
			Seek(startTime, startDelay, 0.0);
		}

		public void Seek(double startTime, double startDelay, [DefaultValue("0")] double duration)
		{
			SetStartDelayInternal(ref m_Handle, startDelay);
			if (duration > 0.0)
			{
				((PlayableHandle)(ref m_Handle)).SetDuration(duration + startTime);
				SetPauseDelayInternal(ref m_Handle, startDelay + duration);
			}
			else
			{
				((PlayableHandle)(ref m_Handle)).SetDuration(double.MaxValue);
				SetPauseDelayInternal(ref m_Handle, 0.0);
			}
			((PlayableHandle)(ref m_Handle)).SetTime(startTime);
			((PlayableHandle)(ref m_Handle)).Play();
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern AudioClip GetClipInternal(ref PlayableHandle hdl);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern void SetClipInternal(ref PlayableHandle hdl, AudioClip clip);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern bool GetLoopedInternal(ref PlayableHandle hdl);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern void SetLoopedInternal(ref PlayableHandle hdl, bool looped);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern float GetVolumeInternal(ref PlayableHandle hdl);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern void SetVolumeInternal(ref PlayableHandle hdl, float volume);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern float GetStereoPanInternal(ref PlayableHandle hdl);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern void SetStereoPanInternal(ref PlayableHandle hdl, float stereoPan);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern float GetSpatialBlendInternal(ref PlayableHandle hdl);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern void SetSpatialBlendInternal(ref PlayableHandle hdl, float spatialBlend);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern bool GetIsChannelPlayingInternal(ref PlayableHandle hdl);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern double GetStartDelayInternal(ref PlayableHandle hdl);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern void SetStartDelayInternal(ref PlayableHandle hdl, double delay);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern double GetPauseDelayInternal(ref PlayableHandle hdl);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern void SetPauseDelayInternal(ref PlayableHandle hdl, double delay);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern bool InternalCreateAudioClipPlayable(ref PlayableGraph graph, AudioClip clip, bool looping, ref PlayableHandle handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern bool ValidateType(ref PlayableHandle hdl);
	}
	[NativeHeader("Runtime/Director/Core/HPlayable.h")]
	[NativeHeader("Modules/Audio/Public/ScriptBindings/AudioMixerPlayable.bindings.h")]
	[NativeHeader("Modules/Audio/Public/Director/AudioMixerPlayable.h")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[RequiredByNativeCode]
	public struct AudioMixerPlayable : IPlayable, IEquatable<AudioMixerPlayable>
	{
		private PlayableHandle m_Handle;

		internal AudioMixerPlayable(PlayableHandle handle)
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			if (((PlayableHandle)(ref handle)).IsValid() && !((PlayableHandle)(ref handle)).IsPlayableOfType<AudioMixerPlayable>())
			{
				throw new InvalidCastException("Can't set handle: the playable is not an AudioMixerPlayable.");
			}
			m_Handle = handle;
		}

		public static AudioMixerPlayable Create(PlayableGraph graph, int inputCount = 0, bool normalizeInputVolumes = false)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			PlayableHandle handle = CreateHandle(graph, inputCount, normalizeInputVolumes);
			return new AudioMixerPlayable(handle);
		}

		private static PlayableHandle CreateHandle(PlayableGraph graph, int inputCount, bool normalizeInputVolumes)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			PlayableHandle handle = PlayableHandle.Null;
			if (!CreateAudioMixerPlayableInternal(ref graph, normalizeInputVolumes, ref handle))
			{
				return PlayableHandle.Null;
			}
			((PlayableHandle)(ref handle)).SetInputCount(inputCount);
			return handle;
		}

		public PlayableHandle GetHandle()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			return m_Handle;
		}

		public static implicit operator Playable(AudioMixerPlayable playable)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			return new Playable(playable.GetHandle());
		}

		public static explicit operator AudioMixerPlayable(Playable playable)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			return new AudioMixerPlayable(((Playable)(ref playable)).GetHandle());
		}

		public bool Equals(AudioMixerPlayable other)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			return GetHandle() == other.GetHandle();
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern bool CreateAudioMixerPlayableInternal(ref PlayableGraph graph, bool normalizeInputVolumes, ref PlayableHandle handle);
	}
	public static class AudioPlayableBinding
	{
		public static PlayableBinding Create(string name, Object key)
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Expected O, but got Unknown
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			return PlayableBinding.CreateInternal(name, key, typeof(AudioSource), new CreateOutputMethod(CreateAudioOutput));
		}

		private static PlayableOutput CreateAudioOutput(PlayableGraph graph, string name)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			return AudioPlayableOutput.Create(graph, name, null);
		}
	}
	[NativeHeader("Modules/Audio/Public/ScriptBindings/AudioPlayableGraphExtensions.bindings.h")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeHeader("Runtime/Director/Core/HPlayableOutput.h")]
	internal static class AudioPlayableGraphExtensions
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		internal static extern bool InternalCreateAudioOutput(ref PlayableGraph graph, string name, out PlayableOutputHandle handle);
	}
	[NativeHeader("Modules/Audio/Public/ScriptBindings/AudioPlayableOutput.bindings.h")]
	[RequiredByNativeCode]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeHeader("Modules/Audio/Public/AudioSource.h")]
	[NativeHeader("Modules/Audio/Public/Director/AudioPlayableOutput.h")]
	public struct AudioPlayableOutput : IPlayableOutput
	{
		private PlayableOutputHandle m_Handle;

		public static AudioPlayableOutput Null => new AudioPlayableOutput(PlayableOutputHandle.Null);

		internal AudioPlayableOutput(PlayableOutputHandle handle)
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			if (((PlayableOutputHandle)(ref handle)).IsValid() && !((PlayableOutputHandle)(ref handle)).IsPlayableOutputOfType<AudioPlayableOutput>())
			{
				throw new InvalidCastException("Can't set handle: the playable is not an AudioPlayableOutput.");
			}
			m_Handle = handle;
		}

		public static AudioPlayableOutput Create(PlayableGraph graph, string name, AudioSource target)
		{
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			if (!AudioPlayableGraphExtensions.InternalCreateAudioOutput(ref graph, name, out var handle))
			{
				return Null;
			}
			AudioPlayableOutput result = new AudioPlayableOutput(handle);
			result.SetTarget(target);
			return result;
		}

		public PlayableOutputHandle GetHandle()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			return m_Handle;
		}

		public static implicit operator PlayableOutput(AudioPlayableOutput output)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			return new PlayableOutput(output.GetHandle());
		}

		public static explicit operator AudioPlayableOutput(PlayableOutput output)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			return new AudioPlayableOutput(((PlayableOutput)(ref output)).GetHandle());
		}

		public AudioSource GetTarget()
		{
			return InternalGetTarget(ref m_Handle);
		}

		public void SetTarget(AudioSource value)
		{
			InternalSetTarget(ref m_Handle, value);
		}

		public bool GetEvaluateOnSeek()
		{
			return InternalGetEvaluateOnSeek(ref m_Handle);
		}

		public void SetEvaluateOnSeek(bool value)
		{
			InternalSetEvaluateOnSeek(ref m_Handle, value);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern AudioSource InternalGetTarget(ref PlayableOutputHandle output);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern void InternalSetTarget(ref PlayableOutputHandle output, AudioSource target);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern bool InternalGetEvaluateOnSeek(ref PlayableOutputHandle output);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern void InternalSetEvaluateOnSeek(ref PlayableOutputHandle output, bool value);
	}
}
namespace UnityEngine
{
	[NativeType(Header = "Modules/Audio/Public/ScriptBindings/AudioRenderer.bindings.h")]
	public class AudioRenderer
	{
		public static bool Start()
		{
			return Internal_AudioRenderer_Start();
		}

		public static bool Stop()
		{
			return Internal_AudioRenderer_Stop();
		}

		public static int GetSampleCountForCaptureFrame()
		{
			return Internal_AudioRenderer_GetSampleCountForCaptureFrame();
		}

		internal unsafe static bool AddMixerGroupSink(AudioMixerGroup mixerGroup, NativeArray<float> buffer, bool excludeFromMix)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			return Internal_AudioRenderer_AddMixerGroupSink(mixerGroup, NativeArrayUnsafeUtility.GetUnsafePtr<float>(buffer), buffer.Length, excludeFromMix);
		}

		public unsafe static bool Render(NativeArray<float> buffer)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return Internal_AudioRenderer_Render(NativeArrayUnsafeUtility.GetUnsafePtr<float>(buffer), buffer.Length);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool Internal_AudioRenderer_Start();

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool Internal_AudioRenderer_Stop();

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern int Internal_AudioRenderer_GetSampleCountForCaptureFrame();

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal unsafe static extern bool Internal_AudioRenderer_AddMixerGroupSink(AudioMixerGroup mixerGroup, void* ptr, int length, bool excludeFromMix);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal unsafe static extern bool Internal_AudioRenderer_Render(void* ptr, int length);
	}
}
namespace UnityEngine.Experimental.Audio
{
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeType(Header = "Modules/Audio/Public/ScriptBindings/AudioSampleProvider.bindings.h")]
	public class AudioSampleProvider : IDisposable
	{
		[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
		public delegate uint ConsumeSampleFramesNativeFunction(uint providerId, IntPtr interleavedSampleFrames, uint sampleFrameCount);

		public delegate void SampleFramesHandler(AudioSampleProvider provider, uint sampleFrameCount);

		[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
		public delegate void SampleFramesEventNativeFunction(IntPtr userData, uint providerId, uint sampleFrameCount);

		private ConsumeSampleFramesNativeFunction m_ConsumeSampleFramesNativeFunction;

		public uint id { get; private set; }

		public ushort trackIndex { get; private set; }

		public Object owner { get; private set; }

		public bool valid => InternalIsValid(id);

		public ushort channelCount { get; private set; }

		public uint sampleRate { get; private set; }

		public uint maxSampleFrameCount => InternalGetMaxSampleFrameCount(id);

		public uint availableSampleFrameCount => InternalGetAvailableSampleFrameCount(id);

		public uint freeSampleFrameCount => InternalGetFreeSampleFrameCount(id);

		public uint freeSampleFrameCountLowThreshold
		{
			get
			{
				return InternalGetFreeSampleFrameCountLowThreshold(id);
			}
			set
			{
				InternalSetFreeSampleFrameCountLowThreshold(id, value);
			}
		}

		public bool enableSampleFramesAvailableEvents
		{
			get
			{
				return InternalGetEnableSampleFramesAvailableEvents(id);
			}
			set
			{
				InternalSetEnableSampleFramesAvailableEvents(id, value);
			}
		}

		public bool enableSilencePadding
		{
			get
			{
				return InternalGetEnableSilencePadding(id);
			}
			set
			{
				InternalSetEnableSilencePadding(id, value);
			}
		}

		public static ConsumeSampleFramesNativeFunction consumeSampleFramesNativeFunction => (ConsumeSampleFramesNativeFunction)Marshal.GetDelegateForFunctionPointer(InternalGetConsumeSampleFramesNativeFunctionPtr(), typeof(ConsumeSampleFramesNativeFunction));

		public event SampleFramesHandler sampleFramesAvailable;

		public event SampleFramesHandler sampleFramesOverflow;

		private AudioSampleProvider(uint providerId, Object ownerObj, ushort trackIdx)
		{
			owner = ownerObj;
			id = providerId;
			trackIndex = trackIdx;
			m_ConsumeSampleFramesNativeFunction = (ConsumeSampleFramesNativeFunction)Marshal.GetDelegateForFunctionPointer(InternalGetConsumeSampleFramesNativeFunctionPtr(), typeof(ConsumeSampleFramesNativeFunction));
			ushort chCount = 0;
			uint sRate = 0u;
			InternalGetFormatInfo(providerId, out chCount, out sRate);
			channelCount = chCount;
			sampleRate = sRate;
			InternalSetScriptingPtr(providerId, this);
		}

		[VisibleToOtherModules]
		internal static AudioSampleProvider Lookup(uint providerId, Object ownerObj, ushort trackIndex)
		{
			AudioSampleProvider audioSampleProvider = InternalGetScriptingPtr(providerId);
			if (audioSampleProvider != null || !InternalIsValid(providerId))
			{
				return audioSampleProvider;
			}
			return new AudioSampleProvider(providerId, ownerObj, trackIndex);
		}

		internal static AudioSampleProvider Create(ushort channelCount, uint sampleRate)
		{
			uint providerId = InternalCreateSampleProvider(channelCount, sampleRate);
			if (!InternalIsValid(providerId))
			{
				return null;
			}
			return new AudioSampleProvider(providerId, null, 0);
		}

		~AudioSampleProvider()
		{
			owner = null;
			Dispose();
		}

		public void Dispose()
		{
			if (id != 0)
			{
				InternalSetScriptingPtr(id, null);
				if (owner == (Object)null)
				{
					InternalRemove(id);
				}
				id = 0u;
			}
			GC.SuppressFinalize(this);
		}

		public unsafe uint ConsumeSampleFrames(NativeArray<float> sampleFrames)
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			if (channelCount == 0)
			{
				return 0u;
			}
			return m_ConsumeSampleFramesNativeFunction(id, (IntPtr)NativeArrayUnsafeUtility.GetUnsafePtr<float>(sampleFrames), (uint)sampleFrames.Length / (uint)channelCount);
		}

		internal unsafe uint QueueSampleFrames(NativeArray<float> sampleFrames)
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			if (channelCount == 0)
			{
				return 0u;
			}
			return InternalQueueSampleFrames(id, (IntPtr)NativeArrayUnsafeUtility.GetUnsafeReadOnlyPtr<float>(sampleFrames), (uint)(sampleFrames.Length / channelCount));
		}

		public void SetSampleFramesAvailableNativeHandler(SampleFramesEventNativeFunction handler, IntPtr userData)
		{
			InternalSetSampleFramesAvailableNativeHandler(id, Marshal.GetFunctionPointerForDelegate((Delegate)handler), userData);
		}

		public void ClearSampleFramesAvailableNativeHandler()
		{
			InternalClearSampleFramesAvailableNativeHandler(id);
		}

		public void SetSampleFramesOverflowNativeHandler(SampleFramesEventNativeFunction handler, IntPtr userData)
		{
			InternalSetSampleFramesOverflowNativeHandler(id, Marshal.GetFunctionPointerForDelegate((Delegate)handler), userData);
		}

		public void ClearSampleFramesOverflowNativeHandler()
		{
			InternalClearSampleFramesOverflowNativeHandler(id);
		}

		[RequiredByNativeCode]
		private void InvokeSampleFramesAvailable(int sampleFrameCount)
		{
			if (this.sampleFramesAvailable != null)
			{
				this.sampleFramesAvailable(this, (uint)sampleFrameCount);
			}
		}

		[RequiredByNativeCode]
		private void InvokeSampleFramesOverflow(int droppedSampleFrameCount)
		{
			if (this.sampleFramesOverflow != null)
			{
				this.sampleFramesOverflow(this, (uint)droppedSampleFrameCount);
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsThreadSafe = true)]
		private static extern uint InternalCreateSampleProvider(ushort channelCount, uint sampleRate);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsThreadSafe = true)]
		internal static extern void InternalRemove(uint providerId);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsThreadSafe = true)]
		private static extern void InternalGetFormatInfo(uint providerId, out ushort chCount, out uint sRate);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern AudioSampleProvider InternalGetScriptingPtr(uint providerId);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsThreadSafe = true)]
		private static extern void InternalSetScriptingPtr(uint providerId, AudioSampleProvider provider);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsThreadSafe = true)]
		internal static extern bool InternalIsValid(uint providerId);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsThreadSafe = true)]
		private static extern uint InternalGetMaxSampleFrameCount(uint providerId);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsThreadSafe = true)]
		private static extern uint InternalGetAvailableSampleFrameCount(uint providerId);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsThreadSafe = true)]
		private static extern uint InternalGetFreeSampleFrameCount(uint providerId);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsThreadSafe = true)]
		private static extern uint InternalGetFreeSampleFrameCountLowThreshold(uint providerId);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsThreadSafe = true)]
		private static extern void InternalSetFreeSampleFrameCountLowThreshold(uint providerId, uint sampleFrameCount);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsThreadSafe = true)]
		private static extern bool InternalGetEnableSampleFramesAvailableEvents(uint providerId);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsThreadSafe = true)]
		private static extern void InternalSetEnableSampleFramesAvailableEvents(uint providerId, bool enable);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalSetSampleFramesAvailableNativeHandler(uint providerId, IntPtr handler, IntPtr userData);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalClearSampleFramesAvailableNativeHandler(uint providerId);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalSetSampleFramesOverflowNativeHandler(uint providerId, IntPtr handler, IntPtr userData);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalClearSampleFramesOverflowNativeHandler(uint providerId);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsThreadSafe = true)]
		private static extern bool InternalGetEnableSilencePadding(uint id);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsThreadSafe = true)]
		private static extern void InternalSetEnableSilencePadding(uint id, bool enabled);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsThreadSafe = true)]
		private static extern IntPtr InternalGetConsumeSampleFramesNativeFunctionPtr();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsThreadSafe = true)]
		private static extern uint InternalQueueSampleFrames(uint id, IntPtr interleavedSampleFrames, uint sampleFrameCount);
	}
	[NativeHeader("AudioScriptingClasses.h")]
	[NativeHeader("Modules/Audio/Public/AudioSource.h")]
	[NativeHeader("Modules/Audio/Public/ScriptBindings/AudioSourceExtensions.bindings.h")]
	internal static class AudioSourceExtensionsInternal
	{
		public static void RegisterSampleProvider(this AudioSource source, AudioSampleProvider provider)
		{
			Internal_RegisterSampleProviderWithAudioSource(source, provider.id);
		}

		public static void UnregisterSampleProvider(this AudioSource source, AudioSampleProvider provider)
		{
			Internal_UnregisterSampleProviderFromAudioSource(source, provider.id);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
		private static extern void Internal_RegisterSampleProviderWithAudioSource(AudioSource source, uint providerId);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
		private static extern void Internal_UnregisterSampleProviderFromAudioSource(AudioSource source, uint providerId);
	}
}
namespace UnityEngine
{
	public enum WebCamFlags
	{
		FrontFacing = 1,
		AutoFocusPointSupported
	}
	public enum WebCamKind
	{
		WideAngle = 1,
		Telephoto,
		ColorAndDepth
	}
	[UsedByNativeCode]
	public struct WebCamDevice
	{
		internal string m_Name;

		internal string m_DepthCameraName;

		internal int m_Flags;

		internal WebCamKind m_Kind;

		internal Resolution[] m_Resolutions;

		public string name => m_Name;

		public bool isFrontFacing => (m_Flags & 1) != 0;

		public WebCamKind kind => m_Kind;

		public string depthCameraName => (!(m_DepthCameraName == "")) ? m_DepthCameraName : null;

		public bool isAutoFocusPointSupported => (m_Flags & 2) != 0;

		public Resolution[] availableResolutions => m_Resolutions;
	}
	[NativeHeader("Runtime/Video/BaseWebCamTexture.h")]
	public sealed class WebCamTexture : Texture
	{
		public Vector2? autoFocusPoint
		{
			get
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_0028: Unknown result type (might be due to invalid IL or missing references)
				return (!(internalAutoFocusPoint.x < 0f)) ? new Vector2?(internalAutoFocusPoint) : null;
			}
			set
			{
				//IL_0027: Unknown result type (might be due to invalid IL or missing references)
				//IL_001b: Unknown result type (might be due to invalid IL or missing references)
				internalAutoFocusPoint = (Vector2)(value.HasValue ? value.Value : new Vector2(-1f, -1f));
			}
		}

		internal Vector2 internalAutoFocusPoint
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_internalAutoFocusPoint_Injected(out var ret);
				return ret;
			}
			set
			{
				set_internalAutoFocusPoint_Injected(ref value);
			}
		}

		public extern bool isDepth
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern bool isPlaying
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[GeneratedByOldBindingsGenerator]
			get;
		}

		public extern string deviceName
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[GeneratedByOldBindingsGenerator]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[GeneratedByOldBindingsGenerator]
			set;
		}

		public extern float requestedFPS
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[GeneratedByOldBindingsGenerator]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[GeneratedByOldBindingsGenerator]
			set;
		}

		public extern int requestedWidth
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[GeneratedByOldBindingsGenerator]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[GeneratedByOldBindingsGenerator]
			set;
		}

		public extern int requestedHeight
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[GeneratedByOldBindingsGenerator]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[GeneratedByOldBindingsGenerator]
			set;
		}

		public static extern WebCamDevice[] devices
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[GeneratedByOldBindingsGenerator]
			get;
		}

		public extern int videoRotationAngle
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[GeneratedByOldBindingsGenerator]
			get;
		}

		public extern bool videoVerticallyMirrored
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[GeneratedByOldBindingsGenerator]
			get;
		}

		public extern bool didUpdateThisFrame
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[GeneratedByOldBindingsGenerator]
			get;
		}

		public WebCamTexture(string deviceName, int requestedWidth, int requestedHeight, int requestedFPS)
		{
			Internal_CreateWebCamTexture(this, deviceName, requestedWidth, requestedHeight, requestedFPS);
		}

		public WebCamTexture(string deviceName, int requestedWidth, int requestedHeight)
		{
			Internal_CreateWebCamTexture(this, deviceName, requestedWidth, requestedHeight, 0);
		}

		public WebCamTexture(string deviceName)
		{
			Internal_CreateWebCamTexture(this, deviceName, 0, 0, 0);
		}

		public WebCamTexture(int requestedWidth, int requestedHeight, int requestedFPS)
		{
			Internal_CreateWebCamTexture(this, "", requestedWidth, requestedHeight, requestedFPS);
		}

		public WebCamTexture(int requestedWidth, int requestedHeight)
		{
			Internal_CreateWebCamTexture(this, "", requestedWidth, requestedHeight, 0);
		}

		public WebCamTexture()
		{
			Internal_CreateWebCamTexture(this, "", 0, 0, 0);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		private static extern void Internal_CreateWebCamTexture([Writable] WebCamTexture self, string scriptingDevice, int requestedWidth, int requestedHeight, int maxFramerate);

		public void Play()
		{
			INTERNAL_CALL_Play(this);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		private static extern void INTERNAL_CALL_Play(WebCamTexture self);

		public void Pause()
		{
			INTERNAL_CALL_Pause(this);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		private static extern void INTERNAL_CALL_Pause(WebCamTexture self);

		public void Stop()
		{
			INTERNAL_CALL_Stop(this);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		private static extern void INTERNAL_CALL_Stop(WebCamTexture self);

		public Color GetPixel(int x, int y)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			INTERNAL_CALL_GetPixel(this, x, y, out var value);
			return value;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		private static extern void INTERNAL_CALL_GetPixel(WebCamTexture self, int x, int y, out Color value);

		public Color[] GetPixels()
		{
			return GetPixels(0, 0, ((Texture)this).width, ((Texture)this).height);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		public extern Color[] GetPixels(int x, int y, int blockWidth, int blockHeight);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		public extern Color32[] GetPixels32([DefaultValue("null")] Color32[] colors);

		[ExcludeFromDocs]
		public Color32[] GetPixels32()
		{
			Color32[] colors = null;
			return GetPixels32(colors);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_internalAutoFocusPoint_Injected(out Vector2 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void set_internalAutoFocusPoint_Injected(ref Vector2 value);
	}
}
namespace UnityEngine.Audio
{
	public enum AudioMixerUpdateMode
	{
		Normal,
		UnscaledTime
	}
	[ExcludeFromObjectFactory]
	[ExcludeFromPreset]
	public class AudioMixer : Object
	{
		public extern AudioMixerGroup outputAudioMixerGroup
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[GeneratedByOldBindingsGenerator]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[GeneratedByOldBindingsGenerator]
			set;
		}

		public extern AudioMixerUpdateMode updateMode
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[GeneratedByOldBindingsGenerator]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[GeneratedByOldBindingsGenerator]
			set;
		}

		internal AudioMixer()
		{
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		public extern AudioMixerGroup[] FindMatchingGroups(string subPath);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		public extern AudioMixerSnapshot FindSnapshot(string name);

		private void TransitionToSnapshot(AudioMixerSnapshot snapshot, float timeToReach)
		{
			if ((Object)(object)snapshot == (Object)null)
			{
				throw new ArgumentException("null Snapshot passed to AudioMixer.TransitionToSnapshot of AudioMixer '" + ((Object)this).name + "'");
			}
			if ((Object)(object)snapshot.audioMixer != (Object)(object)this)
			{
				throw new ArgumentException("Snapshot '" + ((Object)snapshot).name + "' passed to AudioMixer.TransitionToSnapshot is not a snapshot from AudioMixer '" + ((Object)this).name + "'");
			}
			snapshot.TransitionTo(timeToReach);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		public extern void TransitionToSnapshots(AudioMixerSnapshot[] snapshots, float[] weights, float timeToReach);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		public extern bool SetFloat(string name, float value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		public extern bool ClearFloat(string name);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		public extern bool GetFloat(string name, out float value);
	}
	public class AudioMixerGroup : Object, ISubAssetNotDuplicatable
	{
		public extern AudioMixer audioMixer
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[GeneratedByOldBindingsGenerator]
			get;
		}

		internal AudioMixerGroup()
		{
		}
	}
	public class AudioMixerSnapshot : Object, ISubAssetNotDuplicatable
	{
		public extern AudioMixer audioMixer
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[GeneratedByOldBindingsGenerator]
			get;
		}

		internal AudioMixerSnapshot()
		{
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		public extern void TransitionTo(float timeToReach);
	}
}
namespace UnityEngine
{
	[ExcludeFromPreset]
	[Obsolete("MovieTexture is deprecated. Use VideoPlayer instead.", false)]
	[ExcludeFromObjectFactory]
	public sealed class MovieTexture : Texture
	{
		public extern AudioClip audioClip
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[GeneratedByOldBindingsGenerator]
			get;
		}

		public extern bool loop
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[GeneratedByOldBindingsGenerator]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[GeneratedByOldBindingsGenerator]
			set;
		}

		public extern bool isPlaying
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[GeneratedByOldBindingsGenerator]
			get;
		}

		public extern bool isReadyToPlay
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[GeneratedByOldBindingsGenerator]
			get;
		}

		public extern float duration
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[GeneratedByOldBindingsGenerator]
			get;
		}

		private MovieTexture()
		{
		}

		public void Play()
		{
			INTERNAL_CALL_Play(this);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		private static extern void INTERNAL_CALL_Play(MovieTexture self);

		public void Stop()
		{
			INTERNAL_CALL_Stop(this);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		private static extern void INTERNAL_CALL_Stop(MovieTexture self);

		public void Pause()
		{
			INTERNAL_CALL_Pause(this);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		private static extern void INTERNAL_CALL_Pause(MovieTexture self);
	}
}

Room Architect Tool_Data/Managed/UnityEngine.ClothModule.dll

Decompiled 3 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;
using UnityEngine.Internal;
using UnityEngine.Scripting;

[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: UnityEngineModuleAssembly]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine;

[NativeHeader("Modules/Cloth/Cloth.h")]
[UsedByNativeCode]
public struct ClothSphereColliderPair
{
	public SphereCollider first { get; set; }

	public SphereCollider second { get; set; }

	public ClothSphereColliderPair(SphereCollider a)
	{
		first = a;
		second = null;
	}

	public ClothSphereColliderPair(SphereCollider a, SphereCollider b)
	{
		first = a;
		second = b;
	}
}
[UsedByNativeCode]
public struct ClothSkinningCoefficient
{
	public float maxDistance;

	public float collisionSphereDistance;
}
[NativeClass("Unity::Cloth")]
[NativeHeader("Modules/Cloth/Cloth.h")]
[RequireComponent(typeof(Transform), typeof(SkinnedMeshRenderer))]
public sealed class Cloth : Component
{
	public extern Vector3[] vertices
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("GetPositions")]
		get;
	}

	public extern Vector3[] normals
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("GetNormals")]
		get;
	}

	public extern ClothSkinningCoefficient[] coefficients
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("GetCoefficients")]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("SetCoefficients")]
		set;
	}

	public extern CapsuleCollider[] capsuleColliders
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("GetCapsuleColliders")]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("SetCapsuleColliders")]
		set;
	}

	public extern ClothSphereColliderPair[] sphereColliders
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("GetSphereColliders")]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("SetSphereColliders")]
		set;
	}

	public extern float sleepThreshold
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float bendingStiffness
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float stretchingStiffness
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float damping
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public Vector3 externalAcceleration
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_externalAcceleration_Injected(out var ret);
			return ret;
		}
		set
		{
			set_externalAcceleration_Injected(ref value);
		}
	}

	public Vector3 randomAcceleration
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_randomAcceleration_Injected(out var ret);
			return ret;
		}
		set
		{
			set_randomAcceleration_Injected(ref value);
		}
	}

	public extern bool useGravity
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern bool enabled
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float friction
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float collisionMassScale
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern bool enableContinuousCollision
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float useVirtualParticles
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float worldVelocityScale
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float worldAccelerationScale
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float clothSolverFrequency
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[Obsolete("Parameter solverFrequency is obsolete and no longer supported. Please use clothSolverFrequency instead.")]
	public bool solverFrequency
	{
		get
		{
			return clothSolverFrequency > 0f;
		}
		set
		{
			clothSolverFrequency = ((!value) ? 0f : 120f);
		}
	}

	public extern bool useTethers
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float stiffnessFrequency
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float selfCollisionDistance
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float selfCollisionStiffness
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[Obsolete("useContinuousCollision is no longer supported, use enableContinuousCollision instead")]
	public float useContinuousCollision { get; set; }

	[Obsolete("Deprecated.Cloth.selfCollisions is no longer supported since Unity 5.0.", true)]
	public bool selfCollision { get; }

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern void ClearTransformMotion();

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern uint[] GetSelfAndInterCollisionIndices();

	internal void Internal_GetSelfAndInterCollisionIndices(List<uint> indicesOutList)
	{
		uint[] selfAndInterCollisionIndices = GetSelfAndInterCollisionIndices();
		indicesOutList.Clear();
		indicesOutList.AddRange(selfAndInterCollisionIndices);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void SetSelfAndInterCollisionIndices(uint[] indicesIn);

	internal void Internal_SetSelfAndInterCollisionIndices(List<uint> indicesInList)
	{
		SetSelfAndInterCollisionIndices(indicesInList.ToArray());
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern uint[] GetVirtualParticleIndices();

	internal void Internal_GetVirtualParticleIndices(List<uint> indicesOutList)
	{
		uint[] virtualParticleIndices = GetVirtualParticleIndices();
		indicesOutList.Clear();
		indicesOutList.AddRange(virtualParticleIndices);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void SetVirtualParticleIndices(uint[] indicesIn);

	internal void Internal_SetVirtualParticleIndices(List<uint> indicesInList)
	{
		SetVirtualParticleIndices(indicesInList.ToArray());
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern Vector3[] GetVirtualParticleWeights();

	internal void Internal_GetVirtualParticleWeights(List<Vector3> weightsOutList)
	{
		Vector3[] virtualParticleWeights = GetVirtualParticleWeights();
		weightsOutList.Clear();
		weightsOutList.AddRange(virtualParticleWeights);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void SetVirtualParticleWeights(Vector3[] weightsIn);

	internal void Internal_SetVirtualParticleWeights(List<Vector3> weightsInList)
	{
		SetVirtualParticleWeights(weightsInList.ToArray());
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern void SetEnabledFading(bool enabled, float interpolationTime);

	[ExcludeFromDocs]
	public void SetEnabledFading(bool enabled)
	{
		SetEnabledFading(enabled, 0.5f);
	}

	public void GetVirtualParticleIndices(List<uint> indices)
	{
		if (indices == null)
		{
			throw new ArgumentNullException("indices");
		}
		Internal_GetVirtualParticleIndices(indices);
	}

	public void SetVirtualParticleIndices(List<uint> indices)
	{
		if (indices == null)
		{
			throw new ArgumentNullException("indices");
		}
		Internal_SetVirtualParticleIndices(indices);
	}

	public void GetVirtualParticleWeights(List<Vector3> weights)
	{
		if (weights == null)
		{
			throw new ArgumentNullException("weights");
		}
		Internal_GetVirtualParticleWeights(weights);
	}

	public void SetVirtualParticleWeights(List<Vector3> weights)
	{
		if (weights == null)
		{
			throw new ArgumentNullException("weights");
		}
		Internal_SetVirtualParticleWeights(weights);
	}

	public void GetSelfAndInterCollisionIndices(List<uint> indices)
	{
		if (indices == null)
		{
			throw new ArgumentNullException("indices");
		}
		Internal_GetSelfAndInterCollisionIndices(indices);
	}

	public void SetSelfAndInterCollisionIndices(List<uint> indices)
	{
		if (indices == null)
		{
			throw new ArgumentNullException("indices");
		}
		Internal_SetSelfAndInterCollisionIndices(indices);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_externalAcceleration_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_externalAcceleration_Injected(ref Vector3 value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_randomAcceleration_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_randomAcceleration_Injected(ref Vector3 value);
}

Room Architect Tool_Data/Managed/UnityEngine.ClusterInputModule.dll

Decompiled 3 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;

[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine;

public enum ClusterInputType
{
	Button,
	Axis,
	Tracker,
	CustomProvidedInput
}
[NativeConditional("ENABLE_CLUSTERINPUT")]
[NativeHeader("Modules/ClusterInput/ClusterInput.h")]
public class ClusterInput
{
	[MethodImpl(MethodImplOptions.InternalCall)]
	public static extern float GetAxis(string name);

	[MethodImpl(MethodImplOptions.InternalCall)]
	public static extern bool GetButton(string name);

	[NativeConditional("ENABLE_CLUSTERINPUT", "Vector3f(0.0f, 0.0f, 0.0f)")]
	public static Vector3 GetTrackerPosition(string name)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		GetTrackerPosition_Injected(name, out var ret);
		return ret;
	}

	[NativeConditional("ENABLE_CLUSTERINPUT", "Quartenion::identity")]
	public static Quaternion GetTrackerRotation(string name)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		GetTrackerRotation_Injected(name, out var ret);
		return ret;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	public static extern void SetAxis(string name, float value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	public static extern void SetButton(string name, bool value);

	public static void SetTrackerPosition(string name, Vector3 value)
	{
		SetTrackerPosition_Injected(name, ref value);
	}

	public static void SetTrackerRotation(string name, Quaternion value)
	{
		SetTrackerRotation_Injected(name, ref value);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	public static extern bool AddInput(string name, string deviceName, string serverUrl, int index, ClusterInputType type);

	[MethodImpl(MethodImplOptions.InternalCall)]
	public static extern bool EditInput(string name, string deviceName, string serverUrl, int index, ClusterInputType type);

	[MethodImpl(MethodImplOptions.InternalCall)]
	public static extern bool CheckConnectionToServer(string name);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void GetTrackerPosition_Injected(string name, out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void GetTrackerRotation_Injected(string name, out Quaternion ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void SetTrackerPosition_Injected(string name, ref Vector3 value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void SetTrackerRotation_Injected(string name, ref Quaternion value);
}

Room Architect Tool_Data/Managed/UnityEngine.ClusterRendererModule.dll

Decompiled 3 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;

[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine;

[NativeHeader("Modules/ClusterRenderer/ClusterNetwork.h")]
public class ClusterNetwork
{
	public static extern bool isMasterOfCluster
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	public static extern bool isDisconnected
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	public static extern int nodeIndex
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}
}

Room Architect Tool_Data/Managed/UnityEngine.CoreModule.dll

Decompiled 3 months ago
#define UNITY_ASSERTIONS
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Security;
using System.Security.Permissions;
using System.Text;
using System.Threading;
using Unity.Burst;
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
using Unity.Jobs;
using Unity.Jobs.LowLevel.Unsafe;
using UnityEngine;
using UnityEngine.Assertions;
using UnityEngine.Assertions.Comparers;
using UnityEngine.Bindings;
using UnityEngine.Diagnostics;
using UnityEngine.Events;
using UnityEngine.Experimental.Rendering;
using UnityEngine.Internal;
using UnityEngine.Networking.PlayerConnection;
using UnityEngine.Playables;
using UnityEngine.Rendering;
using UnityEngine.SceneManagement;
using UnityEngine.Scripting;
using UnityEngine.Scripting.APIUpdating;
using UnityEngine.Serialization;
using UnityEngineInternal;

[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine
{
	public enum SendMessageOptions
	{
		RequireReceiver,
		DontRequireReceiver
	}
	public enum PrimitiveType
	{
		Sphere,
		Capsule,
		Cylinder,
		Cube,
		Plane,
		Quad
	}
	public enum Space
	{
		World,
		Self
	}
	public enum RuntimePlatform
	{
		OSXEditor = 0,
		OSXPlayer = 1,
		WindowsPlayer = 2,
		[Obsolete("WebPlayer export is no longer supported in Unity 5.4+.", true)]
		OSXWebPlayer = 3,
		[Obsolete("Dashboard widget on Mac OS X export is no longer supported in Unity 5.4+.", true)]
		OSXDashboardPlayer = 4,
		[Obsolete("WebPlayer export is no longer supported in Unity 5.4+.", true)]
		WindowsWebPlayer = 5,
		WindowsEditor = 7,
		IPhonePlayer = 8,
		[Obsolete("Xbox360 export is no longer supported in Unity 5.5+.")]
		XBOX360 = 10,
		[Obsolete("PS3 export is no longer supported in Unity >=5.5.")]
		PS3 = 9,
		Android = 11,
		[Obsolete("NaCl export is no longer supported in Unity 5.0+.")]
		NaCl = 12,
		[Obsolete("FlashPlayer export is no longer supported in Unity 5.0+.")]
		FlashPlayer = 15,
		LinuxPlayer = 13,
		LinuxEditor = 16,
		WebGLPlayer = 17,
		[Obsolete("Use WSAPlayerX86 instead")]
		MetroPlayerX86 = 18,
		WSAPlayerX86 = 18,
		[Obsolete("Use WSAPlayerX64 instead")]
		MetroPlayerX64 = 19,
		WSAPlayerX64 = 19,
		[Obsolete("Use WSAPlayerARM instead")]
		MetroPlayerARM = 20,
		WSAPlayerARM = 20,
		[Obsolete("Windows Phone 8 was removed in 5.3")]
		WP8Player = 21,
		[Obsolete("BlackBerryPlayer export is no longer supported in Unity 5.4+.")]
		BlackBerryPlayer = 22,
		[Obsolete("TizenPlayer export is no longer supported in Unity 2017.3+.")]
		TizenPlayer = 23,
		[Obsolete("PSP2 is no longer supported as of Unity 2018.3")]
		PSP2 = 24,
		PS4 = 25,
		[Obsolete("PSM export is no longer supported in Unity >= 5.3")]
		PSM = 26,
		XboxOne = 27,
		[Obsolete("SamsungTVPlayer export is no longer supported in Unity 2017.3+.")]
		SamsungTVPlayer = 28,
		[Obsolete("Wii U is no longer supported in Unity 2018.1+.")]
		WiiU = 30,
		tvOS = 31,
		Switch = 32,
		Lumin = 33,
		BJM = 34
	}
	public enum SystemLanguage
	{
		Afrikaans = 0,
		Arabic = 1,
		Basque = 2,
		Belarusian = 3,
		Bulgarian = 4,
		Catalan = 5,
		Chinese = 6,
		Czech = 7,
		Danish = 8,
		Dutch = 9,
		English = 10,
		Estonian = 11,
		Faroese = 12,
		Finnish = 13,
		French = 14,
		German = 15,
		Greek = 16,
		Hebrew = 17,
		Icelandic = 19,
		Indonesian = 20,
		Italian = 21,
		Japanese = 22,
		Korean = 23,
		Latvian = 24,
		Lithuanian = 25,
		Norwegian = 26,
		Polish = 27,
		Portuguese = 28,
		Romanian = 29,
		Russian = 30,
		SerboCroatian = 31,
		Slovak = 32,
		Slovenian = 33,
		Spanish = 34,
		Swedish = 35,
		Thai = 36,
		Turkish = 37,
		Ukrainian = 38,
		Vietnamese = 39,
		ChineseSimplified = 40,
		ChineseTraditional = 41,
		Unknown = 42,
		Hungarian = 18
	}
	public enum LogType
	{
		Error,
		Assert,
		Warning,
		Log,
		Exception
	}
	public enum LogOption
	{
		None,
		NoStacktrace
	}
	public enum ThreadPriority
	{
		Low = 0,
		BelowNormal = 1,
		Normal = 2,
		High = 4
	}
}
namespace UnityEngine.TestTools
{
	[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method)]
	[UsedByNativeCode]
	public class ExcludeFromCoverageAttribute : Attribute
	{
	}
	[NativeType(/*Could not decode attribute arguments.*/)]
	public struct CoveredSequencePoint
	{
		public MethodBase method;

		public uint ilOffset;

		public uint hitCount;

		public string filename;

		public uint line;

		public uint column;
	}
	[NativeType(/*Could not decode attribute arguments.*/)]
	public struct CoveredMethodStats
	{
		public MethodBase method;

		public int totalSequencePoints;

		public int uncoveredSequencePoints;

		private string GetTypeDisplayName(Type t)
		{
			if ((object)t == typeof(int))
			{
				return "int";
			}
			if ((object)t == typeof(bool))
			{
				return "bool";
			}
			if ((object)t == typeof(float))
			{
				return "float";
			}
			if ((object)t == typeof(double))
			{
				return "double";
			}
			if ((object)t == typeof(void))
			{
				return "void";
			}
			if ((object)t == typeof(string))
			{
				return "string";
			}
			if (t.IsGenericType && (object)t.GetGenericTypeDefinition() == typeof(List<>))
			{
				return "System.Collections.Generic.List<" + GetTypeDisplayName(t.GetGenericArguments()[0]) + ">";
			}
			if (t.IsArray && t.GetArrayRank() == 1)
			{
				return GetTypeDisplayName(t.GetElementType()) + "[]";
			}
			return t.FullName;
		}

		public override string ToString()
		{
			if ((object)method == null)
			{
				return "<no method>";
			}
			StringBuilder stringBuilder = new StringBuilder();
			stringBuilder.Append(GetTypeDisplayName(method.DeclaringType));
			stringBuilder.Append(".");
			stringBuilder.Append(method.Name);
			stringBuilder.Append("(");
			bool flag = false;
			ParameterInfo[] parameters = method.GetParameters();
			foreach (ParameterInfo parameterInfo in parameters)
			{
				if (flag)
				{
					stringBuilder.Append(", ");
				}
				stringBuilder.Append(GetTypeDisplayName(parameterInfo.ParameterType));
				stringBuilder.Append(" ");
				stringBuilder.Append(parameterInfo.Name);
				flag = true;
			}
			stringBuilder.Append(")");
			return stringBuilder.ToString();
		}
	}
	[NativeType("Runtime/Scripting/ScriptingCoverage.h")]
	[NativeClass("ScriptingCoverage")]
	public static class Coverage
	{
		public static extern bool enabled
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("ScriptingCoverageGetCoverageForMethodInfoObject", ThrowsException = true)]
		private static extern CoveredSequencePoint[] GetSequencePointsFor_Internal(MethodBase method);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("ScriptingCoverageResetForMethodInfoObject", ThrowsException = true)]
		private static extern void ResetFor_Internal(MethodBase method);

		[FreeFunction("ScriptingCoverageGetStatsForMethodInfoObject", ThrowsException = true)]
		private static CoveredMethodStats GetStatsFor_Internal(MethodBase method)
		{
			GetStatsFor_Internal_Injected(method, out var ret);
			return ret;
		}

		public static CoveredSequencePoint[] GetSequencePointsFor(MethodBase method)
		{
			if ((object)method == null)
			{
				throw new ArgumentNullException("method");
			}
			return GetSequencePointsFor_Internal(method);
		}

		public static CoveredMethodStats GetStatsFor(MethodBase method)
		{
			if ((object)method == null)
			{
				throw new ArgumentNullException("method");
			}
			return GetStatsFor_Internal(method);
		}

		public static CoveredMethodStats[] GetStatsFor(MethodBase[] methods)
		{
			if (methods == null)
			{
				throw new ArgumentNullException("methods");
			}
			CoveredMethodStats[] array = new CoveredMethodStats[methods.Length];
			for (int i = 0; i < methods.Length; i++)
			{
				ref CoveredMethodStats reference = ref array[i];
				reference = GetStatsFor(methods[i]);
			}
			return array;
		}

		public static CoveredMethodStats[] GetStatsFor(Type type)
		{
			if ((object)type == null)
			{
				throw new ArgumentNullException("type");
			}
			return GetStatsFor(type.GetMembers(BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic).OfType<MethodBase>().ToArray());
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("ScriptingCoverageGetStatsForAllCoveredMethodsFromScripting", ThrowsException = true)]
		public static extern CoveredMethodStats[] GetStatsForAllCoveredMethods();

		public static void ResetFor(MethodBase method)
		{
			if ((object)method == null)
			{
				throw new ArgumentNullException("method");
			}
			ResetFor_Internal(method);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("ScriptingCoverageResetAllFromScripting", ThrowsException = true)]
		public static extern void ResetAll();

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void GetStatsFor_Internal_Injected(MethodBase method, out CoveredMethodStats ret);
	}
}
namespace UnityEngine
{
	[NativeHeader("Runtime/BaseClasses/TagManager.h")]
	public struct SortingLayer
	{
		private int m_Id;

		public int id => m_Id;

		public string name => IDToName(m_Id);

		public int value => GetLayerValueFromID(m_Id);

		public static SortingLayer[] layers
		{
			get
			{
				int[] sortingLayerIDsInternal = GetSortingLayerIDsInternal();
				SortingLayer[] array = new SortingLayer[sortingLayerIDsInternal.Length];
				for (int i = 0; i < sortingLayerIDsInternal.Length; i++)
				{
					array[i].m_Id = sortingLayerIDsInternal[i];
				}
				return array;
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("GetTagManager().GetSortingLayerIDs")]
		private static extern int[] GetSortingLayerIDsInternal();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("GetTagManager().GetSortingLayerValueFromUniqueID")]
		public static extern int GetLayerValueFromID(int id);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("GetTagManager().GetSortingLayerValueFromName")]
		public static extern int GetLayerValueFromName(string name);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("GetTagManager().GetSortingLayerUniqueIDFromName")]
		public static extern int NameToID(string name);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("GetTagManager().GetSortingLayerNameFromUniqueID")]
		public static extern string IDToName(int id);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("GetTagManager().IsSortingLayerUniqueIDValid")]
		public static extern bool IsValid(int id);
	}
}
namespace UnityEngine.Android
{
	public class AndroidDevice
	{
		public static void SetSustainedPerformanceMode(bool enabled)
		{
		}
	}
	[NativeHeader("Runtime/Export/Android/AndroidPermissions.bindings.h")]
	[UsedByNativeCode]
	public struct Permission
	{
		public const string Camera = "android.permission.CAMERA";

		public const string Microphone = "android.permission.RECORD_AUDIO";

		public const string FineLocation = "android.permission.ACCESS_FINE_LOCATION";

		public const string CoarseLocation = "android.permission.ACCESS_COARSE_LOCATION";

		public const string ExternalStorageRead = "android.permission.READ_EXTERNAL_STORAGE";

		public const string ExternalStorageWrite = "android.permission.WRITE_EXTERNAL_STORAGE";

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern bool HasUserAuthorizedPermission(string permission);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern void RequestUserPermission(string permission);
	}
}
namespace UnityEngine
{
	public enum WeightedMode
	{
		None,
		In,
		Out,
		Both
	}
	[RequiredByNativeCode]
	public struct Keyframe
	{
		private float m_Time;

		private float m_Value;

		private float m_InTangent;

		private float m_OutTangent;

		private int m_WeightedMode;

		private float m_InWeight;

		private float m_OutWeight;

		public float time
		{
			get
			{
				return m_Time;
			}
			set
			{
				m_Time = value;
			}
		}

		public float value
		{
			get
			{
				return m_Value;
			}
			set
			{
				m_Value = value;
			}
		}

		public float inTangent
		{
			get
			{
				return m_InTangent;
			}
			set
			{
				m_InTangent = value;
			}
		}

		public float outTangent
		{
			get
			{
				return m_OutTangent;
			}
			set
			{
				m_OutTangent = value;
			}
		}

		public float inWeight
		{
			get
			{
				return m_InWeight;
			}
			set
			{
				m_InWeight = value;
			}
		}

		public float outWeight
		{
			get
			{
				return m_OutWeight;
			}
			set
			{
				m_OutWeight = value;
			}
		}

		public WeightedMode weightedMode
		{
			get
			{
				return (WeightedMode)m_WeightedMode;
			}
			set
			{
				m_WeightedMode = (int)value;
			}
		}

		[Obsolete("Use AnimationUtility.SetLeftTangentMode, AnimationUtility.SetRightTangentMode, AnimationUtility.GetLeftTangentMode or AnimationUtility.GetRightTangentMode instead.")]
		public int tangentMode
		{
			get
			{
				return tangentModeInternal;
			}
			set
			{
				tangentModeInternal = value;
			}
		}

		internal int tangentModeInternal
		{
			get
			{
				return 0;
			}
			set
			{
			}
		}

		public Keyframe(float time, float value)
		{
			m_Time = time;
			m_Value = value;
			m_InTangent = 0f;
			m_OutTangent = 0f;
			m_WeightedMode = 0;
			m_InWeight = 0f;
			m_OutWeight = 0f;
		}

		public Keyframe(float time, float value, float inTangent, float outTangent)
		{
			m_Time = time;
			m_Value = value;
			m_InTangent = inTangent;
			m_OutTangent = outTangent;
			m_WeightedMode = 0;
			m_InWeight = 0f;
			m_OutWeight = 0f;
		}

		public Keyframe(float time, float value, float inTangent, float outTangent, float inWeight, float outWeight)
		{
			m_Time = time;
			m_Value = value;
			m_InTangent = inTangent;
			m_OutTangent = outTangent;
			m_WeightedMode = 3;
			m_InWeight = inWeight;
			m_OutWeight = outWeight;
		}
	}
	public enum WrapMode
	{
		Once = 1,
		Loop = 2,
		PingPong = 4,
		Default = 0,
		ClampForever = 8,
		Clamp = 1
	}
	[StructLayout(LayoutKind.Sequential)]
	[RequiredByNativeCode]
	[NativeHeader("Runtime/Math/AnimationCurve.bindings.h")]
	public class AnimationCurve : IEquatable<AnimationCurve>
	{
		internal IntPtr m_Ptr;

		public Keyframe[] keys
		{
			get
			{
				return GetKeys();
			}
			set
			{
				SetKeys(value);
			}
		}

		public Keyframe this[int index] => GetKey(index);

		public extern int length
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetKeyCount", IsThreadSafe = true)]
			get;
		}

		public extern WrapMode preWrapMode
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetPreInfinity", IsThreadSafe = true)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("SetPreInfinity", IsThreadSafe = true)]
			set;
		}

		public extern WrapMode postWrapMode
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetPostInfinity", IsThreadSafe = true)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("SetPostInfinity", IsThreadSafe = true)]
			set;
		}

		public AnimationCurve(params Keyframe[] keys)
		{
			m_Ptr = Internal_Create(keys);
		}

		[RequiredByNativeCode]
		public AnimationCurve()
		{
			m_Ptr = Internal_Create(null);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("AnimationCurveBindings::Internal_Destroy", IsThreadSafe = true)]
		private static extern void Internal_Destroy(IntPtr ptr);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("AnimationCurveBindings::Internal_Create", IsThreadSafe = true)]
		private static extern IntPtr Internal_Create(Keyframe[] keys);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("AnimationCurveBindings::Internal_Equals", HasExplicitThis = true, IsThreadSafe = true)]
		private extern bool Internal_Equals(IntPtr other);

		~AnimationCurve()
		{
			Internal_Destroy(m_Ptr);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[ThreadSafe]
		public extern float Evaluate(float time);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("AnimationCurveBindings::AddKeySmoothTangents", HasExplicitThis = true, IsThreadSafe = true)]
		public extern int AddKey(float time, float value);

		public int AddKey(Keyframe key)
		{
			return AddKey_Internal(key);
		}

		[NativeMethod("AddKey", IsThreadSafe = true)]
		private int AddKey_Internal(Keyframe key)
		{
			return AddKey_Internal_Injected(ref key);
		}

		[NativeThrows]
		[FreeFunction("AnimationCurveBindings::MoveKey", HasExplicitThis = true, IsThreadSafe = true)]
		public int MoveKey(int index, Keyframe key)
		{
			return MoveKey_Injected(index, ref key);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("AnimationCurveBindings::RemoveKey", HasExplicitThis = true, IsThreadSafe = true)]
		[NativeThrows]
		public extern void RemoveKey(int index);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("AnimationCurveBindings::SetKeys", HasExplicitThis = true, IsThreadSafe = true)]
		private extern void SetKeys(Keyframe[] keys);

		[NativeThrows]
		[FreeFunction("AnimationCurveBindings::GetKey", HasExplicitThis = true, IsThreadSafe = true)]
		private Keyframe GetKey(int index)
		{
			GetKey_Injected(index, out var ret);
			return ret;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("AnimationCurveBindings::GetKeys", HasExplicitThis = true, IsThreadSafe = true)]
		private extern Keyframe[] GetKeys();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("AnimationCurveBindings::SmoothTangents", HasExplicitThis = true, IsThreadSafe = true)]
		[NativeThrows]
		public extern void SmoothTangents(int index, float weight);

		public static AnimationCurve Constant(float timeStart, float timeEnd, float value)
		{
			return Linear(timeStart, value, timeEnd, value);
		}

		public static AnimationCurve Linear(float timeStart, float valueStart, float timeEnd, float valueEnd)
		{
			if (timeStart == timeEnd)
			{
				Keyframe keyframe = new Keyframe(timeStart, valueStart);
				return new AnimationCurve(keyframe);
			}
			float num = (valueEnd - valueStart) / (timeEnd - timeStart);
			Keyframe[] array = new Keyframe[2]
			{
				new Keyframe(timeStart, valueStart, 0f, num),
				new Keyframe(timeEnd, valueEnd, num, 0f)
			};
			return new AnimationCurve(array);
		}

		public static AnimationCurve EaseInOut(float timeStart, float valueStart, float timeEnd, float valueEnd)
		{
			if (timeStart == timeEnd)
			{
				Keyframe keyframe = new Keyframe(timeStart, valueStart);
				return new AnimationCurve(keyframe);
			}
			Keyframe[] array = new Keyframe[2]
			{
				new Keyframe(timeStart, valueStart, 0f, 0f),
				new Keyframe(timeEnd, valueEnd, 0f, 0f)
			};
			return new AnimationCurve(array);
		}

		public override bool Equals(object o)
		{
			if (object.ReferenceEquals(null, o))
			{
				return false;
			}
			if (object.ReferenceEquals(this, o))
			{
				return true;
			}
			if ((object)o.GetType() != GetType())
			{
				return false;
			}
			return Equals((AnimationCurve)o);
		}

		public bool Equals(AnimationCurve other)
		{
			if (object.ReferenceEquals(null, other))
			{
				return false;
			}
			if (object.ReferenceEquals(this, other))
			{
				return true;
			}
			if (m_Ptr.Equals((object?)(nint)other.m_Ptr))
			{
				return true;
			}
			return Internal_Equals(other.m_Ptr);
		}

		public override int GetHashCode()
		{
			return m_Ptr.GetHashCode();
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern int AddKey_Internal_Injected(ref Keyframe key);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern int MoveKey_Injected(int index, ref Keyframe key);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void GetKey_Injected(int index, out Keyframe ret);
	}
}
namespace JetBrains.Annotations
{
	[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Delegate, AllowMultiple = false, Inherited = true)]
	public sealed class CanBeNullAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Delegate, AllowMultiple = false, Inherited = true)]
	public sealed class NotNullAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
	public sealed class StringFormatMethodAttribute : Attribute
	{
		public string FormatParameterName { get; private set; }

		public StringFormatMethodAttribute(string formatParameterName)
		{
			FormatParameterName = formatParameterName;
		}
	}
	[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = true)]
	public sealed class InvokerParameterNameAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
	public sealed class NotifyPropertyChangedInvocatorAttribute : Attribute
	{
		public string ParameterName { get; private set; }

		public NotifyPropertyChangedInvocatorAttribute()
		{
		}

		public NotifyPropertyChangedInvocatorAttribute(string parameterName)
		{
			ParameterName = parameterName;
		}
	}
	[AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
	public sealed class ContractAnnotationAttribute : Attribute
	{
		public string Contract { get; private set; }

		public bool ForceFullStates { get; private set; }

		public ContractAnnotationAttribute([NotNull] string contract)
			: this(contract, forceFullStates: false)
		{
		}

		public ContractAnnotationAttribute([NotNull] string contract, bool forceFullStates)
		{
			Contract = contract;
			ForceFullStates = forceFullStates;
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited = true)]
	public sealed class LocalizationRequiredAttribute : Attribute
	{
		public bool Required { get; private set; }

		public LocalizationRequiredAttribute()
			: this(required: true)
		{
		}

		public LocalizationRequiredAttribute(bool required)
		{
			Required = required;
		}
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface, AllowMultiple = false, Inherited = true)]
	public sealed class CannotApplyEqualityOperatorAttribute : Attribute
	{
	}
	[BaseTypeRequired(typeof(Attribute))]
	[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
	public sealed class BaseTypeRequiredAttribute : Attribute
	{
		[NotNull]
		public Type BaseType { get; private set; }

		public BaseTypeRequiredAttribute([NotNull] Type baseType)
		{
			BaseType = baseType;
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited = true)]
	public sealed class UsedImplicitlyAttribute : Attribute
	{
		public ImplicitUseKindFlags UseKindFlags { get; private set; }

		public ImplicitUseTargetFlags TargetFlags { get; private set; }

		public UsedImplicitlyAttribute()
			: this(ImplicitUseKindFlags.Default, ImplicitUseTargetFlags.Default)
		{
		}

		public UsedImplicitlyAttribute(ImplicitUseKindFlags useKindFlags)
			: this(useKindFlags, ImplicitUseTargetFlags.Default)
		{
		}

		public UsedImplicitlyAttribute(ImplicitUseTargetFlags targetFlags)
			: this(ImplicitUseKindFlags.Default, targetFlags)
		{
		}

		public UsedImplicitlyAttribute(ImplicitUseKindFlags useKindFlags, ImplicitUseTargetFlags targetFlags)
		{
			UseKindFlags = useKindFlags;
			TargetFlags = targetFlags;
		}
	}
	[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
	public sealed class MeansImplicitUseAttribute : Attribute
	{
		[UsedImplicitly]
		public ImplicitUseKindFlags UseKindFlags { get; private set; }

		[UsedImplicitly]
		public ImplicitUseTargetFlags TargetFlags { get; private set; }

		public MeansImplicitUseAttribute()
			: this(ImplicitUseKindFlags.Default, ImplicitUseTargetFlags.Default)
		{
		}

		public MeansImplicitUseAttribute(ImplicitUseKindFlags useKindFlags)
			: this(useKindFlags, ImplicitUseTargetFlags.Default)
		{
		}

		public MeansImplicitUseAttribute(ImplicitUseTargetFlags targetFlags)
			: this(ImplicitUseKindFlags.Default, targetFlags)
		{
		}

		public MeansImplicitUseAttribute(ImplicitUseKindFlags useKindFlags, ImplicitUseTargetFlags targetFlags)
		{
			UseKindFlags = useKindFlags;
			TargetFlags = targetFlags;
		}
	}
	[Flags]
	public enum ImplicitUseKindFlags
	{
		Default = 7,
		Access = 1,
		Assign = 2,
		InstantiatedWithFixedConstructorSignature = 4,
		InstantiatedNoFixedConstructorSignature = 8
	}
	[Flags]
	public enum ImplicitUseTargetFlags
	{
		Default = 1,
		Itself = 1,
		Members = 2,
		WithMembers = 3
	}
	[MeansImplicitUse]
	public sealed class PublicAPIAttribute : Attribute
	{
		[NotNull]
		public string Comment { get; private set; }

		public PublicAPIAttribute()
		{
		}

		public PublicAPIAttribute([NotNull] string comment)
		{
			Comment = comment;
		}
	}
	[AttributeUsage(AttributeTargets.Parameter, Inherited = true)]
	public sealed class InstantHandleAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Method, Inherited = true)]
	public sealed class PureAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Parameter)]
	public class PathReferenceAttribute : Attribute
	{
		[NotNull]
		public string BasePath { get; private set; }

		public PathReferenceAttribute()
		{
		}

		public PathReferenceAttribute([PathReference] string basePath)
		{
			BasePath = basePath;
		}
	}
	[AttributeUsage(AttributeTargets.Parameter)]
	public sealed class NoEnumerationAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
	public sealed class AssertionMethodAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Method)]
	public sealed class LinqTunnelAttribute : Attribute
	{
	}
}
namespace UnityEngine
{
	[NativeHeader("Runtime/Misc/SystemInfo.h")]
	[NativeHeader("Runtime/File/ApplicationSpecificPersistentDataPath.h")]
	[NativeHeader("Runtime/Input/InputManager.h")]
	[NativeHeader("Runtime/Network/NetworkUtility.h")]
	[NativeHeader("Runtime/PreloadManager/LoadSceneOperation.h")]
	[NativeHeader("Runtime/Utilities/Argv.h")]
	[NativeHeader("Runtime/BaseClasses/IsPlaying.h")]
	[NativeHeader("Runtime/Export/Application/Application.bindings.h")]
	[NativeHeader("Runtime/Misc/Player.h")]
	[NativeHeader("Runtime/Logging/LogSystem.h")]
	[NativeHeader("Runtime/Utilities/URLUtility.h")]
	[NativeHeader("Runtime/Input/GetInput.h")]
	[NativeHeader("Runtime/Input/TargetFrameRate.h")]
	[NativeHeader("Runtime/Application/ApplicationInfo.h")]
	[NativeHeader("Runtime/Application/AdsIdHandler.h")]
	[NativeHeader("Runtime/Misc/PlayerSettings.h")]
	[NativeHeader("Runtime/PreloadManager/PreloadManager.h")]
	[NativeHeader("Runtime/Misc/BuildSettings.h")]
	public class Application
	{
		public delegate void AdvertisingIdentifierCallback(string advertisingId, bool trackingEnabled, string errorMsg);

		public delegate void LowMemoryCallback();

		public delegate void LogCallback(string condition, string stackTrace, LogType type);

		private static LogCallback s_LogCallbackHandler;

		private static LogCallback s_LogCallbackHandlerThreaded;

		internal static AdvertisingIdentifierCallback OnAdvertisingIdentifierCallback;

		private static volatile LogCallback s_RegisterLogCallbackDeprecated;

		[Obsolete("This property is deprecated, please use LoadLevelAsync to detect if a specific scene is currently loading.")]
		public static extern bool isLoadingLevel
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("GetPreloadManager().IsLoadingOrQueued")]
			get;
		}

		[Obsolete("Streaming was a Unity Web Player feature, and is removed. This property is deprecated and always returns 0.")]
		public static int streamedBytes => 0;

		[EditorBrowsable(EditorBrowsableState.Never)]
		[Obsolete("Application.webSecurityEnabled is no longer supported, since the Unity Web Player is no longer supported by Unity", true)]
		public static bool webSecurityEnabled => false;

		public static extern bool isPlaying
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("IsWorldPlaying")]
			get;
		}

		public static extern bool isFocused
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("IsPlayerFocused")]
			get;
		}

		public static extern RuntimePlatform platform
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("systeminfo::GetRuntimePlatform", IsThreadSafe = true)]
			get;
		}

		public static extern string buildGUID
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("Application_Bindings::GetBuildGUID")]
			get;
		}

		public static bool isMobilePlatform
		{
			get
			{
				switch (platform)
				{
				case RuntimePlatform.IPhonePlayer:
				case RuntimePlatform.Android:
					return true;
				case RuntimePlatform.MetroPlayerX86:
				case RuntimePlatform.MetroPlayerX64:
				case RuntimePlatform.MetroPlayerARM:
					return SystemInfo.deviceType == DeviceType.Handheld;
				default:
					return false;
				}
			}
		}

		public static bool isConsolePlatform
		{
			get
			{
				RuntimePlatform runtimePlatform = platform;
				return runtimePlatform == RuntimePlatform.PS4 || runtimePlatform == RuntimePlatform.XboxOne;
			}
		}

		public static extern bool runInBackground
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("GetPlayerSettingsRunInBackground")]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("SetPlayerSettingsRunInBackground")]
			set;
		}

		public static extern bool isBatchMode
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("::IsBatchmode")]
			get;
		}

		internal static extern bool isTestRun
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("::IsTestRun")]
			get;
		}

		internal static extern bool isHumanControllingUs
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("::IsHumanControllingUs")]
			get;
		}

		public static extern string dataPath
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("GetAppDataPath")]
			get;
		}

		public static extern string streamingAssetsPath
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("GetStreamingAssetsPath", IsThreadSafe = true)]
			get;
		}

		[SecurityCritical]
		public static extern string persistentDataPath
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("GetPersistentDataPathApplicationSpecific")]
			get;
		}

		public static extern string temporaryCachePath
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("GetTemporaryCachePathApplicationSpecific")]
			get;
		}

		public static extern string absoluteURL
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("GetPlayerSettings().GetAbsoluteURL")]
			get;
		}

		public static extern string unityVersion
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("Application_Bindings::GetUnityVersion")]
			get;
		}

		public static extern string version
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("GetApplicationInfo().GetVersion")]
			get;
		}

		public static extern string installerName
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("GetApplicationInfo().GetInstallerName")]
			get;
		}

		public static extern string identifier
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("GetApplicationInfo().GetApplicationIdentifier")]
			get;
		}

		public static extern ApplicationInstallMode installMode
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("GetApplicationInfo().GetInstallMode")]
			get;
		}

		public static extern ApplicationSandboxType sandboxType
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("GetApplicationInfo().GetSandboxType")]
			get;
		}

		public static extern string productName
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("GetPlayerSettings().GetProductName")]
			get;
		}

		public static extern string companyName
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("GetPlayerSettings().GetCompanyName")]
			get;
		}

		public static extern string cloudProjectId
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("GetPlayerSettings().GetCloudProjectId")]
			get;
		}

		public static extern int targetFrameRate
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("GetTargetFrameRate")]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("SetTargetFrameRate")]
			set;
		}

		public static extern SystemLanguage systemLanguage
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("(SystemLanguage)systeminfo::GetSystemLanguage")]
			get;
		}

		[Obsolete("Use SetStackTraceLogType/GetStackTraceLogType instead")]
		public static extern StackTraceLogType stackTraceLogType
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("Application_Bindings::GetStackTraceLogType")]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("Application_Bindings::SetStackTraceLogType")]
			set;
		}

		public static extern string consoleLogPath
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("GetConsoleLogPath")]
			get;
		}

		public static extern ThreadPriority backgroundLoadingPriority
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("GetPreloadManager().GetThreadPriority")]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("GetPreloadManager().SetThreadPriority")]
			set;
		}

		public static extern NetworkReachability internetReachability
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("GetInternetReachability")]
			get;
		}

		public static extern bool genuine
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("IsApplicationGenuine")]
			get;
		}

		public static extern bool genuineCheckAvailable
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("IsApplicationGenuineAvailable")]
			get;
		}

		internal static extern bool submitAnalytics
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("GetPlayerSettings().GetSubmitAnalytics")]
			get;
		}

		[Obsolete("This property is deprecated, please use SplashScreen.isFinished instead")]
		public static bool isShowingSplashScreen => !SplashScreen.isFinished;

		[Obsolete("use Application.isEditor instead")]
		public static bool isPlayer => !isEditor;

		public static bool isEditor => false;

		[Obsolete("Use SceneManager.sceneCountInBuildSettings")]
		public static int levelCount => SceneManager.sceneCountInBuildSettings;

		[Obsolete("Use SceneManager to determine what scenes have been loaded")]
		public static int loadedLevel => SceneManager.GetActiveScene().buildIndex;

		[Obsolete("Use SceneManager to determine what scenes have been loaded")]
		public static string loadedLevelName => SceneManager.GetActiveScene().name;

		public static event LowMemoryCallback lowMemory;

		public static event LogCallback logMessageReceived
		{
			add
			{
				s_LogCallbackHandler = (LogCallback)Delegate.Combine(s_LogCallbackHandler, value);
				SetLogCallbackDefined(defined: true);
			}
			remove
			{
				s_LogCallbackHandler = (LogCallback)Delegate.Remove(s_LogCallbackHandler, value);
			}
		}

		public static event LogCallback logMessageReceivedThreaded
		{
			add
			{
				s_LogCallbackHandlerThreaded = (LogCallback)Delegate.Combine(s_LogCallbackHandlerThreaded, value);
				SetLogCallbackDefined(defined: true);
			}
			remove
			{
				s_LogCallbackHandlerThreaded = (LogCallback)Delegate.Remove(s_LogCallbackHandlerThreaded, value);
			}
		}

		public static event UnityAction onBeforeRender
		{
			add
			{
				BeforeRenderHelper.RegisterCallback(value);
			}
			remove
			{
				BeforeRenderHelper.UnregisterCallback(value);
			}
		}

		public static event Action<bool> focusChanged;

		public static event Action<string> deepLinkActivated;

		public static event Func<bool> wantsToQuit;

		public static event Action quitting;

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("GetInputManager().QuitApplication")]
		public static extern void Quit(int exitCode);

		public static void Quit()
		{
			Quit(0);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[Obsolete("CancelQuit is deprecated. Use the wantsToQuit event instead.")]
		[FreeFunction("GetInputManager().CancelQuitApplication")]
		public static extern void CancelQuit();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("Application_Bindings::Unload")]
		public static extern void Unload();

		[Obsolete("Streaming was a Unity Web Player feature, and is removed. This function is deprecated and always returns 1.0 for valid level indices.")]
		public static float GetStreamProgressForLevel(int levelIndex)
		{
			if (levelIndex >= 0 && levelIndex < SceneManager.sceneCountInBuildSettings)
			{
				return 1f;
			}
			return 0f;
		}

		[Obsolete("Streaming was a Unity Web Player feature, and is removed. This function is deprecated and always returns 1.0.")]
		public static float GetStreamProgressForLevel(string levelName)
		{
			return 1f;
		}

		public static bool CanStreamedLevelBeLoaded(int levelIndex)
		{
			return levelIndex >= 0 && levelIndex < SceneManager.sceneCountInBuildSettings;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("Application_Bindings::CanStreamedLevelBeLoaded")]
		public static extern bool CanStreamedLevelBeLoaded(string levelName);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction]
		public static extern bool IsPlaying(Object obj);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("GetBuildSettings().GetBuildTags")]
		public static extern string[] GetBuildTags();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("GetBuildSettings().SetBuildTags")]
		public static extern void SetBuildTags(string[] buildTags);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("GetBuildSettings().GetHasPROVersion")]
		public static extern bool HasProLicense();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("HasARGV")]
		internal static extern bool HasARGV(string name);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("GetFirstValueForARGV")]
		internal static extern string GetValueForARGV(string name);

		[Obsolete("Application.ExternalEval is deprecated. See https://docs.unity3d.com/Manual/webgl-interactingwithbrowserscripting.html for alternatives.")]
		public static void ExternalEval(string script)
		{
			if (script.Length > 0 && script[script.Length - 1] != ';')
			{
				script += ';';
			}
			Internal_ExternalCall(script);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("Application_Bindings::ExternalCall")]
		private static extern void Internal_ExternalCall(string script);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("GetAdsIdHandler().RequestAdsIdAsync")]
		public static extern bool RequestAdvertisingIdentifierAsync(AdvertisingIdentifierCallback delegateMethod);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("OpenURL")]
		public static extern void OpenURL(string url);

		[Obsolete("Use UnityEngine.Diagnostics.Utils.ForceCrash")]
		public static void ForceCrash(int mode)
		{
			Utils.ForceCrash((ForcedCrashCategory)mode);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("Application_Bindings::SetLogCallbackDefined")]
		private static extern void SetLogCallbackDefined(bool defined);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("GetStackTraceLogType")]
		public static extern StackTraceLogType GetStackTraceLogType(LogType logType);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("SetStackTraceLogType")]
		public static extern void SetStackTraceLogType(LogType logType, StackTraceLogType stackTraceType);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("Application_Bindings::RequestUserAuthorization")]
		public static extern AsyncOperation RequestUserAuthorization(UserAuthorization mode);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("Application_Bindings::HasUserAuthorization")]
		public static extern bool HasUserAuthorization(UserAuthorization mode);

		[RequiredByNativeCode]
		private static void CallLowMemory()
		{
			Application.lowMemory?.Invoke();
		}

		[RequiredByNativeCode]
		private static void CallLogCallback(string logString, string stackTrace, LogType type, bool invokedOnMainThread)
		{
			if (invokedOnMainThread)
			{
				s_LogCallbackHandler?.Invoke(logString, stackTrace, type);
			}
			s_LogCallbackHandlerThreaded?.Invoke(logString, stackTrace, type);
		}

		internal static void InvokeOnAdvertisingIdentifierCallback(string advertisingId, bool trackingEnabled)
		{
			if (OnAdvertisingIdentifierCallback != null)
			{
				OnAdvertisingIdentifierCallback(advertisingId, trackingEnabled, string.Empty);
			}
		}

		private static string ObjectToJSString(object o)
		{
			if (o == null)
			{
				return "null";
			}
			if (o is string)
			{
				string text = o.ToString().Replace("\\", "\\\\");
				text = text.Replace("\"", "\\\"");
				text = text.Replace("\n", "\\n");
				text = text.Replace("\r", "\\r");
				text = text.Replace("\0", "");
				text = text.Replace("\u2028", "");
				text = text.Replace("\u2029", "");
				return '"' + text + '"';
			}
			if (o is int || o is short || o is uint || o is ushort || o is byte)
			{
				return o.ToString();
			}
			if (o is float)
			{
				NumberFormatInfo numberFormat = CultureInfo.InvariantCulture.NumberFormat;
				return ((float)o).ToString(numberFormat);
			}
			if (o is double)
			{
				NumberFormatInfo numberFormat2 = CultureInfo.InvariantCulture.NumberFormat;
				return ((double)o).ToString(numberFormat2);
			}
			if (o is char)
			{
				if ((char)o == '"')
				{
					return "\"\\\"\"";
				}
				return '"' + o.ToString() + '"';
			}
			if (o is IList)
			{
				IList list = (IList)o;
				StringBuilder stringBuilder = new StringBuilder();
				stringBuilder.Append("new Array(");
				int count = list.Count;
				for (int i = 0; i < count; i++)
				{
					if (i != 0)
					{
						stringBuilder.Append(", ");
					}
					stringBuilder.Append(ObjectToJSString(list[i]));
				}
				stringBuilder.Append(")");
				return stringBuilder.ToString();
			}
			return ObjectToJSString(o.ToString());
		}

		[Obsolete("Application.ExternalCall is deprecated. See https://docs.unity3d.com/Manual/webgl-interactingwithbrowserscripting.html for alternatives.")]
		public static void ExternalCall(string functionName, params object[] args)
		{
			Internal_ExternalCall(BuildInvocationForArguments(functionName, args));
		}

		private static string BuildInvocationForArguments(string functionName, params object[] args)
		{
			StringBuilder stringBuilder = new StringBuilder();
			stringBuilder.Append(functionName);
			stringBuilder.Append('(');
			int num = args.Length;
			for (int i = 0; i < num; i++)
			{
				if (i != 0)
				{
					stringBuilder.Append(", ");
				}
				stringBuilder.Append(ObjectToJSString(args[i]));
			}
			stringBuilder.Append(')');
			stringBuilder.Append(';');
			return stringBuilder.ToString();
		}

		[Obsolete("Use Object.DontDestroyOnLoad instead")]
		public static void DontDestroyOnLoad(Object o)
		{
			if (o != null)
			{
				Object.DontDestroyOnLoad(o);
			}
		}

		[Obsolete("Application.CaptureScreenshot is obsolete. Use ScreenCapture.CaptureScreenshot instead (UnityUpgradable) -> [UnityEngine] UnityEngine.ScreenCapture.CaptureScreenshot(*)", true)]
		public static void CaptureScreenshot(string filename, int superSize)
		{
			throw new NotSupportedException("Application.CaptureScreenshot is obsolete. Use ScreenCapture.CaptureScreenshot instead.");
		}

		[Obsolete("Application.CaptureScreenshot is obsolete. Use ScreenCapture.CaptureScreenshot instead (UnityUpgradable) -> [UnityEngine] UnityEngine.ScreenCapture.CaptureScreenshot(*)", true)]
		public static void CaptureScreenshot(string filename)
		{
			throw new NotSupportedException("Application.CaptureScreenshot is obsolete. Use ScreenCapture.CaptureScreenshot instead.");
		}

		[RequiredByNativeCode]
		private static bool Internal_ApplicationWantsToQuit()
		{
			if (Application.wantsToQuit != null)
			{
				Delegate[] invocationList = Application.wantsToQuit.GetInvocationList();
				for (int i = 0; i < invocationList.Length; i++)
				{
					Func<bool> func = (Func<bool>)invocationList[i];
					try
					{
						if (!func())
						{
							return false;
						}
					}
					catch (Exception exception)
					{
						Debug.LogException(exception);
					}
				}
			}
			return true;
		}

		[RequiredByNativeCode]
		private static void Internal_ApplicationQuit()
		{
			if (Application.quitting != null)
			{
				Application.quitting();
			}
		}

		[RequiredByNativeCode]
		internal static void InvokeOnBeforeRender()
		{
			BeforeRenderHelper.Invoke();
		}

		[RequiredByNativeCode]
		internal static void InvokeFocusChanged(bool focus)
		{
			if (Application.focusChanged != null)
			{
				Application.focusChanged(focus);
			}
		}

		[RequiredByNativeCode]
		internal static void InvokeDeepLinkActivated(string url)
		{
			if (Application.deepLinkActivated != null)
			{
				Application.deepLinkActivated(url);
			}
		}

		[Obsolete("Application.RegisterLogCallback is deprecated. Use Application.logMessageReceived instead.")]
		public static void RegisterLogCallback(LogCallback handler)
		{
			RegisterLogCallback(handler, threaded: false);
		}

		[Obsolete("Application.RegisterLogCallbackThreaded is deprecated. Use Application.logMessageReceivedThreaded instead.")]
		public static void RegisterLogCallbackThreaded(LogCallback handler)
		{
			RegisterLogCallback(handler, threaded: true);
		}

		private static void RegisterLogCallback(LogCallback handler, bool threaded)
		{
			if (s_RegisterLogCallbackDeprecated != null)
			{
				logMessageReceived -= s_RegisterLogCallbackDeprecated;
				logMessageReceivedThreaded -= s_RegisterLogCallbackDeprecated;
			}
			s_RegisterLogCallbackDeprecated = handler;
			if (handler != null)
			{
				if (threaded)
				{
					logMessageReceivedThreaded += handler;
				}
				else
				{
					logMessageReceived += handler;
				}
			}
		}

		[Obsolete("Use SceneManager.LoadScene")]
		public static void LoadLevel(int index)
		{
			SceneManager.LoadScene(index, LoadSceneMode.Single);
		}

		[Obsolete("Use SceneManager.LoadScene")]
		public static void LoadLevel(string name)
		{
			SceneManager.LoadScene(name, LoadSceneMode.Single);
		}

		[Obsolete("Use SceneManager.LoadScene")]
		public static void LoadLevelAdditive(int index)
		{
			SceneManager.LoadScene(index, LoadSceneMode.Additive);
		}

		[Obsolete("Use SceneManager.LoadScene")]
		public static void LoadLevelAdditive(string name)
		{
			SceneManager.LoadScene(name, LoadSceneMode.Additive);
		}

		[Obsolete("Use SceneManager.LoadSceneAsync")]
		public static AsyncOperation LoadLevelAsync(int index)
		{
			return SceneManager.LoadSceneAsync(index, LoadSceneMode.Single);
		}

		[Obsolete("Use SceneManager.LoadSceneAsync")]
		public static AsyncOperation LoadLevelAsync(string levelName)
		{
			return SceneManager.LoadSceneAsync(levelName, LoadSceneMode.Single);
		}

		[Obsolete("Use SceneManager.LoadSceneAsync")]
		public static AsyncOperation LoadLevelAdditiveAsync(int index)
		{
			return SceneManager.LoadSceneAsync(index, LoadSceneMode.Additive);
		}

		[Obsolete("Use SceneManager.LoadSceneAsync")]
		public static AsyncOperation LoadLevelAdditiveAsync(string levelName)
		{
			return SceneManager.LoadSceneAsync(levelName, LoadSceneMode.Additive);
		}

		[Obsolete("Use SceneManager.UnloadScene")]
		public static bool UnloadLevel(int index)
		{
			return SceneManager.UnloadScene(index);
		}

		[Obsolete("Use SceneManager.UnloadScene")]
		public static bool UnloadLevel(string scenePath)
		{
			return SceneManager.UnloadScene(scenePath);
		}
	}
	public enum StackTraceLogType
	{
		None,
		ScriptOnly,
		Full
	}
	public enum NetworkReachability
	{
		NotReachable,
		ReachableViaCarrierDataNetwork,
		ReachableViaLocalAreaNetwork
	}
	public enum UserAuthorization
	{
		WebCam = 1,
		Microphone
	}
	public enum ApplicationInstallMode
	{
		Unknown,
		Store,
		DeveloperBuild,
		Adhoc,
		Enterprise,
		Editor
	}
	public enum ApplicationSandboxType
	{
		Unknown,
		NotSandboxed,
		Sandboxed,
		SandboxBroken
	}
}
namespace UnityEngine.Assertions
{
	[DebuggerStepThrough]
	public static class Assert
	{
		internal const string UNITY_ASSERTIONS = "UNITY_ASSERTIONS";

		[Obsolete("Future versions of Unity are expected to always throw exceptions and not have this field.")]
		public static bool raiseExceptions = true;

		private static void Fail(string message, string userMessage)
		{
			if (!raiseExceptions)
			{
				if (message == null)
				{
					message = "Assertion has failed\n";
				}
				if (userMessage != null)
				{
					message = userMessage + '\n' + message;
				}
				Debug.LogAssertion(message);
				return;
			}
			throw new AssertionException(message, userMessage);
		}

		[Obsolete("Assert.Equals should not be used for Assertions", true)]
		[EditorBrowsable(EditorBrowsableState.Never)]
		public new static bool Equals(object obj1, object obj2)
		{
			throw new InvalidOperationException("Assert.Equals should not be used for Assertions");
		}

		[Obsolete("Assert.ReferenceEquals should not be used for Assertions", true)]
		[EditorBrowsable(EditorBrowsableState.Never)]
		public new static bool ReferenceEquals(object obj1, object obj2)
		{
			throw new InvalidOperationException("Assert.ReferenceEquals should not be used for Assertions");
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void IsTrue(bool condition)
		{
			if (!condition)
			{
				IsTrue(condition, null);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void IsTrue(bool condition, string message)
		{
			if (!condition)
			{
				Fail(AssertionMessageUtil.BooleanFailureMessage(expected: true), message);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void IsFalse(bool condition)
		{
			if (condition)
			{
				IsFalse(condition, null);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void IsFalse(bool condition, string message)
		{
			if (condition)
			{
				Fail(AssertionMessageUtil.BooleanFailureMessage(expected: false), message);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreApproximatelyEqual(float expected, float actual)
		{
			AreEqual(expected, actual, null, FloatComparer.s_ComparerWithDefaultTolerance);
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreApproximatelyEqual(float expected, float actual, string message)
		{
			AreEqual(expected, actual, message, FloatComparer.s_ComparerWithDefaultTolerance);
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreApproximatelyEqual(float expected, float actual, float tolerance)
		{
			AreApproximatelyEqual(expected, actual, tolerance, null);
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreApproximatelyEqual(float expected, float actual, float tolerance, string message)
		{
			AreEqual(expected, actual, message, new FloatComparer(tolerance));
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreNotApproximatelyEqual(float expected, float actual)
		{
			AreNotEqual(expected, actual, null, FloatComparer.s_ComparerWithDefaultTolerance);
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreNotApproximatelyEqual(float expected, float actual, string message)
		{
			AreNotEqual(expected, actual, message, FloatComparer.s_ComparerWithDefaultTolerance);
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreNotApproximatelyEqual(float expected, float actual, float tolerance)
		{
			AreNotApproximatelyEqual(expected, actual, tolerance, null);
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreNotApproximatelyEqual(float expected, float actual, float tolerance, string message)
		{
			AreNotEqual(expected, actual, message, new FloatComparer(tolerance));
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreEqual<T>(T expected, T actual)
		{
			AreEqual(expected, actual, null);
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreEqual<T>(T expected, T actual, string message)
		{
			AreEqual(expected, actual, message, EqualityComparer<T>.Default);
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreEqual<T>(T expected, T actual, string message, IEqualityComparer<T> comparer)
		{
			if (typeof(Object).IsAssignableFrom(typeof(T)))
			{
				AreEqual(expected as Object, actual as Object, message);
			}
			else if (!comparer.Equals(actual, expected))
			{
				Fail(AssertionMessageUtil.GetEqualityMessage(actual, expected, expectEqual: true), message);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreEqual(Object expected, Object actual, string message)
		{
			if (actual != expected)
			{
				Fail(AssertionMessageUtil.GetEqualityMessage(actual, expected, expectEqual: true), message);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreNotEqual<T>(T expected, T actual)
		{
			AreNotEqual(expected, actual, null);
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreNotEqual<T>(T expected, T actual, string message)
		{
			AreNotEqual(expected, actual, message, EqualityComparer<T>.Default);
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreNotEqual<T>(T expected, T actual, string message, IEqualityComparer<T> comparer)
		{
			if (typeof(Object).IsAssignableFrom(typeof(T)))
			{
				AreNotEqual(expected as Object, actual as Object, message);
			}
			else if (comparer.Equals(actual, expected))
			{
				Fail(AssertionMessageUtil.GetEqualityMessage(actual, expected, expectEqual: false), message);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreNotEqual(Object expected, Object actual, string message)
		{
			if (actual == expected)
			{
				Fail(AssertionMessageUtil.GetEqualityMessage(actual, expected, expectEqual: false), message);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void IsNull<T>(T value) where T : class
		{
			IsNull(value, null);
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void IsNull<T>(T value, string message) where T : class
		{
			if (typeof(Object).IsAssignableFrom(typeof(T)))
			{
				IsNull(value as Object, message);
			}
			else if (value != null)
			{
				Fail(AssertionMessageUtil.NullFailureMessage(value, expectNull: true), message);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void IsNull(Object value, string message)
		{
			if (value != null)
			{
				Fail(AssertionMessageUtil.NullFailureMessage(value, expectNull: true), message);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void IsNotNull<T>(T value) where T : class
		{
			IsNotNull(value, null);
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void IsNotNull<T>(T value, string message) where T : class
		{
			if (typeof(Object).IsAssignableFrom(typeof(T)))
			{
				IsNotNull(value as Object, message);
			}
			else if (value == null)
			{
				Fail(AssertionMessageUtil.NullFailureMessage(value, expectNull: false), message);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void IsNotNull(Object value, string message)
		{
			if (value == null)
			{
				Fail(AssertionMessageUtil.NullFailureMessage(value, expectNull: false), message);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreEqual(sbyte expected, sbyte actual)
		{
			if (expected != actual)
			{
				Assert.AreEqual<sbyte>(expected, actual, (string)null);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreEqual(sbyte expected, sbyte actual, string message)
		{
			if (expected != actual)
			{
				Assert.AreEqual<sbyte>(expected, actual, message);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreNotEqual(sbyte expected, sbyte actual)
		{
			if (expected == actual)
			{
				Assert.AreNotEqual<sbyte>(expected, actual, (string)null);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreNotEqual(sbyte expected, sbyte actual, string message)
		{
			if (expected == actual)
			{
				Assert.AreNotEqual<sbyte>(expected, actual, message);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreEqual(byte expected, byte actual)
		{
			if (expected != actual)
			{
				Assert.AreEqual<byte>(expected, actual, (string)null);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreEqual(byte expected, byte actual, string message)
		{
			if (expected != actual)
			{
				Assert.AreEqual<byte>(expected, actual, message);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreNotEqual(byte expected, byte actual)
		{
			if (expected == actual)
			{
				Assert.AreNotEqual<byte>(expected, actual, (string)null);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreNotEqual(byte expected, byte actual, string message)
		{
			if (expected == actual)
			{
				Assert.AreNotEqual<byte>(expected, actual, message);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreEqual(char expected, char actual)
		{
			if (expected != actual)
			{
				Assert.AreEqual<char>(expected, actual, (string)null);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreEqual(char expected, char actual, string message)
		{
			if (expected != actual)
			{
				Assert.AreEqual<char>(expected, actual, message);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreNotEqual(char expected, char actual)
		{
			if (expected == actual)
			{
				Assert.AreNotEqual<char>(expected, actual, (string)null);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreNotEqual(char expected, char actual, string message)
		{
			if (expected == actual)
			{
				Assert.AreNotEqual<char>(expected, actual, message);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreEqual(short expected, short actual)
		{
			if (expected != actual)
			{
				Assert.AreEqual<short>(expected, actual, (string)null);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreEqual(short expected, short actual, string message)
		{
			if (expected != actual)
			{
				Assert.AreEqual<short>(expected, actual, message);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreNotEqual(short expected, short actual)
		{
			if (expected == actual)
			{
				Assert.AreNotEqual<short>(expected, actual, (string)null);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreNotEqual(short expected, short actual, string message)
		{
			if (expected == actual)
			{
				Assert.AreNotEqual<short>(expected, actual, message);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreEqual(ushort expected, ushort actual)
		{
			if (expected != actual)
			{
				Assert.AreEqual<ushort>(expected, actual, (string)null);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreEqual(ushort expected, ushort actual, string message)
		{
			if (expected != actual)
			{
				Assert.AreEqual<ushort>(expected, actual, message);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreNotEqual(ushort expected, ushort actual)
		{
			if (expected == actual)
			{
				Assert.AreNotEqual<ushort>(expected, actual, (string)null);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreNotEqual(ushort expected, ushort actual, string message)
		{
			if (expected == actual)
			{
				Assert.AreNotEqual<ushort>(expected, actual, message);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreEqual(int expected, int actual)
		{
			if (expected != actual)
			{
				Assert.AreEqual<int>(expected, actual, (string)null);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreEqual(int expected, int actual, string message)
		{
			if (expected != actual)
			{
				Assert.AreEqual<int>(expected, actual, message);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreNotEqual(int expected, int actual)
		{
			if (expected == actual)
			{
				Assert.AreNotEqual<int>(expected, actual, (string)null);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreNotEqual(int expected, int actual, string message)
		{
			if (expected == actual)
			{
				Assert.AreNotEqual<int>(expected, actual, message);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreEqual(uint expected, uint actual)
		{
			if (expected != actual)
			{
				Assert.AreEqual<uint>(expected, actual, (string)null);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreEqual(uint expected, uint actual, string message)
		{
			if (expected != actual)
			{
				Assert.AreEqual<uint>(expected, actual, message);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreNotEqual(uint expected, uint actual)
		{
			if (expected == actual)
			{
				Assert.AreNotEqual<uint>(expected, actual, (string)null);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreNotEqual(uint expected, uint actual, string message)
		{
			if (expected == actual)
			{
				Assert.AreNotEqual<uint>(expected, actual, message);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreEqual(long expected, long actual)
		{
			if (expected != actual)
			{
				Assert.AreEqual<long>(expected, actual, (string)null);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreEqual(long expected, long actual, string message)
		{
			if (expected != actual)
			{
				Assert.AreEqual<long>(expected, actual, message);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreNotEqual(long expected, long actual)
		{
			if (expected == actual)
			{
				Assert.AreNotEqual<long>(expected, actual, (string)null);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreNotEqual(long expected, long actual, string message)
		{
			if (expected == actual)
			{
				Assert.AreNotEqual<long>(expected, actual, message);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreEqual(ulong expected, ulong actual)
		{
			if (expected != actual)
			{
				Assert.AreEqual<ulong>(expected, actual, (string)null);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreEqual(ulong expected, ulong actual, string message)
		{
			if (expected != actual)
			{
				Assert.AreEqual<ulong>(expected, actual, message);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreNotEqual(ulong expected, ulong actual)
		{
			if (expected == actual)
			{
				Assert.AreNotEqual<ulong>(expected, actual, (string)null);
			}
		}

		[Conditional("UNITY_ASSERTIONS")]
		public static void AreNotEqual(ulong expected, ulong actual, string message)
		{
			if (expected == actual)
			{
				Assert.AreNotEqual<ulong>(expected, actual, message);
			}
		}
	}
	public class AssertionException : Exception
	{
		private string m_UserMessage;

		public override string Message
		{
			get
			{
				string text = base.Message;
				if (m_UserMessage != null)
				{
					text = text + '\n' + m_UserMessage;
				}
				return text;
			}
		}

		public AssertionException(string message, string userMessage)
			: base(message)
		{
			m_UserMessage = userMessage;
		}
	}
	internal class AssertionMessageUtil
	{
		private const string k_Expected = "Expected:";

		private const string k_AssertionFailed = "Assertion failure.";

		public static string GetMessage(string failureMessage)
		{
			return UnityString.Format("{0} {1}", new object[2] { "Assertion failure.", failureMessage });
		}

		public static string GetMessage(string failureMessage, string expected)
		{
			return GetMessage(UnityString.Format("{0}{1}{2} {3}", new object[4]
			{
				failureMessage,
				Environment.NewLine,
				"Expected:",
				expected
			}));
		}

		public static string GetEqualityMessage(object actual, object expected, bool expectEqual)
		{
			return GetMessage(UnityString.Format("Values are {0}equal.", new object[1] { (!expectEqual) ? "" : "not " }), UnityString.Format("{0} {2} {1}", new object[3]
			{
				actual,
				expected,
				(!expectEqual) ? "!=" : "=="
			}));
		}

		public static string NullFailureMessage(object value, bool expectNull)
		{
			return GetMessage(UnityString.Format("Value was {0}Null", new object[1] { (!expectNull) ? "" : "not " }), UnityString.Format("Value was {0}Null", new object[1] { (!expectNull) ? "not " : "" }));
		}

		public static string BooleanFailureMessage(bool expected)
		{
			return GetMessage("Value was " + !expected, expected.ToString());
		}
	}
}
namespace UnityEngine.Assertions.Comparers
{
	public class FloatComparer : IEqualityComparer<float>
	{
		private readonly float m_Error;

		private readonly bool m_Relative;

		public static readonly FloatComparer s_ComparerWithDefaultTolerance = new FloatComparer(1E-05f);

		public const float kEpsilon = 1E-05f;

		public FloatComparer()
			: this(1E-05f, relative: false)
		{
		}

		public FloatComparer(bool relative)
			: this(1E-05f, relative)
		{
		}

		public FloatComparer(float error)
			: this(error, relative: false)
		{
		}

		public FloatComparer(float error, bool relative)
		{
			m_Error = error;
			m_Relative = relative;
		}

		public bool Equals(float a, float b)
		{
			return (!m_Relative) ? AreEqual(a, b, m_Error) : AreEqualRelative(a, b, m_Error);
		}

		public int GetHashCode(float obj)
		{
			return base.GetHashCode();
		}

		public static bool AreEqual(float expected, float actual, float error)
		{
			return Math.Abs(actual - expected) <= error;
		}

		public static bool AreEqualRelative(float expected, float actual, float error)
		{
			if (expected == actual)
			{
				return true;
			}
			float num = Math.Abs(expected);
			float num2 = Math.Abs(actual);
			float num3 = Math.Abs((actual - expected) / ((!(num > num2)) ? num2 : num));
			return num3 <= error;
		}
	}
}
namespace UnityEngine.Assertions.Must
{
	[DebuggerStepThrough]
	[Obsolete("Must extensions are deprecated. Use UnityEngine.Assertions.Assert instead")]
	public static class MustExtensions
	{
		[Obsolete("Must extensions are deprecated. Use UnityEngine.Assertions.Assert instead")]
		[Conditional("UNITY_ASSERTIONS")]
		public static void MustBeTrue(this bool value)
		{
			Assert.IsTrue(value);
		}

		[Conditional("UNITY_ASSERTIONS")]
		[Obsolete("Must extensions are deprecated. Use UnityEngine.Assertions.Assert instead")]
		public static void MustBeTrue(this bool value, string message)
		{
			Assert.IsTrue(value, message);
		}

		[Obsolete("Must extensions are deprecated. Use UnityEngine.Assertions.Assert instead")]
		[Conditional("UNITY_ASSERTIONS")]
		public static void MustBeFalse(this bool value)
		{
			Assert.IsFalse(value);
		}

		[Obsolete("Must extensions are deprecated. Use UnityEngine.Assertions.Assert instead")]
		[Conditional("UNITY_ASSERTIONS")]
		public static void MustBeFalse(this bool value, string message)
		{
			Assert.IsFalse(value, message);
		}

		[Conditional("UNITY_ASSERTIONS")]
		[Obsolete("Must extensions are deprecated. Use UnityEngine.Assertions.Assert instead")]
		public static void MustBeApproximatelyEqual(this float actual, float expected)
		{
			Assert.AreApproximatelyEqual(actual, expected);
		}

		[Obsolete("Must extensions are deprecated. Use UnityEngine.Assertions.Assert instead")]
		[Conditional("UNITY_ASSERTIONS")]
		public static void MustBeApproximatelyEqual(this float actual, float expected, string message)
		{
			Assert.AreApproximatelyEqual(actual, expected, message);
		}

		[Conditional("UNITY_ASSERTIONS")]
		[Obsolete("Must extensions are deprecated. Use UnityEngine.Assertions.Assert instead")]
		public static void MustBeApproximatelyEqual(this float actual, float expected, float tolerance)
		{
			Assert.AreApproximatelyEqual(actual, expected, tolerance);
		}

		[Conditional("UNITY_ASSERTIONS")]
		[Obsolete("Must extensions are deprecated. Use UnityEngine.Assertions.Assert instead")]
		public static void MustBeApproximatelyEqual(this float actual, float expected, float tolerance, string message)
		{
			Assert.AreApproximatelyEqual(expected, actual, tolerance, message);
		}

		[Conditional("UNITY_ASSERTIONS")]
		[Obsolete("Must extensions are deprecated. Use UnityEngine.Assertions.Assert instead")]
		public static void MustNotBeApproximatelyEqual(this float actual, float expected)
		{
			Assert.AreNotApproximatelyEqual(expected, actual);
		}

		[Obsolete("Must extensions are deprecated. Use UnityEngine.Assertions.Assert instead")]
		[Conditional("UNITY_ASSERTIONS")]
		public static void MustNotBeApproximatelyEqual(this float actual, float expected, string message)
		{
			Assert.AreNotApproximatelyEqual(expected, actual, message);
		}

		[Conditional("UNITY_ASSERTIONS")]
		[Obsolete("Must extensions are deprecated. Use UnityEngine.Assertions.Assert instead")]
		public static void MustNotBeApproximatelyEqual(this float actual, float expected, float tolerance)
		{
			Assert.AreNotApproximatelyEqual(expected, actual, tolerance);
		}

		[Obsolete("Must extensions are deprecated. Use UnityEngine.Assertions.Assert instead")]
		[Conditional("UNITY_ASSERTIONS")]
		public static void MustNotBeApproximatelyEqual(this float actual, float expected, float tolerance, string message)
		{
			Assert.AreNotApproximatelyEqual(expected, actual, tolerance, message);
		}

		[Obsolete("Must extensions are deprecated. Use UnityEngine.Assertions.Assert instead")]
		[Conditional("UNITY_ASSERTIONS")]
		public static void MustBeEqual<T>(this T actual, T expected)
		{
			Assert.AreEqual(actual, expected);
		}

		[Conditional("UNITY_ASSERTIONS")]
		[Obsolete("Must extensions are deprecated. Use UnityEngine.Assertions.Assert instead")]
		public static void MustBeEqual<T>(this T actual, T expected, string message)
		{
			Assert.AreEqual(expected, actual, message);
		}

		[Obsolete("Must extensions are deprecated. Use UnityEngine.Assertions.Assert instead")]
		[Conditional("UNITY_ASSERTIONS")]
		public static void MustNotBeEqual<T>(this T actual, T expected)
		{
			Assert.AreNotEqual(actual, expected);
		}

		[Obsolete("Must extensions are deprecated. Use UnityEngine.Assertions.Assert instead")]
		[Conditional("UNITY_ASSERTIONS")]
		public static void MustNotBeEqual<T>(this T actual, T expected, string message)
		{
			Assert.AreNotEqual(expected, actual, message);
		}

		[Conditional("UNITY_ASSERTIONS")]
		[Obsolete("Must extensions are deprecated. Use UnityEngine.Assertions.Assert instead")]
		public static void MustBeNull<T>(this T expected) where T : class
		{
			Assert.IsNull(expected);
		}

		[Obsolete("Must extensions are deprecated. Use UnityEngine.Assertions.Assert instead")]
		[Conditional("UNITY_ASSERTIONS")]
		public static void MustBeNull<T>(this T expected, string message) where T : class
		{
			Assert.IsNull(expected, message);
		}

		[Conditional("UNITY_ASSERTIONS")]
		[Obsolete("Must extensions are deprecated. Use UnityEngine.Assertions.Assert instead")]
		public static void MustNotBeNull<T>(this T expected) where T : class
		{
			Assert.IsNotNull(expected);
		}

		[Conditional("UNITY_ASSERTIONS")]
		[Obsolete("Must extensions are deprecated. Use UnityEngine.Assertions.Assert instead")]
		public static void MustNotBeNull<T>(this T expected, string message) where T : class
		{
			Assert.IsNotNull(expected, message);
		}
	}
}
namespace UnityEngine
{
	public enum AudioType
	{
		UNKNOWN = 0,
		ACC = 1,
		AIFF = 2,
		IT = 10,
		MOD = 12,
		MPEG = 13,
		OGGVORBIS = 14,
		S3M = 17,
		WAV = 20,
		XM = 21,
		XMA = 22,
		VAG = 23,
		AUDIOQUEUE = 24
	}
	[NativeHeader("Runtime/Export/Bootstrap/BootConfig.bindings.h")]
	internal class BootConfigData
	{
		private IntPtr m_Ptr;

		private BootConfigData(IntPtr nativeHandle)
		{
			if (nativeHandle == IntPtr.Zero)
			{
				throw new ArgumentException("native handle can not be null");
			}
			m_Ptr = nativeHandle;
		}

		public void AddKey(string key)
		{
			Append(key, null);
		}

		public string Get(string key)
		{
			return GetValue(key, 0);
		}

		public string Get(string key, int index)
		{
			return GetValue(key, index);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void Append(string key, string value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void Set(string key, string value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern string GetValue(string key, int index);

		[RequiredByNativeCode]
		private static BootConfigData WrapBootConfigData(IntPtr nativeHandle)
		{
			return new BootConfigData(nativeHandle);
		}
	}
}
namespace Unity.Burst.LowLevel
{
	[NativeHeader("Runtime/Burst/BurstDelegateCache.h")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeHeader("Runtime/Burst/Burst.h")]
	internal static class BurstCompilerService
	{
		public delegate bool ExtractCompilerFlags(Type jobType, out string flags);

		public static extern bool IsInitialized
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("Initialize")]
		private static extern string InitializeInternal(string path, ExtractCompilerFlags extractCompilerFlags);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public static extern string GetDisassembly(MethodInfo m, string compilerOptions);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction]
		public static extern int CompileAsyncDelegateMethod(object delegateMethod, string compilerOptions);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction]
		public unsafe static extern void* GetAsyncCompiledAsyncDelegateMethod(int userID);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public static extern string GetMethodSignature(MethodInfo method);

		public static void Initialize(string folderRuntime, ExtractCompilerFlags extractCompilerFlags)
		{
			if (folderRuntime == null)
			{
				throw new ArgumentNullException("folderRuntime");
			}
			if (extractCompilerFlags == null)
			{
				throw new ArgumentNullException("extractCompilerFlags");
			}
			if (!Directory.Exists(folderRuntime))
			{
				UnityEngine.Debug.LogError($"Unable to initialize the burst JIT compiler. The folder `{folderRuntime}` does not exist");
				return;
			}
			string text = InitializeInternal(folderRuntime, extractCompilerFlags);
			if (!string.IsNullOrEmpty(text))
			{
				UnityEngine.Debug.LogError($"Unexpected error while trying to initialize the burst JIT compiler: {text}");
			}
		}
	}
}
namespace Unity.Burst
{
	[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property)]
	public class BurstDiscardAttribute : Attribute
	{
	}
}
namespace UnityEngine
{
	[UsedByNativeCode]
	public struct CachedAssetBundle
	{
		private string m_Name;

		private Hash128 m_Hash;

		public string name
		{
			get
			{
				return m_Name;
			}
			set
			{
				m_Name = value;
			}
		}

		public Hash128 hash
		{
			get
			{
				return m_Hash;
			}
			set
			{
				m_Hash = value;
			}
		}

		public CachedAssetBundle(string name, Hash128 hash)
		{
			m_Name = name;
			m_Hash = hash;
		}
	}
	[NativeHeader("Runtime/Misc/Cache.h")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	public struct Cache : IEquatable<Cache>
	{
		private int m_Handle;

		internal int handle => m_Handle;

		public bool valid => Cache_IsValid(m_Handle);

		public bool ready => Cache_IsReady(m_Handle);

		public bool readOnly => Cache_IsReadonly(m_Handle);

		public string path => Cache_GetPath(m_Handle);

		public int index => Cache_GetIndex(m_Handle);

		public long spaceFree => Cache_GetSpaceFree(m_Handle);

		public long maximumAvailableStorageSpace
		{
			get
			{
				return Cache_GetMaximumDiskSpaceAvailable(m_Handle);
			}
			set
			{
				Cache_SetMaximumDiskSpaceAvailable(m_Handle, value);
			}
		}

		public long spaceOccupied => Cache_GetCachingDiskSpaceUsed(m_Handle);

		public int expirationDelay
		{
			get
			{
				return Cache_GetExpirationDelay(m_Handle);
			}
			set
			{
				Cache_SetExpirationDelay(m_Handle, value);
			}
		}

		public static bool operator ==(Cache lhs, Cache rhs)
		{
			return lhs.handle == rhs.handle;
		}

		public static bool operator !=(Cache lhs, Cache rhs)
		{
			return lhs.handle != rhs.handle;
		}

		public override int GetHashCode()
		{
			return m_Handle;
		}

		public override bool Equals(object other)
		{
			return other is Cache && Equals((Cache)other);
		}

		public bool Equals(Cache other)
		{
			return handle == other.handle;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool Cache_IsValid(int handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		internal static extern bool Cache_IsReady(int handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		internal static extern bool Cache_IsReadonly(int handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		internal static extern string Cache_GetPath(int handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern int Cache_GetIndex(int handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		internal static extern long Cache_GetSpaceFree(int handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		internal static extern long Cache_GetMaximumDiskSpaceAvailable(int handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		internal static extern void Cache_SetMaximumDiskSpaceAvailable(int handle, long value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		internal static extern long Cache_GetCachingDiskSpaceUsed(int handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		internal static extern int Cache_GetExpirationDelay(int handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		internal static extern void Cache_SetExpirationDelay(int handle, int value);

		public bool ClearCache()
		{
			return Cache_ClearCache(m_Handle);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		internal static extern bool Cache_ClearCache(int handle);

		public bool ClearCache(int expiration)
		{
			return Cache_ClearCache_Expiration(m_Handle, expiration);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		internal static extern bool Cache_ClearCache_Expiration(int handle, int expiration);
	}
	[Obsolete("This struct is not for public use.")]
	[UsedByNativeCode]
	public struct CacheIndex
	{
		public string name;

		public int bytesUsed;

		public int expires;
	}
	[NativeHeader("Runtime/Misc/CachingManager.h")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	public sealed class Caching
	{
		public static extern bool compressionEnabled
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public static extern bool ready
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("GetIsReady")]
			get;
		}

		[Obsolete("Please use use Cache.spaceOccupied to get used bytes per cache.")]
		public static int spaceUsed => (int)spaceOccupied;

		[Obsolete("This property is only used for the current cache, use Cache.spaceOccupied to get used bytes per cache.")]
		public static extern long spaceOccupied
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[StaticAccessor(/*Could not decode attribute arguments.*/)]
			[NativeName("GetCachingDiskSpaceUsed")]
			get;
		}

		[Obsolete("Please use use Cache.spaceOccupied to get used bytes per cache.")]
		public static int spaceAvailable => (int)spaceFree;

		[Obsolete("This property is only used for the current cache, use Cache.spaceFree to get unused bytes per cache.")]
		public static extern long spaceFree
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[StaticAccessor(/*Could not decode attribute arguments.*/)]
			[NativeName("GetCachingDiskSpaceFree")]
			get;
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		[Obsolete("This property is only used for the current cache, use Cache.maximumAvailableStorageSpace to access the maximum available storage space per cache.")]
		public static extern long maximumAvailableDiskSpace
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("GetMaximumDiskSpaceAvailable")]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("SetMaximumDiskSpaceAvailable")]
			set;
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		[Obsolete("This property is only used for the current cache, use Cache.expirationDelay to access the expiration delay per cache.")]
		public static extern int expirationDelay
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public static extern int cacheCount
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static Cache defaultCache
		{
			[NativeName("Caching_GetDefaultCacheHandle")]
			get
			{
				get_defaultCache_Injected(out var ret);
				return ret;
			}
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static Cache currentCacheForWriting
		{
			[NativeName("Caching_GetCurrentCacheHandle")]
			get
			{
				get_currentCacheForWriting_Injected(out var ret);
				return ret;
			}
			[NativeThrows]
			[NativeName("Caching_SetCurrentCacheByHandle")]
			set
			{
				set_currentCacheForWriting_Injected(ref value);
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public static extern bool ClearCache();

		public static bool ClearCache(int expiration)
		{
			return ClearCache_Int(expiration);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("ClearCache")]
		internal static extern bool ClearCache_Int(int expiration);

		public static bool ClearCachedVersion(string assetBundleName, Hash128 hash)
		{
			if (string.IsNullOrEmpty(assetBundleName))
			{
				throw new ArgumentException("Input AssetBundle name cannot be null or empty.");
			}
			return ClearCachedVersionInternal(assetBundleName, hash);
		}

		[NativeName("ClearCachedVersion")]
		internal static bool ClearCachedVersionInternal(string assetBundleName, Hash128 hash)
		{
			return ClearCachedVersionInternal_Injected(assetBundleName, ref hash);
		}

		public static bool ClearOtherCachedVersions(string assetBundleName, Hash128 hash)
		{
			if (string.IsNullOrEmpty(assetBundleName))
			{
				throw new ArgumentException("Input AssetBundle name cannot be null or empty.");
			}
			return ClearCachedVersions(assetBundleName, hash, keepInputVersion: true);
		}

		public static bool ClearAllCachedVersions(string assetBundleName)
		{
			if (string.IsNullOrEmpty(assetBundleName))
			{
				throw new ArgumentException("Input AssetBundle name cannot be null or empty.");
			}
			return ClearCachedVersions(assetBundleName, default(Hash128), keepInputVersion: false);
		}

		internal static bool ClearCachedVersions(string assetBundleName, Hash128 hash, bool keepInputVersion)
		{
			return ClearCachedVersions_Injected(assetBundleName, ref hash, keepInputVersion);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern Hash128[] GetCachedVersions(string assetBundleName);

		public static void GetCachedVersions(string assetBundleName, List<Hash128> outCachedVersions)
		{
			if (string.IsNullOrEmpty(assetBundleName))
			{
				throw new ArgumentException("Input AssetBundle name cannot be null or empty.");
			}
			if (outCachedVersions == null)
			{
				throw new ArgumentNullException("Input outCachedVersions cannot be null.");
			}
			outCachedVersions.AddRange(GetCachedVersions(assetBundleName));
		}

		[Obsolete("Please use IsVersionCached with Hash128 instead.")]
		public static bool IsVersionCached(string url, int version)
		{
			return IsVersionCached(url, new Hash128(0u, 0u, 0u, (uint)version));
		}

		public static bool IsVersionCached(string url, Hash128 hash)
		{
			if (string.IsNullOrEmpty(url))
			{
				throw new ArgumentException("Input AssetBundle url cannot be null or empty.");
			}
			return IsVersionCached(url, "", hash);
		}

		public static bool IsVersionCached(CachedAssetBundle cachedBundle)
		{
			if (string.IsNullOrEmpty(cachedBundle.name))
			{
				throw new ArgumentException("Input AssetBundle name cannot be null or empty.");
			}
			return IsVersionCached("", cachedBundle.name, cachedBundle.hash);
		}

		[NativeName("IsCached")]
		internal static bool IsVersionCached(string url, string assetBundleName, Hash128 hash)
		{
			return IsVersionCached_Injected(url, assetBundleName, ref hash);
		}

		[Obsolete("Please use MarkAsUsed with Hash128 instead.")]
		public static bool MarkAsUsed(string url, int version)
		{
			return MarkAsUsed(url, new Hash128(0u, 0u, 0u, (uint)version));
		}

		public static bool MarkAsUsed(string url, Hash128 hash)
		{
			if (string.IsNullOrEmpty(url))
			{
				throw new ArgumentException("Input AssetBundle url cannot be null or empty.");
			}
			return MarkAsUsed(url, "", hash);
		}

		public static bool MarkAsUsed(CachedAssetBundle cachedBundle)
		{
			if (string.IsNullOrEmpty(cachedBundle.name))
			{
				throw new ArgumentException("Input AssetBundle name cannot be null or empty.");
			}
			return MarkAsUsed("", cachedBundle.name, cachedBundle.hash);
		}

		internal static bool MarkAsUsed(string url, string assetBundleName, Hash128 hash)
		{
			return MarkAsUsed_Injected(url, assetBundleName, ref hash);
		}

		[Obsolete("This function is obsolete and will always return -1. Use IsVersionCached instead.")]
		public static int GetVersionFromCache(string url)
		{
			return -1;
		}

		public static Cache AddCache(string cachePath)
		{
			if (string.IsNullOrEmpty(cachePath))
			{
				throw new ArgumentNullException("Cache path cannot be null or empty.");
			}
			bool isReadonly = false;
			if (cachePath.Replace('\\', '/').StartsWith(Application.streamingAssetsPath))
			{
				isReadonly = true;
			}
			else
			{
				if (!Directory.Exists(cachePath))
				{
					throw new ArgumentException("Cache path '" + cachePath + "' doesn't exist.");
				}
				if ((File.GetAttributes(cachePath) & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)
				{
					isReadonly = true;
				}
			}
			if (GetCacheByPath(cachePath).valid)
			{
				throw new InvalidOperationException("Cache with path '" + cachePath + "' has already been added.");
			}
			return AddCache(cachePath, isReadonly);
		}

		[NativeName("AddCachePath")]
		internal static Cache AddCache(string cachePath, bool isReadonly)
		{
			AddCache_Injected(cachePath, isReadonly, out var ret);
			return ret;
		}

		[NativeName("Caching_GetCacheHandleAt")]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		[NativeThrows]
		public static Cache GetCacheAt(int cacheIndex)
		{
			GetCacheAt_Injected(cacheIndex, out var ret);
			return ret;
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		[NativeThrows]
		[NativeName("Caching_GetCacheHandleByPath")]
		public static Cache GetCacheByPath(string cachePath)
		{
			GetCacheByPath_Injected(cachePath, out var ret);
			return ret;
		}

		public static void GetAllCachePaths(List<string> cachePaths)
		{
			cachePaths.Clear();
			for (int i = 0; i < cacheCount; i++)
			{
				cachePaths.Add(GetCacheAt(i).path);
			}
		}

		[NativeName("Caching_RemoveCacheByHandle")]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		[NativeThrows]
		public static bool RemoveCache(Cache cache)
		{
			return RemoveCache_Injected(ref cache);
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		[NativeName("Caching_MoveCacheBeforeByHandle")]
		[NativeThrows]
		public static void MoveCacheBefore(Cache src, Cache dst)
		{
			MoveCacheBefore_Injected(ref src, ref dst);
		}

		[NativeThrows]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		[NativeName("Caching_MoveCacheAfterByHandle")]
		public static void MoveCacheAfter(Cache src, Cache dst)
		{
			MoveCacheAfter_Injected(ref src, ref dst);
		}

		[Obsolete("This function is obsolete. Please use ClearCache.  (UnityUpgradable) -> ClearCache()")]
		public static bool CleanCache()
		{
			return ClearCache();
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool ClearCachedVersionInternal_Injected(string assetBundleName, ref Hash128 hash);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool ClearCachedVersions_Injected(string assetBundleName, ref Hash128 hash, bool keepInputVersion);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool IsVersionCached_Injected(string url, string assetBundleName, ref Hash128 hash);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool MarkAsUsed_Injected(string url, string assetBundleName, ref Hash128 hash);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void AddCache_Injected(string cachePath, bool isReadonly, out Cache ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void GetCacheAt_Injected(int cacheIndex, out Cache ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void GetCacheByPath_Injected(string cachePath, out Cache ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool RemoveCache_Injected(ref Cache cache);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void MoveCacheBefore_Injected(ref Cache src, ref Cache dst);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void MoveCacheAfter_Injected(ref Cache src, ref Cache dst);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private static extern void get_defaultCache_Injected(out Cache ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private static extern void get_currentCacheForWriting_Injected(out Cache ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private static extern void set_currentCacheForWriting_Injected(ref Cache value);
	}
}
namespace UnityEngine.Experimental.Rendering
{
	[NativeHeader("Runtime/Camera/ReflectionProbes.h")]
	internal class BuiltinRuntimeReflectionSystem : IScriptableRuntimeReflectionSystem, IDisposable
	{
		public bool TickRealtimeProbes()
		{
			return BuiltinUpdate();
		}

		public void Dispose()
		{
			Dispose(disposing: true);
		}

		private void Dispose(bool disposing)
		{
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		private static extern bool BuiltinUpdate();

		[RequiredByNativeCode]
		private static BuiltinRuntimeReflectionSystem Internal_BuiltinRuntimeReflectionSystem_New()
		{
			return new BuiltinRuntimeReflectionSystem();
		}
	}
}
namespace UnityEngine
{
	[NativeHeader("Runtime/Camera/Camera.h")]
	[NativeHeader("Runtime/GfxDevice/GfxDeviceTypes.h")]
	[NativeHeader("Runtime/Camera/RenderManager.h")]
	[NativeHeader("Runtime/Graphics/CommandBuffer/RenderingCommandBuffer.h")]
	[NativeHeader("Runtime/Misc/GameObjectUtility.h")]
	[NativeHeader("Runtime/Shaders/Shader.h")]
	[UsedByNativeCode]
	[NativeHeader("Runtime/Graphics/RenderTexture.h")]
	[RequireComponent(typeof(Transform))]
	public sealed class Camera : Behaviour
	{
		internal enum ProjectionMatrixMode
		{
			Explicit,
			Implicit,
			PhysicalPropertiesBased
		}

		public enum GateFitMode
		{
			Vertical = 1,
			Horizontal = 2,
			Fill = 3,
			Overscan = 4,
			None = 0
		}

		public enum FieldOfViewAxis
		{
			Vertical,
			Horizontal
		}

		public struct GateFitParameters
		{
			public GateFitMode mode { get; set; }

			public float aspect { get; set; }

			public GateFitParameters(GateFitMode mode, float aspect)
			{
				this.mode = mode;
				this.aspect = aspect;
			}
		}

		public enum StereoscopicEye
		{
			Left,
			Right
		}

		public enum MonoOrStereoscopicEye
		{
			Left,
			Right,
			Mono
		}

		public delegate void CameraCallback(Camera cam);

		public static CameraCallback onPreCull;

		public static CameraCallback onPreRender;

		public static CameraCallback onPostRender;

		[NativeProperty("Near")]
		public extern float nearClipPlane
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty("Far")]
		public extern float farClipPlane
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty("VerticalFieldOfView")]
		public extern float fieldOfView
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern RenderingPath renderingPath
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern RenderingPath actualRenderingPath
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("CalculateRenderingPath")]
			get;
		}

		public extern bool allowHDR
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.I

Room Architect Tool_Data/Managed/UnityEngine.CrashReportingModule.dll

Decompiled 3 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;

[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine.CrashReportHandler;

[StaticAccessor(/*Could not decode attribute arguments.*/)]
[NativeHeader("Modules/CrashReporting/Public/CrashReporter.h")]
public class CrashReportHandler
{
	[NativeProperty("Enabled")]
	public static extern bool enableCaptureExceptions
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[NativeThrows]
	public static extern uint logBufferSize
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	private CrashReportHandler()
	{
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeThrows]
	public static extern string GetUserMetadata(string key);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeThrows]
	public static extern void SetUserMetadata(string key, string value);
}

Room Architect Tool_Data/Managed/UnityEngine.DirectorModule.dll

Decompiled 3 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;
using UnityEngine.Scripting;

[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: UnityEngineModuleAssembly]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine.Playables;

[NativeHeader("Runtime/Mono/MonoBehaviour.h")]
[NativeHeader("Modules/Director/PlayableDirector.h")]
[RequiredByNativeCode]
public class PlayableDirector : Behaviour, IExposedPropertyTable
{
	public PlayState state => GetPlayState();

	public DirectorWrapMode extrapolationMode
	{
		get
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			return GetWrapMode();
		}
		set
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			SetWrapMode(value);
		}
	}

	public PlayableAsset playableAsset
	{
		get
		{
			ScriptableObject obj = Internal_GetPlayableAsset();
			return (PlayableAsset)(object)((obj is PlayableAsset) ? obj : null);
		}
		set
		{
			SetPlayableAsset((ScriptableObject)(object)value);
		}
	}

	public PlayableGraph playableGraph => GetGraphHandle();

	public bool playOnAwake
	{
		get
		{
			return GetPlayOnAwake();
		}
		set
		{
			SetPlayOnAwake(value);
		}
	}

	public extern DirectorUpdateMode timeUpdateMode
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern double time
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern double initialTime
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern double duration
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	public event Action<PlayableDirector> played;

	public event Action<PlayableDirector> paused;

	public event Action<PlayableDirector> stopped;

	public void DeferredEvaluate()
	{
		EvaluateNextFrame();
	}

	public void Play(PlayableAsset asset)
	{
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)asset == (Object)null)
		{
			throw new ArgumentNullException("asset");
		}
		Play(asset, extrapolationMode);
	}

	public void Play(PlayableAsset asset, DirectorWrapMode mode)
	{
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)asset == (Object)null)
		{
			throw new ArgumentNullException("asset");
		}
		playableAsset = asset;
		extrapolationMode = mode;
		Play();
	}

	public void SetGenericBinding(Object key, Object value)
	{
		Internal_SetGenericBinding(key, value);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern void Evaluate();

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern void Play();

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern void Stop();

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern void Pause();

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern void Resume();

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern void RebuildGraph();

	public void ClearReferenceValue(PropertyName id)
	{
		ClearReferenceValue_Injected(ref id);
	}

	public void SetReferenceValue(PropertyName id, Object value)
	{
		SetReferenceValue_Injected(ref id, value);
	}

	public Object GetReferenceValue(PropertyName id, out bool idValid)
	{
		return GetReferenceValue_Injected(ref id, out idValid);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod("GetBindingFor")]
	public extern Object GetGenericBinding(Object key);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod("ClearBindingFor")]
	public extern void ClearGenericBinding(Object key);

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern void RebindPlayableGraphOutputs();

	[MethodImpl(MethodImplOptions.InternalCall)]
	internal extern void ProcessPendingGraphChanges();

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod("HasBinding")]
	internal extern bool HasGenericBinding(Object key);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern PlayState GetPlayState();

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void SetWrapMode(DirectorWrapMode mode);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern DirectorWrapMode GetWrapMode();

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void EvaluateNextFrame();

	private PlayableGraph GetGraphHandle()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		GetGraphHandle_Injected(out var ret);
		return ret;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void SetPlayOnAwake(bool on);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern bool GetPlayOnAwake();

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void Internal_SetGenericBinding(Object key, Object value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void SetPlayableAsset(ScriptableObject asset);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern ScriptableObject Internal_GetPlayableAsset();

	[MethodImpl(MethodImplOptions.InternalCall)]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeHeader("Runtime/Director/Core/DirectorManager.h")]
	internal static extern void ResetFrameTiming();

	[RequiredByNativeCode]
	private void SendOnPlayableDirectorPlay()
	{
		if (this.played != null)
		{
			this.played(this);
		}
	}

	[RequiredByNativeCode]
	private void SendOnPlayableDirectorPause()
	{
		if (this.paused != null)
		{
			this.paused(this);
		}
	}

	[RequiredByNativeCode]
	private void SendOnPlayableDirectorStop()
	{
		if (this.stopped != null)
		{
			this.stopped(this);
		}
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void ClearReferenceValue_Injected(ref PropertyName id);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void SetReferenceValue_Injected(ref PropertyName id, Object value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern Object GetReferenceValue_Injected(ref PropertyName id, out bool idValid);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void GetGraphHandle_Injected(out PlayableGraph ret);
}

Room Architect Tool_Data/Managed/UnityEngine.dll

Decompiled 3 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using AOT;
using JetBrains.Annotations;
using Unity.Audio;
using Unity.Burst;
using Unity.Burst.LowLevel;
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
using Unity.IO.LowLevel.Unsafe;
using Unity.Jobs;
using Unity.Jobs.LowLevel.Unsafe;
using Unity.Profiling;
using UnityEditor.Experimental;
using UnityEngine;
using UnityEngine.AI;
using UnityEngine.Accessibility;
using UnityEngine.Advertisements;
using UnityEngine.Analytics;
using UnityEngine.Android;
using UnityEngine.Animations;
using UnityEngine.Assertions;
using UnityEngine.Assertions.Comparers;
using UnityEngine.Assertions.Must;
using UnityEngine.Audio;
using UnityEngine.Bindings;
using UnityEngine.Connect;
using UnityEngine.CrashReportHandler;
using UnityEngine.Diagnostics;
using UnityEngine.Events;
using UnityEngine.Experimental.AI;
using UnityEngine.Experimental.Animations;
using UnityEngine.Experimental.AssetBundlePatching;
using UnityEngine.Experimental.Audio;
using UnityEngine.Experimental.GlobalIllumination;
using UnityEngine.Experimental.LowLevel;
using UnityEngine.Experimental.Networking.PlayerConnection;
using UnityEngine.Experimental.ParticleSystemJobs;
using UnityEngine.Experimental.Playables;
using UnityEngine.Experimental.PlayerLoop;
using UnityEngine.Experimental.Rendering;
using UnityEngine.Experimental.TerrainAPI;
using UnityEngine.Experimental.U2D;
using UnityEngine.Experimental.VFX;
using UnityEngine.Experimental.Video;
using UnityEngine.Experimental.XR;
using UnityEngine.Internal;
using UnityEngine.Internal.VR;
using UnityEngine.Jobs;
using UnityEngine.Lumin;
using UnityEngine.Networking;
using UnityEngine.Networking.Match;
using UnityEngine.Networking.PlayerConnection;
using UnityEngine.Networking.Types;
using UnityEngine.Playables;
using UnityEngine.Profiling;
using UnityEngine.Profiling.Memory.Experimental;
using UnityEngine.Rendering;
using UnityEngine.SceneManagement;
using UnityEngine.Scripting;
using UnityEngine.Scripting.APIUpdating;
using UnityEngine.Serialization;
using UnityEngine.SocialPlatforms;
using UnityEngine.SocialPlatforms.Impl;
using UnityEngine.Sprites;
using UnityEngine.TestTools;
using UnityEngine.TextCore;
using UnityEngine.TextCore.LowLevel;
using UnityEngine.Tilemaps;
using UnityEngine.U2D;
using UnityEngine.UIElements;
using UnityEngine.UIElements.StyleSheets;
using UnityEngine.UIElements.StyleSheets.Syntax;
using UnityEngine.UIElements.UIR;
using UnityEngine.UIElements.UIR.Implementation;
using UnityEngine.Video;
using UnityEngine.Windows;
using UnityEngine.Windows.Speech;
using UnityEngine.Windows.WebCam;
using UnityEngine.XR;
using UnityEngine.XR.Provider;
using UnityEngine.XR.Tango;
using UnityEngine.XR.WSA;
using UnityEngine.Yoga;
using UnityEngine._Scripting.APIUpdating;
using UnityEngineInternal;
using UnityEngineInternal.Input;
using UnityEngineInternal.Video;

[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[assembly: TypeForwardedTo(typeof(UsedByNativeCodeAttribute))]
[assembly: TypeForwardedTo(typeof(RequiredByNativeCodeAttribute))]
[assembly: TypeForwardedTo(typeof(GeneratedByOldBindingsGeneratorAttribute))]
[assembly: TypeForwardedTo(typeof(AssetFileNameExtensionAttribute))]
[assembly: TypeForwardedTo(typeof(ThreadAndSerializationSafeAttribute))]
[assembly: TypeForwardedTo(typeof(IL2CPPStructAlignmentAttribute))]
[assembly: TypeForwardedTo(typeof(WritableAttribute))]
[assembly: TypeForwardedTo(typeof(RejectDragAndDropMaterial))]
[assembly: TypeForwardedTo(typeof(UnityEngineModuleAssembly))]
[assembly: TypeForwardedTo(typeof(NativeClassAttribute))]
[assembly: TypeForwardedTo(typeof(VisibleToOtherModulesAttribute))]
[assembly: TypeForwardedTo(typeof(IBindingsAttribute))]
[assembly: TypeForwardedTo(typeof(IBindingsNameProviderAttribute))]
[assembly: TypeForwardedTo(typeof(IBindingsHeaderProviderAttribute))]
[assembly: TypeForwardedTo(typeof(IBindingsIsThreadSafeProviderAttribute))]
[assembly: TypeForwardedTo(typeof(IBindingsIsFreeFunctionProviderAttribute))]
[assembly: TypeForwardedTo(typeof(IBindingsThrowsProviderAttribute))]
[assembly: TypeForwardedTo(typeof(IBindingsGenerateMarshallingTypeAttribute))]
[assembly: TypeForwardedTo(typeof(IBindingsWritableSelfProviderAttribute))]
[assembly: TypeForwardedTo(typeof(NativeConditionalAttribute))]
[assembly: TypeForwardedTo(typeof(NativeHeaderAttribute))]
[assembly: TypeForwardedTo(typeof(NativeNameAttribute))]
[assembly: TypeForwardedTo(typeof(NativeWritableSelfAttribute))]
[assembly: TypeForwardedTo(typeof(NativeMethodAttribute))]
[assembly: TypeForwardedTo(typeof(TargetType))]
[assembly: TypeForwardedTo(typeof(NativePropertyAttribute))]
[assembly: TypeForwardedTo(typeof(CodegenOptions))]
[assembly: TypeForwardedTo(typeof(NativeAsStructAttribute))]
[assembly: TypeForwardedTo(typeof(NativeTypeAttribute))]
[assembly: TypeForwardedTo(typeof(NotNullAttribute))]
[assembly: TypeForwardedTo(typeof(UnmarshalledAttribute))]
[assembly: TypeForwardedTo(typeof(FreeFunctionAttribute))]
[assembly: TypeForwardedTo(typeof(ThreadSafeAttribute))]
[assembly: TypeForwardedTo(typeof(StaticAccessorType))]
[assembly: TypeForwardedTo(typeof(StaticAccessorAttribute))]
[assembly: TypeForwardedTo(typeof(NativeThrowsAttribute))]
[assembly: TypeForwardedTo(typeof(IgnoreAttribute))]
[assembly: TypeForwardedTo(typeof(MarshalUnityObjectAs))]
[assembly: TypeForwardedTo(typeof(UnityString))]
[assembly: TypeForwardedTo(typeof(SendMessageOptions))]
[assembly: TypeForwardedTo(typeof(PrimitiveType))]
[assembly: TypeForwardedTo(typeof(Space))]
[assembly: TypeForwardedTo(typeof(RuntimePlatform))]
[assembly: TypeForwardedTo(typeof(SystemLanguage))]
[assembly: TypeForwardedTo(typeof(LogType))]
[assembly: TypeForwardedTo(typeof(LogOption))]
[assembly: TypeForwardedTo(typeof(ThreadPriority))]
[assembly: TypeForwardedTo(typeof(ExcludeFromCoverageAttribute))]
[assembly: TypeForwardedTo(typeof(CoveredSequencePoint))]
[assembly: TypeForwardedTo(typeof(CoveredMethodStats))]
[assembly: TypeForwardedTo(typeof(Coverage))]
[assembly: TypeForwardedTo(typeof(SortingLayer))]
[assembly: TypeForwardedTo(typeof(AndroidDevice))]
[assembly: TypeForwardedTo(typeof(Permission))]
[assembly: TypeForwardedTo(typeof(WeightedMode))]
[assembly: TypeForwardedTo(typeof(Keyframe))]
[assembly: TypeForwardedTo(typeof(WrapMode))]
[assembly: TypeForwardedTo(typeof(AnimationCurve))]
[assembly: TypeForwardedTo(typeof(CanBeNullAttribute))]
[assembly: TypeForwardedTo(typeof(NotNullAttribute))]
[assembly: TypeForwardedTo(typeof(StringFormatMethodAttribute))]
[assembly: TypeForwardedTo(typeof(InvokerParameterNameAttribute))]
[assembly: TypeForwardedTo(typeof(NotifyPropertyChangedInvocatorAttribute))]
[assembly: TypeForwardedTo(typeof(ContractAnnotationAttribute))]
[assembly: TypeForwardedTo(typeof(LocalizationRequiredAttribute))]
[assembly: TypeForwardedTo(typeof(CannotApplyEqualityOperatorAttribute))]
[assembly: TypeForwardedTo(typeof(BaseTypeRequiredAttribute))]
[assembly: TypeForwardedTo(typeof(UsedImplicitlyAttribute))]
[assembly: TypeForwardedTo(typeof(MeansImplicitUseAttribute))]
[assembly: TypeForwardedTo(typeof(ImplicitUseKindFlags))]
[assembly: TypeForwardedTo(typeof(ImplicitUseTargetFlags))]
[assembly: TypeForwardedTo(typeof(PublicAPIAttribute))]
[assembly: TypeForwardedTo(typeof(InstantHandleAttribute))]
[assembly: TypeForwardedTo(typeof(PureAttribute))]
[assembly: TypeForwardedTo(typeof(PathReferenceAttribute))]
[assembly: TypeForwardedTo(typeof(NoEnumerationAttribute))]
[assembly: TypeForwardedTo(typeof(AssertionMethodAttribute))]
[assembly: TypeForwardedTo(typeof(LinqTunnelAttribute))]
[assembly: TypeForwardedTo(typeof(Application))]
[assembly: TypeForwardedTo(typeof(StackTraceLogType))]
[assembly: TypeForwardedTo(typeof(NetworkReachability))]
[assembly: TypeForwardedTo(typeof(UserAuthorization))]
[assembly: TypeForwardedTo(typeof(ApplicationInstallMode))]
[assembly: TypeForwardedTo(typeof(ApplicationSandboxType))]
[assembly: TypeForwardedTo(typeof(Assert))]
[assembly: TypeForwardedTo(typeof(AssertionException))]
[assembly: TypeForwardedTo(typeof(AssertionMessageUtil))]
[assembly: TypeForwardedTo(typeof(FloatComparer))]
[assembly: TypeForwardedTo(typeof(MustExtensions))]
[assembly: TypeForwardedTo(typeof(AudioType))]
[assembly: TypeForwardedTo(typeof(BootConfigData))]
[assembly: TypeForwardedTo(typeof(BurstCompilerService))]
[assembly: TypeForwardedTo(typeof(BurstDiscardAttribute))]
[assembly: TypeForwardedTo(typeof(CachedAssetBundle))]
[assembly: TypeForwardedTo(typeof(Cache))]
[assembly: TypeForwardedTo(typeof(CacheIndex))]
[assembly: TypeForwardedTo(typeof(Caching))]
[assembly: TypeForwardedTo(typeof(BuiltinRuntimeReflectionSystem))]
[assembly: TypeForwardedTo(typeof(Camera))]
[assembly: TypeForwardedTo(typeof(BoundingSphere))]
[assembly: TypeForwardedTo(typeof(CullingQueryOptions))]
[assembly: TypeForwardedTo(typeof(CullingGroupEvent))]
[assembly: TypeForwardedTo(typeof(CullingGroup))]
[assembly: TypeForwardedTo(typeof(FlareLayer))]
[assembly: TypeForwardedTo(typeof(IScriptableRuntimeReflectionSystem))]
[assembly: TypeForwardedTo(typeof(ReflectionProbe))]
[assembly: TypeForwardedTo(typeof(ScriptableRuntimeReflectionSystem))]
[assembly: TypeForwardedTo(typeof(ScriptableRuntimeReflectionSystemSettings))]
[assembly: TypeForwardedTo(typeof(ScriptableRuntimeReflectionSystemWrapper))]
[assembly: TypeForwardedTo(typeof(ReadOnlyAttribute))]
[assembly: TypeForwardedTo(typeof(WriteOnlyAttribute))]
[assembly: TypeForwardedTo(typeof(DeallocateOnJobCompletionAttribute))]
[assembly: TypeForwardedTo(typeof(NativeFixedLengthAttribute))]
[assembly: TypeForwardedTo(typeof(NativeMatchesParallelForLengthAttribute))]
[assembly: TypeForwardedTo(typeof(NativeDisableParallelForRestrictionAttribute))]
[assembly: TypeForwardedTo(typeof(NativeContainerAttribute))]
[assembly: TypeForwardedTo(typeof(NativeContainerIsReadOnlyAttribute))]
[assembly: TypeForwardedTo(typeof(NativeContainerIsAtomicWriteOnlyAttribute))]
[assembly: TypeForwardedTo(typeof(NativeContainerSupportsMinMaxWriteRestrictionAttribute))]
[assembly: TypeForwardedTo(typeof(NativeContainerSupportsDeallocateOnJobCompletionAttribute))]
[assembly: TypeForwardedTo(typeof(NativeContainerSupportsDeferredConvertListToArray))]
[assembly: TypeForwardedTo(typeof(NativeSetThreadIndexAttribute))]
[assembly: TypeForwardedTo(typeof(NativeContainerNeedsThreadIndexAttribute))]
[assembly: TypeForwardedTo(typeof(WriteAccessRequiredAttribute))]
[assembly: TypeForwardedTo(typeof(NativeDisableUnsafePtrRestrictionAttribute))]
[assembly: TypeForwardedTo(typeof(NativeDisableContainerSafetyRestrictionAttribute))]
[assembly: TypeForwardedTo(typeof(NativeSetClassTypeToNullOnScheduleAttribute))]
[assembly: TypeForwardedTo(typeof(Allocator))]
[assembly: TypeForwardedTo(typeof(CrashReport))]
[assembly: TypeForwardedTo(typeof(DebugLogHandler))]
[assembly: TypeForwardedTo(typeof(Debug))]
[assembly: TypeForwardedTo(typeof(ForcedCrashCategory))]
[assembly: TypeForwardedTo(typeof(Utils))]
[assembly: TypeForwardedTo(typeof(DiagnosticSwitchFlags))]
[assembly: TypeForwardedTo(typeof(DiagnosticSwitch))]
[assembly: TypeForwardedTo(typeof(CameraPlayable))]
[assembly: TypeForwardedTo(typeof(ExposedPropertyResolver))]
[assembly: TypeForwardedTo(typeof(ExposedReference<>))]
[assembly: TypeForwardedTo(typeof(FrameData))]
[assembly: TypeForwardedTo(typeof(IExposedPropertyTable))]
[assembly: TypeForwardedTo(typeof(INotification))]
[assembly: TypeForwardedTo(typeof(INotificationReceiver))]
[assembly: TypeForwardedTo(typeof(IPlayable))]
[assembly: TypeForwardedTo(typeof(IPlayableBehaviour))]
[assembly: TypeForwardedTo(typeof(IPlayableOutput))]
[assembly: TypeForwardedTo(typeof(MaterialEffectPlayable))]
[assembly: TypeForwardedTo(typeof(Notification))]
[assembly: TypeForwardedTo(typeof(DirectorWrapMode))]
[assembly: TypeForwardedTo(typeof(Playable))]
[assembly: TypeForwardedTo(typeof(IPlayableAsset))]
[assembly: TypeForwardedTo(typeof(PlayableAsset))]
[assembly: TypeForwardedTo(typeof(PlayableBehaviour))]
[assembly: TypeForwardedTo(typeof(DataStreamType))]
[assembly: TypeForwardedTo(typeof(PlayableBinding))]
[assembly: TypeForwardedTo(typeof(PlayableTraversalMode))]
[assembly: TypeForwardedTo(typeof(PlayableExtensions))]
[assembly: TypeForwardedTo(typeof(DirectorUpdateMode))]
[assembly: TypeForwardedTo(typeof(PlayableGraph))]
[assembly: TypeForwardedTo(typeof(PlayState))]
[assembly: TypeForwardedTo(typeof(PlayableHandle))]
[assembly: TypeForwardedTo(typeof(PlayableOutput))]
[assembly: TypeForwardedTo(typeof(PlayableOutputExtensions))]
[assembly: TypeForwardedTo(typeof(PlayableOutputHandle))]
[assembly: TypeForwardedTo(typeof(ScriptPlayable<>))]
[assembly: TypeForwardedTo(typeof(ScriptPlayableBinding))]
[assembly: TypeForwardedTo(typeof(ScriptPlayableOutput))]
[assembly: TypeForwardedTo(typeof(TextureMixerPlayable))]
[assembly: TypeForwardedTo(typeof(TexturePlayableBinding))]
[assembly: TypeForwardedTo(typeof(TexturePlayableGraphExtensions))]
[assembly: TypeForwardedTo(typeof(TexturePlayableOutput))]
[assembly: TypeForwardedTo(typeof(ReadCommand))]
[assembly: TypeForwardedTo(typeof(ReadStatus))]
[assembly: TypeForwardedTo(typeof(ReadHandle))]
[assembly: TypeForwardedTo(typeof(AsyncReadManager))]
[assembly: TypeForwardedTo(typeof(Bounds))]
[assembly: TypeForwardedTo(typeof(BoundsInt))]
[assembly: TypeForwardedTo(typeof(GeometryUtility))]
[assembly: TypeForwardedTo(typeof(Plane))]
[assembly: TypeForwardedTo(typeof(Ray))]
[assembly: TypeForwardedTo(typeof(Ray2D))]
[assembly: TypeForwardedTo(typeof(Rect))]
[assembly: TypeForwardedTo(typeof(RectInt))]
[assembly: TypeForwardedTo(typeof(RectOffset))]
[assembly: TypeForwardedTo(typeof(DynamicGI))]
[assembly: TypeForwardedTo(typeof(GITextureType))]
[assembly: TypeForwardedTo(typeof(GIDebugVisualisation))]
[assembly: TypeForwardedTo(typeof(LightType))]
[assembly: TypeForwardedTo(typeof(LightMode))]
[assembly: TypeForwardedTo(typeof(FalloffType))]
[assembly: TypeForwardedTo(typeof(LinearColor))]
[assembly: TypeForwardedTo(typeof(DirectionalLight))]
[assembly: TypeForwardedTo(typeof(PointLight))]
[assembly: TypeForwardedTo(typeof(SpotLight))]
[assembly: TypeForwardedTo(typeof(RectangleLight))]
[assembly: TypeForwardedTo(typeof(DiscLight))]
[assembly: TypeForwardedTo(typeof(LightDataGI))]
[assembly: TypeForwardedTo(typeof(LightmapperUtils))]
[assembly: TypeForwardedTo(typeof(Lightmapping))]
[assembly: TypeForwardedTo(typeof(Gizmos))]
[assembly: TypeForwardedTo(typeof(AsyncGPUReadbackRequest))]
[assembly: TypeForwardedTo(typeof(AsyncGPUReadback))]
[assembly: TypeForwardedTo(typeof(BeforeRenderOrderAttribute))]
[assembly: TypeForwardedTo(typeof(BeforeRenderHelper))]
[assembly: TypeForwardedTo(typeof(BillboardAsset))]
[assembly: TypeForwardedTo(typeof(BillboardRenderer))]
[assembly: TypeForwardedTo(typeof(Display))]
[assembly: TypeForwardedTo(typeof(SynchronisationStage))]
[assembly: TypeForwardedTo(typeof(GPUFence))]
[assembly: TypeForwardedTo(typeof(EnabledOrientation))]
[assembly: TypeForwardedTo(typeof(FullScreenMode))]
[assembly: TypeForwardedTo(typeof(SleepTimeout))]
[assembly: TypeForwardedTo(typeof(Screen))]
[assembly: TypeForwardedTo(typeof(RenderBuffer))]
[assembly: TypeForwardedTo(typeof(MemorylessMode))]
[assembly: TypeForwardedTo(typeof(MemorylessManager))]
[assembly: TypeForwardedTo(typeof(ComputeBufferMode))]
[assembly: TypeForwardedTo(typeof(Graphics))]
[assembly: TypeForwardedTo(typeof(GL))]
[assembly: TypeForwardedTo(typeof(ScalableBufferManager))]
[assembly: TypeForwardedTo(typeof(FrameTiming))]
[assembly: TypeForwardedTo(typeof(FrameTimingManager))]
[assembly: TypeForwardedTo(typeof(LightmapData))]
[assembly: TypeForwardedTo(typeof(LightmapSettings))]
[assembly: TypeForwardedTo(typeof(LightProbes))]
[assembly: TypeForwardedTo(typeof(WaitForPresentSyncPoint))]
[assembly: TypeForwardedTo(typeof(GraphicsJobsSyncPoint))]
[assembly: TypeForwardedTo(typeof(GraphicsDeviceSettings))]
[assembly: TypeForwardedTo(typeof(Resolution))]
[assembly: TypeForwardedTo(typeof(RenderTargetSetup))]
[assembly: TypeForwardedTo(typeof(Internal_DrawTextureArguments))]
[assembly: TypeForwardedTo(typeof(QualitySettings))]
[assembly: TypeForwardedTo(typeof(RendererExtensions))]
[assembly: TypeForwardedTo(typeof(ImageEffectTransformsToLDR))]
[assembly: TypeForwardedTo(typeof(ImageEffectAllowedInSceneView))]
[assembly: TypeForwardedTo(typeof(ImageEffectOpaque))]
[assembly: TypeForwardedTo(typeof(ImageEffectAfterScale))]
[assembly: TypeForwardedTo(typeof(ImageEffectUsesCommandBuffer))]
[assembly: TypeForwardedTo(typeof(LightmapsModeLegacy))]
[assembly: TypeForwardedTo(typeof(TrailRenderer))]
[assembly: TypeForwardedTo(typeof(LineRenderer))]
[assembly: TypeForwardedTo(typeof(MaterialPropertyBlock))]
[assembly: TypeForwardedTo(typeof(Renderer))]
[assembly: TypeForwardedTo(typeof(RenderSettings))]
[assembly: TypeForwardedTo(typeof(Shader))]
[assembly: TypeForwardedTo(typeof(Material))]
[assembly: TypeForwardedTo(typeof(ShaderHardwareTier))]
[assembly: TypeForwardedTo(typeof(RenderSettings))]
[assembly: TypeForwardedTo(typeof(GraphicsBuffer))]
[assembly: TypeForwardedTo(typeof(OcclusionPortal))]
[assembly: TypeForwardedTo(typeof(OcclusionArea))]
[assembly: TypeForwardedTo(typeof(Flare))]
[assembly: TypeForwardedTo(typeof(LensFlare))]
[assembly: TypeForwardedTo(typeof(Projector))]
[assembly: TypeForwardedTo(typeof(LightBakingOutput))]
[assembly: TypeForwardedTo(typeof(LightShadowCasterMode))]
[assembly: TypeForwardedTo(typeof(Light))]
[assembly: TypeForwardedTo(typeof(Skybox))]
[assembly: TypeForwardedTo(typeof(MeshFilter))]
[assembly: TypeForwardedTo(typeof(Halo))]
[assembly: TypeForwardedTo(typeof(GraphicsDeviceDebugSettings))]
[assembly: TypeForwardedTo(typeof(GraphicsDeviceDebug))]
[assembly: TypeForwardedTo(typeof(RenderingPath))]
[assembly: TypeForwardedTo(typeof(TransparencySortMode))]
[assembly: TypeForwardedTo(typeof(StereoTargetEyeMask))]
[assembly: TypeForwardedTo(typeof(CameraType))]
[assembly: TypeForwardedTo(typeof(ComputeBufferType))]
[assembly: TypeForwardedTo(typeof(LightType))]
[assembly: TypeForwardedTo(typeof(LightRenderMode))]
[assembly: TypeForwardedTo(typeof(LightShadows))]
[assembly: TypeForwardedTo(typeof(FogMode))]
[assembly: TypeForwardedTo(typeof(LightmapBakeType))]
[assembly: TypeForwardedTo(typeof(MixedLightingMode))]
[assembly: TypeForwardedTo(typeof(ReceiveGI))]
[assembly: TypeForwardedTo(typeof(QualityLevel))]
[assembly: TypeForwardedTo(typeof(ShadowProjection))]
[assembly: TypeForwardedTo(typeof(ShadowQuality))]
[assembly: TypeForwardedTo(typeof(ShadowResolution))]
[assembly: TypeForwardedTo(typeof(ShadowmaskMode))]
[assembly: TypeForwardedTo(typeof(CameraClearFlags))]
[assembly: TypeForwardedTo(typeof(DepthTextureMode))]
[assembly: TypeForwardedTo(typeof(TexGenMode))]
[assembly: TypeForwardedTo(typeof(AnisotropicFiltering))]
[assembly: TypeForwardedTo(typeof(SkinWeights))]
[assembly: TypeForwardedTo(typeof(MeshTopology))]
[assembly: TypeForwardedTo(typeof(SkinQuality))]
[assembly: TypeForwardedTo(typeof(ColorSpace))]
[assembly: TypeForwardedTo(typeof(ColorGamut))]
[assembly: TypeForwardedTo(typeof(ScreenOrientation))]
[assembly: TypeForwardedTo(typeof(FilterMode))]
[assembly: TypeForwardedTo(typeof(TextureWrapMode))]
[assembly: TypeForwardedTo(typeof(NPOTSupport))]
[assembly: TypeForwardedTo(typeof(TextureFormat))]
[assembly: TypeForwardedTo(typeof(CubemapFace))]
[assembly: TypeForwardedTo(typeof(RenderTextureFormat))]
[assembly: TypeForwardedTo(typeof(VRTextureUsage))]
[assembly: TypeForwardedTo(typeof(RenderTextureCreationFlags))]
[assembly: TypeForwardedTo(typeof(RenderTextureReadWrite))]
[assembly: TypeForwardedTo(typeof(RenderTextureMemoryless))]
[assembly: TypeForwardedTo(typeof(TextureCreationFlags))]
[assembly: TypeForwardedTo(typeof(FormatUsage))]
[assembly: TypeForwardedTo(typeof(DefaultFormat))]
[assembly: TypeForwardedTo(typeof(GraphicsFormat))]
[assembly: TypeForwardedTo(typeof(LightmapsMode))]
[assembly: TypeForwardedTo(typeof(MaterialGlobalIlluminationFlags))]
[assembly: TypeForwardedTo(typeof(LightProbeProxyVolume))]
[assembly: TypeForwardedTo(typeof(CustomRenderTextureInitializationSource))]
[assembly: TypeForwardedTo(typeof(CustomRenderTextureUpdateMode))]
[assembly: TypeForwardedTo(typeof(CustomRenderTextureUpdateZoneSpace))]
[assembly: TypeForwardedTo(typeof(MotionVectorGenerationMode))]
[assembly: TypeForwardedTo(typeof(LineTextureMode))]
[assembly: TypeForwardedTo(typeof(LineAlignment))]
[assembly: TypeForwardedTo(typeof(IndexFormat))]
[assembly: TypeForwardedTo(typeof(VertexAttribute))]
[assembly: TypeForwardedTo(typeof(OpaqueSortMode))]
[assembly: TypeForwardedTo(typeof(RenderQueue))]
[assembly: TypeForwardedTo(typeof(RenderBufferLoadAction))]
[assembly: TypeForwardedTo(typeof(RenderBufferStoreAction))]
[assembly: TypeForwardedTo(typeof(BlendMode))]
[assembly: TypeForwardedTo(typeof(BlendOp))]
[assembly: TypeForwardedTo(typeof(CompareFunction))]
[assembly: TypeForwardedTo(typeof(CullMode))]
[assembly: TypeForwardedTo(typeof(ColorWriteMask))]
[assembly: TypeForwardedTo(typeof(StencilOp))]
[assembly: TypeForwardedTo(typeof(AmbientMode))]
[assembly: TypeForwardedTo(typeof(DefaultReflectionMode))]
[assembly: TypeForwardedTo(typeof(ReflectionCubemapCompression))]
[assembly: TypeForwardedTo(typeof(CameraEvent))]
[assembly: TypeForwardedTo(typeof(CameraEventUtils))]
[assembly: TypeForwardedTo(typeof(LightEvent))]
[assembly: TypeForwardedTo(typeof(ShadowMapPass))]
[assembly: TypeForwardedTo(typeof(BuiltinRenderTextureType))]
[assembly: TypeForwardedTo(typeof(PassType))]
[assembly: TypeForwardedTo(typeof(ShadowCastingMode))]
[assembly: TypeForwardedTo(typeof(LightShadowResolution))]
[assembly: TypeForwardedTo(typeof(GraphicsDeviceType))]
[assembly: TypeForwardedTo(typeof(GraphicsTier))]
[assembly: TypeForwardedTo(typeof(RenderTargetIdentifier))]
[assembly: TypeForwardedTo(typeof(RenderTargetBinding))]
[assembly: TypeForwardedTo(typeof(ReflectionProbeUsage))]
[assembly: TypeForwardedTo(typeof(ReflectionProbeType))]
[assembly: TypeForwardedTo(typeof(ReflectionProbeClearFlags))]
[assembly: TypeForwardedTo(typeof(ReflectionProbeMode))]
[assembly: TypeForwardedTo(typeof(ReflectionProbeBlendInfo))]
[assembly: TypeForwardedTo(typeof(ReflectionProbeRefreshMode))]
[assembly: TypeForwardedTo(typeof(ReflectionProbeTimeSlicingMode))]
[assembly: TypeForwardedTo(typeof(ShadowSamplingMode))]
[assembly: TypeForwardedTo(typeof(LightProbeUsage))]
[assembly: TypeForwardedTo(typeof(BuiltinShaderType))]
[assembly: TypeForwardedTo(typeof(BuiltinShaderMode))]
[assembly: TypeForwardedTo(typeof(BuiltinShaderDefine))]
[assembly: TypeForwardedTo(typeof(TextureDimension))]
[assembly: TypeForwardedTo(typeof(CopyTextureSupport))]
[assembly: TypeForwardedTo(typeof(CameraHDRMode))]
[assembly: TypeForwardedTo(typeof(RealtimeGICPUUsage))]
[assembly: TypeForwardedTo(typeof(ComputeQueueType))]
[assembly: TypeForwardedTo(typeof(SinglePassStereoMode))]
[assembly: TypeForwardedTo(typeof(CommandBufferExecutionFlags))]
[assembly: TypeForwardedTo(typeof(LightmapType))]
[assembly: TypeForwardedTo(typeof(SynchronisationStageFlags))]
[assembly: TypeForwardedTo(typeof(GraphicsFenceType))]
[assembly: TypeForwardedTo(typeof(GraphicsFence))]
[assembly: TypeForwardedTo(typeof(GraphicsFormatUtility))]
[assembly: TypeForwardedTo(typeof(RenderSettings))]
[assembly: TypeForwardedTo(typeof(SkinnedMeshRenderer))]
[assembly: TypeForwardedTo(typeof(MeshRenderer))]
[assembly: TypeForwardedTo(typeof(GraphicsSettings))]
[assembly: TypeForwardedTo(typeof(LightProbeGroup))]
[assembly: TypeForwardedTo(typeof(LineUtility))]
[assembly: TypeForwardedTo(typeof(LODFadeMode))]
[assembly: TypeForwardedTo(typeof(LOD))]
[assembly: TypeForwardedTo(typeof(LODGroup))]
[assembly: TypeForwardedTo(typeof(Mesh))]
[assembly: TypeForwardedTo(typeof(StaticBatchingHelper))]
[assembly: TypeForwardedTo(typeof(BoneWeight))]
[assembly: TypeForwardedTo(typeof(BoneWeight1))]
[assembly: TypeForwardedTo(typeof(CombineInstance))]
[assembly: TypeForwardedTo(typeof(CommandBuffer))]
[assembly: TypeForwardedTo(typeof(SplashScreen))]
[assembly: TypeForwardedTo(typeof(Texture))]
[assembly: TypeForwardedTo(typeof(Texture2D))]
[assembly: TypeForwardedTo(typeof(Cubemap))]
[assembly: TypeForwardedTo(typeof(Texture3D))]
[assembly: TypeForwardedTo(typeof(Texture2DArray))]
[assembly: TypeForwardedTo(typeof(CubemapArray))]
[assembly: TypeForwardedTo(typeof(SparseTexture))]
[assembly: TypeForwardedTo(typeof(RenderTexture))]
[assembly: TypeForwardedTo(typeof(CustomRenderTextureUpdateZone))]
[assembly: TypeForwardedTo(typeof(CustomRenderTexture))]
[assembly: TypeForwardedTo(typeof(RenderTextureDescriptor))]
[assembly: TypeForwardedTo(typeof(Hash128))]
[assembly: TypeForwardedTo(typeof(HashUtilities))]
[assembly: TypeForwardedTo(typeof(HashUnsafeUtilities))]
[assembly: TypeForwardedTo(typeof(SpookyHash))]
[assembly: TypeForwardedTo(typeof(GUIElement))]
[assembly: TypeForwardedTo(typeof(GUITexture))]
[assembly: TypeForwardedTo(typeof(GUILayer))]
[assembly: TypeForwardedTo(typeof(ScrollWaitDefinitions))]
[assembly: TypeForwardedTo(typeof(CursorMode))]
[assembly: TypeForwardedTo(typeof(CursorLockMode))]
[assembly: TypeForwardedTo(typeof(Cursor))]
[assembly: TypeForwardedTo(typeof(KeyCode))]
[assembly: TypeForwardedTo(typeof(DefaultValueAttribute))]
[assembly: TypeForwardedTo(typeof(ExcludeFromDocsAttribute))]
[assembly: TypeForwardedTo(typeof(ISubAssetNotDuplicatable))]
[assembly: TypeForwardedTo(typeof(ILogger))]
[assembly: TypeForwardedTo(typeof(ILogHandler))]
[assembly: TypeForwardedTo(typeof(Logger))]
[assembly: TypeForwardedTo(typeof(UnityLogWriter))]
[assembly: TypeForwardedTo(typeof(UsesLuminPlatformLevelAttribute))]
[assembly: TypeForwardedTo(typeof(UsesLuminPrivilegeAttribute))]
[assembly: TypeForwardedTo(typeof(Color))]
[assembly: TypeForwardedTo(typeof(Color32))]
[assembly: TypeForwardedTo(typeof(ColorUtility))]
[assembly: TypeForwardedTo(typeof(GradientColorKey))]
[assembly: TypeForwardedTo(typeof(GradientAlphaKey))]
[assembly: TypeForwardedTo(typeof(GradientMode))]
[assembly: TypeForwardedTo(typeof(Gradient))]
[assembly: TypeForwardedTo(typeof(FrustumPlanes))]
[assembly: TypeForwardedTo(typeof(Matrix4x4))]
[assembly: TypeForwardedTo(typeof(Vector3))]
[assembly: TypeForwardedTo(typeof(Quaternion))]
[assembly: TypeForwardedTo(typeof(Mathf))]
[assembly: TypeForwardedTo(typeof(MathfInternal))]
[assembly: TypeForwardedTo(typeof(SphericalHarmonicsL2))]
[assembly: TypeForwardedTo(typeof(Vector2))]
[assembly: TypeForwardedTo(typeof(Vector2Int))]
[assembly: TypeForwardedTo(typeof(Vector3Int))]
[assembly: TypeForwardedTo(typeof(Vector4))]
[assembly: TypeForwardedTo(typeof(NativeLeakDetectionMode))]
[assembly: TypeForwardedTo(typeof(NativeLeakDetection))]
[assembly: TypeForwardedTo(typeof(NativeArrayOptions))]
[assembly: TypeForwardedTo(typeof(NativeArray<>))]
[assembly: TypeForwardedTo(typeof(NativeArrayDebugView<>))]
[assembly: TypeForwardedTo(typeof(NativeArrayUnsafeUtility))]
[assembly: TypeForwardedTo(typeof(NativeSliceExtensions))]
[assembly: TypeForwardedTo(typeof(NativeSlice<>))]
[assembly: TypeForwardedTo(typeof(NativeSliceDebugView<>))]
[assembly: TypeForwardedTo(typeof(NativeSliceUnsafeUtility))]
[assembly: TypeForwardedTo(typeof(Ping))]
[assembly: TypeForwardedTo(typeof(ConnectionTarget))]
[assembly: TypeForwardedTo(typeof(IConnectionState))]
[assembly: TypeForwardedTo(typeof(MessageEventArgs))]
[assembly: TypeForwardedTo(typeof(IEditorPlayerConnection))]
[assembly: TypeForwardedTo(typeof(PlayerConnection))]
[assembly: TypeForwardedTo(typeof(PlayerEditorConnectionEvents))]
[assembly: TypeForwardedTo(typeof(PlayerConnection))]
[assembly: TypeForwardedTo(typeof(IPlayerEditorConnectionNative))]
[assembly: TypeForwardedTo(typeof(PlayerConnectionInternal))]
[assembly: TypeForwardedTo(typeof(Initialization))]
[assembly: TypeForwardedTo(typeof(EarlyUpdate))]
[assembly: TypeForwardedTo(typeof(FixedUpdate))]
[assembly: TypeForwardedTo(typeof(PreUpdate))]
[assembly: TypeForwardedTo(typeof(Update))]
[assembly: TypeForwardedTo(typeof(PreLateUpdate))]
[assembly: TypeForwardedTo(typeof(PostLateUpdate))]
[assembly: TypeForwardedTo(typeof(PlayerLoopSystemInternal))]
[assembly: TypeForwardedTo(typeof(PlayerLoopSystem))]
[assembly: TypeForwardedTo(typeof(PlayerLoop))]
[assembly: TypeForwardedTo(typeof(PlayerPrefsException))]
[assembly: TypeForwardedTo(typeof(PlayerPrefs))]
[assembly: TypeForwardedTo(typeof(DrivenPropertyManager))]
[assembly: TypeForwardedTo(typeof(PropertyAttribute))]
[assembly: TypeForwardedTo(typeof(ContextMenuItemAttribute))]
[assembly: TypeForwardedTo(typeof(InspectorNameAttribute))]
[assembly: TypeForwardedTo(typeof(TooltipAttribute))]
[assembly: TypeForwardedTo(typeof(SpaceAttribute))]
[assembly: TypeForwardedTo(typeof(HeaderAttribute))]
[assembly: TypeForwardedTo(typeof(RangeAttribute))]
[assembly: TypeForwardedTo(typeof(MinAttribute))]
[assembly: TypeForwardedTo(typeof(MultilineAttribute))]
[assembly: TypeForwardedTo(typeof(TextAreaAttribute))]
[assembly: TypeForwardedTo(typeof(ColorUsageAttribute))]
[assembly: TypeForwardedTo(typeof(GradientUsageAttribute))]
[assembly: TypeForwardedTo(typeof(DelayedAttribute))]
[assembly: TypeForwardedTo(typeof(PropertyNameUtils))]
[assembly: TypeForwardedTo(typeof(PropertyName))]
[assembly: TypeForwardedTo(typeof(Random))]
[assembly: TypeForwardedTo(typeof(BatchVisibility))]
[assembly: TypeForwardedTo(typeof(BatchCullingContext))]
[assembly: TypeForwardedTo(typeof(BatchRendererCullingOutput))]
[assembly: TypeForwardedTo(typeof(BatchRendererGroup))]
[assembly: TypeForwardedTo(typeof(AttachmentDescriptor))]
[assembly: TypeForwardedTo(typeof(BlendState))]
[assembly: TypeForwardedTo(typeof(CoreCameraValues))]
[assembly: TypeForwardedTo(typeof(CameraProperties))]
[assembly: TypeForwardedTo(typeof(CullingOptions))]
[assembly: TypeForwardedTo(typeof(ScriptableCullingParameters))]
[assembly: TypeForwardedTo(typeof(CullingResults))]
[assembly: TypeForwardedTo(typeof(CullingAllocationInfo))]
[assembly: TypeForwardedTo(typeof(DepthState))]
[assembly: TypeForwardedTo(typeof(DrawingSettings))]
[assembly: TypeForwardedTo(typeof(DrawRendererFlags))]
[assembly: TypeForwardedTo(typeof(FilteringSettings))]
[assembly: TypeForwardedTo(typeof(GizmoSubset))]
[assembly: TypeForwardedTo(typeof(LODParameters))]
[assembly: TypeForwardedTo(typeof(PerObjectData))]
[assembly: TypeForwardedTo(typeof(RasterState))]
[assembly: TypeForwardedTo(typeof(ReflectionProbeSortingCriteria))]
[assembly: TypeForwardedTo(typeof(RenderPipeline))]
[assembly: TypeForwardedTo(typeof(RenderPipeline))]
[assembly: TypeForwardedTo(typeof(RenderPipelineAsset))]
[assembly: TypeForwardedTo(typeof(RenderPipelineManager))]
[assembly: TypeForwardedTo(typeof(RenderQueueRange))]
[assembly: TypeForwardedTo(typeof(RenderStateBlock))]
[assembly: TypeForwardedTo(typeof(RenderStateMask))]
[assembly: TypeForwardedTo(typeof(RenderTargetBlendState))]
[assembly: TypeForwardedTo(typeof(ScopedRenderPass))]
[assembly: TypeForwardedTo(typeof(ScopedSubPass))]
[assembly: TypeForwardedTo(typeof(ScriptableRenderContext))]
[assembly: TypeForwardedTo(typeof(ShaderTagId))]
[assembly: TypeForwardedTo(typeof(ShadowDrawingSettings))]
[assembly: TypeForwardedTo(typeof(ShadowSplitData))]
[assembly: TypeForwardedTo(typeof(SortingCriteria))]
[assembly: TypeForwardedTo(typeof(SortingLayerRange))]
[assembly: TypeForwardedTo(typeof(DistanceMetric))]
[assembly: TypeForwardedTo(typeof(SortingSettings))]
[assembly: TypeForwardedTo(typeof(StencilState))]
[assembly: TypeForwardedTo(typeof(SupportedRenderingFeatures))]
[assembly: TypeForwardedTo(typeof(VisibleLight))]
[assembly: TypeForwardedTo(typeof(VisibleLightFlags))]
[assembly: TypeForwardedTo(typeof(VisibleReflectionProbe))]
[assembly: TypeForwardedTo(typeof(ResourceRequest))]
[assembly: TypeForwardedTo(typeof(Resources))]
[assembly: TypeForwardedTo(typeof(Scene))]
[assembly: TypeForwardedTo(typeof(SceneManager))]
[assembly: TypeForwardedTo(typeof(LoadSceneMode))]
[assembly: TypeForwardedTo(typeof(LocalPhysicsMode))]
[assembly: TypeForwardedTo(typeof(LoadSceneParameters))]
[assembly: TypeForwardedTo(typeof(CreateSceneParameters))]
[assembly: TypeForwardedTo(typeof(UnloadSceneOptions))]
[assembly: TypeForwardedTo(typeof(SceneUtility))]
[assembly: TypeForwardedTo(typeof(AlwaysLinkAssemblyAttribute))]
[assembly: TypeForwardedTo(typeof(AsyncOperation))]
[assembly: TypeForwardedTo(typeof(MonoPInvokeCallbackAttribute))]
[assembly: TypeForwardedTo(typeof(AttributeHelperEngine))]
[assembly: TypeForwardedTo(typeof(DisallowMultipleComponent))]
[assembly: TypeForwardedTo(typeof(RequireComponent))]
[assembly: TypeForwardedTo(typeof(AddComponentMenu))]
[assembly: TypeForwardedTo(typeof(CreateAssetMenuAttribute))]
[assembly: TypeForwardedTo(typeof(ContextMenu))]
[assembly: TypeForwardedTo(typeof(ExecuteInEditMode))]
[assembly: TypeForwardedTo(typeof(ExecuteAlways))]
[assembly: TypeForwardedTo(typeof(HideInInspector))]
[assembly: TypeForwardedTo(typeof(HelpURLAttribute))]
[assembly: TypeForwardedTo(typeof(DefaultExecutionOrder))]
[assembly: TypeForwardedTo(typeof(AssemblyIsEditorAssembly))]
[assembly: TypeForwardedTo(typeof(ExcludeFromPresetAttribute))]
[assembly: TypeForwardedTo(typeof(Behaviour))]
[assembly: TypeForwardedTo(typeof(CastHelper<>))]
[assembly: TypeForwardedTo(typeof(ClassLibraryInitializer))]
[assembly: TypeForwardedTo(typeof(Component))]
[assembly: TypeForwardedTo(typeof(Coroutine))]
[assembly: TypeForwardedTo(typeof(SetupCoroutine))]
[assembly: TypeForwardedTo(typeof(CustomYieldInstruction))]
[assembly: TypeForwardedTo(typeof(EnumInfo))]
[assembly: TypeForwardedTo(typeof(ExcludeFromObjectFactoryAttribute))]
[assembly: TypeForwardedTo(typeof(ExtensionOfNativeClassAttribute))]
[assembly: TypeForwardedTo(typeof(FailedToLoadScriptObject))]
[assembly: TypeForwardedTo(typeof(GameObject))]
[assembly: TypeForwardedTo(typeof(GarbageCollector))]
[assembly: TypeForwardedTo(typeof(LayerMask))]
[assembly: TypeForwardedTo(typeof(ManagedStreamHelpers))]
[assembly: TypeForwardedTo(typeof(MonoBehaviour))]
[assembly: TypeForwardedTo(typeof(NoAllocHelpers))]
[assembly: TypeForwardedTo(typeof(PreserveAttribute))]
[assembly: TypeForwardedTo(typeof(RangeInt))]
[assembly: TypeForwardedTo(typeof(RuntimeInitializeLoadType))]
[assembly: TypeForwardedTo(typeof(RuntimeInitializeOnLoadMethodAttribute))]
[assembly: TypeForwardedTo(typeof(ScriptableObject))]
[assembly: TypeForwardedTo(typeof(ScriptingRuntime))]
[assembly: TypeForwardedTo(typeof(ScriptingUtility))]
[assembly: TypeForwardedTo(typeof(SelectionBaseAttribute))]
[assembly: TypeForwardedTo(typeof(StackTraceUtility))]
[assembly: TypeForwardedTo(typeof(UnityException))]
[assembly: TypeForwardedTo(typeof(MissingComponentException))]
[assembly: TypeForwardedTo(typeof(UnassignedReferenceException))]
[assembly: TypeForwardedTo(typeof(MissingReferenceException))]
[assembly: TypeForwardedTo(typeof(TextAsset))]
[assembly: TypeForwardedTo(typeof(TrackedReference))]
[assembly: TypeForwardedTo(typeof(UnhandledExceptionHandler))]
[assembly: TypeForwardedTo(typeof(UnityAPICompatibilityVersionAttribute))]
[assembly: TypeForwardedTo(typeof(HideFlags))]
[assembly: TypeForwardedTo(typeof(Object))]
[assembly: TypeForwardedTo(typeof(UnitySynchronizationContext))]
[assembly: TypeForwardedTo(typeof(WaitForEndOfFrame))]
[assembly: TypeForwardedTo(typeof(WaitForFixedUpdate))]
[assembly: TypeForwardedTo(typeof(WaitForSeconds))]
[assembly: TypeForwardedTo(typeof(WaitForSecondsRealtime))]
[assembly: TypeForwardedTo(typeof(WaitUntil))]
[assembly: TypeForwardedTo(typeof(WaitWhile))]
[assembly: TypeForwardedTo(typeof(YieldInstruction))]
[assembly: TypeForwardedTo(typeof(MovedFromAttributeData))]
[assembly: TypeForwardedTo(typeof(MovedFromAttribute))]
[assembly: TypeForwardedTo(typeof(Security))]
[assembly: TypeForwardedTo(typeof(Types))]
[assembly: TypeForwardedTo(typeof(FormerlySerializedAsAttribute))]
[assembly: TypeForwardedTo(typeof(SerializePrivateVariables))]
[assembly: TypeForwardedTo(typeof(SerializeField))]
[assembly: TypeForwardedTo(typeof(SerializeReference))]
[assembly: TypeForwardedTo(typeof(PreferBinarySerialization))]
[assembly: TypeForwardedTo(typeof(ISerializationCallbackReceiver))]
[assembly: TypeForwardedTo(typeof(UnitySurrogateSelector))]
[assembly: TypeForwardedTo(typeof(ListSerializationSurrogate))]
[assembly: TypeForwardedTo(typeof(DictionarySerializationSurrogate<, >))]
[assembly: TypeForwardedTo(typeof(ComputeBuffer))]
[assembly: TypeForwardedTo(typeof(PlatformKeywordSet))]
[assembly: TypeForwardedTo(typeof(DisableBatchingType))]
[assembly: TypeForwardedTo(typeof(ShaderVariantCollection))]
[assembly: TypeForwardedTo(typeof(ComputeShader))]
[assembly: TypeForwardedTo(typeof(ShaderKeywordType))]
[assembly: TypeForwardedTo(typeof(ShaderKeyword))]
[assembly: TypeForwardedTo(typeof(ShaderKeywordSet))]
[assembly: TypeForwardedTo(typeof(StaticBatchingUtility))]
[assembly: TypeForwardedTo(typeof(InternalStaticBatchingUtility))]
[assembly: TypeForwardedTo(typeof(MeshSubsetCombineUtility))]
[assembly: TypeForwardedTo(typeof(LowerResBlitTexture))]
[assembly: TypeForwardedTo(typeof(PreloadData))]
[assembly: TypeForwardedTo(typeof(BatteryStatus))]
[assembly: TypeForwardedTo(typeof(OperatingSystemFamily))]
[assembly: TypeForwardedTo(typeof(DeviceType))]
[assembly: TypeForwardedTo(typeof(SystemInfo))]
[assembly: TypeForwardedTo(typeof(SystemClock))]
[assembly: TypeForwardedTo(typeof(Time))]
[assembly: TypeForwardedTo(typeof(TouchScreenKeyboard_InternalConstructorHelperArguments))]
[assembly: TypeForwardedTo(typeof(TouchScreenKeyboard))]
[assembly: TypeForwardedTo(typeof(TouchScreenKeyboardType))]
[assembly: TypeForwardedTo(typeof(APIUpdaterRuntimeServices))]
[assembly: TypeForwardedTo(typeof(TypeInferenceRules))]
[assembly: TypeForwardedTo(typeof(TypeInferenceRuleAttribute))]
[assembly: TypeForwardedTo(typeof(GenericStack))]
[assembly: TypeForwardedTo(typeof(PersistentListenerMode))]
[assembly: TypeForwardedTo(typeof(ArgumentCache))]
[assembly: TypeForwardedTo(typeof(BaseInvokableCall))]
[assembly: TypeForwardedTo(typeof(InvokableCall))]
[assembly: TypeForwardedTo(typeof(InvokableCall<>))]
[assembly: TypeForwardedTo(typeof(InvokableCall<, >))]
[assembly: TypeForwardedTo(typeof(InvokableCall<, , >))]
[assembly: TypeForwardedTo(typeof(InvokableCall<, , , >))]
[assembly: TypeForwardedTo(typeof(CachedInvokableCall<>))]
[assembly: TypeForwardedTo(typeof(UnityEventCallState))]
[assembly: TypeForwardedTo(typeof(PersistentCall))]
[assembly: TypeForwardedTo(typeof(PersistentCallGroup))]
[assembly: TypeForwardedTo(typeof(InvokableCallList))]
[assembly: TypeForwardedTo(typeof(UnityEventBase))]
[assembly: TypeForwardedTo(typeof(UnityEventQueueSystem))]
[assembly: TypeForwardedTo(typeof(UnityAction))]
[assembly: TypeForwardedTo(typeof(UnityEvent))]
[assembly: TypeForwardedTo(typeof(UnityAction<>))]
[assembly: TypeForwardedTo(typeof(UnityEvent<>))]
[assembly: TypeForwardedTo(typeof(UnityAction<, >))]
[assembly: TypeForwardedTo(typeof(UnityEvent<, >))]
[assembly: TypeForwardedTo(typeof(UnityAction<, , >))]
[assembly: TypeForwardedTo(typeof(UnityEvent<, , >))]
[assembly: TypeForwardedTo(typeof(UnityAction<, , , >))]
[assembly: TypeForwardedTo(typeof(UnityEvent<, , , >))]
[assembly: TypeForwardedTo(typeof(UnsafeUtility))]
[assembly: TypeForwardedTo(typeof(PhotoCaptureFileOutputFormat))]
[assembly: TypeForwardedTo(typeof(PhotoCapture))]
[assembly: TypeForwardedTo(typeof(PhotoCaptureFrame))]
[assembly: TypeForwardedTo(typeof(PhraseRecognitionSystem))]
[assembly: TypeForwardedTo(typeof(PhraseRecognizer))]
[assembly: TypeForwardedTo(typeof(DictationRecognizer))]
[assembly: TypeForwardedTo(typeof(ConfidenceLevel))]
[assembly: TypeForwardedTo(typeof(SpeechSystemStatus))]
[assembly: TypeForwardedTo(typeof(SpeechError))]
[assembly: TypeForwardedTo(typeof(DictationTopicConstraint))]
[assembly: TypeForwardedTo(typeof(DictationCompletionCause))]
[assembly: TypeForwardedTo(typeof(SemanticMeaning))]
[assembly: TypeForwardedTo(typeof(PhraseRecognizedEventArgs))]
[assembly: TypeForwardedTo(typeof(KeywordRecognizer))]
[assembly: TypeForwardedTo(typeof(GrammarRecognizer))]
[assembly: TypeForwardedTo(typeof(VideoCapture))]
[assembly: TypeForwardedTo(typeof(CapturePixelFormat))]
[assembly: TypeForwardedTo(typeof(WebCamMode))]
[assembly: TypeForwardedTo(typeof(WebCam))]
[assembly: TypeForwardedTo(typeof(CameraParameters))]
[assembly: TypeForwardedTo(typeof(CrashReporting))]
[assembly: TypeForwardedTo(typeof(Pose))]
[assembly: TypeForwardedTo(typeof(BatchQueryJob<, >))]
[assembly: TypeForwardedTo(typeof(BatchQueryJobStruct<>))]
[assembly: TypeForwardedTo(typeof(IJob))]
[assembly: TypeForwardedTo(typeof(IJobExtensions))]
[assembly: TypeForwardedTo(typeof(IJobParallelFor))]
[assembly: TypeForwardedTo(typeof(IJobParallelForExtensions))]
[assembly: TypeForwardedTo(typeof(IJobParallelForTransform))]
[assembly: TypeForwardedTo(typeof(IJobParallelForTransformExtensions))]
[assembly: TypeForwardedTo(typeof(JobHandle))]
[assembly: TypeForwardedTo(typeof(JobHandleUnsafeUtility))]
[assembly: TypeForwardedTo(typeof(JobProducerTypeAttribute))]
[assembly: TypeForwardedTo(typeof(JobRanges))]
[assembly: TypeForwardedTo(typeof(ScheduleMode))]
[assembly: TypeForwardedTo(typeof(JobType))]
[assembly: TypeForwardedTo(typeof(JobsUtility))]
[assembly: TypeForwardedTo(typeof(CaptureFlags))]
[assembly: TypeForwardedTo(typeof(MetaData))]
[assembly: TypeForwardedTo(typeof(MemoryProfiler))]
[assembly: TypeForwardedTo(typeof(ProfilerArea))]
[assembly: TypeForwardedTo(typeof(Profiler))]
[assembly: TypeForwardedTo(typeof(MarkerFlags))]
[assembly: TypeForwardedTo(typeof(ProfilerMarker))]
[assembly: TypeForwardedTo(typeof(Recorder))]
[assembly: TypeForwardedTo(typeof(Sampler))]
[assembly: TypeForwardedTo(typeof(CustomSampler))]
[assembly: TypeForwardedTo(typeof(DrivenTransformProperties))]
[assembly: TypeForwardedTo(typeof(DrivenRectTransformTracker))]
[assembly: TypeForwardedTo(typeof(RectTransform))]
[assembly: TypeForwardedTo(typeof(RotationOrder))]
[assembly: TypeForwardedTo(typeof(Transform))]
[assembly: TypeForwardedTo(typeof(TransformAccess))]
[assembly: TypeForwardedTo(typeof(TransformAccessArray))]
[assembly: TypeForwardedTo(typeof(PixelPerfectRendering))]
[assembly: TypeForwardedTo(typeof(SpriteBone))]
[assembly: TypeForwardedTo(typeof(SpriteChannelInfo))]
[assembly: TypeForwardedTo(typeof(SpriteDataAccessExtensions))]
[assembly: TypeForwardedTo(typeof(SpriteRendererDataAccessExtensions))]
[assembly: TypeForwardedTo(typeof(DataUtility))]
[assembly: TypeForwardedTo(typeof(SpriteDrawMode))]
[assembly: TypeForwardedTo(typeof(SpriteTileMode))]
[assembly: TypeForwardedTo(typeof(SpriteMaskInteraction))]
[assembly: TypeForwardedTo(typeof(SpriteRenderer))]
[assembly: TypeForwardedTo(typeof(SpriteMeshType))]
[assembly: TypeForwardedTo(typeof(SpriteAlignment))]
[assembly: TypeForwardedTo(typeof(SpritePackingMode))]
[assembly: TypeForwardedTo(typeof(SpritePackingRotation))]
[assembly: TypeForwardedTo(typeof(SpriteSortPoint))]
[assembly: TypeForwardedTo(typeof(SecondarySpriteTexture))]
[assembly: TypeForwardedTo(typeof(Sprite))]
[assembly: TypeForwardedTo(typeof(SortingGroup))]
[assembly: TypeForwardedTo(typeof(SpriteAtlasManager))]
[assembly: TypeForwardedTo(typeof(SpriteAtlas))]
[assembly: TypeForwardedTo(typeof(APIUpdaterRuntimeHelpers))]
[assembly: TypeForwardedTo(typeof(VisionUtility))]
[assembly: TypeForwardedTo(typeof(PolygonId))]
[assembly: TypeForwardedTo(typeof(NavMeshLocation))]
[assembly: TypeForwardedTo(typeof(PathQueryStatus))]
[assembly: TypeForwardedTo(typeof(NavMeshPolyTypes))]
[assembly: TypeForwardedTo(typeof(NavMeshWorld))]
[assembly: TypeForwardedTo(typeof(NavMeshQuery))]
[assembly: TypeForwardedTo(typeof(NavMeshPathStatus))]
[assembly: TypeForwardedTo(typeof(NavMeshPath))]
[assembly: TypeForwardedTo(typeof(NavMeshBuilder))]
[assembly: TypeForwardedTo(typeof(ObstacleAvoidanceType))]
[assembly: TypeForwardedTo(typeof(NavMeshAgent))]
[assembly: TypeForwardedTo(typeof(NavMeshObstacleShape))]
[assembly: TypeForwardedTo(typeof(NavMeshObstacle))]
[assembly: TypeForwardedTo(typeof(OffMeshLinkType))]
[assembly: TypeForwardedTo(typeof(OffMeshLinkData))]
[assembly: TypeForwardedTo(typeof(OffMeshLink))]
[assembly: TypeForwardedTo(typeof(NavMeshHit))]
[assembly: TypeForwardedTo(typeof(NavMeshTriangulation))]
[assembly: TypeForwardedTo(typeof(NavMeshData))]
[assembly: TypeForwardedTo(typeof(NavMeshDataInstance))]
[assembly: TypeForwardedTo(typeof(NavMeshLinkData))]
[assembly: TypeForwardedTo(typeof(NavMeshLinkInstance))]
[assembly: TypeForwardedTo(typeof(NavMeshQueryFilter))]
[assembly: TypeForwardedTo(typeof(NavMesh))]
[assembly: TypeForwardedTo(typeof(NavMeshBuildDebugFlags))]
[assembly: TypeForwardedTo(typeof(NavMeshBuildSourceShape))]
[assembly: TypeForwardedTo(typeof(NavMeshCollectGeometry))]
[assembly: TypeForwardedTo(typeof(NavMeshBuildSource))]
[assembly: TypeForwardedTo(typeof(NavMeshBuildMarkup))]
[assembly: TypeForwardedTo(typeof(NavMeshBuildSettings))]
[assembly: TypeForwardedTo(typeof(NavMeshBuildDebugSettings))]
[assembly: TypeForwardedTo(typeof(AndroidJavaRunnable))]
[assembly: TypeForwardedTo(typeof(AndroidJavaException))]
[assembly: TypeForwardedTo(typeof(GlobalJavaObjectRef))]
[assembly: TypeForwardedTo(typeof(AndroidJavaRunnableProxy))]
[assembly: TypeForwardedTo(typeof(AndroidJavaProxy))]
[assembly: TypeForwardedTo(typeof(AndroidJavaObject))]
[assembly: TypeForwardedTo(typeof(AndroidJavaClass))]
[assembly: TypeForwardedTo(typeof(AndroidReflection))]
[assembly: TypeForwardedTo(typeof(_AndroidJNIHelper))]
[assembly: TypeForwardedTo(typeof(jvalue))]
[assembly: TypeForwardedTo(typeof(AndroidJNIHelper))]
[assembly: TypeForwardedTo(typeof(AndroidJNI))]
[assembly: TypeForwardedTo(typeof(AndroidJNISafe))]
[assembly: TypeForwardedTo(typeof(AnimationPlayableBinding))]
[assembly: TypeForwardedTo(typeof(AnimationPlayableUtilities))]
[assembly: TypeForwardedTo(typeof(IAnimationClipSource))]
[assembly: TypeForwardedTo(typeof(IAnimationJob))]
[assembly: TypeForwardedTo(typeof(IAnimationJobPlayable))]
[assembly: TypeForwardedTo(typeof(IAnimationWindowPreview))]
[assembly: TypeForwardedTo(typeof(NotKeyableAttribute))]
[assembly: TypeForwardedTo(typeof(JobMethodIndex))]
[assembly: TypeForwardedTo(typeof(ProcessAnimationJobStruct<>))]
[assembly: TypeForwardedTo(typeof(SharedBetweenAnimatorsAttribute))]
[assembly: TypeForwardedTo(typeof(StateMachineBehaviour))]
[assembly: TypeForwardedTo(typeof(AimConstraint))]
[assembly: TypeForwardedTo(typeof(AnimationClip))]
[assembly: TypeForwardedTo(typeof(AnimationClipPlayable))]
[assembly: TypeForwardedTo(typeof(AnimationHumanStream))]
[assembly: TypeForwardedTo(typeof(AnimationLayerMixerPlayable))]
[assembly: TypeForwardedTo(typeof(AnimationMixerPlayable))]
[assembly: TypeForwardedTo(typeof(AnimationMotionXToDeltaPlayable))]
[assembly: TypeForwardedTo(typeof(AnimationOffsetPlayable))]
[assembly: TypeForwardedTo(typeof(AnimationPlayableExtensions))]
[assembly: TypeForwardedTo(typeof(AnimationPlayableGraphExtensions))]
[assembly: TypeForwardedTo(typeof(AnimationPlayableOutput))]
[assembly: TypeForwardedTo(typeof(AnimationStreamSource))]
[assembly: TypeForwardedTo(typeof(AnimationPlayableOutputExtensions))]
[assembly: TypeForwardedTo(typeof(AnimationPosePlayable))]
[assembly: TypeForwardedTo(typeof(AnimationRemoveScalePlayable))]
[assembly: TypeForwardedTo(typeof(AnimationScriptPlayable))]
[assembly: TypeForwardedTo(typeof(AnimatorBindingsVersion))]
[assembly: TypeForwardedTo(typeof(AnimationStream))]
[assembly: TypeForwardedTo(typeof(BindType))]
[assembly: TypeForwardedTo(typeof(TransformStreamHandle))]
[assembly: TypeForwardedTo(typeof(PropertyStreamHandle))]
[assembly: TypeForwardedTo(typeof(TransformSceneHandle))]
[assembly: TypeForwardedTo(typeof(PropertySceneHandle))]
[assembly: TypeForwardedTo(typeof(AnimationSceneHandleUtility))]
[assembly: TypeForwardedTo(typeof(AnimationStreamHandleUtility))]
[assembly: TypeForwardedTo(typeof(AvatarTarget))]
[assembly: TypeForwardedTo(typeof(AvatarIKGoal))]
[assembly: TypeForwardedTo(typeof(AvatarIKHint))]
[assembly: TypeForwardedTo(typeof(AnimatorControllerParameterType))]
[assembly: TypeForwardedTo(typeof(TransitionType))]
[assembly: TypeForwardedTo(typeof(StateInfoIndex))]
[assembly: TypeForwardedTo(typeof(AnimatorRecorderMode))]
[assembly: TypeForwardedTo(typeof(DurationUnit))]
[assembly: TypeForwardedTo(typeof(AnimatorCullingMode))]
[assembly: TypeForwardedTo(typeof(AnimatorUpdateMode))]
[assembly: TypeForwardedTo(typeof(AnimatorClipInfo))]
[assembly: TypeForwardedTo(typeof(AnimatorStateInfo))]
[assembly: TypeForwardedTo(typeof(AnimatorTransitionInfo))]
[assembly: TypeForwardedTo(typeof(MatchTargetWeightMask))]
[assembly: TypeForwardedTo(typeof(Animator))]
[assembly: TypeForwardedTo(typeof(AnimatorControllerParameter))]
[assembly: TypeForwardedTo(typeof(AnimatorControllerPlayable))]
[assembly: TypeForwardedTo(typeof(CustomStreamPropertyType))]
[assembly: TypeForwardedTo(typeof(AnimatorJobExtensions))]
[assembly: TypeForwardedTo(typeof(AnimationClipPair))]
[assembly: TypeForwardedTo(typeof(AnimatorOverrideController))]
[assembly: TypeForwardedTo(typeof(AnimatorUtility))]
[assembly: TypeForwardedTo(typeof(BodyDof))]
[assembly: TypeForwardedTo(typeof(HeadDof))]
[assembly: TypeForwardedTo(typeof(LegDof))]
[assembly: TypeForwardedTo(typeof(ArmDof))]
[assembly: TypeForwardedTo(typeof(FingerDof))]
[assembly: TypeForwardedTo(typeof(HumanPartDof))]
[assembly: TypeForwardedTo(typeof(Dof))]
[assembly: TypeForwardedTo(typeof(HumanBodyBones))]
[assembly: TypeForwardedTo(typeof(HumanParameter))]
[assembly: TypeForwardedTo(typeof(Avatar))]
[assembly: TypeForwardedTo(typeof(SkeletonBone))]
[assembly: TypeForwardedTo(typeof(HumanLimit))]
[assembly: TypeForwardedTo(typeof(HumanBone))]
[assembly: TypeForwardedTo(typeof(HumanDescription))]
[assembly: TypeForwardedTo(typeof(AvatarBuilder))]
[assembly: TypeForwardedTo(typeof(AvatarMaskBodyPart))]
[assembly: TypeForwardedTo(typeof(AvatarMask))]
[assembly: TypeForwardedTo(typeof(Axis))]
[assembly: TypeForwardedTo(typeof(ConstraintSource))]
[assembly: TypeForwardedTo(typeof(IConstraint))]
[assembly: TypeForwardedTo(typeof(IConstraintInternal))]
[assembly: TypeForwardedTo(typeof(PositionConstraint))]
[assembly: TypeForwardedTo(typeof(RotationConstraint))]
[assembly: TypeForwardedTo(typeof(ScaleConstraint))]
[assembly: TypeForwardedTo(typeof(HumanPose))]
[assembly: TypeForwardedTo(typeof(HumanPoseHandler))]
[assembly: TypeForwardedTo(typeof(HumanTrait))]
[assembly: TypeForwardedTo(typeof(LookAtConstraint))]
[assembly: TypeForwardedTo(typeof(Motion))]
[assembly: TypeForwardedTo(typeof(MuscleHandle))]
[assembly: TypeForwardedTo(typeof(ParentConstraint))]
[assembly: TypeForwardedTo(typeof(RuntimeAnimatorController))]
[assembly: TypeForwardedTo(typeof(AnimationEventSource))]
[assembly: TypeForwardedTo(typeof(AnimationEvent))]
[assembly: TypeForwardedTo(typeof(PlayMode))]
[assembly: TypeForwardedTo(typeof(QueueMode))]
[assembly: TypeForwardedTo(typeof(AnimationBlendMode))]
[assembly: TypeForwardedTo(typeof(AnimationPlayMode))]
[assembly: TypeForwardedTo(typeof(AnimationCullingType))]
[assembly: TypeForwardedTo(typeof(Animation))]
[assembly: TypeForwardedTo(typeof(AnimationState))]
[assembly: TypeForwardedTo(typeof(IHandle<>))]
[assembly: TypeForwardedTo(typeof(IValidatable))]
[assembly: TypeForwardedTo(typeof(AudioSpeakerMode))]
[assembly: TypeForwardedTo(typeof(AudioDataLoadState))]
[assembly: TypeForwardedTo(typeof(AudioConfiguration))]
[assembly: TypeForwardedTo(typeof(AudioCompressionFormat))]
[assembly: TypeForwardedTo(typeof(AudioClipLoadType))]
[assembly: TypeForwardedTo(typeof(AudioVelocityUpdateMode))]
[assembly: TypeForwardedTo(typeof(FFTWindow))]
[assembly: TypeForwardedTo(typeof(AudioRolloffMode))]
[assembly: TypeForwardedTo(typeof(AudioSourceCurveType))]
[assembly: TypeForwardedTo(typeof(AudioReverbPreset))]
[assembly: TypeForwardedTo(typeof(AudioSettings))]
[assembly: TypeForwardedTo(typeof(AudioClip))]
[assembly: TypeForwardedTo(typeof(AudioBehaviour))]
[assembly: TypeForwardedTo(typeof(AudioListener))]
[assembly: TypeForwardedTo(typeof(AudioSource))]
[assembly: TypeForwardedTo(typeof(AudioReverbZone))]
[assembly: TypeForwardedTo(typeof(AudioLowPassFilter))]
[assembly: TypeForwardedTo(typeof(AudioHighPassFilter))]
[assembly: TypeForwardedTo(typeof(AudioDistortionFilter))]
[assembly: TypeForwardedTo(typeof(AudioEchoFilter))]
[assembly: TypeForwardedTo(typeof(AudioChorusFilter))]
[assembly: TypeForwardedTo(typeof(AudioReverbFilter))]
[assembly: TypeForwardedTo(typeof(Microphone))]
[assembly: TypeForwardedTo(typeof(AudioClipExtensionsInternal))]
[assembly: TypeForwardedTo(typeof(AudioClipPlayable))]
[assembly: TypeForwardedTo(typeof(AudioMixerPlayable))]
[assembly: TypeForwardedTo(typeof(AudioPlayableBinding))]
[assembly: TypeForwardedTo(typeof(AudioPlayableGraphExtensions))]
[assembly: TypeForwardedTo(typeof(AudioPlayableOutput))]
[assembly: TypeForwardedTo(typeof(AudioRenderer))]
[assembly: TypeForwardedTo(typeof(AudioSampleProvider))]
[assembly: TypeForwardedTo(typeof(AudioSourceExtensionsInternal))]
[assembly: TypeForwardedTo(typeof(WebCamFlags))]
[assembly: TypeForwardedTo(typeof(WebCamKind))]
[assembly: TypeForwardedTo(typeof(WebCamDevice))]
[assembly: TypeForwardedTo(typeof(WebCamTexture))]
[assembly: TypeForwardedTo(typeof(AudioMixerUpdateMode))]
[assembly: TypeForwardedTo(typeof(AudioMixer))]
[assembly: TypeForwardedTo(typeof(AudioMixerGroup))]
[assembly: TypeForwardedTo(typeof(AudioMixerSnapshot))]
[assembly: TypeForwardedTo(typeof(MovieTexture))]
[assembly: TypeForwardedTo(typeof(ClusterInputType))]
[assembly: TypeForwardedTo(typeof(ClusterInput))]
[assembly: TypeForwardedTo(typeof(PlayableDirector))]
[assembly: TypeForwardedTo(typeof(Handle))]
[assembly: TypeForwardedTo(typeof(AudioMemoryManager))]
[assembly: TypeForwardedTo(typeof(AudioOutputHookManager))]
[assembly: TypeForwardedTo(typeof(DSPCommandBlockInternal))]
[assembly: TypeForwardedTo(typeof(DSPGraphExecutionNode))]
[assembly: TypeForwardedTo(typeof(DSPGraphInternal))]
[assembly: TypeForwardedTo(typeof(DSPNodeUpdateRequestHandleInternal))]
[assembly: TypeForwardedTo(typeof(DSPSampleProviderInternal))]
[assembly: TypeForwardedTo(typeof(ExecuteContextInternal))]
[assembly: TypeForwardedTo(typeof(Grid))]
[assembly: TypeForwardedTo(typeof(GridLayout))]
[assembly: TypeForwardedTo(typeof(ImageConversion))]
[assembly: TypeForwardedTo(typeof(TouchPhase))]
[assembly: TypeForwardedTo(typeof(IMECompositionMode))]
[assembly: TypeForwardedTo(typeof(TouchType))]
[assembly: TypeForwardedTo(typeof(Touch))]
[assembly: TypeForwardedTo(typeof(DeviceOrientation))]
[assembly: TypeForwardedTo(typeof(AccelerationEvent))]
[assembly: TypeForwardedTo(typeof(Gyroscope))]
[assembly: TypeForwardedTo(typeof(LocationInfo))]
[assembly: TypeForwardedTo(typeof(LocationServiceStatus))]
[assembly: TypeForwardedTo(typeof(LocationService))]
[assembly: TypeForwardedTo(typeof(Compass))]
[assembly: TypeForwardedTo(typeof(CameraRaycastHelper))]
[assembly: TypeForwardedTo(typeof(Input))]
[assembly: TypeForwardedTo(typeof(SendMouseEvents))]
[assembly: TypeForwardedTo(typeof(JsonUtility))]
[assembly: TypeForwardedTo(typeof(LocalizationAsset))]
[assembly: TypeForwardedTo(typeof(IParticleSystemJob))]
[assembly: TypeForwardedTo(typeof(ParticleSystemEmissionType))]
[assembly: TypeForwardedTo(typeof(ParticleSystem))]
[assembly: TypeForwardedTo(typeof(ParticlePhysicsExtensions))]
[assembly: TypeForwardedTo(typeof(ParticleSystemRenderMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemSortMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemCollisionQuality))]
[assembly: TypeForwardedTo(typeof(ParticleSystemRenderSpace))]
[assembly: TypeForwardedTo(typeof(ParticleSystemCurveMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemGradientMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemShapeType))]
[assembly: TypeForwardedTo(typeof(ParticleSystemMeshShapeType))]
[assembly: TypeForwardedTo(typeof(ParticleSystemShapeTextureChannel))]
[assembly: TypeForwardedTo(typeof(ParticleSystemAnimationMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemAnimationTimeMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemAnimationType))]
[assembly: TypeForwardedTo(typeof(ParticleSystemAnimationRowMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemCollisionType))]
[assembly: TypeForwardedTo(typeof(ParticleSystemCollisionMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemOverlapAction))]
[assembly: TypeForwardedTo(typeof(ParticleSystemSimulationSpace))]
[assembly: TypeForwardedTo(typeof(ParticleSystemStopBehavior))]
[assembly: TypeForwardedTo(typeof(ParticleSystemScalingMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemStopAction))]
[assembly: TypeForwardedTo(typeof(ParticleSystemCullingMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemEmitterVelocityMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemInheritVelocityMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemTriggerEventType))]
[assembly: TypeForwardedTo(typeof(ParticleSystemVertexStream))]
[assembly: TypeForwardedTo(typeof(ParticleSystemCustomData))]
[assembly: TypeForwardedTo(typeof(ParticleSystemCustomDataMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemNoiseQuality))]
[assembly: TypeForwardedTo(typeof(ParticleSystemSubEmitterType))]
[assembly: TypeForwardedTo(typeof(ParticleSystemSubEmitterProperties))]
[assembly: TypeForwardedTo(typeof(ParticleSystemTrailMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemTrailTextureMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemShapeMultiModeValue))]
[assembly: TypeForwardedTo(typeof(ParticleSystemRingBufferMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemGameObjectFilter))]
[assembly: TypeForwardedTo(typeof(ParticleSystemForceFieldShape))]
[assembly: TypeForwardedTo(typeof(UVChannelFlags))]
[assembly: TypeForwardedTo(typeof(ParticleSystemNativeArray3))]
[assembly: TypeForwardedTo(typeof(ParticleSystemNativeArray4))]
[assembly: TypeForwardedTo(typeof(ParticleSystemJobData))]
[assembly: TypeForwardedTo(typeof(JobDataInternal))]
[assembly: TypeForwardedTo(typeof(ProcessParticleSystemJobStruct<>))]
[assembly: TypeForwardedTo(typeof(ParticleSystemVertexStreams))]
[assembly: TypeForwardedTo(typeof(ParticleSystemRenderer))]
[assembly: TypeForwardedTo(typeof(ParticleCollisionEvent))]
[assembly: TypeForwardedTo(typeof(ParticleSystemExtensionsImpl))]
[assembly: TypeForwardedTo(typeof(ParticleSystemForceField))]
[assembly: TypeForwardedTo(typeof(RigidbodyConstraints))]
[assembly: TypeForwardedTo(typeof(ForceMode))]
[assembly: TypeForwardedTo(typeof(JointDriveMode))]
[assembly: TypeForwardedTo(typeof(JointProjectionMode))]
[assembly: TypeForwardedTo(typeof(MeshColliderCookingOptions))]
[assembly: TypeForwardedTo(typeof(WheelFrictionCurve))]
[assembly: TypeForwardedTo(typeof(SoftJointLimit))]
[assembly: TypeForwardedTo(typeof(SoftJointLimitSpring))]
[assembly: TypeForwardedTo(typeof(JointDrive))]
[assembly: TypeForwardedTo(typeof(RigidbodyInterpolation))]
[assembly: TypeForwardedTo(typeof(JointMotor))]
[assembly: TypeForwardedTo(typeof(JointSpring))]
[assembly: TypeForwardedTo(typeof(JointLimits))]
[assembly: TypeForwardedTo(typeof(ControllerColliderHit))]
[assembly: TypeForwardedTo(typeof(PhysicMaterialCombine))]
[assembly: TypeForwardedTo(typeof(Collision))]
[assembly: TypeForwardedTo(typeof(CollisionFlags))]
[assembly: TypeForwardedTo(typeof(QueryTriggerInteraction))]
[assembly: TypeForwardedTo(typeof(CollisionDetectionMode))]
[assembly: TypeForwardedTo(typeof(ConfigurableJointMotion))]
[assembly: TypeForwardedTo(typeof(RotationDriveMode))]
[assembly: TypeForwardedTo(typeof(PhysicMaterial))]
[assembly: TypeForwardedTo(typeof(RaycastHit))]
[assembly: TypeForwardedTo(typeof(Rigidbody))]
[assembly: TypeForwardedTo(typeof(Collider))]
[assembly: TypeForwardedTo(typeof(CharacterController))]
[assembly: TypeForwardedTo(typeof(MeshCollider))]
[assembly: TypeForwardedTo(typeof(CapsuleCollider))]
[assembly: TypeForwardedTo(typeof(BoxCollider))]
[assembly: TypeForwardedTo(typeof(SphereCollider))]
[assembly: TypeForwardedTo(typeof(ConstantForce))]
[assembly: TypeForwardedTo(typeof(Joint))]
[assembly: TypeForwardedTo(typeof(HingeJoint))]
[assembly: TypeForwardedTo(typeof(SpringJoint))]
[assembly: TypeForwardedTo(typeof(FixedJoint))]
[assembly: TypeForwardedTo(typeof(CharacterJoint))]
[assembly: TypeForwardedTo(typeof(ConfigurableJoint))]
[assembly: TypeForwardedTo(typeof(ContactPoint))]
[assembly: TypeForwardedTo(typeof(PhysicsScene))]
[assembly: TypeForwardedTo(typeof(PhysicsSceneExtensions))]
[assembly: TypeForwardedTo(typeof(Physics))]
[assembly: TypeForwardedTo(typeof(RaycastCommand))]
[assembly: TypeForwardedTo(typeof(SpherecastCommand))]
[assembly: TypeForwardedTo(typeof(CapsulecastCommand))]
[assembly: TypeForwardedTo(typeof(BoxcastCommand))]
[assembly: TypeForwardedTo(typeof(PhysicsScene2D))]
[assembly: TypeForwardedTo(typeof(PhysicsSceneExtensions2D))]
[assembly: TypeForwardedTo(typeof(Physics2D))]
[assembly: TypeForwardedTo(typeof(CapsuleDirection2D))]
[assembly: TypeForwardedTo(typeof(RigidbodyConstraints2D))]
[assembly: TypeForwardedTo(typeof(RigidbodyInterpolation2D))]
[assembly: TypeForwardedTo(typeof(RigidbodySleepMode2D))]
[assembly: TypeForwardedTo(typeof(CollisionDetectionMode2D))]
[assembly: TypeForwardedTo(typeof(RigidbodyType2D))]
[assembly: TypeForwardedTo(typeof(ForceMode2D))]
[assembly: TypeForwardedTo(typeof(ColliderErrorState2D))]
[assembly: TypeForwardedTo(typeof(JointLimitState2D))]
[assembly: TypeForwardedTo(typeof(EffectorSelection2D))]
[assembly: TypeForwardedTo(typeof(EffectorForceMode2D))]
[assembly: TypeForwardedTo(typeof(ColliderDistance2D))]
[assembly: TypeForwardedTo(typeof(ContactFilter2D))]
[assembly: TypeForwardedTo(typeof(Collision2D))]
[assembly: TypeForwardedTo(typeof(ContactPoint2D))]
[assembly: TypeForwardedTo(typeof(JointAngleLimits2D))]
[assembly: TypeForwardedTo(typeof(JointTranslationLimits2D))]
[assembly: TypeForwardedTo(typeof(JointMotor2D))]
[assembly: TypeForwardedTo(typeof(JointSuspension2D))]
[assembly: TypeForwardedTo(typeof(RaycastHit2D))]
[assembly: TypeForwardedTo(typeof(PhysicsJobOptions2D))]
[assembly: TypeForwardedTo(typeof(Rigidbody2D))]
[assembly: TypeForwardedTo(typeof(Collider2D))]
[assembly: TypeForwardedTo(typeof(CircleCollider2D))]
[assembly: TypeForwardedTo(typeof(CapsuleCollider2D))]
[assembly: TypeForwardedTo(typeof(EdgeCollider2D))]
[assembly: TypeForwardedTo(typeof(BoxCollider2D))]
[assembly: TypeForwardedTo(typeof(PolygonCollider2D))]
[assembly: TypeForwardedTo(typeof(CompositeCollider2D))]
[assembly: TypeForwardedTo(typeof(Joint2D))]
[assembly: TypeForwardedTo(typeof(AnchoredJoint2D))]
[assembly: TypeForwardedTo(typeof(SpringJoint2D))]
[assembly: TypeForwardedTo(typeof(DistanceJoint2D))]
[assembly: TypeForwardedTo(typeof(FrictionJoint2D))]
[assembly: TypeForwardedTo(typeof(HingeJoint2D))]
[assembly: TypeForwardedTo(typeof(RelativeJoint2D))]
[assembly: TypeForwardedTo(typeof(SliderJoint2D))]
[assembly: TypeForwardedTo(typeof(TargetJoint2D))]
[assembly: TypeForwardedTo(typeof(FixedJoint2D))]
[assembly: TypeForwardedTo(typeof(WheelJoint2D))]
[assembly: TypeForwardedTo(typeof(Effector2D))]
[assembly: TypeForwardedTo(typeof(AreaEffector2D))]
[assembly: TypeForwardedTo(typeof(BuoyancyEffector2D))]
[assembly: TypeForwardedTo(typeof(PointEffector2D))]
[assembly: TypeForwardedTo(typeof(PlatformEffector2D))]
[assembly: TypeForwardedTo(typeof(SurfaceEffector2D))]
[assembly: TypeForwardedTo(typeof(PhysicsUpdateBehaviour2D))]
[assembly: TypeForwardedTo(typeof(ConstantForce2D))]
[assembly: TypeForwardedTo(typeof(PhysicsMaterial2D))]
[assembly: TypeForwardedTo(typeof(ScreenCapture))]
[assembly: TypeForwardedTo(typeof(SpriteMask))]
[assembly: TypeForwardedTo(typeof(SpriteShapeParameters))]
[assembly: TypeForwardedTo(typeof(SpriteShapeSegment))]
[assembly: TypeForwardedTo(typeof(SpriteShapeDataType))]
[assembly: TypeForwardedTo(typeof(SpriteShapeRenderer))]
[assembly: TypeForwardedTo(typeof(SpriteShapeMetaData))]
[assembly: TypeForwardedTo(typeof(ShapeControlPoint))]
[assembly: TypeForwardedTo(typeof(AngleRangeInfo))]
[assembly: TypeForwardedTo(typeof(SpriteShapeUtility))]
[assembly: TypeForwardedTo(typeof(StreamingController))]
[assembly: TypeForwardedTo(typeof(BrushTransform))]
[assembly: TypeForwardedTo(typeof(PaintContext))]
[assembly: TypeForwardedTo(typeof(TerrainChangedFlags))]
[assembly: TypeForwardedTo(typeof(TerrainRenderFlags))]
[assembly: TypeForwardedTo(typeof(Terrain))]
[assembly: TypeForwardedTo(typeof(TerrainExtensions))]
[assembly: TypeForwardedTo(typeof(Tree))]
[assembly: TypeForwardedTo(typeof(SpeedTreeWindAsset))]
[assembly: TypeForwardedTo(typeof(TerrainCallbacks))]
[assembly: TypeForwardedTo(typeof(TreePrototype))]
[assembly: TypeForwardedTo(typeof(DetailRenderMode))]
[assembly: TypeForwardedTo(typeof(DetailPrototype))]
[assembly: TypeForwardedTo(typeof(SplatPrototype))]
[assembly: TypeForwardedTo(typeof(TreeInstance))]
[assembly: TypeForwardedTo(typeof(PatchExtents))]
[assembly: TypeForwardedTo(typeof(TerrainHeightmapSyncControl))]
[assembly: TypeForwardedTo(typeof(TerrainData))]
[assembly: TypeForwardedTo(typeof(TerrainLayer))]
[assembly: TypeForwardedTo(typeof(TerrainPaintUtility))]
[assembly: TypeForwardedTo(typeof(TerrainUtility))]
[assembly: TypeForwardedTo(typeof(TerrainCollider))]
[assembly: TypeForwardedTo(typeof(FontStyle))]
[assembly: TypeForwardedTo(typeof(TextGenerationError))]
[assembly: TypeForwardedTo(typeof(TextGenerationSettings))]
[assembly: TypeForwardedTo(typeof(TextGenerator))]
[assembly: TypeForwardedTo(typeof(TextAlignment))]
[assembly: TypeForwardedTo(typeof(TextAnchor))]
[assembly: TypeForwardedTo(typeof(HorizontalWrapMode))]
[assembly: TypeForwardedTo(typeof(VerticalWrapMode))]
[assembly: TypeForwardedTo(typeof(GUIText))]
[assembly: TypeForwardedTo(typeof(TextMesh))]
[assembly: TypeForwardedTo(typeof(CharacterInfo))]
[assembly: TypeForwardedTo(typeof(UICharInfo))]
[assembly: TypeForwardedTo(typeof(UILineInfo))]
[assembly: TypeForwardedTo(typeof(UIVertex))]
[assembly: TypeForwardedTo(typeof(Font))]
[assembly: TypeForwardedTo(typeof(CustomGridBrushAttribute))]
[assembly: TypeForwardedTo(typeof(GridBrushBase))]
[assembly: TypeForwardedTo(typeof(ITilemap))]
[assembly: TypeForwardedTo(typeof(Tile))]
[assembly: TypeForwardedTo(typeof(TileBase))]
[assembly: TypeForwardedTo(typeof(Tilemap))]
[assembly: TypeForwardedTo(typeof(TileFlags))]
[assembly: TypeForwardedTo(typeof(TilemapRenderer))]
[assembly: TypeForwardedTo(typeof(TileData))]
[assembly: TypeForwardedTo(typeof(TileAnimationData))]
[assembly: TypeForwardedTo(typeof(TilemapCollider2D))]
[assembly: TypeForwardedTo(typeof(ICanvasRaycastFilter))]
[assembly: TypeForwardedTo(typeof(CanvasGroup))]
[assembly: TypeForwardedTo(typeof(CanvasRenderer))]
[assembly: TypeForwardedTo(typeof(RectTransformUtility))]
[assembly: TypeForwardedTo(typeof(RenderMode))]
[assembly: TypeForwardedTo(typeof(AdditionalCanvasShaderChannels))]
[assembly: TypeForwardedTo(typeof(Canvas))]
[assembly: TypeForwardedTo(typeof(UISystemProfilerApi))]
[assembly: TypeForwardedTo(typeof(UnityConnectSettings))]
[assembly: TypeForwardedTo(typeof(UnityAdsSettings))]
[assembly: TypeForwardedTo(typeof(IMultipartFormSection))]
[assembly: TypeForwardedTo(typeof(MultipartFormDataSection))]
[assembly: TypeForwardedTo(typeof(MultipartFormFileSection))]
[assembly: TypeForwardedTo(typeof(UnityWebRequestAsyncOperation))]
[assembly: TypeForwardedTo(typeof(UnityWebRequest))]
[assembly: TypeForwardedTo(typeof(WWWForm))]
[assembly: TypeForwardedTo(typeof(WWWTranscoder))]
[assembly: TypeForwardedTo(typeof(WebRequestUtils))]
[assembly: TypeForwardedTo(typeof(CertificateHandler))]
[assembly: TypeForwardedTo(typeof(DownloadHandler))]
[assembly: TypeForwardedTo(typeof(DownloadHandlerBuffer))]
[assembly: TypeForwardedTo(typeof(DownloadHandlerScript))]
[assembly: TypeForwardedTo(typeof(DownloadHandlerFile))]
[assembly: TypeForwardedTo(typeof(UploadHandler))]
[assembly: TypeForwardedTo(typeof(UploadHandlerRaw))]
[assembly: TypeForwardedTo(typeof(UploadHandlerFile))]
[assembly: TypeForwardedTo(typeof(UnityWebRequestMultimedia))]
[assembly: TypeForwardedTo(typeof(DownloadHandlerAudioClip))]
[assembly: TypeForwardedTo(typeof(DownloadHandlerMovieTexture))]
[assembly: TypeForwardedTo(typeof(UnityWebRequestTexture))]
[assembly: TypeForwardedTo(typeof(DownloadHandlerTexture))]
[assembly: TypeForwardedTo(typeof(WheelHit))]
[assembly: TypeForwardedTo(typeof(WheelCollider))]
[assembly: TypeForwardedTo(typeof(VFXCullingFlags))]
[assembly: TypeForwardedTo(typeof(VFXExpressionOperation))]
[assembly: TypeForwardedTo(typeof(VFXValueType))]
[assembly: TypeForwardedTo(typeof(VFXTaskType))]
[assembly: TypeForwardedTo(typeof(VFXSystemType))]
[assembly: TypeForwardedTo(typeof(VFXSystemFlag))]
[assembly: TypeForwardedTo(typeof(VFXUpdateMode))]
[assembly: TypeForwardedTo(typeof(VFXCameraBufferTypes))]
[assembly: TypeForwardedTo(typeof(VFXEventAttribute))]
[assembly: TypeForwardedTo(typeof(VFXExpressionMesh))]
[assembly: TypeForwardedTo(typeof(VFXExpressionNoise))]
[assembly: TypeForwardedTo(typeof(VFXExpressionValues))]
[assembly: TypeForwardedTo(typeof(VFXManager))]
[assembly: TypeForwardedTo(typeof(VFXSpawnerCallbacks))]
[assembly: TypeForwardedTo(typeof(VFXSpawnerState))]
[assembly: TypeForwardedTo(typeof(VisualEffectObject))]
[assembly: TypeForwardedTo(typeof(VisualEffectAsset))]
[assembly: TypeForwardedTo(typeof(VisualEffect))]
[assembly: TypeForwardedTo(typeof(VFXRenderer))]
[assembly: TypeForwardedTo(typeof(VideoError))]
[assembly: TypeForwardedTo(typeof(VideoPixelFormat))]
[assembly: TypeForwardedTo(typeof(VideoPlayback))]
[assembly: TypeForwardedTo(typeof(VideoClip))]
[assembly: TypeForwardedTo(typeof(VideoClipPlayable))]
[assembly: TypeForwardedTo(typeof(VideoPlaybackMgr))]
[assembly: TypeForwardedTo(typeof(VideoRenderMode))]
[assembly: TypeForwardedTo(typeof(Video3DLayout))]
[assembly: TypeForwardedTo(typeof(VideoAspectRatio))]
[assembly: TypeForwardedTo(typeof(VideoTimeSource))]
[assembly: TypeForwardedTo(typeof(VideoTimeReference))]
[assembly: TypeForwardedTo(typeof(VideoSource))]
[assembly: TypeForwardedTo(typeof(VideoAudioOutputMode))]
[assembly: TypeForwardedTo(typeof(VideoPlayer))]
[assembly: TypeForwardedTo(typeof(VideoPlayerExtensions))]
[assembly: TypeForwardedTo(typeof(WindZoneMode))]
[assembly: TypeForwardedTo(typeof(WindZone))]
[assembly: TypeForwardedTo(typeof(AssetBundleLoadResult))]
[assembly: TypeForwardedTo(typeof(AssetBundle))]
[assembly: TypeForwardedTo(typeof(AssetBundleCreateRequest))]
[assembly: TypeForwardedTo(typeof(AssetBundleManifest))]
[assembly: TypeForwardedTo(typeof(AssetBundleRecompressOperation))]
[assembly: TypeForwardedTo(typeof(AssetBundleRequest))]
[assembly: TypeForwardedTo(typeof(AssetBundleUtility))]
[assembly: TypeForwardedTo(typeof(CompressionType))]
[assembly: TypeForwardedTo(typeof(CompressionLevel))]
[assembly: TypeForwardedTo(typeof(BuildCompression))]
[assembly: TypeForwardedTo(typeof(ClothSphereColliderPair))]
[assembly: TypeForwardedTo(typeof(ClothSkinningCoefficient))]
[assembly: TypeForwardedTo(typeof(Cloth))]
[assembly: TypeForwardedTo(typeof(LocalUser))]
[assembly: TypeForwardedTo(typeof(UserProfile))]
[assembly: TypeForwardedTo(typeof(Achievement))]
[assembly: TypeForwardedTo(typeof(AchievementDescription))]
[assembly: TypeForwardedTo(typeof(Score))]
[assembly: TypeForwardedTo(typeof(Leaderboard))]
[assembly: TypeForwardedTo(typeof(Local))]
[assembly: TypeForwardedTo(typeof(Social))]
[assembly: TypeForwardedTo(typeof(ActivePlatform))]
[assembly: TypeForwardedTo(typeof(ISocialPlatform))]
[assembly: TypeForwardedTo(typeof(ILocalUser))]
[assembly: TypeForwardedTo(typeof(UserState))]
[assembly: TypeForwardedTo(typeof(IUserProfile))]
[assembly: TypeForwardedTo(typeof(IAchievement))]
[assembly: TypeForwardedTo(typeof(IAchievementDescription))]
[assembly: TypeForwardedTo(typeof(IScore))]
[assembly: TypeForwardedTo(typeof(UserScope))]
[assembly: TypeForwardedTo(typeof(TimeScope))]
[assembly: TypeForwardedTo(typeof(Range))]
[assembly: TypeForwardedTo(typeof(ILeaderboard))]
[assembly: TypeForwardedTo(typeof(Event))]
[assembly: TypeForwardedTo(typeof(EventCommandNames))]
[assembly: TypeForwardedTo(typeof(EventType))]
[assembly: TypeForwardedTo(typeof(EventModifiers))]
[assembly: TypeForwardedTo(typeof(EventInterests))]
[assembly: TypeForwardedTo(typeof(GUI))]
[assembly: TypeForwardedTo(typeof(GUIClip))]
[assembly: TypeForwardedTo(typeof(GUIContent))]
[assembly: TypeForwardedTo(typeof(GUIDebugger))]
[assembly: TypeForwardedTo(typeof(ScaleMode))]
[assembly: TypeForwardedTo(typeof(FocusType))]
[assembly: TypeForwardedTo(typeof(GUILayout))]
[assembly: TypeForwardedTo(typeof(GUILayoutOption))]
[assembly: TypeForwardedTo(typeof(GUILayoutUtility))]
[assembly: TypeForwardedTo(typeof(GUISettings))]
[assembly: TypeForwardedTo(typeof(PlatformSelection))]
[assembly: TypeForwardedTo(typeof(GUISkin))]
[assembly: TypeForwardedTo(typeof(GUIStateObjects))]
[assembly: TypeForwardedTo(typeof(GUIStyleState))]
[assembly: TypeForwardedTo(typeof(GUIStyle))]
[assembly: TypeForwardedTo(typeof(ImagePosition))]
[assembly: TypeForwardedTo(typeof(TextClipping))]
[assembly: TypeForwardedTo(typeof(GUITargetAttribute))]
[assembly: TypeForwardedTo(typeof(GUIUtility))]
[assembly: TypeForwardedTo(typeof(ExitGUIException))]
[assembly: TypeForwardedTo(typeof(GUILayoutEntry))]
[assembly: TypeForwardedTo(typeof(GUIAspectSizer))]
[assembly: TypeForwardedTo(typeof(GUIGridSizer))]
[assembly: TypeForwardedTo(typeof(GUIWordWrapSizer))]
[assembly: TypeForwardedTo(typeof(GUILayoutGroup))]
[assembly: TypeForwardedTo(typeof(GUIScrollGroup))]
[assembly: TypeForwardedTo(typeof(ObjectGUIState))]
[assembly: TypeForwardedTo(typeof(ScrollViewState))]
[assembly: TypeForwardedTo(typeof(SliderState))]
[assembly: TypeForwardedTo(typeof(SliderHandler))]
[assembly: TypeForwardedTo(typeof(TextEditor))]
[assembly: TypeForwardedTo(typeof(NativeUpdateCallback))]
[assembly: TypeForwardedTo(typeof(NativeInputEventType))]
[assembly: TypeForwardedTo(typeof(NativeInputEventBuffer))]
[assembly: TypeForwardedTo(typeof(NativeInputEvent))]
[assembly: TypeForwardedTo(typeof(NativeInputUpdateType))]
[assembly: TypeForwardedTo(typeof(NativeInputSystem))]
[assembly: TypeForwardedTo(typeof(Character))]
[assembly: TypeForwardedTo(typeof(ColorUtilities))]
[assembly: TypeForwardedTo(typeof(FaceInfo))]
[assembly: TypeForwardedTo(typeof(FontWeights))]
[assembly: TypeForwardedTo(typeof(FontAssetCreationSettings))]
[assembly: TypeForwardedTo(typeof(FontAsset))]
[assembly: TypeForwardedTo(typeof(FontUtilities))]
[assembly: TypeForwardedTo(typeof(GlyphRect))]
[assembly: TypeForwardedTo(typeof(GlyphMetrics))]
[assembly: TypeForwardedTo(typeof(Glyph))]
[assembly: TypeForwardedTo(typeof(KerningPairKey))]
[assembly: TypeForwardedTo(typeof(KerningPair))]
[assembly: TypeForwardedTo(typeof(KerningTable))]
[assembly: TypeForwardedTo(typeof(Extents))]
[assembly: TypeForwardedTo(typeof(LineInfo))]
[assembly: TypeForwardedTo(typeof(LinkInfo))]
[assembly: TypeForwardedTo(typeof(MaterialManager))]
[assembly: TypeForwardedTo(typeof(MaterialReference))]
[assembly: TypeForwardedTo(typeof(MaterialReferenceManager))]
[assembly: TypeForwardedTo(typeof(VertexSortingOrder))]
[assembly: TypeForwardedTo(typeof(MeshInfo))]
[assembly: TypeForwardedTo(typeof(OTFLayoutTableType))]
[assembly: TypeForwardedTo(typeof(OTFLookupTableType))]
[assembly: TypeForwardedTo(typeof(GlyphValueRecord))]
[assembly: TypeForwardedTo(typeof(GlyphAdjustmentRecord))]
[assembly: TypeForwardedTo(typeof(GlyphPairAdjustmentRecord))]
[assembly: TypeForwardedTo(typeof(TagHashCode))]
[assembly: TypeForwardedTo(typeof(TagValueType))]
[assembly: TypeForwardedTo(typeof(TagUnitType))]
[assembly: TypeForwardedTo(typeof(Unicode))]
[assembly: TypeForwardedTo(typeof(ShaderUtilities))]
[assembly: TypeForwardedTo(typeof(SpriteCharacter))]
[assembly: TypeForwardedTo(typeof(SpriteGlyph))]
[assembly: TypeForwardedTo(typeof(TextElementType))]
[assembly: TypeForwardedTo(typeof(TextElement))]
[assembly: TypeForwardedTo(typeof(TextVertex))]
[assembly: TypeForwardedTo(typeof(TextElementInfo))]
[assembly: TypeForwardedTo(typeof(TextOverflowMode))]
[assembly: TypeForwardedTo(typeof(TextureMapping))]
[assembly: TypeForwardedTo(typeof(TextGenerationSettings))]
[assembly: TypeForwardedTo(typeof(TextGenerator))]
[assembly: TypeForwardedTo(typeof(HorizontalAlignment))]
[assembly: TypeForwardedTo(typeof(VerticalAlignment))]
[assembly: TypeForwardedTo(typeof(TextAlignment))]
[assembly: TypeForwardedTo(typeof(FontStyles))]
[assembly: TypeForwardedTo(typeof(FontWeight))]
[assembly: TypeForwardedTo(typeof(MeshExtents))]
[assembly: TypeForwardedTo(typeof(XmlTagAttribute))]
[assembly: TypeForwardedTo(typeof(RichTextTagAttribute))]
[assembly: TypeForwardedTo(typeof(WordWrapState))]
[assembly: TypeForwardedTo(typeof(TextGeneratorUtilities))]
[assembly: TypeForwardedTo(typeof(ColorMode))]
[assembly: TypeForwardedTo(typeof(TextGradientPreset))]
[assembly: TypeForwardedTo(typeof(PageInfo))]
[assembly: TypeForwardedTo(typeof(WordInfo))]
[assembly: TypeForwardedTo(typeof(TextInfo))]
[assembly: TypeForwardedTo(typeof(TextSettings))]
[assembly: TypeForwardedTo(typeof(TextSpriteAsset))]
[assembly: TypeForwardedTo(typeof(TextStyle))]
[assembly: TypeForwardedTo(typeof(TextStyleSheet))]
[assembly: TypeForwardedTo(typeof(FontStyleStack))]
[assembly: TypeForwardedTo(typeof(RichTextTagStack<>))]
[assembly: TypeForwardedTo(typeof(TextUtilities))]
[assembly: TypeForwardedTo(typeof(GlyphLoadFlags))]
[assembly: TypeForwardedTo(typeof(GlyphRasterModes))]
[assembly: TypeForwardedTo(typeof(FontEngineError))]
[assembly: TypeForwardedTo(typeof(GlyphRenderMode))]
[assembly: TypeForwardedTo(typeof(GlyphPackingMode))]
[assembly: TypeForwardedTo(typeof(FontEngine))]
[assembly: TypeForwardedTo(typeof(FontEngineUtilities))]
[assembly: TypeForwardedTo(typeof(GlyphMarshallingStruct))]
[assembly: TypeForwardedTo(typeof(BaseField<>))]
[assembly: TypeForwardedTo(typeof(BaseFieldTraits<, >))]
[assembly: TypeForwardedTo(typeof(SliderDirection))]
[assembly: TypeForwardedTo(typeof(BaseSlider<>))]
[assembly: TypeForwardedTo(typeof(BindableElement))]
[assembly: TypeForwardedTo(typeof(Box))]
[assembly: TypeForwardedTo(typeof(Button))]
[assembly: TypeForwardedTo(typeof(ClampedDragger<>))]
[assembly: TypeForwardedTo(typeof(Clickable))]
[assembly: TypeForwardedTo(typeof(ContextualMenuManager))]
[assembly: TypeForwardedTo(typeof(ContextualMenuManipulator))]
[assembly: TypeForwardedTo(typeof(Cursor))]
[assembly: TypeForwardedTo(typeof(ICursorManager))]
[assembly: TypeForwardedTo(typeof(CursorManager))]
[assembly: TypeForwardedTo(typeof(DisposeHelper))]
[assembly: TypeForwardedTo(typeof(DropdownMenuEventInfo))]
[assembly: TypeForwardedTo(typeof(DropdownMenuItem))]
[assembly: TypeForwardedTo(typeof(DropdownMenuSeparator))]
[assembly: TypeForwardedTo(typeof(DropdownMenuAction))]
[assembly: TypeForwardedTo(typeof(DropdownMenu))]
[assembly: TypeForwardedTo(typeof(DispatchMode))]
[assembly: TypeForwardedTo(typeof(EventDispatcherGate))]
[assembly: TypeForwardedTo(typeof(EventDispatcher))]
[assembly: TypeForwardedTo(typeof(Focusable))]
[assembly: TypeForwardedTo(typeof(FocusChangeDirection))]
[assembly: TypeForwardedTo(typeof(IFocusRing))]
[assembly: TypeForwardedTo(typeof(FocusController))]
[assembly: TypeForwardedTo(typeof(Foldout))]
[assembly: TypeForwardedTo(typeof(HierarchyTraversal))]
[assembly: TypeForwardedTo(typeof(IDataWatchHandle))]
[assembly: TypeForwardedTo(typeof(IDataWatchService))]
[assembly: TypeForwardedTo(typeof(Image))]
[assembly: TypeForwardedTo(typeof(IMGUIContainer))]
[assembly: TypeForwardedTo(typeof(ImmediateModeElement))]
[assembly: TypeForwardedTo(typeof(ImmediateStylePainter))]
[assembly: TypeForwardedTo(typeof(ImmediateStylePainterImpl))]
[assembly: TypeForwardedTo(typeof(SelectionType))]
[assembly: TypeForwardedTo(typeof(ISerializableJsonDictionary))]
[assembly: TypeForwardedTo(typeof(IStyle))]
[assembly: TypeForwardedTo(typeof(ITransform))]
[assembly: TypeForwardedTo(typeof(Label))]
[assembly: TypeForwardedTo(typeof(ListView))]
[assembly: TypeForwardedTo(typeof(ManipulatorActivationFilter))]
[assembly: TypeForwardedTo(typeof(IManipulator))]
[assembly: TypeForwardedTo(typeof(Manipulator))]
[assembly: TypeForwardedTo(typeof(MinMaxSlider))]
[assembly: TypeForwardedTo(typeof(MouseButton))]
[assembly: TypeForwardedTo(typeof(MouseCaptureController))]
[assembly: TypeForwardedTo(typeof(MouseManipulator))]
[assembly: TypeForwardedTo(typeof(ObjectPool<>))]
[assembly: TypeForwardedTo(typeof(ContextType))]
[assembly: TypeForwardedTo(typeof(VersionChangeType))]
[assembly: TypeForwardedTo(typeof(RenderHint))]
[assembly: TypeForwardedTo(typeof(RepaintData))]
[assembly: TypeForwardedTo(typeof(HierarchyEvent))]
[assembly: TypeForwardedTo(typeof(IPanel))]
[assembly: TypeForwardedTo(typeof(BaseVisualElementPanel))]
[assembly: TypeForwardedTo(typeof(LoadResourceFunction))]
[assembly: TypeForwardedTo(typeof(TimeMsFunction))]
[assembly: TypeForwardedTo(typeof(GetViewDataDictionary))]
[assembly: TypeForwardedTo(typeof(SavePersistentViewData))]
[assembly: TypeForwardedTo(typeof(Panel))]
[assembly: TypeForwardedTo(typeof(RenderData))]
[assembly: TypeForwardedTo(typeof(PopupWindow))]
[assembly: TypeForwardedTo(typeof(RepeatButton))]
[assembly: TypeForwardedTo(typeof(TimerState))]
[assembly: TypeForwardedTo(typeof(IScheduler))]
[assembly: TypeForwardedTo(typeof(ScheduledItem))]
[assembly: TypeForwardedTo(typeof(TimerEventScheduler))]
[assembly: TypeForwardedTo(typeof(Scroller))]
[assembly: TypeForwardedTo(typeof(ScrollViewMode))]
[assembly: TypeForwardedTo(typeof(ScrollView))]
[assembly: TypeForwardedTo(typeof(Slider))]
[assembly: TypeForwardedTo(typeof(SliderInt))]
[assembly: TypeForwardedTo(typeof(Spacing))]
[assembly: TypeForwardedTo(typeof(StringUtils))]
[assembly: TypeForwardedTo(typeof(StringUtilsExtensions))]
[assembly: TypeForwardedTo(typeof(Position))]
[assembly: TypeForwardedTo(typeof(Overflow))]
[assembly: TypeForwardedTo(typeof(OverflowInternal))]
[assembly: TypeForwardedTo(typeof(FlexDirection))]
[assembly: TypeForwardedTo(typeof(Wrap))]
[assembly: TypeForwardedTo(typeof(Align))]
[assembly: TypeForwardedTo(typeof(Justify))]
[assembly: TypeForwardedTo(typeof(Visibility))]
[assembly: TypeForwardedTo(typeof(WhiteSpace))]
[assembly: TypeForwardedTo(typeof(DisplayStyle))]
[assembly: TypeForwardedTo(typeof(IStylePainter))]
[assembly: TypeForwardedTo(typeof(IStylePainterInternal))]
[assembly: TypeForwardedTo(typeof(BorderParameters))]
[assembly: TypeForwardedTo(typeof(TextureStylePainterParameters))]
[assembly: TypeForwardedTo(typeof(RectStylePainterParameters))]
[assembly: TypeForwardedTo(typeof(TextStylePainterParameters))]
[assembly: TypeForwardedTo(typeof(MeshStylePainterParameters))]
[assembly: TypeForwardedTo(typeof(CursorPositionStylePainterParameters))]
[assembly: TypeForwardedTo(typeof(TemplateContainer))]
[assembly: TypeForwardedTo(typeof(ITextElement))]
[assembly: TypeForwardedTo(typeof(TextElement))]
[assembly: TypeForwardedTo(typeof(TextNativeSettings))]
[assembly: TypeForwardedTo(typeof(TextVertex))]
[assembly: TypeForwardedTo(typeof(TextNative))]
[assembly: TypeForwardedTo(typeof(TreeView))]
[assembly: TypeForwardedTo(typeof(ITreeViewItem))]
[assembly: TypeForwardedTo(typeof(TreeViewItem<>))]
[assembly: TypeForwardedTo(typeof(UIElementsUtility))]
[assembly: TypeForwardedTo(typeof(RuleMatcher))]
[assembly: TypeForwardedTo(typeof(UQuery))]
[assembly: TypeForwardedTo(typeof(UQueryState<>))]
[assembly: TypeForwardedTo(typeof(UQueryBuilder<>))]
[assembly: TypeForwardedTo(typeof(UQueryExtensions))]
[assembly: TypeForwardedTo(typeof(PseudoStates))]
[assembly: TypeForwardedTo(typeof(PickingMode))]
[assembly: TypeForwardedTo(typeof(VisualElementListPool))]
[assembly: TypeForwardedTo(typeof(VisualElement))]
[assembly: TypeForwardedTo(typeof(VisualElementExtensions))]
[assembly: TypeForwardedTo(typeof(VisualElementFocusChangeDirection))]
[assembly: TypeForwardedTo(typeof(VisualElementFocusRing))]
[assembly: TypeForwardedTo(typeof(IVisualElementScheduledItem))]
[assembly: TypeForwardedTo(typeof(IVisualElementScheduler))]
[assembly: TypeForwardedTo(typeof(IVisualElementPanelActivatable))]
[assembly: TypeForwardedTo(typeof(VisualElementPanelActivator))]
[assembly: TypeForwardedTo(typeof(VisualElementStyleSheetSet))]
[assembly: TypeForwardedTo(typeof(VisualElementUtils))]
[assembly: TypeForwardedTo(typeof(HierarchyChangeType))]
[assembly: TypeForwardedTo(typeof(BaseVisualTreeHierarchyTrackerUpdater))]
[assembly: TypeForwardedTo(typeof(VisualTreeLayoutUpdater))]
[assembly: TypeForwardedTo(typeof(VisualTreeRepaintUpdater))]
[assembly: TypeForwardedTo(typeof(StyleCache))]
[assembly: TypeForwardedTo(typeof(VisualTreeStyleUpdater))]
[assembly: TypeForwardedTo(typeof(StyleMatchingContext))]
[assembly: TypeForwardedTo(typeof(VisualTreeStyleUpdaterTraversal))]
[assembly: TypeForwardedTo(typeof(VisualTreeTransformClipUpdater))]
[assembly: TypeForwardedTo(typeof(VisualTreeUpdatePhase))]
[assembly: TypeForwardedTo(typeof(VisualTreeUpdater))]
[assembly: TypeForwardedTo(typeof(IVisualTreeUpdater))]
[assembly: TypeForwardedTo(typeof(BaseVisualTreeUpdater))]
[assembly: TypeForwardedTo(typeof(VisualTreeViewDataUpdater))]
[assembly: TypeForwardedTo(typeof(IBindable))]
[assembly: TypeForwardedTo(typeof(IBinding))]
[assembly: TypeForwardedTo(typeof(IBindingExtensions))]
[assembly: TypeForwardedTo(typeof(INotifyValueChanged<>))]
[assembly: TypeForwardedTo(typeof(INotifyValueChangedExtensions))]
[assembly: TypeForwardedTo(typeof(KeyboardTextEditorEventHandler))]
[assembly: TypeForwardedTo(typeof(TextEditorEventHandler))]
[assembly: TypeForwardedTo(typeof(TextEditorEngine))]
[assembly: TypeForwardedTo(typeof(TextField))]
[assembly: TypeForwardedTo(typeof(ITextInputField))]
[assembly: TypeForwardedTo(typeof(TextInputBaseField<>))]
[assembly: TypeForwardedTo(typeof(Toggle))]
[assembly: TypeForwardedTo(typeof(TouchScreenTextEditorEventHandler))]
[assembly: TypeForwardedTo(typeof(VisualTreeBindingsUpdater))]
[assembly: TypeForwardedTo(typeof(IMouseCaptureEvent))]
[assembly: TypeForwardedTo(typeof(MouseCaptureEventBase<>))]
[assembly: TypeForwardedTo(typeof(MouseCaptureOutEvent))]
[assembly: TypeForwardedTo(typeof(MouseCaptureEvent))]
[assembly: TypeForwardedTo(typeof(IChangeEvent))]
[assembly: TypeForwardedTo(typeof(ChangeEvent<>))]
[assembly: TypeForwardedTo(typeof(CommandEventDispatchingStrategy))]
[assembly: TypeForwardedTo(typeof(ICommandEvent))]
[assembly: TypeForwardedTo(typeof(CommandEventBase<>))]
[assembly: TypeForwardedTo(typeof(ValidateCommandEvent))]
[assembly: TypeForwardedTo(typeof(ExecuteCommandEvent))]
[assembly: TypeForwardedTo(typeof(DebuggerEventDispatchingStrategy))]
[assembly: TypeForwardedTo(typeof(DefaultDispatchingStrategy))]
[assembly: TypeForwardedTo(typeof(IDragAndDropEvent))]
[assembly: TypeForwardedTo(typeof(DragAndDropEventBase<>))]
[assembly: TypeForwardedTo(typeof(DragExitedEvent))]
[assembly: TypeForwardedTo(typeof(DragEnterEvent))]
[assembly: TypeForwardedTo(typeof(DragLeaveEvent))]
[assembly: TypeForwardedTo(typeof(DragUpdatedEvent))]
[assembly: TypeForwardedTo(typeof(DragPerformEvent))]
[assembly: TypeForwardedTo(typeof(EventBase))]
[assembly: TypeForwardedTo(typeof(EventBase<>))]
[assembly: TypeForwardedTo(typeof(EventCallback<>))]
[assembly: TypeForwardedTo(typeof(EventCallback<, >))]
[assembly: TypeForwardedTo(typeof(EventCallbackFunctorBase))]
[assembly: TypeForwardedTo(typeof(EventCallbackFunctor<>))]
[assembly: TypeForwardedTo(typeof(EventCallbackFunctor<, >))]
[assembly: TypeForwardedTo(typeof(TrickleDown))]
[assembly: TypeForwardedTo(typeof(CallbackPhase))]
[assembly: TypeForwardedTo(typeof(EventCallbackListPool))]
[assembly: TypeForwardedTo(typeof(EventCallbackList))]
[assembly: TypeForwardedTo(typeof(EventCallbackRegistry))]
[assembly: TypeForwardedTo(typeof(IEventHandler))]
[assembly: TypeForwardedTo(typeof(CallbackEventHandler))]
[assembly: TypeForwardedTo(typeof(IFocusEvent))]
[assembly: TypeForwardedTo(typeof(FocusEventBase<>))]
[assembly: TypeForwardedTo(typeof(FocusOutEvent))]
[assembly: TypeForwardedTo(typeof(BlurEvent))]
[assembly: TypeForwardedTo(typeof(FocusInEvent))]
[assembly: TypeForwardedTo(typeof(FocusEvent))]
[assembly: TypeForwardedTo(typeof(PropagationPhase))]
[assembly: TypeForwardedTo(typeof(IEventDispatchingStrategy))]
[assembly: TypeForwardedTo(typeof(EventDispatchUtilities))]
[assembly: TypeForwardedTo(typeof(IMGUIEventDispatchingStrategy))]
[assembly: TypeForwardedTo(typeof(InputEvent))]
[assembly: TypeForwardedTo(typeof(KeyboardEventDispatchingStrategy))]
[assembly: TypeForwardedTo(typeof(IKeyboardEvent))]
[assembly: TypeForwardedTo(typeof(KeyboardEventBase<>))]
[assembly: TypeForwardedTo(typeof(KeyDownEvent))]
[assembly: TypeForwardedTo(typeof(KeyUpEvent))]
[assembly: TypeForwardedTo(typeof(GeometryChangedEvent))]
[assembly: TypeForwardedTo(typeof(MouseCaptureDispatchingStrategy))]
[assembly: TypeForwardedTo(typeof(MouseEventDispatchingStrategy))]
[assembly: TypeForwardedTo(typeof(IMouseEvent))]
[assembly: TypeForwardedTo(typeof(IMouseEventInternal))]
[assembly: TypeForwardedTo(typeof(MouseEventBase<>))]
[assembly: TypeForwardedTo(typeof(MouseDownEvent))]
[assembly: TypeForwardedTo(typeof(MouseUpEvent))]
[assembly: TypeForwardedTo(typeof(MouseMoveEvent))]
[assembly: TypeForwardedTo(typeof(ContextClickEvent))]
[assembly: TypeForwardedTo(typeof(WheelEvent))]
[assembly: TypeForwardedTo(typeof(MouseEnterEvent))]
[assembly: TypeForwardedTo(typeof(MouseLeaveEvent))]
[assembly: TypeForwardedTo(typeof(MouseEnterWindowEvent))]
[assembly: TypeForwardedTo(typeof(MouseLeaveWindowEvent))]
[assembly: TypeForwardedTo(typeof(MouseOverEvent))]
[assembly: TypeForwardedTo(typeof(MouseOutEvent))]
[assembly: TypeForwardedTo(typeof(ContextualMenuPopulateEvent))]
[assembly: TypeForwardedTo(typeof(MousePositionTracker))]
[assembly: TypeForwardedTo(typeof(MouseEventsHelper))]
[assembly: TypeForwardedTo(typeof(IPanelChangedEvent))]
[assembly: TypeForwardedTo(typeof(PanelChangedEventBase<>))]
[assembly: TypeForwardedTo(typeof(AttachToPanelEvent))]
[assembly: TypeForwardedTo(typeof(DetachFromPanelEvent))]
[assembly: TypeForwardedTo(typeof(PropagationPaths))]
[assembly: TypeForwardedTo(typeof(CustomStyleResolvedEvent))]
[assembly: TypeForwardedTo(typeof(TooltipEvent))]
[assembly: TypeForwardedTo(typeof(IMGUIEvent))]
[assembly: TypeForwardedTo(typeof(UIRAtlasAllocator))]
[assembly: TypeForwardedTo(typeof(IAtlasMonitor))]
[assembly: TypeForwardedTo(typeof(UIRAtlasManager))]
[assembly: TypeForwardedTo(typeof(ChainBuilderStats))]
[assembly: TypeForwardedTo(typeof(RenderChain))]
[assembly: TypeForwardedTo(typeof(RenderDataDirtyTypes))]
[assembly: TypeForwardedTo(typeof(RenderChainVEData))]
[assembly: TypeForwardedTo(typeof(RenderChainTextEntry))]
[assembly: TypeForwardedTo(typeof(ClipMethod))]
[assembly: TypeForwardedTo(typeof(RemovalInfo))]
[assembly: TypeForwardedTo(typeof(RenderEvents))]
[assembly: TypeForwardedTo(typeof(UIRStylePainter))]
[assembly: TypeForwardedTo(typeof(UIRTextUpdatePainter))]
[assembly: TypeForwardedTo(typeof(UIRLayoutUpdater))]
[assembly: TypeForwardedTo(typeof(UIRMeshBuilder))]
[assembly: TypeForwardedTo(typeof(UIRRepaintUpdater))]
[assembly: TypeForwardedTo(typeof(UIRTessellation))]
[assembly: TypeForwardedTo(typeof(UIRUtility))]
[assembly: TypeForwardedTo(typeof(Transform3x4))]
[assembly: TypeForwardedTo(typeof(MeshHandle))]
[assembly: TypeForwardedTo(typeof(UIRenderDevice))]
[assembly: TypeForwardedTo(typeof(Alloc))]
[assembly: TypeForwardedTo(typeof(HeapStatistics))]
[assembly: TypeForwardedTo(typeof(PoolItem))]
[assembly: TypeForwardedTo(typeof(Pool<>))]
[assembly: TypeForwardedTo(typeof(BestFitAllocator))]
[assembly: TypeForwardedTo(typeof(BlockAllocator))]
[assembly: TypeForwardedTo(typeof(GPUBufferAllocator))]
[assembly: TypeForwardedTo(typeof(Page))]
[assembly: TypeForwardedTo(typeof(GfxUpdateBufferRange))]
[assembly: TypeForwardedTo(typeof(DrawBufferRange))]
[assembly: TypeForwardedTo(typeof(Utility))]
[assembly: TypeForwardedTo(typeof(VertexFlags))]
[assembly: TypeForwardedTo(typeof(Vertex))]
[assembly: TypeForwardedTo(typeof(State))]
[assembly: TypeForwardedTo(typeof(CommandType))]
[assembly: TypeForwardedTo(typeof(ViewTransform))]
[assembly: TypeForwardedTo(typeof(DrawParams))]
[assembly: TypeForwardedTo(typeof(RenderChainCommand))]
[assembly: TypeForwardedTo(typeof(Background))]
[assembly: TypeForwardedTo(typeof(ComputedStyle))]
[assembly: TypeForwardedTo(typeof(CustomStyleProperty<>))]
[assembly: TypeForwardedTo(typeof(ICustomStyle))]
[assembly: TypeForwardedTo(typeof(InlineStyleAccess))]
[assembly: TypeForwardedTo(typeof(IResolvedStyle))]
[assembly: TypeForwardedTo(typeof(LengthUnit))]
[assembly: TypeForwardedTo(typeof(Length))]
[assembly: TypeForwardedTo(typeof(StyleBackground))]
[assembly: TypeForwardedTo(typeof(StyleColor))]
[assembly: TypeForwardedTo(typeof(StyleCursor))]
[assembly: TypeForwardedTo(typeof(StyleEnum<>))]
[assembly: TypeForwardedTo(typeof(StyleFloat))]
[assembly: TypeForwardedTo(typeof(StyleFont))]
[assembly: TypeForwardedTo(typeof(StyleInt))]
[assembly: TypeForwardedTo(typeof(StyleLength))]
[assembly: TypeForwardedTo(typeof(IStyleValue<>))]
[assembly: TypeForwardedTo(typeof(StyleKeyword))]
[assembly: TypeForwardedTo(typeof(StyleValueExtensions))]
[assembly: TypeForwardedTo(typeof(InheritedStylesData))]
[assembly: TypeForwardedTo(typeof(StyleComplexSelector))]
[assembly: TypeForwardedTo(typeof(StyleProperty))]
[assembly: TypeForwardedTo(typeof(StyleRule))]
[assembly: TypeForwardedTo(typeof(StyleSelector))]
[assembly: TypeForwardedTo(typeof(MatchResultInfo))]
[assembly: TypeForwardedTo(typeof(SelectorMatchRecord))]
[assembly: TypeForwardedTo(typeof(StyleSelectorHelper))]
[assembly: TypeForwardedTo(typeof(StyleSelectorPart))]
[assembly: TypeForwardedTo(typeof(StyleSelectorRelationship))]
[assembly: TypeForwardedTo(typeof(StyleSelectorType))]
[assembly: TypeForwardedTo(typeof(StyleSheet))]
[assembly: TypeForwardedTo(typeof(IStyleSheetApplicator))]
[assembly: TypeForwardedTo(typeof(StyleSheetApplicator))]
[assembly: TypeForwardedTo(typeof(StyleValueApplicator))]
[assembly: TypeForwardedTo(typeof(ShorthandApplicator))]
[assembly: TypeForwardedTo(typeof(StyleSheetCache))]
[assembly: TypeForwardedTo(typeof(StyleSheetExtensions))]
[assembly: TypeForwardedTo(typeof(StyleValue))]
[assembly: TypeForwardedTo(typeof(StylePropertyID))]
[assembly: TypeForwardedTo(typeof(StylePropertyApplyMode))]
[assembly: TypeForwardedTo(typeof(StyleValueHandle))]
[assembly: TypeForwardedTo(typeof(StyleValueKeyword))]
[assembly: TypeForwardedTo(typeof(StyleValueType))]
[assembly: TypeForwardedTo(typeof(CustomPropertyHandle))]
[assembly: TypeForwardedTo(typeof(VisualElementStylesData))]
[assembly: TypeForwardedTo(typeof(Expression))]
[assembly: TypeForwardedTo(typeof(ExpressionType))]
[assembly: TypeForwardedTo(typeof(DataType))]
[assembly: TypeForwardedTo(typeof(ExpressionCombinator))]
[assembly: TypeForwardedTo(typeof(ExpressionMultiplierType))]
[assembly: TypeForwardedTo(typeof(ExpressionMultiplier))]
[assembly: TypeForwardedTo(typeof(StyleSyntaxParser))]
[assembly: TypeForwardedTo(typeof(StyleSyntaxTokenType))]
[assembly: TypeForwardedTo(typeof(StyleSyntaxToken))]
[assembly: TypeForwardedTo(typeof(StyleSyntaxTokenizer))]
[assembly: TypeForwardedTo(typeof(MatchResultErrorCode))]
[assembly: TypeForwardedTo(typeof(MatchResult))]
[assembly: TypeForwardedTo(typeof(StyleMatcher))]
[assembly: TypeForwardedTo(typeof(StylePropertyInfo))]
[assembly: TypeForwardedTo(typeof(StylePropertyInfoCache))]
[assembly: TypeForwardedTo(typeof(StylePropertyValueParser))]
[assembly: TypeForwardedTo(typeof(StyleValidationStatus))]
[assembly: TypeForwardedTo(typeof(StyleValidationResult))]
[assembly: TypeForwardedTo(typeof(StyleValidator))]
[assembly: TypeForwardedTo(typeof(IUxmlAttributes))]
[assembly: TypeForwardedTo(typeof(TemplateAsset))]
[assembly: TypeForwardedTo(typeof(UxmlAttributeDescription))]
[assembly: TypeForwardedTo(typeof(TypedUxmlAttributeDescription<>))]
[assembly: TypeForwardedTo(typeof(UxmlStringAttributeDescription))]
[assembly: TypeForwardedTo(typeof(UxmlFloatAttributeDescription))]
[assembly: TypeForwardedTo(typeof(UxmlDoubleAttributeDescription))]
[assembly: TypeForwardedTo(typeof(UxmlIntAttributeDescription))]
[assembly: TypeForwardedTo(typeof(UxmlLongAttributeDescription))]
[assembly: TypeForwardedTo(typeof(UxmlBoolAttributeDescription))]
[assembly: TypeForwardedTo(typeof(UxmlColorAttributeDescription))]
[assembly: TypeForwardedTo(typeof(UxmlEnumAttributeDescription<>))]
[assembly: TypeForwardedTo(typeof(UxmlChildElementDescription))]
[assembly: TypeForwardedTo(typeof(UxmlTraits))]
[assembly: TypeForwardedTo(typeof(IUxmlFactory))]
[assembly: TypeForwardedTo(typeof(UxmlFactory<, >))]
[assembly: TypeForwardedTo(typeof(UxmlFactory<>))]
[assembly: TypeForwardedTo(typeof(UxmlRootElementFactory))]
[assembly: TypeForwardedTo(typeof(UxmlRootElementTraits))]
[assembly: TypeForwardedTo(typeof(UxmlTypeRestriction))]
[assembly: TypeForwardedTo(typeof(UxmlValueMatches))]
[assembly: TypeForwardedTo(typeof(UxmlValueBounds))]
[assembly: TypeForwardedTo(typeof(UxmlEnumeration))]
[assembly: TypeForwardedTo(typeof(VisualElementAsset))]
[assembly: TypeForwardedTo(typeof(VisualElementFactoryRegistry))]
[assembly: TypeForwardedTo(typeof(VisualTreeAsset))]
[assembly: TypeForwardedTo(typeof(CreationContext))]
[assembly: TypeForwardedTo(typeof(BaselineFunction))]
[assembly: TypeForwardedTo(typeof(Logger))]
[assembly: TypeForwardedTo(typeof(MeasureFunction))]
[assembly: TypeForwardedTo(typeof(MeasureOutput))]
[assembly: TypeForwardedTo(typeof(YogaAlign))]
[assembly: TypeForwardedTo(typeof(YogaBaselineFunc))]
[assembly: TypeForwardedTo(typeof(YogaConfig))]
[assembly: TypeForwardedTo(typeof(YogaConstants))]
[assembly: TypeForwardedTo(typeof(YogaDimension))]
[assembly: TypeForwardedTo(typeof(YogaDirection))]
[assembly: TypeForwardedTo(typeof(YogaDisplay))]
[assembly: TypeForwardedTo(typeof(YogaEdge))]
[assembly: TypeForwardedTo(typeof(YogaExperimentalFeature))]
[assembly: TypeForwardedTo(typeof(YogaFlexDirection))]
[assembly: TypeForwardedTo(typeof(YogaJustify))]
[assembly: TypeForwardedTo(typeof(YogaLogger))]
[assembly: TypeForwardedTo(typeof(YogaLogLevel))]
[assembly: TypeForwardedTo(typeof(YogaMeasureFunc))]
[assembly: TypeForwardedTo(typeof(YogaMeasureMode))]
[assembly: TypeForwardedTo(typeof(Native))]
[assembly: TypeForwardedTo(typeof(YogaNode))]
[assembly: TypeForwardedTo(typeof(YogaNodeType))]
[assembly: TypeForwardedTo(typeof(YogaOverflow))]
[assembly: TypeForwardedTo(typeof(YogaPositionType))]
[assembly: TypeForwardedTo(typeof(YogaPrintOptions))]
[assembly: TypeForwardedTo(typeof(YogaSize))]
[assembly: TypeForwardedTo(typeof(YogaUnit))]
[assembly: TypeForwardedTo(typeof(YogaValue))]
[assembly: TypeForwardedTo(typeof(YogaValueExtensions))]
[assembly: TypeForwardedTo(typeof(YogaWrap))]
[assembly: TypeForwardedTo(typeof(MatchInfo))]
[assembly: TypeForwardedTo(typeof(MatchInfoSnapshot))]
[assembly: TypeForwardedTo(typeof(NetworkMatch))]
[assembly: TypeForwardedTo(typeof(NetworkTransport))]
[assembly: TypeForwardedTo(typeof(NetworkEventType))]
[assembly: TypeForwardedTo(typeof(QosType))]
[assembly: TypeForwardedTo(typeof(NetworkError))]
[assembly: TypeForwardedTo(typeof(ReactorModel))]
[assembly: TypeForwardedTo(typeof(ConnectionAcksType))]
[assembly: TypeForwardedTo(typeof(ChannelQOS))]
[assembly: TypeForwardedTo(typeof(ConnectionConfig))]
[assembly: TypeForwardedTo(typeof(HostTopology))]
[assembly: TypeForwardedTo(typeof(GlobalConfig))]
[assembly: TypeForwardedTo(typeof(ConnectionSimulatorConfig))]
[assembly: TypeForwardedTo(typeof(Request))]
[assembly: TypeForwardedTo(typeof(IResponse))]
[assembly: TypeForwardedTo(typeof(Response))]
[assembly: TypeForwardedTo(typeof(BasicResponse))]
[assembly: TypeForwardedTo(typeof(CreateMatchRequest))]
[assembly: TypeForwardedTo(typeof(CreateMatchResponse))]
[assembly: TypeForwardedTo(typeof(JoinMatchRequest))]
[assembly: TypeForwardedTo(typeof(JoinMatchResponse))]
[assembly: TypeForwardedTo(typeof(DestroyMatchRequest))]
[assembly: TypeForwardedTo(typeof(DropConnectionRequest))]
[assembly: TypeForwardedTo(typeof(DropConnectionResponse))]
[assembly: TypeForwardedTo(typeof(ListMatchRequest))]
[assembly: TypeForwardedTo(typeof(MatchDirectConnectInfo))]
[assembly: TypeForwardedTo(typeof(MatchDesc))]
[assembly: TypeForwardedTo(typeof(ListMatchResponse))]
[assembly: TypeForwardedTo(typeof(CreateOrJoinMatchRequest))]
[assembly: TypeForwardedTo(typeof(SetMatchAttributesRequest))]
[assembly: TypeForwardedTo(typeof(NetworkAccessLevel))]
[assembly: TypeForwardedTo(typeof(AppID))]
[assembly: TypeForwardedTo(typeof(SourceID))]
[assembly: TypeForwardedTo(typeof(NetworkID))]
[assembly: TypeForwardedTo(typeof(NodeID))]
[assembly: TypeForwardedTo(typeof(HostPriority))]
[assembly: TypeForwardedTo(typeof(NetworkAccessToken))]
[assembly: TypeForwardedTo(typeof(Utility))]
[assembly: TypeForwardedTo(typeof(ConnectionConfigInternal))]
[assembly: TypeForwardedTo(typeof(HostTopologyInternal))]
[assembly: TypeForwardedTo(typeof(ConnectionSimulatorConfigInternal))]
[assembly: TypeForwardedTo(typeof(GlobalConfigInternal))]
[assembly: TypeForwardedTo(typeof(ContinuousEvent))]
[assembly: TypeForwardedTo(typeof(AnalyticsSessionState))]
[assembly: TypeForwardedTo(typeof(AnalyticsSessionInfo))]
[assembly: TypeForwardedTo(typeof(Analytics))]
[assembly: TypeForwardedTo(typeof(Gender))]
[assembly: TypeForwardedTo(typeof(AnalyticsResult))]
[assembly: TypeForwardedTo(typeof(CustomEventData))]
[assembly: TypeForwardedTo(typeof(RemoteSettings))]
[assembly: TypeForwardedTo(typeof(RemoteConfigSettings))]
[assembly: TypeForwardedTo(typeof(RemoteConfigSettingsHelper))]
[assembly: TypeForwardedTo(typeof(UnityWebRequestAssetBundle))]
[assembly: TypeForwardedTo(typeof(DownloadHandlerAssetBundle))]
[assembly: TypeForwardedTo(typeof(WebRequestWWW))]
[assembly: TypeForwardedTo(typeof(WWW))]
[assembly: TypeForwardedTo(typeof(WWWAudioExtensions))]
[assembly: TypeForwardedTo(typeof(TrackableId))]
[assembly: TypeForwardedTo(typeof(ISubsystemDescriptor))]
[assembly: TypeForwardedTo(typeof(ISubsystemDescriptorImpl)

Room Architect Tool_Data/Managed/UnityEngine.DSPGraphModule.dll

Decompiled 3 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using Unity.Collections.LowLevel.Unsafe;
using Unity.Jobs;
using UnityEngine;
using UnityEngine.Bindings;

[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.Audio.DSPGraph")]
[assembly: InternalsVisibleTo("Unity.Audio.DSPGraph.Tests")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace Unity.Audio;

[NativeType(Header = "Modules/DSPGraph/Public/DSPGraphHandles.h")]
internal struct Handle : IHandle<Handle>, IValidatable, IEquatable<Handle>
{
	internal struct Node
	{
		public long Next;

		public int Id;

		public int Version;

		public int DidAllocate;

		public const int InvalidId = -1;
	}

	[NativeDisableUnsafePtrRestriction]
	private IntPtr m_Node;

	public int Version;

	public unsafe Node* AtomicNode
	{
		get
		{
			return (Node*)(void*)m_Node;
		}
		set
		{
			if (value == null)
			{
				throw new ArgumentNullException();
			}
			m_Node = (IntPtr)value;
			Version = value->Version;
		}
	}

	public unsafe int Id
	{
		get
		{
			return (!Valid) ? (-1) : AtomicNode->Id;
		}
		set
		{
			if (value == -1)
			{
				throw new ArgumentException("Invalid ID");
			}
			if (!Valid)
			{
				throw new InvalidOperationException("Handle is invalid or has been destroyed");
			}
			if (AtomicNode->Id != -1)
			{
				throw new InvalidOperationException($"Trying to overwrite id on live node {AtomicNode->Id}");
			}
			AtomicNode->Id = value;
		}
	}

	public unsafe bool Valid
	{
		[CompilerGenerated]
		get
		{
			return m_Node != IntPtr.Zero && AtomicNode->Version == Version;
		}
	}

	public unsafe bool Alive
	{
		[CompilerGenerated]
		get
		{
			return Valid && AtomicNode->Id != -1;
		}
	}

	public unsafe Handle(Node* node)
	{
		if (node == null)
		{
			throw new ArgumentNullException("node");
		}
		if (node->Id != -1)
		{
			throw new InvalidOperationException($"Reusing unflushed node {node->Id}");
		}
		Version = node->Version;
		m_Node = (IntPtr)node;
	}

	public unsafe void FlushNode()
	{
		if (!Valid)
		{
			throw new InvalidOperationException("Attempting to flush invalid audio handle");
		}
		AtomicNode->Id = -1;
		AtomicNode->Version++;
	}

	public bool Equals(Handle other)
	{
		return m_Node == other.m_Node && Version == other.Version;
	}

	public override bool Equals(object obj)
	{
		if (object.ReferenceEquals(null, obj))
		{
			return false;
		}
		return obj is Handle && Equals((Handle)obj);
	}

	public override int GetHashCode()
	{
		return ((int)m_Node * 397) ^ Version;
	}
}
[StructLayout(LayoutKind.Sequential, Size = 1)]
[NativeType(Header = "Modules/DSPGraph/Public/AudioMemoryManager.bindings.h")]
internal struct AudioMemoryManager
{
	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = false)]
	public unsafe static extern void* Internal_AllocateAudioMemory(int size, int alignment);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = false)]
	public unsafe static extern void Internal_FreeAudioMemory(void* memory);
}
[StructLayout(LayoutKind.Sequential, Size = 1)]
[NativeType(Header = "Modules/DSPGraph/Public/AudioOutputHookManager.bindings.h")]
internal struct AudioOutputHookManager
{
	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public unsafe static extern void Internal_CreateAudioOutputHook(out Handle outputHook, void* jobReflectionData, void* jobData);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public static extern void Internal_DisposeAudioOutputHook(ref Handle outputHook);
}
[StructLayout(LayoutKind.Sequential, Size = 1)]
[NativeHeader("Modules/DSPGraph/Public/DSPSampleProvider.bindings.h")]
[NativeType(Header = "Modules/DSPGraph/Public/DSPCommandBlock.bindings.h")]
internal struct DSPCommandBlockInternal
{
	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public unsafe static extern void Internal_CreateDSPNode(ref Handle graph, ref Handle block, ref Handle node, void* jobReflectionData, void* jobMemory, void* parameterDescriptionArray, int parameterCount, void* sampleProviderDescriptionArray, int sampleProviderCount);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public unsafe static extern void Internal_SetFloat(ref Handle graph, ref Handle block, ref Handle node, void* jobReflectionData, uint pIndex, float value, uint interpolationLength);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public unsafe static extern void Internal_AddFloatKey(ref Handle graph, ref Handle block, ref Handle node, void* jobReflectionData, uint pIndex, ulong dspClock, float value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public unsafe static extern void Internal_SustainFloat(ref Handle graph, ref Handle block, ref Handle node, void* jobReflectionData, uint pIndex, ulong dspClock);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public unsafe static extern void Internal_UpdateAudioJob(ref Handle graph, ref Handle block, ref Handle node, void* updateJobMem, void* updateJobReflectionData, void* nodeReflectionData);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public unsafe static extern void Internal_CreateUpdateRequest(ref Handle graph, ref Handle block, ref Handle node, ref Handle request, object callback, void* updateJobMem, void* updateJobReflectionData, void* nodeReflectionData);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public static extern void Internal_ReleaseDSPNode(ref Handle graph, ref Handle block, ref Handle node);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public static extern void Internal_Connect(ref Handle graph, ref Handle block, ref Handle output, int outputPort, ref Handle input, int inputPort, ref Handle connection);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public static extern void Internal_Disconnect(ref Handle graph, ref Handle block, ref Handle output, int outputPort, ref Handle input, int inputPort);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public static extern void Internal_DisconnectByHandle(ref Handle graph, ref Handle block, ref Handle connection);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public unsafe static extern void Internal_SetAttenuation(ref Handle graph, ref Handle block, ref Handle connection, void* value, byte dimension, uint interpolationLength);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public unsafe static extern void Internal_AddAttenuationKey(ref Handle graph, ref Handle block, ref Handle connection, ulong dspClock, void* value, byte dimension);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public static extern void Internal_SustainAttenuation(ref Handle graph, ref Handle block, ref Handle connection, ulong dspClock);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public static extern void Internal_AddInletPort(ref Handle graph, ref Handle block, ref Handle node, int channelCount, int format);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public static extern void Internal_AddOutletPort(ref Handle graph, ref Handle block, ref Handle node, int channelCount, int format);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public static extern void Internal_SetSampleProvider(ref Handle graph, ref Handle block, ref Handle node, int item, int index, uint audioSampleProviderId, bool destroyOnRemove);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public static extern void Internal_InsertSampleProvider(ref Handle graph, ref Handle block, ref Handle node, int item, int index, uint audioSampleProviderId, bool destroyOnRemove);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public static extern void Internal_RemoveSampleProvider(ref Handle graph, ref Handle block, ref Handle node, int item, int index);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public static extern void Internal_Complete(ref Handle graph, ref Handle block);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public static extern void Internal_Cancel(ref Handle graph, ref Handle block);
}
internal struct DSPGraphExecutionNode
{
	public unsafe void* ReflectionData;

	public unsafe void* JobStructData;

	public unsafe void* JobData;

	public unsafe void* ResourceContext;

	public int FunctionIndex;

	public int FenceIndex;

	public int FenceCount;
}
[StructLayout(LayoutKind.Sequential, Size = 1)]
[NativeType(Header = "Modules/DSPGraph/Public/DSPGraph.bindings.h")]
internal struct DSPGraphInternal
{
	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public static extern void Internal_CreateDSPGraph(out Handle graph, int outputFormat, uint outputChannels, uint dspBufferSize, uint sampleRate);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public static extern void Internal_DisposeDSPGraph(ref Handle graph);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public static extern void Internal_CreateDSPCommandBlock(ref Handle graph, ref Handle block);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public static extern uint Internal_AddNodeEventHandler(ref Handle graph, long eventTypeHashCode, object handler);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public static extern bool Internal_RemoveNodeEventHandler(ref Handle graph, uint handlerId);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public static extern void Internal_GetRootDSP(ref Handle graph, ref Handle root);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public static extern ulong Internal_GetDSPClock(ref Handle graph);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true, IsThreadSafe = true)]
	public static extern void Internal_BeginMix(ref Handle graph, int frameCount, int executionMode);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true, IsThreadSafe = true)]
	public unsafe static extern void Internal_ReadMix(ref Handle graph, void* buffer, int frameCount);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public static extern void Internal_Update(ref Handle graph);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true, IsThreadSafe = true)]
	public static extern bool Internal_AssertMixerThread(ref Handle graph);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true, IsThreadSafe = true)]
	public static extern bool Internal_AssertMainThread(ref Handle graph);

	[NativeMethod(IsFreeFunction = true, ThrowsException = true, IsThreadSafe = true)]
	public static Handle Internal_AllocateHandle(ref Handle graph)
	{
		Internal_AllocateHandle_Injected(ref graph, out var ret);
		return ret;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true, IsThreadSafe = true)]
	public unsafe static extern void Internal_InitializeJob(void* jobStructData, void* jobReflectionData, void* resourceContext);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true, IsThreadSafe = true)]
	public unsafe static extern void Internal_ExecuteJob(void* jobStructData, void* jobReflectionData, void* jobData, void* resourceContext);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true, IsThreadSafe = true)]
	public unsafe static extern void Internal_ExecuteUpdateJob(void* updateStructMemory, void* updateReflectionData, void* jobStructMemory, void* jobReflectionData, void* resourceContext, ref Handle requestHandle, ref JobHandle fence);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true, IsThreadSafe = true)]
	public unsafe static extern void Internal_DisposeJob(void* jobStructData, void* jobReflectionData, void* resourceContext);

	[NativeMethod(IsFreeFunction = true, ThrowsException = true, IsThreadSafe = true)]
	public unsafe static void Internal_ScheduleGraph(JobHandle inputDeps, void* nodes, int nodeCount, int* childTable, void* dependencies)
	{
		Internal_ScheduleGraph_Injected(ref inputDeps, nodes, nodeCount, ref childTable, dependencies);
	}

	[NativeMethod(IsFreeFunction = true, ThrowsException = true, IsThreadSafe = true)]
	public static void Internal_SyncFenceNoWorkSteal(JobHandle handle)
	{
		Internal_SyncFenceNoWorkSteal_Injected(ref handle);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void Internal_AllocateHandle_Injected(ref Handle graph, out Handle ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private unsafe static extern void Internal_ScheduleGraph_Injected(ref JobHandle inputDeps, void* nodes, int nodeCount, ref int* childTable, void* dependencies);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void Internal_SyncFenceNoWorkSteal_Injected(ref JobHandle handle);
}
[StructLayout(LayoutKind.Sequential, Size = 1)]
[NativeType(Header = "Modules/DSPGraph/Public/DSPNodeUpdateRequest.bindings.h")]
internal struct DSPNodeUpdateRequestHandleInternal
{
	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public unsafe static extern void* Internal_GetUpdateJobData(ref Handle graph, ref Handle requestHandle);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public static extern bool Internal_HasError(ref Handle graph, ref Handle requestHandle);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public static extern void Internal_GetDSPNode(ref Handle graph, ref Handle requestHandle, ref Handle node);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public static extern void Internal_GetFence(ref Handle graph, ref Handle requestHandle, ref JobHandle fence);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsFreeFunction = true, ThrowsException = true)]
	public static extern void Internal_Dispose(ref Handle graph, ref Handle requestHandle);
}
[StructLayout(LayoutKind.Sequential, Size = 1)]
[NativeType(Header = "Modules/DSPGraph/Public/DSPSampleProvider.bindings.h")]
internal struct DSPSampleProviderInternal
{
	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsThreadSafe = true, IsFreeFunction = true, ThrowsException = true)]
	public unsafe static extern int Internal_ReadUInt8FromSampleProvider(void* provider, int format, void* buffer, int length);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsThreadSafe = true, IsFreeFunction = true, ThrowsException = true)]
	public unsafe static extern int Internal_ReadSInt16FromSampleProvider(void* provider, int format, void* buffer, int length);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsThreadSafe = true, IsFreeFunction = true, ThrowsException = true)]
	public unsafe static extern int Internal_ReadFloatFromSampleProvider(void* provider, void* buffer, int length);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsThreadSafe = true, IsFreeFunction = true, ThrowsException = true)]
	public unsafe static extern ushort Internal_GetChannelCount(void* provider);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsThreadSafe = true, IsFreeFunction = true, ThrowsException = true)]
	public unsafe static extern uint Internal_GetSampleRate(void* provider);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsThreadSafe = true, IsFreeFunction = true, ThrowsException = true)]
	public unsafe static extern int Internal_ReadUInt8FromSampleProviderById(uint providerId, int format, void* buffer, int length);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsThreadSafe = true, IsFreeFunction = true, ThrowsException = true)]
	public unsafe static extern int Internal_ReadSInt16FromSampleProviderById(uint providerId, int format, void* buffer, int length);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsThreadSafe = true, IsFreeFunction = true, ThrowsException = true)]
	public unsafe static extern int Internal_ReadFloatFromSampleProviderById(uint providerId, void* buffer, int length);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsThreadSafe = true, IsFreeFunction = true, ThrowsException = true)]
	public static extern ushort Internal_GetChannelCountById(uint providerId);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsThreadSafe = true, IsFreeFunction = true, ThrowsException = true)]
	public static extern uint Internal_GetSampleRateById(uint providerId);
}
[StructLayout(LayoutKind.Sequential, Size = 1)]
[NativeType(Header = "Modules/DSPGraph/Public/ExecuteContext.bindings.h")]
internal struct ExecuteContextInternal
{
	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsThreadSafe = true, IsFreeFunction = true)]
	public unsafe static extern void Internal_PostEvent(void* dspNodePtr, long eventTypeHashCode, void* eventPtr, int eventSize);
}

Room Architect Tool_Data/Managed/UnityEngine.FileSystemHttpModule.dll

Decompiled 3 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;

[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]

Room Architect Tool_Data/Managed/UnityEngine.GameCenterModule.dll

Decompiled 3 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.SocialPlatforms;
using UnityEngine.SocialPlatforms.Impl;

[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: UnityEngineModuleAssembly]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine.SocialPlatforms.Impl
{
	public class LocalUser : UserProfile, ILocalUser, IUserProfile
	{
		private IUserProfile[] m_Friends;

		private bool m_Authenticated;

		private bool m_Underage;

		public IUserProfile[] friends => m_Friends;

		public bool authenticated => m_Authenticated;

		public bool underage => m_Underage;

		public LocalUser()
		{
			m_Friends = new UserProfile[0];
			m_Authenticated = false;
			m_Underage = false;
		}

		public void Authenticate(Action<bool> callback)
		{
			ActivePlatform.Instance.Authenticate(this, callback);
		}

		public void Authenticate(Action<bool, string> callback)
		{
			ActivePlatform.Instance.Authenticate(this, callback);
		}

		public void LoadFriends(Action<bool> callback)
		{
			ActivePlatform.Instance.LoadFriends(this, callback);
		}

		public void SetFriends(IUserProfile[] friends)
		{
			m_Friends = friends;
		}

		public void SetAuthenticated(bool value)
		{
			m_Authenticated = value;
		}

		public void SetUnderage(bool value)
		{
			m_Underage = value;
		}
	}
	public class UserProfile : IUserProfile
	{
		protected string m_UserName;

		protected string m_ID;

		protected bool m_IsFriend;

		protected UserState m_State;

		protected Texture2D m_Image;

		public string userName => m_UserName;

		public string id => m_ID;

		public bool isFriend => m_IsFriend;

		public UserState state => m_State;

		public Texture2D image => m_Image;

		public UserProfile()
		{
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Expected O, but got Unknown
			m_UserName = "Uninitialized";
			m_ID = "0";
			m_IsFriend = false;
			m_State = UserState.Offline;
			m_Image = new Texture2D(32, 32);
		}

		public UserProfile(string name, string id, bool friend)
			: this(name, id, friend, UserState.Offline, new Texture2D(0, 0))
		{
		}//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: Expected O, but got Unknown


		public UserProfile(string name, string id, bool friend, UserState state, Texture2D image)
		{
			m_UserName = name;
			m_ID = id;
			m_IsFriend = friend;
			m_State = state;
			m_Image = image;
		}

		public override string ToString()
		{
			return id + " - " + userName + " - " + isFriend + " - " + state;
		}

		public void SetUserName(string name)
		{
			m_UserName = name;
		}

		public void SetUserID(string id)
		{
			m_ID = id;
		}

		public void SetImage(Texture2D image)
		{
			m_Image = image;
		}

		public void SetIsFriend(bool value)
		{
			m_IsFriend = value;
		}

		public void SetState(UserState state)
		{
			m_State = state;
		}
	}
	public class Achievement : IAchievement
	{
		private bool m_Completed;

		private bool m_Hidden;

		private DateTime m_LastReportedDate;

		public string id { get; set; }

		public double percentCompleted { get; set; }

		public bool completed => m_Completed;

		public bool hidden => m_Hidden;

		public DateTime lastReportedDate => m_LastReportedDate;

		public Achievement(string id, double percentCompleted, bool completed, bool hidden, DateTime lastReportedDate)
		{
			this.id = id;
			this.percentCompleted = percentCompleted;
			m_Completed = completed;
			m_Hidden = hidden;
			m_LastReportedDate = lastReportedDate;
		}

		public Achievement(string id, double percent)
		{
			this.id = id;
			percentCompleted = percent;
			m_Hidden = false;
			m_Completed = false;
			m_LastReportedDate = DateTime.MinValue;
		}

		public Achievement()
			: this("unknown", 0.0)
		{
		}

		public override string ToString()
		{
			return id + " - " + percentCompleted + " - " + completed + " - " + hidden + " - " + lastReportedDate;
		}

		public void ReportProgress(Action<bool> callback)
		{
			ActivePlatform.Instance.ReportProgress(id, percentCompleted, callback);
		}

		public void SetCompleted(bool value)
		{
			m_Completed = value;
		}

		public void SetHidden(bool value)
		{
			m_Hidden = value;
		}

		public void SetLastReportedDate(DateTime date)
		{
			m_LastReportedDate = date;
		}
	}
	public class AchievementDescription : IAchievementDescription
	{
		private string m_Title;

		private Texture2D m_Image;

		private string m_AchievedDescription;

		private string m_UnachievedDescription;

		private bool m_Hidden;

		private int m_Points;

		public string id { get; set; }

		public string title => m_Title;

		public Texture2D image => m_Image;

		public string achievedDescription => m_AchievedDescription;

		public string unachievedDescription => m_UnachievedDescription;

		public bool hidden => m_Hidden;

		public int points => m_Points;

		public AchievementDescription(string id, string title, Texture2D image, string achievedDescription, string unachievedDescription, bool hidden, int points)
		{
			this.id = id;
			m_Title = title;
			m_Image = image;
			m_AchievedDescription = achievedDescription;
			m_UnachievedDescription = unachievedDescription;
			m_Hidden = hidden;
			m_Points = points;
		}

		public override string ToString()
		{
			return id + " - " + title + " - " + achievedDescription + " - " + unachievedDescription + " - " + points + " - " + hidden;
		}

		public void SetImage(Texture2D image)
		{
			m_Image = image;
		}
	}
	public class Score : IScore
	{
		private DateTime m_Date;

		private string m_FormattedValue;

		private string m_UserID;

		private int m_Rank;

		public string leaderboardID { get; set; }

		public long value { get; set; }

		public DateTime date => m_Date;

		public string formattedValue => m_FormattedValue;

		public string userID => m_UserID;

		public int rank => m_Rank;

		public Score()
			: this("unkown", -1L)
		{
		}

		public Score(string leaderboardID, long value)
			: this(leaderboardID, value, "0", DateTime.Now, "", -1)
		{
		}

		public Score(string leaderboardID, long value, string userID, DateTime date, string formattedValue, int rank)
		{
			this.leaderboardID = leaderboardID;
			this.value = value;
			m_UserID = userID;
			m_Date = date;
			m_FormattedValue = formattedValue;
			m_Rank = rank;
		}

		public override string ToString()
		{
			return "Rank: '" + m_Rank + "' Value: '" + value + "' Category: '" + leaderboardID + "' PlayerID: '" + m_UserID + "' Date: '" + m_Date;
		}

		public void ReportScore(Action<bool> callback)
		{
			ActivePlatform.Instance.ReportScore(value, leaderboardID, callback);
		}

		public void SetDate(DateTime date)
		{
			m_Date = date;
		}

		public void SetFormattedValue(string value)
		{
			m_FormattedValue = value;
		}

		public void SetUserID(string userID)
		{
			m_UserID = userID;
		}

		public void SetRank(int rank)
		{
			m_Rank = rank;
		}
	}
	public class Leaderboard : ILeaderboard
	{
		private bool m_Loading;

		private IScore m_LocalUserScore;

		private uint m_MaxRange;

		private IScore[] m_Scores;

		private string m_Title;

		private string[] m_UserIDs;

		public bool loading => ActivePlatform.Instance.GetLoading(this);

		public string id { get; set; }

		public UserScope userScope { get; set; }

		public Range range { get; set; }

		public TimeScope timeScope { get; set; }

		public IScore localUserScore => m_LocalUserScore;

		public uint maxRange => m_MaxRange;

		public IScore[] scores => m_Scores;

		public string title => m_Title;

		public Leaderboard()
		{
			id = "Invalid";
			range = new Range(1, 10);
			userScope = UserScope.Global;
			timeScope = TimeScope.AllTime;
			m_Loading = false;
			m_LocalUserScore = new Score("Invalid", 0L);
			m_MaxRange = 0u;
			m_Scores = new Score[0];
			m_Title = "Invalid";
			m_UserIDs = new string[0];
		}

		public void SetUserFilter(string[] userIDs)
		{
			m_UserIDs = userIDs;
		}

		public override string ToString()
		{
			return string.Concat("ID: '", id, "' Title: '", m_Title, "' Loading: '", m_Loading, "' Range: [", range.from, ",", range.count, "] MaxRange: '", m_MaxRange, "' Scores: '", m_Scores.Length, "' UserScope: '", userScope, "' TimeScope: '", timeScope, "' UserFilter: '", m_UserIDs.Length);
		}

		public void LoadScores(Action<bool> callback)
		{
			ActivePlatform.Instance.LoadScores(this, callback);
		}

		public void SetLocalUserScore(IScore score)
		{
			m_LocalUserScore = score;
		}

		public void SetMaxRange(uint maxRange)
		{
			m_MaxRange = maxRange;
		}

		public void SetScores(IScore[] scores)
		{
			m_Scores = scores;
		}

		public void SetTitle(string title)
		{
			m_Title = title;
		}

		public string[] GetUserFilter()
		{
			return m_UserIDs;
		}
	}
}
namespace UnityEngine.SocialPlatforms
{
	public class Local : ISocialPlatform
	{
		private static LocalUser m_LocalUser = null;

		private List<UserProfile> m_Friends = new List<UserProfile>();

		private List<UserProfile> m_Users = new List<UserProfile>();

		private List<AchievementDescription> m_AchievementDescriptions = new List<AchievementDescription>();

		private List<Achievement> m_Achievements = new List<Achievement>();

		private List<Leaderboard> m_Leaderboards = new List<Leaderboard>();

		private Texture2D m_DefaultTexture;

		public ILocalUser localUser
		{
			get
			{
				if (m_LocalUser == null)
				{
					m_LocalUser = new LocalUser();
				}
				return m_LocalUser;
			}
		}

		void ISocialPlatform.Authenticate(ILocalUser user, Action<bool> callback)
		{
			LocalUser localUser = (LocalUser)user;
			m_DefaultTexture = CreateDummyTexture(32, 32);
			PopulateStaticData();
			localUser.SetAuthenticated(value: true);
			localUser.SetUnderage(value: false);
			localUser.SetUserID("1000");
			localUser.SetUserName("Lerpz");
			localUser.SetImage(m_DefaultTexture);
			callback?.Invoke(obj: true);
		}

		void ISocialPlatform.Authenticate(ILocalUser user, Action<bool, string> callback)
		{
			((ISocialPlatform)this).Authenticate(user, (Action<bool>)delegate(bool success)
			{
				callback(success, null);
			});
		}

		void ISocialPlatform.LoadFriends(ILocalUser user, Action<bool> callback)
		{
			if (VerifyUser())
			{
				((LocalUser)user).SetFriends(m_Friends.ToArray());
				callback?.Invoke(obj: true);
			}
		}

		public void LoadUsers(string[] userIDs, Action<IUserProfile[]> callback)
		{
			List<UserProfile> list = new List<UserProfile>();
			if (!VerifyUser())
			{
				return;
			}
			foreach (string text in userIDs)
			{
				foreach (UserProfile user in m_Users)
				{
					if (user.id == text)
					{
						list.Add(user);
					}
				}
				foreach (UserProfile friend in m_Friends)
				{
					if (friend.id == text)
					{
						list.Add(friend);
					}
				}
			}
			callback(list.ToArray());
		}

		public void ReportProgress(string id, double progress, Action<bool> callback)
		{
			if (!VerifyUser())
			{
				return;
			}
			foreach (Achievement achievement in m_Achievements)
			{
				if (achievement.id == id && achievement.percentCompleted <= progress)
				{
					if (progress >= 100.0)
					{
						achievement.SetCompleted(value: true);
					}
					achievement.SetHidden(value: false);
					achievement.SetLastReportedDate(DateTime.Now);
					achievement.percentCompleted = progress;
					callback?.Invoke(obj: true);
					return;
				}
			}
			foreach (AchievementDescription achievementDescription in m_AchievementDescriptions)
			{
				if (achievementDescription.id == id)
				{
					bool completed = progress >= 100.0;
					Achievement item = new Achievement(id, progress, completed, hidden: false, DateTime.Now);
					m_Achievements.Add(item);
					callback?.Invoke(obj: true);
					return;
				}
			}
			Debug.LogError((object)"Achievement ID not found");
			callback?.Invoke(obj: false);
		}

		public void LoadAchievementDescriptions(Action<IAchievementDescription[]> callback)
		{
			if (VerifyUser())
			{
				callback?.Invoke(m_AchievementDescriptions.ToArray());
			}
		}

		public void LoadAchievements(Action<IAchievement[]> callback)
		{
			if (VerifyUser())
			{
				callback?.Invoke(m_Achievements.ToArray());
			}
		}

		public void ReportScore(long score, string board, Action<bool> callback)
		{
			if (!VerifyUser())
			{
				return;
			}
			foreach (Leaderboard leaderboard in m_Leaderboards)
			{
				if (leaderboard.id == board)
				{
					List<Score> list = new List<Score>((Score[])leaderboard.scores);
					list.Add(new Score(board, score, localUser.id, DateTime.Now, score + " points", 0));
					leaderboard.SetScores(list.ToArray());
					callback?.Invoke(obj: true);
					return;
				}
			}
			Debug.LogError((object)"Leaderboard not found");
			callback?.Invoke(obj: false);
		}

		public void LoadScores(string leaderboardID, Action<IScore[]> callback)
		{
			if (!VerifyUser())
			{
				return;
			}
			foreach (Leaderboard leaderboard in m_Leaderboards)
			{
				if (leaderboard.id == leaderboardID)
				{
					SortScores(leaderboard);
					callback?.Invoke(leaderboard.scores);
					return;
				}
			}
			Debug.LogError((object)"Leaderboard not found");
			callback?.Invoke(new Score[0]);
		}

		void ISocialPlatform.LoadScores(ILeaderboard board, Action<bool> callback)
		{
			if (!VerifyUser())
			{
				return;
			}
			Leaderboard leaderboard = (Leaderboard)board;
			foreach (Leaderboard leaderboard2 in m_Leaderboards)
			{
				if (leaderboard2.id == leaderboard.id)
				{
					leaderboard.SetTitle(leaderboard2.title);
					leaderboard.SetScores(leaderboard2.scores);
					leaderboard.SetMaxRange((uint)leaderboard2.scores.Length);
				}
			}
			SortScores(leaderboard);
			SetLocalPlayerScore(leaderboard);
			callback?.Invoke(obj: true);
		}

		bool ISocialPlatform.GetLoading(ILeaderboard board)
		{
			if (!VerifyUser())
			{
				return false;
			}
			return ((Leaderboard)board).loading;
		}

		private void SortScores(Leaderboard board)
		{
			List<Score> list = new List<Score>((Score[])board.scores);
			list.Sort((Score s1, Score s2) => s2.value.CompareTo(s1.value));
			for (int i = 0; i < list.Count; i++)
			{
				list[i].SetRank(i + 1);
			}
		}

		private void SetLocalPlayerScore(Leaderboard board)
		{
			IScore[] scores = board.scores;
			for (int i = 0; i < scores.Length; i++)
			{
				Score score = (Score)scores[i];
				if (score.userID == localUser.id)
				{
					board.SetLocalUserScore(score);
					break;
				}
			}
		}

		public void ShowAchievementsUI()
		{
			Debug.Log((object)"ShowAchievementsUI not implemented");
		}

		public void ShowLeaderboardUI()
		{
			Debug.Log((object)"ShowLeaderboardUI not implemented");
		}

		public ILeaderboard CreateLeaderboard()
		{
			return new Leaderboard();
		}

		public IAchievement CreateAchievement()
		{
			return new Achievement();
		}

		private bool VerifyUser()
		{
			if (!localUser.authenticated)
			{
				Debug.LogError((object)"Must authenticate first");
				return false;
			}
			return true;
		}

		private void PopulateStaticData()
		{
			m_Friends.Add(new UserProfile("Fred", "1001", friend: true, UserState.Online, m_DefaultTexture));
			m_Friends.Add(new UserProfile("Julia", "1002", friend: true, UserState.Online, m_DefaultTexture));
			m_Friends.Add(new UserProfile("Jeff", "1003", friend: true, UserState.Online, m_DefaultTexture));
			m_Users.Add(new UserProfile("Sam", "1004", friend: false, UserState.Offline, m_DefaultTexture));
			m_Users.Add(new UserProfile("Max", "1005", friend: false, UserState.Offline, m_DefaultTexture));
			m_AchievementDescriptions.Add(new AchievementDescription("Achievement01", "First achievement", m_DefaultTexture, "Get first achievement", "Received first achievement", hidden: false, 10));
			m_AchievementDescriptions.Add(new AchievementDescription("Achievement02", "Second achievement", m_DefaultTexture, "Get second achievement", "Received second achievement", hidden: false, 20));
			m_AchievementDescriptions.Add(new AchievementDescription("Achievement03", "Third achievement", m_DefaultTexture, "Get third achievement", "Received third achievement", hidden: false, 15));
			Leaderboard leaderboard = new Leaderboard();
			leaderboard.SetTitle("High Scores");
			leaderboard.id = "Leaderboard01";
			List<Score> list = new List<Score>();
			list.Add(new Score("Leaderboard01", 300L, "1001", DateTime.Now.AddDays(-1.0), "300 points", 1));
			list.Add(new Score("Leaderboard01", 255L, "1002", DateTime.Now.AddDays(-1.0), "255 points", 2));
			list.Add(new Score("Leaderboard01", 55L, "1003", DateTime.Now.AddDays(-1.0), "55 points", 3));
			list.Add(new Score("Leaderboard01", 10L, "1004", DateTime.Now.AddDays(-1.0), "10 points", 4));
			leaderboard.SetScores(list.ToArray());
			m_Leaderboards.Add(leaderboard);
		}

		private Texture2D CreateDummyTexture(int width, int height)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			Texture2D val = new Texture2D(width, height);
			for (int i = 0; i < height; i++)
			{
				for (int j = 0; j < width; j++)
				{
					Color val2 = (((j & i) <= 0) ? Color.gray : Color.white);
					val.SetPixel(j, i, val2);
				}
			}
			val.Apply();
			return val;
		}
	}
}
namespace UnityEngine
{
	public static class Social
	{
		public static ISocialPlatform Active
		{
			get
			{
				return ActivePlatform.Instance;
			}
			set
			{
				ActivePlatform.Instance = value;
			}
		}

		public static ILocalUser localUser => Active.localUser;

		public static void LoadUsers(string[] userIDs, Action<IUserProfile[]> callback)
		{
			Active.LoadUsers(userIDs, callback);
		}

		public static void ReportProgress(string achievementID, double progress, Action<bool> callback)
		{
			Active.ReportProgress(achievementID, progress, callback);
		}

		public static void LoadAchievementDescriptions(Action<IAchievementDescription[]> callback)
		{
			Active.LoadAchievementDescriptions(callback);
		}

		public static void LoadAchievements(Action<IAchievement[]> callback)
		{
			Active.LoadAchievements(callback);
		}

		public static void ReportScore(long score, string board, Action<bool> callback)
		{
			Active.ReportScore(score, board, callback);
		}

		public static void LoadScores(string leaderboardID, Action<IScore[]> callback)
		{
			Active.LoadScores(leaderboardID, callback);
		}

		public static ILeaderboard CreateLeaderboard()
		{
			return Active.CreateLeaderboard();
		}

		public static IAchievement CreateAchievement()
		{
			return Active.CreateAchievement();
		}

		public static void ShowAchievementsUI()
		{
			Active.ShowAchievementsUI();
		}

		public static void ShowLeaderboardUI()
		{
			Active.ShowLeaderboardUI();
		}
	}
}
namespace UnityEngine.SocialPlatforms
{
	internal static class ActivePlatform
	{
		private static ISocialPlatform _active;

		internal static ISocialPlatform Instance
		{
			get
			{
				if (_active == null)
				{
					_active = SelectSocialPlatform();
				}
				return _active;
			}
			set
			{
				_active = value;
			}
		}

		private static ISocialPlatform SelectSocialPlatform()
		{
			return new Local();
		}
	}
	public interface ISocialPlatform
	{
		ILocalUser localUser { get; }

		void LoadUsers(string[] userIDs, Action<IUserProfile[]> callback);

		void ReportProgress(string achievementID, double progress, Action<bool> callback);

		void LoadAchievementDescriptions(Action<IAchievementDescription[]> callback);

		void LoadAchievements(Action<IAchievement[]> callback);

		IAchievement CreateAchievement();

		void ReportScore(long score, string board, Action<bool> callback);

		void LoadScores(string leaderboardID, Action<IScore[]> callback);

		ILeaderboard CreateLeaderboard();

		void ShowAchievementsUI();

		void ShowLeaderboardUI();

		void Authenticate(ILocalUser user, Action<bool> callback);

		void Authenticate(ILocalUser user, Action<bool, string> callback);

		void LoadFriends(ILocalUser user, Action<bool> callback);

		void LoadScores(ILeaderboard board, Action<bool> callback);

		bool GetLoading(ILeaderboard board);
	}
	public interface ILocalUser : IUserProfile
	{
		IUserProfile[] friends { get; }

		bool authenticated { get; }

		bool underage { get; }

		void Authenticate(Action<bool> callback);

		void Authenticate(Action<bool, string> callback);

		void LoadFriends(Action<bool> callback);
	}
	public enum UserState
	{
		Online,
		OnlineAndAway,
		OnlineAndBusy,
		Offline,
		Playing
	}
	public interface IUserProfile
	{
		string userName { get; }

		string id { get; }

		bool isFriend { get; }

		UserState state { get; }

		Texture2D image { get; }
	}
	public interface IAchievement
	{
		string id { get; set; }

		double percentCompleted { get; set; }

		bool completed { get; }

		bool hidden { get; }

		DateTime lastReportedDate { get; }

		void ReportProgress(Action<bool> callback);
	}
	public interface IAchievementDescription
	{
		string id { get; set; }

		string title { get; }

		Texture2D image { get; }

		string achievedDescription { get; }

		string unachievedDescription { get; }

		bool hidden { get; }

		int points { get; }
	}
	public interface IScore
	{
		string leaderboardID { get; set; }

		long value { get; set; }

		DateTime date { get; }

		string formattedValue { get; }

		string userID { get; }

		int rank { get; }

		void ReportScore(Action<bool> callback);
	}
	public enum UserScope
	{
		Global,
		FriendsOnly
	}
	public enum TimeScope
	{
		Today,
		Week,
		AllTime
	}
	public struct Range
	{
		public int from;

		public int count;

		public Range(int fromValue, int valueCount)
		{
			from = fromValue;
			count = valueCount;
		}
	}
	public interface ILeaderboard
	{
		bool loading { get; }

		string id { get; set; }

		UserScope userScope { get; set; }

		Range range { get; set; }

		TimeScope timeScope { get; set; }

		IScore localUserScore { get; }

		uint maxRange { get; }

		IScore[] scores { get; }

		string title { get; }

		void SetUserFilter(string[] userIDs);

		void LoadScores(Action<bool> callback);
	}
}

Room Architect Tool_Data/Managed/UnityEngine.GridModule.dll

Decompiled 3 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;
using UnityEngine.Scripting;

[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: UnityEngineModuleAssembly]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine;

[NativeHeader("Modules/Grid/Public/GridMarshalling.h")]
[RequireComponent(typeof(Transform))]
[NativeType(Header = "Modules/Grid/Public/Grid.h")]
public sealed class Grid : GridLayout
{
	public new Vector3 cellSize
	{
		[FreeFunction("GridBindings::GetCellSize", HasExplicitThis = true)]
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_cellSize_Injected(out var ret);
			return ret;
		}
		[FreeFunction("GridBindings::SetCellSize", HasExplicitThis = true)]
		set
		{
			set_cellSize_Injected(ref value);
		}
	}

	public new Vector3 cellGap
	{
		[FreeFunction("GridBindings::GetCellGap", HasExplicitThis = true)]
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_cellGap_Injected(out var ret);
			return ret;
		}
		[FreeFunction("GridBindings::SetCellGap", HasExplicitThis = true)]
		set
		{
			set_cellGap_Injected(ref value);
		}
	}

	public new extern CellLayout cellLayout
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public new extern CellSwizzle cellSwizzle
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public Vector3 GetCellCenterLocal(Vector3Int position)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: 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)
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		return CellToLocalInterpolated(Vector3Int.op_Implicit(position) + GetLayoutCellCenter());
	}

	public Vector3 GetCellCenterWorld(Vector3Int position)
	{
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		//IL_0004: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		return LocalToWorld(CellToLocalInterpolated(Vector3Int.op_Implicit(position) + GetLayoutCellCenter()));
	}

	[FreeFunction("GridBindings::CellSwizzle")]
	public static Vector3 Swizzle(CellSwizzle swizzle, Vector3 position)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		Swizzle_Injected(swizzle, ref position, out var ret);
		return ret;
	}

	[FreeFunction("GridBindings::InverseCellSwizzle")]
	public static Vector3 InverseSwizzle(CellSwizzle swizzle, Vector3 position)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		InverseSwizzle_Injected(swizzle, ref position, out var ret);
		return ret;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_cellSize_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_cellSize_Injected(ref Vector3 value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_cellGap_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_cellGap_Injected(ref Vector3 value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void Swizzle_Injected(CellSwizzle swizzle, ref Vector3 position, out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void InverseSwizzle_Injected(CellSwizzle swizzle, ref Vector3 position, out Vector3 ret);
}
[NativeHeader("Modules/Grid/Public/GridMarshalling.h")]
[NativeType(Header = "Modules/Grid/Public/Grid.h")]
[RequireComponent(typeof(Transform))]
public class GridLayout : Behaviour
{
	public enum CellLayout
	{
		Rectangle,
		Hexagon,
		Isometric,
		IsometricZAsY
	}

	public enum CellSwizzle
	{
		XYZ,
		XZY,
		YXZ,
		YZX,
		ZXY,
		ZYX
	}

	public Vector3 cellSize
	{
		[FreeFunction("GridLayoutBindings::GetCellSize", HasExplicitThis = true)]
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_cellSize_Injected(out var ret);
			return ret;
		}
	}

	public Vector3 cellGap
	{
		[FreeFunction("GridLayoutBindings::GetCellGap", HasExplicitThis = true)]
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_cellGap_Injected(out var ret);
			return ret;
		}
	}

	public extern CellLayout cellLayout
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	public extern CellSwizzle cellSwizzle
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	[FreeFunction("GridLayoutBindings::GetBoundsLocal", HasExplicitThis = true)]
	public Bounds GetBoundsLocal(Vector3Int cellPosition)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		GetBoundsLocal_Injected(ref cellPosition, out var ret);
		return ret;
	}

	public Bounds GetBoundsLocal(Vector3 origin, Vector3 size)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		//IL_0004: Unknown result type (might be due to invalid IL or missing references)
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		return GetBoundsLocalOriginSize(origin, size);
	}

	[FreeFunction("GridLayoutBindings::GetBoundsLocalOriginSize", HasExplicitThis = true)]
	private Bounds GetBoundsLocalOriginSize(Vector3 origin, Vector3 size)
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		GetBoundsLocalOriginSize_Injected(ref origin, ref size, out var ret);
		return ret;
	}

	[FreeFunction("GridLayoutBindings::CellToLocal", HasExplicitThis = true)]
	public Vector3 CellToLocal(Vector3Int cellPosition)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		CellToLocal_Injected(ref cellPosition, out var ret);
		return ret;
	}

	[FreeFunction("GridLayoutBindings::LocalToCell", HasExplicitThis = true)]
	public Vector3Int LocalToCell(Vector3 localPosition)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		LocalToCell_Injected(ref localPosition, out var ret);
		return ret;
	}

	[FreeFunction("GridLayoutBindings::CellToLocalInterpolated", HasExplicitThis = true)]
	public Vector3 CellToLocalInterpolated(Vector3 cellPosition)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		CellToLocalInterpolated_Injected(ref cellPosition, out var ret);
		return ret;
	}

	[FreeFunction("GridLayoutBindings::LocalToCellInterpolated", HasExplicitThis = true)]
	public Vector3 LocalToCellInterpolated(Vector3 localPosition)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		LocalToCellInterpolated_Injected(ref localPosition, out var ret);
		return ret;
	}

	[FreeFunction("GridLayoutBindings::CellToWorld", HasExplicitThis = true)]
	public Vector3 CellToWorld(Vector3Int cellPosition)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		CellToWorld_Injected(ref cellPosition, out var ret);
		return ret;
	}

	[FreeFunction("GridLayoutBindings::WorldToCell", HasExplicitThis = true)]
	public Vector3Int WorldToCell(Vector3 worldPosition)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		WorldToCell_Injected(ref worldPosition, out var ret);
		return ret;
	}

	[FreeFunction("GridLayoutBindings::LocalToWorld", HasExplicitThis = true)]
	public Vector3 LocalToWorld(Vector3 localPosition)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		LocalToWorld_Injected(ref localPosition, out var ret);
		return ret;
	}

	[FreeFunction("GridLayoutBindings::WorldToLocal", HasExplicitThis = true)]
	public Vector3 WorldToLocal(Vector3 worldPosition)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		WorldToLocal_Injected(ref worldPosition, out var ret);
		return ret;
	}

	[FreeFunction("GridLayoutBindings::GetLayoutCellCenter", HasExplicitThis = true)]
	public Vector3 GetLayoutCellCenter()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		GetLayoutCellCenter_Injected(out var ret);
		return ret;
	}

	[RequiredByNativeCode]
	private void DoNothing()
	{
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_cellSize_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_cellGap_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void GetBoundsLocal_Injected(ref Vector3Int cellPosition, out Bounds ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void GetBoundsLocalOriginSize_Injected(ref Vector3 origin, ref Vector3 size, out Bounds ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void CellToLocal_Injected(ref Vector3Int cellPosition, out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void LocalToCell_Injected(ref Vector3 localPosition, out Vector3Int ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void CellToLocalInterpolated_Injected(ref Vector3 cellPosition, out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void LocalToCellInterpolated_Injected(ref Vector3 localPosition, out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void CellToWorld_Injected(ref Vector3Int cellPosition, out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void WorldToCell_Injected(ref Vector3 worldPosition, out Vector3Int ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void LocalToWorld_Injected(ref Vector3 localPosition, out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void WorldToLocal_Injected(ref Vector3 worldPosition, out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void GetLayoutCellCenter_Injected(out Vector3 ret);
}

Room Architect Tool_Data/Managed/UnityEngine.HotReloadModule.dll

Decompiled 3 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;

[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]

Room Architect Tool_Data/Managed/UnityEngine.ImageConversionModule.dll

Decompiled 3 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;

[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: UnityEngineModuleAssembly]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine;

[NativeHeader("Modules/ImageConversion/ScriptBindings/ImageConversion.bindings.h")]
public static class ImageConversion
{
	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(Name = "ImageConversionBindings::EncodeToTGA", IsFreeFunction = true, ThrowsException = true)]
	public static extern byte[] EncodeToTGA(this Texture2D tex);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(Name = "ImageConversionBindings::EncodeToPNG", IsFreeFunction = true, ThrowsException = true)]
	public static extern byte[] EncodeToPNG(this Texture2D tex);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(Name = "ImageConversionBindings::EncodeToJPG", IsFreeFunction = true, ThrowsException = true)]
	public static extern byte[] EncodeToJPG(this Texture2D tex, int quality);

	public static byte[] EncodeToJPG(this Texture2D tex)
	{
		return tex.EncodeToJPG(75);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(Name = "ImageConversionBindings::EncodeToEXR", IsFreeFunction = true, ThrowsException = true)]
	public static extern byte[] EncodeToEXR(this Texture2D tex, EXRFlags flags);

	public static byte[] EncodeToEXR(this Texture2D tex)
	{
		return tex.EncodeToEXR((EXRFlags)0);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(Name = "ImageConversionBindings::LoadImage", IsFreeFunction = true)]
	public static extern bool LoadImage([NotNull] this Texture2D tex, byte[] data, bool markNonReadable);

	public static bool LoadImage(this Texture2D tex, byte[] data)
	{
		return tex.LoadImage(data, markNonReadable: false);
	}
}

Room Architect Tool_Data/Managed/UnityEngine.IMGUIModule.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;
using UnityEngine.Scripting;
using UnityEngineInternal;

[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine;

[StructLayout(LayoutKind.Sequential)]
[NativeHeader("Modules/IMGUI/Event.bindings.h")]
[StaticAccessor(/*Could not decode attribute arguments.*/)]
public sealed class Event
{
	[NonSerialized]
	internal IntPtr m_Ptr;

	private static Event s_Current;

	private static Event s_MasterEvent;

	[NativeProperty(/*Could not decode attribute arguments.*/)]
	public extern EventType rawType
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	[NativeProperty(/*Could not decode attribute arguments.*/)]
	public Vector2 mousePosition
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_mousePosition_Injected(out var ret);
			return ret;
		}
		set
		{
			set_mousePosition_Injected(ref value);
		}
	}

	[NativeProperty(/*Could not decode attribute arguments.*/)]
	public Vector2 delta
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_delta_Injected(out var ret);
			return ret;
		}
		set
		{
			set_delta_Injected(ref value);
		}
	}

	[NativeProperty(/*Could not decode attribute arguments.*/)]
	public extern int button
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[NativeProperty(/*Could not decode attribute arguments.*/)]
	public extern EventModifiers modifiers
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[NativeProperty(/*Could not decode attribute arguments.*/)]
	public extern float pressure
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[NativeProperty(/*Could not decode attribute arguments.*/)]
	public extern int clickCount
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[NativeProperty(/*Could not decode attribute arguments.*/)]
	public extern char character
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[NativeProperty(/*Could not decode attribute arguments.*/)]
	public extern KeyCode keyCode
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[NativeProperty(/*Could not decode attribute arguments.*/)]
	public extern int displayIndex
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern EventType type
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("GUIEvent::GetType", HasExplicitThis = true)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("GUIEvent::SetType", HasExplicitThis = true)]
		set;
	}

	public extern string commandName
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("GUIEvent::GetCommandName", HasExplicitThis = true)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("GUIEvent::SetCommandName", HasExplicitThis = true)]
		set;
	}

	[Obsolete("Use HandleUtility.GUIPointToWorldRay(Event.current.mousePosition);", true)]
	[EditorBrowsable(EditorBrowsableState.Never)]
	public Ray mouseRay
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			return new Ray(Vector3.up, Vector3.up);
		}
		set
		{
		}
	}

	public bool shift
	{
		get
		{
			return (modifiers & EventModifiers.Shift) != 0;
		}
		set
		{
			if (!value)
			{
				modifiers &= ~EventModifiers.Shift;
			}
			else
			{
				modifiers |= EventModifiers.Shift;
			}
		}
	}

	public bool control
	{
		get
		{
			return (modifiers & EventModifiers.Control) != 0;
		}
		set
		{
			if (!value)
			{
				modifiers &= ~EventModifiers.Control;
			}
			else
			{
				modifiers |= EventModifiers.Control;
			}
		}
	}

	public bool alt
	{
		get
		{
			return (modifiers & EventModifiers.Alt) != 0;
		}
		set
		{
			if (!value)
			{
				modifiers &= ~EventModifiers.Alt;
			}
			else
			{
				modifiers |= EventModifiers.Alt;
			}
		}
	}

	public bool command
	{
		get
		{
			return (modifiers & EventModifiers.Command) != 0;
		}
		set
		{
			if (!value)
			{
				modifiers &= ~EventModifiers.Command;
			}
			else
			{
				modifiers |= EventModifiers.Command;
			}
		}
	}

	public bool capsLock
	{
		get
		{
			return (modifiers & EventModifiers.CapsLock) != 0;
		}
		set
		{
			if (!value)
			{
				modifiers &= ~EventModifiers.CapsLock;
			}
			else
			{
				modifiers |= EventModifiers.CapsLock;
			}
		}
	}

	public bool numeric
	{
		get
		{
			return (modifiers & EventModifiers.Numeric) != 0;
		}
		set
		{
			if (!value)
			{
				modifiers &= ~EventModifiers.Numeric;
			}
			else
			{
				modifiers |= EventModifiers.Numeric;
			}
		}
	}

	public bool functionKey
	{
		[CompilerGenerated]
		get
		{
			return (modifiers & EventModifiers.FunctionKey) != 0;
		}
	}

	public static Event current
	{
		get
		{
			return s_Current;
		}
		set
		{
			s_Current = value ?? s_MasterEvent;
			Internal_SetNativeEvent(s_Current.m_Ptr);
		}
	}

	public bool isKey
	{
		get
		{
			EventType eventType = type;
			return eventType == EventType.KeyDown || eventType == EventType.KeyUp;
		}
	}

	public bool isMouse
	{
		get
		{
			EventType eventType = type;
			return eventType == EventType.MouseMove || eventType == EventType.MouseDown || eventType == EventType.MouseUp || eventType == EventType.MouseDrag || eventType == EventType.ContextClick || eventType == EventType.MouseEnterWindow || eventType == EventType.MouseLeaveWindow;
		}
	}

	public bool isScrollWheel
	{
		get
		{
			EventType eventType = type;
			return eventType == EventType.ScrollWheel;
		}
	}

	public Event()
	{
		m_Ptr = Internal_Create(0);
	}

	public Event(int displayIndex)
	{
		m_Ptr = Internal_Create(displayIndex);
	}

	public Event(Event other)
	{
		if (other == null)
		{
			throw new ArgumentException("Event to copy from is null.");
		}
		m_Ptr = Internal_Copy(other.m_Ptr);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod("Use")]
	private extern void Internal_Use();

	[MethodImpl(MethodImplOptions.InternalCall)]
	[FreeFunction("GUIEvent::Internal_Create", IsThreadSafe = true)]
	private static extern IntPtr Internal_Create(int displayIndex);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[FreeFunction("GUIEvent::Internal_Destroy", IsThreadSafe = true)]
	private static extern void Internal_Destroy(IntPtr ptr);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[FreeFunction("GUIEvent::Internal_Copy", IsThreadSafe = true)]
	private static extern IntPtr Internal_Copy(IntPtr otherPtr);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[FreeFunction("GUIEvent::GetTypeForControl", HasExplicitThis = true)]
	public extern EventType GetTypeForControl(int controlID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[FreeFunction("GUIEvent::CopyFromPtr", IsThreadSafe = true, HasExplicitThis = true)]
	[VisibleToOtherModules(new string[] { "UnityEngine.UIElementsModule" })]
	internal extern void CopyFromPtr(IntPtr ptr);

	[MethodImpl(MethodImplOptions.InternalCall)]
	public static extern bool PopEvent(Event outEvent);

	[MethodImpl(MethodImplOptions.InternalCall)]
	public static extern int GetEventCount();

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void Internal_SetNativeEvent(IntPtr ptr);

	[RequiredByNativeCode]
	internal static void Internal_MakeMasterEventCurrent(int displayIndex)
	{
		if (s_MasterEvent == null)
		{
			s_MasterEvent = new Event(displayIndex);
		}
		s_MasterEvent.displayIndex = displayIndex;
		s_Current = s_MasterEvent;
		Internal_SetNativeEvent(s_MasterEvent.m_Ptr);
	}

	~Event()
	{
		if (m_Ptr != IntPtr.Zero)
		{
			Internal_Destroy(m_Ptr);
			m_Ptr = IntPtr.Zero;
		}
	}

	internal static void CleanupRoots()
	{
		s_Current = null;
		s_MasterEvent = null;
	}

	[VisibleToOtherModules(new string[] { "UnityEngine.UIElementsModule" })]
	internal void CopyFrom(Event e)
	{
		if (e.m_Ptr != m_Ptr)
		{
			CopyFromPtr(e.m_Ptr);
		}
	}

	public static Event KeyboardEvent(string key)
	{
		//IL_0a1a: Unknown result type (might be due to invalid IL or missing references)
		Event @event = new Event(0);
		@event.type = EventType.KeyDown;
		Event event2 = @event;
		if (string.IsNullOrEmpty(key))
		{
			return event2;
		}
		int num = 0;
		bool flag = false;
		do
		{
			flag = true;
			if (num >= key.Length)
			{
				flag = false;
				break;
			}
			switch (key[num])
			{
			case '&':
				event2.modifiers |= EventModifiers.Alt;
				num++;
				break;
			case '^':
				event2.modifiers |= EventModifiers.Control;
				num++;
				break;
			case '%':
				event2.modifiers |= EventModifiers.Command;
				num++;
				break;
			case '#':
				event2.modifiers |= EventModifiers.Shift;
				num++;
				break;
			default:
				flag = false;
				break;
			}
		}
		while (flag);
		string text = key.Substring(num, key.Length - num).ToLowerInvariant();
		switch (text)
		{
		case "[0]":
			event2.character = '0';
			event2.keyCode = (KeyCode)256;
			break;
		case "[1]":
			event2.character = '1';
			event2.keyCode = (KeyCode)257;
			break;
		case "[2]":
			event2.character = '2';
			event2.keyCode = (KeyCode)258;
			break;
		case "[3]":
			event2.character = '3';
			event2.keyCode = (KeyCode)259;
			break;
		case "[4]":
			event2.character = '4';
			event2.keyCode = (KeyCode)260;
			break;
		case "[5]":
			event2.character = '5';
			event2.keyCode = (KeyCode)261;
			break;
		case "[6]":
			event2.character = '6';
			event2.keyCode = (KeyCode)262;
			break;
		case "[7]":
			event2.character = '7';
			event2.keyCode = (KeyCode)263;
			break;
		case "[8]":
			event2.character = '8';
			event2.keyCode = (KeyCode)264;
			break;
		case "[9]":
			event2.character = '9';
			event2.keyCode = (KeyCode)265;
			break;
		case "[.]":
			event2.character = '.';
			event2.keyCode = (KeyCode)266;
			break;
		case "[/]":
			event2.character = '/';
			event2.keyCode = (KeyCode)267;
			break;
		case "[-]":
			event2.character = '-';
			event2.keyCode = (KeyCode)269;
			break;
		case "[+]":
			event2.character = '+';
			event2.keyCode = (KeyCode)270;
			break;
		case "[=]":
			event2.character = '=';
			event2.keyCode = (KeyCode)272;
			break;
		case "[equals]":
			event2.character = '=';
			event2.keyCode = (KeyCode)272;
			break;
		case "[enter]":
			event2.character = '\n';
			event2.keyCode = (KeyCode)271;
			break;
		case "up":
			event2.keyCode = (KeyCode)273;
			event2.modifiers |= EventModifiers.FunctionKey;
			break;
		case "down":
			event2.keyCode = (KeyCode)274;
			event2.modifiers |= EventModifiers.FunctionKey;
			break;
		case "left":
			event2.keyCode = (KeyCode)276;
			event2.modifiers |= EventModifiers.FunctionKey;
			break;
		case "right":
			event2.keyCode = (KeyCode)275;
			event2.modifiers |= EventModifiers.FunctionKey;
			break;
		case "insert":
			event2.keyCode = (KeyCode)277;
			event2.modifiers |= EventModifiers.FunctionKey;
			break;
		case "home":
			event2.keyCode = (KeyCode)278;
			event2.modifiers |= EventModifiers.FunctionKey;
			break;
		case "end":
			event2.keyCode = (KeyCode)279;
			event2.modifiers |= EventModifiers.FunctionKey;
			break;
		case "pgup":
			event2.keyCode = (KeyCode)281;
			event2.modifiers |= EventModifiers.FunctionKey;
			break;
		case "page up":
			event2.keyCode = (KeyCode)280;
			event2.modifiers |= EventModifiers.FunctionKey;
			break;
		case "pgdown":
			event2.keyCode = (KeyCode)280;
			event2.modifiers |= EventModifiers.FunctionKey;
			break;
		case "page down":
			event2.keyCode = (KeyCode)281;
			event2.modifiers |= EventModifiers.FunctionKey;
			break;
		case "backspace":
			event2.keyCode = (KeyCode)8;
			event2.modifiers |= EventModifiers.FunctionKey;
			break;
		case "delete":
			event2.keyCode = (KeyCode)127;
			event2.modifiers |= EventModifiers.FunctionKey;
			break;
		case "tab":
			event2.keyCode = (KeyCode)9;
			break;
		case "f1":
			event2.keyCode = (KeyCode)282;
			event2.modifiers |= EventModifiers.FunctionKey;
			break;
		case "f2":
			event2.keyCode = (KeyCode)283;
			event2.modifiers |= EventModifiers.FunctionKey;
			break;
		case "f3":
			event2.keyCode = (KeyCode)284;
			event2.modifiers |= EventModifiers.FunctionKey;
			break;
		case "f4":
			event2.keyCode = (KeyCode)285;
			event2.modifiers |= EventModifiers.FunctionKey;
			break;
		case "f5":
			event2.keyCode = (KeyCode)286;
			event2.modifiers |= EventModifiers.FunctionKey;
			break;
		case "f6":
			event2.keyCode = (KeyCode)287;
			event2.modifiers |= EventModifiers.FunctionKey;
			break;
		case "f7":
			event2.keyCode = (KeyCode)288;
			event2.modifiers |= EventModifiers.FunctionKey;
			break;
		case "f8":
			event2.keyCode = (KeyCode)289;
			event2.modifiers |= EventModifiers.FunctionKey;
			break;
		case "f9":
			event2.keyCode = (KeyCode)290;
			event2.modifiers |= EventModifiers.FunctionKey;
			break;
		case "f10":
			event2.keyCode = (KeyCode)291;
			event2.modifiers |= EventModifiers.FunctionKey;
			break;
		case "f11":
			event2.keyCode = (KeyCode)292;
			event2.modifiers |= EventModifiers.FunctionKey;
			break;
		case "f12":
			event2.keyCode = (KeyCode)293;
			event2.modifiers |= EventModifiers.FunctionKey;
			break;
		case "f13":
			event2.keyCode = (KeyCode)294;
			event2.modifiers |= EventModifiers.FunctionKey;
			break;
		case "f14":
			event2.keyCode = (KeyCode)295;
			event2.modifiers |= EventModifiers.FunctionKey;
			break;
		case "f15":
			event2.keyCode = (KeyCode)296;
			event2.modifiers |= EventModifiers.FunctionKey;
			break;
		case "[esc]":
			event2.keyCode = (KeyCode)27;
			break;
		case "return":
			event2.character = '\n';
			event2.keyCode = (KeyCode)13;
			event2.modifiers &= ~EventModifiers.FunctionKey;
			break;
		case "space":
			event2.keyCode = (KeyCode)32;
			event2.character = ' ';
			event2.modifiers &= ~EventModifiers.FunctionKey;
			break;
		default:
			if (text.Length != 1)
			{
				try
				{
					event2.keyCode = (KeyCode)Enum.Parse(typeof(KeyCode), text, ignoreCase: true);
				}
				catch (ArgumentException)
				{
					Debug.LogError((object)UnityString.Format("Unable to find key name that matches '{0}'", new object[1] { text }));
				}
			}
			else
			{
				event2.character = text.ToLower()[0];
				event2.keyCode = (KeyCode)event2.character;
				if (event2.modifiers != 0)
				{
					event2.character = '\0';
				}
			}
			break;
		}
		return event2;
	}

	public override int GetHashCode()
	{
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		//IL_0027: Unknown result type (might be due to invalid IL or missing references)
		int num = 1;
		if (isKey)
		{
			num = (ushort)keyCode;
		}
		if (isMouse)
		{
			Vector2 val = mousePosition;
			num = ((object)(Vector2)(ref val)).GetHashCode();
		}
		return (num * 37) | (int)modifiers;
	}

	public override bool Equals(object obj)
	{
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0081: Unknown result type (might be due to invalid IL or missing references)
		//IL_009a: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
		if (obj == null)
		{
			return false;
		}
		if (object.ReferenceEquals(this, obj))
		{
			return true;
		}
		if ((object)obj.GetType() != GetType())
		{
			return false;
		}
		Event @event = (Event)obj;
		if (type != @event.type || (modifiers & ~EventModifiers.CapsLock) != (@event.modifiers & ~EventModifiers.CapsLock))
		{
			return false;
		}
		if (isKey)
		{
			return keyCode == @event.keyCode;
		}
		if (isMouse)
		{
			return mousePosition == @event.mousePosition;
		}
		return false;
	}

	public override string ToString()
	{
		//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		if (isKey)
		{
			if (character == '\0')
			{
				return UnityString.Format("Event:{0}   Character:\\0   Modifiers:{1}   KeyCode:{2}", new object[3] { type, modifiers, keyCode });
			}
			return string.Concat("Event:", type, "   Character:", (int)character, "   Modifiers:", modifiers, "   KeyCode:", keyCode);
		}
		if (isMouse)
		{
			return UnityString.Format("Event: {0}   Position: {1} Modifiers: {2}", new object[3] { type, mousePosition, modifiers });
		}
		if (type == EventType.ExecuteCommand || type == EventType.ValidateCommand)
		{
			return UnityString.Format("Event: {0}  \"{1}\"", new object[2] { type, commandName });
		}
		return "" + type;
	}

	public void Use()
	{
		if (type == EventType.Repaint || type == EventType.Layout)
		{
			Debug.LogWarning((object)UnityString.Format("Event.Use() should not be called for events of type {0}", new object[1] { type }));
		}
		Internal_Use();
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_mousePosition_Injected(out Vector2 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_mousePosition_Injected(ref Vector2 value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_delta_Injected(out Vector2 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_delta_Injected(ref Vector2 value);
}
internal static class EventCommandNames
{
	public const string Cut = "Cut";

	public const string Copy = "Copy";

	public const string Paste = "Paste";

	public const string SelectAll = "SelectAll";

	public const string DeselectAll = "DeselectAll";

	public const string InvertSelection = "InvertSelection";

	public const string Duplicate = "Duplicate";

	public const string Delete = "Delete";

	public const string SoftDelete = "SoftDelete";

	public const string Find = "Find";

	public const string SelectChildren = "SelectChildren";

	public const string SelectPrefabRoot = "SelectPrefabRoot";

	public const string UndoRedoPerformed = "UndoRedoPerformed";

	public const string OnLostFocus = "OnLostFocus";

	public const string NewKeyboardFocus = "NewKeyboardFocus";

	public const string ModifierKeysChanged = "ModifierKeysChanged";

	public const string EyeDropperUpdate = "EyeDropperUpdate";

	public const string EyeDropperClicked = "EyeDropperClicked";

	public const string EyeDropperCancelled = "EyeDropperCancelled";

	public const string ColorPickerChanged = "ColorPickerChanged";

	public const string FrameSelected = "FrameSelected";

	public const string FrameSelectedWithLock = "FrameSelectedWithLock";
}
public enum EventType
{
	MouseDown = 0,
	MouseUp = 1,
	MouseMove = 2,
	MouseDrag = 3,
	KeyDown = 4,
	KeyUp = 5,
	ScrollWheel = 6,
	Repaint = 7,
	Layout = 8,
	DragUpdated = 9,
	DragPerform = 10,
	DragExited = 15,
	Ignore = 11,
	Used = 12,
	ValidateCommand = 13,
	ExecuteCommand = 14,
	ContextClick = 16,
	MouseEnterWindow = 20,
	MouseLeaveWindow = 21,
	[Obsolete("Use MouseDown instead (UnityUpgradable) -> MouseDown", true)]
	[EditorBrowsable(EditorBrowsableState.Never)]
	mouseDown = 0,
	[EditorBrowsable(EditorBrowsableState.Never)]
	[Obsolete("Use MouseUp instead (UnityUpgradable) -> MouseUp", true)]
	mouseUp = 1,
	[Obsolete("Use MouseMove instead (UnityUpgradable) -> MouseMove", true)]
	[EditorBrowsable(EditorBrowsableState.Never)]
	mouseMove = 2,
	[EditorBrowsable(EditorBrowsableState.Never)]
	[Obsolete("Use MouseDrag instead (UnityUpgradable) -> MouseDrag", true)]
	mouseDrag = 3,
	[EditorBrowsable(EditorBrowsableState.Never)]
	[Obsolete("Use KeyDown instead (UnityUpgradable) -> KeyDown", true)]
	keyDown = 4,
	[EditorBrowsable(EditorBrowsableState.Never)]
	[Obsolete("Use KeyUp instead (UnityUpgradable) -> KeyUp", true)]
	keyUp = 5,
	[EditorBrowsable(EditorBrowsableState.Never)]
	[Obsolete("Use ScrollWheel instead (UnityUpgradable) -> ScrollWheel", true)]
	scrollWheel = 6,
	[EditorBrowsable(EditorBrowsableState.Never)]
	[Obsolete("Use Repaint instead (UnityUpgradable) -> Repaint", true)]
	repaint = 7,
	[EditorBrowsable(EditorBrowsableState.Never)]
	[Obsolete("Use Layout instead (UnityUpgradable) -> Layout", true)]
	layout = 8,
	[EditorBrowsable(EditorBrowsableState.Never)]
	[Obsolete("Use DragUpdated instead (UnityUpgradable) -> DragUpdated", true)]
	dragUpdated = 9,
	[Obsolete("Use DragPerform instead (UnityUpgradable) -> DragPerform", true)]
	[EditorBrowsable(EditorBrowsableState.Never)]
	dragPerform = 10,
	[Obsolete("Use Ignore instead (UnityUpgradable) -> Ignore", true)]
	[EditorBrowsable(EditorBrowsableState.Never)]
	ignore = 11,
	[EditorBrowsable(EditorBrowsableState.Never)]
	[Obsolete("Use Used instead (UnityUpgradable) -> Used", true)]
	used = 12
}
[Flags]
public enum EventModifiers
{
	None = 0,
	Shift = 1,
	Control = 2,
	Alt = 4,
	Command = 8,
	Numeric = 0x10,
	CapsLock = 0x20,
	FunctionKey = 0x40
}
[VisibleToOtherModules(new string[] { "UnityEngine.UIElementsModule" })]
internal struct EventInterests
{
	public bool wantsMouseMove { get; set; }

	public bool wantsMouseEnterLeaveWindow { get; set; }

	public bool WantsEvent(EventType type)
	{
		switch (type)
		{
		case EventType.MouseMove:
			return wantsMouseMove;
		case EventType.MouseEnterWindow:
		case EventType.MouseLeaveWindow:
			return wantsMouseEnterLeaveWindow;
		default:
			return true;
		}
	}
}
[NativeHeader("Modules/IMGUI/GUI.bindings.h")]
[NativeHeader("Modules/IMGUI/GUISkin.bindings.h")]
public class GUI
{
	public enum ToolbarButtonSize
	{
		Fixed,
		FitToContents
	}

	public delegate void WindowFunction(int id);

	public abstract class Scope : IDisposable
	{
		private bool m_Disposed;

		protected abstract void CloseScope();

		~Scope()
		{
			if (!m_Disposed)
			{
				Debug.LogError((object)"Scope was not disposed! You should use the 'using' keyword or manually call Dispose.");
			}
		}

		public void Dispose()
		{
			if (!m_Disposed)
			{
				m_Disposed = true;
				if (!GUIUtility.guiIsExiting)
				{
					CloseScope();
				}
			}
		}
	}

	public class GroupScope : Scope
	{
		public GroupScope(Rect position)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			BeginGroup(position);
		}

		public GroupScope(Rect position, string text)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			BeginGroup(position, text);
		}

		public GroupScope(Rect position, Texture image)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			BeginGroup(position, image);
		}

		public GroupScope(Rect position, GUIContent content)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			BeginGroup(position, content);
		}

		public GroupScope(Rect position, GUIStyle style)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			BeginGroup(position, style);
		}

		public GroupScope(Rect position, string text, GUIStyle style)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			BeginGroup(position, text, style);
		}

		public GroupScope(Rect position, Texture image, GUIStyle style)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			BeginGroup(position, image, style);
		}

		protected override void CloseScope()
		{
			EndGroup();
		}
	}

	public class ScrollViewScope : Scope
	{
		public Vector2 scrollPosition { get; private set; }

		public bool handleScrollWheel { get; set; }

		public ScrollViewScope(Rect position, Vector2 scrollPosition, Rect viewRect)
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			handleScrollWheel = true;
			this.scrollPosition = BeginScrollView(position, scrollPosition, viewRect);
		}

		public ScrollViewScope(Rect position, Vector2 scrollPosition, Rect viewRect, bool alwaysShowHorizontal, bool alwaysShowVertical)
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			handleScrollWheel = true;
			this.scrollPosition = BeginScrollView(position, scrollPosition, viewRect, alwaysShowHorizontal, alwaysShowVertical);
		}

		public ScrollViewScope(Rect position, Vector2 scrollPosition, Rect viewRect, GUIStyle horizontalScrollbar, GUIStyle verticalScrollbar)
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			handleScrollWheel = true;
			this.scrollPosition = BeginScrollView(position, scrollPosition, viewRect, horizontalScrollbar, verticalScrollbar);
		}

		public ScrollViewScope(Rect position, Vector2 scrollPosition, Rect viewRect, bool alwaysShowHorizontal, bool alwaysShowVertical, GUIStyle horizontalScrollbar, GUIStyle verticalScrollbar)
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			handleScrollWheel = true;
			this.scrollPosition = BeginScrollView(position, scrollPosition, viewRect, alwaysShowHorizontal, alwaysShowVertical, horizontalScrollbar, verticalScrollbar);
		}

		internal ScrollViewScope(Rect position, Vector2 scrollPosition, Rect viewRect, bool alwaysShowHorizontal, bool alwaysShowVertical, GUIStyle horizontalScrollbar, GUIStyle verticalScrollbar, GUIStyle background)
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			handleScrollWheel = true;
			this.scrollPosition = BeginScrollView(position, scrollPosition, viewRect, alwaysShowHorizontal, alwaysShowVertical, horizontalScrollbar, verticalScrollbar, background);
		}

		protected override void CloseScope()
		{
			EndScrollView(handleScrollWheel);
		}
	}

	public class ClipScope : Scope
	{
		public ClipScope(Rect position)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			BeginClip(position);
		}

		internal ClipScope(Rect position, Vector2 scrollOffset)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			BeginClip(position, scrollOffset, default(Vector2), resetOffset: false);
		}

		protected override void CloseScope()
		{
			EndClip();
		}
	}

	internal struct ColorScope : IDisposable
	{
		private bool m_Disposed;

		private Color m_PreviousColor;

		public ColorScope(Color newColor)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			m_Disposed = false;
			m_PreviousColor = color;
			color = newColor;
		}

		public ColorScope(float r, float g, float b, float a = 1f)
			: this(new Color(r, g, b, a))
		{
		}//IL_0006: Unknown result type (might be due to invalid IL or missing references)


		public void Dispose()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			if (!m_Disposed)
			{
				m_Disposed = true;
				color = m_PreviousColor;
			}
		}
	}

	internal struct BackgroundColorScope : IDisposable
	{
		private bool m_Disposed;

		private Color m_PreviousColor;

		public BackgroundColorScope(Color newColor)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			m_Disposed = false;
			m_PreviousColor = backgroundColor;
			backgroundColor = newColor;
		}

		public BackgroundColorScope(float r, float g, float b, float a = 1f)
			: this(new Color(r, g, b, a))
		{
		}//IL_0006: Unknown result type (might be due to invalid IL or missing references)


		public void Dispose()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			if (!m_Disposed)
			{
				m_Disposed = true;
				backgroundColor = m_PreviousColor;
			}
		}
	}

	private const float s_ScrollStepSize = 10f;

	private static int s_ScrollControlId;

	private static int s_HotTextField;

	private static readonly int s_BoxHash;

	private static readonly int s_ButonHash;

	private static readonly int s_RepeatButtonHash;

	private static readonly int s_ToggleHash;

	private static readonly int s_ButtonGridHash;

	private static readonly int s_SliderHash;

	private static readonly int s_BeginGroupHash;

	private static readonly int s_ScrollviewHash;

	private static GUISkin s_Skin;

	internal static Rect s_ToolTipRect;

	public static Color color
	{
		get
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			get_color_Injected(out var ret);
			return ret;
		}
		set
		{
			set_color_Injected(ref value);
		}
	}

	public static Color backgroundColor
	{
		get
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			get_backgroundColor_Injected(out var ret);
			return ret;
		}
		set
		{
			set_backgroundColor_Injected(ref value);
		}
	}

	public static Color contentColor
	{
		get
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			get_contentColor_Injected(out var ret);
			return ret;
		}
		set
		{
			set_contentColor_Injected(ref value);
		}
	}

	public static extern bool changed
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public static extern bool enabled
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public static extern int depth
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	internal static extern bool usePageScrollbars
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	internal static extern Material blendMaterial
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("GetGUIBlendMaterial")]
		get;
	}

	internal static extern Material blitMaterial
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("GetGUIBlitMaterial")]
		get;
	}

	internal static extern Material roundedRectMaterial
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("GetGUIRoundedRectMaterial")]
		get;
	}

	internal static int scrollTroughSide { get; set; }

	internal static DateTime nextScrollStepTime { get; set; }

	public static GUISkin skin
	{
		get
		{
			GUIUtility.CheckOnGUI();
			return s_Skin;
		}
		set
		{
			GUIUtility.CheckOnGUI();
			DoSetSkin(value);
		}
	}

	public static Matrix4x4 matrix
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			return GUIClip.GetMatrix();
		}
		set
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			GUIClip.SetMatrix(value);
		}
	}

	public static string tooltip
	{
		get
		{
			string text = Internal_GetTooltip();
			if (text != null)
			{
				return text;
			}
			return "";
		}
		set
		{
			Internal_SetTooltip(value);
		}
	}

	protected static string mouseTooltip
	{
		[CompilerGenerated]
		get
		{
			return Internal_GetMouseTooltip();
		}
	}

	protected static Rect tooltipRect
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			return s_ToolTipRect;
		}
		set
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			s_ToolTipRect = value;
		}
	}

	internal static GenericStack scrollViewStates { get; set; }

	static GUI()
	{
		//IL_007e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0088: Expected O, but got Unknown
		s_HotTextField = -1;
		s_BoxHash = "Box".GetHashCode();
		s_ButonHash = "Button".GetHashCode();
		s_RepeatButtonHash = "repeatButton".GetHashCode();
		s_ToggleHash = "Toggle".GetHashCode();
		s_ButtonGridHash = "ButtonGrid".GetHashCode();
		s_SliderHash = "Slider".GetHashCode();
		s_BeginGroupHash = "BeginGroup".GetHashCode();
		s_ScrollviewHash = "scrollView".GetHashCode();
		scrollViewStates = new GenericStack();
		nextScrollStepTime = DateTime.Now;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	internal static extern void GrabMouseControl(int id);

	[MethodImpl(MethodImplOptions.InternalCall)]
	internal static extern bool HasMouseControl(int id);

	[MethodImpl(MethodImplOptions.InternalCall)]
	internal static extern void ReleaseMouseControl();

	[MethodImpl(MethodImplOptions.InternalCall)]
	[FreeFunction("GetGUIState().SetNameOfNextControl")]
	public static extern void SetNextControlName(string name);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[FreeFunction("GetGUIState().GetNameOfFocusedControl")]
	public static extern string GetNameOfFocusedControl();

	[MethodImpl(MethodImplOptions.InternalCall)]
	[FreeFunction("GetGUIState().FocusKeyboardControl")]
	public static extern void FocusControl(string name);

	[MethodImpl(MethodImplOptions.InternalCall)]
	internal static extern void InternalRepaintEditorWindow();

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern string Internal_GetTooltip();

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void Internal_SetTooltip(string value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern string Internal_GetMouseTooltip();

	private static Rect Internal_DoModalWindow(int id, int instanceID, Rect clientRect, WindowFunction func, GUIContent content, GUIStyle style, object skin)
	{
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		Internal_DoModalWindow_Injected(id, instanceID, ref clientRect, func, content, style, skin, out var ret);
		return ret;
	}

	private static Rect Internal_DoWindow(int id, int instanceID, Rect clientRect, WindowFunction func, GUIContent title, GUIStyle style, object skin, bool forceRectOnLayout)
	{
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		Internal_DoWindow_Injected(id, instanceID, ref clientRect, func, title, style, skin, forceRectOnLayout, out var ret);
		return ret;
	}

	public static void DragWindow(Rect position)
	{
		DragWindow_Injected(ref position);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	public static extern void BringWindowToFront(int windowID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	public static extern void BringWindowToBack(int windowID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	public static extern void FocusWindow(int windowID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	public static extern void UnfocusWindow();

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void Internal_BeginWindows();

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void Internal_EndWindows();

	[MethodImpl(MethodImplOptions.InternalCall)]
	internal static extern string Internal_Concatenate(GUIContent first, GUIContent second);

	internal static void DoSetSkin(GUISkin newSkin)
	{
		if (!Object.op_Implicit((Object)(object)newSkin))
		{
			newSkin = GUIUtility.GetDefaultSkin();
		}
		s_Skin = newSkin;
		newSkin.MakeCurrent();
	}

	internal static void CleanupRoots()
	{
		s_Skin = null;
		GUIUtility.CleanupRoots();
		GUILayoutUtility.CleanupRoots();
		GUISkin.CleanupRoots();
		GUIStyle.CleanupRoots();
	}

	public static void Label(Rect position, string text)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		Label(position, GUIContent.Temp(text), s_Skin.label);
	}

	public static void Label(Rect position, Texture image)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		Label(position, GUIContent.Temp(image), s_Skin.label);
	}

	public static void Label(Rect position, GUIContent content)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		Label(position, content, s_Skin.label);
	}

	public static void Label(Rect position, string text, GUIStyle style)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		Label(position, GUIContent.Temp(text), style);
	}

	public static void Label(Rect position, Texture image, GUIStyle style)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		Label(position, GUIContent.Temp(image), style);
	}

	public static void Label(Rect position, GUIContent content, GUIStyle style)
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		GUIUtility.CheckOnGUI();
		DoLabel(position, content, style);
	}

	public static void DrawTexture(Rect position, Texture image)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		DrawTexture(position, image, ScaleMode.StretchToFill);
	}

	public static void DrawTexture(Rect position, Texture image, ScaleMode scaleMode)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		DrawTexture(position, image, scaleMode, alphaBlend: true);
	}

	public static void DrawTexture(Rect position, Texture image, ScaleMode scaleMode, bool alphaBlend)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		DrawTexture(position, image, scaleMode, alphaBlend, 0f);
	}

	public static void DrawTexture(Rect position, Texture image, ScaleMode scaleMode, bool alphaBlend, float imageAspect)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		DrawTexture(position, image, scaleMode, alphaBlend, imageAspect, color, 0f, 0f);
	}

	public static void DrawTexture(Rect position, Texture image, ScaleMode scaleMode, bool alphaBlend, float imageAspect, Color color, float borderWidth, float borderRadius)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		Vector4 borderWidths = Vector4.one * borderWidth;
		DrawTexture(position, image, scaleMode, alphaBlend, imageAspect, color, borderWidths, borderRadius);
	}

	public static void DrawTexture(Rect position, Texture image, ScaleMode scaleMode, bool alphaBlend, float imageAspect, Color color, Vector4 borderWidths, float borderRadius)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		//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)
		Vector4 borderRadiuses = Vector4.one * borderRadius;
		DrawTexture(position, image, scaleMode, alphaBlend, imageAspect, color, borderWidths, borderRadiuses);
	}

	public static void DrawTexture(Rect position, Texture image, ScaleMode scaleMode, bool alphaBlend, float imageAspect, Color color, Vector4 borderWidths, Vector4 borderRadiuses)
	{
		//IL_0052: Unknown result type (might be due to invalid IL or missing references)
		//IL_0054: Unknown result type (might be due to invalid IL or missing references)
		//IL_0063: Unknown result type (might be due to invalid IL or missing references)
		//IL_0065: Unknown result type (might be due to invalid IL or missing references)
		//IL_009b: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
		GUIUtility.CheckOnGUI();
		if (Event.current.type != EventType.Repaint)
		{
			return;
		}
		if ((Object)(object)image == (Object)null)
		{
			Debug.LogWarning((object)"null texture passed to GUI.DrawTexture");
			return;
		}
		if (imageAspect == 0f)
		{
			imageAspect = (float)image.width / (float)image.height;
		}
		Material val = null;
		val = ((!(borderWidths != Vector4.zero) && !(borderRadiuses != Vector4.zero)) ? ((!alphaBlend) ? blitMaterial : blendMaterial) : roundedRectMaterial);
		Internal_DrawTextureArguments val2 = default(Internal_DrawTextureArguments);
		val2.leftBorder = 0;
		val2.rightBorder = 0;
		val2.topBorder = 0;
		val2.bottomBorder = 0;
		val2.color = color;
		val2.borderWidths = borderWidths;
		val2.cornerRadiuses = borderRadiuses;
		val2.texture = image;
		val2.mat = val;
		Internal_DrawTextureArguments val3 = val2;
		CalculateScaledTextureRects(position, scaleMode, imageAspect, ref val3.screenRect, ref val3.sourceRect);
		Graphics.Internal_DrawTexture(ref val3);
	}

	internal static bool CalculateScaledTextureRects(Rect position, ScaleMode scaleMode, float imageAspect, ref Rect outScreenRect, ref Rect outSourceRect)
	{
		//IL_002d: Unknown result type (might be due to invalid IL or missing references)
		//IL_002e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0095: Unknown result type (might be due to invalid IL or missing references)
		//IL_0096: Unknown result type (might be due to invalid IL or missing references)
		//IL_0062: Unknown result type (might be due to invalid IL or missing references)
		//IL_0063: Unknown result type (might be due to invalid IL or missing references)
		float num = ((Rect)(ref position)).width / ((Rect)(ref position)).height;
		bool result = false;
		switch (scaleMode)
		{
		case ScaleMode.StretchToFill:
			outScreenRect = position;
			((Rect)(ref outSourceRect))..ctor(0f, 0f, 1f, 1f);
			result = true;
			break;
		case ScaleMode.ScaleAndCrop:
			if (num > imageAspect)
			{
				float num4 = imageAspect / num;
				outScreenRect = position;
				((Rect)(ref outSourceRect))..ctor(0f, (1f - num4) * 0.5f, 1f, num4);
				result = true;
			}
			else
			{
				float num5 = num / imageAspect;
				outScreenRect = position;
				((Rect)(ref outSourceRect))..ctor(0.5f - num5 * 0.5f, 0f, num5, 1f);
				result = true;
			}
			break;
		case ScaleMode.ScaleToFit:
			if (num > imageAspect)
			{
				float num2 = imageAspect / num;
				((Rect)(ref outScreenRect))..ctor(((Rect)(ref position)).xMin + ((Rect)(ref position)).width * (1f - num2) * 0.5f, ((Rect)(ref position)).yMin, num2 * ((Rect)(ref position)).width, ((Rect)(ref position)).height);
				((Rect)(ref outSourceRect))..ctor(0f, 0f, 1f, 1f);
				result = true;
			}
			else
			{
				float num3 = num / imageAspect;
				((Rect)(ref outScreenRect))..ctor(((Rect)(ref position)).xMin, ((Rect)(ref position)).yMin + ((Rect)(ref position)).height * (1f - num3) * 0.5f, ((Rect)(ref position)).width, num3 * ((Rect)(ref position)).height);
				((Rect)(ref outSourceRect))..ctor(0f, 0f, 1f, 1f);
				result = true;
			}
			break;
		}
		return result;
	}

	public static void DrawTextureWithTexCoords(Rect position, Texture image, Rect texCoords)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		DrawTextureWithTexCoords(position, image, texCoords, alphaBlend: true);
	}

	public static void DrawTextureWithTexCoords(Rect position, Texture image, Rect texCoords, bool alphaBlend)
	{
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0067: Unknown result type (might be due to invalid IL or missing references)
		//IL_006c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0073: Unknown result type (might be due to invalid IL or missing references)
		//IL_0074: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		//IL_007c: Unknown result type (might be due to invalid IL or missing references)
		GUIUtility.CheckOnGUI();
		if (Event.current.type == EventType.Repaint)
		{
			Material mat = ((!alphaBlend) ? blitMaterial : blendMaterial);
			Internal_DrawTextureArguments val = default(Internal_DrawTextureArguments);
			val.texture = image;
			val.mat = mat;
			val.leftBorder = 0;
			val.rightBorder = 0;
			val.topBorder = 0;
			val.bottomBorder = 0;
			val.color = color;
			val.screenRect = position;
			val.sourceRect = texCoords;
			Graphics.Internal_DrawTexture(ref val);
		}
	}

	public static void Box(Rect position, string text)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		Box(position, GUIContent.Temp(text), s_Skin.box);
	}

	public static void Box(Rect position, Texture image)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		Box(position, GUIContent.Temp(image), s_Skin.box);
	}

	public static void Box(Rect position, GUIContent content)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		Box(position, content, s_Skin.box);
	}

	public static void Box(Rect position, string text, GUIStyle style)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		Box(position, GUIContent.Temp(text), style);
	}

	public static void Box(Rect position, Texture image, GUIStyle style)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		Box(position, GUIContent.Temp(image), style);
	}

	public static void Box(Rect position, GUIContent content, GUIStyle style)
	{
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		GUIUtility.CheckOnGUI();
		int controlID = GUIUtility.GetControlID(s_BoxHash, FocusType.Passive);
		if (Event.current.type == EventType.Repaint)
		{
			style.Draw(position, content, controlID);
		}
	}

	public static bool Button(Rect position, string text)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return Button(position, GUIContent.Temp(text), s_Skin.button);
	}

	public static bool Button(Rect position, Texture image)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return Button(position, GUIContent.Temp(image), s_Skin.button);
	}

	public static bool Button(Rect position, GUIContent content)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return Button(position, content, s_Skin.button);
	}

	public static bool Button(Rect position, string text, GUIStyle style)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return Button(position, GUIContent.Temp(text), style);
	}

	public static bool Button(Rect position, Texture image, GUIStyle style)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return Button(position, GUIContent.Temp(image), style);
	}

	public static bool Button(Rect position, GUIContent content, GUIStyle style)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		int controlID = GUIUtility.GetControlID(s_ButonHash, FocusType.Passive, position);
		return Button(position, controlID, content, style);
	}

	internal static bool Button(Rect position, int id, GUIContent content, GUIStyle style)
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		GUIUtility.CheckOnGUI();
		return DoButton(position, id, content, style);
	}

	public static bool RepeatButton(Rect position, string text)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return DoRepeatButton(position, GUIContent.Temp(text), s_Skin.button, FocusType.Passive);
	}

	public static bool RepeatButton(Rect position, Texture image)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return DoRepeatButton(position, GUIContent.Temp(image), s_Skin.button, FocusType.Passive);
	}

	public static bool RepeatButton(Rect position, GUIContent content)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return DoRepeatButton(position, content, s_Skin.button, FocusType.Passive);
	}

	public static bool RepeatButton(Rect position, string text, GUIStyle style)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return DoRepeatButton(position, GUIContent.Temp(text), style, FocusType.Passive);
	}

	public static bool RepeatButton(Rect position, Texture image, GUIStyle style)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return DoRepeatButton(position, GUIContent.Temp(image), style, FocusType.Passive);
	}

	public static bool RepeatButton(Rect position, GUIContent content, GUIStyle style)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return DoRepeatButton(position, content, style, FocusType.Passive);
	}

	private static bool DoRepeatButton(Rect position, GUIContent content, GUIStyle style, FocusType focusType)
	{
		//IL_000c: 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)
		//IL_008a: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
		GUIUtility.CheckOnGUI();
		int controlID = GUIUtility.GetControlID(s_RepeatButtonHash, focusType, position);
		switch (Event.current.GetTypeForControl(controlID))
		{
		case EventType.MouseDown:
			if (((Rect)(ref position)).Contains(Event.current.mousePosition))
			{
				GUIUtility.hotControl = controlID;
				Event.current.Use();
			}
			return false;
		case EventType.MouseUp:
			if (GUIUtility.hotControl == controlID)
			{
				GUIUtility.hotControl = 0;
				Event.current.Use();
				return ((Rect)(ref position)).Contains(Event.current.mousePosition);
			}
			return false;
		case EventType.Repaint:
			style.Draw(position, content, controlID, on: false, ((Rect)(ref position)).Contains(Event.current.mousePosition));
			return controlID == GUIUtility.hotControl && ((Rect)(ref position)).Contains(Event.current.mousePosition);
		default:
			return false;
		}
	}

	public static string TextField(Rect position, string text)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		GUIContent gUIContent = GUIContent.Temp(text);
		DoTextField(position, GUIUtility.GetControlID(FocusType.Keyboard, position), gUIContent, multiline: false, -1, skin.textField);
		return gUIContent.text;
	}

	public static string TextField(Rect position, string text, int maxLength)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		GUIContent gUIContent = GUIContent.Temp(text);
		DoTextField(position, GUIUtility.GetControlID(FocusType.Keyboard, position), gUIContent, multiline: false, maxLength, skin.textField);
		return gUIContent.text;
	}

	public static string TextField(Rect position, string text, GUIStyle style)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		GUIContent gUIContent = GUIContent.Temp(text);
		DoTextField(position, GUIUtility.GetControlID(FocusType.Keyboard, position), gUIContent, multiline: false, -1, style);
		return gUIContent.text;
	}

	public static string TextField(Rect position, string text, int maxLength, GUIStyle style)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		GUIContent gUIContent = GUIContent.Temp(text);
		DoTextField(position, GUIUtility.GetControlID(FocusType.Keyboard, position), gUIContent, multiline: false, maxLength, style);
		return gUIContent.text;
	}

	public static string PasswordField(Rect position, string password, char maskChar)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return PasswordField(position, password, maskChar, -1, skin.textField);
	}

	public static string PasswordField(Rect position, string password, char maskChar, int maxLength)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return PasswordField(position, password, maskChar, maxLength, skin.textField);
	}

	public static string PasswordField(Rect position, string password, char maskChar, GUIStyle style)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return PasswordField(position, password, maskChar, -1, style);
	}

	public static string PasswordField(Rect position, string password, char maskChar, int maxLength, GUIStyle style)
	{
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		//IL_0045: Unknown result type (might be due to invalid IL or missing references)
		//IL_002b: Unknown result type (might be due to invalid IL or missing references)
		GUIUtility.CheckOnGUI();
		string t = PasswordFieldGetStrToShow(password, maskChar);
		GUIContent gUIContent = GUIContent.Temp(t);
		bool flag = changed;
		changed = false;
		if (TouchScreenKeyboard.isSupported)
		{
			DoTextField(position, GUIUtility.GetControlID(FocusType.Keyboard), gUIContent, multiline: false, maxLength, style, password, maskChar);
		}
		else
		{
			DoTextField(position, GUIUtility.GetControlID(FocusType.Keyboard, position), gUIContent, multiline: false, maxLength, style);
		}
		t = ((!changed) ? password : gUIContent.text);
		changed |= flag;
		return t;
	}

	internal static string PasswordFieldGetStrToShow(string password, char maskChar)
	{
		return (Event.current.type != EventType.Repaint && Event.current.type != 0) ? password : "".PadRight(password.Length, maskChar);
	}

	public static string TextArea(Rect position, string text)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		GUIContent gUIContent = GUIContent.Temp(text);
		DoTextField(position, GUIUtility.GetControlID(FocusType.Keyboard, position), gUIContent, multiline: true, -1, skin.textArea);
		return gUIContent.text;
	}

	public static string TextArea(Rect position, string text, int maxLength)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		GUIContent gUIContent = GUIContent.Temp(text);
		DoTextField(position, GUIUtility.GetControlID(FocusType.Keyboard, position), gUIContent, multiline: true, maxLength, skin.textArea);
		return gUIContent.text;
	}

	public static string TextArea(Rect position, string text, GUIStyle style)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		GUIContent gUIContent = GUIContent.Temp(text);
		DoTextField(position, GUIUtility.GetControlID(FocusType.Keyboard, position), gUIContent, multiline: true, -1, style);
		return gUIContent.text;
	}

	public static string TextArea(Rect position, string text, int maxLength, GUIStyle style)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		GUIContent gUIContent = GUIContent.Temp(text);
		DoTextField(position, GUIUtility.GetControlID(FocusType.Keyboard, position), gUIContent, multiline: true, maxLength, style);
		return gUIContent.text;
	}

	internal static void DoTextField(Rect position, int id, GUIContent content, bool multiline, int maxLength, GUIStyle style)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		DoTextField(position, id, content, multiline, maxLength, style, null);
	}

	internal static void DoTextField(Rect position, int id, GUIContent content, bool multiline, int maxLength, GUIStyle style, string secureText)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		DoTextField(position, id, content, multiline, maxLength, style, secureText, '\0');
	}

	internal static void DoTextField(Rect position, int id, GUIContent content, bool multiline, int maxLength, GUIStyle style, string secureText, char maskChar)
	{
		//IL_005d: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
		//IL_008a: Unknown result type (might be due to invalid IL or missing references)
		GUIUtility.CheckOnGUI();
		if (maxLength >= 0 && content.text.Length > maxLength)
		{
			content.text = content.text.Substring(0, maxLength);
		}
		TextEditor textEditor = (TextEditor)GUIUtility.GetStateObject(typeof(TextEditor), id);
		textEditor.text = content.text;
		textEditor.SaveBackup();
		textEditor.position = position;
		textEditor.style = style;
		textEditor.multiline = multiline;
		textEditor.controlID = id;
		textEditor.DetectFocusChange();
		if (TouchScreenKeyboard.isSupported)
		{
			HandleTextFieldEventForTouchscreen(position, id, content, multiline, maxLength, style, secureText, maskChar, textEditor);
		}
		else
		{
			HandleTextFieldEventForDesktop(position, id, content, multiline, maxLength, style, textEditor);
		}
		textEditor.UpdateScrollOffsetIfNeeded(Event.current);
	}

	private static void HandleTextFieldEventForTouchscreen(Rect position, int id, GUIContent content, bool multiline, int maxLength, GUIStyle style, string secureText, char maskChar, TextEditor editor)
	{
		//IL_0023: Unknown result type (might be due to invalid IL or missing references)
		//IL_0148: Unknown result type (might be due to invalid IL or missing references)
		//IL_010f: Unknown result type (might be due to invalid IL or missing references)
		Event current = Event.current;
		switch (current.type)
		{
		case EventType.MouseDown:
			if (((Rect)(ref position)).Contains(current.mousePosition))
			{
				GUIUtility.hotControl = id;
				if (s_HotTextField != -1 && s_HotTextField != id)
				{
					TextEditor textEditor = (TextEditor)GUIUtility.GetStateObject(typeof(TextEditor), s_HotTextField);
					textEditor.keyboardOnScreen = null;
				}
				s_HotTextField = id;
				if (GUIUtility.keyboardControl != id)
				{
					GUIUtility.keyboardControl = id;
				}
				editor.keyboardOnScreen = TouchScreenKeyboard.Open(secureText ?? content.text, (TouchScreenKeyboardType)0, true, multiline, secureText != null);
				current.Use();
			}
			break;
		case EventType.Repaint:
		{
			if (editor.keyboardOnScreen != null)
			{
				content.text = editor.keyboardOnScreen.text;
				if (maxLength >= 0 && content.text.Length > maxLength)
				{
					content.text = content.text.Substring(0, maxLength);
				}
				if ((int)editor.keyboardOnScreen.status != 0)
				{
					editor.keyboardOnScreen = null;
					changed = true;
				}
			}
			string text = content.text;
			if (secureText != null)
			{
				content.text = PasswordFieldGetStrToShow(text, maskChar);
			}
			style.Draw(position, content, id, on: false);
			content.text = text;
			break;
		}
		}
	}

	private static void HandleTextFieldEventForDesktop(Rect position, int id, GUIContent content, bool multiline, int maxLength, GUIStyle style, TextEditor editor)
	{
		//IL_003e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0069: Unknown result type (might be due to invalid IL or missing references)
		//IL_026c: Unknown result type (might be due to invalid IL or missing references)
		//IL_012d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0117: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a9: Invalid comparison between Unknown and I4
		Event current = Event.current;
		bool flag = false;
		switch (current.type)
		{
		case EventType.MouseDown:
			if (((Rect)(ref position)).Contains(current.mousePosition))
			{
				GUIUtility.hotControl = id;
				GUIUtility.keyboardControl = id;
				editor.m_HasFocus = true;
				editor.MoveCursorToPosition(Event.current.mousePosition);
				if (Event.current.clickCount == 2 && skin.settings.doubleClickSelectsWord)
				{
					editor.SelectCurrentWord();
					editor.DblClickSnap(TextEditor.DblClickSnapping.WORDS);
					editor.MouseDragSelectsWholeWords(on: true);
				}
				if (Event.current.clickCount == 3 && skin.settings.tripleClickSelectsLine)
				{
					editor.SelectCurrentParagraph();
					editor.MouseDragSelectsWholeWords(on: true);
					editor.DblClickSnap(TextEditor.DblClickSnapping.PARAGRAPHS);
				}
				current.Use();
			}
			break;
		case EventType.MouseDrag:
			if (GUIUtility.hotControl == id)
			{
				if (current.shift)
				{
					editor.MoveCursorToPosition(Event.current.mousePosition);
				}
				else
				{
					editor.SelectToPosition(Event.current.mousePosition);
				}
				current.Use();
			}
			break;
		case EventType.MouseUp:
			if (GUIUtility.hotControl == id)
			{
				editor.MouseDragSelectsWholeWords(on: false);
				GUIUtility.hotControl = 0;
				current.Use();
			}
			break;
		case EventType.KeyDown:
		{
			if (GUIUtility.keyboardControl != id)
			{
				return;
			}
			if (editor.HandleKeyEvent(current))
			{
				current.Use();
				flag = true;
				content.text = editor.text;
				break;
			}
			if ((int)current.keyCode == 9 || current.character == '\t')
			{
				return;
			}
			char character = current.character;
			if (character == '\n' && !multiline && !current.alt)
			{
				return;
			}
			Font font = style.font;
			if (!Object.op_Implicit((Object)(object)font))
			{
				font = skin.font;
			}
			if (font.HasCharacter(character) || character == '\n')
			{
				editor.Insert(character);
				flag = true;
			}
			else if (character == '\0')
			{
				if (GUIUtility.compositionString.Length > 0)
				{
					editor.ReplaceSelection("");
					flag = true;
				}
				current.Use();
			}
			break;
		}
		case EventType.Repaint:
			if (GUIUtility.keyboardControl != id)
			{
				style.Draw(position, content, id, on: false);
			}
			else
			{
				editor.DrawCursor(content.text);
			}
			break;
		}
		if (GUIUtility.keyboardControl == id)
		{
			GUIUtility.textFieldInput = true;
		}
		if (flag)
		{
			changed = true;
			content.text = editor.text;
			if (maxLength >= 0 && content.text.Length > maxLength)
			{
				content.text = content.text.Substring(0, maxLength);
			}
			current.Use();
		}
	}

	public static bool Toggle(Rect position, bool value, string text)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return Toggle(position, value, GUIContent.Temp(text), s_Skin.toggle);
	}

	public static bool Toggle(Rect position, bool value, Texture image)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return Toggle(position, value, GUIContent.Temp(image), s_Skin.toggle);
	}

	public static bool Toggle(Rect position, bool value, GUIContent content)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return Toggle(position, value, content, s_Skin.toggle);
	}

	public static bool Toggle(Rect position, bool value, string text, GUIStyle style)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return Toggle(position, value, GUIContent.Temp(text), style);
	}

	public static bool Toggle(Rect position, bool value, Texture image, GUIStyle style)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return Toggle(position, value, GUIContent.Temp(image), style);
	}

	public static bool Toggle(Rect position, bool value, GUIContent content, GUIStyle style)
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		GUIUtility.CheckOnGUI();
		return DoToggle(position, GUIUtility.GetControlID(s_ToggleHash, FocusType.Passive, position), value, content, style);
	}

	public static bool Toggle(Rect position, int id, bool value, GUIContent content, GUIStyle style)
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		GUIUtility.CheckOnGUI();
		return DoToggle(position, id, value, content, style);
	}

	public static int Toolbar(Rect position, int selected, string[] texts)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return Toolbar(position, selected, GUIContent.Temp(texts), s_Skin.button);
	}

	public static int Toolbar(Rect position, int selected, Texture[] images)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return Toolbar(position, selected, GUIContent.Temp(images), s_Skin.button);
	}

	public static int Toolbar(Rect position, int selected, GUIContent[] contents)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return Toolbar(position, selected, contents, s_Skin.button);
	}

	public static int Toolbar(Rect position, int selected, string[] texts, GUIStyle style)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return Toolbar(position, selected, GUIContent.Temp(texts), style);
	}

	public static int Toolbar(Rect position, int selected, Texture[] images, GUIStyle style)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return Toolbar(position, selected, GUIContent.Temp(images), style);
	}

	public static int Toolbar(Rect position, int selected, GUIContent[] contents, GUIStyle style)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return Toolbar(position, selected, contents, null, style, ToolbarButtonSize.Fixed);
	}

	public static int Toolbar(Rect position, int selected, GUIContent[] contents, GUIStyle style, ToolbarButtonSize buttonSize)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return Toolbar(position, selected, contents, null, style, buttonSize);
	}

	internal static int Toolbar(Rect position, int selected, GUIContent[] contents, string[] controlNames, GUIStyle style, ToolbarButtonSize buttonSize, bool[] contentsEnabled = null)
	{
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		GUIUtility.CheckOnGUI();
		FindStyles(ref style, out var firstStyle, out var midStyle, out var lastStyle, "left", "mid", "right");
		return DoButtonGrid(position, selected, contents, controlNames, contents.Length, style, firstStyle, midStyle, lastStyle, buttonSize, contentsEnabled);
	}

	public static int SelectionGrid(Rect position, int selected, string[] texts, int xCount)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return SelectionGrid(position, selected, GUIContent.Temp(texts), xCount, null);
	}

	public static int SelectionGrid(Rect position, int selected, Texture[] images, int xCount)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return SelectionGrid(position, selected, GUIContent.Temp(images), xCount, null);
	}

	public static int SelectionGrid(Rect position, int selected, GUIContent[] content, int xCount)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return SelectionGrid(position, selected, content, xCount, null);
	}

	public static int SelectionGrid(Rect position, int selected, string[] texts, int xCount, GUIStyle style)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return SelectionGrid(position, selected, GUIContent.Temp(texts), xCount, style);
	}

	public static int SelectionGrid(Rect position, int selected, Texture[] images, int xCount, GUIStyle style)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return SelectionGrid(position, selected, GUIContent.Temp(images), xCount, style);
	}

	public static int SelectionGrid(Rect position, int selected, GUIContent[] contents, int xCount, GUIStyle style)
	{
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		if (style == null)
		{
			style = s_Skin.button;
		}
		return DoButtonGrid(position, selected, contents, null, xCount, style, style, style, style, ToolbarButtonSize.Fixed);
	}

	internal static void FindStyles(ref GUIStyle style, out GUIStyle firstStyle, out GUIStyle midStyle, out GUIStyle lastStyle, string first, string mid, string last)
	{
		if (style == null)
		{
			style = skin.button;
		}
		string name = style.name;
		midStyle = skin.FindStyle(name + mid) ?? style;
		firstStyle = skin.FindStyle(name + first) ?? midStyle;
		lastStyle = skin.FindStyle(name + last) ?? midStyle;
	}

	internal static int CalcTotalHorizSpacing(int xCount, GUIStyle style, GUIStyle firstStyle, GUIStyle midStyle, GUIStyle lastStyle)
	{
		if (xCount < 2)
		{
			return 0;
		}
		if (xCount == 2)
		{
			return Mathf.Max(firstStyle.margin.right, lastStyle.margin.left);
		}
		int num = Mathf.Max(midStyle.margin.left, midStyle.margin.right);
		return Mathf.Max(firstStyle.margin.right, midStyle.margin.left) + Mathf.Max(midStyle.margin.right, lastStyle.margin.left) + num * (xCount - 3);
	}

	private static bool DoControl(Rect position, int id, bool on, bool hover, GUIContent content, GUIStyle style)
	{
		//IL_004e: Unknown result type (might be due to invalid IL or missing references)
		//IL_003b: Unknown result type (might be due to invalid IL or missing references)
		//IL_010c: Unknown result type (might be due to invalid IL or missing references)
		//IL_009c: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a3: Invalid comparison between Unknown and I4
		//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b0: Invalid comparison between Unknown and I4
		//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c0: Invalid comparison between Unknown and I4
		Event current = Event.current;
		switch (current.type)
		{
		case EventType.Repaint:
			style.Draw(position, content, id, on, hover);
			break;
		case EventType.MouseDown:
			if (((Rect)(ref position)).Contains(current.mousePosition))
			{
				GrabMouseControl(id);
				current.Use();
			}
			break;
		case EventType.KeyDown:
		{
			bool flag = current.alt || current.shift || current.command || current.control;
			if (((int)current.keyCode == 32 || (int)current.keyCode == 13 || (int)current.keyCode == 271) && !flag && GUIUtility.keyboardControl == id)
			{
				current.Use();
				changed = true;
				return !on;
			}
			break;
		}
		case EventType.MouseUp:
			if (HasMouseControl(id))
			{
				ReleaseMouseControl();
				current.Use();
				if (((Rect)(ref position)).Contains(current.mousePosition))
				{
					changed = true;
					return !on;
				}
			}
			break;
		case EventType.MouseDrag:
			if (HasMouseControl(id))
			{
				current.Use();
			}
			break;
		}
		return on;
	}

	private static void DoLabel(Rect position, GUIContent content, GUIStyle style)
	{
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_0037: Unknown result type (might be due to invalid IL or missing references)
		//IL_0046: Unknown result type (might be due to invalid IL or missing references)
		//IL_004b: 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)
		//IL_0064: Unknown result type (might be due to invalid IL or missing references)
		Event current = Event.current;
		if (current.type != EventType.Repaint)
		{
			return;
		}
		style.Draw(position, content, isHover: false, isActive: false, on: false, hasKeyboardFocus: false);
		if (!string.IsNullOrEmpty(content.tooltip) && ((Rect)(ref position)).Contains(current.mousePosition))
		{
			Rect visibleRect = GUIClip.visibleRect;
			if (((Rect)(ref visibleRect)).Contains(current.mousePosition))
			{
				GUIStyle.SetMouseTooltip(content.tooltip, position);
			}
		}
	}

	internal static bool DoToggle(Rect position, int id, bool value, GUIContent content, GUIStyle style)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		return DoControl(position, id, value, ((Rect)(ref position)).Contains(Event.current.mousePosition), content, style);
	}

	internal static bool DoButton(Rect position, int id, GUIContent content, GUIStyle style)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		return DoControl(position, id, on: false, ((Rect)(ref position)).Contains(Event.current.mousePosition), content, style);
	}

	private static int DoButtonGrid(Rect position, int selected, GUIContent[] contents, string[] controlNames, int xCount, GUIStyle style, GUIStyle firstStyle, GUIStyle midStyle, GUIStyle lastStyle, ToolbarButtonSize buttonSize, bool[] contentsEnabled = null)
	{
		//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_032b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0330: Unknown result type (might be due to invalid IL or missing references)
		//IL_033e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0139: Unknown result type (might be due to invalid IL or missing references)
		//IL_013e: Unknown result type (might be due to invalid IL or missing references)
		//IL_015b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0377: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_025b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0282: Unknown result type (might be due to invalid IL or missing references)
		//IL_02f8: Unknown result type (might be due to invalid IL or missing references)
		GUIUtility.CheckOnGUI();
		int num = contents.Length;
		if (num == 0)
		{
			return selected;
		}
		if (xCount <= 0)
		{
			Debug.LogWarning((object)"You are trying to create a SelectionGrid with zero or less elements to be displayed in the horizontal direction. Set xCount to a positive value.");
			return selected;
		}
		if (contentsEnabled != null && contentsEnabled.Length != num)
		{
			throw new ArgumentException("contentsEnabled");
		}
		int num2 = num / xCount;
		if (num % xCount != 0)
		{
			num2++;
		}
		float num3 = CalcTotalHorizSpacing(xCount, style, firstStyle, midStyle, lastStyle);
		float num4 = Mathf.Max(style.margin.top, style.margin.bottom) * (num2 - 1);
		float elemWidth = (((Rect)(ref position)).width - num3) / (float)xCount;
		float elemHeight = (((Rect)(ref position)).height - num4) / (float)num2;
		if (style.fixedWidth != 0f)
		{
			elemWidth = style.fixedWidth;
		}
		if (style.fixedHeight != 0f)
		{
			elemHeight = style.fixedHeight;
		}
		Rect[] array = CalcMouseRects(position, contents, xCount, elemWidth, elemHeight, style, firstStyle, midStyle, lastStyle, addBorders: false, buttonSize);
		GUIStyle gUIStyle = null;
		int num5 = 0;
		for (int i = 0; i < num; i++)
		{
			bool flag = enabled;
			enabled &= contentsEnabled == null || contentsEnabled[i];
			Rect val = array[i];
			GUIContent gUIContent = contents[i];
			if (controlNames != null)
			{
				SetNextControlName(controlNames[i]);
			}
			int controlID = GUIUtility.GetControlID(s_ButtonGridHash, FocusType.Passive, val);
			if (i == selected)
			{
				num5 = controlID;
			}
			switch (Event.current.GetTypeForControl(controlID))
			{
			case EventType.MouseDown:
				if (((Rect)(ref val)).Contains(Event.current.mousePosition))
				{
					GUIUtility.hotControl = controlID;
					Event.current.Use();
				}
				break;
			case EventType.MouseDrag:
				if (GUIUtility.hotControl == controlID)
				{
					Event.current.Use();
				}
				break;
			case EventType.MouseUp:
				if (GUIUtility.hotControl == controlID)
				{
					GUIUtility.hotControl = 0;
					Event.current.Use();
					changed = true;
					return i;
				}
				break;
			case EventType.Repaint:
			{
				GUIStyle gUIStyle2 = ((num == 1) ? style : ((i == 0) ? firstStyle : ((i != num - 1) ? midStyle : lastStyle)));
				bool flag2 = ((Rect)(ref val)).Contains(Event.current.mousePosition);
				bool flag3 = GUIUtility.hotControl == controlID;
				if (selected != i)
				{
					gUIStyle2.Draw(val, gUIContent, flag2 && (enabled || flag3) && (flag3 || GUIUtility.hotControl == 0), enabled && flag3, on: false, hasKeyboardFocus: false);
				}
				else
				{
					gUIStyle = gUIStyle2;
				}
				if (flag2)
				{
					GUIUtility.mouseUsed = true;
					if (!string.IsNullOrEmpty(gUIContent.tooltip))
					{
						GUIStyle.SetMouseTooltip(gUIContent.tooltip, val);
					}
				}
				break;
			}
			}
			enabled = flag;
		}
		if (gUIStyle != null)
		{
			Rect position2 = array[selected];
			GUIContent content = contents[selected];
			bool flag4 = ((Rect)(ref position2)).Contains(Event.current.mousePosition);
			bool flag5 = GUIUtility.hotControl == num5;
			bool flag6 = enabled;
			enabled &= contentsEnabled == null || contentsEnabled[selected];
			gUIStyle.Draw(position2, content, flag4 && (enabled || flag5) && (flag5 || GUIUtility.hotControl == 0), enabled && flag5, on: true, hasKeyboardFocus: false);
			enabled = flag6;
		}
		return selected;
	}

	private static Rect[] CalcMouseRects(Rect position, GUIContent[] contents, int xCount, float elemWidth, float elemHeight, GUIStyle style, GUIStyle firstStyle, GUIStyle midStyle, GUIStyle lastStyle, bool addBorders, ToolbarButtonSize buttonSize)
	{
		//IL_0060: Unknown result type (might be due to invalid IL or missing references)
		//IL_0065: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
		//IL_008b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0090: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00db: Unknown result type (might be due to invalid IL or missing references)
		int num = contents.Length;
		int num2 = 0;
		float num3 = ((Rect)(ref position)).xMin;
		float num4 = ((Rect)(ref position)).yMin;
		GUIStyle gUIStyle = style;
		Rect[] array = (Rect[])(object)new Rect[num];
		if (num > 1)
		{
			gUIStyle = firstStyle;
		}
		for (int i = 0; i < num; i++)
		{
			float num5 = 0f;
			switch (buttonSize)
			{
			case ToolbarButtonSize.Fixed:
				num5 = elemWidth;
				break;
			case ToolbarButtonSize.FitToContents:
				num5 = gUIStyle.CalcSize(contents[i]).x;
				break;
			}
			if (!addBorders)
			{
				ref Rect reference = ref array[i];
				reference = new Rect(num3, num4, num5, elemHeight);
			}
			else
			{
				ref Rect reference2 = ref array[i];
				reference2 = gUIStyle.margin.Add(new Rect(num3, num4, num5, elemHeight));
			}
			ref Rect reference3 = ref array[i];
			reference3 = GUIUtility.AlignRectToDevice(array[i]);
			GUIStyle gUIStyle2 = midStyle;
			if (i == num - 2 || i == xCount - 2)
			{
				gUIStyle2 = lastStyle;
			}
			num3 = ((Rect)(ref array[i])).xMax + (float)Mathf.Max(gUIStyle.margin.right, gUIStyle2.margin.left);
			num2++;
			if (num2 >= xCount)
			{
				num2 = 0;
				num4 += elemHeight + (float)Mathf.Max(style.margin.top, style.margin.bottom);
				num3 = ((Rect)(ref position)).xMin;
				gUIStyle2 = firstStyle;
			}
			gUIStyle = gUIStyle2;
		}
		return array;
	}

	public static float HorizontalSlider(Rect position, float value, float leftValue, float rightValue)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return Slider(position, value, 0f, leftValue, rightValue, skin.horizontalSlider, skin.horizontalSliderThumb, horiz: true, 0);
	}

	public static float HorizontalSlider(Rect position, float value, float leftValue, float rightValue, GUIStyle slider, GUIStyle thumb)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return Slider(position, value, 0f, leftValue, rightValue, slider, thumb, horiz: true, 0);
	}

	public static float VerticalSlider(Rect position, float value, float topValue, float bottomValue)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return Slider(position, value, 0f, topValue, bottomValue, skin.verticalSlider, skin.verticalSliderThumb, horiz: false, 0);
	}

	public static float VerticalSlider(Rect position, float value, float topValue, float bottomValue, GUIStyle slider, GUIStyle thumb)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return Slider(position, value, 0f, topValue, bottomValue, slider, thumb, horiz: false, 0);
	}

	public static float Slider(Rect position, float value, float size, float start, float end, GUIStyle slider, GUIStyle thumb, bool horiz, int id)
	{
		//IL_001f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		GUIUtility.CheckOnGUI();
		if (id == 0)
		{
			id = GUIUtility.GetControlID(s_SliderHash, FocusType.Passive, position);
		}
		return new SliderHandler(position, value, size, start, end, slider, thumb, horiz, id).Handle();
	}

	public static float HorizontalScrollbar(Rect position, float value, float size, float leftValue, float rightValue)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return Scroller(position, value, size, leftValue, rightValue, skin.horizontalScrollbar, skin.horizontalScrollbarThumb, skin.horizontalScrollbarLeftButton, skin.horizontalScrollbarRightButton, horiz: true);
	}

	public static float HorizontalScrollbar(Rect position, float value, float size, float leftValue, float rightValue, GUIStyle style)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return Scroller(position, value, size, leftValue, rightValue, style, skin.GetStyle(style.name + "thumb"), skin.GetStyle(style.name + "leftbutton"), skin.GetStyle(style.name + "rightbutton"), horiz: true);
	}

	internal static bool ScrollerRepeatButton(int scrollerID, Rect rect, GUIStyle style)
	{
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		bool result = false;
		if (DoRepeatButton(rect, GUIContent.none, style, FocusType.Passive))
		{
			bool flag = s_ScrollControlId != scrollerID;
			s_ScrollControlId = scrollerID;
			if (flag)
			{
				result = true;
				nextScrollStepTime = DateTime.Now.AddMilliseconds(250.0);
			}
			else if (DateTime.Now >= nextScrollStepTime)
			{
				result = true;
				nextScrollStepTime = DateTime.Now.AddMilliseconds(30.0);
			}
			if (Event.current.type == EventType.Repaint)
			{
				InternalRepaintEditorWindow();
			}
		}
		return result;
	}

	public static float VerticalScrollbar(Rect position, float value, float size, float topValue, float bottomValue)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return Scroller(position, value, size, topValue, bottomValue, skin.verticalScrollbar, skin.verticalScrollbarThumb, skin.verticalScrollbarUpButton, skin.verticalScrollbarDownButton, horiz: false);
	}

	public static float VerticalScrollbar(Rect position, float value, float size, float topValue, float bottomValue, GUIStyle style)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return Scroller(position, value, size, topValue, bottomValue, style, skin.GetStyle(style.name + "thumb"), skin.GetStyle(style.name + "upbutton"), skin.GetStyle(style.name + "downbutton"), horiz: false);
	}

	internal static float Scroller(Rect position, float value, float size, float leftValue, float rightValue, GUIStyle slider, GUIStyle thumb, GUIStyle leftButton, GUIStyle rightButton, bool horiz)
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0135: Unknown result type (might be due to invalid IL or missing references)
		//IL_0159: Unknown result type (might be due to invalid IL or missing references)
		//IL_0188: Unknown result type (might be due to invalid IL or missing references)
		GUIUtility.CheckOnGUI();
		int controlID = GUIUtility.GetControlID(s_SliderHash, FocusType.Passive, position);
		Rect position2 = default(Rect);
		Rect rect = default(Rect);
		Rect rect2 = default(Rect);
		if (horiz)
		{
			((Rect)(ref position2))..ctor(((Rect)(ref position)).x + leftButton.fixedWidth, ((Rect)(ref position)).y, ((Rect)(ref position)).width - leftButton.fixedWidth - rightButton.fixedWidth, ((Rect)(ref position)).height);
			((Rect)(ref rect))..ctor(((Rect)(ref position)).x, ((Rect)(ref position)).y, leftButton.fixedWidth, ((Rect)(ref position)).height);
			((Rect)(ref rect2))..ctor(((Rect)(ref position)).xMax - rightButton.fixedWidth, ((Rect)(ref position)).y, rightButton.fixedWidth, ((Rect)(ref position)).height);
		}
		else
		{
			((Rect)(ref position2))..ctor(((Rect)(ref position)).x, ((Rect)(ref position)).y + leftButton.fixedHeight, ((Rect)(ref position)).width, ((Rect)(ref position)).height - leftButton.fixedHeight - rightButton.fixedHeight);
			((Rect)(ref rect))..ctor(((Rect)(ref position)).x, ((Rect)(ref position)).y, ((Rect)(ref position)).width, leftButton.fixedHeight);
			((Rect)(ref rect2))..ctor(((Rect)(ref position)).x, ((Rect)(ref position)).yMax - rightButton.fixedHeight, ((Rect)(ref position)).width, rightButton.fixedHeight);
		}
		value = Slider(position2, value, size, leftValue, rightValue, slider, thumb, horiz, controlID);
		bool flag = Event.current.type == EventType.MouseUp;
		if (ScrollerRepeatButton(controlID, rect, leftButton))
		{
			value -= 10f * ((!(leftValue < rightValue)) ? (-1f) : 1f);
		}
		if (ScrollerRepeatButton(controlID, rect2, rightButton))
		{
			value += 10f * ((!(leftValue < rightValue)) ? (-1f) : 1f);
		}
		if (flag && Event.current.type == EventType.Used)
		{
			s_ScrollControlId = 0;
		}
		value = ((!(leftValue < rightValue)) ? Mathf.Clamp(value, rightValue, leftValue - size) : Mathf.Clamp(value, leftValue, rightValue - size));
		return value;
	}

	public static void BeginClip(Rect position, Vector2 scrollOffset, Vector2 renderOffset, bool resetOffset)
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		GUIUtility.CheckOnGUI();
		GUIClip.Push(position, scrollOffset, renderOffset, resetOffset);
	}

	public static void BeginGroup(Rect position)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		BeginGroup(position, GUIContent.none, GUIStyle.none);
	}

	public static void BeginGroup(Rect position, string text)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		BeginGroup(position, GUIContent.Temp(text), GUIStyle.none);
	}

	public static void BeginGroup(Rect position, Texture image)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		BeginGroup(position, GUIContent.Temp(image), GUIStyle.none);
	}

	public static void BeginGroup(Rect position, GUIContent content)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		BeginGroup(position, content, GUIStyle.none);
	}

	public static void BeginGroup(Rect position, GUIStyle style)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		BeginGroup(position, GUIContent.none, style);
	}

	public static void BeginGroup(Rect position, string text, GUIStyle style)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		BeginGroup(position, GUIContent.Temp(text), style);
	}

	public static void BeginGroup(Rect position, Texture image, GUIStyle style)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		BeginGroup(position, GUIContent.Temp(image), style);
	}

	public static void BeginGroup(Rect position, GUIContent content, GUIStyle style)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0004: Unknown result type (might be due to invalid IL or missing references)
		BeginGroup(position, content, style, Vector2.zero);
	}

	internal static void BeginGroup(Rect position, GUIContent content, GUIStyle style, Vector2 scrollOffset)
	{
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		//IL_0070: Unknown result type (might be due to invalid IL or missing references)
		//IL_0071: Unknown result type (might be due to invalid IL or missing references)
		//IL_0072: Unknown result type (might be due to invalid IL or missing references)
		//IL_0055: Unknown result type (might be due to invalid IL or missing references)
		GUIUtility.CheckOnGUI();
		int controlID = GUIUtility.GetControlID(s_BeginGroupHash, FocusType.Passive);
		if (content != GUIContent.none || style != GUIStyle.none)
		{
			EventType type = Event.current.type;
			if (type == EventType.Repaint)
			{
				style.Draw(position, content, controlID);
			}
			else if (((Rect)(ref position)).Contains(Event.current.mousePosition))
			{
				GUIUtility.mouse

Room Architect Tool_Data/Managed/UnityEngine.InputLegacyModule.dll

Decompiled 3 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;
using UnityEngine.Scripting;

[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: UnityEngineModuleAssembly]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine;

public enum TouchPhase
{
	Began,
	Moved,
	Stationary,
	Ended,
	Canceled
}
public enum IMECompositionMode
{
	Auto,
	On,
	Off
}
public enum TouchType
{
	Direct,
	Indirect,
	Stylus
}
[NativeHeader("Runtime/Input/InputBindings.h")]
public struct Touch
{
	private int m_FingerId;

	private Vector2 m_Position;

	private Vector2 m_RawPosition;

	private Vector2 m_PositionDelta;

	private float m_TimeDelta;

	private int m_TapCount;

	private TouchPhase m_Phase;

	private TouchType m_Type;

	private float m_Pressure;

	private float m_maximumPossiblePressure;

	private float m_Radius;

	private float m_RadiusVariance;

	private float m_AltitudeAngle;

	private float m_AzimuthAngle;

	public int fingerId
	{
		get
		{
			return m_FingerId;
		}
		set
		{
			m_FingerId = value;
		}
	}

	public Vector2 position
	{
		get
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			return m_Position;
		}
		set
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			m_Position = value;
		}
	}

	public Vector2 rawPosition
	{
		get
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			return m_RawPosition;
		}
		set
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			m_RawPosition = value;
		}
	}

	public Vector2 deltaPosition
	{
		get
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			return m_PositionDelta;
		}
		set
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			m_PositionDelta = value;
		}
	}

	public float deltaTime
	{
		get
		{
			return m_TimeDelta;
		}
		set
		{
			m_TimeDelta = value;
		}
	}

	public int tapCount
	{
		get
		{
			return m_TapCount;
		}
		set
		{
			m_TapCount = value;
		}
	}

	public TouchPhase phase
	{
		get
		{
			return m_Phase;
		}
		set
		{
			m_Phase = value;
		}
	}

	public float pressure
	{
		get
		{
			return m_Pressure;
		}
		set
		{
			m_Pressure = value;
		}
	}

	public float maximumPossiblePressure
	{
		get
		{
			return m_maximumPossiblePressure;
		}
		set
		{
			m_maximumPossiblePressure = value;
		}
	}

	public TouchType type
	{
		get
		{
			return m_Type;
		}
		set
		{
			m_Type = value;
		}
	}

	public float altitudeAngle
	{
		get
		{
			return m_AltitudeAngle;
		}
		set
		{
			m_AltitudeAngle = value;
		}
	}

	public float azimuthAngle
	{
		get
		{
			return m_AzimuthAngle;
		}
		set
		{
			m_AzimuthAngle = value;
		}
	}

	public float radius
	{
		get
		{
			return m_Radius;
		}
		set
		{
			m_Radius = value;
		}
	}

	public float radiusVariance
	{
		get
		{
			return m_RadiusVariance;
		}
		set
		{
			m_RadiusVariance = value;
		}
	}
}
public enum DeviceOrientation
{
	Unknown,
	Portrait,
	PortraitUpsideDown,
	LandscapeLeft,
	LandscapeRight,
	FaceUp,
	FaceDown
}
public struct AccelerationEvent
{
	internal float x;

	internal float y;

	internal float z;

	internal float m_TimeDelta;

	public Vector3 acceleration => new Vector3(x, y, z);

	public float deltaTime => m_TimeDelta;
}
[NativeHeader("Runtime/Input/GetInput.h")]
public class Gyroscope
{
	private int m_GyroIndex;

	public Vector3 rotationRate => rotationRate_Internal(m_GyroIndex);

	public Vector3 rotationRateUnbiased => rotationRateUnbiased_Internal(m_GyroIndex);

	public Vector3 gravity => gravity_Internal(m_GyroIndex);

	public Vector3 userAcceleration => userAcceleration_Internal(m_GyroIndex);

	public Quaternion attitude => attitude_Internal(m_GyroIndex);

	public bool enabled
	{
		get
		{
			return getEnabled_Internal(m_GyroIndex);
		}
		set
		{
			setEnabled_Internal(m_GyroIndex, value);
		}
	}

	public float updateInterval
	{
		get
		{
			return getUpdateInterval_Internal(m_GyroIndex);
		}
		set
		{
			setUpdateInterval_Internal(m_GyroIndex, value);
		}
	}

	internal Gyroscope(int index)
	{
		m_GyroIndex = index;
	}

	[FreeFunction("GetGyroRotationRate")]
	private static Vector3 rotationRate_Internal(int idx)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		rotationRate_Internal_Injected(idx, out var ret);
		return ret;
	}

	[FreeFunction("GetGyroRotationRateUnbiased")]
	private static Vector3 rotationRateUnbiased_Internal(int idx)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		rotationRateUnbiased_Internal_Injected(idx, out var ret);
		return ret;
	}

	[FreeFunction("GetGravity")]
	private static Vector3 gravity_Internal(int idx)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		gravity_Internal_Injected(idx, out var ret);
		return ret;
	}

	[FreeFunction("GetUserAcceleration")]
	private static Vector3 userAcceleration_Internal(int idx)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		userAcceleration_Internal_Injected(idx, out var ret);
		return ret;
	}

	[FreeFunction("GetAttitude")]
	private static Quaternion attitude_Internal(int idx)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		attitude_Internal_Injected(idx, out var ret);
		return ret;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[FreeFunction("IsGyroEnabled")]
	private static extern bool getEnabled_Internal(int idx);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[FreeFunction("SetGyroEnabled")]
	private static extern void setEnabled_Internal(int idx, bool enabled);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[FreeFunction("GetGyroUpdateInterval")]
	private static extern float getUpdateInterval_Internal(int idx);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[FreeFunction("SetGyroUpdateInterval")]
	private static extern void setUpdateInterval_Internal(int idx, float interval);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void rotationRate_Internal_Injected(int idx, out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void rotationRateUnbiased_Internal_Injected(int idx, out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void gravity_Internal_Injected(int idx, out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void userAcceleration_Internal_Injected(int idx, out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void attitude_Internal_Injected(int idx, out Quaternion ret);
}
public struct LocationInfo
{
	internal double m_Timestamp;

	internal float m_Latitude;

	internal float m_Longitude;

	internal float m_Altitude;

	internal float m_HorizontalAccuracy;

	internal float m_VerticalAccuracy;

	public float latitude => m_Latitude;

	public float longitude => m_Longitude;

	public float altitude => m_Altitude;

	public float horizontalAccuracy => m_HorizontalAccuracy;

	public float verticalAccuracy => m_VerticalAccuracy;

	public double timestamp => m_Timestamp;
}
public enum LocationServiceStatus
{
	Stopped,
	Initializing,
	Running,
	Failed
}
[NativeHeader("Runtime/Input/LocationService.h")]
[NativeHeader("Runtime/Input/InputBindings.h")]
public class LocationService
{
	internal struct HeadingInfo
	{
		public float magneticHeading;

		public float trueHeading;

		public float headingAccuracy;

		public Vector3 raw;

		public double timestamp;
	}

	public bool isEnabledByUser => IsServiceEnabledByUser();

	public LocationServiceStatus status => GetLocationStatus();

	public LocationInfo lastData
	{
		get
		{
			if (status != LocationServiceStatus.Running)
			{
				Debug.Log((object)"Location service updates are not enabled. Check LocationService.status before querying last location.");
			}
			return GetLastLocation();
		}
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[FreeFunction("LocationService::IsServiceEnabledByUser")]
	internal static extern bool IsServiceEnabledByUser();

	[MethodImpl(MethodImplOptions.InternalCall)]
	[FreeFunction("LocationService::GetLocationStatus")]
	internal static extern LocationServiceStatus GetLocationStatus();

	[FreeFunction("LocationService::GetLastLocation")]
	internal static LocationInfo GetLastLocation()
	{
		GetLastLocation_Injected(out var ret);
		return ret;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[FreeFunction("LocationService::SetDesiredAccuracy")]
	internal static extern void SetDesiredAccuracy(float value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[FreeFunction("LocationService::SetDistanceFilter")]
	internal static extern void SetDistanceFilter(float value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[FreeFunction("LocationService::StartUpdatingLocation")]
	internal static extern void StartUpdatingLocation();

	[MethodImpl(MethodImplOptions.InternalCall)]
	[FreeFunction("LocationService::StopUpdatingLocation")]
	internal static extern void StopUpdatingLocation();

	[FreeFunction("LocationService::GetLastHeading")]
	internal static HeadingInfo GetLastHeading()
	{
		GetLastHeading_Injected(out var ret);
		return ret;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[FreeFunction("LocationService::IsHeadingUpdatesEnabled")]
	internal static extern bool IsHeadingUpdatesEnabled();

	[MethodImpl(MethodImplOptions.InternalCall)]
	[FreeFunction("LocationService::SetHeadingUpdatesEnabled")]
	internal static extern void SetHeadingUpdatesEnabled(bool value);

	public void Start(float desiredAccuracyInMeters, float updateDistanceInMeters)
	{
		SetDesiredAccuracy(desiredAccuracyInMeters);
		SetDistanceFilter(updateDistanceInMeters);
		StartUpdatingLocation();
	}

	public void Start(float desiredAccuracyInMeters)
	{
		Start(desiredAccuracyInMeters, 10f);
	}

	public void Start()
	{
		Start(10f, 10f);
	}

	public void Stop()
	{
		StopUpdatingLocation();
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void GetLastLocation_Injected(out LocationInfo ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void GetLastHeading_Injected(out HeadingInfo ret);
}
public class Compass
{
	public float magneticHeading => LocationService.GetLastHeading().magneticHeading;

	public float trueHeading => LocationService.GetLastHeading().trueHeading;

	public float headingAccuracy => LocationService.GetLastHeading().headingAccuracy;

	public Vector3 rawVector => LocationService.GetLastHeading().raw;

	public double timestamp => LocationService.GetLastHeading().timestamp;

	public bool enabled
	{
		get
		{
			return LocationService.IsHeadingUpdatesEnabled();
		}
		set
		{
			LocationService.SetHeadingUpdatesEnabled(value);
		}
	}
}
[NativeHeader("Runtime/Camera/Camera.h")]
internal class CameraRaycastHelper
{
	[FreeFunction("CameraScripting::RaycastTry")]
	internal static GameObject RaycastTry(Camera cam, Ray ray, float distance, int layerMask)
	{
		return RaycastTry_Injected(cam, ref ray, distance, layerMask);
	}

	[FreeFunction("CameraScripting::RaycastTry2D")]
	internal static GameObject RaycastTry2D(Camera cam, Ray ray, float distance, int layerMask)
	{
		return RaycastTry2D_Injected(cam, ref ray, distance, layerMask);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern GameObject RaycastTry_Injected(Camera cam, ref Ray ray, float distance, int layerMask);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern GameObject RaycastTry2D_Injected(Camera cam, ref Ray ray, float distance, int layerMask);
}
[NativeHeader("Runtime/Input/InputBindings.h")]
public class Input
{
	private static LocationService locationServiceInstance;

	private static Compass compassInstance;

	private static Gyroscope s_MainGyro;

	public static extern bool simulateMouseWithTouches
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public static extern bool anyKey
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	public static extern bool anyKeyDown
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	public static extern string inputString
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	public static Vector3 mousePosition
	{
		get
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			get_mousePosition_Injected(out var ret);
			return ret;
		}
	}

	public static Vector2 mouseScrollDelta
	{
		get
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			get_mouseScrollDelta_Injected(out var ret);
			return ret;
		}
	}

	public static extern IMECompositionMode imeCompositionMode
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public static extern string compositionString
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	public static extern bool imeIsSelected
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	public static Vector2 compositionCursorPos
	{
		get
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			get_compositionCursorPos_Injected(out var ret);
			return ret;
		}
		set
		{
			set_compositionCursorPos_Injected(ref value);
		}
	}

	[Obsolete("eatKeyPressOnTextFieldFocus property is deprecated, and only provided to support legacy behavior.")]
	public static extern bool eatKeyPressOnTextFieldFocus
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public static extern bool mousePresent
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("GetMousePresent")]
		get;
	}

	public static extern int touchCount
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("GetTouchCount")]
		get;
	}

	public static extern bool touchPressureSupported
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("IsTouchPressureSupported")]
		get;
	}

	public static extern bool stylusTouchSupported
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("IsStylusTouchSupported")]
		get;
	}

	public static extern bool touchSupported
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("IsTouchSupported")]
		get;
	}

	public static extern bool multiTouchEnabled
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("IsMultiTouchEnabled")]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("SetMultiTouchEnabled")]
		set;
	}

	[Obsolete("isGyroAvailable property is deprecated. Please use SystemInfo.supportsGyroscope instead.")]
	public static extern bool isGyroAvailable
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("IsGyroAvailable")]
		get;
	}

	public static extern DeviceOrientation deviceOrientation
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("GetOrientation")]
		get;
	}

	public static Vector3 acceleration
	{
		[FreeFunction("GetAcceleration")]
		get
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			get_acceleration_Injected(out var ret);
			return ret;
		}
	}

	public static extern bool compensateSensors
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("IsCompensatingSensors")]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("SetCompensatingSensors")]
		set;
	}

	public static extern int accelerationEventCount
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("GetAccelerationCount")]
		get;
	}

	public static extern bool backButtonLeavesApp
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("GetBackButtonLeavesApp")]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("SetBackButtonLeavesApp")]
		set;
	}

	public static LocationService location
	{
		get
		{
			if (locationServiceInstance == null)
			{
				locationServiceInstance = new LocationService();
			}
			return locationServiceInstance;
		}
	}

	public static Compass compass
	{
		get
		{
			if (compassInstance == null)
			{
				compassInstance = new Compass();
			}
			return compassInstance;
		}
	}

	public static Gyroscope gyro
	{
		get
		{
			if (s_MainGyro == null)
			{
				s_MainGyro = new Gyroscope(GetGyroInternal());
			}
			return s_MainGyro;
		}
	}

	public static Touch[] touches
	{
		get
		{
			int num = touchCount;
			Touch[] array = new Touch[num];
			for (int i = 0; i < num; i++)
			{
				ref Touch reference = ref array[i];
				reference = GetTouch(i);
			}
			return array;
		}
	}

	public static AccelerationEvent[] accelerationEvents
	{
		get
		{
			int num = accelerationEventCount;
			AccelerationEvent[] array = new AccelerationEvent[num];
			for (int i = 0; i < num; i++)
			{
				ref AccelerationEvent reference = ref array[i];
				reference = GetAccelerationEvent(i);
			}
			return array;
		}
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeThrows]
	private static extern bool GetKeyInt(KeyCode key);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeThrows]
	private static extern bool GetKeyString(string name);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeThrows]
	private static extern bool GetKeyUpInt(KeyCode key);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeThrows]
	private static extern bool GetKeyUpString(string name);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeThrows]
	private static extern bool GetKeyDownInt(KeyCode key);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeThrows]
	private static extern bool GetKeyDownString(string name);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeThrows]
	public static extern float GetAxis(string axisName);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeThrows]
	public static extern float GetAxisRaw(string axisName);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeThrows]
	public static extern bool GetButton(string buttonName);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeThrows]
	public static extern bool GetButtonDown(string buttonName);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeThrows]
	public static extern bool GetButtonUp(string buttonName);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeThrows]
	public static extern bool GetMouseButton(int button);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeThrows]
	public static extern bool GetMouseButtonDown(int button);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeThrows]
	public static extern bool GetMouseButtonUp(int button);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[FreeFunction("ResetInput")]
	public static extern void ResetInputAxes();

	[MethodImpl(MethodImplOptions.InternalCall)]
	public static extern string[] GetJoystickNames();

	[NativeThrows]
	public static Touch GetTouch(int index)
	{
		GetTouch_Injected(index, out var ret);
		return ret;
	}

	[NativeThrows]
	public static AccelerationEvent GetAccelerationEvent(int index)
	{
		GetAccelerationEvent_Injected(index, out var ret);
		return ret;
	}

	public static bool GetKey(KeyCode key)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return GetKeyInt(key);
	}

	public static bool GetKey(string name)
	{
		return GetKeyString(name);
	}

	public static bool GetKeyUp(KeyCode key)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return GetKeyUpInt(key);
	}

	public static bool GetKeyUp(string name)
	{
		return GetKeyUpString(name);
	}

	public static bool GetKeyDown(KeyCode key)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return GetKeyDownInt(key);
	}

	public static bool GetKeyDown(string name)
	{
		return GetKeyDownString(name);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[FreeFunction("GetGyro")]
	private static extern int GetGyroInternal();

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void GetTouch_Injected(int index, out Touch ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void GetAccelerationEvent_Injected(int index, out AccelerationEvent ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private static extern void get_mousePosition_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private static extern void get_mouseScrollDelta_Injected(out Vector2 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private static extern void get_compositionCursorPos_Injected(out Vector2 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private static extern void set_compositionCursorPos_Injected(ref Vector2 value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private static extern void get_acceleration_Injected(out Vector3 ret);
}
internal class SendMouseEvents
{
	private struct HitInfo
	{
		public GameObject target;

		public Camera camera;

		public void SendMessage(string name)
		{
			target.SendMessage(name, (object)null, (SendMessageOptions)1);
		}

		public static implicit operator bool(HitInfo exists)
		{
			return (Object)(object)exists.target != (Object)null && (Object)(object)exists.camera != (Object)null;
		}

		public static bool Compare(HitInfo lhs, HitInfo rhs)
		{
			return (Object)(object)lhs.target == (Object)(object)rhs.target && (Object)(object)lhs.camera == (Object)(object)rhs.camera;
		}
	}

	private const int m_HitIndexGUI = 0;

	private const int m_HitIndexPhysics3D = 1;

	private const int m_HitIndexPhysics2D = 2;

	private static bool s_MouseUsed = false;

	private static readonly HitInfo[] m_LastHit = new HitInfo[3]
	{
		default(HitInfo),
		default(HitInfo),
		default(HitInfo)
	};

	private static readonly HitInfo[] m_MouseDownHit = new HitInfo[3]
	{
		default(HitInfo),
		default(HitInfo),
		default(HitInfo)
	};

	private static readonly HitInfo[] m_CurrentHit = new HitInfo[3]
	{
		default(HitInfo),
		default(HitInfo),
		default(HitInfo)
	};

	private static Camera[] m_Cameras;

	[RequiredByNativeCode]
	private static void SetMouseMoved()
	{
		s_MouseUsed = true;
	}

	private static void HitTestLegacyGUI(Camera camera, Vector3 mousePosition, ref HitInfo hitInfo)
	{
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		GUILayer component = ((Component)camera).GetComponent<GUILayer>();
		if (Object.op_Implicit((Object)(object)component))
		{
			GUIElement val = component.HitTest(mousePosition);
			if (Object.op_Implicit((Object)(object)val))
			{
				hitInfo.target = ((Component)val).gameObject;
				hitInfo.camera = camera;
			}
			else
			{
				hitInfo.target = null;
				hitInfo.camera = null;
			}
		}
	}

	[RequiredByNativeCode]
	private static void DoSendMouseEvents(int skipRTCameras)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c8: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ed: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f4: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
		//IL_01fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_023e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0292: Unknown result type (might be due to invalid IL or missing references)
		//IL_0298: Invalid comparison between Unknown and I4
		//IL_029f: Unknown result type (might be due to invalid IL or missing references)
		//IL_02a5: Invalid comparison between Unknown and I4
		//IL_02d0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0324: Unknown result type (might be due to invalid IL or missing references)
		//IL_032a: Invalid comparison between Unknown and I4
		//IL_0331: Unknown result type (might be due to invalid IL or missing references)
		//IL_0337: Invalid comparison between Unknown and I4
		Vector3 mousePosition = Input.mousePosition;
		int allCamerasCount = Camera.allCamerasCount;
		if (m_Cameras == null || m_Cameras.Length != allCamerasCount)
		{
			m_Cameras = (Camera[])(object)new Camera[allCamerasCount];
		}
		Camera.GetAllCameras(m_Cameras);
		for (int i = 0; i < m_CurrentHit.Length; i++)
		{
			m_CurrentHit[i] = default(HitInfo);
		}
		if (!s_MouseUsed)
		{
			Camera[] cameras = m_Cameras;
			Vector2 val3 = default(Vector2);
			foreach (Camera val in cameras)
			{
				if ((Object)(object)val == (Object)null || (skipRTCameras != 0 && (Object)(object)val.targetTexture != (Object)null))
				{
					continue;
				}
				int targetDisplay = val.targetDisplay;
				Vector3 val2 = Display.RelativeMouseAt(mousePosition);
				if (val2 != Vector3.zero)
				{
					int num = (int)val2.z;
					if (num != targetDisplay)
					{
						continue;
					}
					float num2 = Screen.width;
					float num3 = Screen.height;
					if (targetDisplay > 0 && targetDisplay < Display.displays.Length)
					{
						num2 = Display.displays[targetDisplay].systemWidth;
						num3 = Display.displays[targetDisplay].systemHeight;
					}
					((Vector2)(ref val3))..ctor(val2.x / num2, val2.y / num3);
					if (val3.x < 0f || val3.x > 1f || val3.y < 0f || val3.y > 1f)
					{
						continue;
					}
				}
				else
				{
					val2 = mousePosition;
				}
				Rect pixelRect = val.pixelRect;
				if (!((Rect)(ref pixelRect)).Contains(val2))
				{
					continue;
				}
				HitTestLegacyGUI(val, val2, ref m_CurrentHit[0]);
				if (val.eventMask != 0)
				{
					Ray ray = val.ScreenPointToRay(val2);
					float z = ((Ray)(ref ray)).direction.z;
					float distance = ((!Mathf.Approximately(0f, z)) ? Mathf.Abs((val.farClipPlane - val.nearClipPlane) / z) : float.PositiveInfinity);
					GameObject val4 = CameraRaycastHelper.RaycastTry(val, ray, distance, val.cullingMask & val.eventMask);
					if ((Object)(object)val4 != (Object)null)
					{
						m_CurrentHit[1].target = val4;
						m_CurrentHit[1].camera = val;
					}
					else if ((int)val.clearFlags == 1 || (int)val.clearFlags == 2)
					{
						m_CurrentHit[1].target = null;
						m_CurrentHit[1].camera = null;
					}
					GameObject val5 = CameraRaycastHelper.RaycastTry2D(val, ray, distance, val.cullingMask & val.eventMask);
					if ((Object)(object)val5 != (Object)null)
					{
						m_CurrentHit[2].target = val5;
						m_CurrentHit[2].camera = val;
					}
					else if ((int)val.clearFlags == 1 || (int)val.clearFlags == 2)
					{
						m_CurrentHit[2].target = null;
						m_CurrentHit[2].camera = null;
					}
				}
			}
		}
		for (int k = 0; k < m_CurrentHit.Length; k++)
		{
			SendEvents(k, m_CurrentHit[k]);
		}
		s_MouseUsed = false;
	}

	private static void SendEvents(int i, HitInfo hit)
	{
		bool mouseButtonDown = Input.GetMouseButtonDown(0);
		bool mouseButton = Input.GetMouseButton(0);
		if (mouseButtonDown)
		{
			if ((bool)hit)
			{
				m_MouseDownHit[i] = hit;
				m_MouseDownHit[i].SendMessage("OnMouseDown");
			}
		}
		else if (!mouseButton)
		{
			if ((bool)m_MouseDownHit[i])
			{
				if (HitInfo.Compare(hit, m_MouseDownHit[i]))
				{
					m_MouseDownHit[i].SendMessage("OnMouseUpAsButton");
				}
				m_MouseDownHit[i].SendMessage("OnMouseUp");
				m_MouseDownHit[i] = default(HitInfo);
			}
		}
		else if ((bool)m_MouseDownHit[i])
		{
			m_MouseDownHit[i].SendMessage("OnMouseDrag");
		}
		if (HitInfo.Compare(hit, m_LastHit[i]))
		{
			if ((bool)hit)
			{
				hit.SendMessage("OnMouseOver");
			}
		}
		else
		{
			if ((bool)m_LastHit[i])
			{
				m_LastHit[i].SendMessage("OnMouseExit");
			}
			if ((bool)hit)
			{
				hit.SendMessage("OnMouseEnter");
				hit.SendMessage("OnMouseOver");
			}
		}
		m_LastHit[i] = hit;
	}
}

Room Architect Tool_Data/Managed/UnityEngine.InputModule.dll

Decompiled 3 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using Unity.Collections.LowLevel.Unsafe;
using UnityEngine;
using UnityEngine.Bindings;
using UnityEngine.Scripting;

[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.InputSystem")]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngineInternal.Input;

internal unsafe delegate void NativeUpdateCallback(NativeInputUpdateType updateType, NativeInputEventBuffer* buffer);
internal enum NativeInputEventType
{
	DeviceRemoved = 1146242381,
	DeviceConfigChanged = 1145259591,
	Text = 1413830740,
	State = 1398030676,
	Delta = 1145852993
}
[StructLayout(LayoutKind.Explicit, Pack = 1, Size = 20)]
internal struct NativeInputEventBuffer
{
	public const int structSize = 20;

	[FieldOffset(0)]
	public unsafe void* eventBuffer;

	[FieldOffset(8)]
	public int eventCount;

	[FieldOffset(12)]
	public int sizeInBytes;

	[FieldOffset(16)]
	public int capacityInBytes;
}
[StructLayout(LayoutKind.Explicit, Pack = 1, Size = 20)]
internal struct NativeInputEvent
{
	public const int structSize = 20;

	[FieldOffset(0)]
	public NativeInputEventType type;

	[FieldOffset(4)]
	public ushort sizeInBytes;

	[FieldOffset(6)]
	public ushort deviceId;

	[FieldOffset(8)]
	public double time;

	[FieldOffset(16)]
	public int eventId;

	public NativeInputEvent(NativeInputEventType type, int sizeInBytes, int deviceId, double time)
	{
		this.type = type;
		this.sizeInBytes = (ushort)sizeInBytes;
		this.deviceId = (ushort)deviceId;
		eventId = 0;
		this.time = time;
	}
}
[Flags]
internal enum NativeInputUpdateType
{
	Dynamic = 1,
	Fixed = 2,
	BeforeRender = 4,
	Editor = 8,
	IgnoreFocus = int.MinValue
}
[NativeConditional("ENABLE_NEW_INPUT_SYSTEM")]
[NativeHeader("Modules/Input/Private/InputInternal.h")]
[NativeHeader("Modules/Input/Private/InputModuleBindings.h")]
internal class NativeInputSystem
{
	public static NativeUpdateCallback onUpdate;

	public static Action<NativeInputUpdateType> onBeforeUpdate;

	public static Func<NativeInputUpdateType, bool> onShouldRunUpdate;

	private static Action<int, string> s_OnDeviceDiscoveredCallback;

	public static Action<int, string> onDeviceDiscovered
	{
		get
		{
			return s_OnDeviceDiscoveredCallback;
		}
		set
		{
			s_OnDeviceDiscoveredCallback = value;
			hasDeviceDiscoveredCallback = s_OnDeviceDiscoveredCallback != null;
		}
	}

	internal static extern bool hasDeviceDiscoveredCallback
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public static extern double currentTime
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	public static extern double currentTimeOffsetToRealtimeSinceStartup
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	static NativeInputSystem()
	{
		hasDeviceDiscoveredCallback = false;
	}

	[RequiredByNativeCode]
	internal static void NotifyBeforeUpdate(NativeInputUpdateType updateType)
	{
		onBeforeUpdate?.Invoke(updateType);
	}

	[RequiredByNativeCode]
	internal unsafe static void NotifyUpdate(NativeInputUpdateType updateType, IntPtr eventBuffer)
	{
		NativeUpdateCallback nativeUpdateCallback = onUpdate;
		NativeInputEventBuffer* ptr = (NativeInputEventBuffer*)eventBuffer.ToPointer();
		if (nativeUpdateCallback == null)
		{
			ptr->eventCount = 0;
			ptr->sizeInBytes = 0;
		}
		else
		{
			nativeUpdateCallback(updateType, ptr);
		}
	}

	[RequiredByNativeCode]
	internal static void NotifyDeviceDiscovered(int deviceId, string deviceDescriptor)
	{
		s_OnDeviceDiscoveredCallback?.Invoke(deviceId, deviceDescriptor);
	}

	[RequiredByNativeCode]
	internal static void ShouldRunUpdate(NativeInputUpdateType updateType, out bool retval)
	{
		retval = onShouldRunUpdate?.Invoke(updateType) ?? false;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[FreeFunction("AllocateInputDeviceId")]
	public static extern int AllocateDeviceId();

	public unsafe static void QueueInputEvent<TInputEvent>(ref TInputEvent inputEvent) where TInputEvent : struct
	{
		QueueInputEvent((IntPtr)UnsafeUtility.AddressOf<TInputEvent>(ref inputEvent));
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	public static extern void QueueInputEvent(IntPtr inputEvent);

	[MethodImpl(MethodImplOptions.InternalCall)]
	public static extern long IOCTL(int deviceId, int code, IntPtr data, int sizeInBytes);

	[MethodImpl(MethodImplOptions.InternalCall)]
	public static extern void SetPollingFrequency(float hertz);

	[MethodImpl(MethodImplOptions.InternalCall)]
	public static extern void Update(NativeInputUpdateType updateType);

	[Obsolete("This is not needed any longer.")]
	public static void SetUpdateMask(NativeInputUpdateType mask)
	{
	}
}

Room Architect Tool_Data/Managed/UnityEngine.JSONSerializeModule.dll

Decompiled 3 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;

[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine;

[NativeHeader("Modules/JSONSerialize/Public/JsonUtility.bindings.h")]
public static class JsonUtility
{
	[MethodImpl(MethodImplOptions.InternalCall)]
	[FreeFunction("ToJsonInternal", true)]
	[ThreadSafe]
	private static extern string ToJsonInternal([NotNull] object obj, bool prettyPrint);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[FreeFunction("FromJsonInternal", true, ThrowsException = true)]
	[ThreadSafe]
	private static extern object FromJsonInternal(string json, object objectToOverwrite, Type type);

	public static string ToJson(object obj)
	{
		return ToJson(obj, prettyPrint: false);
	}

	public static string ToJson(object obj, bool prettyPrint)
	{
		if (obj == null)
		{
			return "";
		}
		if (obj is Object && !(obj is MonoBehaviour) && !(obj is ScriptableObject))
		{
			throw new ArgumentException("JsonUtility.ToJson does not support engine types.");
		}
		return ToJsonInternal(obj, prettyPrint);
	}

	public static T FromJson<T>(string json)
	{
		return (T)FromJson(json, typeof(T));
	}

	public static object FromJson(string json, Type type)
	{
		if (string.IsNullOrEmpty(json))
		{
			return null;
		}
		if ((object)type == null)
		{
			throw new ArgumentNullException("type");
		}
		if (type.IsAbstract || type.IsSubclassOf(typeof(Object)))
		{
			throw new ArgumentException("Cannot deserialize JSON to new instances of type '" + type.Name + ".'");
		}
		return FromJsonInternal(json, null, type);
	}

	public static void FromJsonOverwrite(string json, object objectToOverwrite)
	{
		if (!string.IsNullOrEmpty(json))
		{
			if (objectToOverwrite == null)
			{
				throw new ArgumentNullException("objectToOverwrite");
			}
			if (objectToOverwrite is Object && !(objectToOverwrite is MonoBehaviour) && !(objectToOverwrite is ScriptableObject))
			{
				throw new ArgumentException("Engine types cannot be overwritten from JSON outside of the Editor.");
			}
			FromJsonInternal(json, objectToOverwrite, objectToOverwrite.GetType());
		}
	}
}

Room Architect Tool_Data/Managed/UnityEngine.LocalizationModule.dll

Decompiled 3 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;
using UnityEngine.Scripting.APIUpdating;

[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine;

[MovedFrom("UnityEditor")]
[ExcludeFromPreset]
[NativeClass("LocalizationAsset")]
[NativeHeader("Modules/Localization/Public/LocalizationAsset.bindings.h")]
[NativeHeader("Modules/Localization/Public/LocalizationAsset.h")]
public sealed class LocalizationAsset : Object
{
	public extern string localeIsoCode
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern bool isEditorAsset
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public LocalizationAsset()
	{
		Internal_CreateInstance(this);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[FreeFunction("Internal_CreateInstance")]
	private static extern void Internal_CreateInstance([Writable] LocalizationAsset locAsset);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod("StoreLocalizedString")]
	public extern void SetLocalizedString(string original, string localized);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod("GetLocalized")]
	public extern string GetLocalizedString(string original);
}

Room Architect Tool_Data/Managed/UnityEngine.ParticleSystemModule.dll

Decompiled 3 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
using Unity.Jobs.LowLevel.Unsafe;
using UnityEngine;
using UnityEngine.Bindings;
using UnityEngine.Experimental.ParticleSystemJobs;
using UnityEngine.Rendering;
using UnityEngine.Scripting;

[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: UnityEngineModuleAssembly]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine.Experimental.ParticleSystemJobs
{
	public interface IParticleSystemJob
	{
		void ProcessParticleSystem(ParticleSystemJobData jobData);
	}
}
namespace UnityEngine
{
	[Obsolete("ParticleSystemEmissionType no longer does anything. Time and Distance based emission are now both always active.", false)]
	public enum ParticleSystemEmissionType
	{
		Time,
		Distance
	}
	[NativeHeader("Modules/ParticleSystem/ScriptBindings/ParticleSystemModulesScriptBindings.h")]
	[NativeHeader("ParticleSystemScriptingClasses.h")]
	[NativeHeader("Modules/ParticleSystem/ParticleSystem.h")]
	[NativeHeader("Modules/ParticleSystem/ParticleSystemGeometryJob.h")]
	[NativeHeader("Modules/ParticleSystem/ScriptBindings/ParticleSystemScriptBindings.h")]
	[UsedByNativeCode]
	[RequireComponent(typeof(Transform))]
	[NativeHeader("ParticleSystemScriptingClasses.h")]
	[NativeHeader("Modules/ParticleSystem/ParticleSystem.h")]
	[NativeHeader("Modules/ParticleSystem/ScriptBindings/ParticleSystemScriptBindings.h")]
	public sealed class ParticleSystem : Component
	{
		public struct MainModule
		{
			internal ParticleSystem m_ParticleSystem;

			[Obsolete("Please use flipRotation instead. (UnityUpgradable) -> UnityEngine.ParticleSystem/MainModule.flipRotation", false)]
			public float randomizeRotationDirection
			{
				get
				{
					return flipRotation;
				}
				set
				{
					flipRotation = value;
				}
			}

			public float duration
			{
				get
				{
					return get_duration_Injected(ref this);
				}
				set
				{
					set_duration_Injected(ref this, value);
				}
			}

			public bool loop
			{
				get
				{
					return get_loop_Injected(ref this);
				}
				set
				{
					set_loop_Injected(ref this, value);
				}
			}

			public bool prewarm
			{
				get
				{
					return get_prewarm_Injected(ref this);
				}
				set
				{
					set_prewarm_Injected(ref this, value);
				}
			}

			public MinMaxCurve startDelay
			{
				get
				{
					get_startDelay_Injected(ref this, out var ret);
					return ret;
				}
				set
				{
					set_startDelay_Injected(ref this, ref value);
				}
			}

			public float startDelayMultiplier
			{
				get
				{
					return get_startDelayMultiplier_Injected(ref this);
				}
				set
				{
					set_startDelayMultiplier_Injected(ref this, value);
				}
			}

			public MinMaxCurve startLifetime
			{
				get
				{
					get_startLifetime_Injected(ref this, out var ret);
					return ret;
				}
				set
				{
					set_startLifetime_Injected(ref this, ref value);
				}
			}

			public float startLifetimeMultiplier
			{
				get
				{
					return get_startLifetimeMultiplier_Injected(ref this);
				}
				set
				{
					set_startLifetimeMultiplier_Injected(ref this, value);
				}
			}

			public MinMaxCurve startSpeed
			{
				get
				{
					get_startSpeed_Injected(ref this, out var ret);
					return ret;
				}
				set
				{
					set_startSpeed_Injected(ref this, ref value);
				}
			}

			public float startSpeedMultiplier
			{
				get
				{
					return get_startSpeedMultiplier_Injected(ref this);
				}
				set
				{
					set_startSpeedMultiplier_Injected(ref this, value);
				}
			}

			public bool startSize3D
			{
				get
				{
					return get_startSize3D_Injected(ref this);
				}
				set
				{
					set_startSize3D_Injected(ref this, value);
				}
			}

			[NativeName("StartSizeX")]
			public MinMaxCurve startSize
			{
				get
				{
					get_startSize_Injected(ref this, out var ret);
					return ret;
				}
				set
				{
					set_startSize_Injected(ref this, ref value);
				}
			}

			[NativeName("StartSizeXMultiplier")]
			public float startSizeMultiplier
			{
				get
				{
					return get_startSizeMultiplier_Injected(ref this);
				}
				set
				{
					set_startSizeMultiplier_Injected(ref this, value);
				}
			}

			public MinMaxCurve startSizeX
			{
				get
				{
					get_startSizeX_Injected(ref this, out var ret);
					return ret;
				}
				set
				{
					set_startSizeX_Injected(ref this, ref value);
				}
			}

			public float startSizeXMultiplier
			{
				get
				{
					return get_startSizeXMultiplier_Injected(ref this);
				}
				set
				{
					set_startSizeXMultiplier_Injected(ref this, value);
				}
			}

			public MinMaxCurve startSizeY
			{
				get
				{
					get_startSizeY_Injected(ref this, out var ret);
					return ret;
				}
				set
				{
					set_startSizeY_Injected(ref this, ref value);
				}
			}

			public float startSizeYMultiplier
			{
				get
				{
					return get_startSizeYMultiplier_Injected(ref this);
				}
				set
				{
					set_startSizeYMultiplier_Injected(ref this, value);
				}
			}

			public MinMaxCurve startSizeZ
			{
				get
				{
					get_startSizeZ_Injected(ref this, out var ret);
					return ret;
				}
				set
				{
					set_startSizeZ_Injected(ref this, ref value);
				}
			}

			public float startSizeZMultiplier
			{
				get
				{
					return get_startSizeZMultiplier_Injected(ref this);
				}
				set
				{
					set_startSizeZMultiplier_Injected(ref this, value);
				}
			}

			public bool startRotation3D
			{
				get
				{
					return get_startRotation3D_Injected(ref this);
				}
				set
				{
					set_startRotation3D_Injected(ref this, value);
				}
			}

			[NativeName("StartRotationZ")]
			public MinMaxCurve startRotation
			{
				get
				{
					get_startRotation_Injected(ref this, out var ret);
					return ret;
				}
				set
				{
					set_startRotation_Injected(ref this, ref value);
				}
			}

			[NativeName("StartRotationZMultiplier")]
			public float startRotationMultiplier
			{
				get
				{
					return get_startRotationMultiplier_Injected(ref this);
				}
				set
				{
					set_startRotationMultiplier_Injected(ref this, value);
				}
			}

			public MinMaxCurve startRotationX
			{
				get
				{
					get_startRotationX_Injected(ref this, out var ret);
					return ret;
				}
				set
				{
					set_startRotationX_Injected(ref this, ref value);
				}
			}

			public float startRotationXMultiplier
			{
				get
				{
					return get_startRotationXMultiplier_Injected(ref this);
				}
				set
				{
					set_startRotationXMultiplier_Injected(ref this, value);
				}
			}

			public MinMaxCurve startRotationY
			{
				get
				{
					get_startRotationY_Injected(ref this, out var ret);
					return ret;
				}
				set
				{
					set_startRotationY_Injected(ref this, ref value);
				}
			}

			public float startRotationYMultiplier
			{
				get
				{
					return get_startRotationYMultiplier_Injected(ref this);
				}
				set
				{
					set_startRotationYMultiplier_Injected(ref this, value);
				}
			}

			public MinMaxCurve startRotationZ
			{
				get
				{
					get_startRotationZ_Injected(ref this, out var ret);
					return ret;
				}
				set
				{
					set_startRotationZ_Injected(ref this, ref value);
				}
			}

			public float startRotationZMultiplier
			{
				get
				{
					return get_startRotationZMultiplier_Injected(ref this);
				}
				set
				{
					set_startRotationZMultiplier_Injected(ref this, value);
				}
			}

			public float flipRotation
			{
				get
				{
					return get_flipRotation_Injected(ref this);
				}
				set
				{
					set_flipRotation_Injected(ref this, value);
				}
			}

			public MinMaxGradient startColor
			{
				get
				{
					get_startColor_Injected(ref this, out var ret);
					return ret;
				}
				set
				{
					set_startColor_Injected(ref this, ref value);
				}
			}

			public MinMaxCurve gravityModifier
			{
				get
				{
					get_gravityModifier_Injected(ref this, out var ret);
					return ret;
				}
				set
				{
					set_gravityModifier_Injected(ref this, ref value);
				}
			}

			public float gravityModifierMultiplier
			{
				get
				{
					return get_gravityModifierMultiplier_Injected(ref this);
				}
				set
				{
					set_gravityModifierMultiplier_Injected(ref this, value);
				}
			}

			public ParticleSystemSimulationSpace simulationSpace
			{
				get
				{
					return get_simulationSpace_Injected(ref this);
				}
				set
				{
					set_simulationSpace_Injected(ref this, value);
				}
			}

			public Transform customSimulationSpace
			{
				get
				{
					return get_customSimulationSpace_Injected(ref this);
				}
				set
				{
					set_customSimulationSpace_Injected(ref this, value);
				}
			}

			public float simulationSpeed
			{
				get
				{
					return get_simulationSpeed_Injected(ref this);
				}
				set
				{
					set_simulationSpeed_Injected(ref this, value);
				}
			}

			public bool useUnscaledTime
			{
				get
				{
					return get_useUnscaledTime_Injected(ref this);
				}
				set
				{
					set_useUnscaledTime_Injected(ref this, value);
				}
			}

			public ParticleSystemScalingMode scalingMode
			{
				get
				{
					return get_scalingMode_Injected(ref this);
				}
				set
				{
					set_scalingMode_Injected(ref this, value);
				}
			}

			public bool playOnAwake
			{
				get
				{
					return get_playOnAwake_Injected(ref this);
				}
				set
				{
					set_playOnAwake_Injected(ref this, value);
				}
			}

			public int maxParticles
			{
				get
				{
					return get_maxParticles_Injected(ref this);
				}
				set
				{
					set_maxParticles_Injected(ref this, value);
				}
			}

			public ParticleSystemEmitterVelocityMode emitterVelocityMode
			{
				get
				{
					return get_emitterVelocityMode_Injected(ref this);
				}
				set
				{
					set_emitterVelocityMode_Injected(ref this, value);
				}
			}

			public ParticleSystemStopAction stopAction
			{
				get
				{
					return get_stopAction_Injected(ref this);
				}
				set
				{
					set_stopAction_Injected(ref this, value);
				}
			}

			public ParticleSystemRingBufferMode ringBufferMode
			{
				get
				{
					return get_ringBufferMode_Injected(ref this);
				}
				set
				{
					set_ringBufferMode_Injected(ref this, value);
				}
			}

			public Vector2 ringBufferLoopRange
			{
				get
				{
					//IL_0008: Unknown result type (might be due to invalid IL or missing references)
					get_ringBufferLoopRange_Injected(ref this, out var ret);
					return ret;
				}
				set
				{
					set_ringBufferLoopRange_Injected(ref this, ref value);
				}
			}

			public ParticleSystemCullingMode cullingMode
			{
				get
				{
					return get_cullingMode_Injected(ref this);
				}
				set
				{
					set_cullingMode_Injected(ref this, value);
				}
			}

			internal MainModule(ParticleSystem particleSystem)
			{
				m_ParticleSystem = particleSystem;
			}

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_duration_Injected(ref MainModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_duration_Injected(ref MainModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern bool get_loop_Injected(ref MainModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_loop_Injected(ref MainModule _unity_self, bool value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern bool get_prewarm_Injected(ref MainModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_prewarm_Injected(ref MainModule _unity_self, bool value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void get_startDelay_Injected(ref MainModule _unity_self, out MinMaxCurve ret);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_startDelay_Injected(ref MainModule _unity_self, ref MinMaxCurve value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_startDelayMultiplier_Injected(ref MainModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_startDelayMultiplier_Injected(ref MainModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void get_startLifetime_Injected(ref MainModule _unity_self, out MinMaxCurve ret);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_startLifetime_Injected(ref MainModule _unity_self, ref MinMaxCurve value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_startLifetimeMultiplier_Injected(ref MainModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_startLifetimeMultiplier_Injected(ref MainModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void get_startSpeed_Injected(ref MainModule _unity_self, out MinMaxCurve ret);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_startSpeed_Injected(ref MainModule _unity_self, ref MinMaxCurve value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_startSpeedMultiplier_Injected(ref MainModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_startSpeedMultiplier_Injected(ref MainModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern bool get_startSize3D_Injected(ref MainModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_startSize3D_Injected(ref MainModule _unity_self, bool value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void get_startSize_Injected(ref MainModule _unity_self, out MinMaxCurve ret);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_startSize_Injected(ref MainModule _unity_self, ref MinMaxCurve value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_startSizeMultiplier_Injected(ref MainModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_startSizeMultiplier_Injected(ref MainModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void get_startSizeX_Injected(ref MainModule _unity_self, out MinMaxCurve ret);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_startSizeX_Injected(ref MainModule _unity_self, ref MinMaxCurve value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_startSizeXMultiplier_Injected(ref MainModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_startSizeXMultiplier_Injected(ref MainModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void get_startSizeY_Injected(ref MainModule _unity_self, out MinMaxCurve ret);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_startSizeY_Injected(ref MainModule _unity_self, ref MinMaxCurve value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_startSizeYMultiplier_Injected(ref MainModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_startSizeYMultiplier_Injected(ref MainModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void get_startSizeZ_Injected(ref MainModule _unity_self, out MinMaxCurve ret);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_startSizeZ_Injected(ref MainModule _unity_self, ref MinMaxCurve value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_startSizeZMultiplier_Injected(ref MainModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_startSizeZMultiplier_Injected(ref MainModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern bool get_startRotation3D_Injected(ref MainModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_startRotation3D_Injected(ref MainModule _unity_self, bool value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void get_startRotation_Injected(ref MainModule _unity_self, out MinMaxCurve ret);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_startRotation_Injected(ref MainModule _unity_self, ref MinMaxCurve value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_startRotationMultiplier_Injected(ref MainModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_startRotationMultiplier_Injected(ref MainModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void get_startRotationX_Injected(ref MainModule _unity_self, out MinMaxCurve ret);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_startRotationX_Injected(ref MainModule _unity_self, ref MinMaxCurve value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_startRotationXMultiplier_Injected(ref MainModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_startRotationXMultiplier_Injected(ref MainModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void get_startRotationY_Injected(ref MainModule _unity_self, out MinMaxCurve ret);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_startRotationY_Injected(ref MainModule _unity_self, ref MinMaxCurve value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_startRotationYMultiplier_Injected(ref MainModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_startRotationYMultiplier_Injected(ref MainModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void get_startRotationZ_Injected(ref MainModule _unity_self, out MinMaxCurve ret);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_startRotationZ_Injected(ref MainModule _unity_self, ref MinMaxCurve value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_startRotationZMultiplier_Injected(ref MainModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_startRotationZMultiplier_Injected(ref MainModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_flipRotation_Injected(ref MainModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_flipRotation_Injected(ref MainModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void get_startColor_Injected(ref MainModule _unity_self, out MinMaxGradient ret);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_startColor_Injected(ref MainModule _unity_self, ref MinMaxGradient value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void get_gravityModifier_Injected(ref MainModule _unity_self, out MinMaxCurve ret);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_gravityModifier_Injected(ref MainModule _unity_self, ref MinMaxCurve value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_gravityModifierMultiplier_Injected(ref MainModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_gravityModifierMultiplier_Injected(ref MainModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern ParticleSystemSimulationSpace get_simulationSpace_Injected(ref MainModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_simulationSpace_Injected(ref MainModule _unity_self, ParticleSystemSimulationSpace value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern Transform get_customSimulationSpace_Injected(ref MainModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_customSimulationSpace_Injected(ref MainModule _unity_self, Transform value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_simulationSpeed_Injected(ref MainModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_simulationSpeed_Injected(ref MainModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern bool get_useUnscaledTime_Injected(ref MainModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_useUnscaledTime_Injected(ref MainModule _unity_self, bool value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern ParticleSystemScalingMode get_scalingMode_Injected(ref MainModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_scalingMode_Injected(ref MainModule _unity_self, ParticleSystemScalingMode value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern bool get_playOnAwake_Injected(ref MainModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_playOnAwake_Injected(ref MainModule _unity_self, bool value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern int get_maxParticles_Injected(ref MainModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_maxParticles_Injected(ref MainModule _unity_self, int value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern ParticleSystemEmitterVelocityMode get_emitterVelocityMode_Injected(ref MainModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_emitterVelocityMode_Injected(ref MainModule _unity_self, ParticleSystemEmitterVelocityMode value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern ParticleSystemStopAction get_stopAction_Injected(ref MainModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_stopAction_Injected(ref MainModule _unity_self, ParticleSystemStopAction value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern ParticleSystemRingBufferMode get_ringBufferMode_Injected(ref MainModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_ringBufferMode_Injected(ref MainModule _unity_self, ParticleSystemRingBufferMode value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void get_ringBufferLoopRange_Injected(ref MainModule _unity_self, out Vector2 ret);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_ringBufferLoopRange_Injected(ref MainModule _unity_self, ref Vector2 value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern ParticleSystemCullingMode get_cullingMode_Injected(ref MainModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_cullingMode_Injected(ref MainModule _unity_self, ParticleSystemCullingMode value);
		}

		public struct EmissionModule
		{
			internal ParticleSystem m_ParticleSystem;

			[Obsolete("ParticleSystemEmissionType no longer does anything. Time and Distance based emission are now both always active.", false)]
			public ParticleSystemEmissionType type
			{
				get
				{
					return ParticleSystemEmissionType.Time;
				}
				set
				{
				}
			}

			[Obsolete("rate property is deprecated. Use rateOverTime or rateOverDistance instead.", false)]
			public MinMaxCurve rate
			{
				get
				{
					return rateOverTime;
				}
				set
				{
					rateOverTime = value;
				}
			}

			[Obsolete("rateMultiplier property is deprecated. Use rateOverTimeMultiplier or rateOverDistanceMultiplier instead.", false)]
			public float rateMultiplier
			{
				get
				{
					return rateOverTimeMultiplier;
				}
				set
				{
					rateOverTimeMultiplier = value;
				}
			}

			public bool enabled
			{
				get
				{
					return get_enabled_Injected(ref this);
				}
				set
				{
					set_enabled_Injected(ref this, value);
				}
			}

			public MinMaxCurve rateOverTime
			{
				get
				{
					get_rateOverTime_Injected(ref this, out var ret);
					return ret;
				}
				set
				{
					set_rateOverTime_Injected(ref this, ref value);
				}
			}

			public float rateOverTimeMultiplier
			{
				get
				{
					return get_rateOverTimeMultiplier_Injected(ref this);
				}
				set
				{
					set_rateOverTimeMultiplier_Injected(ref this, value);
				}
			}

			public MinMaxCurve rateOverDistance
			{
				get
				{
					get_rateOverDistance_Injected(ref this, out var ret);
					return ret;
				}
				set
				{
					set_rateOverDistance_Injected(ref this, ref value);
				}
			}

			public float rateOverDistanceMultiplier
			{
				get
				{
					return get_rateOverDistanceMultiplier_Injected(ref this);
				}
				set
				{
					set_rateOverDistanceMultiplier_Injected(ref this, value);
				}
			}

			public int burstCount
			{
				get
				{
					return get_burstCount_Injected(ref this);
				}
				set
				{
					set_burstCount_Injected(ref this, value);
				}
			}

			internal EmissionModule(ParticleSystem particleSystem)
			{
				m_ParticleSystem = particleSystem;
			}

			public void SetBursts(Burst[] bursts)
			{
				SetBursts(bursts, bursts.Length);
			}

			public void SetBursts(Burst[] bursts, int size)
			{
				burstCount = size;
				for (int i = 0; i < size; i++)
				{
					SetBurst(i, bursts[i]);
				}
			}

			public int GetBursts(Burst[] bursts)
			{
				int num = burstCount;
				for (int i = 0; i < num; i++)
				{
					ref Burst reference = ref bursts[i];
					reference = GetBurst(i);
				}
				return num;
			}

			public void SetBurst(int index, Burst burst)
			{
				SetBurst_Injected(ref this, index, ref burst);
			}

			public Burst GetBurst(int index)
			{
				GetBurst_Injected(ref this, index, out var ret);
				return ret;
			}

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern bool get_enabled_Injected(ref EmissionModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_enabled_Injected(ref EmissionModule _unity_self, bool value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void get_rateOverTime_Injected(ref EmissionModule _unity_self, out MinMaxCurve ret);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_rateOverTime_Injected(ref EmissionModule _unity_self, ref MinMaxCurve value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_rateOverTimeMultiplier_Injected(ref EmissionModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_rateOverTimeMultiplier_Injected(ref EmissionModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void get_rateOverDistance_Injected(ref EmissionModule _unity_self, out MinMaxCurve ret);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_rateOverDistance_Injected(ref EmissionModule _unity_self, ref MinMaxCurve value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_rateOverDistanceMultiplier_Injected(ref EmissionModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_rateOverDistanceMultiplier_Injected(ref EmissionModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			private static extern void SetBurst_Injected(ref EmissionModule _unity_self, int index, ref Burst burst);

			[MethodImpl(MethodImplOptions.InternalCall)]
			private static extern void GetBurst_Injected(ref EmissionModule _unity_self, int index, out Burst ret);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern int get_burstCount_Injected(ref EmissionModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_burstCount_Injected(ref EmissionModule _unity_self, int value);
		}

		public struct ShapeModule
		{
			internal ParticleSystem m_ParticleSystem;

			[Obsolete("Please use scale instead. (UnityUpgradable) -> UnityEngine.ParticleSystem/ShapeModule.scale", false)]
			public Vector3 box
			{
				get
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0007: Unknown result type (might be due to invalid IL or missing references)
					//IL_000d: Unknown result type (might be due to invalid IL or missing references)
					return scale;
				}
				set
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					scale = value;
				}
			}

			[Obsolete("meshScale property is deprecated.Please use scale instead.", false)]
			public float meshScale
			{
				get
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0007: Unknown result type (might be due to invalid IL or missing references)
					return scale.x;
				}
				set
				{
					//IL_0005: Unknown result type (might be due to invalid IL or missing references)
					scale = new Vector3(value, value, value);
				}
			}

			[Obsolete("randomDirection property is deprecated. Use randomDirectionAmount instead.", false)]
			public bool randomDirection
			{
				get
				{
					return randomDirectionAmount >= 0.5f;
				}
				set
				{
					randomDirectionAmount = ((!value) ? 0f : 1f);
				}
			}

			public bool enabled
			{
				get
				{
					return get_enabled_Injected(ref this);
				}
				set
				{
					set_enabled_Injected(ref this, value);
				}
			}

			public ParticleSystemShapeType shapeType
			{
				get
				{
					return get_shapeType_Injected(ref this);
				}
				set
				{
					set_shapeType_Injected(ref this, value);
				}
			}

			public float randomDirectionAmount
			{
				get
				{
					return get_randomDirectionAmount_Injected(ref this);
				}
				set
				{
					set_randomDirectionAmount_Injected(ref this, value);
				}
			}

			public float sphericalDirectionAmount
			{
				get
				{
					return get_sphericalDirectionAmount_Injected(ref this);
				}
				set
				{
					set_sphericalDirectionAmount_Injected(ref this, value);
				}
			}

			public float randomPositionAmount
			{
				get
				{
					return get_randomPositionAmount_Injected(ref this);
				}
				set
				{
					set_randomPositionAmount_Injected(ref this, value);
				}
			}

			public bool alignToDirection
			{
				get
				{
					return get_alignToDirection_Injected(ref this);
				}
				set
				{
					set_alignToDirection_Injected(ref this, value);
				}
			}

			public float radius
			{
				get
				{
					return get_radius_Injected(ref this);
				}
				set
				{
					set_radius_Injected(ref this, value);
				}
			}

			public ParticleSystemShapeMultiModeValue radiusMode
			{
				get
				{
					return get_radiusMode_Injected(ref this);
				}
				set
				{
					set_radiusMode_Injected(ref this, value);
				}
			}

			public float radiusSpread
			{
				get
				{
					return get_radiusSpread_Injected(ref this);
				}
				set
				{
					set_radiusSpread_Injected(ref this, value);
				}
			}

			public MinMaxCurve radiusSpeed
			{
				get
				{
					get_radiusSpeed_Injected(ref this, out var ret);
					return ret;
				}
				set
				{
					set_radiusSpeed_Injected(ref this, ref value);
				}
			}

			public float radiusSpeedMultiplier
			{
				get
				{
					return get_radiusSpeedMultiplier_Injected(ref this);
				}
				set
				{
					set_radiusSpeedMultiplier_Injected(ref this, value);
				}
			}

			public float radiusThickness
			{
				get
				{
					return get_radiusThickness_Injected(ref this);
				}
				set
				{
					set_radiusThickness_Injected(ref this, value);
				}
			}

			public float angle
			{
				get
				{
					return get_angle_Injected(ref this);
				}
				set
				{
					set_angle_Injected(ref this, value);
				}
			}

			public float length
			{
				get
				{
					return get_length_Injected(ref this);
				}
				set
				{
					set_length_Injected(ref this, value);
				}
			}

			public Vector3 boxThickness
			{
				get
				{
					//IL_0008: Unknown result type (might be due to invalid IL or missing references)
					get_boxThickness_Injected(ref this, out var ret);
					return ret;
				}
				set
				{
					set_boxThickness_Injected(ref this, ref value);
				}
			}

			public ParticleSystemMeshShapeType meshShapeType
			{
				get
				{
					return get_meshShapeType_Injected(ref this);
				}
				set
				{
					set_meshShapeType_Injected(ref this, value);
				}
			}

			public Mesh mesh
			{
				get
				{
					return get_mesh_Injected(ref this);
				}
				set
				{
					set_mesh_Injected(ref this, value);
				}
			}

			public MeshRenderer meshRenderer
			{
				get
				{
					return get_meshRenderer_Injected(ref this);
				}
				set
				{
					set_meshRenderer_Injected(ref this, value);
				}
			}

			public SkinnedMeshRenderer skinnedMeshRenderer
			{
				get
				{
					return get_skinnedMeshRenderer_Injected(ref this);
				}
				set
				{
					set_skinnedMeshRenderer_Injected(ref this, value);
				}
			}

			public Sprite sprite
			{
				get
				{
					return get_sprite_Injected(ref this);
				}
				set
				{
					set_sprite_Injected(ref this, value);
				}
			}

			public SpriteRenderer spriteRenderer
			{
				get
				{
					return get_spriteRenderer_Injected(ref this);
				}
				set
				{
					set_spriteRenderer_Injected(ref this, value);
				}
			}

			public bool useMeshMaterialIndex
			{
				get
				{
					return get_useMeshMaterialIndex_Injected(ref this);
				}
				set
				{
					set_useMeshMaterialIndex_Injected(ref this, value);
				}
			}

			public int meshMaterialIndex
			{
				get
				{
					return get_meshMaterialIndex_Injected(ref this);
				}
				set
				{
					set_meshMaterialIndex_Injected(ref this, value);
				}
			}

			public bool useMeshColors
			{
				get
				{
					return get_useMeshColors_Injected(ref this);
				}
				set
				{
					set_useMeshColors_Injected(ref this, value);
				}
			}

			public float normalOffset
			{
				get
				{
					return get_normalOffset_Injected(ref this);
				}
				set
				{
					set_normalOffset_Injected(ref this, value);
				}
			}

			public ParticleSystemShapeMultiModeValue meshSpawnMode
			{
				get
				{
					return get_meshSpawnMode_Injected(ref this);
				}
				set
				{
					set_meshSpawnMode_Injected(ref this, value);
				}
			}

			public float meshSpawnSpread
			{
				get
				{
					return get_meshSpawnSpread_Injected(ref this);
				}
				set
				{
					set_meshSpawnSpread_Injected(ref this, value);
				}
			}

			public MinMaxCurve meshSpawnSpeed
			{
				get
				{
					get_meshSpawnSpeed_Injected(ref this, out var ret);
					return ret;
				}
				set
				{
					set_meshSpawnSpeed_Injected(ref this, ref value);
				}
			}

			public float meshSpawnSpeedMultiplier
			{
				get
				{
					return get_meshSpawnSpeedMultiplier_Injected(ref this);
				}
				set
				{
					set_meshSpawnSpeedMultiplier_Injected(ref this, value);
				}
			}

			public float arc
			{
				get
				{
					return get_arc_Injected(ref this);
				}
				set
				{
					set_arc_Injected(ref this, value);
				}
			}

			public ParticleSystemShapeMultiModeValue arcMode
			{
				get
				{
					return get_arcMode_Injected(ref this);
				}
				set
				{
					set_arcMode_Injected(ref this, value);
				}
			}

			public float arcSpread
			{
				get
				{
					return get_arcSpread_Injected(ref this);
				}
				set
				{
					set_arcSpread_Injected(ref this, value);
				}
			}

			public MinMaxCurve arcSpeed
			{
				get
				{
					get_arcSpeed_Injected(ref this, out var ret);
					return ret;
				}
				set
				{
					set_arcSpeed_Injected(ref this, ref value);
				}
			}

			public float arcSpeedMultiplier
			{
				get
				{
					return get_arcSpeedMultiplier_Injected(ref this);
				}
				set
				{
					set_arcSpeedMultiplier_Injected(ref this, value);
				}
			}

			public float donutRadius
			{
				get
				{
					return get_donutRadius_Injected(ref this);
				}
				set
				{
					set_donutRadius_Injected(ref this, value);
				}
			}

			public Vector3 position
			{
				get
				{
					//IL_0008: Unknown result type (might be due to invalid IL or missing references)
					get_position_Injected(ref this, out var ret);
					return ret;
				}
				set
				{
					set_position_Injected(ref this, ref value);
				}
			}

			public Vector3 rotation
			{
				get
				{
					//IL_0008: Unknown result type (might be due to invalid IL or missing references)
					get_rotation_Injected(ref this, out var ret);
					return ret;
				}
				set
				{
					set_rotation_Injected(ref this, ref value);
				}
			}

			public Vector3 scale
			{
				get
				{
					//IL_0008: Unknown result type (might be due to invalid IL or missing references)
					get_scale_Injected(ref this, out var ret);
					return ret;
				}
				set
				{
					set_scale_Injected(ref this, ref value);
				}
			}

			public Texture2D texture
			{
				get
				{
					return get_texture_Injected(ref this);
				}
				set
				{
					set_texture_Injected(ref this, value);
				}
			}

			public ParticleSystemShapeTextureChannel textureClipChannel
			{
				get
				{
					return get_textureClipChannel_Injected(ref this);
				}
				set
				{
					set_textureClipChannel_Injected(ref this, value);
				}
			}

			public float textureClipThreshold
			{
				get
				{
					return get_textureClipThreshold_Injected(ref this);
				}
				set
				{
					set_textureClipThreshold_Injected(ref this, value);
				}
			}

			public bool textureColorAffectsParticles
			{
				get
				{
					return get_textureColorAffectsParticles_Injected(ref this);
				}
				set
				{
					set_textureColorAffectsParticles_Injected(ref this, value);
				}
			}

			public bool textureAlphaAffectsParticles
			{
				get
				{
					return get_textureAlphaAffectsParticles_Injected(ref this);
				}
				set
				{
					set_textureAlphaAffectsParticles_Injected(ref this, value);
				}
			}

			public bool textureBilinearFiltering
			{
				get
				{
					return get_textureBilinearFiltering_Injected(ref this);
				}
				set
				{
					set_textureBilinearFiltering_Injected(ref this, value);
				}
			}

			public int textureUVChannel
			{
				get
				{
					return get_textureUVChannel_Injected(ref this);
				}
				set
				{
					set_textureUVChannel_Injected(ref this, value);
				}
			}

			internal ShapeModule(ParticleSystem particleSystem)
			{
				m_ParticleSystem = particleSystem;
			}

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern bool get_enabled_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_enabled_Injected(ref ShapeModule _unity_self, bool value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern ParticleSystemShapeType get_shapeType_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_shapeType_Injected(ref ShapeModule _unity_self, ParticleSystemShapeType value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_randomDirectionAmount_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_randomDirectionAmount_Injected(ref ShapeModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_sphericalDirectionAmount_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_sphericalDirectionAmount_Injected(ref ShapeModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_randomPositionAmount_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_randomPositionAmount_Injected(ref ShapeModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern bool get_alignToDirection_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_alignToDirection_Injected(ref ShapeModule _unity_self, bool value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_radius_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_radius_Injected(ref ShapeModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern ParticleSystemShapeMultiModeValue get_radiusMode_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_radiusMode_Injected(ref ShapeModule _unity_self, ParticleSystemShapeMultiModeValue value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_radiusSpread_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_radiusSpread_Injected(ref ShapeModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void get_radiusSpeed_Injected(ref ShapeModule _unity_self, out MinMaxCurve ret);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_radiusSpeed_Injected(ref ShapeModule _unity_self, ref MinMaxCurve value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_radiusSpeedMultiplier_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_radiusSpeedMultiplier_Injected(ref ShapeModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_radiusThickness_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_radiusThickness_Injected(ref ShapeModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_angle_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_angle_Injected(ref ShapeModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_length_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_length_Injected(ref ShapeModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void get_boxThickness_Injected(ref ShapeModule _unity_self, out Vector3 ret);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_boxThickness_Injected(ref ShapeModule _unity_self, ref Vector3 value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern ParticleSystemMeshShapeType get_meshShapeType_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_meshShapeType_Injected(ref ShapeModule _unity_self, ParticleSystemMeshShapeType value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern Mesh get_mesh_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_mesh_Injected(ref ShapeModule _unity_self, Mesh value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern MeshRenderer get_meshRenderer_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_meshRenderer_Injected(ref ShapeModule _unity_self, MeshRenderer value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern SkinnedMeshRenderer get_skinnedMeshRenderer_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_skinnedMeshRenderer_Injected(ref ShapeModule _unity_self, SkinnedMeshRenderer value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern Sprite get_sprite_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_sprite_Injected(ref ShapeModule _unity_self, Sprite value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern SpriteRenderer get_spriteRenderer_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_spriteRenderer_Injected(ref ShapeModule _unity_self, SpriteRenderer value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern bool get_useMeshMaterialIndex_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_useMeshMaterialIndex_Injected(ref ShapeModule _unity_self, bool value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern int get_meshMaterialIndex_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_meshMaterialIndex_Injected(ref ShapeModule _unity_self, int value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern bool get_useMeshColors_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_useMeshColors_Injected(ref ShapeModule _unity_self, bool value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_normalOffset_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_normalOffset_Injected(ref ShapeModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern ParticleSystemShapeMultiModeValue get_meshSpawnMode_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_meshSpawnMode_Injected(ref ShapeModule _unity_self, ParticleSystemShapeMultiModeValue value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_meshSpawnSpread_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_meshSpawnSpread_Injected(ref ShapeModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void get_meshSpawnSpeed_Injected(ref ShapeModule _unity_self, out MinMaxCurve ret);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_meshSpawnSpeed_Injected(ref ShapeModule _unity_self, ref MinMaxCurve value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_meshSpawnSpeedMultiplier_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_meshSpawnSpeedMultiplier_Injected(ref ShapeModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_arc_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_arc_Injected(ref ShapeModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern ParticleSystemShapeMultiModeValue get_arcMode_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_arcMode_Injected(ref ShapeModule _unity_self, ParticleSystemShapeMultiModeValue value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_arcSpread_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_arcSpread_Injected(ref ShapeModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void get_arcSpeed_Injected(ref ShapeModule _unity_self, out MinMaxCurve ret);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_arcSpeed_Injected(ref ShapeModule _unity_self, ref MinMaxCurve value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_arcSpeedMultiplier_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_arcSpeedMultiplier_Injected(ref ShapeModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_donutRadius_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_donutRadius_Injected(ref ShapeModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void get_position_Injected(ref ShapeModule _unity_self, out Vector3 ret);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_position_Injected(ref ShapeModule _unity_self, ref Vector3 value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void get_rotation_Injected(ref ShapeModule _unity_self, out Vector3 ret);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_rotation_Injected(ref ShapeModule _unity_self, ref Vector3 value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void get_scale_Injected(ref ShapeModule _unity_self, out Vector3 ret);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_scale_Injected(ref ShapeModule _unity_self, ref Vector3 value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern Texture2D get_texture_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_texture_Injected(ref ShapeModule _unity_self, Texture2D value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern ParticleSystemShapeTextureChannel get_textureClipChannel_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_textureClipChannel_Injected(ref ShapeModule _unity_self, ParticleSystemShapeTextureChannel value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_textureClipThreshold_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_textureClipThreshold_Injected(ref ShapeModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern bool get_textureColorAffectsParticles_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_textureColorAffectsParticles_Injected(ref ShapeModule _unity_self, bool value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern bool get_textureAlphaAffectsParticles_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_textureAlphaAffectsParticles_Injected(ref ShapeModule _unity_self, bool value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern bool get_textureBilinearFiltering_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_textureBilinearFiltering_Injected(ref ShapeModule _unity_self, bool value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern int get_textureUVChannel_Injected(ref ShapeModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_textureUVChannel_Injected(ref ShapeModule _unity_self, int value);
		}

		public struct SubEmittersModule
		{
			internal ParticleSystem m_ParticleSystem;

			[Obsolete("birth0 property is deprecated. Use AddSubEmitter, RemoveSubEmitter, SetSubEmitterSystem and GetSubEmitterSystem instead.", false)]
			public ParticleSystem birth0
			{
				get
				{
					return get_birth0_Injected(ref this);
				}
				set
				{
					set_birth0_Injected(ref this, value);
				}
			}

			[Obsolete("birth1 property is deprecated. Use AddSubEmitter, RemoveSubEmitter, SetSubEmitterSystem and GetSubEmitterSystem instead.", false)]
			public ParticleSystem birth1
			{
				get
				{
					return get_birth1_Injected(ref this);
				}
				set
				{
					set_birth1_Injected(ref this, value);
				}
			}

			[Obsolete("collision0 property is deprecated. Use AddSubEmitter, RemoveSubEmitter, SetSubEmitterSystem and GetSubEmitterSystem instead.", false)]
			public ParticleSystem collision0
			{
				get
				{
					return get_collision0_Injected(ref this);
				}
				set
				{
					set_collision0_Injected(ref this, value);
				}
			}

			[Obsolete("collision1 property is deprecated. Use AddSubEmitter, RemoveSubEmitter, SetSubEmitterSystem and GetSubEmitterSystem instead.", false)]
			public ParticleSystem collision1
			{
				get
				{
					return get_collision1_Injected(ref this);
				}
				set
				{
					set_collision1_Injected(ref this, value);
				}
			}

			[Obsolete("death0 property is deprecated. Use AddSubEmitter, RemoveSubEmitter, SetSubEmitterSystem and GetSubEmitterSystem instead.", false)]
			public ParticleSystem death0
			{
				get
				{
					return get_death0_Injected(ref this);
				}
				set
				{
					set_death0_Injected(ref this, value);
				}
			}

			[Obsolete("death1 property is deprecated. Use AddSubEmitter, RemoveSubEmitter, SetSubEmitterSystem and GetSubEmitterSystem instead.", false)]
			public ParticleSystem death1
			{
				get
				{
					return get_death1_Injected(ref this);
				}
				set
				{
					set_death1_Injected(ref this, value);
				}
			}

			public bool enabled
			{
				get
				{
					return get_enabled_Injected(ref this);
				}
				set
				{
					set_enabled_Injected(ref this, value);
				}
			}

			public int subEmittersCount => get_subEmittersCount_Injected(ref this);

			internal SubEmittersModule(ParticleSystem particleSystem)
			{
				m_ParticleSystem = particleSystem;
			}

			public void AddSubEmitter(ParticleSystem subEmitter, ParticleSystemSubEmitterType type, ParticleSystemSubEmitterProperties properties, float emitProbability)
			{
				AddSubEmitter_Injected(ref this, subEmitter, type, properties, emitProbability);
			}

			public void AddSubEmitter(ParticleSystem subEmitter, ParticleSystemSubEmitterType type, ParticleSystemSubEmitterProperties properties)
			{
				AddSubEmitter(subEmitter, type, properties, 1f);
			}

			public void RemoveSubEmitter(int index)
			{
				RemoveSubEmitter_Injected(ref this, index);
			}

			public void SetSubEmitterSystem(int index, ParticleSystem subEmitter)
			{
				SetSubEmitterSystem_Injected(ref this, index, subEmitter);
			}

			public void SetSubEmitterType(int index, ParticleSystemSubEmitterType type)
			{
				SetSubEmitterType_Injected(ref this, index, type);
			}

			public void SetSubEmitterProperties(int index, ParticleSystemSubEmitterProperties properties)
			{
				SetSubEmitterProperties_Injected(ref this, index, properties);
			}

			public void SetSubEmitterEmitProbability(int index, float emitProbability)
			{
				SetSubEmitterEmitProbability_Injected(ref this, index, emitProbability);
			}

			public ParticleSystem GetSubEmitterSystem(int index)
			{
				return GetSubEmitterSystem_Injected(ref this, index);
			}

			public ParticleSystemSubEmitterType GetSubEmitterType(int index)
			{
				return GetSubEmitterType_Injected(ref this, index);
			}

			public ParticleSystemSubEmitterProperties GetSubEmitterProperties(int index)
			{
				return GetSubEmitterProperties_Injected(ref this, index);
			}

			public float GetSubEmitterEmitProbability(int index)
			{
				return GetSubEmitterEmitProbability_Injected(ref this, index);
			}

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern ParticleSystem get_birth0_Injected(ref SubEmittersModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_birth0_Injected(ref SubEmittersModule _unity_self, ParticleSystem value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern ParticleSystem get_birth1_Injected(ref SubEmittersModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_birth1_Injected(ref SubEmittersModule _unity_self, ParticleSystem value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern ParticleSystem get_collision0_Injected(ref SubEmittersModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_collision0_Injected(ref SubEmittersModule _unity_self, ParticleSystem value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern ParticleSystem get_collision1_Injected(ref SubEmittersModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_collision1_Injected(ref SubEmittersModule _unity_self, ParticleSystem value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern ParticleSystem get_death0_Injected(ref SubEmittersModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_death0_Injected(ref SubEmittersModule _unity_self, ParticleSystem value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern ParticleSystem get_death1_Injected(ref SubEmittersModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_death1_Injected(ref SubEmittersModule _unity_self, ParticleSystem value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern bool get_enabled_Injected(ref SubEmittersModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_enabled_Injected(ref SubEmittersModule _unity_self, bool value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern int get_subEmittersCount_Injected(ref SubEmittersModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			private static extern void AddSubEmitter_Injected(ref SubEmittersModule _unity_self, ParticleSystem subEmitter, ParticleSystemSubEmitterType type, ParticleSystemSubEmitterProperties properties, float emitProbability);

			[MethodImpl(MethodImplOptions.InternalCall)]
			private static extern void RemoveSubEmitter_Injected(ref SubEmittersModule _unity_self, int index);

			[MethodImpl(MethodImplOptions.InternalCall)]
			private static extern void SetSubEmitterSystem_Injected(ref SubEmittersModule _unity_self, int index, ParticleSystem subEmitter);

			[MethodImpl(MethodImplOptions.InternalCall)]
			private static extern void SetSubEmitterType_Injected(ref SubEmittersModule _unity_self, int index, ParticleSystemSubEmitterType type);

			[MethodImpl(MethodImplOptions.InternalCall)]
			private static extern void SetSubEmitterProperties_Injected(ref SubEmittersModule _unity_self, int index, ParticleSystemSubEmitterProperties properties);

			[MethodImpl(MethodImplOptions.InternalCall)]
			private static extern void SetSubEmitterEmitProbability_Injected(ref SubEmittersModule _unity_self, int index, float emitProbability);

			[MethodImpl(MethodImplOptions.InternalCall)]
			private static extern ParticleSystem GetSubEmitterSystem_Injected(ref SubEmittersModule _unity_self, int index);

			[MethodImpl(MethodImplOptions.InternalCall)]
			private static extern ParticleSystemSubEmitterType GetSubEmitterType_Injected(ref SubEmittersModule _unity_self, int index);

			[MethodImpl(MethodImplOptions.InternalCall)]
			private static extern ParticleSystemSubEmitterProperties GetSubEmitterProperties_Injected(ref SubEmittersModule _unity_self, int index);

			[MethodImpl(MethodImplOptions.InternalCall)]
			private static extern float GetSubEmitterEmitProbability_Injected(ref SubEmittersModule _unity_self, int index);
		}

		public struct TextureSheetAnimationModule
		{
			internal ParticleSystem m_ParticleSystem;

			[Obsolete("flipU property is deprecated. Use ParticleSystemRenderer.flip.x instead.", false)]
			public float flipU
			{
				get
				{
					//IL_000c: Unknown result type (might be due to invalid IL or missing references)
					//IL_0011: Unknown result type (might be due to invalid IL or missing references)
					return ((Component)m_ParticleSystem).GetComponent<ParticleSystemRenderer>().flip.x;
				}
				set
				{
					//IL_000e: Unknown result type (might be due to invalid IL or missing references)
					//IL_0013: Unknown result type (might be due to invalid IL or missing references)
					//IL_001d: Unknown result type (might be due to invalid IL or missing references)
					ParticleSystemRenderer component = ((Component)m_ParticleSystem).GetComponent<ParticleSystemRenderer>();
					Vector3 flip = component.flip;
					flip.x = value;
					component.flip = flip;
				}
			}

			[Obsolete("flipV property is deprecated. Use ParticleSystemRenderer.flip.y instead.", false)]
			public float flipV
			{
				get
				{
					//IL_000c: Unknown result type (might be due to invalid IL or missing references)
					//IL_0011: Unknown result type (might be due to invalid IL or missing references)
					return ((Component)m_ParticleSystem).GetComponent<ParticleSystemRenderer>().flip.y;
				}
				set
				{
					//IL_000e: Unknown result type (might be due to invalid IL or missing references)
					//IL_0013: Unknown result type (might be due to invalid IL or missing references)
					//IL_001d: Unknown result type (might be due to invalid IL or missing references)
					ParticleSystemRenderer component = ((Component)m_ParticleSystem).GetComponent<ParticleSystemRenderer>();
					Vector3 flip = component.flip;
					flip.y = value;
					component.flip = flip;
				}
			}

			[Obsolete("useRandomRow property is deprecated. Use rowMode instead.", false)]
			public bool useRandomRow
			{
				get
				{
					return rowMode == ParticleSystemAnimationRowMode.Random;
				}
				set
				{
					rowMode = (value ? ParticleSystemAnimationRowMode.Random : ParticleSystemAnimationRowMode.Custom);
				}
			}

			public bool enabled
			{
				get
				{
					return get_enabled_Injected(ref this);
				}
				set
				{
					set_enabled_Injected(ref this, value);
				}
			}

			public ParticleSystemAnimationMode mode
			{
				get
				{
					return get_mode_Injected(ref this);
				}
				set
				{
					set_mode_Injected(ref this, value);
				}
			}

			public ParticleSystemAnimationTimeMode timeMode
			{
				get
				{
					return get_timeMode_Injected(ref this);
				}
				set
				{
					set_timeMode_Injected(ref this, value);
				}
			}

			public float fps
			{
				get
				{
					return get_fps_Injected(ref this);
				}
				set
				{
					set_fps_Injected(ref this, value);
				}
			}

			public int numTilesX
			{
				get
				{
					return get_numTilesX_Injected(ref this);
				}
				set
				{
					set_numTilesX_Injected(ref this, value);
				}
			}

			public int numTilesY
			{
				get
				{
					return get_numTilesY_Injected(ref this);
				}
				set
				{
					set_numTilesY_Injected(ref this, value);
				}
			}

			public ParticleSystemAnimationType animation
			{
				get
				{
					return get_animation_Injected(ref this);
				}
				set
				{
					set_animation_Injected(ref this, value);
				}
			}

			public ParticleSystemAnimationRowMode rowMode
			{
				get
				{
					return get_rowMode_Injected(ref this);
				}
				set
				{
					set_rowMode_Injected(ref this, value);
				}
			}

			public MinMaxCurve frameOverTime
			{
				get
				{
					get_frameOverTime_Injected(ref this, out var ret);
					return ret;
				}
				set
				{
					set_frameOverTime_Injected(ref this, ref value);
				}
			}

			public float frameOverTimeMultiplier
			{
				get
				{
					return get_frameOverTimeMultiplier_Injected(ref this);
				}
				set
				{
					set_frameOverTimeMultiplier_Injected(ref this, value);
				}
			}

			public MinMaxCurve startFrame
			{
				get
				{
					get_startFrame_Injected(ref this, out var ret);
					return ret;
				}
				set
				{
					set_startFrame_Injected(ref this, ref value);
				}
			}

			public float startFrameMultiplier
			{
				get
				{
					return get_startFrameMultiplier_Injected(ref this);
				}
				set
				{
					set_startFrameMultiplier_Injected(ref this, value);
				}
			}

			public int cycleCount
			{
				get
				{
					return get_cycleCount_Injected(ref this);
				}
				set
				{
					set_cycleCount_Injected(ref this, value);
				}
			}

			public int rowIndex
			{
				get
				{
					return get_rowIndex_Injected(ref this);
				}
				set
				{
					set_rowIndex_Injected(ref this, value);
				}
			}

			public UVChannelFlags uvChannelMask
			{
				get
				{
					return get_uvChannelMask_Injected(ref this);
				}
				set
				{
					set_uvChannelMask_Injected(ref this, value);
				}
			}

			public int spriteCount => get_spriteCount_Injected(ref this);

			public Vector2 speedRange
			{
				get
				{
					//IL_0008: Unknown result type (might be due to invalid IL or missing references)
					get_speedRange_Injected(ref this, out var ret);
					return ret;
				}
				set
				{
					set_speedRange_Injected(ref this, ref value);
				}
			}

			internal TextureSheetAnimationModule(ParticleSystem particleSystem)
			{
				m_ParticleSystem = particleSystem;
			}

			public void AddSprite(Sprite sprite)
			{
				AddSprite_Injected(ref this, sprite);
			}

			public void RemoveSprite(int index)
			{
				RemoveSprite_Injected(ref this, index);
			}

			public void SetSprite(int index, Sprite sprite)
			{
				SetSprite_Injected(ref this, index, sprite);
			}

			public Sprite GetSprite(int index)
			{
				return GetSprite_Injected(ref this, index);
			}

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern bool get_enabled_Injected(ref TextureSheetAnimationModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_enabled_Injected(ref TextureSheetAnimationModule _unity_self, bool value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern ParticleSystemAnimationMode get_mode_Injected(ref TextureSheetAnimationModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_mode_Injected(ref TextureSheetAnimationModule _unity_self, ParticleSystemAnimationMode value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern ParticleSystemAnimationTimeMode get_timeMode_Injected(ref TextureSheetAnimationModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_timeMode_Injected(ref TextureSheetAnimationModule _unity_self, ParticleSystemAnimationTimeMode value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_fps_Injected(ref TextureSheetAnimationModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_fps_Injected(ref TextureSheetAnimationModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern int get_numTilesX_Injected(ref TextureSheetAnimationModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_numTilesX_Injected(ref TextureSheetAnimationModule _unity_self, int value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern int get_numTilesY_Injected(ref TextureSheetAnimationModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_numTilesY_Injected(ref TextureSheetAnimationModule _unity_self, int value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern ParticleSystemAnimationType get_animation_Injected(ref TextureSheetAnimationModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_animation_Injected(ref TextureSheetAnimationModule _unity_self, ParticleSystemAnimationType value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern ParticleSystemAnimationRowMode get_rowMode_Injected(ref TextureSheetAnimationModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_rowMode_Injected(ref TextureSheetAnimationModule _unity_self, ParticleSystemAnimationRowMode value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void get_frameOverTime_Injected(ref TextureSheetAnimationModule _unity_self, out MinMaxCurve ret);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_frameOverTime_Injected(ref TextureSheetAnimationModule _unity_self, ref MinMaxCurve value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_frameOverTimeMultiplier_Injected(ref TextureSheetAnimationModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_frameOverTimeMultiplier_Injected(ref TextureSheetAnimationModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void get_startFrame_Injected(ref TextureSheetAnimationModule _unity_self, out MinMaxCurve ret);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_startFrame_Injected(ref TextureSheetAnimationModule _unity_self, ref MinMaxCurve value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern float get_startFrameMultiplier_Injected(ref TextureSheetAnimationModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_startFrameMultiplier_Injected(ref TextureSheetAnimationModule _unity_self, float value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern int get_cycleCount_Injected(ref TextureSheetAnimationModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_cycleCount_Injected(ref TextureSheetAnimationModule _unity_self, int value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern int get_rowIndex_Injected(ref TextureSheetAnimationModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_rowIndex_Injected(ref TextureSheetAnimationModule _unity_self, int value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern UVChannelFlags get_uvChannelMask_Injected(ref TextureSheetAnimationModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_uvChannelMask_Injected(ref TextureSheetAnimationModule _unity_self, UVChannelFlags value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern int get_spriteCount_Injected(ref TextureSheetAnimationModule _unity_self);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void get_speedRange_Injected(ref TextureSheetAnimationModule _unity_self, out Vector2 ret);

			[MethodImpl(MethodImplOptions.InternalCall)]
			[SpecialName]
			private static extern void set_speedRange_Injected(ref TextureSheetAnimationModule _unity_self, ref Vector2 value);

			[MethodImpl(MethodImplOptions.InternalCall)]
			private static extern void AddSprite_Injected(ref TextureSheetAnimationModule _unity_self, Sprite sprite);

			[MethodImpl(MethodImplOptions.InternalCall)]
			private static extern void RemoveSprite_Injected(ref TextureSheetAnimationModule _unity_self, int index);

			[MethodImpl(MethodImplOptions.InternalCall)]
			private static extern void SetSprite_Injected(ref TextureSheetAnimationModule _unity_self, int index, Sprite sprite);

			[MethodImpl(MethodImplOptions.InternalCall)]
			private static extern Sprite GetSprite_Injected(ref TextureSheetAnimationModule _unity_self, int index);
		}

		[RequiredByNativeCode("particleSystemParticle", Optional = true)]
		public struct Particle
		{
			[Flags]
			private enum Flags
			{
				Size3D = 1,
				Rotation3D = 2,
				MeshIndex = 4
			}

			private Vector3 m_Position;

			private Vector3 m_Velocity;

			private Vector3 m_AnimatedVelocity;

			private Vector3 m_InitialVelocity;

			private Vector3 m_AxisOfRotation;

			private Vector3 m_Rotation;

			private Vector3 m_AngularVelocity;

			private Vector3 m_StartSize;

			private Color32 m_StartColor;

			private uint m_RandomSeed;

			private float m_Lifetime;

			private float m_StartLifetime;

			private int m_MeshIndex;

			private float m_EmitAccumulator0;

			private float m_EmitAccumulator1;

			private uint m_Flags;

			[Obsolete("Please use Particle.remainingLifetime instead. (UnityUpgradable) -> UnityEngine.ParticleSystem/Particle.remainingLifetime", false)]
			public float lifetime
			{
				get
				{
					return remainingLifetime;
				}
				set
				{
					remainingLifetime = value;
				}
			}

			[Obsolete("randomValue property is deprecated. Use randomSeed instead to control random behavior of particles.", false)]
			public float randomValue
			{
				get
				{
					return BitConverter.ToSingle(BitConverter.GetBytes(m_RandomSeed), 0);
				}
				set
				{
					m_RandomSeed = BitConverter.ToUInt32(BitConverter.GetBytes(value), 0);
				}
			}

			[Obsolete("size property is deprecated. Use startSize or GetCurrentSize() instead.", false)]
			public float size
			{
				get
				{
					return startSize;
				}
				set
				{
					startSize = value;
				}
			}

			[Obsolete("color property is deprecated. Use startColor or GetCurrentColor() instead.", false)]
			public Color32 color
			{
				get
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0007: Unknown result type (might be due to invalid IL or missing references)
					//IL_000d: Unknown result type (might be due to invalid IL or missing references)
					return startColor;
				}
				set
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					startColor = value;
				}
			}

			public Vector3 position
			{
				get
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0007: Unknown result type (might be due to invalid IL or missing references)
					//IL_000d: Unknown result type (might be due to invalid IL or missing references)
					return m_Position;
				}
				set
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0003: Unknown result type (might be due to invalid IL or missing references)
					m_Position = value;
				}
			}

			public Vector3 velocity
			{
				get
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0007: Unknown result type (might be due to invalid IL or missing references)
					//IL_000d: Unknown result type (might be due to invalid IL or missing references)
					return m_Velocity;
				}
				set
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0003: Unknown result type (might be due to invalid IL or missing references)
					m_Velocity = value;
				}
			}

			public Vector3 animatedVelocity => m_AnimatedVelocity;

			public Vector3 totalVelocity => m_Velocity + m_AnimatedVelocity;

			public float remainingLifetime
			{
				get
				{
					return m_Lifetime;
				}
				set
				{
					m_Lifetime = value;
				}
			}

			public float startLifetime
			{
				get
				{
					return m_StartLifetime;
				}
				set
				{
					m_StartLifetime = value;
				}
			}

			public Color32 startColor
			{
				get
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0007: Unknown result type (might be due to invalid IL or missing references)
					//IL_000d: Unknown result type (might be due to invalid IL or missing references)
					return m_StartColor;
				}
				set
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0003: Unknown result type (might be due to invalid IL or missing references)
					m_StartColor = value;
				}
			}

			public uint randomSeed
			{
				get
				{
					return m_RandomSeed;
				}
				set
				{
					m_RandomSeed = value;
				}
			}

			public Vector3 axisOfRotation
			{
				get
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0007: Unknown result type (might be due to invalid IL or missing references)
					//IL_000d: Unknown result type (might be due to invalid IL or missing references)
					return m_AxisOfRotation;
				}
				set
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0003: Unknown result type (might be due to invalid IL or missing references)
					m_AxisOfRotation = value;
				}
			}

			public float startSize
			{
				get
				{
					return m_StartSize.x;
				}
				set
				{
					//IL_0005: Unknown result type (might be due to invalid IL or missing references)
					//IL_000a: Unknown result type (might be due to invalid IL or missing references)
					m_StartSize = new Vector3(value, value, value);
				}
			}

			public Vector3 startSize3D
			{
				get
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0007: Unknown result type (might be due to invalid IL or missing references)
					//IL_000d: Unknown result type (might be due to invalid IL or missing references)
					return m_StartSize;
				}
				set
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0003: Unknown result type (might be due to invalid IL or missing references)
					m_StartSize = value;
					m_Flags |= 1u;
				}
			}

			public float rotation
			{
				get
				{
					return m_Rotation.z * 57.29578f;
				}
				set
				{
					//IL_0013: 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)
					m_Rotation = new Vector3(0f, 0f, value * ((float)Math.PI / 180f));
				}
			}

			public Vector3 rotation3D
			{
				get
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_000c: Unknown result type (might be due to invalid IL or missing references)
					//IL_0011: Unknown result type (might be due to invalid IL or missing references)
					//IL_0017: Unknown result type (might be due to invalid IL or missing references)
					return m_Rotation * 57.29578f;
				}
				set
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0008: Unknown result type (might be due to invalid IL or missing references)
					//IL_000d: Unknown result type (might be due to invalid IL or missing references)
					m_Rotation = value * ((float)Math.PI / 180f);
					m_Flags |= 2u;
				}
			}

			public float angularVelocity
			{
				get
				{
					return m_AngularVelocity.z * 57.29578f;
				}
				set
				{
					//IL_0013: 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)
					m_AngularVelocity = new Vector3(0f, 0f, value * ((float)Math.PI / 180f));
				}
			}

			public Vector3 angularVelocity3D
			{
				get
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_000c: Unknown result type (might be due to invalid IL or missing references)
					//IL_0011: Unknown result type (might be due to invalid IL or missing references)
					//IL_0017: Unknown result type (might be due to invalid IL or missing references)
					return m_AngularVelocity * 57.29578f;
				}
				set
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0008: Unknown result type (might be due to invalid IL or missing references)
					//IL_000d: Unknown result type (might be due to invalid IL or missing references)
					m_AngularVelocity = value * ((float)Math.PI / 180f);
					m_Flags |= 2u;
				}
			}

			public float GetCurrentSize(ParticleSystem system)
			{
				return system.GetParticleCurrentSize(ref this);
			}

			public Vector3 GetCurrentSize3D(ParticleSystem system)
			{
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				return system.GetParticleCurrentSize3D(ref this);
			}

			public Color32 GetCurrentColor(ParticleSystem system)
			{
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				return system.GetParticleCurrentColor(ref this);
			}

			public void SetMeshIndex(int index)
			{
				m_MeshIndex = index;
				m_Flags |= 4u;
			}

			public int GetMeshIndex(ParticleSystem system)
			{
				return system.GetParticleMeshIndex(ref this);
			}
		}

		[NativeType(/*Could not decode attribute arguments.*/)]
		public struct Burst
		{
			private float m_Time;

			private MinMaxCurve m_Count;

			private int m_RepeatCount;

			private float m_RepeatInterval;

			private float m_InvProbability;

			public float time
			{
				get
				{
					return m_Time;
				}
				set
				{
					m_Time = value;
				}
			}

			public MinMaxCurve count
			{
				get
				{
					return m_Count;
				}
				set
				{
					m_Count = value;
				}
			}

			public short minCount
			{
				get
				{
					return (short)m_Count.constantMin;
				}
				set
				{
					m_Count.constantMin = value;
				}
			}

			public short maxCount
			{
				get
				{
					return (short)m_Count.constantMax;
				}
				set
				{
					m_Count.constantMax = value;
				}
			}

			public int cycleCount
			{
				get
				{
					return m_RepeatCount + 1;
				}
				set
				{
					if (value < 0)
					{
						throw new ArgumentOutOfRangeException("cycleCount", "cycleCount must be at least 0: " + value);
					}
					m_RepeatCount = value - 1;
				}
			}

			public float repeatInterval
			{
				get
				{
					return m_RepeatInterval;
				}
				set
				{
					if (value <= 0f)
					{
						throw new ArgumentOutOfRangeException("repeatInterval", "repeatInterval must be greater than 0.0f: " + value);
					}
					m_RepeatInterval = value;
				}
			}

			public float probability
			{
				get
				{
					return 1f - m_InvProbability;
				}
				set
				{
					if (value < 0f || value > 1f)
					{
						throw new ArgumentOutOfRangeException("probability", "probability must be between 0.0f and 1.0f: " + value);
					}
					m_InvProbability = 1f - value;
				}
			}

			public Burst(float _time, short _count)
			{
				m_Time = _time;
				m_Count = _count;
				m_RepeatCount = 0;
				m_RepeatInterval = 0f;
				m_InvProbability = 0f;
			}

			public Burst(float _time, short _minCount, short _maxCount)
			{
				m_Time = _time;
				m_Count = new MinMaxCurve((float)_minCount, (float)_maxCount);
				m_RepeatCount = 0;
				m_RepeatInterval = 0f;
				m_InvProbability = 0f;
			}

			public Burst(float _time, short _minCount, short _maxCount, int _cycleCount, float _repeatInterval)
			{
				m_Time = _time;
				m_Count = new MinMaxCurve((float)_minCount, (float)_maxCount);
				m_RepeatCount = _cycleCount - 1;
				m_RepeatInterval = _repeatInterval;
				m_InvProbability = 0f;
			}

			public Burst(float _time, MinMaxCurve _count)
			{
				m_Time = _time;
				m_Count = _count;
				m_RepeatCount = 0;
				m_RepeatInterval = 0f;
				m_InvProbability = 0f;
			}

			public Burst(float _time, MinMaxCurve _count, int _cycleCount, float _repeatInterval)
			{
				m_Time = _time;
				m_Count = _count;
				m_RepeatCount = _cycleCount - 1;
				m_RepeatInterval = _repeatInterval;
				m_InvProbability = 0f;
			}
		}

		[Serializable]
		[NativeType(/*Could not decode attribute arguments.*/)]
		public struct MinMaxCurve
		{
			[SerializeField]
			private ParticleSystemCurveMode m_Mode;

			[SerializeField]
			private float m_CurveMultiplier;

			[SerializeField]
			private AnimationCurve m_CurveMin;

			[SerializeField]
			private AnimationCurve m_CurveMax;

			[SerializeField]
			private float m_ConstantMin;

			[SerializeField]
			private float m_ConstantMax;

			public ParticleSystemCurveMode mode
			{
				get
				{
					return m_Mode;
				}
				set
				{
					m_Mode = value;
				}
			}

			public float curveMultiplier
			{
				get
				{
					return m_CurveMultiplier;
				}
				set
				{
					m_CurveMultiplier = value;
				}
			}

			public AnimationCurve curveMax
			{
				get
				{
					return m_CurveMax;
				}
				set
				{
					m_CurveMax = value;
				}
			}

			public AnimationCurve curveMin
			{
				get
				{
					return m_CurveMin;
				}
				set
				{
					m_CurveMin = value;
				}
			}

			public float constantMax
			{
				get
				{
					return m_ConstantMax;
				}
				set
				{
					m_ConstantMax = value;
				}
			}

			public float constantMin
			{
				get
				{
					return m_ConstantMin;
				}
				set
				{
					m_ConstantMin = value;
				}
			}

			public float constant
			{
				get
				{
					return m_ConstantMax;
				}
				set
				{
					m_ConstantMax = value;
				}
			}

			public AnimationCurve curve
			{
				get
				{
					return m_CurveMax;
				}
				set
				{
					m_CurveMax = value;
				}
			}

			public MinMaxCurve(float constant)
			{
				m_Mode = ParticleSystemCurveMode.Constant;
				m_CurveMultiplier = 0f;
				m_CurveMin = null;
				m_CurveMax = null;
				m_ConstantMin = 0f;
				m_ConstantMax = constant;
			}

			public MinMaxCurve(float multiplier, AnimationCurve curve)
			{
				m_Mode = ParticleSystemCurveMode.Curve;
				m_CurveMultiplier = multiplier;
				m_CurveMin = null;
				m_CurveMax = curve;
				m_ConstantMin = 0f;
				m_ConstantMax = 0f;
			}

			public MinMaxCurve(float multiplier, AnimationCurve min, AnimationCurve max)
			{
				m_Mode = ParticleSystemCurveMode.TwoCurves;
				m_CurveMultiplier = multiplier;
				m_CurveMin = min;
				m_CurveMax = max;
				m_ConstantMin = 0f;
				m_ConstantMax = 0f;
			}

			public MinMaxCurve(float min, float max)
			{
				m_Mode = ParticleSystemCurveMode.TwoConstants;
				m_CurveMultiplier = 0f;
				m_CurveMin = null;
				m_CurveMax = null;
				m_ConstantMin = min;
				m_ConstantMax = max;
			}

			public float Evaluate(float time)
			{
				return Evaluate(time, 1f);
			}

			public float Evaluate(float time, float lerpFactor)
			{
				return mode switch
				{
					ParticleSystemCurveMode.Constant => m_ConstantMax, 
					ParticleSystemCurveMode.TwoCurves => Mathf.Lerp(m_CurveMin.Evaluate(time), m_CurveMax.Evaluate(time), lerpFactor) * m_CurveMultiplier, 
					ParticleSystemCurveMode.TwoConstants => Mathf.Lerp(m_ConstantMin, m_ConstantMax, lerpFactor), 
					_ => m_CurveMax.Evaluate(time) * m_CurveMultiplier, 
				};
			}

			public static implicit operator MinMaxCurve(float constant)
			{
				return new MinMaxCurve(constant);
			}
		}

		[Serializable]
		[NativeType(/*Could not decode attribute arguments.*/)]
		public struct MinMaxGradient
		{
			[SerializeField]
			private ParticleSystemGradientMode m_Mode;

			[SerializeField]
			private Gradient m_GradientMin;

			[SerializeField]
			private Gradient m_GradientMax;

			[SerializeField]
			private Color m_ColorMin;

			[SerializeField]
			private Color m_ColorMax;

			public ParticleSystemGradientMode mode
			{
				get
				{
					return m_Mode;
				}
				set
				{
					m_Mode = value;
				}
			}

			public Gradient gradientMax
			{
				get
				{
					return m_GradientMax;
				}
				set
				{
					m_GradientMax = value;
				}
			}

			public Gradient gradientMin
			{
				get
				{
					return m_GradientMin;
				}
				set
				{
					m_GradientMin = value;
				}
			}

			public Color colorMax
			{
				get
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0007: Unknown result type (might be due to invalid IL or missing references)
					//IL_000d: Unknown result type (might be due to invalid IL or missing references)
					return m_ColorMax;
				}
				set
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0003: Unknown result type (might be due to invalid IL or missing references)
					m_ColorMax = value;
				}
			}

			public Color colorMin
			{
				get
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0007: Unknown result type (might be due to invalid IL or missing references)
					//IL_000d: Unknown result type (might be due to invalid IL or missing references)
					return m_ColorMin;
				}
				set
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0003: Unknow

Room Architect Tool_Data/Managed/UnityEngine.PerformanceReportingModule.dll

Decompiled 3 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;

[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine.Analytics;

[StaticAccessor(/*Could not decode attribute arguments.*/)]
[NativeHeader("Modules/PerformanceReporting/PerformanceReportingManager.h")]
public static class PerformanceReporting
{
	public static extern bool enabled
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public static extern long graphicsInitializationFinishTime
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("GetGfxDoneTime")]
		get;
	}
}

Room Architect Tool_Data/Managed/UnityEngine.Physics2DModule.dll

Decompiled 3 months ago
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;
using UnityEngine.Internal;
using UnityEngine.SceneManagement;
using UnityEngine.Scripting;

[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: UnityEngineModuleAssembly]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine;

[NativeHeader("Modules/Physics2D/Public/PhysicsSceneHandle2D.h")]
public struct PhysicsScene2D : IEquatable<PhysicsScene2D>
{
	private int m_Handle;

	public override string ToString()
	{
		return UnityString.Format("({0})", new object[1] { m_Handle });
	}

	public static bool operator ==(PhysicsScene2D lhs, PhysicsScene2D rhs)
	{
		return lhs.m_Handle == rhs.m_Handle;
	}

	public static bool operator !=(PhysicsScene2D lhs, PhysicsScene2D rhs)
	{
		return lhs.m_Handle != rhs.m_Handle;
	}

	public override int GetHashCode()
	{
		return m_Handle;
	}

	public override bool Equals(object other)
	{
		if (!(other is PhysicsScene2D physicsScene2D))
		{
			return false;
		}
		return m_Handle == physicsScene2D.m_Handle;
	}

	public bool Equals(PhysicsScene2D other)
	{
		return m_Handle == other.m_Handle;
	}

	public bool IsValid()
	{
		return IsValid_Internal(this);
	}

	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeMethod("IsPhysicsSceneValid")]
	private static bool IsValid_Internal(PhysicsScene2D physicsScene)
	{
		return IsValid_Internal_Injected(ref physicsScene);
	}

	public bool IsEmpty()
	{
		if (IsValid())
		{
			return IsEmpty_Internal(this);
		}
		throw new InvalidOperationException("Cannot check if physics scene is empty as it is invalid.");
	}

	[NativeMethod("IsPhysicsWorldEmpty")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	private static bool IsEmpty_Internal(PhysicsScene2D physicsScene)
	{
		return IsEmpty_Internal_Injected(ref physicsScene);
	}

	public bool Simulate(float step)
	{
		if (IsValid())
		{
			return Physics2D.Simulate_Internal(this, step);
		}
		throw new InvalidOperationException("Cannot simulate the physics scene as it is invalid.");
	}

	public RaycastHit2D Linecast(Vector2 start, Vector2 end, [DefaultValue("Physics2D.DefaultRaycastLayers")] int layerMask = -5)
	{
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, float.NegativeInfinity, float.PositiveInfinity);
		return Linecast_Internal(this, start, end, contactFilter);
	}

	public RaycastHit2D Linecast(Vector2 start, Vector2 end, ContactFilter2D contactFilter)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		return Linecast_Internal(this, start, end, contactFilter);
	}

	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeMethod("Linecast_Binding")]
	private static RaycastHit2D Linecast_Internal(PhysicsScene2D physicsScene, Vector2 start, Vector2 end, ContactFilter2D contactFilter)
	{
		Linecast_Internal_Injected(ref physicsScene, ref start, ref end, ref contactFilter, out var ret);
		return ret;
	}

	public int Linecast(Vector2 start, Vector2 end, RaycastHit2D[] results, [DefaultValue("Physics2D.DefaultRaycastLayers")] int layerMask = -5)
	{
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, float.NegativeInfinity, float.PositiveInfinity);
		return LinecastArray_Internal(this, start, end, contactFilter, results);
	}

	public int Linecast(Vector2 start, Vector2 end, ContactFilter2D contactFilter, RaycastHit2D[] results)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		return LinecastArray_Internal(this, start, end, contactFilter, results);
	}

	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeMethod("LinecastArray_Binding")]
	private static int LinecastArray_Internal(PhysicsScene2D physicsScene, Vector2 start, Vector2 end, ContactFilter2D contactFilter, [NotNull] RaycastHit2D[] results)
	{
		return LinecastArray_Internal_Injected(ref physicsScene, ref start, ref end, ref contactFilter, results);
	}

	public int Linecast(Vector2 start, Vector2 end, ContactFilter2D contactFilter, List<RaycastHit2D> results)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		return LinecastNonAllocList_Internal(this, start, end, contactFilter, results);
	}

	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeMethod("LinecastList_Binding")]
	private static int LinecastNonAllocList_Internal(PhysicsScene2D physicsScene, Vector2 start, Vector2 end, ContactFilter2D contactFilter, [NotNull] List<RaycastHit2D> results)
	{
		return LinecastNonAllocList_Internal_Injected(ref physicsScene, ref start, ref end, ref contactFilter, results);
	}

	public RaycastHit2D Raycast(Vector2 origin, Vector2 direction, float distance, [DefaultValue("Physics2D.DefaultRaycastLayers")] int layerMask = -5)
	{
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, float.NegativeInfinity, float.PositiveInfinity);
		return Raycast_Internal(this, origin, direction, distance, contactFilter);
	}

	public RaycastHit2D Raycast(Vector2 origin, Vector2 direction, float distance, ContactFilter2D contactFilter)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		return Raycast_Internal(this, origin, direction, distance, contactFilter);
	}

	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeMethod("Raycast_Binding")]
	private static RaycastHit2D Raycast_Internal(PhysicsScene2D physicsScene, Vector2 origin, Vector2 direction, float distance, ContactFilter2D contactFilter)
	{
		Raycast_Internal_Injected(ref physicsScene, ref origin, ref direction, distance, ref contactFilter, out var ret);
		return ret;
	}

	public int Raycast(Vector2 origin, Vector2 direction, float distance, RaycastHit2D[] results, [DefaultValue("Physics2D.DefaultRaycastLayers")] int layerMask = -5)
	{
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, float.NegativeInfinity, float.PositiveInfinity);
		return RaycastArray_Internal(this, origin, direction, distance, contactFilter, results);
	}

	public int Raycast(Vector2 origin, Vector2 direction, float distance, ContactFilter2D contactFilter, RaycastHit2D[] results)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		return RaycastArray_Internal(this, origin, direction, distance, contactFilter, results);
	}

	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeMethod("RaycastArray_Binding")]
	private static int RaycastArray_Internal(PhysicsScene2D physicsScene, Vector2 origin, Vector2 direction, float distance, ContactFilter2D contactFilter, [NotNull] RaycastHit2D[] results)
	{
		return RaycastArray_Internal_Injected(ref physicsScene, ref origin, ref direction, distance, ref contactFilter, results);
	}

	public int Raycast(Vector2 origin, Vector2 direction, float distance, ContactFilter2D contactFilter, List<RaycastHit2D> results)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		return RaycastList_Internal(this, origin, direction, distance, contactFilter, results);
	}

	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeMethod("RaycastList_Binding")]
	private static int RaycastList_Internal(PhysicsScene2D physicsScene, Vector2 origin, Vector2 direction, float distance, ContactFilter2D contactFilter, [NotNull] List<RaycastHit2D> results)
	{
		return RaycastList_Internal_Injected(ref physicsScene, ref origin, ref direction, distance, ref contactFilter, results);
	}

	public RaycastHit2D CircleCast(Vector2 origin, float radius, Vector2 direction, float distance, [DefaultValue("Physics2D.DefaultRaycastLayers")] int layerMask = -5)
	{
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, float.NegativeInfinity, float.PositiveInfinity);
		return CircleCast_Internal(this, origin, radius, direction, distance, contactFilter);
	}

	public RaycastHit2D CircleCast(Vector2 origin, float radius, Vector2 direction, float distance, ContactFilter2D contactFilter)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		return CircleCast_Internal(this, origin, radius, direction, distance, contactFilter);
	}

	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeMethod("CircleCast_Binding")]
	private static RaycastHit2D CircleCast_Internal(PhysicsScene2D physicsScene, Vector2 origin, float radius, Vector2 direction, float distance, ContactFilter2D contactFilter)
	{
		CircleCast_Internal_Injected(ref physicsScene, ref origin, radius, ref direction, distance, ref contactFilter, out var ret);
		return ret;
	}

	public int CircleCast(Vector2 origin, float radius, Vector2 direction, float distance, RaycastHit2D[] results, [DefaultValue("Physics2D.DefaultRaycastLayers")] int layerMask = -5)
	{
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, float.NegativeInfinity, float.PositiveInfinity);
		return CircleCastArray_Internal(this, origin, radius, direction, distance, contactFilter, results);
	}

	public int CircleCast(Vector2 origin, float radius, Vector2 direction, float distance, ContactFilter2D contactFilter, RaycastHit2D[] results)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		return CircleCastArray_Internal(this, origin, radius, direction, distance, contactFilter, results);
	}

	[NativeMethod("CircleCastArray_Binding")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	private static int CircleCastArray_Internal(PhysicsScene2D physicsScene, Vector2 origin, float radius, Vector2 direction, float distance, ContactFilter2D contactFilter, [NotNull] RaycastHit2D[] results)
	{
		return CircleCastArray_Internal_Injected(ref physicsScene, ref origin, radius, ref direction, distance, ref contactFilter, results);
	}

	public int CircleCast(Vector2 origin, float radius, Vector2 direction, float distance, ContactFilter2D contactFilter, List<RaycastHit2D> results)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		return CircleCastList_Internal(this, origin, radius, direction, distance, contactFilter, results);
	}

	[NativeMethod("CircleCastList_Binding")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	private static int CircleCastList_Internal(PhysicsScene2D physicsScene, Vector2 origin, float radius, Vector2 direction, float distance, ContactFilter2D contactFilter, [NotNull] List<RaycastHit2D> results)
	{
		return CircleCastList_Internal_Injected(ref physicsScene, ref origin, radius, ref direction, distance, ref contactFilter, results);
	}

	public RaycastHit2D BoxCast(Vector2 origin, Vector2 size, float angle, Vector2 direction, float distance, [DefaultValue("Physics2D.DefaultRaycastLayers")] int layerMask = -5)
	{
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, float.NegativeInfinity, float.PositiveInfinity);
		return BoxCast_Internal(this, origin, size, angle, direction, distance, contactFilter);
	}

	public RaycastHit2D BoxCast(Vector2 origin, Vector2 size, float angle, Vector2 direction, float distance, ContactFilter2D contactFilter)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		return BoxCast_Internal(this, origin, size, angle, direction, distance, contactFilter);
	}

	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeMethod("BoxCast_Binding")]
	private static RaycastHit2D BoxCast_Internal(PhysicsScene2D physicsScene, Vector2 origin, Vector2 size, float angle, Vector2 direction, float distance, ContactFilter2D contactFilter)
	{
		BoxCast_Internal_Injected(ref physicsScene, ref origin, ref size, angle, ref direction, distance, ref contactFilter, out var ret);
		return ret;
	}

	public int BoxCast(Vector2 origin, Vector2 size, float angle, Vector2 direction, float distance, RaycastHit2D[] results, [DefaultValue("Physics2D.DefaultRaycastLayers")] int layerMask = -5)
	{
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, float.NegativeInfinity, float.PositiveInfinity);
		return BoxCastArray_Internal(this, origin, size, angle, direction, distance, contactFilter, results);
	}

	public int BoxCast(Vector2 origin, Vector2 size, float angle, Vector2 direction, float distance, ContactFilter2D contactFilter, RaycastHit2D[] results)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		return BoxCastArray_Internal(this, origin, size, angle, direction, distance, contactFilter, results);
	}

	[NativeMethod("BoxCastArray_Binding")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	private static int BoxCastArray_Internal(PhysicsScene2D physicsScene, Vector2 origin, Vector2 size, float angle, Vector2 direction, float distance, ContactFilter2D contactFilter, [NotNull] RaycastHit2D[] results)
	{
		return BoxCastArray_Internal_Injected(ref physicsScene, ref origin, ref size, angle, ref direction, distance, ref contactFilter, results);
	}

	public int BoxCast(Vector2 origin, Vector2 size, float angle, Vector2 direction, float distance, ContactFilter2D contactFilter, List<RaycastHit2D> results)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		return BoxCastList_Internal(this, origin, size, angle, direction, distance, contactFilter, results);
	}

	[NativeMethod("BoxCastList_Binding")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	private static int BoxCastList_Internal(PhysicsScene2D physicsScene, Vector2 origin, Vector2 size, float angle, Vector2 direction, float distance, ContactFilter2D contactFilter, [NotNull] List<RaycastHit2D> results)
	{
		return BoxCastList_Internal_Injected(ref physicsScene, ref origin, ref size, angle, ref direction, distance, ref contactFilter, results);
	}

	public RaycastHit2D CapsuleCast(Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction, float distance, [DefaultValue("Physics2D.DefaultRaycastLayers")] int layerMask = -5)
	{
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, float.NegativeInfinity, float.PositiveInfinity);
		return CapsuleCast_Internal(this, origin, size, capsuleDirection, angle, direction, distance, contactFilter);
	}

	public RaycastHit2D CapsuleCast(Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction, float distance, ContactFilter2D contactFilter)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		return CapsuleCast_Internal(this, origin, size, capsuleDirection, angle, direction, distance, contactFilter);
	}

	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeMethod("CapsuleCast_Binding")]
	private static RaycastHit2D CapsuleCast_Internal(PhysicsScene2D physicsScene, Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction, float distance, ContactFilter2D contactFilter)
	{
		CapsuleCast_Internal_Injected(ref physicsScene, ref origin, ref size, capsuleDirection, angle, ref direction, distance, ref contactFilter, out var ret);
		return ret;
	}

	public int CapsuleCast(Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction, float distance, RaycastHit2D[] results, [DefaultValue("Physics2D.DefaultRaycastLayers")] int layerMask = -5)
	{
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, float.NegativeInfinity, float.PositiveInfinity);
		return CapsuleCastArray_Internal(this, origin, size, capsuleDirection, angle, direction, distance, contactFilter, results);
	}

	public int CapsuleCast(Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction, float distance, ContactFilter2D contactFilter, RaycastHit2D[] results)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		return CapsuleCastArray_Internal(this, origin, size, capsuleDirection, angle, direction, distance, contactFilter, results);
	}

	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeMethod("CapsuleCastArray_Binding")]
	private static int CapsuleCastArray_Internal(PhysicsScene2D physicsScene, Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction, float distance, ContactFilter2D contactFilter, [NotNull] RaycastHit2D[] results)
	{
		return CapsuleCastArray_Internal_Injected(ref physicsScene, ref origin, ref size, capsuleDirection, angle, ref direction, distance, ref contactFilter, results);
	}

	public int CapsuleCast(Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction, float distance, ContactFilter2D contactFilter, List<RaycastHit2D> results)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		return CapsuleCastList_Internal(this, origin, size, capsuleDirection, angle, direction, distance, contactFilter, results);
	}

	[NativeMethod("CapsuleCastList_Binding")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	private static int CapsuleCastList_Internal(PhysicsScene2D physicsScene, Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction, float distance, ContactFilter2D contactFilter, [NotNull] List<RaycastHit2D> results)
	{
		return CapsuleCastList_Internal_Injected(ref physicsScene, ref origin, ref size, capsuleDirection, angle, ref direction, distance, ref contactFilter, results);
	}

	public RaycastHit2D GetRayIntersection(Ray ray, float distance, [DefaultValue("Physics2D.DefaultRaycastLayers")] int layerMask = -5)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		return GetRayIntersection_Internal(this, ((Ray)(ref ray)).origin, ((Ray)(ref ray)).direction, distance, layerMask);
	}

	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeMethod("GetRayIntersection_Binding")]
	private static RaycastHit2D GetRayIntersection_Internal(PhysicsScene2D physicsScene, Vector3 origin, Vector3 direction, float distance, int layerMask)
	{
		GetRayIntersection_Internal_Injected(ref physicsScene, ref origin, ref direction, distance, layerMask, out var ret);
		return ret;
	}

	public int GetRayIntersection(Ray ray, float distance, RaycastHit2D[] results, [DefaultValue("Physics2D.DefaultRaycastLayers")] int layerMask = -5)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		return GetRayIntersectionArray_Internal(this, ((Ray)(ref ray)).origin, ((Ray)(ref ray)).direction, distance, layerMask, results);
	}

	[NativeMethod("GetRayIntersectionArray_Binding")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	private static int GetRayIntersectionArray_Internal(PhysicsScene2D physicsScene, Vector3 origin, Vector3 direction, float distance, int layerMask, [NotNull] RaycastHit2D[] results)
	{
		return GetRayIntersectionArray_Internal_Injected(ref physicsScene, ref origin, ref direction, distance, layerMask, results);
	}

	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeMethod("GetRayIntersectionList_Binding")]
	private static int GetRayIntersectionList_Internal(PhysicsScene2D physicsScene, Vector3 origin, Vector3 direction, float distance, int layerMask, [NotNull] List<RaycastHit2D> results)
	{
		return GetRayIntersectionList_Internal_Injected(ref physicsScene, ref origin, ref direction, distance, layerMask, results);
	}

	public Collider2D OverlapPoint(Vector2 point, [DefaultValue("Physics2D.DefaultRaycastLayers")] int layerMask = -5)
	{
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, float.NegativeInfinity, float.PositiveInfinity);
		return OverlapPoint_Internal(this, point, contactFilter);
	}

	public Collider2D OverlapPoint(Vector2 point, ContactFilter2D contactFilter)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		return OverlapPoint_Internal(this, point, contactFilter);
	}

	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeMethod("OverlapPoint_Binding")]
	private static Collider2D OverlapPoint_Internal(PhysicsScene2D physicsScene, Vector2 point, ContactFilter2D contactFilter)
	{
		return OverlapPoint_Internal_Injected(ref physicsScene, ref point, ref contactFilter);
	}

	public int OverlapPoint(Vector2 point, Collider2D[] results, [DefaultValue("Physics2D.DefaultRaycastLayers")] int layerMask = -5)
	{
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, float.NegativeInfinity, float.PositiveInfinity);
		return OverlapPointArray_Internal(this, point, contactFilter, results);
	}

	public int OverlapPoint(Vector2 point, ContactFilter2D contactFilter, Collider2D[] results)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		return OverlapPointArray_Internal(this, point, contactFilter, results);
	}

	[NativeMethod("OverlapPointArray_Binding")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	private static int OverlapPointArray_Internal(PhysicsScene2D physicsScene, Vector2 point, ContactFilter2D contactFilter, [NotNull] Collider2D[] results)
	{
		return OverlapPointArray_Internal_Injected(ref physicsScene, ref point, ref contactFilter, results);
	}

	public int OverlapPoint(Vector2 point, ContactFilter2D contactFilter, List<Collider2D> results)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		return OverlapPointList_Internal(this, point, contactFilter, results);
	}

	[NativeMethod("OverlapPointList_Binding")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	private static int OverlapPointList_Internal(PhysicsScene2D physicsScene, Vector2 point, ContactFilter2D contactFilter, [NotNull] List<Collider2D> results)
	{
		return OverlapPointList_Internal_Injected(ref physicsScene, ref point, ref contactFilter, results);
	}

	public Collider2D OverlapCircle(Vector2 point, float radius, [DefaultValue("Physics2D.DefaultRaycastLayers")] int layerMask = -5)
	{
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, float.NegativeInfinity, float.PositiveInfinity);
		return OverlapCircle_Internal(this, point, radius, contactFilter);
	}

	public Collider2D OverlapCircle(Vector2 point, float radius, ContactFilter2D contactFilter)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		return OverlapCircle_Internal(this, point, radius, contactFilter);
	}

	[NativeMethod("OverlapCircle_Binding")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	private static Collider2D OverlapCircle_Internal(PhysicsScene2D physicsScene, Vector2 point, float radius, ContactFilter2D contactFilter)
	{
		return OverlapCircle_Internal_Injected(ref physicsScene, ref point, radius, ref contactFilter);
	}

	public int OverlapCircle(Vector2 point, float radius, Collider2D[] results, [DefaultValue("Physics2D.DefaultRaycastLayers")] int layerMask = -5)
	{
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, float.NegativeInfinity, float.PositiveInfinity);
		return OverlapCircleArray_Internal(this, point, radius, contactFilter, results);
	}

	public int OverlapCircle(Vector2 point, float radius, ContactFilter2D contactFilter, Collider2D[] results)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		return OverlapCircleArray_Internal(this, point, radius, contactFilter, results);
	}

	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeMethod("OverlapCircleArray_Binding")]
	private static int OverlapCircleArray_Internal(PhysicsScene2D physicsScene, Vector2 point, float radius, ContactFilter2D contactFilter, [NotNull] Collider2D[] results)
	{
		return OverlapCircleArray_Internal_Injected(ref physicsScene, ref point, radius, ref contactFilter, results);
	}

	public int OverlapCircle(Vector2 point, float radius, ContactFilter2D contactFilter, List<Collider2D> results)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		return OverlapCircleList_Internal(this, point, radius, contactFilter, results);
	}

	[NativeMethod("OverlapCircleList_Binding")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	private static int OverlapCircleList_Internal(PhysicsScene2D physicsScene, Vector2 point, float radius, ContactFilter2D contactFilter, [NotNull] List<Collider2D> results)
	{
		return OverlapCircleList_Internal_Injected(ref physicsScene, ref point, radius, ref contactFilter, results);
	}

	public Collider2D OverlapBox(Vector2 point, Vector2 size, float angle, [DefaultValue("Physics2D.DefaultRaycastLayers")] int layerMask = -5)
	{
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, float.NegativeInfinity, float.PositiveInfinity);
		return OverlapBox_Internal(this, point, size, angle, contactFilter);
	}

	public Collider2D OverlapBox(Vector2 point, Vector2 size, float angle, ContactFilter2D contactFilter)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		return OverlapBox_Internal(this, point, size, angle, contactFilter);
	}

	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeMethod("OverlapBox_Binding")]
	private static Collider2D OverlapBox_Internal(PhysicsScene2D physicsScene, Vector2 point, Vector2 size, float angle, ContactFilter2D contactFilter)
	{
		return OverlapBox_Internal_Injected(ref physicsScene, ref point, ref size, angle, ref contactFilter);
	}

	public int OverlapBox(Vector2 point, Vector2 size, float angle, Collider2D[] results, [DefaultValue("Physics2D.DefaultRaycastLayers")] int layerMask = -5)
	{
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, float.NegativeInfinity, float.PositiveInfinity);
		return OverlapBoxArray_Internal(this, point, size, angle, contactFilter, results);
	}

	public int OverlapBox(Vector2 point, Vector2 size, float angle, ContactFilter2D contactFilter, Collider2D[] results)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		return OverlapBoxArray_Internal(this, point, size, angle, contactFilter, results);
	}

	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeMethod("OverlapBoxArray_Binding")]
	private static int OverlapBoxArray_Internal(PhysicsScene2D physicsScene, Vector2 point, Vector2 size, float angle, ContactFilter2D contactFilter, [NotNull] Collider2D[] results)
	{
		return OverlapBoxArray_Internal_Injected(ref physicsScene, ref point, ref size, angle, ref contactFilter, results);
	}

	public int OverlapBox(Vector2 point, Vector2 size, float angle, ContactFilter2D contactFilter, List<Collider2D> results)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		return OverlapBoxList_Internal(this, point, size, angle, contactFilter, results);
	}

	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeMethod("OverlapBoxList_Binding")]
	private static int OverlapBoxList_Internal(PhysicsScene2D physicsScene, Vector2 point, Vector2 size, float angle, ContactFilter2D contactFilter, [NotNull] List<Collider2D> results)
	{
		return OverlapBoxList_Internal_Injected(ref physicsScene, ref point, ref size, angle, ref contactFilter, results);
	}

	public Collider2D OverlapArea(Vector2 pointA, Vector2 pointB, [DefaultValue("Physics2D.DefaultRaycastLayers")] int layerMask = -5)
	{
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, float.NegativeInfinity, float.PositiveInfinity);
		return OverlapAreaToBoxArray_Internal(pointA, pointB, contactFilter);
	}

	public Collider2D OverlapArea(Vector2 pointA, Vector2 pointB, ContactFilter2D contactFilter)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		return OverlapAreaToBoxArray_Internal(pointA, pointB, contactFilter);
	}

	private Collider2D OverlapAreaToBoxArray_Internal(Vector2 pointA, Vector2 pointB, ContactFilter2D contactFilter)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		//IL_0044: Unknown result type (might be due to invalid IL or missing references)
		Vector2 point = (pointA + pointB) * 0.5f;
		Vector2 size = default(Vector2);
		((Vector2)(ref size))..ctor(Mathf.Abs(pointA.x - pointB.x), Math.Abs(pointA.y - pointB.y));
		return OverlapBox(point, size, 0f, contactFilter);
	}

	public int OverlapArea(Vector2 pointA, Vector2 pointB, Collider2D[] results, [DefaultValue("Physics2D.DefaultRaycastLayers")] int layerMask = -5)
	{
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, float.NegativeInfinity, float.PositiveInfinity);
		return OverlapAreaToBoxArray_Internal(pointA, pointB, contactFilter, results);
	}

	public int OverlapArea(Vector2 pointA, Vector2 pointB, ContactFilter2D contactFilter, Collider2D[] results)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		return OverlapAreaToBoxArray_Internal(pointA, pointB, contactFilter, results);
	}

	private int OverlapAreaToBoxArray_Internal(Vector2 pointA, Vector2 pointB, ContactFilter2D contactFilter, Collider2D[] results)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		//IL_0044: Unknown result type (might be due to invalid IL or missing references)
		Vector2 point = (pointA + pointB) * 0.5f;
		Vector2 size = default(Vector2);
		((Vector2)(ref size))..ctor(Mathf.Abs(pointA.x - pointB.x), Math.Abs(pointA.y - pointB.y));
		return OverlapBox(point, size, 0f, contactFilter, results);
	}

	public int OverlapArea(Vector2 pointA, Vector2 pointB, ContactFilter2D contactFilter, List<Collider2D> results)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		return OverlapAreaToBoxList_Internal(pointA, pointB, contactFilter, results);
	}

	private int OverlapAreaToBoxList_Internal(Vector2 pointA, Vector2 pointB, ContactFilter2D contactFilter, List<Collider2D> results)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		//IL_0044: Unknown result type (might be due to invalid IL or missing references)
		Vector2 point = (pointA + pointB) * 0.5f;
		Vector2 size = default(Vector2);
		((Vector2)(ref size))..ctor(Mathf.Abs(pointA.x - pointB.x), Math.Abs(pointA.y - pointB.y));
		return OverlapBox(point, size, 0f, contactFilter, results);
	}

	public Collider2D OverlapCapsule(Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, [DefaultValue("Physics2D.DefaultRaycastLayers")] int layerMask = -5)
	{
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, float.NegativeInfinity, float.PositiveInfinity);
		return OverlapCapsule_Internal(this, point, size, direction, angle, contactFilter);
	}

	public Collider2D OverlapCapsule(Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, ContactFilter2D contactFilter)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		return OverlapCapsule_Internal(this, point, size, direction, angle, contactFilter);
	}

	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeMethod("OverlapCapsule_Binding")]
	private static Collider2D OverlapCapsule_Internal(PhysicsScene2D physicsScene, Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, ContactFilter2D contactFilter)
	{
		return OverlapCapsule_Internal_Injected(ref physicsScene, ref point, ref size, direction, angle, ref contactFilter);
	}

	public int OverlapCapsule(Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, Collider2D[] results, [DefaultValue("Physics2D.DefaultRaycastLayers")] int layerMask = -5)
	{
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, float.NegativeInfinity, float.PositiveInfinity);
		return OverlapCapsuleArray_Internal(this, point, size, direction, angle, contactFilter, results);
	}

	public int OverlapCapsule(Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, ContactFilter2D contactFilter, Collider2D[] results)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		return OverlapCapsuleArray_Internal(this, point, size, direction, angle, contactFilter, results);
	}

	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeMethod("OverlapCapsuleArray_Binding")]
	private static int OverlapCapsuleArray_Internal(PhysicsScene2D physicsScene, Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, ContactFilter2D contactFilter, [NotNull] Collider2D[] results)
	{
		return OverlapCapsuleArray_Internal_Injected(ref physicsScene, ref point, ref size, direction, angle, ref contactFilter, results);
	}

	public int OverlapCapsule(Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, ContactFilter2D contactFilter, List<Collider2D> results)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		return OverlapCapsuleList_Internal(this, point, size, direction, angle, contactFilter, results);
	}

	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeMethod("OverlapCapsuleList_Binding")]
	private static int OverlapCapsuleList_Internal(PhysicsScene2D physicsScene, Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, ContactFilter2D contactFilter, [NotNull] List<Collider2D> results)
	{
		return OverlapCapsuleList_Internal_Injected(ref physicsScene, ref point, ref size, direction, angle, ref contactFilter, results);
	}

	public static int OverlapCollider(Collider2D collider, Collider2D[] results, [DefaultValue("Physics2D.DefaultRaycastLayers")] int layerMask = -5)
	{
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, float.NegativeInfinity, float.PositiveInfinity);
		return OverlapColliderArray_Internal(collider, contactFilter, results);
	}

	public static int OverlapCollider(Collider2D collider, ContactFilter2D contactFilter, Collider2D[] results)
	{
		return OverlapColliderArray_Internal(collider, contactFilter, results);
	}

	[NativeMethod("OverlapColliderArray_Binding")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	private static int OverlapColliderArray_Internal([NotNull] Collider2D collider, ContactFilter2D contactFilter, [NotNull] Collider2D[] results)
	{
		return OverlapColliderArray_Internal_Injected(collider, ref contactFilter, results);
	}

	public static int OverlapCollider(Collider2D collider, ContactFilter2D contactFilter, List<Collider2D> results)
	{
		return OverlapColliderList_Internal(collider, contactFilter, results);
	}

	[NativeMethod("OverlapColliderList_Binding")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	private static int OverlapColliderList_Internal([NotNull] Collider2D collider, ContactFilter2D contactFilter, [NotNull] List<Collider2D> results)
	{
		return OverlapColliderList_Internal_Injected(collider, ref contactFilter, results);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern bool IsValid_Internal_Injected(ref PhysicsScene2D physicsScene);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern bool IsEmpty_Internal_Injected(ref PhysicsScene2D physicsScene);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void Linecast_Internal_Injected(ref PhysicsScene2D physicsScene, ref Vector2 start, ref Vector2 end, ref ContactFilter2D contactFilter, out RaycastHit2D ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern int LinecastArray_Internal_Injected(ref PhysicsScene2D physicsScene, ref Vector2 start, ref Vector2 end, ref ContactFilter2D contactFilter, RaycastHit2D[] results);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern int LinecastNonAllocList_Internal_Injected(ref PhysicsScene2D physicsScene, ref Vector2 start, ref Vector2 end, ref ContactFilter2D contactFilter, List<RaycastHit2D> results);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void Raycast_Internal_Injected(ref PhysicsScene2D physicsScene, ref Vector2 origin, ref Vector2 direction, float distance, ref ContactFilter2D contactFilter, out RaycastHit2D ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern int RaycastArray_Internal_Injected(ref PhysicsScene2D physicsScene, ref Vector2 origin, ref Vector2 direction, float distance, ref ContactFilter2D contactFilter, RaycastHit2D[] results);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern int RaycastList_Internal_Injected(ref PhysicsScene2D physicsScene, ref Vector2 origin, ref Vector2 direction, float distance, ref ContactFilter2D contactFilter, List<RaycastHit2D> results);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void CircleCast_Internal_Injected(ref PhysicsScene2D physicsScene, ref Vector2 origin, float radius, ref Vector2 direction, float distance, ref ContactFilter2D contactFilter, out RaycastHit2D ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern int CircleCastArray_Internal_Injected(ref PhysicsScene2D physicsScene, ref Vector2 origin, float radius, ref Vector2 direction, float distance, ref ContactFilter2D contactFilter, RaycastHit2D[] results);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern int CircleCastList_Internal_Injected(ref PhysicsScene2D physicsScene, ref Vector2 origin, float radius, ref Vector2 direction, float distance, ref ContactFilter2D contactFilter, List<RaycastHit2D> results);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void BoxCast_Internal_Injected(ref PhysicsScene2D physicsScene, ref Vector2 origin, ref Vector2 size, float angle, ref Vector2 direction, float distance, ref ContactFilter2D contactFilter, out RaycastHit2D ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern int BoxCastArray_Internal_Injected(ref PhysicsScene2D physicsScene, ref Vector2 origin, ref Vector2 size, float angle, ref Vector2 direction, float distance, ref ContactFilter2D contactFilter, RaycastHit2D[] results);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern int BoxCastList_Internal_Injected(ref PhysicsScene2D physicsScene, ref Vector2 origin, ref Vector2 size, float angle, ref Vector2 direction, float distance, ref ContactFilter2D contactFilter, List<RaycastHit2D> results);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void CapsuleCast_Internal_Injected(ref PhysicsScene2D physicsScene, ref Vector2 origin, ref Vector2 size, CapsuleDirection2D capsuleDirection, float angle, ref Vector2 direction, float distance, ref ContactFilter2D contactFilter, out RaycastHit2D ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern int CapsuleCastArray_Internal_Injected(ref PhysicsScene2D physicsScene, ref Vector2 origin, ref Vector2 size, CapsuleDirection2D capsuleDirection, float angle, ref Vector2 direction, float distance, ref ContactFilter2D contactFilter, RaycastHit2D[] results);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern int CapsuleCastList_Internal_Injected(ref PhysicsScene2D physicsScene, ref Vector2 origin, ref Vector2 size, CapsuleDirection2D capsuleDirection, float angle, ref Vector2 direction, float distance, ref ContactFilter2D contactFilter, List<RaycastHit2D> results);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void GetRayIntersection_Internal_Injected(ref PhysicsScene2D physicsScene, ref Vector3 origin, ref Vector3 direction, float distance, int layerMask, out RaycastHit2D ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern int GetRayIntersectionArray_Internal_Injected(ref PhysicsScene2D physicsScene, ref Vector3 origin, ref Vector3 direction, float distance, int layerMask, RaycastHit2D[] results);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern int GetRayIntersectionList_Internal_Injected(ref PhysicsScene2D physicsScene, ref Vector3 origin, ref Vector3 direction, float distance, int layerMask, List<RaycastHit2D> results);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern Collider2D OverlapPoint_Internal_Injected(ref PhysicsScene2D physicsScene, ref Vector2 point, ref ContactFilter2D contactFilter);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern int OverlapPointArray_Internal_Injected(ref PhysicsScene2D physicsScene, ref Vector2 point, ref ContactFilter2D contactFilter, Collider2D[] results);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern int OverlapPointList_Internal_Injected(ref PhysicsScene2D physicsScene, ref Vector2 point, ref ContactFilter2D contactFilter, List<Collider2D> results);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern Collider2D OverlapCircle_Internal_Injected(ref PhysicsScene2D physicsScene, ref Vector2 point, float radius, ref ContactFilter2D contactFilter);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern int OverlapCircleArray_Internal_Injected(ref PhysicsScene2D physicsScene, ref Vector2 point, float radius, ref ContactFilter2D contactFilter, Collider2D[] results);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern int OverlapCircleList_Internal_Injected(ref PhysicsScene2D physicsScene, ref Vector2 point, float radius, ref ContactFilter2D contactFilter, List<Collider2D> results);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern Collider2D OverlapBox_Internal_Injected(ref PhysicsScene2D physicsScene, ref Vector2 point, ref Vector2 size, float angle, ref ContactFilter2D contactFilter);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern int OverlapBoxArray_Internal_Injected(ref PhysicsScene2D physicsScene, ref Vector2 point, ref Vector2 size, float angle, ref ContactFilter2D contactFilter, Collider2D[] results);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern int OverlapBoxList_Internal_Injected(ref PhysicsScene2D physicsScene, ref Vector2 point, ref Vector2 size, float angle, ref ContactFilter2D contactFilter, List<Collider2D> results);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern Collider2D OverlapCapsule_Internal_Injected(ref PhysicsScene2D physicsScene, ref Vector2 point, ref Vector2 size, CapsuleDirection2D direction, float angle, ref ContactFilter2D contactFilter);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern int OverlapCapsuleArray_Internal_Injected(ref PhysicsScene2D physicsScene, ref Vector2 point, ref Vector2 size, CapsuleDirection2D direction, float angle, ref ContactFilter2D contactFilter, Collider2D[] results);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern int OverlapCapsuleList_Internal_Injected(ref PhysicsScene2D physicsScene, ref Vector2 point, ref Vector2 size, CapsuleDirection2D direction, float angle, ref ContactFilter2D contactFilter, List<Collider2D> results);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern int OverlapColliderArray_Internal_Injected(Collider2D collider, ref ContactFilter2D contactFilter, Collider2D[] results);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern int OverlapColliderList_Internal_Injected(Collider2D collider, ref ContactFilter2D contactFilter, List<Collider2D> results);
}
public static class PhysicsSceneExtensions2D
{
	public static PhysicsScene2D GetPhysicsScene2D(this Scene scene)
	{
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		if (!((Scene)(ref scene)).IsValid())
		{
			throw new ArgumentException("Cannot get physics scene; Unity scene is invalid.", "scene");
		}
		PhysicsScene2D physicsScene_Internal = GetPhysicsScene_Internal(scene);
		if (physicsScene_Internal.IsValid())
		{
			return physicsScene_Internal;
		}
		throw new Exception("The physics scene associated with the Unity scene is invalid.");
	}

	[NativeMethod("GetPhysicsSceneFromUnityScene")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	private static PhysicsScene2D GetPhysicsScene_Internal(Scene scene)
	{
		GetPhysicsScene_Internal_Injected(ref scene, out var ret);
		return ret;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void GetPhysicsScene_Internal_Injected(ref Scene scene, out PhysicsScene2D ret);
}
[NativeHeader("Physics2DScriptingClasses.h")]
[NativeHeader("Modules/Physics2D/PhysicsManager2D.h")]
[NativeHeader("Physics2DScriptingClasses.h")]
[StaticAccessor(/*Could not decode attribute arguments.*/)]
public class Physics2D
{
	public const int IgnoreRaycastLayer = 4;

	public const int DefaultRaycastLayers = -5;

	public const int AllLayers = -1;

	private static List<Rigidbody2D> m_LastDisabledRigidbody2D = new List<Rigidbody2D>();

	public static PhysicsScene2D defaultPhysicsScene => default(PhysicsScene2D);

	[StaticAccessor("GetPhysics2DSettings()")]
	public static extern int velocityIterations
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[StaticAccessor("GetPhysics2DSettings()")]
	public static extern int positionIterations
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[StaticAccessor("GetPhysics2DSettings()")]
	public static Vector2 gravity
	{
		get
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			get_gravity_Injected(out var ret);
			return ret;
		}
		set
		{
			set_gravity_Injected(ref value);
		}
	}

	[StaticAccessor("GetPhysics2DSettings()")]
	public static extern bool queriesHitTriggers
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[StaticAccessor("GetPhysics2DSettings()")]
	public static extern bool queriesStartInColliders
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[StaticAccessor("GetPhysics2DSettings()")]
	public static extern bool callbacksOnDisable
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[StaticAccessor("GetPhysics2DSettings()")]
	public static extern bool reuseCollisionCallbacks
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[StaticAccessor("GetPhysics2DSettings()")]
	public static extern bool autoSyncTransforms
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[StaticAccessor("GetPhysics2DSettings()")]
	public static extern bool autoSimulation
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[StaticAccessor("GetPhysics2DSettings()")]
	public static PhysicsJobOptions2D jobOptions
	{
		get
		{
			get_jobOptions_Injected(out var ret);
			return ret;
		}
		set
		{
			set_jobOptions_Injected(ref value);
		}
	}

	[StaticAccessor("GetPhysics2DSettings()")]
	public static extern float velocityThreshold
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[StaticAccessor("GetPhysics2DSettings()")]
	public static extern float maxLinearCorrection
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[StaticAccessor("GetPhysics2DSettings()")]
	public static extern float maxAngularCorrection
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[StaticAccessor("GetPhysics2DSettings()")]
	public static extern float maxTranslationSpeed
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[StaticAccessor("GetPhysics2DSettings()")]
	public static extern float maxRotationSpeed
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[StaticAccessor("GetPhysics2DSettings()")]
	public static extern float defaultContactOffset
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[StaticAccessor("GetPhysics2DSettings()")]
	public static extern float baumgarteScale
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[StaticAccessor("GetPhysics2DSettings()")]
	public static extern float baumgarteTOIScale
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[StaticAccessor("GetPhysics2DSettings()")]
	public static extern float timeToSleep
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[StaticAccessor("GetPhysics2DSettings()")]
	public static extern float linearSleepTolerance
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[StaticAccessor("GetPhysics2DSettings()")]
	public static extern float angularSleepTolerance
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[StaticAccessor("GetPhysics2DSettings()")]
	public static extern bool alwaysShowColliders
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[StaticAccessor("GetPhysics2DSettings()")]
	public static extern bool showColliderSleep
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[StaticAccessor("GetPhysics2DSettings()")]
	public static extern bool showColliderContacts
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[StaticAccessor("GetPhysics2DSettings()")]
	public static extern bool showColliderAABB
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[StaticAccessor("GetPhysics2DSettings()")]
	public static extern float contactArrowScale
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[StaticAccessor("GetPhysics2DSettings()")]
	public static Color colliderAwakeColor
	{
		get
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			get_colliderAwakeColor_Injected(out var ret);
			return ret;
		}
		set
		{
			set_colliderAwakeColor_Injected(ref value);
		}
	}

	[StaticAccessor("GetPhysics2DSettings()")]
	public static Color colliderAsleepColor
	{
		get
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			get_colliderAsleepColor_Injected(out var ret);
			return ret;
		}
		set
		{
			set_colliderAsleepColor_Injected(ref value);
		}
	}

	[StaticAccessor("GetPhysics2DSettings()")]
	public static Color colliderContactColor
	{
		get
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			get_colliderContactColor_Injected(out var ret);
			return ret;
		}
		set
		{
			set_colliderContactColor_Injected(ref value);
		}
	}

	[StaticAccessor("GetPhysics2DSettings()")]
	public static Color colliderAABBColor
	{
		get
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			get_colliderAABBColor_Injected(out var ret);
			return ret;
		}
		set
		{
			set_colliderAABBColor_Injected(ref value);
		}
	}

	public static bool Simulate(float step)
	{
		return Simulate_Internal(defaultPhysicsScene, step);
	}

	[NativeMethod("Simulate_Binding")]
	internal static bool Simulate_Internal(PhysicsScene2D physicsScene, float step)
	{
		return Simulate_Internal_Injected(ref physicsScene, step);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	public static extern void SyncTransforms();

	[ExcludeFromDocs]
	public static void IgnoreCollision([Writable] Collider2D collider1, [Writable] Collider2D collider2)
	{
		IgnoreCollision(collider1, collider2, ignore: true);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeMethod("IgnoreCollision_Binding")]
	public static extern void IgnoreCollision([NotNull][Writable] Collider2D collider1, [Writable][NotNull] Collider2D collider2, [DefaultValue("true")] bool ignore);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeMethod("GetIgnoreCollision_Binding")]
	public static extern bool GetIgnoreCollision([Writable] Collider2D collider1, [Writable] Collider2D collider2);

	[ExcludeFromDocs]
	public static void IgnoreLayerCollision(int layer1, int layer2)
	{
		IgnoreLayerCollision(layer1, layer2, ignore: true);
	}

	public static void IgnoreLayerCollision(int layer1, int layer2, bool ignore)
	{
		if (layer1 < 0 || layer1 > 31)
		{
			throw new ArgumentOutOfRangeException("layer1 is out of range. Layer numbers must be in the range 0 to 31.");
		}
		if (layer2 < 0 || layer2 > 31)
		{
			throw new ArgumentOutOfRangeException("layer2 is out of range. Layer numbers must be in the range 0 to 31.");
		}
		IgnoreLayerCollision_Internal(layer1, layer2, ignore);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[StaticAccessor("GetPhysics2DSettings()")]
	[NativeMethod("IgnoreLayerCollision")]
	private static extern void IgnoreLayerCollision_Internal(int layer1, int layer2, bool ignore);

	public static bool GetIgnoreLayerCollision(int layer1, int layer2)
	{
		if (layer1 < 0 || layer1 > 31)
		{
			throw new ArgumentOutOfRangeException("layer1 is out of range. Layer numbers must be in the range 0 to 31.");
		}
		if (layer2 < 0 || layer2 > 31)
		{
			throw new ArgumentOutOfRangeException("layer2 is out of range. Layer numbers must be in the range 0 to 31.");
		}
		return GetIgnoreLayerCollision_Internal(layer1, layer2);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[StaticAccessor("GetPhysics2DSettings()")]
	[NativeMethod("GetIgnoreLayerCollision")]
	private static extern bool GetIgnoreLayerCollision_Internal(int layer1, int layer2);

	public static void SetLayerCollisionMask(int layer, int layerMask)
	{
		if (layer < 0 || layer > 31)
		{
			throw new ArgumentOutOfRangeException("layer1 is out of range. Layer numbers must be in the range 0 to 31.");
		}
		SetLayerCollisionMask_Internal(layer, layerMask);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[StaticAccessor("GetPhysics2DSettings()")]
	[NativeMethod("SetLayerCollisionMask")]
	private static extern void SetLayerCollisionMask_Internal(int layer, int layerMask);

	public static int GetLayerCollisionMask(int layer)
	{
		if (layer < 0 || layer > 31)
		{
			throw new ArgumentOutOfRangeException("layer1 is out of range. Layer numbers must be in the range 0 to 31.");
		}
		return GetLayerCollisionMask_Internal(layer);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[StaticAccessor("GetPhysics2DSettings()")]
	[NativeMethod("GetLayerCollisionMask")]
	private static extern int GetLayerCollisionMask_Internal(int layer);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	public static extern bool IsTouching([Writable][NotNull] Collider2D collider1, [NotNull][Writable] Collider2D collider2);

	public static bool IsTouching([Writable] Collider2D collider1, [Writable] Collider2D collider2, ContactFilter2D contactFilter)
	{
		return IsTouching_TwoCollidersWithFilter(collider1, collider2, contactFilter);
	}

	[NativeMethod("IsTouching")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	private static bool IsTouching_TwoCollidersWithFilter([NotNull][Writable] Collider2D collider1, [Writable][NotNull] Collider2D collider2, ContactFilter2D contactFilter)
	{
		return IsTouching_TwoCollidersWithFilter_Injected(collider1, collider2, ref contactFilter);
	}

	public static bool IsTouching([Writable] Collider2D collider, ContactFilter2D contactFilter)
	{
		return IsTouching_SingleColliderWithFilter(collider, contactFilter);
	}

	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeMethod("IsTouching")]
	private static bool IsTouching_SingleColliderWithFilter([NotNull][Writable] Collider2D collider, ContactFilter2D contactFilter)
	{
		return IsTouching_SingleColliderWithFilter_Injected(collider, ref contactFilter);
	}

	[ExcludeFromDocs]
	public static bool IsTouchingLayers([Writable] Collider2D collider)
	{
		return IsTouchingLayers(collider, -1);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	public static extern bool IsTouchingLayers([NotNull][Writable] Collider2D collider, [DefaultValue("Physics2D.AllLayers")] int layerMask);

	public static ColliderDistance2D Distance([Writable] Collider2D colliderA, [Writable] Collider2D colliderB)
	{
		if ((Object)(object)colliderA == (Object)null)
		{
			throw new ArgumentNullException("ColliderA cannot be NULL.");
		}
		if ((Object)(object)colliderB == (Object)null)
		{
			throw new ArgumentNullException("ColliderB cannot be NULL.");
		}
		if ((Object)(object)colliderA == (Object)(object)colliderB)
		{
			throw new ArgumentException("Cannot calculate the distance between the same collider.");
		}
		return Distance_Internal(colliderA, colliderB);
	}

	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeMethod("Distance")]
	private static ColliderDistance2D Distance_Internal([NotNull][Writable] Collider2D colliderA, [NotNull][Writable] Collider2D colliderB)
	{
		Distance_Internal_Injected(colliderA, colliderB, out var ret);
		return ret;
	}

	public static Vector2 ClosestPoint(Vector2 position, Collider2D collider)
	{
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_001f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)collider == (Object)null)
		{
			throw new ArgumentNullException("Collider cannot be NULL.");
		}
		return ClosestPoint_Collider(position, collider);
	}

	public static Vector2 ClosestPoint(Vector2 position, Rigidbody2D rigidbody)
	{
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_001f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)rigidbody == (Object)null)
		{
			throw new ArgumentNullException("Rigidbody cannot be NULL.");
		}
		return ClosestPoint_Rigidbody(position, rigidbody);
	}

	[NativeMethod("ClosestPoint")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	private static Vector2 ClosestPoint_Collider(Vector2 position, [NotNull] Collider2D collider)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		ClosestPoint_Collider_Injected(ref position, collider, out var ret);
		return ret;
	}

	[NativeMethod("ClosestPoint")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	private static Vector2 ClosestPoint_Rigidbody(Vector2 position, [NotNull] Rigidbody2D rigidbody)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		ClosestPoint_Rigidbody_Injected(ref position, rigidbody, out var ret);
		return ret;
	}

	[ExcludeFromDocs]
	public static RaycastHit2D Linecast(Vector2 start, Vector2 end)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		return defaultPhysicsScene.Linecast(start, end);
	}

	[ExcludeFromDocs]
	public static RaycastHit2D Linecast(Vector2 start, Vector2 end, int layerMask)
	{
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, float.NegativeInfinity, float.PositiveInfinity);
		return defaultPhysicsScene.Linecast(start, end, contactFilter);
	}

	[ExcludeFromDocs]
	public static RaycastHit2D Linecast(Vector2 start, Vector2 end, int layerMask, float minDepth)
	{
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, minDepth, float.PositiveInfinity);
		return defaultPhysicsScene.Linecast(start, end, contactFilter);
	}

	public static RaycastHit2D Linecast(Vector2 start, Vector2 end, [DefaultValue("DefaultRaycastLayers")] int layerMask, [DefaultValue("-Mathf.Infinity")] float minDepth, [DefaultValue("Mathf.Infinity")] float maxDepth)
	{
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, minDepth, maxDepth);
		return defaultPhysicsScene.Linecast(start, end, contactFilter);
	}

	public static int Linecast(Vector2 start, Vector2 end, ContactFilter2D contactFilter, RaycastHit2D[] results)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		return defaultPhysicsScene.Linecast(start, end, contactFilter, results);
	}

	public static int Linecast(Vector2 start, Vector2 end, ContactFilter2D contactFilter, List<RaycastHit2D> results)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		return defaultPhysicsScene.Linecast(start, end, contactFilter, results);
	}

	[ExcludeFromDocs]
	public static RaycastHit2D[] LinecastAll(Vector2 start, Vector2 end)
	{
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(-5, float.NegativeInfinity, float.PositiveInfinity);
		return LinecastAll_Internal(defaultPhysicsScene, start, end, contactFilter);
	}

	[ExcludeFromDocs]
	public static RaycastHit2D[] LinecastAll(Vector2 start, Vector2 end, int layerMask)
	{
		//IL_0017: 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)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, float.NegativeInfinity, float.PositiveInfinity);
		return LinecastAll_Internal(defaultPhysicsScene, start, end, contactFilter);
	}

	[ExcludeFromDocs]
	public static RaycastHit2D[] LinecastAll(Vector2 start, Vector2 end, int layerMask, float minDepth)
	{
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, minDepth, float.PositiveInfinity);
		return LinecastAll_Internal(defaultPhysicsScene, start, end, contactFilter);
	}

	public static RaycastHit2D[] LinecastAll(Vector2 start, Vector2 end, [DefaultValue("DefaultRaycastLayers")] int layerMask, [DefaultValue("-Mathf.Infinity")] float minDepth, [DefaultValue("Mathf.Infinity")] float maxDepth)
	{
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, minDepth, maxDepth);
		return LinecastAll_Internal(defaultPhysicsScene, start, end, contactFilter);
	}

	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeMethod("LinecastAll_Binding")]
	private static RaycastHit2D[] LinecastAll_Internal(PhysicsScene2D physicsScene, Vector2 start, Vector2 end, ContactFilter2D contactFilter)
	{
		return LinecastAll_Internal_Injected(ref physicsScene, ref start, ref end, ref contactFilter);
	}

	[ExcludeFromDocs]
	public static int LinecastNonAlloc(Vector2 start, Vector2 end, RaycastHit2D[] results)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		return defaultPhysicsScene.Linecast(start, end, results);
	}

	[ExcludeFromDocs]
	public static int LinecastNonAlloc(Vector2 start, Vector2 end, RaycastHit2D[] results, int layerMask)
	{
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, float.NegativeInfinity, float.PositiveInfinity);
		return defaultPhysicsScene.Linecast(start, end, contactFilter, results);
	}

	[ExcludeFromDocs]
	public static int LinecastNonAlloc(Vector2 start, Vector2 end, RaycastHit2D[] results, int layerMask, float minDepth)
	{
		//IL_0017: 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)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, minDepth, float.PositiveInfinity);
		return defaultPhysicsScene.Linecast(start, end, contactFilter, results);
	}

	public static int LinecastNonAlloc(Vector2 start, Vector2 end, RaycastHit2D[] results, [DefaultValue("DefaultRaycastLayers")] int layerMask, [DefaultValue("-Mathf.Infinity")] float minDepth, [DefaultValue("Mathf.Infinity")] float maxDepth)
	{
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, minDepth, maxDepth);
		return defaultPhysicsScene.Linecast(start, end, contactFilter, results);
	}

	[ExcludeFromDocs]
	public static RaycastHit2D Raycast(Vector2 origin, Vector2 direction)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		return defaultPhysicsScene.Raycast(origin, direction, float.PositiveInfinity);
	}

	[ExcludeFromDocs]
	public static RaycastHit2D Raycast(Vector2 origin, Vector2 direction, float distance)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		return defaultPhysicsScene.Raycast(origin, direction, distance);
	}

	[RequiredByNativeCode]
	[ExcludeFromDocs]
	public static RaycastHit2D Raycast(Vector2 origin, Vector2 direction, float distance, int layerMask)
	{
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, float.NegativeInfinity, float.PositiveInfinity);
		return defaultPhysicsScene.Raycast(origin, direction, distance, contactFilter);
	}

	[ExcludeFromDocs]
	public static RaycastHit2D Raycast(Vector2 origin, Vector2 direction, float distance, int layerMask, float minDepth)
	{
		//IL_0017: 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)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, minDepth, float.PositiveInfinity);
		return defaultPhysicsScene.Raycast(origin, direction, distance, contactFilter);
	}

	public static RaycastHit2D Raycast(Vector2 origin, Vector2 direction, [DefaultValue("Mathf.Infinity")] float distance, [DefaultValue("DefaultRaycastLayers")] int layerMask, [DefaultValue("-Mathf.Infinity")] float minDepth, [DefaultValue("Mathf.Infinity")] float maxDepth)
	{
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, minDepth, maxDepth);
		return defaultPhysicsScene.Raycast(origin, direction, distance, contactFilter);
	}

	[ExcludeFromDocs]
	public static int Raycast(Vector2 origin, Vector2 direction, ContactFilter2D contactFilter, RaycastHit2D[] results)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		return defaultPhysicsScene.Raycast(origin, direction, float.PositiveInfinity, contactFilter, results);
	}

	public static int Raycast(Vector2 origin, Vector2 direction, ContactFilter2D contactFilter, RaycastHit2D[] results, [DefaultValue("Mathf.Infinity")] float distance)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		return defaultPhysicsScene.Raycast(origin, direction, distance, contactFilter, results);
	}

	public static int Raycast(Vector2 origin, Vector2 direction, ContactFilter2D contactFilter, List<RaycastHit2D> results, [DefaultValue("Mathf.Infinity")] float distance = float.PositiveInfinity)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		return defaultPhysicsScene.Raycast(origin, direction, distance, contactFilter, results);
	}

	[ExcludeFromDocs]
	public static int RaycastNonAlloc(Vector2 origin, Vector2 direction, RaycastHit2D[] results)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		return defaultPhysicsScene.Raycast(origin, direction, float.PositiveInfinity, results);
	}

	[ExcludeFromDocs]
	public static int RaycastNonAlloc(Vector2 origin, Vector2 direction, RaycastHit2D[] results, float distance)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		return defaultPhysicsScene.Raycast(origin, direction, distance, results);
	}

	[ExcludeFromDocs]
	public static int RaycastNonAlloc(Vector2 origin, Vector2 direction, RaycastHit2D[] results, float distance, int layerMask)
	{
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, float.NegativeInfinity, float.PositiveInfinity);
		return defaultPhysicsScene.Raycast(origin, direction, distance, contactFilter, results);
	}

	[ExcludeFromDocs]
	public static int RaycastNonAlloc(Vector2 origin, Vector2 direction, RaycastHit2D[] results, float distance, int layerMask, float minDepth)
	{
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, minDepth, float.PositiveInfinity);
		return defaultPhysicsScene.Raycast(origin, direction, distance, contactFilter, results);
	}

	public static int RaycastNonAlloc(Vector2 origin, Vector2 direction, RaycastHit2D[] results, [DefaultValue("Mathf.Infinity")] float distance, [DefaultValue("DefaultRaycastLayers")] int layerMask, [DefaultValue("-Mathf.Infinity")] float minDepth, [DefaultValue("Mathf.Infinity")] float maxDepth)
	{
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, minDepth, maxDepth);
		return defaultPhysicsScene.Raycast(origin, direction, distance, contactFilter, results);
	}

	[ExcludeFromDocs]
	public static RaycastHit2D[] RaycastAll(Vector2 origin, Vector2 direction)
	{
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(-5, float.NegativeInfinity, float.PositiveInfinity);
		return RaycastAll_Internal(defaultPhysicsScene, origin, direction, float.PositiveInfinity, contactFilter);
	}

	[ExcludeFromDocs]
	public static RaycastHit2D[] RaycastAll(Vector2 origin, Vector2 direction, float distance)
	{
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(-5, float.NegativeInfinity, float.PositiveInfinity);
		return RaycastAll_Internal(defaultPhysicsScene, origin, direction, distance, contactFilter);
	}

	[ExcludeFromDocs]
	public static RaycastHit2D[] RaycastAll(Vector2 origin, Vector2 direction, float distance, int layerMask)
	{
		//IL_0017: 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)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, float.NegativeInfinity, float.PositiveInfinity);
		return RaycastAll_Internal(defaultPhysicsScene, origin, direction, distance, contactFilter);
	}

	[ExcludeFromDocs]
	public static RaycastHit2D[] RaycastAll(Vector2 origin, Vector2 direction, float distance, int layerMask, float minDepth)
	{
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, minDepth, float.PositiveInfinity);
		return RaycastAll_Internal(defaultPhysicsScene, origin, direction, distance, contactFilter);
	}

	public static RaycastHit2D[] RaycastAll(Vector2 origin, Vector2 direction, [DefaultValue("Mathf.Infinity")] float distance, [DefaultValue("DefaultRaycastLayers")] int layerMask, [DefaultValue("-Mathf.Infinity")] float minDepth, [DefaultValue("Mathf.Infinity")] float maxDepth)
	{
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, minDepth, maxDepth);
		return RaycastAll_Internal(defaultPhysicsScene, origin, direction, distance, contactFilter);
	}

	[NativeMethod("RaycastAll_Binding")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	private static RaycastHit2D[] RaycastAll_Internal(PhysicsScene2D physicsScene, Vector2 origin, Vector2 direction, float distance, ContactFilter2D contactFilter)
	{
		return RaycastAll_Internal_Injected(ref physicsScene, ref origin, ref direction, distance, ref contactFilter);
	}

	[ExcludeFromDocs]
	public static RaycastHit2D CircleCast(Vector2 origin, float radius, Vector2 direction)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		return defaultPhysicsScene.CircleCast(origin, radius, direction, float.PositiveInfinity);
	}

	[ExcludeFromDocs]
	public static RaycastHit2D CircleCast(Vector2 origin, float radius, Vector2 direction, float distance)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		return defaultPhysicsScene.CircleCast(origin, radius, direction, distance);
	}

	[ExcludeFromDocs]
	public static RaycastHit2D CircleCast(Vector2 origin, float radius, Vector2 direction, float distance, int layerMask)
	{
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, float.NegativeInfinity, float.PositiveInfinity);
		return defaultPhysicsScene.CircleCast(origin, radius, direction, distance, contactFilter);
	}

	[ExcludeFromDocs]
	public static RaycastHit2D CircleCast(Vector2 origin, float radius, Vector2 direction, float distance, int layerMask, float minDepth)
	{
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, minDepth, float.PositiveInfinity);
		return defaultPhysicsScene.CircleCast(origin, radius, direction, distance, contactFilter);
	}

	public static RaycastHit2D CircleCast(Vector2 origin, float radius, Vector2 direction, [DefaultValue("Mathf.Infinity")] float distance, [DefaultValue("DefaultRaycastLayers")] int layerMask, [DefaultValue("-Mathf.Infinity")] float minDepth, [DefaultValue("Mathf.Infinity")] float maxDepth)
	{
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, minDepth, maxDepth);
		return defaultPhysicsScene.CircleCast(origin, radius, direction, distance, contactFilter);
	}

	[ExcludeFromDocs]
	public static int CircleCast(Vector2 origin, float radius, Vector2 direction, ContactFilter2D contactFilter, RaycastHit2D[] results)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		return defaultPhysicsScene.CircleCast(origin, radius, direction, float.PositiveInfinity, contactFilter, results);
	}

	public static int CircleCast(Vector2 origin, float radius, Vector2 direction, ContactFilter2D contactFilter, RaycastHit2D[] results, [DefaultValue("Mathf.Infinity")] float distance)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		return defaultPhysicsScene.CircleCast(origin, radius, direction, distance, contactFilter, results);
	}

	public static int CircleCast(Vector2 origin, float radius, Vector2 direction, ContactFilter2D contactFilter, List<RaycastHit2D> results, [DefaultValue("Mathf.Infinity")] float distance = float.PositiveInfinity)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		return defaultPhysicsScene.CircleCast(origin, radius, direction, distance, contactFilter, results);
	}

	[ExcludeFromDocs]
	public static RaycastHit2D[] CircleCastAll(Vector2 origin, float radius, Vector2 direction)
	{
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(-5, float.NegativeInfinity, float.PositiveInfinity);
		return CircleCastAll_Internal(defaultPhysicsScene, origin, radius, direction, float.PositiveInfinity, contactFilter);
	}

	[ExcludeFromDocs]
	public static RaycastHit2D[] CircleCastAll(Vector2 origin, float radius, Vector2 direction, float distance)
	{
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(-5, float.NegativeInfinity, float.PositiveInfinity);
		return CircleCastAll_Internal(defaultPhysicsScene, origin, radius, direction, distance, contactFilter);
	}

	[ExcludeFromDocs]
	public static RaycastHit2D[] CircleCastAll(Vector2 origin, float radius, Vector2 direction, float distance, int layerMask)
	{
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, float.NegativeInfinity, float.PositiveInfinity);
		return CircleCastAll_Internal(defaultPhysicsScene, origin, radius, direction, distance, contactFilter);
	}

	[ExcludeFromDocs]
	public static RaycastHit2D[] CircleCastAll(Vector2 origin, float radius, Vector2 direction, float distance, int layerMask, float minDepth)
	{
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, minDepth, float.PositiveInfinity);
		return CircleCastAll_Internal(defaultPhysicsScene, origin, radius, direction, distance, contactFilter);
	}

	public static RaycastHit2D[] CircleCastAll(Vector2 origin, float radius, Vector2 direction, [DefaultValue("Mathf.Infinity")] float distance, [DefaultValue("DefaultRaycastLayers")] int layerMask, [DefaultValue("-Mathf.Infinity")] float minDepth, [DefaultValue("Mathf.Infinity")] float maxDepth)
	{
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, minDepth, maxDepth);
		return CircleCastAll_Internal(defaultPhysicsScene, origin, radius, direction, distance, contactFilter);
	}

	[NativeMethod("CircleCastAll_Binding")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	private static RaycastHit2D[] CircleCastAll_Internal(PhysicsScene2D physicsScene, Vector2 origin, float radius, Vector2 direction, float distance, ContactFilter2D contactFilter)
	{
		return CircleCastAll_Internal_Injected(ref physicsScene, ref origin, radius, ref direction, distance, ref contactFilter);
	}

	[ExcludeFromDocs]
	public static int CircleCastNonAlloc(Vector2 origin, float radius, Vector2 direction, RaycastHit2D[] results)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		return defaultPhysicsScene.CircleCast(origin, radius, direction, float.PositiveInfinity, results);
	}

	[ExcludeFromDocs]
	public static int CircleCastNonAlloc(Vector2 origin, float radius, Vector2 direction, RaycastHit2D[] results, float distance)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		return defaultPhysicsScene.CircleCast(origin, radius, direction, distance, results);
	}

	[ExcludeFromDocs]
	public static int CircleCastNonAlloc(Vector2 origin, float radius, Vector2 direction, RaycastHit2D[] results, float distance, int layerMask)
	{
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, float.NegativeInfinity, float.PositiveInfinity);
		return defaultPhysicsScene.CircleCast(origin, radius, direction, distance, contactFilter, results);
	}

	[ExcludeFromDocs]
	public static int CircleCastNonAlloc(Vector2 origin, float radius, Vector2 direction, RaycastHit2D[] results, float distance, int layerMask, float minDepth)
	{
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, minDepth, float.PositiveInfinity);
		return defaultPhysicsScene.CircleCast(origin, radius, direction, distance, contactFilter, results);
	}

	public static int CircleCastNonAlloc(Vector2 origin, float radius, Vector2 direction, RaycastHit2D[] results, [DefaultValue("Mathf.Infinity")] float distance, [DefaultValue("DefaultRaycastLayers")] int layerMask, [DefaultValue("-Mathf.Infinity")] float minDepth, [DefaultValue("Mathf.Infinity")] float maxDepth)
	{
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		ContactFilter2D contactFilter = ContactFilter2D.CreateLegacyFilter(layerMask, minDepth, maxDepth);
		return defaultPhysicsScene.CircleCast(origin, radius, direction, distance, contactFilter, results);
	}

	[ExcludeFromDocs]
	public static RaycastHit2D BoxCast(Vector2 origin, Vector2 size, float angle, Vector2 direction)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		return defaultPhysicsScene.BoxCast(origin, size, angle, direction, float.PositiveInfinity);
	}

	[ExcludeFromDocs]
	public static RaycastHit2D BoxCast(Vector2 origin, Vector2 size, float angle, Vector2 direction, float distance)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		return defaultPhysicsScene.BoxCast(origin, size, angle, direction, distance);
	}

	[Exclu

Room Architect Tool_Data/Managed/UnityEngine.PhysicsModule.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
using Unity.Jobs;
using Unity.Jobs.LowLevel.Unsafe;
using UnityEngine;
using UnityEngine.Bindings;
using UnityEngine.Internal;
using UnityEngine.SceneManagement;
using UnityEngine.Scripting;

[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: UnityEngineModuleAssembly]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine;

public enum RigidbodyConstraints
{
	None = 0,
	FreezePositionX = 2,
	FreezePositionY = 4,
	FreezePositionZ = 8,
	FreezeRotationX = 16,
	FreezeRotationY = 32,
	FreezeRotationZ = 64,
	FreezePosition = 14,
	FreezeRotation = 112,
	FreezeAll = 126
}
public enum ForceMode
{
	Force = 0,
	Acceleration = 5,
	Impulse = 1,
	VelocityChange = 2
}
[Flags]
[Obsolete("JointDriveMode is no longer supported")]
public enum JointDriveMode
{
	[Obsolete("JointDriveMode.None is no longer supported")]
	None = 0,
	[Obsolete("JointDriveMode.Position is no longer supported")]
	Position = 1,
	[Obsolete("JointDriveMode.Velocity is no longer supported")]
	Velocity = 2,
	[Obsolete("JointDriveMode.PositionAndvelocity is no longer supported")]
	PositionAndVelocity = 3
}
public enum JointProjectionMode
{
	None,
	PositionAndRotation,
	[Obsolete("JointProjectionMode.PositionOnly is no longer supported", true)]
	[EditorBrowsable(EditorBrowsableState.Never)]
	PositionOnly
}
[Flags]
public enum MeshColliderCookingOptions
{
	None = 0,
	[Obsolete("No longer used because the problem this was trying to solve is gone since Unity 2018.3", true)]
	InflateConvexMesh = 1,
	CookForFasterSimulation = 2,
	EnableMeshCleaning = 4,
	WeldColocatedVertices = 8
}
public struct WheelFrictionCurve
{
	private float m_ExtremumSlip;

	private float m_ExtremumValue;

	private float m_AsymptoteSlip;

	private float m_AsymptoteValue;

	private float m_Stiffness;

	public float extremumSlip
	{
		get
		{
			return m_ExtremumSlip;
		}
		set
		{
			m_ExtremumSlip = value;
		}
	}

	public float extremumValue
	{
		get
		{
			return m_ExtremumValue;
		}
		set
		{
			m_ExtremumValue = value;
		}
	}

	public float asymptoteSlip
	{
		get
		{
			return m_AsymptoteSlip;
		}
		set
		{
			m_AsymptoteSlip = value;
		}
	}

	public float asymptoteValue
	{
		get
		{
			return m_AsymptoteValue;
		}
		set
		{
			m_AsymptoteValue = value;
		}
	}

	public float stiffness
	{
		get
		{
			return m_Stiffness;
		}
		set
		{
			m_Stiffness = value;
		}
	}
}
public struct SoftJointLimit
{
	private float m_Limit;

	private float m_Bounciness;

	private float m_ContactDistance;

	public float limit
	{
		get
		{
			return m_Limit;
		}
		set
		{
			m_Limit = value;
		}
	}

	[Obsolete("Spring has been moved to SoftJointLimitSpring class in Unity 5", true)]
	[EditorBrowsable(EditorBrowsableState.Never)]
	public float spring
	{
		get
		{
			return 0f;
		}
		set
		{
		}
	}

	[EditorBrowsable(EditorBrowsableState.Never)]
	[Obsolete("Damper has been moved to SoftJointLimitSpring class in Unity 5", true)]
	public float damper
	{
		get
		{
			return 0f;
		}
		set
		{
		}
	}

	public float bounciness
	{
		get
		{
			return m_Bounciness;
		}
		set
		{
			m_Bounciness = value;
		}
	}

	public float contactDistance
	{
		get
		{
			return m_ContactDistance;
		}
		set
		{
			m_ContactDistance = value;
		}
	}

	[EditorBrowsable(EditorBrowsableState.Never)]
	[Obsolete("Use SoftJointLimit.bounciness instead", true)]
	public float bouncyness
	{
		get
		{
			return m_Bounciness;
		}
		set
		{
			m_Bounciness = value;
		}
	}
}
public struct SoftJointLimitSpring
{
	private float m_Spring;

	private float m_Damper;

	public float spring
	{
		get
		{
			return m_Spring;
		}
		set
		{
			m_Spring = value;
		}
	}

	public float damper
	{
		get
		{
			return m_Damper;
		}
		set
		{
			m_Damper = value;
		}
	}
}
public struct JointDrive
{
	private float m_PositionSpring;

	private float m_PositionDamper;

	private float m_MaximumForce;

	[Obsolete("JointDriveMode is obsolete")]
	public JointDriveMode mode
	{
		get
		{
			return JointDriveMode.None;
		}
		set
		{
		}
	}

	public float positionSpring
	{
		get
		{
			return m_PositionSpring;
		}
		set
		{
			m_PositionSpring = value;
		}
	}

	public float positionDamper
	{
		get
		{
			return m_PositionDamper;
		}
		set
		{
			m_PositionDamper = value;
		}
	}

	public float maximumForce
	{
		get
		{
			return m_MaximumForce;
		}
		set
		{
			m_MaximumForce = value;
		}
	}
}
public enum RigidbodyInterpolation
{
	None,
	Interpolate,
	Extrapolate
}
public struct JointMotor
{
	private float m_TargetVelocity;

	private float m_Force;

	private int m_FreeSpin;

	public float targetVelocity
	{
		get
		{
			return m_TargetVelocity;
		}
		set
		{
			m_TargetVelocity = value;
		}
	}

	public float force
	{
		get
		{
			return m_Force;
		}
		set
		{
			m_Force = value;
		}
	}

	public bool freeSpin
	{
		get
		{
			return m_FreeSpin == 1;
		}
		set
		{
			m_FreeSpin = (value ? 1 : 0);
		}
	}
}
public struct JointSpring
{
	public float spring;

	public float damper;

	public float targetPosition;
}
public struct JointLimits
{
	private float m_Min;

	private float m_Max;

	private float m_Bounciness;

	private float m_BounceMinVelocity;

	private float m_ContactDistance;

	[Obsolete("minBounce and maxBounce are replaced by a single JointLimits.bounciness for both limit ends.", true)]
	[EditorBrowsable(EditorBrowsableState.Never)]
	public float minBounce;

	[Obsolete("minBounce and maxBounce are replaced by a single JointLimits.bounciness for both limit ends.", true)]
	[EditorBrowsable(EditorBrowsableState.Never)]
	public float maxBounce;

	public float min
	{
		get
		{
			return m_Min;
		}
		set
		{
			m_Min = value;
		}
	}

	public float max
	{
		get
		{
			return m_Max;
		}
		set
		{
			m_Max = value;
		}
	}

	public float bounciness
	{
		get
		{
			return m_Bounciness;
		}
		set
		{
			m_Bounciness = value;
		}
	}

	public float bounceMinVelocity
	{
		get
		{
			return m_BounceMinVelocity;
		}
		set
		{
			m_BounceMinVelocity = value;
		}
	}

	public float contactDistance
	{
		get
		{
			return m_ContactDistance;
		}
		set
		{
			m_ContactDistance = value;
		}
	}
}
[StructLayout(LayoutKind.Sequential)]
[RequiredByNativeCode]
public class ControllerColliderHit
{
	internal CharacterController m_Controller;

	internal Collider m_Collider;

	internal Vector3 m_Point;

	internal Vector3 m_Normal;

	internal Vector3 m_MoveDirection;

	internal float m_MoveLength;

	internal int m_Push;

	public CharacterController controller => m_Controller;

	public Collider collider => m_Collider;

	public Rigidbody rigidbody => m_Collider.attachedRigidbody;

	public GameObject gameObject => ((Component)m_Collider).gameObject;

	public Transform transform => ((Component)m_Collider).transform;

	public Vector3 point => m_Point;

	public Vector3 normal => m_Normal;

	public Vector3 moveDirection => m_MoveDirection;

	public float moveLength => m_MoveLength;

	private bool push
	{
		get
		{
			return m_Push != 0;
		}
		set
		{
			m_Push = (value ? 1 : 0);
		}
	}
}
public enum PhysicMaterialCombine
{
	Average = 0,
	Minimum = 2,
	Multiply = 1,
	Maximum = 3
}
[StructLayout(LayoutKind.Sequential)]
[RequiredByNativeCode]
public class Collision
{
	internal Vector3 m_Impulse;

	internal Vector3 m_RelativeVelocity;

	internal Rigidbody m_Rigidbody;

	internal Collider m_Collider;

	internal int m_ContactCount;

	internal ContactPoint[] m_ReusedContacts;

	internal ContactPoint[] m_LegacyContacts;

	public Vector3 relativeVelocity => m_RelativeVelocity;

	public Rigidbody rigidbody => m_Rigidbody;

	public Collider collider => m_Collider;

	public Transform transform => (!((Object)(object)rigidbody != (Object)null)) ? ((Component)collider).transform : ((Component)rigidbody).transform;

	public GameObject gameObject => (!((Object)(object)m_Rigidbody != (Object)null)) ? ((Component)m_Collider).gameObject : ((Component)m_Rigidbody).gameObject;

	public int contactCount => m_ContactCount;

	public ContactPoint[] contacts
	{
		get
		{
			if (m_LegacyContacts == null)
			{
				m_LegacyContacts = new ContactPoint[m_ContactCount];
				Array.Copy(m_ReusedContacts, m_LegacyContacts, m_ContactCount);
			}
			return m_LegacyContacts;
		}
	}

	public Vector3 impulse => m_Impulse;

	[Obsolete("Use Collision.relativeVelocity instead.", false)]
	public Vector3 impactForceSum => relativeVelocity;

	[Obsolete("Will always return zero.", false)]
	public Vector3 frictionForceSum => Vector3.zero;

	[Obsolete("Please use Collision.rigidbody, Collision.transform or Collision.collider instead", false)]
	public Component other => (Component)((!((Object)(object)m_Rigidbody != (Object)null)) ? ((object)m_Collider) : ((object)m_Rigidbody));

	private ContactPoint[] GetContacts_Internal()
	{
		return (m_LegacyContacts != null) ? m_LegacyContacts : m_ReusedContacts;
	}

	public ContactPoint GetContact(int index)
	{
		if (index < 0 || index >= m_ContactCount)
		{
			throw new ArgumentOutOfRangeException($"Cannot get contact at index {index}. There are {m_ContactCount} contact(s).");
		}
		return GetContacts_Internal()[index];
	}

	public int GetContacts(ContactPoint[] contacts)
	{
		if (contacts == null)
		{
			throw new NullReferenceException("Cannot get contacts as the provided array is NULL.");
		}
		int num = Mathf.Min(m_ContactCount, contacts.Length);
		Array.Copy(GetContacts_Internal(), contacts, num);
		return num;
	}

	public int GetContacts(List<ContactPoint> contacts)
	{
		if (contacts == null)
		{
			throw new NullReferenceException("Cannot get contacts as the provided list is NULL.");
		}
		contacts.Clear();
		contacts.AddRange(GetContacts_Internal());
		return contactCount;
	}

	[Obsolete("Do not use Collision.GetEnumerator(), enumerate using non-allocating array returned by Collision.GetContacts() or enumerate using Collision.GetContact(index) instead.", false)]
	public virtual IEnumerator GetEnumerator()
	{
		return contacts.GetEnumerator();
	}
}
public enum CollisionFlags
{
	None = 0,
	Sides = 1,
	Above = 2,
	Below = 4,
	CollidedSides = 1,
	CollidedAbove = 2,
	CollidedBelow = 4
}
public enum QueryTriggerInteraction
{
	UseGlobal,
	Ignore,
	Collide
}
public enum CollisionDetectionMode
{
	Discrete,
	Continuous,
	ContinuousDynamic,
	ContinuousSpeculative
}
public enum ConfigurableJointMotion
{
	Locked,
	Limited,
	Free
}
public enum RotationDriveMode
{
	XYAndZ,
	Slerp
}
[NativeHeader("Modules/Physics/PhysicMaterial.h")]
public class PhysicMaterial : Object
{
	public extern float bounciness
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float dynamicFriction
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float staticFriction
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern PhysicMaterialCombine frictionCombine
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern PhysicMaterialCombine bounceCombine
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[Obsolete("Use PhysicMaterial.bounciness instead (UnityUpgradable) -> bounciness")]
	public float bouncyness
	{
		get
		{
			return bounciness;
		}
		set
		{
			bounciness = value;
		}
	}

	[EditorBrowsable(EditorBrowsableState.Never)]
	[Obsolete("Anisotropic friction is no longer supported since Unity 5.0.", true)]
	public Vector3 frictionDirection2
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			return Vector3.zero;
		}
		set
		{
		}
	}

	[Obsolete("Anisotropic friction is no longer supported since Unity 5.0.", true)]
	[EditorBrowsable(EditorBrowsableState.Never)]
	public float dynamicFriction2
	{
		get
		{
			return 0f;
		}
		set
		{
		}
	}

	[EditorBrowsable(EditorBrowsableState.Never)]
	[Obsolete("Anisotropic friction is no longer supported since Unity 5.0.", true)]
	public float staticFriction2
	{
		get
		{
			return 0f;
		}
		set
		{
		}
	}

	[EditorBrowsable(EditorBrowsableState.Never)]
	[Obsolete("Anisotropic friction is no longer supported since Unity 5.0.", true)]
	public Vector3 frictionDirection
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			return Vector3.zero;
		}
		set
		{
		}
	}

	public PhysicMaterial()
	{
		Internal_CreateDynamicsMaterial(this, "DynamicMaterial");
	}

	public PhysicMaterial(string name)
	{
		Internal_CreateDynamicsMaterial(this, name);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void Internal_CreateDynamicsMaterial([Writable] PhysicMaterial mat, string name);
}
[UsedByNativeCode]
[NativeHeader("Runtime/Interfaces/IRaycast.h")]
[NativeHeader("Modules/Physics/RaycastHit.h")]
[NativeHeader("PhysicsScriptingClasses.h")]
public struct RaycastHit
{
	[NativeName("point")]
	internal Vector3 m_Point;

	[NativeName("normal")]
	internal Vector3 m_Normal;

	[NativeName("faceID")]
	internal uint m_FaceID;

	[NativeName("distance")]
	internal float m_Distance;

	[NativeName("uv")]
	internal Vector2 m_UV;

	[NativeName("collider")]
	internal int m_Collider;

	public Collider collider => Object.FindObjectFromInstanceID(m_Collider) as Collider;

	public Vector3 point
	{
		get
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			return m_Point;
		}
		set
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			m_Point = value;
		}
	}

	public Vector3 normal
	{
		get
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			return m_Normal;
		}
		set
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			m_Normal = value;
		}
	}

	public Vector3 barycentricCoordinate
	{
		get
		{
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//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)
			return new Vector3(1f - (m_UV.y + m_UV.x), m_UV.x, m_UV.y);
		}
		set
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			m_UV = Vector2.op_Implicit(value);
		}
	}

	public float distance
	{
		get
		{
			return m_Distance;
		}
		set
		{
			m_Distance = value;
		}
	}

	public int triangleIndex => (int)m_FaceID;

	public Vector2 textureCoord => CalculateRaycastTexCoord(collider, m_UV, m_Point, m_FaceID, 0);

	public Vector2 textureCoord2 => CalculateRaycastTexCoord(collider, m_UV, m_Point, m_FaceID, 1);

	[Obsolete("Use textureCoord2 instead. (UnityUpgradable) -> textureCoord2")]
	public Vector2 textureCoord1 => textureCoord2;

	public Transform transform
	{
		get
		{
			Rigidbody rigidbody = this.rigidbody;
			if ((Object)(object)rigidbody != (Object)null)
			{
				return ((Component)rigidbody).transform;
			}
			if ((Object)(object)collider != (Object)null)
			{
				return ((Component)collider).transform;
			}
			return null;
		}
	}

	public Rigidbody rigidbody => (!((Object)(object)collider != (Object)null)) ? null : collider.attachedRigidbody;

	public Vector2 lightmapCoord
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			Vector2 result = CalculateRaycastTexCoord(collider, m_UV, m_Point, m_FaceID, 1);
			if ((Object)(object)((Component)collider).GetComponent<Renderer>() != (Object)null)
			{
				Vector4 lightmapScaleOffset = ((Component)collider).GetComponent<Renderer>().lightmapScaleOffset;
				result.x = result.x * lightmapScaleOffset.x + lightmapScaleOffset.z;
				result.y = result.y * lightmapScaleOffset.y + lightmapScaleOffset.w;
			}
			return result;
		}
	}

	[FreeFunction]
	private static Vector2 CalculateRaycastTexCoord(Collider collider, Vector2 uv, Vector3 pos, uint face, int textcoord)
	{
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		CalculateRaycastTexCoord_Injected(collider, ref uv, ref pos, face, textcoord, out var ret);
		return ret;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void CalculateRaycastTexCoord_Injected(Collider collider, ref Vector2 uv, ref Vector3 pos, uint face, int textcoord, out Vector2 ret);
}
[RequireComponent(typeof(Transform))]
[NativeHeader("Modules/Physics/Rigidbody.h")]
public class Rigidbody : Component
{
	public Vector3 velocity
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_velocity_Injected(out var ret);
			return ret;
		}
		set
		{
			set_velocity_Injected(ref value);
		}
	}

	public Vector3 angularVelocity
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_angularVelocity_Injected(out var ret);
			return ret;
		}
		set
		{
			set_angularVelocity_Injected(ref value);
		}
	}

	public extern float drag
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float angularDrag
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float mass
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern bool useGravity
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float maxDepenetrationVelocity
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern bool isKinematic
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern bool freezeRotation
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern RigidbodyConstraints constraints
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern CollisionDetectionMode collisionDetectionMode
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public Vector3 centerOfMass
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_centerOfMass_Injected(out var ret);
			return ret;
		}
		set
		{
			set_centerOfMass_Injected(ref value);
		}
	}

	public Vector3 worldCenterOfMass
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_worldCenterOfMass_Injected(out var ret);
			return ret;
		}
	}

	public Quaternion inertiaTensorRotation
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_inertiaTensorRotation_Injected(out var ret);
			return ret;
		}
		set
		{
			set_inertiaTensorRotation_Injected(ref value);
		}
	}

	public Vector3 inertiaTensor
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_inertiaTensor_Injected(out var ret);
			return ret;
		}
		set
		{
			set_inertiaTensor_Injected(ref value);
		}
	}

	public extern bool detectCollisions
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public Vector3 position
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_position_Injected(out var ret);
			return ret;
		}
		set
		{
			set_position_Injected(ref value);
		}
	}

	public Quaternion rotation
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_rotation_Injected(out var ret);
			return ret;
		}
		set
		{
			set_rotation_Injected(ref value);
		}
	}

	public extern RigidbodyInterpolation interpolation
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern int solverIterations
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float sleepThreshold
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float maxAngularVelocity
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern int solverVelocityIterations
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[Obsolete("The sleepVelocity is no longer supported. Use sleepThreshold. Note that sleepThreshold is energy but not velocity.")]
	public extern float sleepVelocity
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[Obsolete("The sleepAngularVelocity is no longer supported. Set Use sleepThreshold to specify energy.")]
	public extern float sleepAngularVelocity
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[Obsolete("Cone friction is no longer supported.")]
	public bool useConeFriction
	{
		get
		{
			return false;
		}
		set
		{
		}
	}

	[Obsolete("Please use Rigidbody.solverIterations instead. (UnityUpgradable) -> solverIterations")]
	public int solverIterationCount
	{
		get
		{
			return solverIterations;
		}
		set
		{
			solverIterations = value;
		}
	}

	[Obsolete("Please use Rigidbody.solverVelocityIterations instead. (UnityUpgradable) -> solverVelocityIterations")]
	public int solverVelocityIterationCount
	{
		get
		{
			return solverVelocityIterations;
		}
		set
		{
			solverVelocityIterations = value;
		}
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern void SetDensity(float density);

	public void MovePosition(Vector3 position)
	{
		MovePosition_Injected(ref position);
	}

	public void MoveRotation(Quaternion rot)
	{
		MoveRotation_Injected(ref rot);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern void Sleep();

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern bool IsSleeping();

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern void WakeUp();

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern void ResetCenterOfMass();

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern void ResetInertiaTensor();

	public Vector3 GetRelativePointVelocity(Vector3 relativePoint)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		GetRelativePointVelocity_Injected(ref relativePoint, out var ret);
		return ret;
	}

	public Vector3 GetPointVelocity(Vector3 worldPoint)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		GetPointVelocity_Injected(ref worldPoint, out var ret);
		return ret;
	}

	[Obsolete("Use Rigidbody.maxAngularVelocity instead.")]
	public void SetMaxAngularVelocity(float a)
	{
		maxAngularVelocity = a;
	}

	public void AddForce(Vector3 force, [DefaultValue("ForceMode.Force")] ForceMode mode)
	{
		AddForce_Injected(ref force, mode);
	}

	[ExcludeFromDocs]
	public void AddForce(Vector3 force)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		AddForce(force, ForceMode.Force);
	}

	public void AddForce(float x, float y, float z, [DefaultValue("ForceMode.Force")] ForceMode mode)
	{
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		AddForce(new Vector3(x, y, z), mode);
	}

	[ExcludeFromDocs]
	public void AddForce(float x, float y, float z)
	{
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		AddForce(new Vector3(x, y, z), ForceMode.Force);
	}

	public void AddRelativeForce(Vector3 force, [DefaultValue("ForceMode.Force")] ForceMode mode)
	{
		AddRelativeForce_Injected(ref force, mode);
	}

	[ExcludeFromDocs]
	public void AddRelativeForce(Vector3 force)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		AddRelativeForce(force, ForceMode.Force);
	}

	public void AddRelativeForce(float x, float y, float z, [DefaultValue("ForceMode.Force")] ForceMode mode)
	{
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		AddRelativeForce(new Vector3(x, y, z), mode);
	}

	[ExcludeFromDocs]
	public void AddRelativeForce(float x, float y, float z)
	{
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		AddRelativeForce(new Vector3(x, y, z), ForceMode.Force);
	}

	public void AddTorque(Vector3 torque, [DefaultValue("ForceMode.Force")] ForceMode mode)
	{
		AddTorque_Injected(ref torque, mode);
	}

	[ExcludeFromDocs]
	public void AddTorque(Vector3 torque)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		AddTorque(torque, ForceMode.Force);
	}

	public void AddTorque(float x, float y, float z, [DefaultValue("ForceMode.Force")] ForceMode mode)
	{
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		AddTorque(new Vector3(x, y, z), mode);
	}

	[ExcludeFromDocs]
	public void AddTorque(float x, float y, float z)
	{
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		AddTorque(new Vector3(x, y, z), ForceMode.Force);
	}

	public void AddRelativeTorque(Vector3 torque, [DefaultValue("ForceMode.Force")] ForceMode mode)
	{
		AddRelativeTorque_Injected(ref torque, mode);
	}

	[ExcludeFromDocs]
	public void AddRelativeTorque(Vector3 torque)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		AddRelativeTorque(torque, ForceMode.Force);
	}

	public void AddRelativeTorque(float x, float y, float z, [DefaultValue("ForceMode.Force")] ForceMode mode)
	{
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		AddRelativeTorque(new Vector3(x, y, z), mode);
	}

	[ExcludeFromDocs]
	public void AddRelativeTorque(float x, float y, float z)
	{
		AddRelativeTorque(x, y, z, ForceMode.Force);
	}

	public void AddForceAtPosition(Vector3 force, Vector3 position, [DefaultValue("ForceMode.Force")] ForceMode mode)
	{
		AddForceAtPosition_Injected(ref force, ref position, mode);
	}

	[ExcludeFromDocs]
	public void AddForceAtPosition(Vector3 force, Vector3 position)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		AddForceAtPosition(force, position, ForceMode.Force);
	}

	public void AddExplosionForce(float explosionForce, Vector3 explosionPosition, float explosionRadius, [DefaultValue("0.0f")] float upwardsModifier, [DefaultValue("ForceMode.Force)")] ForceMode mode)
	{
		AddExplosionForce_Injected(explosionForce, ref explosionPosition, explosionRadius, upwardsModifier, mode);
	}

	[ExcludeFromDocs]
	public void AddExplosionForce(float explosionForce, Vector3 explosionPosition, float explosionRadius, float upwardsModifier)
	{
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		AddExplosionForce(explosionForce, explosionPosition, explosionRadius, upwardsModifier, ForceMode.Force);
	}

	[ExcludeFromDocs]
	public void AddExplosionForce(float explosionForce, Vector3 explosionPosition, float explosionRadius)
	{
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		AddExplosionForce(explosionForce, explosionPosition, explosionRadius, 0f, ForceMode.Force);
	}

	[NativeName("ClosestPointOnBounds")]
	private void Internal_ClosestPointOnBounds(Vector3 point, ref Vector3 outPos, ref float distance)
	{
		Internal_ClosestPointOnBounds_Injected(ref point, ref outPos, ref distance);
	}

	public Vector3 ClosestPointOnBounds(Vector3 position)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_000e: 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)
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_001f: Unknown result type (might be due to invalid IL or missing references)
		float distance = 0f;
		Vector3 outPos = Vector3.zero;
		Internal_ClosestPointOnBounds(position, ref outPos, ref distance);
		return outPos;
	}

	private RaycastHit SweepTest(Vector3 direction, float maxDistance, QueryTriggerInteraction queryTriggerInteraction, ref bool hasHit)
	{
		SweepTest_Injected(ref direction, maxDistance, queryTriggerInteraction, ref hasHit, out var ret);
		return ret;
	}

	public bool SweepTest(Vector3 direction, out RaycastHit hitInfo, [DefaultValue("Mathf.Infinity")] float maxDistance, [DefaultValue("QueryTriggerInteraction.UseGlobal")] QueryTriggerInteraction queryTriggerInteraction)
	{
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0021: Unknown result type (might be due to invalid IL or missing references)
		float magnitude = ((Vector3)(ref direction)).magnitude;
		if (magnitude > float.Epsilon)
		{
			Vector3 direction2 = direction / magnitude;
			bool hasHit = false;
			hitInfo = SweepTest(direction2, maxDistance, queryTriggerInteraction, ref hasHit);
			return hasHit;
		}
		hitInfo = default(RaycastHit);
		return false;
	}

	[ExcludeFromDocs]
	public bool SweepTest(Vector3 direction, out RaycastHit hitInfo, float maxDistance)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		return SweepTest(direction, out hitInfo, maxDistance, QueryTriggerInteraction.UseGlobal);
	}

	[ExcludeFromDocs]
	public bool SweepTest(Vector3 direction, out RaycastHit hitInfo)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		return SweepTest(direction, out hitInfo, float.PositiveInfinity, QueryTriggerInteraction.UseGlobal);
	}

	[NativeName("SweepTestAll")]
	private RaycastHit[] Internal_SweepTestAll(Vector3 direction, float maxDistance, QueryTriggerInteraction queryTriggerInteraction)
	{
		return Internal_SweepTestAll_Injected(ref direction, maxDistance, queryTriggerInteraction);
	}

	public RaycastHit[] SweepTestAll(Vector3 direction, [DefaultValue("Mathf.Infinity")] float maxDistance, [DefaultValue("QueryTriggerInteraction.UseGlobal")] QueryTriggerInteraction queryTriggerInteraction)
	{
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		float magnitude = ((Vector3)(ref direction)).magnitude;
		if (magnitude > float.Epsilon)
		{
			Vector3 direction2 = direction / magnitude;
			return Internal_SweepTestAll(direction2, maxDistance, queryTriggerInteraction);
		}
		return new RaycastHit[0];
	}

	[ExcludeFromDocs]
	public RaycastHit[] SweepTestAll(Vector3 direction, float maxDistance)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		return SweepTestAll(direction, maxDistance, QueryTriggerInteraction.UseGlobal);
	}

	[ExcludeFromDocs]
	public RaycastHit[] SweepTestAll(Vector3 direction)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		return SweepTestAll(direction, float.PositiveInfinity, QueryTriggerInteraction.UseGlobal);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_velocity_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_velocity_Injected(ref Vector3 value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_angularVelocity_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_angularVelocity_Injected(ref Vector3 value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_centerOfMass_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_centerOfMass_Injected(ref Vector3 value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_worldCenterOfMass_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_inertiaTensorRotation_Injected(out Quaternion ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_inertiaTensorRotation_Injected(ref Quaternion value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_inertiaTensor_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_inertiaTensor_Injected(ref Vector3 value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_position_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_position_Injected(ref Vector3 value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_rotation_Injected(out Quaternion ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_rotation_Injected(ref Quaternion value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void MovePosition_Injected(ref Vector3 position);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void MoveRotation_Injected(ref Quaternion rot);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void GetRelativePointVelocity_Injected(ref Vector3 relativePoint, out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void GetPointVelocity_Injected(ref Vector3 worldPoint, out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void AddForce_Injected(ref Vector3 force, [DefaultValue("ForceMode.Force")] ForceMode mode);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void AddRelativeForce_Injected(ref Vector3 force, [DefaultValue("ForceMode.Force")] ForceMode mode);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void AddTorque_Injected(ref Vector3 torque, [DefaultValue("ForceMode.Force")] ForceMode mode);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void AddRelativeTorque_Injected(ref Vector3 torque, [DefaultValue("ForceMode.Force")] ForceMode mode);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void AddForceAtPosition_Injected(ref Vector3 force, ref Vector3 position, [DefaultValue("ForceMode.Force")] ForceMode mode);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void AddExplosionForce_Injected(float explosionForce, ref Vector3 explosionPosition, float explosionRadius, [DefaultValue("0.0f")] float upwardsModifier, [DefaultValue("ForceMode.Force)")] ForceMode mode);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void Internal_ClosestPointOnBounds_Injected(ref Vector3 point, ref Vector3 outPos, ref float distance);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void SweepTest_Injected(ref Vector3 direction, float maxDistance, QueryTriggerInteraction queryTriggerInteraction, ref bool hasHit, out RaycastHit ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern RaycastHit[] Internal_SweepTestAll_Injected(ref Vector3 direction, float maxDistance, QueryTriggerInteraction queryTriggerInteraction);
}
[RequiredByNativeCode]
[RequireComponent(typeof(Transform))]
[NativeHeader("Modules/Physics/Collider.h")]
public class Collider : Component
{
	public extern bool enabled
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern Rigidbody attachedRigidbody
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("GetRigidbody")]
		get;
	}

	public extern bool isTrigger
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float contactOffset
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public Bounds bounds
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_bounds_Injected(out var ret);
			return ret;
		}
	}

	[NativeMethod("Material")]
	public extern PhysicMaterial sharedMaterial
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern PhysicMaterial material
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("GetClonedMaterial")]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("SetMaterial")]
		set;
	}

	public Vector3 ClosestPoint(Vector3 position)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		ClosestPoint_Injected(ref position, out var ret);
		return ret;
	}

	private RaycastHit Raycast(Ray ray, float maxDistance, ref bool hasHit)
	{
		Raycast_Injected(ref ray, maxDistance, ref hasHit, out var ret);
		return ret;
	}

	public bool Raycast(Ray ray, out RaycastHit hitInfo, float maxDistance)
	{
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		bool hasHit = false;
		hitInfo = Raycast(ray, maxDistance, ref hasHit);
		return hasHit;
	}

	[NativeName("ClosestPointOnBounds")]
	private void Internal_ClosestPointOnBounds(Vector3 point, ref Vector3 outPos, ref float distance)
	{
		Internal_ClosestPointOnBounds_Injected(ref point, ref outPos, ref distance);
	}

	public Vector3 ClosestPointOnBounds(Vector3 position)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_000e: 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)
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_001f: Unknown result type (might be due to invalid IL or missing references)
		float distance = 0f;
		Vector3 outPos = Vector3.zero;
		Internal_ClosestPointOnBounds(position, ref outPos, ref distance);
		return outPos;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void ClosestPoint_Injected(ref Vector3 position, out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_bounds_Injected(out Bounds ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void Raycast_Injected(ref Ray ray, float maxDistance, ref bool hasHit, out RaycastHit ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void Internal_ClosestPointOnBounds_Injected(ref Vector3 point, ref Vector3 outPos, ref float distance);
}
[NativeHeader("Modules/Physics/CharacterController.h")]
public class CharacterController : Collider
{
	public Vector3 velocity
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_velocity_Injected(out var ret);
			return ret;
		}
	}

	public extern bool isGrounded
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("IsGrounded")]
		get;
	}

	public extern CollisionFlags collisionFlags
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	public extern float radius
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float height
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public Vector3 center
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_center_Injected(out var ret);
			return ret;
		}
		set
		{
			set_center_Injected(ref value);
		}
	}

	public extern float slopeLimit
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float stepOffset
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float skinWidth
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float minMoveDistance
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern bool detectCollisions
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern bool enableOverlapRecovery
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public bool SimpleMove(Vector3 speed)
	{
		return SimpleMove_Injected(ref speed);
	}

	public CollisionFlags Move(Vector3 motion)
	{
		return Move_Injected(ref motion);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern bool SimpleMove_Injected(ref Vector3 speed);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern CollisionFlags Move_Injected(ref Vector3 motion);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_velocity_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_center_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_center_Injected(ref Vector3 value);
}
[NativeHeader("Modules/Physics/MeshCollider.h")]
[RequiredByNativeCode]
[NativeHeader("Runtime/Graphics/Mesh/Mesh.h")]
public class MeshCollider : Collider
{
	public extern Mesh sharedMesh
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern bool convex
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[Obsolete("MeshCollider.inflateMesh is no longer supported. The new cooking algorithm doesn't need inflation to be used.")]
	public bool inflateMesh
	{
		get
		{
			return false;
		}
		set
		{
		}
	}

	public extern MeshColliderCookingOptions cookingOptions
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[Obsolete("MeshCollider.skinWidth is no longer used.")]
	public float skinWidth
	{
		get
		{
			return 0f;
		}
		set
		{
		}
	}

	[Obsolete("Configuring smooth sphere collisions is no longer needed.")]
	public bool smoothSphereCollisions
	{
		get
		{
			return true;
		}
		set
		{
		}
	}
}
[RequiredByNativeCode]
[NativeHeader("Modules/Physics/CapsuleCollider.h")]
public class CapsuleCollider : Collider
{
	public Vector3 center
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_center_Injected(out var ret);
			return ret;
		}
		set
		{
			set_center_Injected(ref value);
		}
	}

	public extern float radius
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float height
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern int direction
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	internal Vector2 GetGlobalExtents()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		GetGlobalExtents_Injected(out var ret);
		return ret;
	}

	internal Matrix4x4 CalculateTransform()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		CalculateTransform_Injected(out var ret);
		return ret;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_center_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_center_Injected(ref Vector3 value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void GetGlobalExtents_Injected(out Vector2 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void CalculateTransform_Injected(out Matrix4x4 ret);
}
[NativeHeader("Modules/Physics/BoxCollider.h")]
[RequiredByNativeCode]
public class BoxCollider : Collider
{
	public Vector3 center
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_center_Injected(out var ret);
			return ret;
		}
		set
		{
			set_center_Injected(ref value);
		}
	}

	public Vector3 size
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_size_Injected(out var ret);
			return ret;
		}
		set
		{
			set_size_Injected(ref value);
		}
	}

	[Obsolete("Use BoxCollider.size instead.")]
	public Vector3 extents
	{
		get
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			return size * 0.5f;
		}
		set
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			size = value * 2f;
		}
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_center_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_center_Injected(ref Vector3 value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_size_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_size_Injected(ref Vector3 value);
}
[RequiredByNativeCode]
[NativeHeader("Modules/Physics/SphereCollider.h")]
public class SphereCollider : Collider
{
	public Vector3 center
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_center_Injected(out var ret);
			return ret;
		}
		set
		{
			set_center_Injected(ref value);
		}
	}

	public extern float radius
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_center_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_center_Injected(ref Vector3 value);
}
[RequireComponent(typeof(Rigidbody))]
[NativeHeader("Modules/Physics/ConstantForce.h")]
public class ConstantForce : Behaviour
{
	public Vector3 force
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_force_Injected(out var ret);
			return ret;
		}
		set
		{
			set_force_Injected(ref value);
		}
	}

	public Vector3 relativeForce
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_relativeForce_Injected(out var ret);
			return ret;
		}
		set
		{
			set_relativeForce_Injected(ref value);
		}
	}

	public Vector3 torque
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_torque_Injected(out var ret);
			return ret;
		}
		set
		{
			set_torque_Injected(ref value);
		}
	}

	public Vector3 relativeTorque
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_relativeTorque_Injected(out var ret);
			return ret;
		}
		set
		{
			set_relativeTorque_Injected(ref value);
		}
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_force_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_force_Injected(ref Vector3 value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_relativeForce_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_relativeForce_Injected(ref Vector3 value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_torque_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_torque_Injected(ref Vector3 value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_relativeTorque_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_relativeTorque_Injected(ref Vector3 value);
}
[NativeClass("Unity::Joint")]
[RequireComponent(typeof(Rigidbody))]
[NativeHeader("Modules/Physics/Joint.h")]
public class Joint : Component
{
	public extern Rigidbody connectedBody
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public Vector3 axis
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_axis_Injected(out var ret);
			return ret;
		}
		set
		{
			set_axis_Injected(ref value);
		}
	}

	public Vector3 anchor
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_anchor_Injected(out var ret);
			return ret;
		}
		set
		{
			set_anchor_Injected(ref value);
		}
	}

	public Vector3 connectedAnchor
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_connectedAnchor_Injected(out var ret);
			return ret;
		}
		set
		{
			set_connectedAnchor_Injected(ref value);
		}
	}

	public extern bool autoConfigureConnectedAnchor
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float breakForce
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float breakTorque
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern bool enableCollision
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern bool enablePreprocessing
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float massScale
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float connectedMassScale
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public Vector3 currentForce
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: 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)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			Vector3 linearForce = Vector3.zero;
			Vector3 angularForce = Vector3.zero;
			GetCurrentForces(ref linearForce, ref angularForce);
			return linearForce;
		}
	}

	public Vector3 currentTorque
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: 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)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			Vector3 linearForce = Vector3.zero;
			Vector3 angularForce = Vector3.zero;
			GetCurrentForces(ref linearForce, ref angularForce);
			return angularForce;
		}
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void GetCurrentForces(ref Vector3 linearForce, ref Vector3 angularForce);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_axis_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_axis_Injected(ref Vector3 value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_anchor_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_anchor_Injected(ref Vector3 value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_connectedAnchor_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_connectedAnchor_Injected(ref Vector3 value);
}
[NativeHeader("Modules/Physics/HingeJoint.h")]
[NativeClass("Unity::HingeJoint")]
public class HingeJoint : Joint
{
	public JointMotor motor
	{
		get
		{
			get_motor_Injected(out var ret);
			return ret;
		}
		set
		{
			set_motor_Injected(ref value);
		}
	}

	public JointLimits limits
	{
		get
		{
			get_limits_Injected(out var ret);
			return ret;
		}
		set
		{
			set_limits_Injected(ref value);
		}
	}

	public JointSpring spring
	{
		get
		{
			get_spring_Injected(out var ret);
			return ret;
		}
		set
		{
			set_spring_Injected(ref value);
		}
	}

	public extern bool useMotor
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern bool useLimits
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern bool useSpring
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float velocity
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	public extern float angle
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_motor_Injected(out JointMotor ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_motor_Injected(ref JointMotor value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_limits_Injected(out JointLimits ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_limits_Injected(ref JointLimits value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_spring_Injected(out JointSpring ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_spring_Injected(ref JointSpring value);
}
[NativeClass("Unity::SpringJoint")]
[NativeHeader("Modules/Physics/SpringJoint.h")]
public class SpringJoint : Joint
{
	public extern float spring
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float damper
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float minDistance
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float maxDistance
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float tolerance
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}
}
[NativeClass("Unity::FixedJoint")]
[NativeHeader("Modules/Physics/FixedJoint.h")]
public class FixedJoint : Joint
{
}
[NativeClass("Unity::CharacterJoint")]
[NativeHeader("Modules/Physics/CharacterJoint.h")]
public class CharacterJoint : Joint
{
	[Obsolete("TargetRotation not in use for Unity 5 and assumed disabled.", true)]
	public Quaternion targetRotation;

	[Obsolete("TargetAngularVelocity not in use for Unity 5 and assumed disabled.", true)]
	public Vector3 targetAngularVelocity;

	[Obsolete("RotationDrive not in use for Unity 5 and assumed disabled.")]
	public JointDrive rotationDrive;

	public Vector3 swingAxis
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_swingAxis_Injected(out var ret);
			return ret;
		}
		set
		{
			set_swingAxis_Injected(ref value);
		}
	}

	public SoftJointLimitSpring twistLimitSpring
	{
		get
		{
			get_twistLimitSpring_Injected(out var ret);
			return ret;
		}
		set
		{
			set_twistLimitSpring_Injected(ref value);
		}
	}

	public SoftJointLimitSpring swingLimitSpring
	{
		get
		{
			get_swingLimitSpring_Injected(out var ret);
			return ret;
		}
		set
		{
			set_swingLimitSpring_Injected(ref value);
		}
	}

	public SoftJointLimit lowTwistLimit
	{
		get
		{
			get_lowTwistLimit_Injected(out var ret);
			return ret;
		}
		set
		{
			set_lowTwistLimit_Injected(ref value);
		}
	}

	public SoftJointLimit highTwistLimit
	{
		get
		{
			get_highTwistLimit_Injected(out var ret);
			return ret;
		}
		set
		{
			set_highTwistLimit_Injected(ref value);
		}
	}

	public SoftJointLimit swing1Limit
	{
		get
		{
			get_swing1Limit_Injected(out var ret);
			return ret;
		}
		set
		{
			set_swing1Limit_Injected(ref value);
		}
	}

	public SoftJointLimit swing2Limit
	{
		get
		{
			get_swing2Limit_Injected(out var ret);
			return ret;
		}
		set
		{
			set_swing2Limit_Injected(ref value);
		}
	}

	public extern bool enableProjection
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float projectionDistance
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float projectionAngle
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_swingAxis_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_swingAxis_Injected(ref Vector3 value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_twistLimitSpring_Injected(out SoftJointLimitSpring ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_twistLimitSpring_Injected(ref SoftJointLimitSpring value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_swingLimitSpring_Injected(out SoftJointLimitSpring ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_swingLimitSpring_Injected(ref SoftJointLimitSpring value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_lowTwistLimit_Injected(out SoftJointLimit ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_lowTwistLimit_Injected(ref SoftJointLimit value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_highTwistLimit_Injected(out SoftJointLimit ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_highTwistLimit_Injected(ref SoftJointLimit value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_swing1Limit_Injected(out SoftJointLimit ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_swing1Limit_Injected(ref SoftJointLimit value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_swing2Limit_Injected(out SoftJointLimit ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_swing2Limit_Injected(ref SoftJointLimit value);
}
[NativeHeader("Modules/Physics/ConfigurableJoint.h")]
[NativeClass("Unity::ConfigurableJoint")]
public class ConfigurableJoint : Joint
{
	public Vector3 secondaryAxis
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_secondaryAxis_Injected(out var ret);
			return ret;
		}
		set
		{
			set_secondaryAxis_Injected(ref value);
		}
	}

	public extern ConfigurableJointMotion xMotion
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern ConfigurableJointMotion yMotion
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern ConfigurableJointMotion zMotion
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern ConfigurableJointMotion angularXMotion
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern ConfigurableJointMotion angularYMotion
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern ConfigurableJointMotion angularZMotion
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public SoftJointLimitSpring linearLimitSpring
	{
		get
		{
			get_linearLimitSpring_Injected(out var ret);
			return ret;
		}
		set
		{
			set_linearLimitSpring_Injected(ref value);
		}
	}

	public SoftJointLimitSpring angularXLimitSpring
	{
		get
		{
			get_angularXLimitSpring_Injected(out var ret);
			return ret;
		}
		set
		{
			set_angularXLimitSpring_Injected(ref value);
		}
	}

	public SoftJointLimitSpring angularYZLimitSpring
	{
		get
		{
			get_angularYZLimitSpring_Injected(out var ret);
			return ret;
		}
		set
		{
			set_angularYZLimitSpring_Injected(ref value);
		}
	}

	public SoftJointLimit linearLimit
	{
		get
		{
			get_linearLimit_Injected(out var ret);
			return ret;
		}
		set
		{
			set_linearLimit_Injected(ref value);
		}
	}

	public SoftJointLimit lowAngularXLimit
	{
		get
		{
			get_lowAngularXLimit_Injected(out var ret);
			return ret;
		}
		set
		{
			set_lowAngularXLimit_Injected(ref value);
		}
	}

	public SoftJointLimit highAngularXLimit
	{
		get
		{
			get_highAngularXLimit_Injected(out var ret);
			return ret;
		}
		set
		{
			set_highAngularXLimit_Injected(ref value);
		}
	}

	public SoftJointLimit angularYLimit
	{
		get
		{
			get_angularYLimit_Injected(out var ret);
			return ret;
		}
		set
		{
			set_angularYLimit_Injected(ref value);
		}
	}

	public SoftJointLimit angularZLimit
	{
		get
		{
			get_angularZLimit_Injected(out var ret);
			return ret;
		}
		set
		{
			set_angularZLimit_Injected(ref value);
		}
	}

	public Vector3 targetPosition
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_targetPosition_Injected(out var ret);
			return ret;
		}
		set
		{
			set_targetPosition_Injected(ref value);
		}
	}

	public Vector3 targetVelocity
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_targetVelocity_Injected(out var ret);
			return ret;
		}
		set
		{
			set_targetVelocity_Injected(ref value);
		}
	}

	public JointDrive xDrive
	{
		get
		{
			get_xDrive_Injected(out var ret);
			return ret;
		}
		set
		{
			set_xDrive_Injected(ref value);
		}
	}

	public JointDrive yDrive
	{
		get
		{
			get_yDrive_Injected(out var ret);
			return ret;
		}
		set
		{
			set_yDrive_Injected(ref value);
		}
	}

	public JointDrive zDrive
	{
		get
		{
			get_zDrive_Injected(out var ret);
			return ret;
		}
		set
		{
			set_zDrive_Injected(ref value);
		}
	}

	public Quaternion targetRotation
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_targetRotation_Injected(out var ret);
			return ret;
		}
		set
		{
			set_targetRotation_Injected(ref value);
		}
	}

	public Vector3 targetAngularVelocity
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_targetAngularVelocity_Injected(out var ret);
			return ret;
		}
		set
		{
			set_targetAngularVelocity_Injected(ref value);
		}
	}

	public extern RotationDriveMode rotationDriveMode
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public JointDrive angularXDrive
	{
		get
		{
			get_angularXDrive_Injected(out var ret);
			return ret;
		}
		set
		{
			set_angularXDrive_Injected(ref value);
		}
	}

	public JointDrive angularYZDrive
	{
		get
		{
			get_angularYZDrive_Injected(out var ret);
			return ret;
		}
		set
		{
			set_angularYZDrive_Injected(ref value);
		}
	}

	public JointDrive slerpDrive
	{
		get
		{
			get_slerpDrive_Injected(out var ret);
			return ret;
		}
		set
		{
			set_slerpDrive_Injected(ref value);
		}
	}

	public extern JointProjectionMode projectionMode
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float projectionDistance
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float projectionAngle
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern bool configuredInWorldSpace
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern bool swapBodies
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_secondaryAxis_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_secondaryAxis_Injected(ref Vector3 value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_linearLimitSpring_Injected(out SoftJointLimitSpring ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_linearLimitSpring_Injected(ref SoftJointLimitSpring value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_angularXLimitSpring_Injected(out SoftJointLimitSpring ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_angularXLimitSpring_Injected(ref SoftJointLimitSpring value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_angularYZLimitSpring_Injected(out SoftJointLimitSpring ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_angularYZLimitSpring_Injected(ref SoftJointLimitSpring value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_linearLimit_Injected(out SoftJointLimit ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_linearLimit_Injected(ref SoftJointLimit value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_lowAngularXLimit_Injected(out SoftJointLimit ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_lowAngularXLimit_Injected(ref SoftJointLimit value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_highAngularXLimit_Injected(out SoftJointLimit ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_highAngularXLimit_Injected(ref SoftJointLimit value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_angularYLimit_Injected(out SoftJointLimit ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_angularYLimit_Injected(ref SoftJointLimit value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_angularZLimit_Injected(out SoftJointLimit ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_angularZLimit_Injected(ref SoftJointLimit value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_targetPosition_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_targetPosition_Injected(ref Vector3 value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_targetVelocity_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_targetVelocity_Injected(ref Vector3 value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_xDrive_Injected(out JointDrive ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_xDrive_Injected(ref JointDrive value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_yDrive_Injected(out JointDrive ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_yDrive_Injected(ref JointDrive value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_zDrive_Injected(out JointDrive ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_zDrive_Injected(ref JointDrive value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_targetRotation_Injected(out Quaternion ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_targetRotation_Injected(ref Quaternion value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_targetAngularVelocity_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_targetAngularVelocity_Injected(ref Vector3 value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_angularXDrive_Injected(out JointDrive ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_angularXDrive_Injected(ref JointDrive value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_angularYZDrive_Injected(out JointDrive ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_angularYZDrive_Injected(ref JointDrive value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_slerpDrive_Injected(out JointDrive ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_slerpDrive_Injected(ref JointDrive value);
}
[UsedByNativeCode]
[NativeHeader("Modules/Physics/MessageParameters.h")]
public struct ContactPoint
{
	internal Vector3 m_Point;

	internal Vector3 m_Normal;

	internal int m_ThisColliderInstanceID;

	internal int m_OtherColliderInstanceID;

	internal float m_Separation;

	public Vector3 point => m_Point;

	public Vector3 normal => m_Normal;

	public Collider thisCollider => GetColliderByInstanceID(m_ThisColliderInstanceID);

	public Collider otherCollider => GetColliderByInstanceID(m_OtherColliderInstanceID);

	public float separation => m_Separation;

	[MethodImpl(MethodImplOptions.InternalCall)]
	[FreeFunction]
	private static extern Collider GetColliderByInstanceID(int instanceID);
}
[NativeHeader("Modules/Physics/Public/PhysicsSceneHandle.h")]
public struct PhysicsScene : IEquatable<PhysicsScene>
{
	private int m_Handle;

	public override string ToString()
	{
		return UnityString.Format("({0})", new object[1] { m_Handle });
	}

	public static bool operator ==(PhysicsScene lhs, PhysicsScene rhs)
	{
		return lhs.m_Handle == rhs.m_Handle;
	}

	public static bool operator !=(PhysicsScene lhs, PhysicsScene rhs)
	{
		return lhs.m_Handle != rhs.m_Handle;
	}

	public override int GetHashCode()
	{
		return m_Handle;
	}

	public override bool Equals(object other)
	{
		if (!(other is PhysicsScene physicsScene))
		{
			return false;
		}
		return m_Handle == physicsScene.m_Handle;
	}

	public bool Equals(PhysicsScene other)
	{
		return m_Handle == other.m_Handle;
	}

	public bool IsValid()
	{
		return IsValid_Internal(this);
	}

	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeMethod("IsPhysicsSceneValid")]
	private static bool IsValid_Internal(PhysicsScene physicsScene)
	{
		return IsValid_Internal_Injected(ref physicsScene);
	}

	public bool IsEmpty()
	{
		if (IsValid())
		{
			return IsEmpty_Internal(this);
		}
		throw new InvalidOperationException("Cannot check if physics scene is empty as it is invalid.");
	}

	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeMethod("IsPhysicsWorldEmpty")]
	private static bool IsEmpty_Internal(PhysicsScene physicsScene)
	{
		return IsEmpty_Internal_Injected(ref physicsScene);
	}

	public void Simulate(float step)
	{
		if (IsValid())
		{
			if (this == Physics.defaultPhysicsScene && Physics.autoSimulation)
			{
				Debug.LogWarning((object)"PhysicsScene.Simulate(...) was called but auto simulation is active. You should disable auto simulation first before calling this function therefore the simulation was not run.");
			}
			else
			{
				Physics.Simulate_Internal(this, step);
			}
			return;
		}
		throw new InvalidOperationException("Cannot simulate the physics scene as it is invalid.");
	}

	public bool Raycast(Vector3 origin, Vector3 direction, [DefaultValue("Mathf.Infinity")] float maxDistance = float.PositiveInfinity, [DefaultValue("Physics.DefaultRaycastLayers")] int layerMask = -5, [DefaultValue("QueryTriggerInteraction.UseGlobal")] QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal)
	{
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		//IL_001f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		//IL_002c: Unknown result type (might be due to invalid IL or missing references)
		float magnitude = ((Vector3)(ref direction)).magnitude;
		if (magnitude > float.Epsilon)
		{
			Vector3 val = direction / magnitude;
			Ray ray = default(Ray);
			((Ray)(ref ray))..ctor(origin, val);
			return Internal_RaycastTest(this, ray, maxDistance, layerMask, queryTriggerInteraction);
		}
		return false;
	}

	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeName("RaycastTest")]
	private static bool Internal_RaycastTest(PhysicsScene physicsScene, Ray ray, float maxDistance, int layerMask, QueryTriggerInteraction queryTriggerInteraction)
	{
		return Internal_RaycastTest_Injected(ref physicsScene, ref ray, maxDistance, layerMask, queryTriggerInteraction);
	}

	public bool Raycast(Vector3 origin, Vector3 direction, out RaycastHit hitInfo, [DefaultValue("Mathf.Infinity")] float maxDistance = float.PositiveInfinity, [DefaultValue("Physics.DefaultRaycastLayers")] int layerMask = -5, [DefaultValue("QueryTriggerInteraction.UseGlobal")] QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal)
	{
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0023: 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_0027: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Unknown result type (might be due to invalid IL or missing references)
		hitInfo = default(RaycastHit);
		float magnitude = ((Vector3)(ref direction)).magnitude;
		if (magnitude > float.Epsilon)
		{
			Vector3 val = direction / magnitude;
			Ray ray = default(Ray);
			((Ray)(ref ray))..ctor(origin, val);
			return Internal_Raycast(this, ray, maxDistance, ref hitInfo, layerMask, queryTriggerInteraction);
		}
		return false;
	}

	[NativeName("Raycast")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	private static bool Internal_Raycast(PhysicsScene physicsScene, Ray ray, float maxDistance, ref RaycastHit hit, int layerMask, QueryTriggerInteraction queryTriggerInteraction)
	{
		return Internal_Raycast_Injected(ref physicsScene, ref ray, maxDistance, ref hit, layerMask, queryTriggerInteraction);
	}

	public int Raycast(Vector3 origin, Vector3 direction, RaycastHit[] raycastHits, [DefaultValue("Mathf.Infinity")] float maxDistance = float.PositiveInfinity, [DefaultValue("Physics.DefaultRaycastLayers")] int layerMask = -5, [DefaultValue("QueryTriggerInteraction.UseGlobal")] QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal)
	{
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		float magnitude = ((Vector3)(ref direction)).magnitude;
		if (magnitude > float.Epsilon)
		{
			Ray ray = default(Ray);
			((Ray)(ref ray))..ctor(origin, ((Vector3)(ref direction)).normalized);
			return Internal_RaycastNonAlloc(this, ray, raycastHits, maxDistance, layerMask, queryTriggerInteraction);
		}
		return 0;
	}

	[NativeName("RaycastNonAlloc")]
	[StaticAccessor("GetPhysicsManager().GetPhysicsQuery()")]
	private static int Internal_RaycastNonAlloc(PhysicsScene physicsScene, Ray ray, RaycastHit[] raycastHits, float maxDistance, int mask, QueryTriggerInteraction queryTriggerInteraction)
	{
		return Internal_RaycastNonAlloc_Injected(ref physicsScene, ref ray, raycastHits, maxDistance, mask, queryTriggerInteraction);
	}

	[NativeName("CapsuleCast")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	private static bool Query_CapsuleCast(PhysicsScene physicsScene, Vector3 point1, Vector3 point2, float radius, Vector3 direction, float maxDistance, ref RaycastHit hitInfo, int layerMask, QueryTriggerInteraction queryTriggerInteraction)
	{
		return Query_CapsuleCast_Injected(ref physicsScene, ref point1, ref point2, radius, ref direction, maxDistance, ref hitInfo, layerMask, queryTriggerInteraction);
	}

	private static bool Internal_CapsuleCast(PhysicsScene physicsScene, Vector3 point1, Vector3 point2, float radius, Vector3 direction, out RaycastHit hitInfo, float maxDistance, int layerMask, QueryTriggerInteraction queryTriggerInteraction)
	{
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		//IL_0027: Unknown result type (might be due to invalid IL or missing references)
		//IL_0028: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		float magnitude = ((Vector3)(ref direction)).magnitude;
		hitInfo = default(RaycastHit);
		if (magnitude > float.Epsilon)
		{
			Vector3 direction2 = direction / magnitude;
			return Query_CapsuleCast(physicsScene, point1, point2, radius, direction2, maxDistance, ref hitInfo, layerMask, queryTriggerInteraction);
		}
		return false;
	}

	public bool CapsuleCast(Vector3 point1, Vector3 point2, float radius, Vector3 direction, out RaycastHit hitInfo, [DefaultValue("Mathf.Infinity")] float maxDistance = float.PositiveInfinity, [DefaultValue("DefaultRaycastLayers")] int layerMask = -5, [DefaultValue("QueryTriggerInteraction.UseGlobal")] QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		return Internal_CapsuleCast(this, point1, point2, radius, direction, out hitInfo, maxDistance, layerMask, queryTriggerInteraction);
	}

	[NativeName("CapsuleCastNonAlloc")]
	[StaticAccessor("GetPhysicsManager().GetPhysicsQuery()")]
	private static int Internal_CapsuleCastNonAlloc(PhysicsScene physicsScene, Vector3 p0, Vector3 p1, float radius, Vector3 direction, RaycastHit[] raycastHits, float maxDistance, int mask, QueryTriggerInteraction queryTriggerInteraction)
	{
		return Internal_CapsuleCastNonAlloc_Injected(ref physicsScene, ref p0, ref p1, radius, ref direction, raycastHits, maxDistance, mask, queryTriggerInteraction);
	}

	public int CapsuleCast(Vector3 point1, Vector3 point2, float radius, Vector3 direction, RaycastHit[] results, [DefaultValue("Mathf.Infinity")] float maxDistance = float.PositiveInfinity, [DefaultValue("DefaultRaycastLayers")] int layerMask = -5, [DefaultValue("QueryTriggerInteraction.UseGlobal")] QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal)
	{
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		float magnitude = ((Vector3)(ref direction)).magnitude;
		if (magnitude > float.Epsilon)
		{
			return Internal_CapsuleCastNonAlloc(this, point1, point2, radius, direction, results, maxDistance, layerMask, queryTriggerInteraction);
		}
		return 0;
	}

	[NativeName("OverlapCapsuleNonAlloc")]
	[StaticAccessor("GetPhysicsManager().GetPhysicsQuery()")]
	private static int OverlapCapsuleNonAlloc_Internal(PhysicsScene physicsScene, Vector3 point0, Vector3 point1, float radius, Collider[] results, int layerMask, QueryTriggerInteraction queryTriggerInteraction)
	{
		return OverlapCapsuleNonAlloc_Internal_Injected(ref physicsScene, ref point0, ref point1, radius, results, layerMask, queryTriggerInteraction);
	}

	public int OverlapCapsule(Vector3 point0, Vector3 point1, float radius, Collider[] results, [DefaultValue("AllLayers")] int layerMask = -1, [DefaultValue("QueryTriggerInteraction.UseGlobal")] QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		return OverlapCapsuleNonAlloc_Internal(this, point0, point1, radius, results, layerMask, queryTriggerInteraction);
	}

	[NativeName("SphereCast")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	private static bool Query_SphereCast(PhysicsScene physicsScene, Vector3 origin, float radius, Vector3 direction, float maxDistance, ref RaycastHit hitInfo, int layerMask, QueryTriggerInteraction queryTriggerInteraction)
	{
		return Query_SphereCast_Injected(ref physicsScene, ref origin, radius, ref direction, maxDistance, ref hitInfo, layerMask, queryTriggerInteraction);
	}

	private static bool Internal_SphereCast(PhysicsScene physicsScene, Vector3 origin, float radius, Vector3 direction, out RaycastHit hitInfo, float maxDistance, int layerMask, QueryTriggerInteraction queryTriggerInteraction)
	{
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_001f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: 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_0028: Unknown result type (might be due to invalid IL or missing references)
		float magnitude = ((Vector3)(ref direction)).magnitude;
		hitInfo = default(RaycastHit);
		if (magnitude > float.Epsilon)
		{
			Vector3 direction2 = direction / magnitude;
			return Query_SphereCast(physicsScene, origin, radius, direction2, maxDistance, ref hitInfo, layerMask, queryTriggerInteraction);
		}
		return false;
	}

	public bool SphereCast(Vector3 origin, float radius, Vector3 direction, out RaycastHit hitInfo, [DefaultValue("Mathf.Infinity")] float maxDistance = float.PositiveInfinity, [DefaultValue("DefaultRaycastLayers")] int layerMask = -5, [DefaultValue("QueryTriggerInteraction.UseGlobal")] QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		return Internal_SphereCast(this, origin, radius, direction, out hitInfo, maxDistance, layerMask, queryTriggerInteraction);
	}

	[NativeName("SphereCastNonAlloc")]
	[StaticAccessor("GetPhysicsManager().GetPhysicsQuery()")]
	private static int Internal_SphereCastNonAlloc(PhysicsScene physicsScene, Vector3 origin, float radius, Vector3 direction, RaycastHit[] raycastHits, float maxDistance, int mask, QueryTriggerInteraction queryTriggerInteraction)
	{
		return Internal_SphereCastNonAlloc_Injected(ref physicsScene, ref origin, radius, ref direction, raycastHits, maxDistance, mask, queryTriggerInteraction);
	}

	public int SphereCast(Vector3 origin, float radius, Vector3 direction, RaycastHit[] results, [DefaultValue("Mathf.Infinity")] float maxDistance = float.PositiveInfinity, [DefaultValue("DefaultRaycastLayers")] int layerMask = -5, [DefaultValue("QueryTriggerInteraction.UseGlobal")] QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal)
	{
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		float magnitude = ((Vector3)(ref direction)).magnitude;
		if (magnitude > float.Epsilon)
		{
			return Internal_SphereCastNonAlloc(this, origin, radius, direction, results, maxDistance, layerMask, queryTriggerInteraction);
		}
		return 0;
	}

	[NativeName("OverlapSphereNonAlloc")]
	[StaticAccessor("GetPhysicsManager().GetPhysicsQuery()")]
	private static int OverlapSphereNonAlloc_Internal(PhysicsScene physicsScene, Vector3 position, float radius, Collider[] results, int layerMask, QueryTriggerInteraction queryTriggerInteraction)
	{
		return OverlapSphereNonAlloc_Internal_Injected(ref physicsScene, ref position, radius, results, layerMask, queryTriggerInteraction);
	}

	public int OverlapSphere(Vector3 position, float radius, Collider[] results, [DefaultValue("AllLayers")] int layerMask, [DefaultValue("QueryTriggerInteraction.UseGlobal")] QueryTriggerInteraction queryTriggerInteraction)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		return OverlapSphereNonAlloc_Internal(this, position, radius, results, layerMask, queryTriggerInteraction);
	}

	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeName("BoxCast")]
	private static bool Query_BoxCast(PhysicsScene physicsScene, Vector3 center, Vector3 halfExtents, Vector3 direction, Quaternion orientation, float maxDistance, ref RaycastHit outHit, int layerMask, QueryTriggerInteraction queryTriggerInteraction)
	{
		return Query_BoxCast_Injected(ref physicsScene, ref center, ref halfExtents, ref direction, ref orientation, maxDistance, ref outHit, layerMask, queryTriggerInteraction);
	}

	private static bool Internal_BoxCast(PhysicsScene physicsScene, Vector3 center, Vector3 halfExtents, Quaternion orientation, Vector3 direction, out RaycastHit hitInfo, float maxDistance, int layerMask, QueryTriggerInteraction queryTriggerInteraction)
	{
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		//IL_0027: Unknown result type (might be due to invalid IL or missing references)
		//IL_0028: Unknown result type (might be due to invalid IL or missing references)
		//IL_0029: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		float magnitude = ((Vector3)(ref direction)).magnitude;
		hitInfo = default(RaycastHit);
		if (magnitude > float.Epsilon)
		{
			Vector3 direction2 = direction / magnitude;
			return Query_BoxCast(physicsScene, center, halfExtents, direction2, orientation, maxDistance, ref hitInfo, layerMask, queryTriggerInteraction);
		}
		return false;
	}

	public bool BoxCast(Vector3 center, Vector3 halfExtents, Vector3 direction, out RaycastHit hitInfo, [DefaultValue("Quaternion.identity")] Quaternion orientation, [DefaultValue("Mathf.Infinity")] float maxDistance = float.PositiveInfinity, [DefaultValue("DefaultRaycastLayers")] int layerMask = -5, [DefaultValue("QueryTriggerInteraction.UseGlobal")] QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		return Internal_BoxCast(this, center, halfExtents, orientation, direction, out hitInfo, maxDistance, layerMask, queryTriggerInteraction);
	}

	[ExcludeFromDocs]
	public bool BoxCast(Vector3 center, Vector3 halfExtents, Vector3 direction, out RaycastHit hitInfo)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		return Internal_BoxCast(this, center, halfExtents, Quaternion.identity, direction, out hitInfo, float.PositiveInfinity, -5, QueryTriggerInteraction.UseGlobal);
	}

	[NativeName("OverlapBoxNonAlloc")]
	[StaticAccessor("GetPhysicsManager().GetPhysicsQuery()")]
	private static int OverlapBoxNonAlloc_Internal(PhysicsScene physicsScene, Vector3 center, Vector3 halfExtents, Collider[] results, Quaternion orientation, int mask, QueryTriggerInteraction queryTriggerInteraction)
	{
		return OverlapBoxNonAlloc_Internal_Injected(ref physicsScene, ref center, ref halfExtents, results, ref orientation, mask, queryTriggerInteraction);
	}

	public int OverlapBox(Vector3 center, Vector3 halfExtents, Collider[] results, [DefaultValue("Quaternion.identity")] Quaternion orientation, [DefaultValue("DefaultRaycastLayers")] int layerMask = -5, [DefaultValue("QueryTriggerInteraction.UseGlobal")] QueryTriggerI

Room Architect Tool_Data/Managed/UnityEngine.ProfilerModule.dll

Decompiled 3 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;

[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]

Room Architect Tool_Data/Managed/UnityEngine.Purchasing.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Text;
using UnityEngine.Analytics;
using UnityEngine.Purchasing.Extension;

[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("UnityEditor.Purchasing")]
[assembly: InternalsVisibleTo("specs")]
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")]
[assembly: InternalsVisibleTo("Unity.IAP.Purchasing.RunTimeTests")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: AssemblyVersion("0.0.0.0")]
namespace UnityEngine.Purchasing
{
	internal class AnalyticsReporter
	{
		private IUnityAnalytics m_Analytics;

		public AnalyticsReporter(IUnityAnalytics analytics)
		{
			m_Analytics = analytics;
		}

		public void OnPurchaseSucceeded(Product product)
		{
			if (product.metadata.isoCurrencyCode != null)
			{
				m_Analytics.Transaction(product.definition.storeSpecificId, product.metadata.localizedPrice, product.metadata.isoCurrencyCode, product.receipt, null);
			}
		}

		public void OnPurchaseFailed(Product product, PurchaseFailureReason reason)
		{
			Dictionary<string, object> dictionary = new Dictionary<string, object>();
			dictionary.Add("productID", product.definition.storeSpecificId);
			dictionary.Add("reason", reason);
			dictionary.Add("price", product.metadata.localizedPrice);
			dictionary.Add("currency", product.metadata.isoCurrencyCode);
			Dictionary<string, object> data = dictionary;
			m_Analytics.CustomEvent("unity.PurchaseFailed", data);
		}
	}
	public class IDs : IEnumerable<KeyValuePair<string, string>>, IEnumerable
	{
		private Dictionary<string, string> m_Dic = new Dictionary<string, string>();

		IEnumerator IEnumerable.GetEnumerator()
		{
			return m_Dic.GetEnumerator();
		}

		public void Add(string id, params string[] stores)
		{
			foreach (string key in stores)
			{
				m_Dic[key] = id;
			}
		}

		public void Add(string id, params object[] stores)
		{
			foreach (object obj in stores)
			{
				m_Dic[obj.ToString()] = id;
			}
		}

		internal string SpecificIDForStore(string store, string defaultValue)
		{
			if (m_Dic.ContainsKey(store))
			{
				return m_Dic[store];
			}
			return defaultValue;
		}

		public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
		{
			return m_Dic.GetEnumerator();
		}
	}
	public class ConfigurationBuilder
	{
		private PurchasingFactory m_Factory;

		private HashSet<ProductDefinition> m_Products = new HashSet<ProductDefinition>();

		[Obsolete("This property has been renamed 'useCatalogProvider'", false)]
		public bool useCloudCatalog { get; set; }

		public bool useCatalogProvider { get; set; }

		public HashSet<ProductDefinition> products => m_Products;

		internal PurchasingFactory factory => m_Factory;

		internal ConfigurationBuilder(PurchasingFactory factory)
		{
			m_Factory = factory;
		}

		public T Configure<T>() where T : IStoreConfiguration
		{
			return m_Factory.GetConfig<T>();
		}

		public static ConfigurationBuilder Instance(IPurchasingModule first, params IPurchasingModule[] rest)
		{
			PurchasingFactory purchasingFactory = new PurchasingFactory(first, rest);
			return new ConfigurationBuilder(purchasingFactory);
		}

		public ConfigurationBuilder AddProduct(string id, ProductType type)
		{
			return AddProduct(id, type, null);
		}

		public ConfigurationBuilder AddProduct(string id, ProductType type, IDs storeIDs)
		{
			return AddProduct(id, type, storeIDs, (IEnumerable<PayoutDefinition>)null);
		}

		public ConfigurationBuilder AddProduct(string id, ProductType type, IDs storeIDs, PayoutDefinition payout)
		{
			return AddProduct(id, type, storeIDs, new List<PayoutDefinition> { payout });
		}

		public ConfigurationBuilder AddProduct(string id, ProductType type, IDs storeIDs, IEnumerable<PayoutDefinition> payouts)
		{
			string storeSpecificId = id;
			if (storeIDs != null)
			{
				storeSpecificId = storeIDs.SpecificIDForStore(factory.storeName, id);
			}
			ProductDefinition productDefinition = new ProductDefinition(id, storeSpecificId, type);
			productDefinition.SetPayouts(payouts);
			m_Products.Add(productDefinition);
			return this;
		}

		public ConfigurationBuilder AddProducts(IEnumerable<ProductDefinition> products)
		{
			foreach (ProductDefinition product in products)
			{
				m_Products.Add(product);
			}
			return this;
		}
	}
	public interface IExtensionProvider
	{
		T GetExtension<T>() where T : IStoreExtension;
	}
	internal interface IInternalStoreListener
	{
		void OnInitializeFailed(InitializationFailureReason error);

		PurchaseProcessingResult ProcessPurchase(PurchaseEventArgs e);

		void OnPurchaseFailed(Product i, PurchaseFailureReason p);

		void OnInitialized(IStoreController controller);
	}
	public interface IStoreController
	{
		ProductCollection products { get; }

		void InitiatePurchase(Product product, string payload);

		void InitiatePurchase(string productId, string payload);

		void InitiatePurchase(Product product);

		void InitiatePurchase(string productId);

		void FetchAdditionalProducts(HashSet<ProductDefinition> products, Action successCallback, Action<InitializationFailureReason> failCallback);

		void ConfirmPendingPurchase(Product product);
	}
	public interface IStoreListener
	{
		void OnInitializeFailed(InitializationFailureReason error);

		PurchaseProcessingResult ProcessPurchase(PurchaseEventArgs e);

		void OnPurchaseFailed(Product i, PurchaseFailureReason p);

		void OnInitialized(IStoreController controller, IExtensionProvider extensions);
	}
	internal interface IUnityAnalytics
	{
		void Transaction(string productId, decimal price, string currency, string receipt, string signature);

		void CustomEvent(string name, Dictionary<string, object> data);
	}
	public enum InitializationFailureReason
	{
		PurchasingUnavailable,
		NoProductsAvailable,
		AppNotKnown
	}
	[Serializable]
	public class PayoutDefinition
	{
		[SerializeField]
		private PayoutType m_Type;

		[SerializeField]
		private string m_Subtype = string.Empty;

		[SerializeField]
		private double m_Quantity;

		[SerializeField]
		private string m_Data = string.Empty;

		public const int MaxSubtypeLength = 64;

		public const int MaxDataLength = 1024;

		public PayoutType type
		{
			get
			{
				return m_Type;
			}
			private set
			{
				m_Type = value;
			}
		}

		public string typeString => m_Type.ToString();

		public string subtype
		{
			get
			{
				return m_Subtype;
			}
			private set
			{
				if (value.Length > 64)
				{
					throw new ArgumentException($"subtype connot be longer than {64}");
				}
				m_Subtype = value;
			}
		}

		public double quantity
		{
			get
			{
				return m_Quantity;
			}
			private set
			{
				m_Quantity = value;
			}
		}

		public string data
		{
			get
			{
				return m_Data;
			}
			private set
			{
				if (value.Length > 1024)
				{
					throw new ArgumentException($"data cannot be longer than {1024}");
				}
				m_Data = value;
			}
		}

		public PayoutDefinition()
		{
		}

		public PayoutDefinition(string typeString, string subtype, double quantity)
			: this(typeString, subtype, quantity, string.Empty)
		{
		}

		public PayoutDefinition(string typeString, string subtype, double quantity, string data)
		{
			PayoutType payoutType = PayoutType.Other;
			if (Enum.IsDefined(typeof(PayoutType), typeString))
			{
				payoutType = (PayoutType)Enum.Parse(typeof(PayoutType), typeString);
			}
			type = payoutType;
			this.subtype = subtype;
			this.quantity = quantity;
			this.data = data;
		}

		public PayoutDefinition(string subtype, double quantity)
			: this(PayoutType.Other, subtype, quantity, string.Empty)
		{
		}

		public PayoutDefinition(string subtype, double quantity, string data)
			: this(PayoutType.Other, subtype, quantity, data)
		{
		}

		public PayoutDefinition(PayoutType type, string subtype, double quantity)
			: this(type, subtype, quantity, string.Empty)
		{
		}

		public PayoutDefinition(PayoutType type, string subtype, double quantity, string data)
		{
			this.type = type;
			this.subtype = subtype;
			this.quantity = quantity;
			this.data = data;
		}
	}
	public enum PayoutType
	{
		Other,
		Currency,
		Item,
		Resource
	}
	public class Product
	{
		public ProductDefinition definition { get; private set; }

		public ProductMetadata metadata { get; internal set; }

		public bool availableToPurchase { get; internal set; }

		public string transactionID { get; internal set; }

		public bool hasReceipt => !string.IsNullOrEmpty(receipt);

		public string receipt { get; internal set; }

		internal Product(ProductDefinition definition, ProductMetadata metadata, string receipt)
		{
			this.definition = definition;
			this.metadata = metadata;
			this.receipt = receipt;
		}

		internal Product(ProductDefinition definition, ProductMetadata metadata)
			: this(definition, metadata, null)
		{
		}

		public override bool Equals(object obj)
		{
			if (obj == null)
			{
				return false;
			}
			if (!(obj is Product product))
			{
				return false;
			}
			return definition.Equals(product.definition);
		}

		public override int GetHashCode()
		{
			return definition.GetHashCode();
		}
	}
	public class ProductCollection
	{
		private Dictionary<string, Product> m_IdToProduct;

		private Dictionary<string, Product> m_StoreSpecificIdToProduct;

		private Product[] m_Products;

		private HashSet<Product> m_ProductSet = new HashSet<Product>();

		public HashSet<Product> set => m_ProductSet;

		public Product[] all => m_Products;

		internal ProductCollection(Product[] products)
		{
			AddProducts(products);
		}

		internal void AddProducts(IEnumerable<Product> products)
		{
			m_ProductSet.UnionWith(products);
			m_Products = m_ProductSet.ToArray();
			m_IdToProduct = m_Products.ToDictionary((Product x) => x.definition.id);
			m_StoreSpecificIdToProduct = m_Products.ToDictionary((Product x) => x.definition.storeSpecificId);
		}

		public Product WithID(string id)
		{
			Product value = null;
			m_IdToProduct.TryGetValue(id, out value);
			return value;
		}

		public Product WithStoreSpecificID(string id)
		{
			Product value = null;
			m_StoreSpecificIdToProduct.TryGetValue(id, out value);
			return value;
		}
	}
	public class ProductDefinition
	{
		private List<PayoutDefinition> m_Payouts = new List<PayoutDefinition>();

		public string id { get; private set; }

		public string storeSpecificId { get; private set; }

		public ProductType type { get; private set; }

		public bool enabled { get; private set; }

		public IEnumerable<PayoutDefinition> payouts => m_Payouts;

		public PayoutDefinition payout => (m_Payouts.Count <= 0) ? null : m_Payouts[0];

		private ProductDefinition()
		{
		}

		public ProductDefinition(string id, string storeSpecificId, ProductType type)
			: this(id, storeSpecificId, type, enabled: true)
		{
		}

		public ProductDefinition(string id, string storeSpecificId, ProductType type, bool enabled)
			: this(id, storeSpecificId, type, enabled, (IEnumerable<PayoutDefinition>)null)
		{
		}

		public ProductDefinition(string id, string storeSpecificId, ProductType type, bool enabled, PayoutDefinition payout)
			: this(id, storeSpecificId, type, enabled, new List<PayoutDefinition> { payout })
		{
		}

		public ProductDefinition(string id, string storeSpecificId, ProductType type, bool enabled, IEnumerable<PayoutDefinition> payouts)
		{
			this.id = id;
			this.storeSpecificId = storeSpecificId;
			this.type = type;
			this.enabled = enabled;
			SetPayouts(payouts);
		}

		public ProductDefinition(string id, ProductType type)
			: this(id, id, type)
		{
		}

		public override bool Equals(object obj)
		{
			if (obj == null)
			{
				return false;
			}
			if (!(obj is ProductDefinition productDefinition))
			{
				return false;
			}
			return id == productDefinition.id;
		}

		public override int GetHashCode()
		{
			return id.GetHashCode();
		}

		internal void SetPayouts(IEnumerable<PayoutDefinition> newPayouts)
		{
			if (newPayouts != null)
			{
				m_Payouts.Clear();
				m_Payouts.AddRange(newPayouts);
			}
		}
	}
	public class ProductMetadata
	{
		public string localizedPriceString { get; internal set; }

		public string localizedTitle { get; internal set; }

		public string localizedDescription { get; internal set; }

		public string isoCurrencyCode { get; internal set; }

		public decimal localizedPrice { get; internal set; }

		public ProductMetadata(string priceString, string title, string description, string currencyCode, decimal localizedPrice)
		{
			localizedPriceString = priceString;
			localizedTitle = title;
			localizedDescription = description;
			isoCurrencyCode = currencyCode;
			this.localizedPrice = localizedPrice;
		}

		public ProductMetadata()
		{
		}
	}
	public enum ProductType
	{
		Consumable,
		NonConsumable,
		Subscription
	}
	public class PurchaseEventArgs
	{
		public Product purchasedProduct { get; private set; }

		internal PurchaseEventArgs(Product purchasedProduct)
		{
			this.purchasedProduct = purchasedProduct;
		}
	}
	public class PurchaseFailedEventArgs
	{
		public Product purchasedProduct { get; private set; }

		public PurchaseFailureReason reason { get; private set; }

		public string message { get; private set; }

		internal PurchaseFailedEventArgs(Product purchasedProduct, PurchaseFailureReason reason, string message)
		{
			this.purchasedProduct = purchasedProduct;
			this.reason = reason;
			this.message = message;
		}
	}
}
namespace UnityEngine.Purchasing.Extension
{
	public class PurchaseFailureDescription
	{
		public string productId { get; private set; }

		public PurchaseFailureReason reason { get; private set; }

		public string message { get; private set; }

		public PurchaseFailureDescription(string productId, PurchaseFailureReason reason, string message)
		{
			this.productId = productId;
			this.reason = reason;
			this.message = message;
		}
	}
}
namespace UnityEngine.Purchasing
{
	public enum PurchaseFailureReason
	{
		PurchasingUnavailable,
		ExistingPurchasePending,
		ProductUnavailable,
		SignatureInvalid,
		UserCancelled,
		PaymentDeclined,
		DuplicateTransaction,
		Unknown
	}
	public enum PurchaseProcessingResult
	{
		Complete,
		Pending
	}
	internal class PurchasingFactory : IPurchasingBinder, IExtensionProvider
	{
		private Dictionary<Type, IStoreConfiguration> m_ConfigMap = new Dictionary<Type, IStoreConfiguration>();

		private Dictionary<Type, IStoreExtension> m_ExtensionMap = new Dictionary<Type, IStoreExtension>();

		private IStore m_Store;

		private ICatalogProvider m_CatalogProvider;

		public string storeName { get; private set; }

		public IStore service
		{
			get
			{
				if (m_Store != null)
				{
					return m_Store;
				}
				throw new InvalidOperationException("No impl available!");
			}
			set
			{
				m_Store = value;
			}
		}

		public PurchasingFactory(IPurchasingModule first, params IPurchasingModule[] remainingModules)
		{
			first.Configure(this);
			foreach (IPurchasingModule purchasingModule in remainingModules)
			{
				purchasingModule.Configure(this);
			}
		}

		public void RegisterStore(string name, IStore s)
		{
			if (m_Store == null && s != null)
			{
				storeName = name;
				service = s;
			}
		}

		public void RegisterExtension<T>(T instance) where T : IStoreExtension
		{
			m_ExtensionMap[typeof(T)] = instance;
		}

		public void RegisterConfiguration<T>(T instance) where T : IStoreConfiguration
		{
			m_ConfigMap[typeof(T)] = instance;
		}

		public T GetConfig<T>() where T : IStoreConfiguration
		{
			if (service is T)
			{
				return (T)service;
			}
			Type typeFromHandle = typeof(T);
			if (m_ConfigMap.ContainsKey(typeFromHandle))
			{
				return (T)m_ConfigMap[typeFromHandle];
			}
			throw new ArgumentException("No binding for config type " + typeFromHandle);
		}

		public T GetExtension<T>() where T : IStoreExtension
		{
			if (service is T)
			{
				return (T)service;
			}
			Type typeFromHandle = typeof(T);
			if (m_ExtensionMap.ContainsKey(typeFromHandle))
			{
				return (T)m_ExtensionMap[typeFromHandle];
			}
			throw new ArgumentException("No binding for type " + typeFromHandle);
		}

		public void SetCatalogProvider(ICatalogProvider provider)
		{
			m_CatalogProvider = provider;
		}

		public void SetCatalogProviderFunction(Action<Action<HashSet<ProductDefinition>>> func)
		{
			m_CatalogProvider = new SimpleCatalogProvider(func);
		}

		internal ICatalogProvider GetCatalogProvider()
		{
			return m_CatalogProvider;
		}
	}
	internal class PurchasingManager : IStoreCallback, IStoreController
	{
		[Serializable]
		private class UnifiedReceipt
		{
			public string Store;

			public string TransactionID;

			public string Payload;
		}

		private IStore m_Store;

		private IInternalStoreListener m_Listener;

		private ILogger m_Logger;

		private TransactionLog m_TransactionLog;

		private string m_StoreName;

		private Action m_AdditionalProductsCallback;

		private Action<InitializationFailureReason> m_AdditionalProductsFailCallback;

		private bool initialized;

		public bool useTransactionLog { get; set; }

		public ProductCollection products { get; private set; }

		internal PurchasingManager(TransactionLog tDb, ILogger logger, IStore store, string storeName)
		{
			m_TransactionLog = tDb;
			m_Store = store;
			m_Logger = logger;
			m_StoreName = storeName;
			useTransactionLog = true;
		}

		public void InitiatePurchase(Product product)
		{
			InitiatePurchase(product, string.Empty);
		}

		public void InitiatePurchase(string productId)
		{
			InitiatePurchase(productId, string.Empty);
		}

		public void InitiatePurchase(Product product, string developerPayload)
		{
			if (product == null)
			{
				m_Logger.Log((object)"Trying to purchase null Product");
				return;
			}
			if (!product.availableToPurchase)
			{
				m_Listener.OnPurchaseFailed(product, PurchaseFailureReason.ProductUnavailable);
				return;
			}
			m_Store.Purchase(product.definition, developerPayload);
			m_Logger.Log("purchase({0})", (object)product.definition.id);
		}

		public void InitiatePurchase(string purchasableId, string developerPayload)
		{
			Product product = products.WithID(purchasableId);
			if (product == null)
			{
				m_Logger.LogWarning("Unable to purchase unknown product with id: {0}", (object)purchasableId);
			}
			InitiatePurchase(product, developerPayload);
		}

		public void ConfirmPendingPurchase(Product product)
		{
			if (product == null)
			{
				m_Logger.Log((object)"Unable to confirm purchase with null Product");
				return;
			}
			if (string.IsNullOrEmpty(product.transactionID))
			{
				m_Logger.Log((object)"Unable to confirm purchase; Product has missing or empty transactionID");
				return;
			}
			if (useTransactionLog)
			{
				m_TransactionLog.Record(product.transactionID);
			}
			m_Store.FinishTransaction(product.definition, product.transactionID);
		}

		public void OnPurchaseSucceeded(string id, string receipt, string transactionId)
		{
			Product product = products.WithStoreSpecificID(id);
			if (product == null)
			{
				ProductDefinition definition = new ProductDefinition(id, ProductType.NonConsumable);
				product = new Product(definition, new ProductMetadata());
			}
			string receipt2 = FormatUnifiedReceipt(receipt, transactionId);
			product.receipt = receipt2;
			product.transactionID = transactionId;
			ProcessPurchaseIfNew(product);
		}

		public void OnSetupFailed(InitializationFailureReason reason)
		{
			if (initialized)
			{
				if (m_AdditionalProductsFailCallback != null)
				{
					m_AdditionalProductsFailCallback(reason);
				}
			}
			else
			{
				m_Listener.OnInitializeFailed(reason);
			}
		}

		public void OnPurchaseFailed(PurchaseFailureDescription description)
		{
			Product product = products.WithStoreSpecificID(description.productId);
			if (product == null)
			{
				m_Logger.LogError("Failed to purchase unknown product {0}", (object)description.productId);
				return;
			}
			m_Logger.Log("onPurchaseFailedEvent({0})", (object)product.definition.id);
			m_Listener.OnPurchaseFailed(product, description.reason);
		}

		public void OnProductsRetrieved(List<ProductDescription> products)
		{
			HashSet<Product> hashSet = new HashSet<Product>();
			foreach (ProductDescription product2 in products)
			{
				Product product = this.products.WithStoreSpecificID(product2.storeSpecificId);
				if (product == null)
				{
					ProductDefinition definition = new ProductDefinition(product2.storeSpecificId, product2.storeSpecificId, product2.type);
					product = new Product(definition, product2.metadata);
					hashSet.Add(product);
				}
				product.availableToPurchase = true;
				product.metadata = product2.metadata;
				product.transactionID = product2.transactionId;
				if (!string.IsNullOrEmpty(product2.receipt))
				{
					product.receipt = FormatUnifiedReceipt(product2.receipt, product2.transactionId);
				}
			}
			if (hashSet.Count > 0)
			{
				this.products.AddProducts(hashSet);
			}
			CheckForInitialization();
			foreach (Product item in this.products.set)
			{
				if (!string.IsNullOrEmpty(item.receipt) && !string.IsNullOrEmpty(item.transactionID))
				{
					ProcessPurchaseIfNew(item);
				}
			}
		}

		public void FetchAdditionalProducts(HashSet<ProductDefinition> products, Action successCallback, Action<InitializationFailureReason> failCallback)
		{
			m_AdditionalProductsCallback = successCallback;
			m_AdditionalProductsFailCallback = failCallback;
			this.products.AddProducts(products.Select((ProductDefinition x) => new Product(x, new ProductMetadata())));
			m_Store.RetrieveProducts(new ReadOnlyCollection<ProductDefinition>(products.ToList()));
		}

		private void ProcessPurchaseIfNew(Product product)
		{
			if (useTransactionLog && m_TransactionLog.HasRecordOf(product.transactionID))
			{
				m_Logger.Log((object)("Already recorded transaction " + product.transactionID));
				m_Store.FinishTransaction(product.definition, product.transactionID);
				return;
			}
			PurchaseEventArgs e = new PurchaseEventArgs(product);
			if (m_Listener.ProcessPurchase(e) == PurchaseProcessingResult.Complete)
			{
				ConfirmPendingPurchase(product);
			}
		}

		private void CheckForInitialization()
		{
			if (!initialized)
			{
				bool flag = false;
				foreach (Product item in products.set)
				{
					if (!item.availableToPurchase)
					{
						m_Logger.LogFormat((LogType)2, "Unavailable product {0} -{1}", new object[2]
						{
							item.definition.id,
							item.definition.storeSpecificId
						});
					}
					else
					{
						flag = true;
					}
				}
				if (flag)
				{
					m_Listener.OnInitialized(this);
				}
				else
				{
					OnSetupFailed(InitializationFailureReason.NoProductsAvailable);
				}
				initialized = true;
			}
			else if (m_AdditionalProductsCallback != null)
			{
				m_AdditionalProductsCallback();
			}
		}

		public void Initialize(IInternalStoreListener listener, HashSet<ProductDefinition> products)
		{
			m_Listener = listener;
			m_Store.Initialize(this);
			Product[] array = products.Select((ProductDefinition x) => new Product(x, new ProductMetadata())).ToArray();
			this.products = new ProductCollection(array);
			ReadOnlyCollection<ProductDefinition> readOnlyCollection = new ReadOnlyCollection<ProductDefinition>(products.ToList());
			m_Store.RetrieveProducts(readOnlyCollection);
		}

		private string FormatUnifiedReceipt(string platformReceipt, string transactionId)
		{
			UnifiedReceipt unifiedReceipt = new UnifiedReceipt();
			unifiedReceipt.Store = m_StoreName;
			unifiedReceipt.TransactionID = transactionId;
			unifiedReceipt.Payload = platformReceipt;
			UnifiedReceipt unifiedReceipt2 = unifiedReceipt;
			return JsonUtility.ToJson((object)unifiedReceipt2);
		}
	}
	internal class SimpleCatalogProvider : ICatalogProvider
	{
		private Action<Action<HashSet<ProductDefinition>>> m_Func;

		internal SimpleCatalogProvider(Action<Action<HashSet<ProductDefinition>>> func)
		{
			m_Func = func;
		}

		public void FetchProducts(Action<HashSet<ProductDefinition>> callback)
		{
			if (m_Func != null)
			{
				m_Func(callback);
			}
		}
	}
	internal class StoreListenerProxy : IInternalStoreListener
	{
		private AnalyticsReporter m_Analytics;

		private IStoreListener m_ForwardTo;

		private IExtensionProvider m_Extensions;

		public StoreListenerProxy(IStoreListener forwardTo, AnalyticsReporter analytics, IExtensionProvider extensions)
		{
			m_ForwardTo = forwardTo;
			m_Analytics = analytics;
			m_Extensions = extensions;
		}

		public void OnInitialized(IStoreController controller)
		{
			m_ForwardTo.OnInitialized(controller, m_Extensions);
		}

		public void OnInitializeFailed(InitializationFailureReason error)
		{
			m_ForwardTo.OnInitializeFailed(error);
		}

		public PurchaseProcessingResult ProcessPurchase(PurchaseEventArgs e)
		{
			m_Analytics.OnPurchaseSucceeded(e.purchasedProduct);
			return m_ForwardTo.ProcessPurchase(e);
		}

		public void OnPurchaseFailed(Product i, PurchaseFailureReason p)
		{
			m_Analytics.OnPurchaseFailed(i, p);
			m_ForwardTo.OnPurchaseFailed(i, p);
		}
	}
	internal class TransactionLog
	{
		private readonly ILogger logger;

		private readonly string persistentDataPath;

		public TransactionLog(ILogger logger, string persistentDataPath)
		{
			this.logger = logger;
			if (!string.IsNullOrEmpty(persistentDataPath))
			{
				this.persistentDataPath = Path.Combine(Path.Combine(persistentDataPath, "Unity"), "UnityPurchasing");
			}
		}

		public void Clear()
		{
			Directory.Delete(persistentDataPath, recursive: true);
		}

		public bool HasRecordOf(string transactionID)
		{
			if (string.IsNullOrEmpty(transactionID) || string.IsNullOrEmpty(persistentDataPath))
			{
				return false;
			}
			return Directory.Exists(GetRecordPath(transactionID));
		}

		public void Record(string transactionID)
		{
			if (!string.IsNullOrEmpty(transactionID) && !string.IsNullOrEmpty(persistentDataPath))
			{
				string recordPath = GetRecordPath(transactionID);
				try
				{
					Directory.CreateDirectory(recordPath);
				}
				catch (Exception ex)
				{
					logger.Log((object)ex.Message);
				}
			}
		}

		private string GetRecordPath(string transactionID)
		{
			return Path.Combine(persistentDataPath, ComputeHash(transactionID));
		}

		internal static string ComputeHash(string transactionID)
		{
			ulong num = 3074457345618258791uL;
			for (int i = 0; i < transactionID.Length; i++)
			{
				num += transactionID[i];
				num *= 3074457345618258799L;
			}
			StringBuilder stringBuilder = new StringBuilder(16);
			byte[] bytes = BitConverter.GetBytes(num);
			foreach (byte b in bytes)
			{
				stringBuilder.AppendFormat("{0:X2}", b);
			}
			return stringBuilder.ToString();
		}
	}
	internal class UnityAnalytics : IUnityAnalytics
	{
		public void Transaction(string productId, decimal price, string currency, string receipt, string signature)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			Analytics.Transaction(productId, price, currency, receipt, signature, true);
		}

		public void CustomEvent(string name, Dictionary<string, object> data)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			Analytics.CustomEvent(name, (IDictionary<string, object>)data);
		}
	}
	public abstract class UnityPurchasing
	{
		public static void Initialize(IStoreListener listener, ConfigurationBuilder builder)
		{
			Initialize(listener, builder, Debug.unityLogger, Application.persistentDataPath, new UnityAnalytics(), builder.factory.GetCatalogProvider());
		}

		public static void ClearTransactionLog()
		{
			TransactionLog transactionLog = new TransactionLog(Debug.unityLogger, Application.persistentDataPath);
			transactionLog.Clear();
		}

		internal static void Initialize(IStoreListener listener, ConfigurationBuilder builder, ILogger logger, string persistentDatapath, IUnityAnalytics analytics, ICatalogProvider catalog)
		{
			TransactionLog tDb = new TransactionLog(logger, persistentDatapath);
			PurchasingManager manager = new PurchasingManager(tDb, logger, builder.factory.service, builder.factory.storeName);
			AnalyticsReporter analytics2 = new AnalyticsReporter(analytics);
			StoreListenerProxy proxy = new StoreListenerProxy(listener, analytics2, builder.factory);
			FetchAndMergeProducts(builder.useCatalogProvider, builder.products, catalog, delegate(HashSet<ProductDefinition> response)
			{
				manager.Initialize(proxy, response);
			});
		}

		internal static void FetchAndMergeProducts(bool useCatalog, HashSet<ProductDefinition> localProductSet, ICatalogProvider catalog, Action<HashSet<ProductDefinition>> callback)
		{
			if (useCatalog && catalog != null)
			{
				catalog.FetchProducts(delegate(HashSet<ProductDefinition> cloudProducts)
				{
					HashSet<ProductDefinition> hashSet = new HashSet<ProductDefinition>(localProductSet);
					foreach (ProductDefinition cloudProduct in cloudProducts)
					{
						hashSet.Remove(cloudProduct);
						hashSet.Add(cloudProduct);
					}
					callback(hashSet);
				});
			}
			else
			{
				callback(localProductSet);
			}
		}
	}
}
namespace UnityEngine.Purchasing.Extension
{
	public abstract class AbstractPurchasingModule : IPurchasingModule
	{
		protected IPurchasingBinder m_Binder;

		public void Configure(IPurchasingBinder binder)
		{
			m_Binder = binder;
			Configure();
		}

		protected void RegisterStore(string name, IStore a)
		{
			m_Binder.RegisterStore(name, a);
		}

		protected void BindExtension<T>(T instance) where T : IStoreExtension
		{
			m_Binder.RegisterExtension(instance);
		}

		protected void BindConfiguration<T>(T instance) where T : IStoreConfiguration
		{
			m_Binder.RegisterConfiguration(instance);
		}

		public abstract void Configure();
	}
	public abstract class AbstractStore : IStore
	{
		public abstract void Initialize(IStoreCallback callback);

		public abstract void RetrieveProducts(ReadOnlyCollection<ProductDefinition> products);

		public abstract void Purchase(ProductDefinition product, string developerPayload);

		public abstract void FinishTransaction(ProductDefinition product, string transactionId);
	}
	public interface ICatalogProvider
	{
		void FetchProducts(Action<HashSet<ProductDefinition>> callback);
	}
	public interface IPurchasingBinder
	{
		void RegisterStore(string name, IStore a);

		void RegisterExtension<T>(T instance) where T : IStoreExtension;

		void RegisterConfiguration<T>(T instance) where T : IStoreConfiguration;

		void SetCatalogProvider(ICatalogProvider provider);

		void SetCatalogProviderFunction(Action<Action<HashSet<ProductDefinition>>> func);
	}
	public interface IPurchasingModule
	{
		void Configure(IPurchasingBinder binder);
	}
	public interface IStore
	{
		void Initialize(IStoreCallback callback);

		void RetrieveProducts(ReadOnlyCollection<ProductDefinition> products);

		void Purchase(ProductDefinition product, string developerPayload);

		void FinishTransaction(ProductDefinition product, string transactionId);
	}
	public interface IStoreCallback
	{
		ProductCollection products { get; }

		bool useTransactionLog { get; set; }

		void OnSetupFailed(InitializationFailureReason reason);

		void OnProductsRetrieved(List<ProductDescription> products);

		void OnPurchaseSucceeded(string storeSpecificId, string receipt, string transactionIdentifier);

		void OnPurchaseFailed(PurchaseFailureDescription desc);
	}
	public interface IStoreConfiguration
	{
	}
}
namespace UnityEngine.Purchasing
{
	public interface IStoreExtension
	{
	}
}
namespace UnityEngine.Purchasing.Extension
{
	public class ProductDescription
	{
		public ProductType type;

		public string storeSpecificId { get; private set; }

		public ProductMetadata metadata { get; private set; }

		public string receipt { get; private set; }

		public string transactionId { get; set; }

		public ProductDescription(string id, ProductMetadata metadata, string receipt, string transactionId)
		{
			storeSpecificId = id;
			this.metadata = metadata;
			this.receipt = receipt;
			this.transactionId = transactionId;
		}

		public ProductDescription(string id, ProductMetadata metadata, string receipt, string transactionId, ProductType type)
			: this(id, metadata, receipt, transactionId)
		{
			this.type = type;
		}

		public ProductDescription(string id, ProductMetadata metadata)
			: this(id, metadata, null, null)
		{
		}
	}
}

Room Architect Tool_Data/Managed/UnityEngine.ScreenCaptureModule.dll

Decompiled 3 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;
using UnityEngine.Internal;

[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine;

[NativeHeader("Modules/ScreenCapture/Public/CaptureScreenshot.h")]
public static class ScreenCapture
{
	public enum StereoScreenCaptureMode
	{
		LeftEye = 1,
		RightEye,
		BothEyes
	}

	public static void CaptureScreenshot(string filename)
	{
		CaptureScreenshot(filename, 1, StereoScreenCaptureMode.LeftEye);
	}

	public static void CaptureScreenshot(string filename, int superSize)
	{
		CaptureScreenshot(filename, superSize, StereoScreenCaptureMode.LeftEye);
	}

	public static void CaptureScreenshot(string filename, StereoScreenCaptureMode stereoCaptureMode)
	{
		CaptureScreenshot(filename, 1, stereoCaptureMode);
	}

	public static Texture2D CaptureScreenshotAsTexture()
	{
		return CaptureScreenshotAsTexture(1, StereoScreenCaptureMode.LeftEye);
	}

	public static Texture2D CaptureScreenshotAsTexture(int superSize)
	{
		return CaptureScreenshotAsTexture(superSize, StereoScreenCaptureMode.LeftEye);
	}

	public static Texture2D CaptureScreenshotAsTexture(StereoScreenCaptureMode stereoCaptureMode)
	{
		return CaptureScreenshotAsTexture(1, stereoCaptureMode);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	public static extern void CaptureScreenshotIntoRenderTexture(RenderTexture renderTexture);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void CaptureScreenshot(string filename, [DefaultValue("1")] int superSize, [DefaultValue("1")] StereoScreenCaptureMode CaptureMode);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern Texture2D CaptureScreenshotAsTexture(int superSize, StereoScreenCaptureMode stereoScreenCaptureMode);
}

Room Architect Tool_Data/Managed/UnityEngine.SharedInternalsModule.dll

Decompiled 3 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;

[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine.Scripting
{
	[VisibleToOtherModules]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Interface, Inherited = false)]
	internal class UsedByNativeCodeAttribute : Attribute
	{
		public string Name { get; set; }

		public UsedByNativeCodeAttribute()
		{
		}

		public UsedByNativeCodeAttribute(string name)
		{
			Name = name;
		}
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Interface, Inherited = false)]
	[VisibleToOtherModules]
	internal class RequiredByNativeCodeAttribute : Attribute
	{
		public string Name { get; set; }

		public bool Optional { get; set; }

		public bool GenerateProxy { get; set; }

		public RequiredByNativeCodeAttribute()
		{
		}

		public RequiredByNativeCodeAttribute(string name)
		{
			Name = name;
		}

		public RequiredByNativeCodeAttribute(bool optional)
		{
			Optional = optional;
		}

		public RequiredByNativeCodeAttribute(string name, bool optional)
		{
			Name = name;
			Optional = optional;
		}
	}
	[VisibleToOtherModules]
	internal class GeneratedByOldBindingsGeneratorAttribute : Attribute
	{
	}
}
namespace UnityEngine
{
	[AttributeUsage(AttributeTargets.Class, Inherited = false)]
	[VisibleToOtherModules]
	internal sealed class AssetFileNameExtensionAttribute : Attribute
	{
		public string preferredExtension { get; }

		public IEnumerable<string> otherExtensions { get; }

		public AssetFileNameExtensionAttribute(string preferredExtension, params string[] otherExtensions)
		{
			this.preferredExtension = preferredExtension;
			this.otherExtensions = otherExtensions;
		}
	}
	[AttributeUsage(AttributeTargets.Method)]
	[VisibleToOtherModules]
	internal class ThreadAndSerializationSafeAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Struct)]
	[VisibleToOtherModules]
	internal class IL2CPPStructAlignmentAttribute : Attribute
	{
		public int Align;

		public IL2CPPStructAlignmentAttribute()
		{
			Align = 1;
		}
	}
	[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false)]
	[VisibleToOtherModules]
	internal class WritableAttribute : Attribute
	{
	}
	[VisibleToOtherModules]
	[AttributeUsage(AttributeTargets.Class)]
	internal class RejectDragAndDropMaterial : Attribute
	{
	}
	[VisibleToOtherModules]
	[AttributeUsage(AttributeTargets.Assembly)]
	internal class UnityEngineModuleAssembly : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false)]
	[VisibleToOtherModules]
	internal sealed class NativeClassAttribute : Attribute
	{
		public string QualifiedNativeName { get; private set; }

		public string Declaration { get; private set; }

		public NativeClassAttribute(string qualifiedCppName)
		{
			QualifiedNativeName = qualifiedCppName;
			Declaration = "class " + qualifiedCppName;
		}

		public NativeClassAttribute(string qualifiedCppName, string declaration)
		{
			QualifiedNativeName = qualifiedCppName;
			Declaration = declaration;
		}
	}
}
namespace UnityEngine.Bindings
{
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Interface | AttributeTargets.Delegate, Inherited = false)]
	[VisibleToOtherModules]
	internal class VisibleToOtherModulesAttribute : Attribute
	{
		public VisibleToOtherModulesAttribute()
		{
		}

		public VisibleToOtherModulesAttribute(params string[] modules)
		{
		}
	}
	internal interface IBindingsAttribute
	{
	}
	internal interface IBindingsNameProviderAttribute : IBindingsAttribute
	{
		string Name { get; set; }
	}
	internal interface IBindingsHeaderProviderAttribute : IBindingsAttribute
	{
		string Header { get; set; }
	}
	internal interface IBindingsIsThreadSafeProviderAttribute : IBindingsAttribute
	{
		bool IsThreadSafe { get; set; }
	}
	internal interface IBindingsIsFreeFunctionProviderAttribute : IBindingsAttribute
	{
		bool IsFreeFunction { get; set; }

		bool HasExplicitThis { get; set; }
	}
	internal interface IBindingsThrowsProviderAttribute : IBindingsAttribute
	{
		bool ThrowsException { get; set; }
	}
	internal interface IBindingsGenerateMarshallingTypeAttribute : IBindingsAttribute
	{
		CodegenOptions CodegenOptions { get; set; }
	}
	internal interface IBindingsWritableSelfProviderAttribute : IBindingsAttribute
	{
		bool WritableSelf { get; set; }
	}
	[VisibleToOtherModules]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Property)]
	internal class NativeConditionalAttribute : Attribute, IBindingsAttribute
	{
		public string Condition { get; set; }

		public string StubReturnStatement { get; set; }

		public bool Enabled { get; set; }

		public NativeConditionalAttribute()
		{
		}

		public NativeConditionalAttribute(string condition)
		{
			Condition = condition;
			Enabled = true;
		}

		public NativeConditionalAttribute(bool enabled)
		{
			Enabled = enabled;
		}

		public NativeConditionalAttribute(string condition, bool enabled)
			: this(condition)
		{
			Enabled = enabled;
		}

		public NativeConditionalAttribute(string condition, string stubReturnStatement, bool enabled)
			: this(condition, stubReturnStatement)
		{
			Enabled = enabled;
		}

		public NativeConditionalAttribute(string condition, string stubReturnStatement)
			: this(condition)
		{
			StubReturnStatement = stubReturnStatement;
		}
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = true)]
	[VisibleToOtherModules]
	internal class NativeHeaderAttribute : Attribute, IBindingsHeaderProviderAttribute, IBindingsAttribute
	{
		public string Header { get; set; }

		public NativeHeaderAttribute()
		{
		}

		public NativeHeaderAttribute(string header)
		{
			if (header == null)
			{
				throw new ArgumentNullException("header");
			}
			if (header == "")
			{
				throw new ArgumentException("header cannot be empty", "header");
			}
			Header = header;
		}
	}
	[VisibleToOtherModules]
	[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field)]
	internal class NativeNameAttribute : Attribute, IBindingsNameProviderAttribute, IBindingsAttribute
	{
		public string Name { get; set; }

		public NativeNameAttribute()
		{
		}

		public NativeNameAttribute(string name)
		{
			if (name == null)
			{
				throw new ArgumentNullException("name");
			}
			if (name == "")
			{
				throw new ArgumentException("name cannot be empty", "name");
			}
			Name = name;
		}
	}
	[AttributeUsage(AttributeTargets.Method)]
	[VisibleToOtherModules]
	internal sealed class NativeWritableSelfAttribute : Attribute, IBindingsWritableSelfProviderAttribute, IBindingsAttribute
	{
		public bool WritableSelf { get; set; }

		public NativeWritableSelfAttribute()
		{
			WritableSelf = true;
		}

		public NativeWritableSelfAttribute(bool writable)
		{
			WritableSelf = writable;
		}
	}
	[VisibleToOtherModules]
	[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property)]
	internal class NativeMethodAttribute : Attribute, IBindingsNameProviderAttribute, IBindingsIsThreadSafeProviderAttribute, IBindingsIsFreeFunctionProviderAttribute, IBindingsThrowsProviderAttribute, IBindingsAttribute
	{
		public string Name { get; set; }

		public bool IsThreadSafe { get; set; }

		public bool IsFreeFunction { get; set; }

		public bool ThrowsException { get; set; }

		public bool HasExplicitThis { get; set; }

		public bool WritableSelf { get; set; }

		public NativeMethodAttribute()
		{
		}

		public NativeMethodAttribute(string name)
		{
			if (name == null)
			{
				throw new ArgumentNullException("name");
			}
			if (name == "")
			{
				throw new ArgumentException("name cannot be empty", "name");
			}
			Name = name;
		}

		public NativeMethodAttribute(string name, bool isFreeFunction)
			: this(name)
		{
			IsFreeFunction = isFreeFunction;
		}

		public NativeMethodAttribute(string name, bool isFreeFunction, bool isThreadSafe)
			: this(name, isFreeFunction)
		{
			IsThreadSafe = isThreadSafe;
		}

		public NativeMethodAttribute(string name, bool isFreeFunction, bool isThreadSafe, bool throws)
			: this(name, isFreeFunction, isThreadSafe)
		{
			ThrowsException = throws;
		}
	}
	[VisibleToOtherModules]
	internal enum TargetType
	{
		Function,
		Field
	}
	[AttributeUsage(AttributeTargets.Property)]
	[VisibleToOtherModules]
	internal class NativePropertyAttribute : NativeMethodAttribute
	{
		public TargetType TargetType { get; set; }

		public NativePropertyAttribute()
		{
		}

		public NativePropertyAttribute(string name)
			: base(name)
		{
		}

		public NativePropertyAttribute(string name, TargetType targetType)
			: base(name)
		{
			TargetType = targetType;
		}

		public NativePropertyAttribute(string name, bool isFree, TargetType targetType)
			: base(name, isFree)
		{
			TargetType = targetType;
		}

		public NativePropertyAttribute(string name, bool isFree, TargetType targetType, bool isThreadSafe)
			: base(name, isFree, isThreadSafe)
		{
			TargetType = targetType;
		}
	}
	[VisibleToOtherModules]
	internal enum CodegenOptions
	{
		Auto,
		Custom,
		Force
	}
	[AttributeUsage(AttributeTargets.Class)]
	[VisibleToOtherModules]
	internal class NativeAsStructAttribute : Attribute, IBindingsAttribute
	{
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum)]
	[VisibleToOtherModules]
	internal class NativeTypeAttribute : Attribute, IBindingsHeaderProviderAttribute, IBindingsGenerateMarshallingTypeAttribute, IBindingsAttribute
	{
		public string Header { get; set; }

		public string IntermediateScriptingStructName { get; set; }

		public CodegenOptions CodegenOptions { get; set; }

		public NativeTypeAttribute()
		{
			CodegenOptions = CodegenOptions.Auto;
		}

		public NativeTypeAttribute(CodegenOptions codegenOptions)
		{
			CodegenOptions = codegenOptions;
		}

		public NativeTypeAttribute(string header)
		{
			if (header == null)
			{
				throw new ArgumentNullException("header");
			}
			if (header == "")
			{
				throw new ArgumentException("header cannot be empty", "header");
			}
			CodegenOptions = CodegenOptions.Auto;
			Header = header;
		}

		public NativeTypeAttribute(string header, CodegenOptions codegenOptions)
			: this(header)
		{
			CodegenOptions = codegenOptions;
		}

		public NativeTypeAttribute(CodegenOptions codegenOptions, string intermediateStructName)
			: this(codegenOptions)
		{
			IntermediateScriptingStructName = intermediateStructName;
		}
	}
	[AttributeUsage(AttributeTargets.Parameter)]
	[VisibleToOtherModules]
	internal class NotNullAttribute : Attribute, IBindingsAttribute
	{
	}
	[AttributeUsage(AttributeTargets.Parameter)]
	[VisibleToOtherModules]
	internal class UnmarshalledAttribute : Attribute, IBindingsAttribute
	{
	}
	[AttributeUsage(AttributeTargets.Method)]
	[VisibleToOtherModules]
	internal class FreeFunctionAttribute : NativeMethodAttribute
	{
		public FreeFunctionAttribute()
		{
			base.IsFreeFunction = true;
		}

		public FreeFunctionAttribute(string name)
			: base(name, isFreeFunction: true)
		{
		}

		public FreeFunctionAttribute(string name, bool isThreadSafe)
			: base(name, isFreeFunction: true, isThreadSafe)
		{
		}
	}
	[VisibleToOtherModules]
	[AttributeUsage(AttributeTargets.Method)]
	internal class ThreadSafeAttribute : NativeMethodAttribute
	{
		public ThreadSafeAttribute()
		{
			base.IsThreadSafe = true;
		}
	}
	[VisibleToOtherModules]
	internal enum StaticAccessorType
	{
		Dot,
		Arrow,
		DoubleColon,
		ArrowWithDefaultReturnIfNull
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Property)]
	[VisibleToOtherModules]
	internal class StaticAccessorAttribute : Attribute, IBindingsAttribute
	{
		public string Name { get; set; }

		public StaticAccessorType Type { get; set; }

		public StaticAccessorAttribute()
		{
		}

		[VisibleToOtherModules]
		internal StaticAccessorAttribute(string name)
		{
			Name = name;
		}

		public StaticAccessorAttribute(StaticAccessorType type)
		{
			Type = type;
		}

		public StaticAccessorAttribute(string name, StaticAccessorType type)
		{
			Name = name;
			Type = type;
		}
	}
	[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property)]
	[VisibleToOtherModules]
	internal class NativeThrowsAttribute : Attribute, IBindingsThrowsProviderAttribute, IBindingsAttribute
	{
		public bool ThrowsException { get; set; }

		public NativeThrowsAttribute()
		{
			ThrowsException = true;
		}

		public NativeThrowsAttribute(bool throwsException)
		{
			ThrowsException = throwsException;
		}
	}
	[VisibleToOtherModules]
	[AttributeUsage(AttributeTargets.Field)]
	internal class IgnoreAttribute : Attribute, IBindingsAttribute
	{
		public bool DoesNotContributeToSize { get; set; }
	}
	[AttributeUsage(AttributeTargets.Class)]
	[VisibleToOtherModules]
	internal class MarshalUnityObjectAs : Attribute, IBindingsAttribute
	{
		public Type MarshalAsType { get; set; }

		public MarshalUnityObjectAs(Type marshalAsType)
		{
			MarshalAsType = marshalAsType;
		}
	}
}
namespace UnityEngine
{
	[VisibleToOtherModules]
	internal sealed class UnityString
	{
		public static string Format(string fmt, params object[] args)
		{
			return string.Format(CultureInfo.InvariantCulture.NumberFormat, fmt, args);
		}
	}
}

Room Architect Tool_Data/Managed/UnityEngine.SpatialTracking.dll

Decompiled 3 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using UnityEngine.Events;
using UnityEngine.Experimental.XR.Interaction;
using UnityEngine.SpatialTracking;
using UnityEngine.XR;
using UnityEngine.XR.Tango;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("UnityEditor.XR.SpatialTracking")]
[assembly: InternalsVisibleTo("UnityEditor.SpatialTracking")]
[assembly: AssemblyVersion("0.0.0.0")]
namespace UnityEngine.SpatialTracking
{
	internal class TrackedPoseDriverDataDescription
	{
		internal struct PoseData
		{
			public List<string> PoseNames;

			public List<TrackedPoseDriver.TrackedPose> Poses;
		}

		internal static List<PoseData> DeviceData = new List<PoseData>
		{
			new PoseData
			{
				PoseNames = new List<string> { "Left Eye", "Right Eye", "Center Eye", "Head", "Color Camera" },
				Poses = new List<TrackedPoseDriver.TrackedPose>
				{
					TrackedPoseDriver.TrackedPose.LeftEye,
					TrackedPoseDriver.TrackedPose.RightEye,
					TrackedPoseDriver.TrackedPose.Center,
					TrackedPoseDriver.TrackedPose.Head,
					TrackedPoseDriver.TrackedPose.ColorCamera
				}
			},
			new PoseData
			{
				PoseNames = new List<string> { "Left Controller", "Right Controller" },
				Poses = new List<TrackedPoseDriver.TrackedPose>
				{
					TrackedPoseDriver.TrackedPose.LeftPose,
					TrackedPoseDriver.TrackedPose.RightPose
				}
			},
			new PoseData
			{
				PoseNames = new List<string> { "Device Pose" },
				Poses = new List<TrackedPoseDriver.TrackedPose> { TrackedPoseDriver.TrackedPose.RemotePose }
			}
		};
	}
	[Flags]
	public enum PoseDataFlags
	{
		NoData = 0,
		Position = 1,
		Rotation = 2
	}
	public static class PoseDataSource
	{
		internal static List<XRNodeState> nodeStates = new List<XRNodeState>();

		internal static PoseDataFlags GetNodePoseData(XRNode node, out Pose resultPose)
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			PoseDataFlags poseDataFlags = PoseDataFlags.NoData;
			InputTracking.GetNodeStates(nodeStates);
			foreach (XRNodeState nodeState in nodeStates)
			{
				XRNodeState current = nodeState;
				if (((XRNodeState)(ref current)).nodeType == node)
				{
					if (((XRNodeState)(ref current)).TryGetPosition(ref resultPose.position))
					{
						poseDataFlags |= PoseDataFlags.Position;
					}
					if (((XRNodeState)(ref current)).TryGetRotation(ref resultPose.rotation))
					{
						poseDataFlags |= PoseDataFlags.Rotation;
					}
					return poseDataFlags;
				}
			}
			resultPose = Pose.identity;
			return poseDataFlags;
		}

		public static PoseDataFlags GetDataFromSource(TrackedPoseDriver.TrackedPose poseSource, out Pose resultPose)
		{
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			switch (poseSource)
			{
			case TrackedPoseDriver.TrackedPose.RemotePose:
			{
				PoseDataFlags nodePoseData = GetNodePoseData((XRNode)5, out resultPose);
				if (nodePoseData == PoseDataFlags.NoData)
				{
					return GetNodePoseData((XRNode)4, out resultPose);
				}
				return nodePoseData;
			}
			case TrackedPoseDriver.TrackedPose.LeftEye:
				return GetNodePoseData((XRNode)0, out resultPose);
			case TrackedPoseDriver.TrackedPose.RightEye:
				return GetNodePoseData((XRNode)1, out resultPose);
			case TrackedPoseDriver.TrackedPose.Head:
				return GetNodePoseData((XRNode)3, out resultPose);
			case TrackedPoseDriver.TrackedPose.Center:
				return GetNodePoseData((XRNode)2, out resultPose);
			case TrackedPoseDriver.TrackedPose.LeftPose:
				return GetNodePoseData((XRNode)4, out resultPose);
			case TrackedPoseDriver.TrackedPose.RightPose:
				return GetNodePoseData((XRNode)5, out resultPose);
			case TrackedPoseDriver.TrackedPose.ColorCamera:
			{
				PoseDataFlags poseDataFlags = TryGetTangoPose(out resultPose);
				if (poseDataFlags == PoseDataFlags.NoData)
				{
					return GetNodePoseData((XRNode)2, out resultPose);
				}
				return poseDataFlags;
			}
			default:
				Debug.LogWarningFormat("Unable to retrieve pose data for poseSource: {0}", new object[1] { poseSource.ToString() });
				resultPose = Pose.identity;
				return PoseDataFlags.NoData;
			}
		}

		private static PoseDataFlags TryGetTangoPose(out Pose pose)
		{
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Invalid comparison between Unknown and I4
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			PoseData val = default(PoseData);
			if (TangoInputTracking.TryGetPoseAtTime(ref val) && (int)val.statusCode == 1)
			{
				pose.position = ((PoseData)(ref val)).position;
				pose.rotation = ((PoseData)(ref val)).rotation;
				return PoseDataFlags.Position | PoseDataFlags.Rotation;
			}
			pose = Pose.identity;
			return PoseDataFlags.NoData;
		}
	}
	[Serializable]
	[DefaultExecutionOrder(-30000)]
	[AddComponentMenu("XR/Tracked Pose Driver")]
	public class TrackedPoseDriver : MonoBehaviour
	{
		public enum DeviceType
		{
			GenericXRDevice,
			GenericXRController,
			GenericXRRemote
		}

		public enum TrackedPose
		{
			LeftEye,
			RightEye,
			Center,
			Head,
			LeftPose,
			RightPose,
			ColorCamera,
			DepthCameraDeprecated,
			FisheyeCameraDeprected,
			DeviceDeprecated,
			RemotePose
		}

		public enum TrackingType
		{
			RotationAndPosition,
			RotationOnly,
			PositionOnly
		}

		public enum UpdateType
		{
			UpdateAndBeforeRender,
			Update,
			BeforeRender
		}

		[SerializeField]
		private DeviceType m_Device;

		[SerializeField]
		private TrackedPose m_PoseSource;

		[SerializeField]
		private BasePoseProvider m_PoseProviderComponent;

		[SerializeField]
		private TrackingType m_TrackingType;

		[SerializeField]
		private UpdateType m_UpdateType;

		[SerializeField]
		private bool m_UseRelativeTransform = true;

		protected Pose m_OriginPose;

		public DeviceType deviceType
		{
			get
			{
				return m_Device;
			}
			internal set
			{
				m_Device = value;
			}
		}

		public TrackedPose poseSource
		{
			get
			{
				return m_PoseSource;
			}
			internal set
			{
				m_PoseSource = value;
			}
		}

		public BasePoseProvider poseProviderComponent
		{
			get
			{
				return m_PoseProviderComponent;
			}
			set
			{
				m_PoseProviderComponent = value;
			}
		}

		public TrackingType trackingType
		{
			get
			{
				return m_TrackingType;
			}
			set
			{
				m_TrackingType = value;
			}
		}

		public UpdateType updateType
		{
			get
			{
				return m_UpdateType;
			}
			set
			{
				m_UpdateType = value;
			}
		}

		public bool UseRelativeTransform
		{
			get
			{
				return m_UseRelativeTransform;
			}
			set
			{
				m_UseRelativeTransform = value;
			}
		}

		public Pose originPose
		{
			get
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				return m_OriginPose;
			}
			set
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				m_OriginPose = value;
			}
		}

		public bool SetPoseSource(DeviceType deviceType, TrackedPose pose)
		{
			if ((int)deviceType < TrackedPoseDriverDataDescription.DeviceData.Count)
			{
				TrackedPoseDriverDataDescription.PoseData poseData = TrackedPoseDriverDataDescription.DeviceData[(int)deviceType];
				for (int i = 0; i < poseData.Poses.Count; i++)
				{
					if (poseData.Poses[i] == pose)
					{
						this.deviceType = deviceType;
						poseSource = pose;
						return true;
					}
				}
			}
			return false;
		}

		private PoseDataFlags GetPoseData(DeviceType device, TrackedPose poseSource, out Pose resultPose)
		{
			if ((Object)(object)m_PoseProviderComponent != (Object)null)
			{
				return m_PoseProviderComponent.GetPoseFromProvider(out resultPose);
			}
			return PoseDataSource.GetDataFromSource(poseSource, out resultPose);
		}

		private void CacheLocalPosition()
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			m_OriginPose.position = ((Component)this).transform.localPosition;
			m_OriginPose.rotation = ((Component)this).transform.localRotation;
		}

		private void ResetToCachedLocalPosition()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			SetLocalTransform(m_OriginPose.position, m_OriginPose.rotation, PoseDataFlags.Position | PoseDataFlags.Rotation);
		}

		protected virtual void Awake()
		{
			CacheLocalPosition();
			if (HasStereoCamera())
			{
				XRDevice.DisableAutoXRCameraTracking(((Component)this).GetComponent<Camera>(), true);
			}
		}

		protected virtual void OnDestroy()
		{
			if (HasStereoCamera())
			{
				XRDevice.DisableAutoXRCameraTracking(((Component)this).GetComponent<Camera>(), false);
			}
		}

		protected virtual void OnEnable()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			Application.onBeforeRender += new UnityAction(OnBeforeRender);
		}

		protected virtual void OnDisable()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Expected O, but got Unknown
			ResetToCachedLocalPosition();
			Application.onBeforeRender -= new UnityAction(OnBeforeRender);
		}

		protected virtual void FixedUpdate()
		{
			if (m_UpdateType == UpdateType.Update || m_UpdateType == UpdateType.UpdateAndBeforeRender)
			{
				PerformUpdate();
			}
		}

		protected virtual void Update()
		{
			if (m_UpdateType == UpdateType.Update || m_UpdateType == UpdateType.UpdateAndBeforeRender)
			{
				PerformUpdate();
			}
		}

		protected virtual void OnBeforeRender()
		{
			if (m_UpdateType == UpdateType.BeforeRender || m_UpdateType == UpdateType.UpdateAndBeforeRender)
			{
				PerformUpdate();
			}
		}

		protected virtual void SetLocalTransform(Vector3 newPosition, Quaternion newRotation, PoseDataFlags poseFlags)
		{
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			if ((m_TrackingType == TrackingType.RotationAndPosition || m_TrackingType == TrackingType.RotationOnly) && (poseFlags & PoseDataFlags.Rotation) > PoseDataFlags.NoData)
			{
				((Component)this).transform.localRotation = newRotation;
			}
			if ((m_TrackingType == TrackingType.RotationAndPosition || m_TrackingType == TrackingType.PositionOnly) && (poseFlags & PoseDataFlags.Position) > PoseDataFlags.NoData)
			{
				((Component)this).transform.localPosition = newPosition;
			}
		}

		protected Pose TransformPoseByOriginIfNeeded(Pose pose)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			if (m_UseRelativeTransform)
			{
				return ((Pose)(ref pose)).GetTransformedBy(m_OriginPose);
			}
			return pose;
		}

		private bool HasStereoCamera()
		{
			Camera component = ((Component)this).GetComponent<Camera>();
			if ((Object)(object)component != (Object)null)
			{
				return component.stereoEnabled;
			}
			return false;
		}

		protected virtual void PerformUpdate()
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: 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)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: 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 (((Behaviour)this).enabled)
			{
				Pose val = default(Pose);
				val = Pose.identity;
				PoseDataFlags poseData = GetPoseData(m_Device, m_PoseSource, out val);
				if (poseData != 0)
				{
					Pose val2 = TransformPoseByOriginIfNeeded(val);
					SetLocalTransform(val2.position, val2.rotation, poseData);
				}
			}
		}
	}
}
namespace UnityEngine.Experimental.XR.Interaction
{
	[Serializable]
	public abstract class BasePoseProvider : MonoBehaviour
	{
		public virtual PoseDataFlags GetPoseFromProvider(out Pose output)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			output = Pose.identity;
			return PoseDataFlags.NoData;
		}
	}
}

Room Architect Tool_Data/Managed/UnityEngine.SpriteMaskModule.dll

Decompiled 3 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;

[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine;

[NativeType(Header = "Modules/SpriteMask/Public/SpriteMask.h")]
[RejectDragAndDropMaterial]
public sealed class SpriteMask : Renderer
{
	public extern int frontSortingLayerID
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern int frontSortingOrder
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern int backSortingLayerID
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern int backSortingOrder
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float alphaCutoff
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern Sprite sprite
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern bool isCustomRangeActive
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("IsCustomRangeActive")]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("SetCustomRangeActive")]
		set;
	}

	public extern SpriteSortPoint spriteSortPoint
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	internal Bounds GetSpriteBounds()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		GetSpriteBounds_Injected(out var ret);
		return ret;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void GetSpriteBounds_Injected(out Bounds ret);
}

Room Architect Tool_Data/Managed/UnityEngine.SpriteShapeModule.dll

Decompiled 3 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
using Unity.Jobs;
using UnityEngine;
using UnityEngine.Bindings;
using UnityEngine.Rendering;

[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine.Experimental.U2D;

public struct SpriteShapeParameters
{
	public Matrix4x4 transform;

	public Texture2D fillTexture;

	public uint fillScale;

	public uint splineDetail;

	public float angleThreshold;

	public float borderPivot;

	public float bevelCutoff;

	public float bevelSize;

	public bool carpet;

	public bool smartSprite;

	public bool adaptiveUV;

	public bool spriteBorders;

	public bool stretchUV;
}
public struct SpriteShapeSegment
{
	private int m_GeomIndex;

	private int m_IndexCount;

	private int m_VertexCount;

	private int m_SpriteIndex;

	public int geomIndex
	{
		get
		{
			return m_GeomIndex;
		}
		set
		{
			m_GeomIndex = value;
		}
	}

	public int indexCount
	{
		get
		{
			return m_IndexCount;
		}
		set
		{
			m_IndexCount = value;
		}
	}

	public int vertexCount
	{
		get
		{
			return m_VertexCount;
		}
		set
		{
			m_VertexCount = value;
		}
	}

	public int spriteIndex
	{
		get
		{
			return m_SpriteIndex;
		}
		set
		{
			m_SpriteIndex = value;
		}
	}
}
internal enum SpriteShapeDataType
{
	Index,
	Segment,
	BoundingBox,
	ChannelVertex,
	ChannelTexCoord0,
	DataCount
}
[NativeType(Header = "Modules/SpriteShape/Public/SpriteShapeRenderer.h")]
public class SpriteShapeRenderer : Renderer
{
	public Color color
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_color_Injected(out var ret);
			return ret;
		}
		set
		{
			set_color_Injected(ref value);
		}
	}

	public extern SpriteMaskInteraction maskInteraction
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public void Prepare(JobHandle handle, SpriteShapeParameters shapeParams, Sprite[] sprites)
	{
		Prepare_Injected(ref handle, ref shapeParams, sprites);
	}

	private unsafe NativeArray<T> GetNativeDataArray<T>(SpriteShapeDataType dataType) where T : struct
	{
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: 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)
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		//IL_001f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		SpriteChannelInfo dataInfo = GetDataInfo(dataType);
		return NativeArrayUnsafeUtility.ConvertExistingDataToNativeArray<T>(((SpriteChannelInfo)(ref dataInfo)).buffer, ((SpriteChannelInfo)(ref dataInfo)).count, (Allocator)0);
	}

	private unsafe NativeSlice<T> GetChannelDataArray<T>(SpriteShapeDataType dataType, VertexAttribute channel) where T : struct
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_0029: Unknown result type (might be due to invalid IL or missing references)
		//IL_002e: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0030: 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)
		SpriteChannelInfo channelInfo = GetChannelInfo(channel);
		byte* ptr = (byte*)((SpriteChannelInfo)(ref channelInfo)).buffer + ((SpriteChannelInfo)(ref channelInfo)).offset;
		return NativeSliceUnsafeUtility.ConvertExistingDataToNativeSlice<T>((void*)ptr, ((SpriteChannelInfo)(ref channelInfo)).stride, ((SpriteChannelInfo)(ref channelInfo)).count);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void SetSegmentCount(int geomCount);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void SetMeshDataCount(int vertexCount, int indexCount);

	private SpriteChannelInfo GetDataInfo(SpriteShapeDataType arrayType)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		GetDataInfo_Injected(arrayType, out var ret);
		return ret;
	}

	private SpriteChannelInfo GetChannelInfo(VertexAttribute channel)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		GetChannelInfo_Injected(channel, out var ret);
		return ret;
	}

	public NativeArray<Bounds> GetBounds()
	{
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		return GetNativeDataArray<Bounds>(SpriteShapeDataType.BoundingBox);
	}

	public NativeArray<SpriteShapeSegment> GetSegments(int dataSize)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		SetSegmentCount(dataSize);
		return GetNativeDataArray<SpriteShapeSegment>(SpriteShapeDataType.Segment);
	}

	public void GetChannels(int dataSize, out NativeArray<ushort> indices, out NativeSlice<Vector3> vertices, out NativeSlice<Vector2> texcoords)
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_001f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0029: Unknown result type (might be due to invalid IL or missing references)
		//IL_002e: Unknown result type (might be due to invalid IL or missing references)
		SetMeshDataCount(dataSize, dataSize);
		indices = GetNativeDataArray<ushort>(SpriteShapeDataType.Index);
		vertices = GetChannelDataArray<Vector3>(SpriteShapeDataType.ChannelVertex, (VertexAttribute)0);
		texcoords = GetChannelDataArray<Vector2>(SpriteShapeDataType.ChannelTexCoord0, (VertexAttribute)4);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_color_Injected(out Color ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_color_Injected(ref Color value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void Prepare_Injected(ref JobHandle handle, ref SpriteShapeParameters shapeParams, Sprite[] sprites);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void GetDataInfo_Injected(SpriteShapeDataType arrayType, out SpriteChannelInfo ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void GetChannelInfo_Injected(VertexAttribute channel, out SpriteChannelInfo ret);
}
public struct SpriteShapeMetaData
{
	public float height;

	public float bevelCutoff;

	public float bevelSize;

	public uint spriteIndex;

	public bool corner;
}
public struct ShapeControlPoint
{
	public Vector3 position;

	public Vector3 leftTangent;

	public Vector3 rightTangent;

	public int mode;
}
public struct AngleRangeInfo
{
	public float start;

	public float end;

	public uint order;

	public int[] sprites;
}
[NativeHeader("Modules/SpriteShape/Public/SpriteShapeUtility.h")]
public class SpriteShapeUtility
{
	[FreeFunction("SpriteShapeUtility::Generate")]
	[NativeThrows]
	public static int[] Generate(Mesh mesh, SpriteShapeParameters shapeParams, ShapeControlPoint[] points, SpriteShapeMetaData[] metaData, AngleRangeInfo[] angleRange, Sprite[] sprites, Sprite[] corners)
	{
		return Generate_Injected(mesh, ref shapeParams, points, metaData, angleRange, sprites, corners);
	}

	[FreeFunction("SpriteShapeUtility::GenerateSpriteShape")]
	[NativeThrows]
	public static void GenerateSpriteShape(SpriteShapeRenderer renderer, SpriteShapeParameters shapeParams, ShapeControlPoint[] points, SpriteShapeMetaData[] metaData, AngleRangeInfo[] angleRange, Sprite[] sprites, Sprite[] corners)
	{
		GenerateSpriteShape_Injected(renderer, ref shapeParams, points, metaData, angleRange, sprites, corners);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern int[] Generate_Injected(Mesh mesh, ref SpriteShapeParameters shapeParams, ShapeControlPoint[] points, SpriteShapeMetaData[] metaData, AngleRangeInfo[] angleRange, Sprite[] sprites, Sprite[] corners);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void GenerateSpriteShape_Injected(SpriteShapeRenderer renderer, ref SpriteShapeParameters shapeParams, ShapeControlPoint[] points, SpriteShapeMetaData[] metaData, AngleRangeInfo[] angleRange, Sprite[] sprites, Sprite[] corners);
}

Room Architect Tool_Data/Managed/UnityEngine.StreamingModule.dll

Decompiled 3 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;

[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine;

[NativeHeader("Modules/Streaming/StreamingController.h")]
[RequireComponent(typeof(Camera))]
public class StreamingController : Behaviour
{
	public extern float streamingMipmapBias
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern void SetPreloading(float timeoutSeconds = 0f, bool activateCameraOnTimeout = false, Camera disableCameraCuttingFrom = null);

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern void CancelPreloading();

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern bool IsPreloading();
}

Room Architect Tool_Data/Managed/UnityEngine.SubstanceModule.dll

Decompiled 3 months ago
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;

[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: UnityEngineModuleAssembly]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine;

[Obsolete("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.", true)]
[ExcludeFromPreset]
[EditorBrowsable(EditorBrowsableState.Never)]
public sealed class ProceduralMaterial : Material
{
	public ProceduralCacheSize cacheSize
	{
		get
		{
			throw new Exception("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.");
		}
		set
		{
			FeatureRemoved();
		}
	}

	public int animationUpdateRate
	{
		get
		{
			throw new Exception("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.");
		}
		set
		{
			FeatureRemoved();
		}
	}

	public bool isProcessing
	{
		get
		{
			throw new Exception("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.");
		}
	}

	public bool isCachedDataAvailable
	{
		get
		{
			throw new Exception("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.");
		}
	}

	public bool isLoadTimeGenerated
	{
		get
		{
			throw new Exception("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.");
		}
		set
		{
			FeatureRemoved();
		}
	}

	public ProceduralLoadingBehavior loadingBehavior
	{
		get
		{
			throw new Exception("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.");
		}
	}

	public static bool isSupported
	{
		get
		{
			throw new Exception("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.");
		}
	}

	public static ProceduralProcessorUsage substanceProcessorUsage
	{
		get
		{
			throw new Exception("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.");
		}
		set
		{
			FeatureRemoved();
		}
	}

	public string preset
	{
		get
		{
			throw new Exception("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.");
		}
		set
		{
			FeatureRemoved();
		}
	}

	public bool isReadable
	{
		get
		{
			throw new Exception("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.");
		}
		set
		{
			FeatureRemoved();
		}
	}

	public bool isFrozen
	{
		get
		{
			throw new Exception("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.");
		}
	}

	internal ProceduralMaterial()
		: base((Material)null)
	{
		FeatureRemoved();
	}

	private static void FeatureRemoved()
	{
		throw new Exception("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.");
	}

	public ProceduralPropertyDescription[] GetProceduralPropertyDescriptions()
	{
		throw new Exception("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.");
	}

	public bool HasProceduralProperty(string inputName)
	{
		throw new Exception("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.");
	}

	public bool GetProceduralBoolean(string inputName)
	{
		throw new Exception("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.");
	}

	public bool IsProceduralPropertyVisible(string inputName)
	{
		throw new Exception("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.");
	}

	public void SetProceduralBoolean(string inputName, bool value)
	{
		FeatureRemoved();
	}

	public float GetProceduralFloat(string inputName)
	{
		throw new Exception("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.");
	}

	public void SetProceduralFloat(string inputName, float value)
	{
		FeatureRemoved();
	}

	public Vector4 GetProceduralVector(string inputName)
	{
		throw new Exception("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.");
	}

	public void SetProceduralVector(string inputName, Vector4 value)
	{
		FeatureRemoved();
	}

	public Color GetProceduralColor(string inputName)
	{
		throw new Exception("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.");
	}

	public void SetProceduralColor(string inputName, Color value)
	{
		FeatureRemoved();
	}

	public int GetProceduralEnum(string inputName)
	{
		throw new Exception("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.");
	}

	public void SetProceduralEnum(string inputName, int value)
	{
		FeatureRemoved();
	}

	public Texture2D GetProceduralTexture(string inputName)
	{
		throw new Exception("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.");
	}

	public void SetProceduralTexture(string inputName, Texture2D value)
	{
		FeatureRemoved();
	}

	public string GetProceduralString(string inputName)
	{
		throw new Exception("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.");
	}

	public void SetProceduralString(string inputName, string value)
	{
		FeatureRemoved();
	}

	public bool IsProceduralPropertyCached(string inputName)
	{
		throw new Exception("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.");
	}

	public void CacheProceduralProperty(string inputName, bool value)
	{
		FeatureRemoved();
	}

	public void ClearCache()
	{
		FeatureRemoved();
	}

	public void RebuildTextures()
	{
		FeatureRemoved();
	}

	public void RebuildTexturesImmediately()
	{
		FeatureRemoved();
	}

	public static void StopRebuilds()
	{
		FeatureRemoved();
	}

	public Texture[] GetGeneratedTextures()
	{
		throw new Exception("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.");
	}

	public ProceduralTexture GetGeneratedTexture(string textureName)
	{
		throw new Exception("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.");
	}

	public void FreezeAndReleaseSourceData()
	{
		FeatureRemoved();
	}
}
[Obsolete("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.", true)]
[EditorBrowsable(EditorBrowsableState.Never)]
public enum ProceduralProcessorUsage
{
	Unsupported,
	One,
	Half,
	All
}
[Obsolete("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.", true)]
[EditorBrowsable(EditorBrowsableState.Never)]
public enum ProceduralCacheSize
{
	Tiny,
	Medium,
	Heavy,
	NoLimit,
	None
}
[Obsolete("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.", true)]
[EditorBrowsable(EditorBrowsableState.Never)]
public enum ProceduralLoadingBehavior
{
	DoNothing,
	Generate,
	BakeAndKeep,
	BakeAndDiscard,
	Cache,
	DoNothingAndCache
}
[Obsolete("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.", true)]
[EditorBrowsable(EditorBrowsableState.Never)]
public enum ProceduralPropertyType
{
	Boolean,
	Float,
	Vector2,
	Vector3,
	Vector4,
	Color3,
	Color4,
	Enum,
	Texture,
	String
}
[Obsolete("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.", true)]
[EditorBrowsable(EditorBrowsableState.Never)]
public enum ProceduralOutputType
{
	Unknown,
	Diffuse,
	Normal,
	Height,
	Emissive,
	Specular,
	Opacity,
	Smoothness,
	AmbientOcclusion,
	DetailMask,
	Metallic,
	Roughness
}
[StructLayout(LayoutKind.Sequential)]
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.", true)]
public sealed class ProceduralPropertyDescription
{
	public string name;

	public string label;

	public string group;

	public ProceduralPropertyType type;

	public bool hasRange;

	public float minimum;

	public float maximum;

	public float step;

	public string[] enumOptions;

	public string[] componentLabels;
}
[Obsolete("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.", true)]
[ExcludeFromPreset]
public sealed class ProceduralTexture : Texture
{
	public bool hasAlpha
	{
		get
		{
			throw new Exception("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.");
		}
	}

	public TextureFormat format
	{
		get
		{
			throw new Exception("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.");
		}
	}

	private ProceduralTexture()
	{
		throw new Exception("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.");
	}

	public ProceduralOutputType GetProceduralOutputType()
	{
		throw new Exception("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.");
	}

	internal ProceduralMaterial GetProceduralMaterial()
	{
		throw new Exception("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.");
	}

	public Color32[] GetPixels32(int x, int y, int blockWidth, int blockHeight)
	{
		throw new Exception("Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.");
	}
}

Room Architect Tool_Data/Managed/UnityEngine.TerrainModule.dll

Decompiled 3 months ago
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;
using UnityEngine.Experimental.Rendering;
using UnityEngine.Experimental.TerrainAPI;
using UnityEngine.Rendering;
using UnityEngine.Scripting;

[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine.Experimental.TerrainAPI
{
	public struct BrushTransform
	{
		public Vector2 brushOrigin { get; }

		public Vector2 brushU { get; }

		public Vector2 brushV { get; }

		public Vector2 targetOrigin { get; }

		public Vector2 targetX { get; }

		public Vector2 targetY { get; }

		public BrushTransform(Vector2 brushOrigin, Vector2 brushU, Vector2 brushV)
		{
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			float num = brushU.x * brushV.y - brushU.y * brushV.x;
			float num2 = ((!Mathf.Approximately(num, 0f)) ? (1f / num) : 1f);
			Vector2 val = new Vector2(brushV.y, 0f - brushU.y) * num2;
			Vector2 val2 = new Vector2(0f - brushV.x, brushU.x) * num2;
			Vector2 val3 = (0f - brushOrigin.x) * val - brushOrigin.y * val2;
			this.brushOrigin = brushOrigin;
			this.brushU = brushU;
			this.brushV = brushV;
			targetOrigin = val3;
			targetX = val;
			targetY = val2;
		}

		public Rect GetBrushXYBounds()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: 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_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			Vector2 val = brushOrigin + brushU;
			Vector2 val2 = brushOrigin + brushV;
			Vector2 val3 = brushOrigin + brushU + brushV;
			float num = Mathf.Min(Mathf.Min(brushOrigin.x, val.x), Mathf.Min(val2.x, val3.x));
			float num2 = Mathf.Max(Mathf.Max(brushOrigin.x, val.x), Mathf.Max(val2.x, val3.x));
			float num3 = Mathf.Min(Mathf.Min(brushOrigin.y, val.y), Mathf.Min(val2.y, val3.y));
			float num4 = Mathf.Max(Mathf.Max(brushOrigin.y, val.y), Mathf.Max(val2.y, val3.y));
			return Rect.MinMaxRect(num, num3, num2, num4);
		}

		public static BrushTransform FromRect(Rect brushRect)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			Vector2 min = ((Rect)(ref brushRect)).min;
			Vector2 val = default(Vector2);
			((Vector2)(ref val))..ctor(((Rect)(ref brushRect)).width, 0f);
			Vector2 val2 = default(Vector2);
			((Vector2)(ref val2))..ctor(0f, ((Rect)(ref brushRect)).height);
			return new BrushTransform(min, val, val2);
		}

		public Vector2 ToBrushUV(Vector2 targetXY)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			return targetXY.x * targetX + targetXY.y * targetY + targetOrigin;
		}

		public Vector2 FromBrushUV(Vector2 brushUV)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			return brushUV.x * brushU + brushUV.y * brushV + brushOrigin;
		}
	}
	public class PaintContext
	{
		internal struct TerrainTile
		{
			public Terrain terrain;

			public Vector2Int tileOriginPixels;

			public RectInt clippedLocalPixels;

			public RectInt clippedPCPixels;

			public int mapIndex;

			public int channelIndex;

			public static TerrainTile Make(Terrain terrain, int tileOriginPixelsX, int tileOriginPixelsY, RectInt pixelRect, int targetTextureWidth, int targetTextureHeight)
			{
				//IL_0015: Unknown result type (might be due to invalid IL or missing references)
				//IL_001a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0023: Unknown result type (might be due to invalid IL or missing references)
				//IL_0083: Unknown result type (might be due to invalid IL or missing references)
				//IL_0084: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
				TerrainTile terrainTile = default(TerrainTile);
				terrainTile.terrain = terrain;
				terrainTile.tileOriginPixels = new Vector2Int(tileOriginPixelsX, tileOriginPixelsY);
				RectInt val = default(RectInt);
				((RectInt)(ref val)).x = Mathf.Max(0, ((RectInt)(ref pixelRect)).x - tileOriginPixelsX);
				((RectInt)(ref val)).y = Mathf.Max(0, ((RectInt)(ref pixelRect)).y - tileOriginPixelsY);
				((RectInt)(ref val)).xMax = Mathf.Min(targetTextureWidth, ((RectInt)(ref pixelRect)).xMax - tileOriginPixelsX);
				((RectInt)(ref val)).yMax = Mathf.Min(targetTextureHeight, ((RectInt)(ref pixelRect)).yMax - tileOriginPixelsY);
				terrainTile.clippedLocalPixels = val;
				TerrainTile result = terrainTile;
				result.clippedPCPixels = new RectInt(((RectInt)(ref result.clippedLocalPixels)).x + ((Vector2Int)(ref result.tileOriginPixels)).x - ((RectInt)(ref pixelRect)).x, ((RectInt)(ref result.clippedLocalPixels)).y + ((Vector2Int)(ref result.tileOriginPixels)).y - ((RectInt)(ref pixelRect)).y, ((RectInt)(ref result.clippedLocalPixels)).width, ((RectInt)(ref result.clippedLocalPixels)).height);
				return result;
			}
		}

		[Flags]
		internal enum ToolAction
		{
			None = 0,
			PaintHeightmap = 1,
			PaintTexture = 2
		}

		private struct PaintedTerrain
		{
			public Terrain terrain;

			public ToolAction action;
		}

		private List<TerrainTile> m_TerrainTiles;

		private static List<PaintedTerrain> s_PaintedTerrain = new List<PaintedTerrain>();

		public Terrain originTerrain { get; }

		public RectInt pixelRect { get; }

		public int targetTextureWidth { get; }

		public int targetTextureHeight { get; }

		public Vector2 pixelSize { get; }

		public RenderTexture sourceRenderTexture { get; private set; }

		public RenderTexture destinationRenderTexture { get; private set; }

		public RenderTexture oldRenderTexture { get; private set; }

		public int terrainCount => m_TerrainTiles.Count;

		internal static event Action<TerrainTile, ToolAction, string> onTerrainTileBeforePaint;

		public PaintContext(Terrain terrain, RectInt pixelRect, int targetTextureWidth, int targetTextureHeight)
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: 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_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			originTerrain = terrain;
			this.pixelRect = pixelRect;
			this.targetTextureWidth = targetTextureWidth;
			this.targetTextureHeight = targetTextureHeight;
			TerrainData terrainData = terrain.terrainData;
			pixelSize = new Vector2(terrainData.size.x / ((float)targetTextureWidth - 1f), terrainData.size.z / ((float)targetTextureHeight - 1f));
			FindTerrainTiles();
		}

		public Terrain GetTerrain(int terrainIndex)
		{
			return m_TerrainTiles[terrainIndex].terrain;
		}

		public RectInt GetClippedPixelRectInTerrainPixels(int terrainIndex)
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			return m_TerrainTiles[terrainIndex].clippedLocalPixels;
		}

		public RectInt GetClippedPixelRectInRenderTexturePixels(int terrainIndex)
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			return m_TerrainTiles[terrainIndex].clippedPCPixels;
		}

		public static PaintContext CreateFromBounds(Terrain terrain, Rect boundsInTerrainSpace, int inputTextureWidth, int inputTextureHeight, int extraBorderPixels = 0)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			return new PaintContext(terrain, TerrainPaintUtility.CalcPixelRectFromBounds(terrain, boundsInTerrainSpace, inputTextureWidth, inputTextureHeight, extraBorderPixels), inputTextureWidth, inputTextureHeight);
		}

		internal void FindTerrainTiles()
		{
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0289: Unknown result type (might be due to invalid IL or missing references)
			m_TerrainTiles = new List<TerrainTile>();
			Terrain leftNeighbor = originTerrain.leftNeighbor;
			Terrain rightNeighbor = originTerrain.rightNeighbor;
			Terrain topNeighbor = originTerrain.topNeighbor;
			Terrain bottomNeighbor = originTerrain.bottomNeighbor;
			RectInt val = pixelRect;
			bool flag = ((RectInt)(ref val)).x < 0;
			RectInt val2 = pixelRect;
			bool flag2 = ((RectInt)(ref val2)).xMax > targetTextureWidth - 1;
			RectInt val3 = pixelRect;
			bool flag3 = ((RectInt)(ref val3)).yMax > targetTextureHeight - 1;
			RectInt val4 = pixelRect;
			bool flag4 = ((RectInt)(ref val4)).y < 0;
			if (flag && flag2)
			{
				Debug.LogWarning((object)"PaintContext pixelRect is too large!  It should touch a maximum of 2 Terrains horizontally.");
				flag2 = false;
			}
			if (flag3 && flag4)
			{
				Debug.LogWarning((object)"PaintContext pixelRect is too large!  It should touch a maximum of 2 Terrains vertically.");
				flag4 = false;
			}
			m_TerrainTiles.Add(TerrainTile.Make(originTerrain, 0, 0, pixelRect, targetTextureWidth, targetTextureHeight));
			Terrain terrain = null;
			Terrain terrain2 = null;
			Terrain terrain3 = null;
			int num = 0;
			int num2 = 0;
			if (flag)
			{
				num = -1;
				terrain = leftNeighbor;
			}
			else if (flag2)
			{
				num = 1;
				terrain = rightNeighbor;
			}
			if (flag3)
			{
				num2 = 1;
				terrain2 = topNeighbor;
			}
			else if (flag4)
			{
				num2 = -1;
				terrain2 = bottomNeighbor;
			}
			if (Object.op_Implicit((Object)(object)terrain))
			{
				m_TerrainTiles.Add(TerrainTile.Make(terrain, num * (targetTextureWidth - 1), 0, pixelRect, targetTextureWidth, targetTextureHeight));
				if (flag3 && Object.op_Implicit((Object)(object)terrain.topNeighbor))
				{
					terrain3 = terrain.topNeighbor;
				}
				else if (flag4 && Object.op_Implicit((Object)(object)terrain.bottomNeighbor))
				{
					terrain3 = terrain.bottomNeighbor;
				}
			}
			if (Object.op_Implicit((Object)(object)terrain2))
			{
				m_TerrainTiles.Add(TerrainTile.Make(terrain2, 0, num2 * (targetTextureHeight - 1), pixelRect, targetTextureWidth, targetTextureHeight));
				if (flag && Object.op_Implicit((Object)(object)terrain2.leftNeighbor))
				{
					terrain3 = terrain2.leftNeighbor;
				}
				else if (flag2 && Object.op_Implicit((Object)(object)terrain2.rightNeighbor))
				{
					terrain3 = terrain2.rightNeighbor;
				}
			}
			if ((Object)(object)terrain3 != (Object)null)
			{
				m_TerrainTiles.Add(TerrainTile.Make(terrain3, num * (targetTextureWidth - 1), num2 * (targetTextureHeight - 1), pixelRect, targetTextureWidth, targetTextureHeight));
			}
		}

		public void CreateRenderTargets(RenderTextureFormat colorFormat)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: 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_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			RectInt val = pixelRect;
			int width = ((RectInt)(ref val)).width;
			RectInt val2 = pixelRect;
			sourceRenderTexture = RenderTexture.GetTemporary(width, ((RectInt)(ref val2)).height, 0, colorFormat, (RenderTextureReadWrite)1);
			RectInt val3 = pixelRect;
			int width2 = ((RectInt)(ref val3)).width;
			RectInt val4 = pixelRect;
			destinationRenderTexture = RenderTexture.GetTemporary(width2, ((RectInt)(ref val4)).height, 0, colorFormat, (RenderTextureReadWrite)1);
			((Texture)sourceRenderTexture).wrapMode = (TextureWrapMode)1;
			((Texture)sourceRenderTexture).filterMode = (FilterMode)0;
			oldRenderTexture = RenderTexture.active;
		}

		public void Cleanup(bool restoreRenderTexture = true)
		{
			if (restoreRenderTexture)
			{
				RenderTexture.active = oldRenderTexture;
			}
			RenderTexture.ReleaseTemporary(sourceRenderTexture);
			RenderTexture.ReleaseTemporary(destinationRenderTexture);
			sourceRenderTexture = null;
			destinationRenderTexture = null;
			oldRenderTexture = null;
		}

		public void GatherHeightmap()
		{
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			Material blitMaterial = TerrainPaintUtility.GetBlitMaterial();
			RenderTexture.active = sourceRenderTexture;
			GL.Clear(false, true, new Color(0f, 0f, 0f, 0f));
			GL.PushMatrix();
			RectInt val = pixelRect;
			float num = ((RectInt)(ref val)).width;
			RectInt val2 = pixelRect;
			GL.LoadPixelMatrix(0f, num, 0f, (float)((RectInt)(ref val2)).height);
			for (int i = 0; i < m_TerrainTiles.Count; i++)
			{
				TerrainTile terrainTile = m_TerrainTiles[i];
				if (((RectInt)(ref terrainTile.clippedLocalPixels)).width != 0 && ((RectInt)(ref terrainTile.clippedLocalPixels)).height != 0)
				{
					Texture heightmapTexture = (Texture)(object)terrainTile.terrain.terrainData.heightmapTexture;
					if (heightmapTexture.width != targetTextureWidth || heightmapTexture.height != targetTextureHeight)
					{
						Debug.LogWarning((object)"PaintContext heightmap operations must use the same resolution for all Terrains - mismatched Terrains are ignored.", (Object)(object)terrainTile.terrain);
						continue;
					}
					FilterMode filterMode = heightmapTexture.filterMode;
					heightmapTexture.filterMode = (FilterMode)0;
					blitMaterial.SetTexture("_MainTex", heightmapTexture);
					blitMaterial.SetPass(0);
					TerrainPaintUtility.DrawQuad(terrainTile.clippedPCPixels, terrainTile.clippedLocalPixels, heightmapTexture);
					heightmapTexture.filterMode = filterMode;
				}
			}
			GL.PopMatrix();
			RenderTexture.active = oldRenderTexture;
		}

		public void ScatterHeightmap(string editorUndoName)
		{
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			RenderTexture active = RenderTexture.active;
			RenderTexture.active = destinationRenderTexture;
			for (int i = 0; i < m_TerrainTiles.Count; i++)
			{
				TerrainTile terrainTile = m_TerrainTiles[i];
				if (((RectInt)(ref terrainTile.clippedLocalPixels)).width == 0 || ((RectInt)(ref terrainTile.clippedLocalPixels)).height == 0)
				{
					continue;
				}
				TerrainData terrainData = terrainTile.terrain.terrainData;
				if (terrainData.heightmapResolution != targetTextureWidth || terrainData.heightmapResolution != targetTextureHeight)
				{
					Debug.LogWarning((object)"PaintContext heightmap operations must use the same resolution for all Terrains - mismatched Terrains are ignored.", (Object)(object)terrainTile.terrain);
					continue;
				}
				if (PaintContext.onTerrainTileBeforePaint != null)
				{
					PaintContext.onTerrainTileBeforePaint(terrainTile, ToolAction.PaintHeightmap, editorUndoName);
				}
				terrainData.CopyActiveRenderTextureToHeightmap(terrainTile.clippedPCPixels, ((RectInt)(ref terrainTile.clippedLocalPixels)).min, (!terrainTile.terrain.drawInstanced) ? TerrainHeightmapSyncControl.HeightOnly : TerrainHeightmapSyncControl.None);
				OnTerrainPainted(terrainTile, ToolAction.PaintHeightmap);
			}
			RenderTexture.active = active;
		}

		public void GatherNormals()
		{
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0127: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			RenderTexture normalmapTexture = originTerrain.normalmapTexture;
			Material blitMaterial = TerrainPaintUtility.GetBlitMaterial();
			RenderTexture.active = sourceRenderTexture;
			GL.Clear(false, true, new Color(0.5f, 0.5f, 0.5f, 0.5f));
			GL.PushMatrix();
			RectInt val = pixelRect;
			float num = ((RectInt)(ref val)).width;
			RectInt val2 = pixelRect;
			GL.LoadPixelMatrix(0f, num, 0f, (float)((RectInt)(ref val2)).height);
			for (int i = 0; i < m_TerrainTiles.Count; i++)
			{
				TerrainTile terrainTile = m_TerrainTiles[i];
				if (((RectInt)(ref terrainTile.clippedLocalPixels)).width != 0 && ((RectInt)(ref terrainTile.clippedLocalPixels)).height != 0)
				{
					Texture normalmapTexture2 = (Texture)(object)terrainTile.terrain.normalmapTexture;
					if (normalmapTexture2.width != targetTextureWidth || normalmapTexture2.height != targetTextureHeight)
					{
						Debug.LogWarning((object)"PaintContext normalmap operations must use the same resolution for all Terrains - mismatched Terrains are ignored.", (Object)(object)terrainTile.terrain);
						continue;
					}
					FilterMode filterMode = normalmapTexture2.filterMode;
					normalmapTexture2.filterMode = (FilterMode)0;
					blitMaterial.SetTexture("_MainTex", normalmapTexture2);
					blitMaterial.SetPass(0);
					TerrainPaintUtility.DrawQuad(terrainTile.clippedPCPixels, terrainTile.clippedLocalPixels, normalmapTexture2);
					normalmapTexture2.filterMode = filterMode;
				}
			}
			GL.PopMatrix();
			RenderTexture.active = oldRenderTexture;
		}

		public void GatherAlphamap(TerrainLayer inputLayer, bool addLayerIfDoesntExist = true)
		{
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fe: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)inputLayer == (Object)null)
			{
				return;
			}
			RenderTexture.active = sourceRenderTexture;
			GL.Clear(false, true, new Color(0f, 0f, 0f, 0f));
			GL.PushMatrix();
			RectInt val = pixelRect;
			float num = ((RectInt)(ref val)).width;
			RectInt val2 = pixelRect;
			GL.LoadPixelMatrix(0f, num, 0f, (float)((RectInt)(ref val2)).height);
			Vector4[] array = (Vector4[])(object)new Vector4[4]
			{
				new Vector4(1f, 0f, 0f, 0f),
				new Vector4(0f, 1f, 0f, 0f),
				new Vector4(0f, 0f, 1f, 0f),
				new Vector4(0f, 0f, 0f, 1f)
			};
			Material copyTerrainLayerMaterial = TerrainPaintUtility.GetCopyTerrainLayerMaterial();
			for (int i = 0; i < m_TerrainTiles.Count; i++)
			{
				TerrainTile value = m_TerrainTiles[i];
				if (((RectInt)(ref value.clippedLocalPixels)).width == 0 || ((RectInt)(ref value.clippedLocalPixels)).height == 0)
				{
					continue;
				}
				int num2 = TerrainPaintUtility.FindTerrainLayerIndex(value.terrain, inputLayer);
				if (num2 == -1)
				{
					if (!addLayerIfDoesntExist)
					{
						((RectInt)(ref value.clippedLocalPixels)).width = 0;
						((RectInt)(ref value.clippedLocalPixels)).height = 0;
						((RectInt)(ref value.clippedPCPixels)).width = 0;
						((RectInt)(ref value.clippedPCPixels)).height = 0;
						m_TerrainTiles[i] = value;
						continue;
					}
					num2 = TerrainPaintUtility.AddTerrainLayer(value.terrain, inputLayer);
				}
				value.mapIndex = num2 / 4;
				value.channelIndex = num2 % 4;
				m_TerrainTiles[i] = value;
				Texture terrainAlphaMapChecked = (Texture)(object)TerrainPaintUtility.GetTerrainAlphaMapChecked(value.terrain, value.mapIndex);
				if (terrainAlphaMapChecked.width != targetTextureWidth || terrainAlphaMapChecked.height != targetTextureHeight)
				{
					Debug.LogWarning((object)("PaintContext alphamap operations must use the same resolution for all Terrains - mismatched Terrains are ignored. (" + terrainAlphaMapChecked.width + " x " + terrainAlphaMapChecked.height + ") != (" + targetTextureWidth + " x " + targetTextureHeight + ")"), (Object)(object)value.terrain);
				}
				else
				{
					FilterMode filterMode = terrainAlphaMapChecked.filterMode;
					terrainAlphaMapChecked.filterMode = (FilterMode)0;
					copyTerrainLayerMaterial.SetVector("_LayerMask", array[value.channelIndex]);
					copyTerrainLayerMaterial.SetTexture("_MainTex", terrainAlphaMapChecked);
					copyTerrainLayerMaterial.SetPass(0);
					TerrainPaintUtility.DrawQuad(value.clippedPCPixels, value.clippedLocalPixels, terrainAlphaMapChecked);
					terrainAlphaMapChecked.filterMode = filterMode;
				}
			}
			GL.PopMatrix();
			RenderTexture.active = oldRenderTexture;
		}

		public void ScatterAlphamap(string editorUndoName)
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: Unknown result type (might be due to invalid IL or missing references)
			//IL_0152: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_0189: Unknown result type (might be due to invalid IL or missing references)
			//IL_019d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0309: Unknown result type (might be due to invalid IL or missing references)
			//IL_0357: Unknown result type (might be due to invalid IL or missing references)
			//IL_047c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0485: Unknown result type (might be due to invalid IL or missing references)
			Vector4[] array = (Vector4[])(object)new Vector4[4]
			{
				new Vector4(1f, 0f, 0f, 0f),
				new Vector4(0f, 1f, 0f, 0f),
				new Vector4(0f, 0f, 1f, 0f),
				new Vector4(0f, 0f, 0f, 1f)
			};
			Material copyTerrainLayerMaterial = TerrainPaintUtility.GetCopyTerrainLayerMaterial();
			RenderTextureDescriptor val = default(RenderTextureDescriptor);
			((RenderTextureDescriptor)(ref val))..ctor(((Texture)destinationRenderTexture).width, ((Texture)destinationRenderTexture).height, (RenderTextureFormat)0);
			((RenderTextureDescriptor)(ref val)).sRGB = false;
			((RenderTextureDescriptor)(ref val)).useMipMap = false;
			((RenderTextureDescriptor)(ref val)).autoGenerateMips = false;
			RenderTexture val2 = (RenderTexture.active = RenderTexture.GetTemporary(val));
			Rect val7 = default(Rect);
			Rect val9 = default(Rect);
			for (int i = 0; i < m_TerrainTiles.Count; i++)
			{
				TerrainTile terrainTile = m_TerrainTiles[i];
				if (((RectInt)(ref terrainTile.clippedLocalPixels)).width == 0 || ((RectInt)(ref terrainTile.clippedLocalPixels)).height == 0)
				{
					continue;
				}
				if (PaintContext.onTerrainTileBeforePaint != null)
				{
					PaintContext.onTerrainTileBeforePaint(terrainTile, ToolAction.PaintTexture, editorUndoName);
				}
				RectInt clippedPCPixels = terrainTile.clippedPCPixels;
				float num = ((RectInt)(ref clippedPCPixels)).x;
				RectInt val3 = pixelRect;
				float num2 = num / (float)((RectInt)(ref val3)).width;
				float num3 = ((RectInt)(ref clippedPCPixels)).y;
				RectInt val4 = pixelRect;
				float num4 = num3 / (float)((RectInt)(ref val4)).height;
				float num5 = ((RectInt)(ref clippedPCPixels)).width;
				RectInt val5 = pixelRect;
				float num6 = num5 / (float)((RectInt)(ref val5)).width;
				float num7 = ((RectInt)(ref clippedPCPixels)).height;
				RectInt val6 = pixelRect;
				((Rect)(ref val7))..ctor(num2, num4, num6, num7 / (float)((RectInt)(ref val6)).height);
				((Texture)destinationRenderTexture).filterMode = (FilterMode)0;
				int mapIndex = terrainTile.mapIndex;
				int channelIndex = terrainTile.channelIndex;
				TerrainData terrainData = terrainTile.terrain.terrainData;
				Texture2D[] alphamapTextures = terrainData.alphamapTextures;
				for (int j = 0; j < alphamapTextures.Length; j++)
				{
					Texture2D val8 = alphamapTextures[j];
					if (((Texture)val8).width != targetTextureWidth || ((Texture)val8).height != targetTextureHeight)
					{
						Debug.LogWarning((object)"PaintContext alphamap operations must use the same resolution for all Terrains - mismatched Terrains are ignored.", (Object)(object)terrainTile.terrain);
						continue;
					}
					((Rect)(ref val9))..ctor((float)((RectInt)(ref terrainTile.clippedLocalPixels)).x / (float)((Texture)val8).width, (float)((RectInt)(ref terrainTile.clippedLocalPixels)).y / (float)((Texture)val8).height, (float)((RectInt)(ref terrainTile.clippedLocalPixels)).width / (float)((Texture)val8).width, (float)((RectInt)(ref terrainTile.clippedLocalPixels)).height / (float)((Texture)val8).height);
					copyTerrainLayerMaterial.SetTexture("_MainTex", (Texture)(object)destinationRenderTexture);
					copyTerrainLayerMaterial.SetTexture("_OldAlphaMapTexture", (Texture)(object)sourceRenderTexture);
					copyTerrainLayerMaterial.SetTexture("_OriginalTargetAlphaMap", (Texture)(object)alphamapTextures[mapIndex]);
					copyTerrainLayerMaterial.SetTexture("_AlphaMapTexture", (Texture)(object)val8);
					copyTerrainLayerMaterial.SetVector("_LayerMask", (j != mapIndex) ? Vector4.zero : array[channelIndex]);
					copyTerrainLayerMaterial.SetVector("_OriginalTargetAlphaMask", array[channelIndex]);
					copyTerrainLayerMaterial.SetPass(1);
					GL.PushMatrix();
					GL.LoadPixelMatrix(0f, (float)((Texture)val2).width, 0f, (float)((Texture)val2).height);
					GL.Begin(7);
					GL.Color(new Color(1f, 1f, 1f, 1f));
					GL.MultiTexCoord2(0, ((Rect)(ref val7)).x, ((Rect)(ref val7)).y);
					GL.MultiTexCoord2(1, ((Rect)(ref val9)).x, ((Rect)(ref val9)).y);
					GL.Vertex3((float)((RectInt)(ref clippedPCPixels)).x, (float)((RectInt)(ref clippedPCPixels)).y, 0f);
					GL.MultiTexCoord2(0, ((Rect)(ref val7)).x, ((Rect)(ref val7)).yMax);
					GL.MultiTexCoord2(1, ((Rect)(ref val9)).x, ((Rect)(ref val9)).yMax);
					GL.Vertex3((float)((RectInt)(ref clippedPCPixels)).x, (float)((RectInt)(ref clippedPCPixels)).yMax, 0f);
					GL.MultiTexCoord2(0, ((Rect)(ref val7)).xMax, ((Rect)(ref val7)).yMax);
					GL.MultiTexCoord2(1, ((Rect)(ref val9)).xMax, ((Rect)(ref val9)).yMax);
					GL.Vertex3((float)((RectInt)(ref clippedPCPixels)).xMax, (float)((RectInt)(ref clippedPCPixels)).yMax, 0f);
					GL.MultiTexCoord2(0, ((Rect)(ref val7)).xMax, ((Rect)(ref val7)).y);
					GL.MultiTexCoord2(1, ((Rect)(ref val9)).xMax, ((Rect)(ref val9)).y);
					GL.Vertex3((float)((RectInt)(ref clippedPCPixels)).xMax, (float)((RectInt)(ref clippedPCPixels)).y, 0f);
					GL.End();
					GL.PopMatrix();
					terrainData.CopyActiveRenderTextureToTexture(TerrainData.AlphamapTextureName, j, clippedPCPixels, ((RectInt)(ref terrainTile.clippedLocalPixels)).min, allowDelayedCPUSync: true);
				}
				OnTerrainPainted(terrainTile, ToolAction.PaintTexture);
			}
			RenderTexture.active = null;
			RenderTexture.ReleaseTemporary(val2);
		}

		private static void OnTerrainPainted(TerrainTile tile, ToolAction action)
		{
			for (int i = 0; i < s_PaintedTerrain.Count; i++)
			{
				if ((Object)(object)tile.terrain == (Object)(object)s_PaintedTerrain[i].terrain)
				{
					PaintedTerrain value = s_PaintedTerrain[i];
					value.action |= action;
					s_PaintedTerrain[i] = value;
					return;
				}
			}
			s_PaintedTerrain.Add(new PaintedTerrain
			{
				terrain = tile.terrain,
				action = action
			});
		}

		public static void ApplyDelayedActions()
		{
			for (int i = 0; i < s_PaintedTerrain.Count; i++)
			{
				PaintedTerrain paintedTerrain = s_PaintedTerrain[i];
				TerrainData terrainData = paintedTerrain.terrain.terrainData;
				if (!((Object)(object)terrainData == (Object)null))
				{
					if ((paintedTerrain.action & ToolAction.PaintHeightmap) != 0)
					{
						terrainData.SyncHeightmap();
						paintedTerrain.terrain.editorRenderFlags = TerrainRenderFlags.all;
					}
					if ((paintedTerrain.action & ToolAction.PaintTexture) != 0)
					{
						terrainData.SetBaseMapDirty();
						terrainData.SyncTexture(TerrainData.AlphamapTextureName);
					}
				}
			}
			s_PaintedTerrain.Clear();
		}
	}
}
namespace UnityEngine
{
	[Flags]
	public enum TerrainChangedFlags
	{
		Heightmap = 1,
		TreeInstances = 2,
		DelayedHeightmapUpdate = 4,
		FlushEverythingImmediately = 8,
		RemoveDirtyDetailsImmediately = 0x10,
		HeightmapResolution = 0x20,
		WillBeDestroyed = 0x100
	}
	[Flags]
	public enum TerrainRenderFlags
	{
		[Obsolete("TerrainRenderFlags.heightmap is obsolete, use TerrainRenderFlags.Heightmap instead. (UnityUpgradable) -> Heightmap")]
		heightmap = 1,
		[Obsolete("TerrainRenderFlags.trees is obsolete, use TerrainRenderFlags.Trees instead. (UnityUpgradable) -> Trees")]
		trees = 2,
		[Obsolete("TerrainRenderFlags.details is obsolete, use TerrainRenderFlags.Details instead. (UnityUpgradable) -> Details")]
		details = 4,
		[Obsolete("TerrainRenderFlags.all is obsolete, use TerrainRenderFlags.All instead. (UnityUpgradable) -> All")]
		all = 7,
		Heightmap = 1,
		Trees = 2,
		Details = 4,
		All = 7
	}
	[UsedByNativeCode]
	[NativeHeader("Runtime/Interfaces/ITerrainManager.h")]
	[NativeHeader("Modules/Terrain/Public/Terrain.h")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeHeader("TerrainScriptingClasses.h")]
	public sealed class Terrain : Behaviour
	{
		[Obsolete("Enum type MaterialType is not used any more.", false)]
		public enum MaterialType
		{
			BuiltInStandard,
			BuiltInLegacyDiffuse,
			BuiltInLegacySpecular,
			Custom
		}

		public extern TerrainData terrainData
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float treeDistance
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float treeBillboardDistance
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float treeCrossFadeLength
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern int treeMaximumFullLODCount
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float detailObjectDistance
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float detailObjectDensity
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float heightmapPixelError
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern int heightmapMaximumLOD
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float basemapDistance
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty("StaticLightmapIndexInt")]
		public extern int lightmapIndex
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty("DynamicLightmapIndexInt")]
		public extern int realtimeLightmapIndex
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty("StaticLightmapST")]
		public Vector4 lightmapScaleOffset
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_lightmapScaleOffset_Injected(out var ret);
				return ret;
			}
			set
			{
				set_lightmapScaleOffset_Injected(ref value);
			}
		}

		[NativeProperty("DynamicLightmapST")]
		public Vector4 realtimeLightmapScaleOffset
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_realtimeLightmapScaleOffset_Injected(out var ret);
				return ret;
			}
			set
			{
				set_realtimeLightmapScaleOffset_Injected(ref value);
			}
		}

		[NativeProperty("GarbageCollectCameraData")]
		public extern bool freeUnusedRenderingResources
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern ShadowCastingMode shadowCastingMode
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern ReflectionProbeUsage reflectionProbeUsage
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern Material materialTemplate
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool drawHeightmap
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool allowAutoConnect
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern int groupingID
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool drawInstanced
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern RenderTexture normalmapTexture
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("TryGetNormalMapTexture")]
			get;
		}

		public extern bool drawTreesAndFoliage
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public Vector3 patchBoundsMultiplier
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_patchBoundsMultiplier_Injected(out var ret);
				return ret;
			}
			set
			{
				set_patchBoundsMultiplier_Injected(ref value);
			}
		}

		public extern float treeLODBiasMultiplier
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool collectDetailPatches
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern TerrainRenderFlags editorRenderFlags
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool preserveTreePrototypeLayers
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern GraphicsFormat heightmapFormat
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public static TextureFormat heightmapTextureFormat => GraphicsFormatUtility.GetTextureFormat(heightmapFormat);

		public static RenderTextureFormat heightmapRenderTextureFormat => GraphicsFormatUtility.GetRenderTextureFormat(heightmapFormat);

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern GraphicsFormat normalmapFormat
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public static TextureFormat normalmapTextureFormat => GraphicsFormatUtility.GetTextureFormat(normalmapFormat);

		public static RenderTextureFormat normalmapRenderTextureFormat => GraphicsFormatUtility.GetRenderTextureFormat(normalmapFormat);

		public static extern Terrain activeTerrain
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		[NativeProperty("ActiveTerrainsScriptingArray")]
		public static extern Terrain[] activeTerrains
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern Terrain leftNeighbor
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern Terrain rightNeighbor
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern Terrain topNeighbor
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern Terrain bottomNeighbor
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		[Obsolete("splatmapDistance is deprecated, please use basemapDistance instead. (UnityUpgradable) -> basemapDistance", true)]
		public float splatmapDistance
		{
			get
			{
				return basemapDistance;
			}
			set
			{
				basemapDistance = value;
			}
		}

		[Obsolete("castShadows is deprecated, please use shadowCastingMode instead.")]
		public bool castShadows
		{
			get
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0008: Invalid comparison between Unknown and I4
				return (int)shadowCastingMode != 0;
			}
			set
			{
				shadowCastingMode = (ShadowCastingMode)(value ? 2 : 0);
			}
		}

		[Obsolete("Property materialType is not used any more. Set materialTemplate directly.", false)]
		public MaterialType materialType
		{
			get
			{
				return MaterialType.Custom;
			}
			set
			{
			}
		}

		[Obsolete("Property legacySpecular is not used any more. Set materialTemplate directly.", false)]
		public Color legacySpecular
		{
			get
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				return Color.gray;
			}
			set
			{
			}
		}

		[Obsolete("Property legacyShininess is not used any more. Set materialTemplate directly.", false)]
		public float legacyShininess
		{
			get
			{
				return 5f / 64f;
			}
			set
			{
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void GetClosestReflectionProbes(List<ReflectionProbeBlendInfo> result);

		public float SampleHeight(Vector3 worldPosition)
		{
			return SampleHeight_Injected(ref worldPosition);
		}

		public void AddTreeInstance(TreeInstance instance)
		{
			AddTreeInstance_Injected(ref instance);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void SetNeighbors(Terrain left, Terrain top, Terrain right, Terrain bottom);

		public Vector3 GetPosition()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			GetPosition_Injected(out var ret);
			return ret;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void Flush();

		internal void RemoveTrees(Vector2 position, float radius, int prototypeIndex)
		{
			RemoveTrees_Injected(ref position, radius, prototypeIndex);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("CopySplatMaterialCustomProps")]
		public extern void SetSplatMaterialPropertyBlock(MaterialPropertyBlock properties);

		public void GetSplatMaterialPropertyBlock(MaterialPropertyBlock dest)
		{
			if (dest == null)
			{
				throw new ArgumentNullException("dest");
			}
			Internal_GetSplatMaterialPropertyBlock(dest);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("GetSplatMaterialCustomProps")]
		private extern void Internal_GetSplatMaterialPropertyBlock(MaterialPropertyBlock dest);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public static extern void SetConnectivityDirty();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[UsedByNativeCode]
		public static extern GameObject CreateTerrainGameObject(TerrainData assignTerrain);

		[Obsolete("Use TerrainData.SyncHeightmap to notify all Terrain instances using the TerrainData.", false)]
		public void ApplyDelayedHeightmapModification()
		{
			terrainData?.SyncHeightmap();
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_lightmapScaleOffset_Injected(out Vector4 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void set_lightmapScaleOffset_Injected(ref Vector4 value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_realtimeLightmapScaleOffset_Injected(out Vector4 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void set_realtimeLightmapScaleOffset_Injected(ref Vector4 value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_patchBoundsMultiplier_Injected(out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void set_patchBoundsMultiplier_Injected(ref Vector3 value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern float SampleHeight_Injected(ref Vector3 worldPosition);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void AddTreeInstance_Injected(ref TreeInstance instance);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void GetPosition_Injected(out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void RemoveTrees_Injected(ref Vector2 position, float radius, int prototypeIndex);
	}
	public static class TerrainExtensions
	{
		public static void UpdateGIMaterials(this Terrain terrain)
		{
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)terrain.terrainData == (Object)null)
			{
				throw new ArgumentException("Invalid terrainData.");
			}
			UpdateGIMaterialsForTerrain(((Object)terrain).GetInstanceID(), new Rect(0f, 0f, 1f, 1f));
		}

		public static void UpdateGIMaterials(this Terrain terrain, int x, int y, int width, int height)
		{
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)terrain.terrainData == (Object)null)
			{
				throw new ArgumentException("Invalid terrainData.");
			}
			float num = terrain.terrainData.alphamapWidth;
			float num2 = terrain.terrainData.alphamapHeight;
			UpdateGIMaterialsForTerrain(((Object)terrain).GetInstanceID(), new Rect((float)x / num, (float)y / num2, (float)width / num, (float)height / num2));
		}

		[FreeFunction]
		[NativeConditional("INCLUDE_DYNAMIC_GI && ENABLE_RUNTIME_GI")]
		internal static void UpdateGIMaterialsForTerrain(int terrainInstanceID, Rect uvBounds)
		{
			UpdateGIMaterialsForTerrain_Injected(terrainInstanceID, ref uvBounds);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void UpdateGIMaterialsForTerrain_Injected(int terrainInstanceID, ref Rect uvBounds);
	}
	[NativeHeader("Modules/Terrain/Public/Tree.h")]
	public sealed class Tree : Component
	{
		[NativeProperty("TreeData")]
		public extern ScriptableObject data
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool hasSpeedTreeWind
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("HasSpeedTreeWind")]
			get;
		}
	}
	internal sealed class SpeedTreeWindAsset : Object
	{
		private SpeedTreeWindAsset()
		{
		}
	}
}
namespace UnityEngine.Experimental.TerrainAPI
{
	public static class TerrainCallbacks
	{
		public delegate void HeightmapChangedCallback(Terrain terrain, RectInt heightRegion, bool synched);

		public delegate void TextureChangedCallback(Terrain terrain, string textureName, RectInt texelRegion, bool synched);

		public static event HeightmapChangedCallback heightmapChanged;

		public static event TextureChangedCallback textureChanged;

		[RequiredByNativeCode]
		internal static void InvokeHeightmapChangedCallback(TerrainData terrainData, RectInt heightRegion, bool synched)
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			if (TerrainCallbacks.heightmapChanged != null)
			{
				Terrain[] users = terrainData.users;
				foreach (Terrain terrain in users)
				{
					TerrainCallbacks.heightmapChanged(terrain, heightRegion, synched);
				}
			}
		}

		[RequiredByNativeCode]
		internal static void InvokeTextureChangedCallback(TerrainData terrainData, string textureName, RectInt texelRegion, bool synched)
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			if (TerrainCallbacks.textureChanged != null)
			{
				Terrain[] users = terrainData.users;
				foreach (Terrain terrain in users)
				{
					TerrainCallbacks.textureChanged(terrain, textureName, texelRegion, synched);
				}
			}
		}
	}
}
namespace UnityEngine
{
	[StructLayout(LayoutKind.Sequential)]
	[UsedByNativeCode]
	public sealed class TreePrototype
	{
		internal GameObject m_Prefab;

		internal float m_BendFactor;

		public GameObject prefab
		{
			get
			{
				return m_Prefab;
			}
			set
			{
				m_Prefab = value;
			}
		}

		public float bendFactor
		{
			get
			{
				return m_BendFactor;
			}
			set
			{
				m_BendFactor = value;
			}
		}

		public TreePrototype()
		{
		}

		public TreePrototype(TreePrototype other)
		{
			prefab = other.prefab;
			bendFactor = other.bendFactor;
		}

		public override bool Equals(object obj)
		{
			return Equals(obj as TreePrototype);
		}

		public override int GetHashCode()
		{
			return base.GetHashCode();
		}

		private bool Equals(TreePrototype other)
		{
			if (object.ReferenceEquals(other, null))
			{
				return false;
			}
			if (object.ReferenceEquals(other, this))
			{
				return true;
			}
			if ((object)GetType() != other.GetType())
			{
				return false;
			}
			return (Object)(object)prefab == (Object)(object)other.prefab && bendFactor == other.bendFactor;
		}
	}
	public enum DetailRenderMode
	{
		GrassBillboard,
		VertexLit,
		Grass
	}
	[StructLayout(LayoutKind.Sequential)]
	[UsedByNativeCode]
	public sealed class DetailPrototype
	{
		internal GameObject m_Prototype = null;

		internal Texture2D m_PrototypeTexture = null;

		internal Color m_HealthyColor = new Color(0.2627451f, 83f / 85f, 14f / 85f, 1f);

		internal Color m_DryColor = new Color(41f / 51f, 0.7372549f, 0.101960786f, 1f);

		internal float m_MinWidth = 1f;

		internal float m_MaxWidth = 2f;

		internal float m_MinHeight = 1f;

		internal float m_MaxHeight = 2f;

		internal float m_NoiseSpread = 0.1f;

		internal float m_BendFactor = 0.1f;

		internal int m_RenderMode = 2;

		internal int m_UsePrototypeMesh = 0;

		public GameObject prototype
		{
			get
			{
				return m_Prototype;
			}
			set
			{
				m_Prototype = value;
			}
		}

		public Texture2D prototypeTexture
		{
			get
			{
				return m_PrototypeTexture;
			}
			set
			{
				m_PrototypeTexture = value;
			}
		}

		public float minWidth
		{
			get
			{
				return m_MinWidth;
			}
			set
			{
				m_MinWidth = value;
			}
		}

		public float maxWidth
		{
			get
			{
				return m_MaxWidth;
			}
			set
			{
				m_MaxWidth = value;
			}
		}

		public float minHeight
		{
			get
			{
				return m_MinHeight;
			}
			set
			{
				m_MinHeight = value;
			}
		}

		public float maxHeight
		{
			get
			{
				return m_MaxHeight;
			}
			set
			{
				m_MaxHeight = value;
			}
		}

		public float noiseSpread
		{
			get
			{
				return m_NoiseSpread;
			}
			set
			{
				m_NoiseSpread = value;
			}
		}

		public float bendFactor
		{
			get
			{
				return m_BendFactor;
			}
			set
			{
				m_BendFactor = value;
			}
		}

		public Color healthyColor
		{
			get
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				return m_HealthyColor;
			}
			set
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				m_HealthyColor = value;
			}
		}

		public Color dryColor
		{
			get
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				return m_DryColor;
			}
			set
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				m_DryColor = value;
			}
		}

		public DetailRenderMode renderMode
		{
			get
			{
				return (DetailRenderMode)m_RenderMode;
			}
			set
			{
				m_RenderMode = (int)value;
			}
		}

		public bool usePrototypeMesh
		{
			get
			{
				return m_UsePrototypeMesh != 0;
			}
			set
			{
				m_UsePrototypeMesh = (value ? 1 : 0);
			}
		}

		public DetailPrototype()
		{
		}//IL_0023: Unknown result type (might be due to invalid IL or missing references)
		//IL_0028: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_0047: Unknown result type (might be due to invalid IL or missing references)


		public DetailPrototype(DetailPrototype other)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			m_Prototype = other.m_Prototype;
			m_PrototypeTexture = other.m_PrototypeTexture;
			m_HealthyColor = other.m_HealthyColor;
			m_DryColor = other.m_DryColor;
			m_MinWidth = other.m_MinWidth;
			m_MaxWidth = other.m_MaxWidth;
			m_MinHeight = other.m_MinHeight;
			m_MaxHeight = other.m_MaxHeight;
			m_NoiseSpread = other.m_NoiseSpread;
			m_BendFactor = other.m_BendFactor;
			m_RenderMode = other.m_RenderMode;
			m_UsePrototypeMesh = other.m_UsePrototypeMesh;
		}

		public override bool Equals(object obj)
		{
			return Equals(obj as DetailPrototype);
		}

		public override int GetHashCode()
		{
			return base.GetHashCode();
		}

		private bool Equals(DetailPrototype other)
		{
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			if (object.ReferenceEquals(other, null))
			{
				return false;
			}
			if (object.ReferenceEquals(other, this))
			{
				return true;
			}
			if ((object)GetType() != other.GetType())
			{
				return false;
			}
			return (Object)(object)m_Prototype == (Object)(object)other.m_Prototype && (Object)(object)m_PrototypeTexture == (Object)(object)other.m_PrototypeTexture && m_HealthyColor == other.m_HealthyColor && m_DryColor == other.m_DryColor && m_MinWidth == other.m_MinWidth && m_MaxWidth == other.m_MaxWidth && m_MinHeight == other.m_MinHeight && m_MaxHeight == other.m_MaxHeight && m_NoiseSpread == other.m_NoiseSpread && m_BendFactor == other.m_BendFactor && m_RenderMode == other.m_RenderMode && m_UsePrototypeMesh == other.m_UsePrototypeMesh;
		}
	}
	[StructLayout(LayoutKind.Sequential)]
	[UsedByNativeCode]
	public sealed class SplatPrototype
	{
		internal Texture2D m_Texture;

		internal Texture2D m_NormalMap;

		internal Vector2 m_TileSize = new Vector2(15f, 15f);

		internal Vector2 m_TileOffset = new Vector2(0f, 0f);

		internal Vector4 m_SpecularMetallic = new Vector4(0f, 0f, 0f, 0f);

		internal float m_Smoothness = 0f;

		public Texture2D texture
		{
			get
			{
				return m_Texture;
			}
			set
			{
				m_Texture = value;
			}
		}

		public Texture2D normalMap
		{
			get
			{
				return m_NormalMap;
			}
			set
			{
				m_NormalMap = value;
			}
		}

		public Vector2 tileSize
		{
			get
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				return m_TileSize;
			}
			set
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				m_TileSize = value;
			}
		}

		public Vector2 tileOffset
		{
			get
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				return m_TileOffset;
			}
			set
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				m_TileOffset = value;
			}
		}

		public Color specular
		{
			get
			{
				//IL_0022: Unknown result type (might be due to invalid IL or missing references)
				//IL_0027: 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)
				return new Color(m_SpecularMetallic.x, m_SpecularMetallic.y, m_SpecularMetallic.z);
			}
			set
			{
				m_SpecularMetallic.x = value.r;
				m_SpecularMetallic.y = value.g;
				m_SpecularMetallic.z = value.b;
			}
		}

		public float metallic
		{
			get
			{
				return m_SpecularMetallic.w;
			}
			set
			{
				m_SpecularMetallic.w = value;
			}
		}

		public float smoothness
		{
			get
			{
				return m_Smoothness;
			}
			set
			{
				m_Smoothness = value;
			}
		}
	}
	[UsedByNativeCode]
	public struct TreeInstance
	{
		public Vector3 position;

		public float widthScale;

		public float heightScale;

		public float rotation;

		public Color32 color;

		public Color32 lightmapColor;

		public int prototypeIndex;

		internal float temporaryDistance;
	}
	[UsedByNativeCode]
	public struct PatchExtents
	{
		internal float m_min;

		internal float m_max;

		public float min
		{
			get
			{
				return m_min;
			}
			set
			{
				m_min = value;
			}
		}

		public float max
		{
			get
			{
				return m_max;
			}
			set
			{
				m_max = value;
			}
		}
	}
	public enum TerrainHeightmapSyncControl
	{
		None,
		HeightOnly,
		HeightAndLod
	}
	[NativeHeader("TerrainScriptingClasses.h")]
	[NativeHeader("Modules/Terrain/Public/TerrainDataScriptingInterface.h")]
	[UsedByNativeCode]
	public sealed class TerrainData : Object
	{
		private enum BoundaryValueType
		{
			MaxHeightmapRes,
			MinDetailResPerPatch,
			MaxDetailResPerPatch,
			MaxDetailPatchCount,
			MinAlphamapRes,
			MaxAlphamapRes,
			MinBaseMapRes,
			MaxBaseMapRes
		}

		private const string k_ScriptingInterfaceName = "TerrainDataScriptingInterface";

		private const string k_ScriptingInterfacePrefix = "TerrainDataScriptingInterface::";

		private const string k_HeightmapPrefix = "GetHeightmap().";

		private const string k_DetailDatabasePrefix = "GetDetailDatabase().";

		private const string k_TreeDatabasePrefix = "GetTreeDatabase().";

		private const string k_SplatDatabasePrefix = "GetSplatDatabase().";

		private static readonly int k_MaximumResolution = GetBoundaryValue(BoundaryValueType.MaxHeightmapRes);

		private static readonly int k_MinimumDetailResolutionPerPatch = GetBoundaryValue(BoundaryValueType.MinDetailResPerPatch);

		private static readonly int k_MaximumDetailResolutionPerPatch = GetBoundaryValue(BoundaryValueType.MaxDetailResPerPatch);

		private static readonly int k_MaximumDetailPatchCount = GetBoundaryValue(BoundaryValueType.MaxDetailPatchCount);

		private static readonly int k_MinimumAlphamapResolution = GetBoundaryValue(BoundaryValueType.MinAlphamapRes);

		private static readonly int k_MaximumAlphamapResolution = GetBoundaryValue(BoundaryValueType.MaxAlphamapRes);

		private static readonly int k_MinimumBaseMapResolution = GetBoundaryValue(BoundaryValueType.MinBaseMapRes);

		private static readonly int k_MaximumBaseMapResolution = GetBoundaryValue(BoundaryValueType.MaxBaseMapRes);

		public extern int heightmapWidth
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("GetHeightmap().GetWidth")]
			get;
		}

		public extern int heightmapHeight
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("GetHeightmap().GetHeight")]
			get;
		}

		public extern RenderTexture heightmapTexture
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("GetHeightmap().GetHeightmapTexture")]
			get;
		}

		public int heightmapResolution
		{
			get
			{
				return internalHeightmapResolution;
			}
			set
			{
				int num = value;
				if (value < 0 || value > k_MaximumResolution)
				{
					Debug.LogWarning((object)("heightmapResolution is clamped to the range of [0, " + k_MaximumResolution + "]."));
					num = Math.Min(k_MaximumResolution, Math.Max(value, 0));
				}
				internalHeightmapResolution = num;
			}
		}

		private extern int internalHeightmapResolution
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("GetHeightmap().GetResolution")]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("GetHeightmap().SetResolution")]
			set;
		}

		public Vector3 heightmapScale
		{
			[NativeName("GetHeightmap().GetScale")]
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_heightmapScale_Injected(out var ret);
				return ret;
			}
		}

		public Vector3 size
		{
			[NativeName("GetHeightmap().GetSize")]
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_size_Injected(out var ret);
				return ret;
			}
			[NativeName("GetHeightmap().SetSize")]
			set
			{
				set_size_Injected(ref value);
			}
		}

		public Bounds bounds
		{
			[NativeName("GetHeightmap().CalculateBounds")]
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_bounds_Injected(out var ret);
				return ret;
			}
		}

		public extern float thickness
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("GetHeightmap().GetThickness")]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("GetHeightmap().SetThickness")]
			set;
		}

		public extern float wavingGrassStrength
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("GetDetailDatabase().GetWavingGrassStrength")]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("TerrainDataScriptingInterface::SetWavingGrassStrength", HasExplicitThis = true)]
			set;
		}

		public extern float wavingGrassAmount
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("GetDetailDatabase().GetWavingGrassAmount")]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("TerrainDataScriptingInterface::SetWavingGrassAmount", HasExplicitThis = true)]
			set;
		}

		public extern float wavingGrassSpeed
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("GetDetailDatabase().GetWavingGrassSpeed")]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("TerrainDataScriptingInterface::SetWavingGrassSpeed", HasExplicitThis = true)]
			set;
		}

		public Color wavingGrassTint
		{
			[NativeName("GetDetailDatabase().GetWavingGrassTint")]
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_wavingGrassTint_Injected(out var ret);
				return ret;
			}
			[FreeFunction("TerrainDataScriptingInterface::SetWavingGrassTint", HasExplicitThis = true)]
			set
			{
				set_wavingGrassTint_Injected(ref value);
			}
		}

		public extern int detailWidth
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("GetDetailDatabase().GetWidth")]
			get;
		}

		public extern int detailHeight
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("GetDetailDatabase().GetHeight")]
			get;
		}

		public extern int detailPatchCount
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("GetDetailDatabase().GetPatchCount")]
			get;
		}

		public extern int detailResolution
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("GetDetailDatabase().GetResolution")]
			get;
		}

		public extern int detailResolutionPerPatch
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("GetDetailDatabase().GetResolutionPerPatch")]
			get;
		}

		public extern DetailPrototype[] detailPrototypes
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("TerrainDataScriptingInterface::GetDetailPrototypes", HasExplicitThis = true)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("TerrainDataScriptingInterface::SetDetailPrototypes", HasExplicitThis = true)]
			set;
		}

		public TreeInstance[] treeInstances
		{
			get
			{
				return Internal_GetTreeInstances();
			}
			set
			{
				SetTreeInstances(value, snapToHeightmap: false);
			}
		}

		public extern int treeInstanceCount
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("GetTreeDatabase().GetInstances().size")]
			get;
		}

		public extern TreePrototype[] treePrototypes
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("TerrainDataScriptingInterface::GetTreePrototypes", HasExplicitThis = true)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("TerrainDataScriptingInterface::SetTreePrototypes", HasExplicitThis = true)]
			set;
		}

		public extern int alphamapLayers
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("GetSplatDatabase().GetSplatCount")]
			get;
		}

		public int alphamapResolution
		{
			get
			{
				return Internal_alphamapResolution;
			}
			set
			{
				int internal_alphamapResolution = value;
				if (value < k_MinimumAlphamapResolution || value > k_MaximumAlphamapResolution)
				{
					Debug.LogWarning((object)("alphamapResolution is clamped to the range of [" + k_MinimumAlphamapResolution + ", " + k_MaximumAlphamapResolution + "]."));
					internal_alphamapResolution = Math.Min(k_MaximumAlphamapResolution, Math.Max(value, k_MinimumAlphamapResolution));
				}
				Internal_alphamapResolution = internal_alphamapResolution;
			}
		}

		private extern int Internal_alphamapResolution
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("GetSplatDatabase().GetAlphamapResolution")]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("GetSplatDatabase().SetAlphamapResolution")]
			set;
		}

		public int alphamapWidth => alphamapResolution;

		public int alphamapHeight => alphamapResolution;

		public int baseMapResolution
		{
			get
			{
				return Internal_baseMapResolution;
			}
			set
			{
				int internal_baseMapResolution = value;
				if (value < k_MinimumBaseMapResolution || value > k_MaximumBaseMapResolution)
				{
					Debug.LogWarning((object)("baseMapResolution is clamped to the range of [" + k_MinimumBaseMapResolution + ", " + k_MaximumBaseMapResolution + "]."));
					internal_baseMapResolution = Math.Min(k_MaximumBaseMapResolution, Math.Max(value, k_MinimumBaseMapResolution));
				}
				Internal_baseMapResolution = internal_baseMapResolution;
			}
		}

		private extern int Internal_baseMapResolution
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("GetSplatDatabase().GetBaseMapResolution")]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("GetSplatDatabase().SetBaseMapResolution")]
			set;
		}

		public extern int alphamapTextureCount
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("GetSplatDatabase().GetAlphaTextureCount")]
			get;
		}

		public Texture2D[] alphamapTextures
		{
			get
			{
				Texture2D[] array = (Texture2D[])(object)new Texture2D[alphamapTextureCount];
				for (int i = 0; i < array.Length; i++)
				{
					array[i] = GetAlphamapTexture(i);
				}
				return array;
			}
		}

		[Obsolete("Please use the terrainLayers API instead.", false)]
		public extern SplatPrototype[] splatPrototypes
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("TerrainDataScriptingInterface::GetSplatPrototypes", HasExplicitThis = true)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("TerrainDataScriptingInterface::SetSplatPrototypes", HasExplicitThis = true)]
			set;
		}

		public extern TerrainLayer[] terrainLayers
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("TerrainDataScriptingInterface::GetTerrainLayers", HasExplicitThis = true)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("TerrainDataScriptingInterface::SetTerrainLayers", HasExplicitThis = true)]
			set;
		}

		internal extern Terrain[] users
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		private static bool SupportsCopyTextureBetweenRTAndTexture => (SystemInfo.copyTextureSupport & 0x18) == 24;

		public static string AlphamapTextureName
		{
			[CompilerGenerated]
			get
			{
				return "alphamap";
			}
		}

		public TerrainData()
		{
			Internal_Create(this);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		[ThreadSafe]
		private static extern int GetBoundaryValue(BoundaryValueType type);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("TerrainDataScriptingInterface::Create")]
		private static extern void Internal_Create([Writable] TerrainData terrainData);

		[Obsolete("Please use DirtyHeightmapRegion instead.", false)]
		public void UpdateDirtyRegion(int x, int y, int width, int height, bool syncHeightmapTextureImmediately)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			DirtyHeightmapRegion(new RectInt(x, y, width, height), syncHeightmapTextureImmediately ? TerrainHeightmapSyncControl.HeightOnly : TerrainHeightmapSyncControl.None);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("GetHeightmap().GetHeight")]
		public extern float GetHeight(int x, int y);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("GetHeightmap().GetInterpolatedHeight")]
		public extern float GetInterpolatedHeight(float x, float y);

		public float[,] GetInterpolatedHeights(float xBase, float yBase, int xCount, int yCount, float xInterval, float yInterval)
		{
			if (xCount <= 0)
			{
				throw new ArgumentOutOfRangeException("xCount");
			}
			if (yCount <= 0)
			{
				throw new ArgumentOutOfRangeException("yCount");
			}
			float[,] array = new float[yCount, xCount];
			Internal_GetInterpolatedHeights(array, xCount, 0, 0, xBase, yBase, xCount, yCount, xInterval, yInterval);
			return array;
		}

		public void GetInterpolatedHeights(float[,] results, int resultXOffset, int resultYOffset, float xBase, float yBase, int xCount, int yCount, float xInterval, float yInterval)
		{
			if (results == null)
			{
				throw new ArgumentNullException("results");
			}
			if (xCount <= 0)
			{
				throw new ArgumentOutOfRangeException("xCount");
			}
			if (yCount <= 0)
			{
				throw new ArgumentOutOfRangeException("yCount");
			}
			if (resultXOffset < 0 || resultXOffset + xCount > results.GetLength(1))
			{
				throw new ArgumentOutOfRangeException("resultXOffset");
			}
			if (resultYOffset < 0 || resultYOffset + yCount > results.GetLength(0))
			{
				throw new ArgumentOutOfRangeException("resultYOffset");
			}
			Internal_GetInterpolatedHeights(results, results.GetLength(1), resultXOffset, resultYOffset, xBase, yBase, xCount, yCount, xInterval, yInterval);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("TerrainDataScriptingInterface::GetInterpolatedHeights", HasExplicitThis = true)]
		private extern void Internal_GetInterpolatedHeights(float[,] results, int resultXDimension, int resultXOffset, int resultYOffset, float xBase, float yBase, int xCount, int yCount, float xInterval, float yInterval);

		public float[,] GetHeights(int xBase, int yBase, int width, int height)
		{
			if (xBase < 0 || yBase < 0 || xBase + width < 0 || yBase + height < 0 || xBase + width > heightmapWidth || yBase + height > heightmapHeight)
			{
				throw new ArgumentException("Trying to access out-of-bounds terrain height information.");
			}
			return Internal_GetHeights(xBase, yBase, width, height);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("TerrainDataScriptingInterface::GetHeights", HasExplicitThis = true)]
		private extern float[,] Internal_GetHeights(int xBase, int yBase, int width, int height);

		public void SetHeights(int xBase, int yBase, float[,] heights)
		{
			if (heights == null)
			{
				throw new NullReferenceException();
			}
			if (xBase + heights.GetLength(1) > heightmapWidth || xBase + heights.GetLength(1) < 0 || yBase + heights.GetLength(0) < 0 || xBase < 0 || yBase < 0 || yBase + heights.GetLength(0) > heightmapHeight)
			{
				throw new ArgumentException(UnityString.Format("X or Y base out of bounds. Setting up to {0}x{1} while map size is {2}x{3}", new object[4]
				{
					xBase + heights.GetLength(1),
					yBase + heights.GetLength(0),
					heightmapWidth,
					heightmapHeight
				}));
			}
			Internal_SetHeights(xBase, yBase, heights.GetLength(1), heights.GetLength(0), heights);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("TerrainDataScriptingInterface::SetHeights", HasExplicitThis = true)]
		private extern void Internal_SetHeights(int xBase, int yBase, int width, int height, float[,] heights);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("TerrainDataScriptingInterface::GetPatchMinMaxHeights", HasExplicitThis = true)]
		public extern PatchExtents[] GetPatchMinMaxHeights();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("TerrainDataScriptingInterface::OverrideMinMaxPatchHeights", HasExplicitThis = true)]
		public extern void OverrideMinMaxPatchHeights(PatchExtents[] minMaxHeights);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("TerrainDataScriptingInterface::GetMaximumHeightError", HasExplicitThis = true)]
		public extern float[] GetMaximumHeightError();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("TerrainDataScriptingInterface::OverrideMaximumHeightError", HasExplicitThis = true)]
		public extern void OverrideMaximumHeightError(float[] maxError);

		public void SetHeightsDelayLOD(int xBase, int yBase, float[,] heights)
		{
			if (heights == null)
			{
				throw new ArgumentNullException("heights");
			}
			int length = heights.GetLength(0);
			int length2 = heights.GetLength(1);
			if (xBase < 0 || xBase + length2 < 0 || xBase + length2 > heightmapWidth)
			{
				throw new ArgumentException(UnityString.Format("X out of bounds - trying to set {0}-{1} but the terrain ranges from 0-{2}", new object[3]
				{
					xBase,
					xBase + length2,
					heightmapWidth
				}));
			}
			if (yBase < 0 || yBase + length < 0 || yBase + length > heightmapHeight)
			{
				throw new ArgumentException(UnityString.Format("Y out of bounds - trying to set {0}-{1} but the terrain ranges from 0-{2}", new object[3]
				{
					yBase,
					yBase + length,
					heightmapHeight
				}));
			}
			Internal_SetHeightsDelayLOD(xBase, yBase, length2, length, heights);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("TerrainDataScriptingInterface::SetHeightsDelayLOD", HasExplicitThis = true)]
		private extern void Internal_SetHeightsDelayLOD(int xBase, int yBase, int width, int height, float[,] heights);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("GetHeightmap().GetSteepness")]
		public extern float GetSteepness(float x, float y);

		[NativeName("GetHeightmap().GetInterpolatedNormal")]
		public Vector3 GetInterpolatedNormal(float x, float y)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			GetInterpolatedNormal_Injected(x, y, out var ret);
			return ret;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("GetHeightmap().GetAdjustedSize")]
		internal extern int GetAdjustedSize(int size);

		public void SetDetailResolution(int detailResolution, int resolutionPerPatch)
		{
			if (detailResolution < 0)
			{
				Debug.LogWarning((object)"detailResolution must not be negative.");
				detailResolution = 0;
			}
			if (resolutionPerPatch < k_MinimumDetailResolutionPerPatch || resolutionPerPatch > k_MaximumDetailResolutionPerPatch)
			{
				Debug.LogWarning((object)("resolutionPerPatch is clamped to the range of [" + k_MinimumDetailResolutionPerPatch + ", " + k_MaximumDetailResolutionPerPatch + "]."));
				resolutionPerPatch = Math.Min(k_MaximumDetailResolutionPerPatch, Math.Max(resolutionPerPatch, k_MinimumDetailResolutionPerPatch));
			}
			int num = detailResolution / resolutionPerPatch;
			if (num > k_MaximumDetailPatchCount)
			{
				Debug.LogWarning((object)("Patch count (detailResolution / resolutionPerPatch) is clamped to the range of [0, " + k_MaximumDetailPatchCount + "]."));
				num = Math.Min(k_MaximumDetailPatchCount, Math.Max(num, 0));
			}
			Internal_SetDetailResolution(num, resolutionPerPatch);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("GetDetailDatabase().SetDetailResolution")]
		private extern void Internal_SetDetailResolution(int patchCount, int resolutionPerPatch);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("GetDetailDatabase().ResetDirtyDetails")]
		internal extern void ResetDirtyDetails();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("TerrainDataScriptingInterface::RefreshPrototypes", HasExplicitThis = true)]
		public extern void RefreshPrototypes();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("TerrainDataScriptingInterface::GetSupportedLayers", HasExplicitThis = true)]
		public extern int[] GetSupportedLayers(int xBase, int yBase, int totalWidth, int totalHeight);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("TerrainDataScriptingInterface::GetDetailLayer", HasExplicitThis = true)]
		public extern int[,] GetDetailLayer(int xBase, int yBase, int width, int height, int layer);

		public void SetDetailLayer(int xBase, int yBase, int layer, int[,] details)
		{
			Internal_SetDetailLayer(xBase, yBase, details.GetLength(1), details.GetLength(0), layer, details);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("TerrainDataScriptingInterface::SetDetailLayer", HasExplicitThis = true)]
		private extern void Internal_SetDetailLayer(int xBase, int yBase, int totalWidth, int totalHeight, int detailIndex, int[,] data);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("GetTreeDatabase().GetInstances")]
		private extern TreeInstance[] Internal_GetTreeInstances();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("TerrainDataScriptingInterface::SetTreeInstances", HasExplicitThis = true)]
		public extern void SetTreeInstances([NotNull] TreeInstance[] instances, bool snapToHeightmap);

		public TreeInstance GetTreeInstance(int index)
		{
			if (index < 0 || index >= treeInstanceCount)
			{
				throw new ArgumentOutOfRangeException("index");
			}
			return Internal_GetTreeInstance(index);
		}

		[FreeFunction("TerrainDataScriptingInterface::GetTreeInstance", HasExplicitThis = true)]
		private TreeInstance Internal_GetTreeInstance(int index)
		{
			Internal_GetTreeInstance_Injected(index, out var ret);
			return ret;
		}

		[FreeFunction("TerrainDataScriptingInterface::SetTreeInstance", HasExplicitThis = true)]
		[NativeThrows]
		public void SetTreeInstance(int index, TreeInstance instance)
		{
			SetTreeInstance_Injected(index, ref instance);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("GetTreeDatabase().RemoveTreePrototype")]
		internal extern void RemoveTreePrototype(int index);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("GetDetailDatabase().RemoveDetailPrototype")]
		internal extern void RemoveDetailPrototype(int index);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("GetTreeDatabase().NeedUpgradeScaledPrototypes")]
		internal extern bool NeedUpgradeScaledTreePrototypes();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("TerrainDataScriptingInterface::UpgradeScaledTreePrototype", HasExplicitThis = true)]
		internal extern void UpgradeScaledTreePrototype();

		public float[,,] GetAlphamaps(int x, int y, int width, int height)
		{
			if (x < 0 || y < 0 || width < 0 || height < 0)
			{
				throw new ArgumentException("Invalid argument for GetAlphaMaps");
			}
			return Internal_GetAlphamaps(x, y, width, height);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("TerrainDataScriptingInterface::GetAlphamaps", HasExplicitThis = true)]
		private extern float[,,] Internal_GetAlphamaps(int x, int y, int width, int height);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("GetSplatDatabase().GetAlphamapResolution")]
		[RequiredByNativeCode]
		internal extern float GetAlphamapResolutionInternal();

		public void SetAlphamaps(int x, int y, float[,,] map)
		{
			if (map.GetLength(2) != alphamapLayers)
			{
				throw new Exception(UnityString.Format("Float array size wrong (layers should be {0})", new object[1] { alphamapLayers }));
			}
			Internal_SetAlphamaps(x, y, map.GetLength(1), map.GetLength(0), map);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("TerrainDataScriptingInterface::SetAlphamaps", HasExplicitThis = true)]
		private extern void Internal_SetAlphamaps(int x, int y, int width, int height, float[,,] map);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("GetSplatDatabase().SetBaseMapsDirty")]
		public extern void SetBaseMapDirty();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("GetSplatDatabase().GetAlphaTexture")]
		public extern Texture2D GetAlphamapTexture(int index);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("GetTreeDatabase().AddTree")]
		internal extern void AddTree(ref TreeInstance tree);

		[NativeName("GetTreeDatabase().RemoveTrees")]
		internal int RemoveTrees(Vector2 position, float radius, int prototypeIndex)
		{
			return RemoveTrees_Injected(ref position, radius, prototypeIndex);
		}

		[NativeName("GetHeightmap().CopyFromActiveRenderTexture")]
		private void Internal_CopyActiveRenderTextureToHeightmap(RectInt rect, int destX, int destY, TerrainHeightmapSyncControl syncControl)
		{
			Internal_CopyActiveRenderTextureToHeightmap_Injected(ref rect, destX, destY, syncControl);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("GetHeightmap().DirtyRegion")]
		private extern void Internal_DirtyHeightmapRegion(int x, int y, int width, int height, TerrainHeightmapSyncControl syncControl);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("GetHeightmap().SyncGPUModifications")]
		public extern void SyncHeightmap();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("GetSplatDatabase().MarkDirtyRegion")]
		private extern void Internal_MarkAlphamapDirtyRegion(int alphamapIndex, int x, int y, int width, int height);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("GetSplatDatabase().ClearDirtyRegion")]
		private extern void Internal_ClearAlphamapDirtyRegion(int alphamapIndex);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("GetSplatDatabase().SyncGPUModifications")]
		private extern void Internal_SyncAlphamaps();

		public void CopyActiveRenderTextureToHeightmap(RectInt sourceRect, Vector2Int dest, TerrainHeightmapSyncControl syncControl)
		{
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
			RenderTexture active = RenderTexture.active;
			if ((Object)(object)active == (Object)null)
			{
				throw new InvalidOperationException("Active RenderTexture is null.");
			}
			if (((RectInt)(ref sourceRect)).x < 0 || ((RectInt)(ref sourceRect)).y < 0 || ((RectInt)(ref sourceRect)).xMax > ((Texture)active).width || ((RectInt)(ref sourceRect)).yMax > ((Texture)active).height)
			{
				throw new ArgumentOutOfRangeException("sourceRect");
			}
			if (((Vector2Int)(ref dest)).x < 0 || ((Vector2Int)(ref dest)).x + ((RectInt)(ref sourceRect)).width > heightmapResolution)
			{
				throw new ArgumentOutOfRangeException("dest.x");
			}
			if (((Vector2Int)(ref dest)).y < 0 || ((Vector2Int)(ref dest)).y + ((RectInt)(ref sourceRect)).height > heightmapResolution)
			{
				throw new ArgumentOutOfRangeException("dest.y");
			}
			Internal_CopyActiveRenderTextureToHeightmap(sourceRect, ((Vector2Int)(ref dest)).x, ((Vector2Int)(ref dest)).y, syncControl);
			TerrainCallbacks.InvokeHeightmapChangedCallback(this, new RectInt(((Vector2Int)(ref dest)).x, ((Vector2Int)(ref dest)).y, ((RectInt)(ref sourceRect)).width, ((RectInt)(ref sourceRect)).height), syncControl == TerrainHeightmapSyncControl.HeightAndLod);
		}

		public void DirtyHeightmapRegion(RectInt region, TerrainHeightmapSyncControl syncControl)
		{
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			int num = heightmapResolution;
			if (((RectInt)(ref region)).x < 0 || ((RectInt)(ref region)).x >= num)
			{
				throw new ArgumentOutOfRangeException("region.x");
			}
			if (((RectInt)(ref region)).width <= 0 || ((RectInt)(ref region)).xMax > num)
			{
				throw new ArgumentOutOfRangeException("region.width");
			}
			if (((RectInt)(ref region)).y < 0 || ((RectInt)(ref region)).y >= num)
			{
				throw new ArgumentOutOfRangeException("region.y");
			}
			if (((RectInt)(ref region)).height <= 0 || ((RectInt)(ref region)).yMax > num)
			{
				throw new ArgumentOutOfRangeException("region.height");
			}
			Internal_DirtyHeightmapRegion(((RectInt)(ref region)).x, ((RectInt)(ref region)).y, ((RectInt)(ref region)).width, ((RectInt)(ref region)).height, syncControl);
			TerrainCallbacks.InvokeHeightmapChangedCallback(this, region, syncControl == TerrainHeightmapSyncControl.HeightAndLod);
		}

		public void CopyActiveRenderTextureToTexture(string textureName, int textureIndex, RectInt sourceRect, Vector2Int dest, bool allowDelayedCPUSync)
		{
			//IL_025a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0261: Invalid comparison between Unknown and I4
			//IL_0291: Unknown result type (might be due to invalid IL or missing references)
			//IL_015a: Unknown result type (might be due to invalid IL or missing references)
			//IL_015f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0164: Unknown result type (might be due to invalid IL or m

Room Architect Tool_Data/Managed/UnityEngine.TerrainPhysicsModule.dll

Decompiled 3 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;

[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine;

[NativeHeader("Modules/Terrain/Public/TerrainData.h")]
[NativeHeader("Modules/TerrainPhysics/TerrainCollider.h")]
public class TerrainCollider : Collider
{
	public extern TerrainData terrainData
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	private RaycastHit Raycast(Ray ray, float maxDistance, bool hitHoles, ref bool hasHit)
	{
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		Raycast_Injected(ref ray, maxDistance, hitHoles, ref hasHit, out var ret);
		return ret;
	}

	internal bool Raycast(Ray ray, out RaycastHit hitInfo, float maxDistance, bool hitHoles)
	{
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		bool hasHit = false;
		hitInfo = Raycast(ray, maxDistance, hitHoles, ref hasHit);
		return hasHit;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void Raycast_Injected(ref Ray ray, float maxDistance, bool hitHoles, ref bool hasHit, out RaycastHit ret);
}

Room Architect Tool_Data/Managed/UnityEngine.TextCoreModule.dll

Decompiled 3 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;
using UnityEngine.Scripting;
using UnityEngine.Serialization;
using UnityEngine.TextCore.LowLevel;

[assembly: InternalsVisibleTo("Unity.FontEngine.Editor.Tests")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.TextCore.Editor.Tests")]
[assembly: InternalsVisibleTo("Unity.TextCore.Tests")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.TextCore")]
[assembly: InternalsVisibleTo("Unity.TextCore.Editor")]
[assembly: InternalsVisibleTo("Unity.TextMeshPro")]
[assembly: InternalsVisibleTo("Unity.TextMeshPro.Editor")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("Unity.FontEngine.Tests")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine.TextCore
{
	[Serializable]
	internal class Character : TextElement
	{
		public Character()
		{
			m_ElementType = TextElementType.Character;
			base.scale = 1f;
		}

		public Character(uint unicode, Glyph glyph)
		{
			m_ElementType = TextElementType.Character;
			base.unicode = unicode;
			base.glyph = glyph;
			base.glyphIndex = glyph.index;
			base.scale = 1f;
		}
	}
	internal static class ColorUtilities
	{
		internal static bool CompareColors(Color32 a, Color32 b)
		{
			return a.r == b.r && a.g == b.g && a.b == b.b && a.a == b.a;
		}

		internal static bool CompareColorsRgb(Color32 a, Color32 b)
		{
			return a.r == b.r && a.g == b.g && a.b == b.b;
		}

		internal static bool CompareColors(Color a, Color b)
		{
			return Mathf.Approximately(a.r, b.r) && Mathf.Approximately(a.g, b.g) && Mathf.Approximately(a.b, b.b) && Mathf.Approximately(a.a, b.a);
		}

		internal static bool CompareColorsRgb(Color a, Color b)
		{
			return Mathf.Approximately(a.r, b.r) && Mathf.Approximately(a.g, b.g) && Mathf.Approximately(a.b, b.b);
		}

		internal static Color32 MultiplyColors(Color32 c1, Color32 c2)
		{
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			byte b = (byte)((float)(int)c1.r / 255f * ((float)(int)c2.r / 255f) * 255f);
			byte b2 = (byte)((float)(int)c1.g / 255f * ((float)(int)c2.g / 255f) * 255f);
			byte b3 = (byte)((float)(int)c1.b / 255f * ((float)(int)c2.b / 255f) * 255f);
			byte b4 = (byte)((float)(int)c1.a / 255f * ((float)(int)c2.a / 255f) * 255f);
			return new Color32(b, b2, b3, b4);
		}
	}
	[Serializable]
	[UsedByNativeCode]
	public struct FaceInfo
	{
		[SerializeField]
		[NativeName("familyName")]
		private string m_FamilyName;

		[SerializeField]
		[NativeName("styleName")]
		private string m_StyleName;

		[SerializeField]
		[NativeName("pointSize")]
		private int m_PointSize;

		[NativeName("scale")]
		[SerializeField]
		private float m_Scale;

		[NativeName("lineHeight")]
		[SerializeField]
		private float m_LineHeight;

		[NativeName("ascentLine")]
		[SerializeField]
		private float m_AscentLine;

		[NativeName("capLine")]
		[SerializeField]
		private float m_CapLine;

		[SerializeField]
		[NativeName("meanLine")]
		private float m_MeanLine;

		[SerializeField]
		[NativeName("baseline")]
		private float m_Baseline;

		[SerializeField]
		[NativeName("descentLine")]
		private float m_DescentLine;

		[SerializeField]
		[NativeName("superscriptOffset")]
		private float m_SuperscriptOffset;

		[NativeName("superscriptSize")]
		[SerializeField]
		private float m_SuperscriptSize;

		[SerializeField]
		[NativeName("subscriptOffset")]
		private float m_SubscriptOffset;

		[SerializeField]
		[NativeName("subscriptSize")]
		private float m_SubscriptSize;

		[SerializeField]
		[NativeName("underlineOffset")]
		private float m_UnderlineOffset;

		[SerializeField]
		[NativeName("underlineThickness")]
		private float m_UnderlineThickness;

		[NativeName("strikethroughOffset")]
		[SerializeField]
		private float m_StrikethroughOffset;

		[NativeName("strikethroughThickness")]
		[SerializeField]
		private float m_StrikethroughThickness;

		[SerializeField]
		[NativeName("tabWidth")]
		private float m_TabWidth;

		public string familyName
		{
			get
			{
				return m_FamilyName;
			}
			set
			{
				m_FamilyName = value;
			}
		}

		public string styleName
		{
			get
			{
				return m_StyleName;
			}
			set
			{
				m_StyleName = value;
			}
		}

		public int pointSize
		{
			get
			{
				return m_PointSize;
			}
			set
			{
				m_PointSize = value;
			}
		}

		public float scale
		{
			get
			{
				return m_Scale;
			}
			set
			{
				m_Scale = value;
			}
		}

		public float lineHeight
		{
			get
			{
				return m_LineHeight;
			}
			set
			{
				m_LineHeight = value;
			}
		}

		public float ascentLine
		{
			get
			{
				return m_AscentLine;
			}
			set
			{
				m_AscentLine = value;
			}
		}

		public float capLine
		{
			get
			{
				return m_CapLine;
			}
			set
			{
				m_CapLine = value;
			}
		}

		public float meanLine
		{
			get
			{
				return m_MeanLine;
			}
			set
			{
				m_MeanLine = value;
			}
		}

		public float baseline
		{
			get
			{
				return m_Baseline;
			}
			set
			{
				m_Baseline = value;
			}
		}

		public float descentLine
		{
			get
			{
				return m_DescentLine;
			}
			set
			{
				m_DescentLine = value;
			}
		}

		public float superscriptOffset
		{
			get
			{
				return m_SuperscriptOffset;
			}
			set
			{
				m_SuperscriptOffset = value;
			}
		}

		public float superscriptSize
		{
			get
			{
				return m_SuperscriptSize;
			}
			set
			{
				m_SuperscriptSize = value;
			}
		}

		public float subscriptOffset
		{
			get
			{
				return m_SubscriptOffset;
			}
			set
			{
				m_SubscriptOffset = value;
			}
		}

		public float subscriptSize
		{
			get
			{
				return m_SubscriptSize;
			}
			set
			{
				m_SubscriptSize = value;
			}
		}

		public float underlineOffset
		{
			get
			{
				return m_UnderlineOffset;
			}
			set
			{
				m_UnderlineOffset = value;
			}
		}

		public float underlineThickness
		{
			get
			{
				return m_UnderlineThickness;
			}
			set
			{
				m_UnderlineThickness = value;
			}
		}

		public float strikethroughOffset
		{
			get
			{
				return m_StrikethroughOffset;
			}
			set
			{
				m_StrikethroughOffset = value;
			}
		}

		public float strikethroughThickness
		{
			get
			{
				return m_StrikethroughThickness;
			}
			set
			{
				m_StrikethroughThickness = value;
			}
		}

		public float tabWidth
		{
			get
			{
				return m_TabWidth;
			}
			set
			{
				m_TabWidth = value;
			}
		}

		internal FaceInfo(string familyName, string styleName, int pointSize, float scale, float lineHeight, float ascentLine, float capLine, float meanLine, float baseline, float descentLine, float superscriptOffset, float superscriptSize, float subscriptOffset, float subscriptSize, float underlineOffset, float underlineThickness, float strikethroughOffset, float strikethroughThickness, float tabWidth)
		{
			m_FamilyName = familyName;
			m_StyleName = styleName;
			m_PointSize = pointSize;
			m_Scale = scale;
			m_LineHeight = lineHeight;
			m_AscentLine = ascentLine;
			m_CapLine = capLine;
			m_MeanLine = meanLine;
			m_Baseline = baseline;
			m_DescentLine = descentLine;
			m_SuperscriptOffset = superscriptOffset;
			m_SuperscriptSize = superscriptSize;
			m_SubscriptOffset = subscriptOffset;
			m_SubscriptSize = subscriptSize;
			m_UnderlineOffset = underlineOffset;
			m_UnderlineThickness = underlineThickness;
			m_StrikethroughOffset = strikethroughOffset;
			m_StrikethroughThickness = strikethroughThickness;
			m_TabWidth = tabWidth;
		}

		public bool Compare(FaceInfo other)
		{
			return familyName == other.familyName && styleName == other.styleName && pointSize == other.pointSize && FontEngineUtilities.Approximately(scale, other.scale) && FontEngineUtilities.Approximately(lineHeight, other.lineHeight) && FontEngineUtilities.Approximately(ascentLine, other.ascentLine) && FontEngineUtilities.Approximately(capLine, other.capLine) && FontEngineUtilities.Approximately(meanLine, other.meanLine) && FontEngineUtilities.Approximately(baseline, other.baseline) && FontEngineUtilities.Approximately(descentLine, other.descentLine) && FontEngineUtilities.Approximately(superscriptOffset, other.superscriptOffset) && FontEngineUtilities.Approximately(superscriptSize, other.superscriptSize) && FontEngineUtilities.Approximately(subscriptOffset, other.subscriptOffset) && FontEngineUtilities.Approximately(subscriptSize, other.subscriptSize) && FontEngineUtilities.Approximately(underlineOffset, other.underlineOffset) && FontEngineUtilities.Approximately(underlineThickness, other.underlineThickness) && FontEngineUtilities.Approximately(strikethroughOffset, other.strikethroughOffset) && FontEngineUtilities.Approximately(strikethroughThickness, other.strikethroughThickness) && FontEngineUtilities.Approximately(tabWidth, other.tabWidth);
		}
	}
	[Serializable]
	internal struct FontWeights
	{
		public FontAsset regularTypeface;

		public FontAsset italicTypeface;
	}
	[Serializable]
	internal struct FontAssetCreationSettings
	{
		public string fontFileGUID;

		public int pointSizeSamplingMode;

		public int pointSize;

		public int padding;

		public int packingMode;

		public int atlasWidth;

		public int atlasHeight;

		public int characterSetSelectionMode;

		public string characterSequence;

		public string referencedFontAssetGUID;

		public string referencedTextAssetGUID;

		public int fontStyle;

		public float fontStyleModifier;

		public int renderMode;

		public bool includeFontFeatures;

		internal FontAssetCreationSettings(string fontFileGUID, int pointSize, int pointSizeSamplingMode, int padding, int packingMode, int atlasWidth, int atlasHeight, int characterSelectionMode, string characterSet, int renderMode)
		{
			this.fontFileGUID = fontFileGUID;
			this.pointSize = pointSize;
			this.pointSizeSamplingMode = pointSizeSamplingMode;
			this.padding = padding;
			this.packingMode = packingMode;
			this.atlasWidth = atlasWidth;
			this.atlasHeight = atlasHeight;
			characterSequence = characterSet;
			characterSetSelectionMode = characterSelectionMode;
			this.renderMode = renderMode;
			referencedFontAssetGUID = string.Empty;
			referencedTextAssetGUID = string.Empty;
			fontStyle = 0;
			fontStyleModifier = 0f;
			includeFontFeatures = false;
		}
	}
	[Serializable]
	[VisibleToOtherModules(new string[] { "UnityEngine.UIElementsModule" })]
	internal class FontAsset : ScriptableObject
	{
		internal enum AtlasPopulationMode
		{
			Static,
			Dynamic
		}

		[SerializeField]
		private string m_Version = "1.1.0";

		[SerializeField]
		private int m_HashCode;

		[SerializeField]
		private FaceInfo m_FaceInfo;

		[SerializeField]
		internal string m_SourceFontFileGUID;

		[SerializeField]
		internal Font m_SourceFontFile_EditorRef;

		[SerializeField]
		internal Font m_SourceFontFile;

		[SerializeField]
		private AtlasPopulationMode m_AtlasPopulationMode;

		[SerializeField]
		private List<Glyph> m_GlyphTable = new List<Glyph>();

		private Dictionary<uint, Glyph> m_GlyphLookupDictionary;

		[SerializeField]
		private List<Character> m_CharacterTable = new List<Character>();

		private Dictionary<uint, Character> m_CharacterLookupDictionary;

		private Texture2D m_AtlasTexture;

		[SerializeField]
		private Texture2D[] m_AtlasTextures;

		[SerializeField]
		internal int m_AtlasTextureIndex;

		[SerializeField]
		private int m_AtlasWidth;

		[SerializeField]
		private int m_AtlasHeight;

		[SerializeField]
		private int m_AtlasPadding;

		[SerializeField]
		private GlyphRenderMode m_AtlasRenderMode;

		[SerializeField]
		private List<GlyphRect> m_UsedGlyphRects;

		[SerializeField]
		private List<GlyphRect> m_FreeGlyphRects;

		private List<uint> m_GlyphIndexes = new List<uint>();

		private Dictionary<uint, List<uint>> s_GlyphLookupMap = new Dictionary<uint, List<uint>>();

		[SerializeField]
		private Material m_Material;

		[SerializeField]
		internal int m_MaterialHashCode;

		[SerializeField]
		internal KerningTable m_KerningTable = new KerningTable();

		private Dictionary<int, KerningPair> m_KerningLookupDictionary;

		[SerializeField]
		internal KerningPair m_EmptyKerningPair;

		[SerializeField]
		internal List<FontAsset> m_FallbackFontAssetTable;

		[SerializeField]
		internal FontAssetCreationSettings m_FontAssetCreationSettings;

		[SerializeField]
		internal FontWeights[] m_FontWeightTable = new FontWeights[10];

		[SerializeField]
		private float m_RegularStyleWeight = 0f;

		[SerializeField]
		private float m_RegularStyleSpacing = 0f;

		[SerializeField]
		private float m_BoldStyleWeight = 0.75f;

		[SerializeField]
		private float m_BoldStyleSpacing = 7f;

		[SerializeField]
		private byte m_ItalicStyleSlant = 35;

		[SerializeField]
		private byte m_TabMultiple = 10;

		internal bool m_IsFontAssetLookupTablesDirty = false;

		private List<Glyph> m_GlyphsToPack = new List<Glyph>();

		private List<Glyph> m_GlyphsPacked = new List<Glyph>();

		private List<Glyph> m_GlyphsToRender = new List<Glyph>();

		public string version
		{
			get
			{
				return m_Version;
			}
			set
			{
				m_Version = value;
			}
		}

		public int hashCode
		{
			get
			{
				return m_HashCode;
			}
			set
			{
				m_HashCode = value;
			}
		}

		public FaceInfo faceInfo
		{
			get
			{
				return m_FaceInfo;
			}
			set
			{
				m_FaceInfo = value;
			}
		}

		public Font sourceFontFile => m_SourceFontFile;

		public AtlasPopulationMode atlasPopulationMode
		{
			get
			{
				return m_AtlasPopulationMode;
			}
			set
			{
				m_AtlasPopulationMode = value;
			}
		}

		public List<Glyph> glyphTable
		{
			get
			{
				return m_GlyphTable;
			}
			set
			{
				m_GlyphTable = value;
			}
		}

		public Dictionary<uint, Glyph> glyphLookupTable
		{
			get
			{
				if (m_GlyphLookupDictionary == null)
				{
					ReadFontAssetDefinition();
				}
				return m_GlyphLookupDictionary;
			}
		}

		public List<Character> characterTable
		{
			get
			{
				return m_CharacterTable;
			}
			set
			{
				m_CharacterTable = value;
			}
		}

		public Dictionary<uint, Character> characterLookupTable
		{
			get
			{
				if (m_CharacterLookupDictionary == null)
				{
					ReadFontAssetDefinition();
				}
				return m_CharacterLookupDictionary;
			}
		}

		public Texture2D atlasTexture
		{
			get
			{
				if ((Object)(object)m_AtlasTexture == (Object)null)
				{
					m_AtlasTexture = atlasTextures[0];
				}
				return m_AtlasTexture;
			}
		}

		public Texture2D[] atlasTextures
		{
			get
			{
				if (m_AtlasTextures == null)
				{
				}
				return m_AtlasTextures;
			}
			set
			{
				m_AtlasTextures = value;
			}
		}

		public int atlasWidth
		{
			get
			{
				return m_AtlasWidth;
			}
			set
			{
				m_AtlasWidth = value;
			}
		}

		public int atlasHeight
		{
			get
			{
				return m_AtlasHeight;
			}
			set
			{
				m_AtlasHeight = value;
			}
		}

		public int atlasPadding
		{
			get
			{
				return m_AtlasPadding;
			}
			set
			{
				m_AtlasPadding = value;
			}
		}

		public GlyphRenderMode atlasRenderMode
		{
			get
			{
				return m_AtlasRenderMode;
			}
			set
			{
				m_AtlasRenderMode = value;
			}
		}

		internal List<GlyphRect> usedGlyphRects
		{
			get
			{
				return m_UsedGlyphRects;
			}
			set
			{
				m_UsedGlyphRects = value;
			}
		}

		internal List<GlyphRect> freeGlyphRects
		{
			get
			{
				return m_FreeGlyphRects;
			}
			set
			{
				m_FreeGlyphRects = value;
			}
		}

		public Material material
		{
			get
			{
				return m_Material;
			}
			set
			{
				m_Material = value;
				m_MaterialHashCode = TextUtilities.GetHashCodeCaseInSensitive(((Object)m_Material).name);
			}
		}

		public int materialHashCode
		{
			get
			{
				return m_MaterialHashCode;
			}
			set
			{
				if (m_MaterialHashCode == 0)
				{
					m_MaterialHashCode = TextUtilities.GetHashCodeCaseInSensitive(((Object)m_Material).name);
				}
				m_MaterialHashCode = value;
			}
		}

		public KerningTable kerningTable
		{
			get
			{
				return m_KerningTable;
			}
			set
			{
				m_KerningTable = value;
			}
		}

		public Dictionary<int, KerningPair> kerningLookupDictionary => m_KerningLookupDictionary;

		public List<FontAsset> fallbackFontAssetTable
		{
			get
			{
				return m_FallbackFontAssetTable;
			}
			set
			{
				m_FallbackFontAssetTable = value;
			}
		}

		public FontAssetCreationSettings fontAssetCreationSettings
		{
			get
			{
				return m_FontAssetCreationSettings;
			}
			set
			{
				m_FontAssetCreationSettings = value;
			}
		}

		public FontWeights[] fontWeightTable
		{
			get
			{
				return m_FontWeightTable;
			}
			set
			{
				m_FontWeightTable = value;
			}
		}

		public float regularStyleWeight
		{
			get
			{
				return m_RegularStyleWeight;
			}
			set
			{
				m_RegularStyleWeight = value;
			}
		}

		public float regularStyleSpacing
		{
			get
			{
				return m_RegularStyleSpacing;
			}
			set
			{
				m_RegularStyleSpacing = value;
			}
		}

		public float boldStyleWeight
		{
			get
			{
				return m_BoldStyleWeight;
			}
			set
			{
				m_BoldStyleWeight = value;
			}
		}

		public float boldStyleSpacing
		{
			get
			{
				return m_BoldStyleSpacing;
			}
			set
			{
				m_BoldStyleSpacing = value;
			}
		}

		public byte italicStyleSlant
		{
			get
			{
				return m_ItalicStyleSlant;
			}
			set
			{
				m_ItalicStyleSlant = value;
			}
		}

		public byte tabMultiple
		{
			get
			{
				return m_TabMultiple;
			}
			set
			{
				m_TabMultiple = value;
			}
		}

		public static FontAsset CreateFontAsset(Font font)
		{
			return CreateFontAsset(font, 90, 9, GlyphRenderMode.SDFAA, 1024, 1024);
		}

		public static FontAsset CreateFontAsset(Font font, int samplingPointSize, int atlasPadding, GlyphRenderMode renderMode, int atlasWidth, int atlasHeight, AtlasPopulationMode atlasPopulationMode = AtlasPopulationMode.Dynamic)
		{
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Expected O, but got Unknown
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Expected O, but got Unknown
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Expected O, but got Unknown
			FontAsset fontAsset = ScriptableObject.CreateInstance<FontAsset>();
			FontEngine.InitializeFontEngine();
			FontEngine.LoadFontFace(font, samplingPointSize);
			fontAsset.faceInfo = FontEngine.GetFaceInfo();
			if (atlasPopulationMode == AtlasPopulationMode.Dynamic)
			{
				fontAsset.m_SourceFontFile = font;
			}
			fontAsset.atlasPopulationMode = atlasPopulationMode;
			fontAsset.atlasWidth = atlasWidth;
			fontAsset.atlasHeight = atlasHeight;
			fontAsset.atlasPadding = atlasPadding;
			fontAsset.atlasRenderMode = renderMode;
			fontAsset.atlasTextures = (Texture2D[])(object)new Texture2D[1];
			Texture2D val = new Texture2D(0, 0, (TextureFormat)1, false);
			fontAsset.atlasTextures[0] = val;
			int num;
			if ((renderMode & (GlyphRenderMode)16) == (GlyphRenderMode)16)
			{
				num = 0;
				Material val2 = new Material(ShaderUtilities.ShaderRef_MobileBitmap);
				val2.SetTexture(ShaderUtilities.ID_MainTex, (Texture)(object)val);
				val2.SetFloat(ShaderUtilities.ID_TextureWidth, (float)atlasWidth);
				val2.SetFloat(ShaderUtilities.ID_TextureHeight, (float)atlasHeight);
				fontAsset.material = val2;
			}
			else
			{
				num = 1;
				Material val3 = new Material(ShaderUtilities.ShaderRef_MobileSDF);
				val3.SetTexture(ShaderUtilities.ID_MainTex, (Texture)(object)val);
				val3.SetFloat(ShaderUtilities.ID_TextureWidth, (float)atlasWidth);
				val3.SetFloat(ShaderUtilities.ID_TextureHeight, (float)atlasHeight);
				val3.SetFloat(ShaderUtilities.ID_GradientScale, (float)(atlasPadding + num));
				val3.SetFloat(ShaderUtilities.ID_WeightNormal, fontAsset.regularStyleWeight);
				val3.SetFloat(ShaderUtilities.ID_WeightBold, fontAsset.boldStyleWeight);
				fontAsset.material = val3;
			}
			fontAsset.freeGlyphRects = new List<GlyphRect>
			{
				new GlyphRect(0, 0, atlasWidth - num, atlasHeight - num)
			};
			fontAsset.usedGlyphRects = new List<GlyphRect>();
			fontAsset.InitializeDictionaryLookupTables();
			return fontAsset;
		}

		private void Awake()
		{
			m_HashCode = TextUtilities.GetHashCodeCaseInSensitive(((Object)this).name);
			if ((Object)(object)m_Material != (Object)null)
			{
				m_MaterialHashCode = TextUtilities.GetHashCodeCaseInSensitive(((Object)m_Material).name);
			}
		}

		internal void InitializeDictionaryLookupTables()
		{
			if (m_GlyphLookupDictionary == null)
			{
				m_GlyphLookupDictionary = new Dictionary<uint, Glyph>();
			}
			else
			{
				m_GlyphLookupDictionary.Clear();
			}
			for (int i = 0; i < m_GlyphTable.Count; i++)
			{
				Glyph glyph = m_GlyphTable[i];
				uint index = glyph.index;
				if (!m_GlyphLookupDictionary.ContainsKey(index))
				{
					m_GlyphLookupDictionary.Add(index, glyph);
				}
			}
			if (m_CharacterLookupDictionary == null)
			{
				m_CharacterLookupDictionary = new Dictionary<uint, Character>();
			}
			else
			{
				m_CharacterLookupDictionary.Clear();
			}
			for (int j = 0; j < m_CharacterTable.Count; j++)
			{
				Character character = m_CharacterTable[j];
				uint unicode = character.unicode;
				if (!m_CharacterLookupDictionary.ContainsKey(unicode))
				{
					m_CharacterLookupDictionary.Add(unicode, character);
				}
				if (m_GlyphLookupDictionary.ContainsKey(character.glyphIndex))
				{
					character.glyph = m_GlyphLookupDictionary[character.glyphIndex];
				}
			}
			if (m_KerningLookupDictionary == null)
			{
				m_KerningLookupDictionary = new Dictionary<int, KerningPair>();
			}
			else
			{
				m_KerningLookupDictionary.Clear();
			}
			List<KerningPair> kerningPairs = m_KerningTable.kerningPairs;
			if (kerningPairs == null)
			{
				return;
			}
			for (int k = 0; k < kerningPairs.Count; k++)
			{
				KerningPair kerningPair = kerningPairs[k];
				KerningPairKey kerningPairKey = new KerningPairKey(kerningPair.firstGlyph, kerningPair.secondGlyph);
				if (!m_KerningLookupDictionary.ContainsKey((int)kerningPairKey.key))
				{
					m_KerningLookupDictionary.Add((int)kerningPairKey.key, kerningPair);
				}
				else if (!TextSettings.warningsDisabled)
				{
					Debug.LogWarning((object)("Kerning Key for [" + kerningPairKey.ascii_Left + "] and [" + kerningPairKey.ascii_Right + "] already exists."));
				}
			}
		}

		internal void ReadFontAssetDefinition()
		{
			InitializeDictionaryLookupTables();
			if (!m_CharacterLookupDictionary.ContainsKey(9u))
			{
				Glyph glyph = new Glyph(0u, new GlyphMetrics(0f, 0f, 0f, 0f, m_FaceInfo.tabWidth * (float)(int)tabMultiple), GlyphRect.zero, 1f, 0);
				m_CharacterLookupDictionary.Add(9u, new Character(9u, glyph));
			}
			if (!m_CharacterLookupDictionary.ContainsKey(10u))
			{
				Glyph glyph2 = new Glyph(0u, new GlyphMetrics(10f, 0f, 0f, 0f, 0f), GlyphRect.zero, 1f, 0);
				m_CharacterLookupDictionary.Add(10u, new Character(10u, glyph2));
				if (!m_CharacterLookupDictionary.ContainsKey(13u))
				{
					m_CharacterLookupDictionary.Add(13u, new Character(13u, glyph2));
				}
			}
			if (!m_CharacterLookupDictionary.ContainsKey(8203u))
			{
				Glyph glyph3 = new Glyph(0u, new GlyphMetrics(0f, 0f, 0f, 0f, 0f), GlyphRect.zero, 1f, 0);
				m_CharacterLookupDictionary.Add(8203u, new Character(8203u, glyph3));
			}
			if (!m_CharacterLookupDictionary.ContainsKey(8288u))
			{
				Glyph glyph4 = new Glyph(0u, new GlyphMetrics(0f, 0f, 0f, 0f, 0f), GlyphRect.zero, 1f, 0);
				m_CharacterLookupDictionary.Add(8288u, new Character(8288u, glyph4));
			}
			if (m_FaceInfo.capLine == 0f && m_CharacterLookupDictionary.ContainsKey(72u))
			{
				m_FaceInfo.capLine = m_CharacterLookupDictionary[72u].glyph.metrics.horizontalBearingY;
			}
			if (m_FaceInfo.scale == 0f)
			{
				m_FaceInfo.scale = 1f;
			}
			if (m_FaceInfo.strikethroughOffset == 0f)
			{
				m_FaceInfo.strikethroughOffset = m_FaceInfo.capLine / 2.5f;
			}
			if (m_AtlasPadding == 0 && material.HasProperty(ShaderUtilities.ID_GradientScale))
			{
				m_AtlasPadding = (int)material.GetFloat(ShaderUtilities.ID_GradientScale) - 1;
			}
			m_HashCode = TextUtilities.GetHashCodeCaseInSensitive(((Object)this).name);
			m_MaterialHashCode = TextUtilities.GetHashCodeCaseInSensitive(((Object)material).name);
		}

		internal void SortCharacterTable()
		{
			if (m_CharacterTable != null && m_CharacterTable.Count > 0)
			{
				m_CharacterTable = m_CharacterTable.OrderBy((Character c) => c.unicode).ToList();
			}
		}

		internal void SortGlyphTable()
		{
			if (m_GlyphTable != null && m_GlyphTable.Count > 0)
			{
				m_GlyphTable = m_GlyphTable.OrderBy((Glyph c) => c.index).ToList();
			}
		}

		internal void SortGlyphAndCharacterTables()
		{
			SortGlyphTable();
			SortCharacterTable();
		}

		internal bool HasCharacter(int character)
		{
			if (m_CharacterLookupDictionary == null)
			{
				return false;
			}
			if (m_CharacterLookupDictionary.ContainsKey((uint)character))
			{
				return true;
			}
			return false;
		}

		internal bool HasCharacter(char character)
		{
			if (m_CharacterLookupDictionary == null)
			{
				return false;
			}
			if (m_CharacterLookupDictionary.ContainsKey(character))
			{
				return true;
			}
			return false;
		}

		internal bool HasCharacter(char character, bool searchFallbacks)
		{
			if (m_CharacterLookupDictionary == null)
			{
				ReadFontAssetDefinition();
				if (m_CharacterLookupDictionary == null)
				{
					return false;
				}
			}
			if (m_CharacterLookupDictionary.ContainsKey(character))
			{
				return true;
			}
			if (searchFallbacks)
			{
				if (fallbackFontAssetTable != null && fallbackFontAssetTable.Count > 0)
				{
					for (int i = 0; i < fallbackFontAssetTable.Count && (Object)(object)fallbackFontAssetTable[i] != (Object)null; i++)
					{
						if (fallbackFontAssetTable[i].HasCharacter_Internal(character, searchFallbacks))
						{
							return true;
						}
					}
				}
				if (TextSettings.fallbackFontAssets != null && TextSettings.fallbackFontAssets.Count > 0)
				{
					for (int j = 0; j < TextSettings.fallbackFontAssets.Count && (Object)(object)TextSettings.fallbackFontAssets[j] != (Object)null; j++)
					{
						if (TextSettings.fallbackFontAssets[j].m_CharacterLookupDictionary == null)
						{
							TextSettings.fallbackFontAssets[j].ReadFontAssetDefinition();
						}
						if (TextSettings.fallbackFontAssets[j].m_CharacterLookupDictionary != null && TextSettings.fallbackFontAssets[j].HasCharacter_Internal(character, searchFallbacks))
						{
							return true;
						}
					}
				}
				if ((Object)(object)TextSettings.defaultFontAsset != (Object)null)
				{
					if (TextSettings.defaultFontAsset.m_CharacterLookupDictionary == null)
					{
						TextSettings.defaultFontAsset.ReadFontAssetDefinition();
					}
					if (TextSettings.defaultFontAsset.m_CharacterLookupDictionary != null && TextSettings.defaultFontAsset.HasCharacter_Internal(character, searchFallbacks))
					{
						return true;
					}
				}
			}
			return false;
		}

		private bool HasCharacter_Internal(char character, bool searchFallbacks)
		{
			if (m_CharacterLookupDictionary == null)
			{
				ReadFontAssetDefinition();
				if (m_CharacterLookupDictionary == null)
				{
					return false;
				}
			}
			if (m_CharacterLookupDictionary.ContainsKey(character))
			{
				return true;
			}
			if (searchFallbacks && fallbackFontAssetTable != null && fallbackFontAssetTable.Count > 0)
			{
				for (int i = 0; i < fallbackFontAssetTable.Count && (Object)(object)fallbackFontAssetTable[i] != (Object)null; i++)
				{
					if (fallbackFontAssetTable[i].HasCharacter_Internal(character, searchFallbacks))
					{
						return true;
					}
				}
			}
			return false;
		}

		internal bool HasCharacters(string text, out List<char> missingCharacters)
		{
			if (m_CharacterLookupDictionary == null)
			{
				missingCharacters = null;
				return false;
			}
			missingCharacters = new List<char>();
			for (int i = 0; i < text.Length; i++)
			{
				if (!m_CharacterLookupDictionary.ContainsKey(text[i]))
				{
					missingCharacters.Add(text[i]);
				}
			}
			if (missingCharacters.Count == 0)
			{
				return true;
			}
			return false;
		}

		internal bool HasCharacters(string text)
		{
			if (m_CharacterLookupDictionary == null)
			{
				return false;
			}
			for (int i = 0; i < text.Length; i++)
			{
				if (!m_CharacterLookupDictionary.ContainsKey(text[i]))
				{
					return false;
				}
			}
			return true;
		}

		internal static string GetCharacters(FontAsset fontAsset)
		{
			string text = string.Empty;
			for (int i = 0; i < fontAsset.characterTable.Count; i++)
			{
				text += (char)fontAsset.characterTable[i].unicode;
			}
			return text;
		}

		internal static int[] GetCharactersArray(FontAsset fontAsset)
		{
			int[] array = new int[fontAsset.characterTable.Count];
			for (int i = 0; i < fontAsset.characterTable.Count; i++)
			{
				array[i] = (int)fontAsset.characterTable[i].unicode;
			}
			return array;
		}

		internal Character AddCharacter_Internal(uint unicode, Glyph glyph)
		{
			if (m_CharacterLookupDictionary.ContainsKey(unicode))
			{
				return m_CharacterLookupDictionary[unicode];
			}
			uint index = glyph.index;
			if (!m_GlyphLookupDictionary.ContainsKey(index))
			{
				if (glyph.glyphRect.width == 0 || glyph.glyphRect.width == 0)
				{
					m_GlyphTable.Add(glyph);
				}
				else
				{
					if (!FontEngine.TryPackGlyphInAtlas(glyph, m_AtlasPadding, GlyphPackingMode.ContactPointRule, m_AtlasRenderMode, m_AtlasWidth, m_AtlasHeight, m_FreeGlyphRects, m_UsedGlyphRects))
					{
						return null;
					}
					m_GlyphsToRender.Add(glyph);
				}
			}
			Character character = new Character(unicode, glyph);
			m_CharacterTable.Add(character);
			m_CharacterLookupDictionary.Add(unicode, character);
			UpdateAtlasTexture();
			return character;
		}

		internal bool TryAddCharacter(uint unicode, out Character character)
		{
			if (m_CharacterLookupDictionary.ContainsKey(unicode))
			{
				character = m_CharacterLookupDictionary[unicode];
				return true;
			}
			character = null;
			if (FontEngine.LoadFontFace(sourceFontFile, m_FaceInfo.pointSize) != 0)
			{
				return false;
			}
			uint glyphIndex = FontEngine.GetGlyphIndex(unicode);
			if (glyphIndex == 0)
			{
				return false;
			}
			if (m_GlyphLookupDictionary.ContainsKey(glyphIndex))
			{
				character = new Character(unicode, m_GlyphLookupDictionary[glyphIndex]);
				m_CharacterTable.Add(character);
				m_CharacterLookupDictionary.Add(unicode, character);
				return true;
			}
			if (((Texture)m_AtlasTextures[m_AtlasTextureIndex]).width == 0 || ((Texture)m_AtlasTextures[m_AtlasTextureIndex]).height == 0)
			{
				m_AtlasTextures[m_AtlasTextureIndex].Resize(m_AtlasWidth, m_AtlasHeight);
				FontEngine.ResetAtlasTexture(m_AtlasTextures[m_AtlasTextureIndex]);
			}
			if (FontEngine.TryAddGlyphToTexture(glyphIndex, m_AtlasPadding, GlyphPackingMode.BestShortSideFit, m_FreeGlyphRects, m_UsedGlyphRects, m_AtlasRenderMode, m_AtlasTextures[m_AtlasTextureIndex], out var glyph))
			{
				m_GlyphTable.Add(glyph);
				m_GlyphLookupDictionary.Add(glyphIndex, glyph);
				character = new Character(unicode, glyph);
				m_CharacterTable.Add(character);
				m_CharacterLookupDictionary.Add(unicode, character);
				return true;
			}
			return false;
		}

		internal void UpdateAtlasTexture()
		{
			if (m_GlyphsToRender.Count != 0)
			{
				FontEngine.RenderGlyphsToTexture(m_GlyphsToRender, m_AtlasPadding, m_AtlasRenderMode, m_AtlasTextures[m_AtlasTextureIndex]);
				m_AtlasTextures[m_AtlasTextureIndex].Apply(false, false);
				for (int i = 0; i < m_GlyphsToRender.Count; i++)
				{
					Glyph glyph = m_GlyphsToRender[i];
					glyph.atlasIndex = m_AtlasTextureIndex;
					m_GlyphTable.Add(glyph);
					m_GlyphLookupDictionary.Add(glyph.index, glyph);
				}
				m_GlyphsPacked.Clear();
				m_GlyphsToRender.Clear();
				if (m_GlyphsToPack.Count <= 0)
				{
				}
			}
		}

		public bool TryAddCharacters(uint[] unicodes)
		{
			bool flag = false;
			m_GlyphIndexes.Clear();
			s_GlyphLookupMap.Clear();
			FontEngine.LoadFontFace(m_SourceFontFile, m_FaceInfo.pointSize);
			foreach (uint num in unicodes)
			{
				if (!m_CharacterLookupDictionary.ContainsKey(num))
				{
					uint glyphIndex = FontEngine.GetGlyphIndex(num);
					if (glyphIndex == 0)
					{
						flag = true;
					}
					else if (m_GlyphLookupDictionary.ContainsKey(glyphIndex))
					{
						Character character = new Character(num, m_GlyphLookupDictionary[glyphIndex]);
						m_CharacterTable.Add(character);
						m_CharacterLookupDictionary.Add(num, character);
					}
					else if (s_GlyphLookupMap.ContainsKey(glyphIndex))
					{
						s_GlyphLookupMap[glyphIndex].Add(num);
					}
					else
					{
						s_GlyphLookupMap.Add(glyphIndex, new List<uint> { num });
						m_GlyphIndexes.Add(glyphIndex);
					}
				}
			}
			if (m_GlyphIndexes == null || m_GlyphIndexes.Count == 0)
			{
				return true;
			}
			if (((Texture)m_AtlasTextures[m_AtlasTextureIndex]).width == 0 || ((Texture)m_AtlasTextures[m_AtlasTextureIndex]).height == 0)
			{
				m_AtlasTextures[m_AtlasTextureIndex].Resize(m_AtlasWidth, m_AtlasHeight);
				FontEngine.ResetAtlasTexture(m_AtlasTextures[m_AtlasTextureIndex]);
			}
			Glyph[] glyphs;
			bool flag2 = FontEngine.TryAddGlyphsToTexture(m_GlyphIndexes, m_AtlasPadding, GlyphPackingMode.BestShortSideFit, m_FreeGlyphRects, m_UsedGlyphRects, m_AtlasRenderMode, m_AtlasTextures[m_AtlasTextureIndex], out glyphs);
			for (int j = 0; j < glyphs.Length && glyphs[j] != null; j++)
			{
				Glyph glyph = glyphs[j];
				uint index = glyph.index;
				m_GlyphTable.Add(glyph);
				m_GlyphLookupDictionary.Add(index, glyph);
				foreach (uint item in s_GlyphLookupMap[index])
				{
					Character character2 = new Character(item, glyph);
					m_CharacterTable.Add(character2);
					m_CharacterLookupDictionary.Add(item, character2);
				}
			}
			return flag2 && !flag;
		}

		public bool TryAddCharacters(string characters)
		{
			if (string.IsNullOrEmpty(characters) || m_AtlasPopulationMode == AtlasPopulationMode.Static)
			{
				if (m_AtlasPopulationMode == AtlasPopulationMode.Static)
				{
					Debug.LogWarning((object)("Unable to add characters to font asset [" + ((Object)this).name + "] because its AtlasPopulationMode is set to Static."), (Object)(object)this);
				}
				else
				{
					Debug.LogWarning((object)("Unable to add characters to font asset [" + ((Object)this).name + "] because the provided character list is Null or Empty."), (Object)(object)this);
				}
				return false;
			}
			if (FontEngine.LoadFontFace(m_SourceFontFile, m_FaceInfo.pointSize) != 0)
			{
				return false;
			}
			bool flag = false;
			int length = characters.Length;
			m_GlyphIndexes.Clear();
			s_GlyphLookupMap.Clear();
			for (int i = 0; i < length; i++)
			{
				uint num = characters[i];
				if (m_CharacterLookupDictionary.ContainsKey(num))
				{
					continue;
				}
				uint glyphIndex = FontEngine.GetGlyphIndex(num);
				if (glyphIndex == 0)
				{
					flag = true;
				}
				else if (m_GlyphLookupDictionary.ContainsKey(glyphIndex))
				{
					Character character = new Character(num, m_GlyphLookupDictionary[glyphIndex]);
					m_CharacterTable.Add(character);
					m_CharacterLookupDictionary.Add(num, character);
				}
				else if (s_GlyphLookupMap.ContainsKey(glyphIndex))
				{
					if (!s_GlyphLookupMap[glyphIndex].Contains(num))
					{
						s_GlyphLookupMap[glyphIndex].Add(num);
					}
				}
				else
				{
					s_GlyphLookupMap.Add(glyphIndex, new List<uint> { num });
					m_GlyphIndexes.Add(glyphIndex);
				}
			}
			if (m_GlyphIndexes == null || m_GlyphIndexes.Count == 0)
			{
				Debug.LogWarning((object)("No characters will be added to font asset [" + ((Object)this).name + "] either because they are already present in the font asset or missing from the font file."));
				return true;
			}
			if (((Texture)m_AtlasTextures[m_AtlasTextureIndex]).width == 0 || ((Texture)m_AtlasTextures[m_AtlasTextureIndex]).height == 0)
			{
				m_AtlasTextures[m_AtlasTextureIndex].Resize(m_AtlasWidth, m_AtlasHeight);
				FontEngine.ResetAtlasTexture(m_AtlasTextures[m_AtlasTextureIndex]);
			}
			Glyph[] glyphs;
			bool flag2 = FontEngine.TryAddGlyphsToTexture(m_GlyphIndexes, m_AtlasPadding, GlyphPackingMode.BestShortSideFit, m_FreeGlyphRects, m_UsedGlyphRects, m_AtlasRenderMode, m_AtlasTextures[m_AtlasTextureIndex], out glyphs);
			for (int j = 0; j < glyphs.Length && glyphs[j] != null; j++)
			{
				Glyph glyph = glyphs[j];
				uint index = glyph.index;
				m_GlyphTable.Add(glyph);
				m_GlyphLookupDictionary.Add(index, glyph);
				List<uint> list = s_GlyphLookupMap[index];
				int count = list.Count;
				for (int k = 0; k < count; k++)
				{
					uint num2 = list[k];
					Character character2 = new Character(num2, glyph);
					m_CharacterTable.Add(character2);
					m_CharacterLookupDictionary.Add(num2, character2);
				}
			}
			return flag2 && !flag;
		}

		internal void ClearFontAssetData()
		{
			if (m_GlyphTable != null)
			{
				m_GlyphTable.Clear();
			}
			if (m_CharacterTable != null)
			{
				m_CharacterTable.Clear();
			}
			if (m_UsedGlyphRects != null)
			{
				m_UsedGlyphRects.Clear();
			}
			if (m_FreeGlyphRects != null)
			{
				int num = (((m_AtlasRenderMode & (GlyphRenderMode)16) != (GlyphRenderMode)16) ? 1 : 0);
				m_FreeGlyphRects = new List<GlyphRect>
				{
					new GlyphRect(0, 0, m_AtlasWidth - num, m_AtlasHeight - num)
				};
			}
			if (m_GlyphsToPack != null)
			{
				m_GlyphsToPack.Clear();
			}
			if (m_GlyphsPacked != null)
			{
				m_GlyphsPacked.Clear();
			}
			if (m_KerningTable != null && m_KerningTable.kerningPairs != null)
			{
				m_KerningTable.kerningPairs.Clear();
			}
			m_AtlasTextureIndex = 0;
			if (m_AtlasTextures != null)
			{
				for (int i = 0; i < m_AtlasTextures.Length; i++)
				{
					Texture2D val = m_AtlasTextures[i];
					if (!((Object)(object)val == (Object)null))
					{
						if (((Texture)val).width != m_AtlasWidth || ((Texture)val).height != m_AtlasHeight)
						{
							val.Resize(m_AtlasWidth, m_AtlasHeight, (TextureFormat)1, false);
						}
						FontEngine.ResetAtlasTexture(val);
						val.Apply();
						if (i == 0)
						{
							m_AtlasTexture = val;
						}
						m_AtlasTextures[i] = val;
					}
				}
			}
			ReadFontAssetDefinition();
		}
	}
	internal static class FontUtilities
	{
		private static List<int> s_SearchedFontAssets;

		internal static Character GetCharacterFromFontAsset(uint unicode, FontAsset sourceFontAsset, bool includeFallbacks, FontStyles fontStyle, FontWeight fontWeight, out bool isAlternativeTypeface, out FontAsset fontAsset)
		{
			if (includeFallbacks)
			{
				if (s_SearchedFontAssets == null)
				{
					s_SearchedFontAssets = new List<int>();
				}
				else
				{
					s_SearchedFontAssets.Clear();
				}
			}
			return GetCharacterFromFontAsset_Internal(unicode, sourceFontAsset, includeFallbacks, fontStyle, fontWeight, out isAlternativeTypeface, out fontAsset);
		}

		internal static Character GetCharacterFromFontAssets(uint unicode, List<FontAsset> fontAssets, bool includeFallbacks, FontStyles fontStyle, FontWeight fontWeight, out bool isAlternativeTypeface, out FontAsset fontAsset)
		{
			isAlternativeTypeface = false;
			if (fontAssets == null || fontAssets.Count == 0)
			{
				fontAsset = null;
				return null;
			}
			if (includeFallbacks)
			{
				if (s_SearchedFontAssets == null)
				{
					s_SearchedFontAssets = new List<int>();
				}
				else
				{
					s_SearchedFontAssets.Clear();
				}
			}
			int count = fontAssets.Count;
			for (int i = 0; i < count; i++)
			{
				if (!((Object)(object)fontAssets[i] == (Object)null))
				{
					Character characterFromFontAsset_Internal = GetCharacterFromFontAsset_Internal(unicode, fontAssets[i], includeFallbacks, fontStyle, fontWeight, out isAlternativeTypeface, out fontAsset);
					if (characterFromFontAsset_Internal != null)
					{
						return characterFromFontAsset_Internal;
					}
				}
			}
			fontAsset = null;
			return null;
		}

		private static Character GetCharacterFromFontAsset_Internal(uint unicode, FontAsset sourceFontAsset, bool includeFallbacks, FontStyles fontStyle, FontWeight fontWeight, out bool isAlternativeTypeface, out FontAsset fontAsset)
		{
			fontAsset = null;
			isAlternativeTypeface = false;
			Character value = null;
			bool flag = (fontStyle & FontStyles.Italic) == FontStyles.Italic;
			if (flag || fontWeight != FontWeight.Regular)
			{
				FontWeights[] fontWeightTable = sourceFontAsset.fontWeightTable;
				switch (fontWeight)
				{
				case FontWeight.Thin:
					fontAsset = ((!flag) ? fontWeightTable[1].regularTypeface : fontWeightTable[1].italicTypeface);
					break;
				case FontWeight.ExtraLight:
					fontAsset = ((!flag) ? fontWeightTable[2].regularTypeface : fontWeightTable[2].italicTypeface);
					break;
				case FontWeight.Light:
					fontAsset = ((!flag) ? fontWeightTable[3].regularTypeface : fontWeightTable[3].italicTypeface);
					break;
				case FontWeight.Regular:
					fontAsset = ((!flag) ? fontWeightTable[4].regularTypeface : fontWeightTable[4].italicTypeface);
					break;
				case FontWeight.Medium:
					fontAsset = ((!flag) ? fontWeightTable[5].regularTypeface : fontWeightTable[5].italicTypeface);
					break;
				case FontWeight.SemiBold:
					fontAsset = ((!flag) ? fontWeightTable[6].regularTypeface : fontWeightTable[6].italicTypeface);
					break;
				case FontWeight.Bold:
					fontAsset = ((!flag) ? fontWeightTable[7].regularTypeface : fontWeightTable[7].italicTypeface);
					break;
				case FontWeight.Heavy:
					fontAsset = ((!flag) ? fontWeightTable[8].regularTypeface : fontWeightTable[8].italicTypeface);
					break;
				case FontWeight.Black:
					fontAsset = ((!flag) ? fontWeightTable[9].regularTypeface : fontWeightTable[9].italicTypeface);
					break;
				}
				if ((Object)(object)fontAsset != (Object)null)
				{
					if (fontAsset.characterLookupTable.TryGetValue(unicode, out value))
					{
						isAlternativeTypeface = true;
						return value;
					}
					if (fontAsset.atlasPopulationMode == FontAsset.AtlasPopulationMode.Dynamic && fontAsset.TryAddCharacter(unicode, out value))
					{
						isAlternativeTypeface = true;
						return value;
					}
				}
			}
			if (sourceFontAsset.characterLookupTable.TryGetValue(unicode, out value))
			{
				fontAsset = sourceFontAsset;
				return value;
			}
			if (sourceFontAsset.atlasPopulationMode == FontAsset.AtlasPopulationMode.Dynamic && sourceFontAsset.TryAddCharacter(unicode, out value))
			{
				fontAsset = sourceFontAsset;
				return value;
			}
			if (value == null && includeFallbacks && sourceFontAsset.fallbackFontAssetTable != null)
			{
				List<FontAsset> fallbackFontAssetTable = sourceFontAsset.fallbackFontAssetTable;
				int count = fallbackFontAssetTable.Count;
				if (fallbackFontAssetTable != null && count > 0)
				{
					for (int i = 0; i < count; i++)
					{
						if (value != null)
						{
							break;
						}
						FontAsset fontAsset2 = fallbackFontAssetTable[i];
						if ((Object)(object)fontAsset2 == (Object)null)
						{
							continue;
						}
						int instanceID = ((Object)fontAsset2).GetInstanceID();
						if (!s_SearchedFontAssets.Contains(instanceID))
						{
							s_SearchedFontAssets.Add(instanceID);
							value = GetCharacterFromFontAsset_Internal(unicode, fontAsset2, includeFallbacks, fontStyle, fontWeight, out isAlternativeTypeface, out fontAsset);
							if (value != null)
							{
								return value;
							}
						}
					}
				}
			}
			return null;
		}
	}
	[Serializable]
	[UsedByNativeCode]
	public struct GlyphRect : IEquatable<GlyphRect>
	{
		[SerializeField]
		[NativeName("x")]
		private int m_X;

		[SerializeField]
		[NativeName("y")]
		private int m_Y;

		[SerializeField]
		[NativeName("width")]
		private int m_Width;

		[NativeName("height")]
		[SerializeField]
		private int m_Height;

		private static readonly GlyphRect s_ZeroGlyphRect = new GlyphRect(0, 0, 0, 0);

		public int x
		{
			get
			{
				return m_X;
			}
			set
			{
				m_X = value;
			}
		}

		public int y
		{
			get
			{
				return m_Y;
			}
			set
			{
				m_Y = value;
			}
		}

		public int width
		{
			get
			{
				return m_Width;
			}
			set
			{
				m_Width = value;
			}
		}

		public int height
		{
			get
			{
				return m_Height;
			}
			set
			{
				m_Height = value;
			}
		}

		public static GlyphRect zero => s_ZeroGlyphRect;

		public GlyphRect(int x, int y, int width, int height)
		{
			m_X = x;
			m_Y = y;
			m_Width = width;
			m_Height = height;
		}

		public GlyphRect(Rect rect)
		{
			m_X = (int)((Rect)(ref rect)).x;
			m_Y = (int)((Rect)(ref rect)).y;
			m_Width = (int)((Rect)(ref rect)).width;
			m_Height = (int)((Rect)(ref rect)).height;
		}

		public override int GetHashCode()
		{
			return base.GetHashCode();
		}

		public override bool Equals(object obj)
		{
			return base.Equals(obj);
		}

		public bool Equals(GlyphRect other)
		{
			return base.Equals((object?)other);
		}

		public static bool operator ==(GlyphRect lhs, GlyphRect rhs)
		{
			return lhs.x == rhs.x && lhs.y == rhs.y && lhs.width == rhs.width && lhs.height == rhs.height;
		}

		public static bool operator !=(GlyphRect lhs, GlyphRect rhs)
		{
			return !(lhs == rhs);
		}
	}
	[Serializable]
	[UsedByNativeCode]
	public struct GlyphMetrics : IEquatable<GlyphMetrics>
	{
		[NativeName("width")]
		[SerializeField]
		private float m_Width;

		[SerializeField]
		[NativeName("height")]
		private float m_Height;

		[NativeName("horizontalBearingX")]
		[SerializeField]
		private float m_HorizontalBearingX;

		[SerializeField]
		[NativeName("horizontalBearingY")]
		private float m_HorizontalBearingY;

		[SerializeField]
		[NativeName("horizontalAdvance")]
		private float m_HorizontalAdvance;

		public float width
		{
			get
			{
				return m_Width;
			}
			set
			{
				m_Width = value;
			}
		}

		public float height
		{
			get
			{
				return m_Height;
			}
			set
			{
				m_Height = value;
			}
		}

		public float horizontalBearingX
		{
			get
			{
				return m_HorizontalBearingX;
			}
			set
			{
				m_HorizontalBearingX = value;
			}
		}

		public float horizontalBearingY
		{
			get
			{
				return m_HorizontalBearingY;
			}
			set
			{
				m_HorizontalBearingY = value;
			}
		}

		public float horizontalAdvance
		{
			get
			{
				return m_HorizontalAdvance;
			}
			set
			{
				m_HorizontalAdvance = value;
			}
		}

		public GlyphMetrics(float width, float height, float bearingX, float bearingY, float advance)
		{
			m_Width = width;
			m_Height = height;
			m_HorizontalBearingX = bearingX;
			m_HorizontalBearingY = bearingY;
			m_HorizontalAdvance = advance;
		}

		public override int GetHashCode()
		{
			return base.GetHashCode();
		}

		public override bool Equals(object obj)
		{
			return base.Equals(obj);
		}

		public bool Equals(GlyphMetrics other)
		{
			return base.Equals((object?)other);
		}

		public static bool operator ==(GlyphMetrics lhs, GlyphMetrics rhs)
		{
			return lhs.width == rhs.width && lhs.height == rhs.height && lhs.horizontalBearingX == rhs.horizontalBearingX && lhs.horizontalBearingY == rhs.horizontalBearingY && lhs.horizontalAdvance == rhs.horizontalAdvance;
		}

		public static bool operator !=(GlyphMetrics lhs, GlyphMetrics rhs)
		{
			return !(lhs == rhs);
		}
	}
	[Serializable]
	[StructLayout(LayoutKind.Sequential)]
	[UsedByNativeCode]
	public class Glyph
	{
		[SerializeField]
		[NativeName("index")]
		private uint m_Index;

		[NativeName("metrics")]
		[SerializeField]
		private GlyphMetrics m_Metrics;

		[NativeName("glyphRect")]
		[SerializeField]
		private GlyphRect m_GlyphRect;

		[SerializeField]
		[NativeName("scale")]
		private float m_Scale;

		[NativeName("atlasIndex")]
		[SerializeField]
		private int m_AtlasIndex;

		public uint index
		{
			get
			{
				return m_Index;
			}
			set
			{
				m_Index = value;
			}
		}

		public GlyphMetrics metrics
		{
			get
			{
				return m_Metrics;
			}
			set
			{
				m_Metrics = value;
			}
		}

		public GlyphRect glyphRect
		{
			get
			{
				return m_GlyphRect;
			}
			set
			{
				m_GlyphRect = value;
			}
		}

		public float scale
		{
			get
			{
				return m_Scale;
			}
			set
			{
				m_Scale = value;
			}
		}

		public int atlasIndex
		{
			get
			{
				return m_AtlasIndex;
			}
			set
			{
				m_AtlasIndex = value;
			}
		}

		public Glyph()
		{
			m_Index = 0u;
			m_Metrics = default(GlyphMetrics);
			m_GlyphRect = default(GlyphRect);
			m_Scale = 1f;
			m_AtlasIndex = 0;
		}

		public Glyph(Glyph glyph)
		{
			m_Index = glyph.index;
			m_Metrics = glyph.metrics;
			m_GlyphRect = glyph.glyphRect;
			m_Scale = glyph.scale;
			m_AtlasIndex = glyph.atlasIndex;
		}

		internal Glyph(GlyphMarshallingStruct glyphStruct)
		{
			m_Index = glyphStruct.index;
			m_Metrics = glyphStruct.metrics;
			m_GlyphRect = glyphStruct.glyphRect;
			m_Scale = glyphStruct.scale;
			m_AtlasIndex = glyphStruct.atlasIndex;
		}

		public Glyph(uint index, GlyphMetrics metrics, GlyphRect glyphRect)
		{
			m_Index = index;
			m_Metrics = metrics;
			m_GlyphRect = glyphRect;
			m_Scale = 1f;
			m_AtlasIndex = 0;
		}

		public Glyph(uint index, GlyphMetrics metrics, GlyphRect glyphRect, float scale, int atlasIndex)
		{
			m_Index = index;
			m_Metrics = metrics;
			m_GlyphRect = glyphRect;
			m_Scale = scale;
			m_AtlasIndex = atlasIndex;
		}

		public bool Compare(Glyph other)
		{
			return index == other.index && metrics == other.metrics && glyphRect == other.glyphRect && scale == other.scale && atlasIndex == other.atlasIndex;
		}
	}
	internal struct KerningPairKey
	{
		public uint ascii_Left;

		public uint ascii_Right;

		public uint key;

		public KerningPairKey(uint ascii_left, uint ascii_right)
		{
			ascii_Left = ascii_left;
			ascii_Right = ascii_right;
			key = (ascii_right << 16) + ascii_left;
		}
	}
	[Serializable]
	internal class KerningPair
	{
		[SerializeField]
		[FormerlySerializedAs("AscII_Left")]
		private uint m_FirstGlyph;

		[SerializeField]
		private GlyphValueRecord m_FirstGlyphAdjustments;

		[FormerlySerializedAs("AscII_Right")]
		[SerializeField]
		private uint m_SecondGlyph;

		[SerializeField]
		private GlyphValueRecord m_SecondGlyphAdjustments;

		[FormerlySerializedAs("XadvanceOffset")]
		public float xOffset;

		public uint firstGlyph
		{
			get
			{
				return m_FirstGlyph;
			}
			set
			{
				m_FirstGlyph = value;
			}
		}

		public GlyphValueRecord firstGlyphAdjustments => m_FirstGlyphAdjustments;

		public uint secondGlyph
		{
			get
			{
				return m_SecondGlyph;
			}
			set
			{
				m_SecondGlyph = value;
			}
		}

		public GlyphValueRecord secondGlyphAdjustments => m_SecondGlyphAdjustments;

		public KerningPair()
		{
			m_FirstGlyph = 0u;
			m_FirstGlyphAdjustments = default(GlyphValueRecord);
			m_SecondGlyph = 0u;
			m_SecondGlyphAdjustments = default(GlyphValueRecord);
		}

		public KerningPair(uint left, uint right, float offset)
		{
			firstGlyph = left;
			m_SecondGlyph = right;
			xOffset = offset;
		}

		public KerningPair(uint firstGlyph, GlyphValueRecord firstGlyphAdjustments, uint secondGlyph, GlyphValueRecord secondGlyphAdjustments)
		{
			m_FirstGlyph = firstGlyph;
			m_FirstGlyphAdjustments = firstGlyphAdjustments;
			m_SecondGlyph = secondGlyph;
			m_SecondGlyphAdjustments = secondGlyphAdjustments;
		}

		internal void ConvertLegacyKerningData()
		{
			m_FirstGlyphAdjustments.xAdvance = xOffset;
		}
	}
	[Serializable]
	internal class KerningTable
	{
		public List<KerningPair> kerningPairs;

		public KerningTable()
		{
			kerningPairs = new List<KerningPair>();
		}

		public int AddGlyphPairAdjustmentRecord(uint first, GlyphValueRecord firstAdjustments, uint second, GlyphValueRecord secondAdjustments)
		{
			int num = kerningPairs.FindIndex((KerningPair item) => item.firstGlyph == first && item.secondGlyph == second);
			if (num == -1)
			{
				kerningPairs.Add(new KerningPair(first, firstAdjustments, second, secondAdjustments));
				return 0;
			}
			return -1;
		}

		public void RemoveKerningPair(int left, int right)
		{
			int num = kerningPairs.FindIndex((KerningPair item) => item.firstGlyph == left && item.secondGlyph == right);
			if (num != -1)
			{
				kerningPairs.RemoveAt(num);
			}
		}

		public void RemoveKerningPair(int index)
		{
			kerningPairs.RemoveAt(index);
		}

		public void SortKerningPairs()
		{
			if (kerningPairs.Count > 0)
			{
				kerningPairs = (from s in kerningPairs
					orderby s.firstGlyph, s.secondGlyph
					select s).ToList();
			}
		}
	}
	internal struct Extents
	{
		public Vector2 min;

		public Vector2 max;

		public Extents(Vector2 min, Vector2 max)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			this.min = min;
			this.max = max;
		}

		public override string ToString()
		{
			return "Min (" + min.x.ToString("f2") + ", " + min.y.ToString("f2") + ")   Max (" + max.x.ToString("f2") + ", " + max.y.ToString("f2") + ")";
		}
	}
	internal struct LineInfo
	{
		internal int controlCharacterCount;

		public int characterCount;

		public int visibleCharacterCount;

		public int spaceCount;

		public int wordCount;

		public int firstCharacterIndex;

		public int firstVisibleCharacterIndex;

		public int lastCharacterIndex;

		public int lastVisibleCharacterIndex;

		public float length;

		public float lineHeight;

		public float ascender;

		public float baseline;

		public float descender;

		public float maxAdvance;

		public float width;

		public float marginLeft;

		public float marginRight;

		public TextAlignment alignment;

		public Extents lineExtents;
	}
	internal struct LinkInfo
	{
		public int hashCode;

		public int linkIdFirstCharacterIndex;

		public int linkIdLength;

		public int linkTextfirstCharacterIndex;

		public int linkTextLength;

		internal char[] linkId;

		internal void SetLinkId(char[] text, int startIndex, int length)
		{
			if (linkId == null || linkId.Length < length)
			{
				linkId = new char[length];
			}
			for (int i = 0; i < length; i++)
			{
				linkId[i] = text[startIndex + i];
			}
		}

		public string GetLinkText(TextInfo textInfo)
		{
			string text = string.Empty;
			for (int i = linkTextfirstCharacterIndex; i < linkTextfirstCharacterIndex + linkTextLength; i++)
			{
				text += textInfo.textElementInfo[i].character;
			}
			return text;
		}

		public string GetLinkId()
		{
			return new string(linkId, 0, linkIdLength);
		}
	}
	internal static class MaterialManager
	{
		private static Dictionary<long, Material> s_FallbackMaterials = new Dictionary<long, Material>();

		public static Material GetFallbackMaterial(Material sourceMaterial, Material targetMaterial)
		{
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Expected O, but got Unknown
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Expected O, but got Unknown
			int instanceID = ((Object)sourceMaterial).GetInstanceID();
			Texture texture = targetMaterial.GetTexture(ShaderUtilities.ID_MainTex);
			int instanceID2 = ((Object)texture).GetInstanceID();
			long key = ((long)instanceID << 32) | (uint)instanceID2;
			if (s_FallbackMaterials.TryGetValue(key, out var value))
			{
				return value;
			}
			if (sourceMaterial.HasProperty(ShaderUtilities.ID_GradientScale) && targetMaterial.HasProperty(ShaderUtilities.ID_GradientScale))
			{
				value = new Material(sourceMaterial);
				((Object)value).hideFlags = (HideFlags)61;
				value.SetTexture(ShaderUtilities.ID_MainTex, texture);
				value.SetFloat(ShaderUtilities.ID_GradientScale, targetMaterial.GetFloat(ShaderUtilities.ID_GradientScale));
				value.SetFloat(ShaderUtilities.ID_TextureWidth, targetMaterial.GetFloat(ShaderUtilities.ID_TextureWidth));
				value.SetFloat(ShaderUtilities.ID_TextureHeight, targetMaterial.GetFloat(ShaderUtilities.ID_TextureHeight));
				value.SetFloat(ShaderUtilities.ID_WeightNormal, targetMaterial.GetFloat(ShaderUtilities.ID_WeightNormal));
				value.SetFloat(ShaderUtilities.ID_WeightBold, targetMaterial.GetFloat(ShaderUtilities.ID_WeightBold));
			}
			else
			{
				value = new Material(targetMaterial);
			}
			s_FallbackMaterials.Add(key, value);
			return value;
		}
	}
	internal struct MaterialReference
	{
		public int index;

		public FontAsset fontAsset;

		public TextSpriteAsset spriteAsset;

		public Material material;

		public bool isDefaultMaterial;

		public bool isFallbackMaterial;

		public Material fallbackMaterial;

		public float padding;

		public int referenceCount;

		public MaterialReference(int index, FontAsset fontAsset, TextSpriteAsset spriteAsset, Material material, float padding)
		{
			this.index = index;
			this.fontAsset = fontAsset;
			this.spriteAsset = spriteAsset;
			this.material = material;
			isDefaultMaterial = ((Object)material).GetInstanceID() == ((Object)fontAsset.material).GetInstanceID();
			isFallbackMaterial = false;
			fallbackMaterial = null;
			this.padding = padding;
			referenceCount = 0;
		}

		public static bool Contains(MaterialReference[] materialReferences, FontAsset fontAsset)
		{
			int instanceID = ((Object)fontAsset).GetInstanceID();
			for (int i = 0; i < materialReferences.Length && (Object)(object)materialReferences[i].fontAsset != (Object)null; i++)
			{
				if (((Object)materialReferences[i].fontAsset).GetInstanceID() == instanceID)
				{
					return true;
				}
			}
			return false;
		}

		public static int AddMaterialReference(Material material, FontAsset fontAsset, MaterialReference[] materialReferences, Dictionary<int, int> materialReferenceIndexLookup)
		{
			int instanceID = ((Object)material).GetInstanceID();
			if (materialReferenceIndexLookup.TryGetValue(instanceID, out var value))
			{
				return value;
			}
			value = (materialReferenceIndexLookup[instanceID] = materialReferenceIndexLookup.Count);
			materialReferences[value].index = value;
			materialReferences[value].fontAsset = fontAsset;
			materialReferences[value].spriteAsset = null;
			materialReferences[value].material = material;
			materialReferences[value].isDefaultMaterial = instanceID == ((Object)fontAsset.material).GetInstanceID();
			materialReferences[value].referenceCount = 0;
			return value;
		}

		public static int AddMaterialReference(Material material, TextSpriteAsset spriteAsset, MaterialReference[] materialReferences, Dictionary<int, int> materialReferenceIndexLookup)
		{
			int instanceID = ((Object)material).GetInstanceID();
			if (materialReferenceIndexLookup.TryGetValue(instanceID, out var value))
			{
				return value;
			}
			value = (materialReferenceIndexLookup[instanceID] = materialReferenceIndexLookup.Count);
			materialReferences[value].index = value;
			materialReferences[value].fontAsset = materialReferences[0].fontAsset;
			materialReferences[value].spriteAsset = spriteAsset;
			materialReferences[value].material = material;
			materialReferences[value].isDefaultMaterial = true;
			materialReferences[value].referenceCount = 0;
			return value;
		}
	}
	internal class MaterialReferenceManager
	{
		private static MaterialReferenceManager s_Instance;

		private Dictionary<int, Material> m_FontMaterialReferenceLookup = new Dictionary<int, Material>();

		private Dictionary<int, FontAsset> m_FontAssetReferenceLookup = new Dictionary<int, FontAsset>();

		private Dictionary<int, TextSpriteAsset> m_SpriteAssetReferenceLookup = new Dictionary<int, TextSpriteAsset>();

		private Dictionary<int, TextGradientPreset> m_ColorGradientReferenceLookup = new Dictionary<int, TextGradientPreset>();

		public static MaterialReferenceManager instance
		{
			get
			{
				if (s_Instance == null)
				{
					s_Instance = new MaterialReferenceManager();
				}
				return s_Instance;
			}
		}

		public static void AddFontAsset(FontAsset fontAsset)
		{
			instance.AddFontAssetInternal(fontAsset);
		}

		private void AddFontAssetInternal(FontAsset fontAsset)
		{
			if (!m_FontAssetReferenceLookup.ContainsKey(fontAsset.hashCode))
			{
				m_FontAssetReferenceLookup.Add(fontAsset.hashCode, fontAsset);
				m_FontMaterialReferenceLookup.Add(fontAsset.materialHashCode, fontAsset.material);
			}
		}

		public static void AddSpriteAsset(TextSpriteAsset spriteAsset)
		{
			instance.AddSpriteAssetInternal(spriteAsset);
		}

		private void AddSpriteAssetInternal(TextSpriteAsset spriteAsset)
		{
			if (!m_SpriteAssetReferenceLookup.ContainsKey(spriteAsset.hashCode))
			{
				m_SpriteAssetReferenceLookup.Add(spriteAsset.hashCode, spriteAsset);
				m_FontMaterialReferenceLookup.Add(spriteAsset.hashCode, spriteAsset.material);
			}
		}

		public static void AddSpriteAsset(int hashCode, TextSpriteAsset spriteAsset)
		{
			instance.AddSpriteAssetInternal(hashCode, spriteAsset);
		}

		private void AddSpriteAssetInternal(int hashCode, TextSpriteAsset spriteAsset)
		{
			if (!m_SpriteAssetReferenceLookup.ContainsKey(hashCode))
			{
				m_SpriteAssetReferenceLookup.Add(hashCode, spriteAsset);
				m_FontMaterialReferenceLookup.Add(hashCode, spriteAsset.material);
				if (spriteAsset.hashCode == 0)
				{
					spriteAsset.hashCode = hashCode;
				}
			}
		}

		public static void AddFontMaterial(int hashCode, Material material)
		{
			instance.AddFontMaterialInternal(hashCode, material);
		}

		private void AddFontMaterialInternal(int hashCode, Material material)
		{
			m_FontMaterialReferenceLookup.Add(hashCode, material);
		}

		public static void AddColorGradientPreset(int hashCode, TextGradientPreset spriteAsset)
		{
			instance.AddColorGradientPreset_Internal(hashCode, spriteAsset);
		}

		private void AddColorGradientPreset_Internal(int hashCode, TextGradientPreset spriteAsset)
		{
			if (!m_ColorGradientReferenceLookup.ContainsKey(hashCode))
			{
				m_ColorGradientReferenceLookup.Add(hashCode, spriteAsset);
			}
		}

		public bool Contains(FontAsset font)
		{
			if (m_FontAssetReferenceLookup.ContainsKey(font.hashCode))
			{
				return true;
			}
			return false;
		}

		public bool Contains(TextSpriteAsset sprite)
		{
			if (m_FontAssetReferenceLookup.ContainsKey(sprite.hashCode))
			{
				return true;
			}
			return false;
		}

		public static bool TryGetFontAsset(int hashCode, out FontAsset fontAsset)
		{
			return instance.TryGetFontAssetInternal(hashCode, out fontAsset);
		}

		private bool TryGetFontAssetInternal(int hashCode, out FontAsset fontAsset)
		{
			fontAsset = null;
			if (m_FontAssetReferenceLookup.TryGetValue(hashCode, out fontAsset))
			{
				return true;
			}
			return false;
		}

		public static bool TryGetSpriteAsset(int hashCode, out TextSpriteAsset spriteAsset)
		{
			return instance.TryGetSpriteAssetInternal(hashCode, out spriteAsset);
		}

		private bool TryGetSpriteAssetInternal(int hashCode, out TextSpriteAsset spriteAsset)
		{
			spriteAsset = null;
			if (m_SpriteAssetReferenceLookup.TryGetValue(hashCode, out spriteAsset))
			{
				return true;
			}
			return false;
		}

		public static bool TryGetColorGradientPreset(int hashCode, out TextGradientPreset gradientPreset)
		{
			return instance.TryGetColorGradientPresetInternal(hashCode, out gradientPreset);
		}

		private bool TryGetColorGradientPresetInternal(int hashCode, out TextGradientPreset gradientPreset)
		{
			gradientPreset = null;
			if (m_ColorGradientReferenceLookup.TryGetValue(hashCode, out gradientPreset))
			{
				return true;
			}
			return false;
		}

		public static bool TryGetMaterial(int hashCode, out Material material)
		{
			return instance.TryGetMaterialInternal(hashCode, out material);
		}

		private bool TryGetMaterialInternal(int hashCode, out Material material)
		{
			material = null;
			if (m_FontMaterialReferenceLookup.TryGetValue(hashCode, out material))
			{
				return true;
			}
			return false;
		}
	}
	internal enum VertexSortingOrder
	{
		Normal,
		Reverse
	}
	[VisibleToOtherModules(new string[] { "UnityEngine.UIElementsModule" })]
	internal struct MeshInfo
	{
		private static readonly Color32 k_DefaultColor = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue);

		public int vertexCount;

		public Vector3[] vertices;

		public Vector2[] uvs0;

		public Vector2[] uvs2;

		public Color32[] colors32;

		public int[] triangles;

		public Material material;

		public MeshInfo(int size)
		{
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			material = null;
			size = Mathf.Min(size, 16383);
			int num = size * 4;
			int num2 = size * 6;
			vertexCount = 0;
			vertices = (Vector3[])(object)new Vector3[num];
			uvs0 = (Vector2[])(object)new Vector2[num];
			uvs2 = (Vector2[])(object)new Vector2[num];
			colors32 = (Color32[])(object)new Color32[num];
			triangles = new int[num2];
			int num3 = 0;
			int num4 = 0;
			while (num4 / 4 < size)
			{
				for (int i = 0; i < 4; i++)
				{
					ref Vector3 reference = ref vertices[num4 + i];
					reference = Vector3.zero;
					ref Vector2 reference2 = ref uvs0[num4 + i];
					reference2 = Vector2.zero;
					ref Vector2 reference3 = ref uvs2[num4 + i];
					reference3 = Vector2.zero;
					ref Color32 reference4 = ref colors32[num4 + i];
					reference4 = k_DefaultColor;
				}
				triangles[num3] = num4;
				triangles[num3 + 1] = num4 + 1;
				triangles[num3 + 2] = num4 + 2;
				triangles[num3 + 3] = num4 + 2;
				triangles[num3 + 4] = num4 + 3;
				triangles[num3 + 5] = num4;
				num4 += 4;
				num3 += 6;
			}
		}

		internal void ResizeMeshInfo(int size)
		{
			size = Mathf.Min(size, 16383);
			int newSize = size * 4;
			int newSize2 = size * 6;
			int num = vertices.Length / 4;
			Array.Resize(ref vertices, newSize);
			Array.Resize(ref uvs0, newSize);
			Array.Resize(ref uvs2, newSize);
			Array.Resize(ref colors32, newSize);
			Array.Resize(ref triangles, newSize2);
			for (int i = num; i < size; i++)
			{
				int num2 = i * 4;
				int num3 = i * 6;
				triangles[num3] = num2;
				triangles[1 + num3] = 1 + num2;
				triangles[2 + num3] = 2 + num2;
				triangles[3 + num3] = 2 + num2;
				triangles[4 + num3] = 3 + num2;
				triangles[5 + num3] = num2;
			}
		}

		internal void Clear(bool uploadChanges)
		{
			if (vertices != null)
			{
				Array.Clear(vertices, 0, vertices.Length);
				vertexCount = 0;
			}
		}

		internal void ClearUnusedVertices()
		{
			int num = vertices.Length - vertexCount;
			if (num > 0)
			{
				Array.Clear(vertices, vertexCount, num);
			}
		}

		internal void ClearUnusedVertices(int startIndex)
		{
			int num = vertices.Length - startIndex;
			if (num > 0)
			{
				Array.Clear(vertices, startIndex, num);
			}
		}

		internal void SortGeometry(VertexSortingOrder order)
		{
			if (order == VertexSortingOrder.Normal || order != VertexSortingOrder.Reverse)
			{
				return;
			}
			int num = vertexCount / 4;
			for (int i = 0; i < num; i++)
			{
				int num2 = i * 4;
				int num3 = (num - i - 1) * 4;
				if (num2 < num3)
				{
					SwapVertexData(num2, num3);
				}
			}
		}

		internal void SwapVertexData(int src, int dst)
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_0141: Unknown result type (might be due to invalid IL or missing references)
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_015f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0164: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_0189: Unknown result type (might be due to invalid IL or missing references)
			//IL_018e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0211: Unknown result type (might be due to invalid IL or missing references)
			//IL_0212: Unknown result type (might be due to invalid IL or missing references)
			//IL_0225: Unknown result type (might be due to invalid IL or missing references)
			//IL_022a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0247: Unknown result type (might be due to invalid IL or missing references)
			//IL_024c: Unknown result type (might be due to invalid IL or missing references)
			//IL_025f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0260: Unknown result type (might be due to invalid IL or missing references)
			//IL_0271: Unknown result type (might be due to invalid IL or missing references)
			//IL_0276: Unknown result type (might be due to invalid IL or missing references)
			//IL_028f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0294: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02be: Unknown result type (might be due to invalid IL or missing references)
			//IL_02db: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0307: Unknown result type (might be due to invalid IL or missing references)
			//IL_030c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0329: Unknown result type (might be due to invalid IL or missing references)
			//IL_032e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0341: Unknown result type (might be due to invalid IL or missing references)
			//IL_0342: Unknown result type (might be due to invalid IL or missing references)
			//IL_0355: Unknown result type (might be due to invalid IL or missing references)
			//IL_035a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0377: Unknown result type (might be due to invalid IL or missing references)
			//IL_037c: Unknown result type (might be due to invalid IL or missing references)
			//IL_038f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0390: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_040e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0413: Unknown result type (might be due to invalid IL or missing references)
			//IL_0426: Unknown result type (might be due to invalid IL or missing references)
			//IL_0428: Unknown result type (might be due to invalid IL or missing references)
			//IL_043b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0440: Unknown result type (might be due to invalid IL or missing references)
			//IL_045e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0463: Unknown result type (might be due to invalid IL or missing references)
			//IL_0476: Unknown result type (might be due to invalid IL or missing references)
			//IL_0478: Unknown result type (might be due to invalid IL or missing references)
			//IL_048b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0490: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c8: Unknown result type (might be due to invalid IL or missing references)
			Vector3 val = vertices[dst];
			ref Vector3 reference = ref vertices[dst];
			reference = vertices[src];
			vertices[src] = val;
			val = vertices[dst + 1];
			ref Vector3 reference2 = ref vertices[dst + 1];
			reference2 = vertices[src + 1];
			vertices[src + 1] = val;
			val = vertices[dst + 2];
			ref Vector3 reference3 = ref vertices[dst + 2];
			reference3 = vertices[src + 2];
			vertices[src + 2] = val;
			val = vertices[dst + 3];
			ref Vector3 reference4 = ref vertices[dst + 3];
			reference4 = vertices[src + 3];
			vertices[src + 3] = val;
			Vector2 val2 = uvs0[dst];
			ref Vector2 reference5 = ref uvs0[dst];
			reference5 = uvs0[src];
			uvs0[src] = val2;
			val2 = uvs0[dst + 1];
			ref Vector2 reference6 = ref uvs0[dst + 1];
			reference6 = uvs0[src + 1];
			uvs0[src + 1] = val2;
			val2 = uvs0[dst + 2];
			ref Vector2 reference7 = ref uvs0[dst + 2];
			reference7 = uvs0[src + 2];
			uvs0[src + 2] = val2;
			val2 = uvs0[dst + 3];
			ref Vector2 reference8 = ref uvs0[dst + 3];
			reference8 = uvs0[src + 3];
			uvs0[src + 3] = val2;
			val2 = uvs2[dst];
			ref Vector2 reference9 = ref uvs2[dst];
			reference9 = uvs2[src];
			uvs2[src] = val2;
			val2 = uvs2[dst + 1];
			ref Vector2 reference10 = ref uvs2[dst + 1];
			reference10 = uvs2[src + 1];
			uvs2[src + 1] = val2;
			val2 = uvs2[dst + 2];
			ref Vector2 reference11 = ref uvs2[dst + 2];
			reference11 = uvs2[src + 2];
			uvs2[src + 2] = val2;
			val2 = uvs2[dst + 3];
			ref Vector2 reference12 = ref uvs2[dst + 3];
			reference12 = uvs2[src + 3];
			uvs2[src + 3] = val2;
			Color32 val3 = colors32[dst];
			ref Color32 reference13 = ref colors32[dst];
			reference13 = colors32[src];
			colors32[src] = val3;
			val3 = colors32[dst + 1];
			ref Color32 reference14 = ref colors32[dst + 1];
			reference14 = colors32[src + 1];
			colors32[src + 1] = val3;
			val3 = colors32[dst + 2];
			ref Color32 reference15 = ref colors32[dst + 2];
			reference15 = colors32[src + 2];
			colors32[src + 2] = val3;
			val3 = colors32[dst + 3];
			ref Color32 reference16 = ref colors32[dst + 3];
			reference16 = colors32[src + 3];
			colors32[src + 3] = val3;
		}
	}
}
namespace UnityEngine.TextCore.LowLevel
{
	internal enum OTFLayoutTableType
	{
		BASE = 0x1000,
		GDEF = 0x2000,
		GPOS = 0x4000,
		GSUB = 0x8000,
		JSTF = 0x10000,
		MATH = 0x20000
	}
	internal enum OTFLookupTableType
	{
		Single_Adjustment = 16385,
		Pair_Adjustment = 16386,
		Cursive_Attachment = 16387,
		Mark_to_Base_Attachment = 16388,
		Mark_to_Ligature_Attachment = 16389,
		Mark_to_Mark_Attachment = 16390,
		Contextual_Positioning = 16391,
		Chaining_Contextual_Positioning = 16392,
		Extension_Positioning = 16393,
		Single_Substitution = 32769,
		Multiple_Substitution = 32770,
		Alternate_Substitution = 32771,
		Ligature_Substitution = 32772,
		Contextual_Substitution = 32773,
		Chaining_Contextual_Substitution = 32774,
		Extension_Substitution = 32775,
		Reverse_Chaining_Contextual_Single_Substitution = 32776
	}
	[Serializable]
	[UsedByNativeCode]
	internal struct GlyphValueRecord
	{
		[NativeName("xPlacement")]
		[SerializeField]
		private float m_XPlacement;

		[NativeName("yPlacement")]
		[SerializeField]
		private float m_YPlacement;

		[NativeName("xAdvance")]
		[SerializeField]
		private float m_XAdvance;

		[SerializeField]
		[NativeName("yAdvance")]
		private float m_YAdvance;

		public float xPlacement
		{
			get
			{
				return m_XPlacement;
			}
			set
			{
				m_XPlacement = value;
			}
		}

		public float yPlacement
		{
			get
			{
				return m_YPlacement;
			}
			set
			{
				m_YPlacement = value;
			}
		}

		public float xAdvance
		{
			get
			{
				return m_XAdvance;
			}
			set
			{
				m_XAdvance = value;
			}
		}

		public float yAdvance
		{
			get
			{
				return m_YAdvance;
			}
			set
			{
				m_YAdvance = value;
			}
		}

		public GlyphValueRecord(float xPlacement, float yPlacement, float xAdvance, float yAdvance)
		{
			m_XPlacement = xPlacement;
			m_YPlacement = yPlacement;
			m_XAdvance = xAdvance;
			m_YAdvance = yAdvance;
		}

		public static GlyphValueRecord operator +(GlyphValueRecord a, GlyphValueRecord b)
		{
			GlyphValueRecord result = default(GlyphValueRecord);
			result.m_XPlacement = a.xPlacement + b.xPlacement;
			result.m_YPlacement = a.yPlacement + b.yPlacement;
			result.m_XAdvance = a.xAdvance + b.xAdvance;
			result.m_YAdvance = a.yAdvance + b.yAdvance;
			return result;
		}
	}
	[Serializable]
	[UsedByNativeCode]
	internal struct GlyphAdjustmentRecord
	{
		[SerializeField]
		[NativeName("glyphIndex")]
		private uint m_GlyphIndex;

		[SerializeField]
		[NativeName("glyphValueRecord")]
		private GlyphValueRecord m_GlyphValueRecord;

		public uint glyphIndex
		{
			get
			{
				return m_GlyphIndex;
			}
			set
			{
				m_GlyphIndex = value;
			}
		}

		public GlyphValueRecord glyphValueRecord
		{
			get
			{
				return m_GlyphValueRecord;
			}
			set
			{
				m_GlyphValueRecord = value;
			}
		}

		public GlyphAdjustmentRecord(uint glyphIndex, GlyphValueRecord glyphValueRecord)
		{
			m_GlyphIndex = glyphIndex;
			m_GlyphValueRecord = glyphValueRecord;
		}
	}
	[Serializable]
	[UsedByNativeCode]
	internal struct GlyphPairAdjustmentRecord
	{
		[SerializeField]
		[NativeName("firstAdjustmentRecord")]
		private GlyphAdjustmentRecord m_FirstAdjustmentRecord;

		[NativeName("secondAdjustmentRecord")]
		[SerializeField]
		private GlyphAdjustmentRecord m_SecondAdjustmentRecord;

		public GlyphAdjustmentRecord firstAdjustmentRecord
		{
			get
			{
				return m_FirstAdjustmentRecord;
			}
			set
			{
				m_FirstAdjustmentRecord = value;
			}
		}

		public GlyphAdjustmentRecord secondAdjustmentRecord
		{
			get
			{
				return m_SecondAdjustmentRecord;
			}
			set
			{
				m_SecondAdjustmentRecord = value;
			}
		}

		public GlyphPairAdjustmentRecord(GlyphAdjustmentRecord firstAdjustmentRecord, GlyphAdjustmentRecord secondAdjustmentRecord)
		{
			m_FirstAdjustmentRecord = firstAdjustmentRecord;
			m_SecondAdjustmentRecord = secondAdjustmentRecord;
		}
	}
}
namespace UnityEngine.TextCore
{
	internal enum TagHashCode
	{
		BOLD = 66,
		SLASH_BOLD = 1613,
		ITALIC = 73,
		SLASH_ITALIC = 1606,
		UNDERLINE = 85,
		SLASH_UNDERLINE = 1626,
		STRIKETHROUGH = 83,
		SLASH_STRIKETHROUGH = 1628,
		MARK = 2699125,
		SLASH_MARK = 57644506,
		SUBSCRIPT = 92132,
		SLASH_SUBSCRIPT = 1770219,
		SUPERSCRIPT = 92150,
		SLASH_SUPERSCRIPT = 1770233,
		COLOR = 81999901,
		SLASH_COLOR = 1909026194,
		ALPHA = 75165780,
		A = 65,
		SLASH_A = 1614,
		SIZE = 3061285,
		SLASH_SIZE = 58429962,
		SPRITE = -991527447,
		BR = 2256,
		NO_BREAK = 2856657,
		SLASH_NO_BREAK = 57477502,
		STYLE = 100252951,
		SLASH_STYLE = 1927738392,
		FONT = 2586451,
		SLASH_FONT = 57747708,
		SLASH_MATERIAL = -1100708252,
		LINK = 2656128,
		SLASH_LINK = 57686191,
		FONT_WEIGHT = -1889896162,
		SLASH_FONT_WEIGHT = -757976431,
		NO_PARSE = -408011596,
		SLASH_NO_PARSE = -294095813,
		POSITION = 85420,
		SLASH_POSITION = 1777699,
		VERTICAL_OFFSET = 1952379995,
		SLASH_VERTICAL_OFFSET = -11107948,
		SPACE = 100083556,
		SLASH_SPACE = 1927873067,
		PAGE = 2808691,
		SLASH_PAGE = 58683868,
		ALIGN = 75138797,
		SLASH_ALIGN = 1916026786,
		WIDTH = 105793766,
		SLASH_WIDTH = 1923459625,
		GRADIENT = -1999759898,
		SLASH_GRADIENT = -1854491959,
		CHARACTER_SPACE = -1584382009,
		SLASH_CHARACTER_SPACE = -1394426712,
		MONOSPACE = -1340221943,
		SLASH_MONOSPACE = -1638865562,
		CLASS = 82115566,
		INDENT = -1514123076,
		SLASH_INDENT = -1496889389,
		LINE_INDENT = -844305121,
		SLASH_LINE_INDENT = 93886352,
		MARGIN = -1355614050,
		SLASH_MARGIN = -1649644303,
		MARGIN_LEFT = -272933656,
		MARGIN_RIGHT = -447416589,
		LINE_HEIGHT = -799081892,
		SLASH_LINE_HEIGHT = 200452819,
		ACTION = -1827519330,
		SLASH_ACTION = -1187217679,
		SCALE = 100553336,
		SLASH_SCALE = 1928413879,
		ROTATE = -1000007783,
		SLASH_ROTATE = -764695562,
		LOWERCASE = -1506899689,
		SLASH_LOWERCASE = -1451284584,
		ALLCAPS = 218273952,
		SLASH_ALLCAPS = -797437649,
		UPPERCASE = -305409418,
		SLASH_UPPERCASE = -582368199,
		SMALLCAPS = -766062114,
		SLASH_SMALLCAPS = 199921873,
		LIGA = 2655971,
		SLASH_LIGA = 57686604,
		FRAC = 2598518,
		SLASH_FRAC = 57774681,
		NAME = 2875623,
		INDEX = 84268030,
		TINT = 2960519,
		ANIM = 2283339,
		MATERIAL = 825491659,
		HREF = 2535353,
		RED = 91635,
		GREEN = 87065851,
		BLUE = 2457214,
		YELLOW = -882444668,
		ORANGE = -1108587920,
		BLACK = 81074727,
		WHITE = 105680263,
		PURPLE = -1250222130,
		LEFT = 2660507,
		RIGHT = 99937376,
		CENTER = -1591113269,
		JUSTIFIED = 817091359,
		FLUSH = 85552164,
		PLUS = 43,
		MINUS = 45,
		PX = 2568,
		PLUS_PX = 49507,
		MINUS_PX = 47461,
		EM = 2216,
		PLUS_EM = 49091,
		MINUS_EM = 46789,
		PCT = 85031,
		PLUS_PCT = 1634348,
		MINUS_PCT = 1567082,
		PERCENTAGE = 37,
		PLUS_PERCENTAGE = 1454,
		MINUS_PERCENTAGE = 1512,
		TRUE = 2932022,
		FALSE = 85422813,
		DEFAULT = -620974005
	}
	internal enum TagValueType
	{
		None = 0,
		NumericalValue = 1,
		StringValue = 2,
		ColorValue = 4
	}
	internal enum TagUnitType
	{
		Pixels,
		FontUnits,
		Percentage
	}
	internal enum Unicode : uint
	{
		SPACE = 32u,
		DOUBLE_QUOTE = 34u,
		NUMBER_SIGN = 35u,
		PERCENTAGE = 37u,
		PLUS = 43u,
		MINUS = 45u,
		PERIOD = 46u,
		HYPHEN_MINUS = 45u,
		SOFT_HYPHEN = 173u,
		HYPHEN = 8208u,
		NON_BREAKING_HYPHEN = 8209u,
		ZERO_WIDTH_SPACE = 8203u,
		RIGHT_SINGLE_QUOTATION = 8217u,
		APOSTROPHE = 39u,
		WORD_JOINER = 8288u
	}
	internal static class ShaderUtilities
	{
		public static int ID_MainTex;

		public static int ID_FaceTex;

		public static int ID_FaceColor;

		public static int ID_FaceDilate;

		public static int ID_Shininess;

		public static int ID_UnderlayColor;

		public static int ID_UnderlayOffsetX;

		public static int ID_UnderlayOffsetY;

		public static int ID_UnderlayDilate;

		public static int ID_UnderlaySoftness;

		public static int ID_WeightNormal;

		public static int ID_WeightBold;

		public static int ID_OutlineTex;

		public static int ID_OutlineWidth;

		public static int ID_OutlineSoftness;

		public static int ID_OutlineColor;

		public static int ID_GradientScale;

		public static int ID_ScaleX;

		public static int ID_ScaleY;

		public static int ID_PerspectiveFilter;

		public static int ID_TextureWidth;

		public static int ID_TextureHeight;

		public static int ID_BevelAmount;

		public static int ID_GlowColor;

		public static int ID_GlowOffset;

		public static int ID_GlowPower;

		public static int ID_GlowOuter;

		public static int ID_LightAngle;

		public static int ID_EnvMap;

		public static int ID_EnvMatrix;

		public static int ID_EnvMatrixRotation;

		public static int ID_MaskCoord;

		public static int ID_ClipRect;

		public static int ID_MaskSoftnessX;

		public static int ID_MaskSoftnessY;

		public static int ID_VertexOffsetX;

		public static int ID_VertexOffsetY;

		public static int ID_UseClipRect;

		public static int ID_StencilID;

		public static int ID_StencilOp;

		public static int ID_StencilComp;

		public static int ID_StencilReadMask;

		public static int ID_StencilWriteMask;

		public static int ID_ShaderFlags;

		public static int ID_ScaleRatio_A;

		public static int ID_ScaleRatio_B;

		public static int ID_ScaleRatio_C;

		public static string Keyword_Bevel;

		public static string Keyword_Glow;

		public static string Keyword_Underlay;

		public static string Keyword_Ratios;

		public static string Keyword_MASK_SOFT;

		public static string Keyword_MASK_HARD;

		public static string Keyword_MASK_TEX;

		public static string Keyword_Outline;

		public static string ShaderTag_ZTestMode;

		public static string ShaderTag_CullMode;

		private static float m_clamp;

		public static bool isInitialized;

		private static Shader k_ShaderRef_MobileSDF;

		private static Shader k_ShaderRef_MobileBitmap;

		internal static Shader ShaderRef_MobileSDF
		{
			get
			{
				if ((Object)(object)k_ShaderRef_MobileSDF == (Object)null)
				{
					k_ShaderRef_MobileSDF = Shader.Find("Hidden/TextCore/Distance Field SSD");
				}
				return k_ShaderRef_MobileSDF;
			}
		}

		internal static Shader ShaderRef_MobileBitmap
		{
			get
			{
				if ((Object)(object)k_ShaderRef_MobileBitmap == (Object)null)
				{
					k_ShaderRef_MobileBitmap = Shader.Find("Hidden/Internal-GUITextureClipText");
				}
				return k_ShaderRef_MobileBitmap;
			}
		}

		static ShaderUtilities()
		{
			Keyword_Bevel = "BEVEL_ON";
			Keyword_Glow = "GLOW_ON";
			Keyword_Underlay = "UNDERLAY_ON";
			Keyword_Ratios = "RATIOS_OFF";
			Keyword_MASK_SOFT = "MASK_SOFT";
			Keyword_MASK_HARD = "MASK_HARD";
			Keyword_MASK_TEX = "MASK_TEX";
			Keyword_Outline = "OUTLINE_ON";
			ShaderTag_ZTestMode = "unity_GUIZTestMode";
			ShaderTag_CullMode = "_CullMode";
			m_clamp = 1f;
			GetShaderPropertyIDs();
		}

		public static void GetShaderPropertyIDs()
		{
			if (!isInitialized)
			{
				isInitialized = true;
				ID_MainTex = Shader.PropertyToID("_MainTex");
				ID_FaceTex = Shader.PropertyToID("_FaceTex");
				ID_FaceColor = Shader.PropertyToID("_FaceColor");
				ID_FaceDilate = Shader.PropertyToID("_FaceDilate");
				ID_Shininess = Shader.PropertyToID("_FaceShininess");
				ID_UnderlayColor = Shader.PropertyToID("_UnderlayColor");
				ID_UnderlayOffsetX = Shader.PropertyToID("_UnderlayOffsetX");
				ID_UnderlayOffsetY = Shader.PropertyToID("_UnderlayOffsetY");
				ID_UnderlayDilate = Shader.PropertyToID("_UnderlayDilate");
				ID_UnderlaySoftness = Shader.PropertyToID("_UnderlaySoftness");
				ID_WeightNormal = Shader.PropertyToID("_WeightNormal");
				ID_WeightBold = Shader.PropertyToID("_WeightBold");
				ID_OutlineTex = Shader.PropertyToID("_OutlineTex");
				ID_OutlineWidth = Shader.PropertyToID("_OutlineWidth");
				ID_OutlineSoftness = Shader.PropertyToID("_OutlineSoftness");
				ID_OutlineColor = Shader.PropertyToID("_OutlineColor");
				ID_GradientScale = Shader.PropertyToID("_GradientScale");
				ID_ScaleX = Shader.PropertyToID("_ScaleX");
				ID_ScaleY = Shader.PropertyToID("_ScaleY");
				ID_PerspectiveFilter = Shader.PropertyToID("_PerspectiveFilter");
				ID_TextureWidth = Shader.PropertyToID("_TextureWidth");
				ID_TextureHeight = Shader.PropertyToID("_TextureHeight");
				ID_BevelAmount = Shader.PropertyToID("_Bevel");
				ID_LightAngle = Shader.PropertyToID("_LightAngle");
				ID_EnvMap = Shader.PropertyToID("_Cube");
				ID_EnvMatrix = Shader.PropertyToID("_EnvMatrix");
				ID_EnvMatrixRotation = Shader.PropertyToID("_EnvMatrixRotation");
				ID_GlowColor = Shader.PropertyToID("_GlowColor");
				ID_GlowOffset = Shader.PropertyToID("_GlowOffset");
				ID_GlowPower = Shader.PropertyToID("_GlowPower");
				ID_GlowOuter = Shader.PropertyToID("_GlowOuter");
				ID_MaskCoord = Shader.PropertyToID("_MaskCoord");
				ID_ClipRect = Shader.PropertyToID("_ClipRect");
				ID_UseClipRect = Shader.PropertyToID("_UseClipRect");
				ID_MaskSoftnessX = Shader.PropertyToID("_MaskSoftnessX");
				ID_MaskSoftnessY = Shader.PropertyToID("_MaskSoftnessY");
				ID_VertexOffsetX = Shader.PropertyToID("_VertexOffsetX");
				ID_VertexOffsetY = Shader.PropertyToID("_VertexOffsetY");
				ID_StencilID = Shader.PropertyToID("_Stencil");
				ID_StencilOp = Shader.PropertyToID("_StencilOp");
				ID_StencilComp = Shader.PropertyToID("_StencilComp");
				ID_StencilReadMask = Shader.PropertyToID("_StencilReadMask");
				ID_StencilWriteMask = Shader.PropertyToID("_StencilWriteMask");
				ID_ShaderFlags = Shader.PropertyToID("_ShaderFlags");
				ID_ScaleRatio_A = Shader.PropertyToID("_ScaleRatioA");
				ID_ScaleRatio_B = Shader.PropertyToID("_ScaleRatioB");
				ID_ScaleRatio_C = Shader.PropertyToID("_ScaleRatioC");
			}
		}

		public static void UpdateShaderRatios(Material mat)
		{
			bool flag = !mat.shaderKeywords.Contains(Keyword_Ratios);
			float @float = mat.GetFloat(ID_GradientScale);
			float float2 = mat.GetFloat(ID_FaceDilate);
			float float3 = mat.GetFloat(ID_OutlineWidth);
			float float4 = mat.GetFloat(ID_OutlineSoftness);
			float num = Mathf.Max(mat.GetFloat(ID_WeightNormal), mat.GetFloat(ID_WeightBold)) / 4f;
			float num2 = Mathf.Max(1f, num + float2 + float3 + float4);
			float num3 = ((!flag) ? 1f : ((@float - m_clamp) / (@float * num2)));
			mat.SetFloat(ID_ScaleRatio_A, num3);
			if (mat.HasProperty(ID_GlowOffset))
			{
				float float5 = mat.GetFloat(ID_GlowOffset);
				float float6 = mat.GetFloat(ID_GlowOuter);
				float num4 = (num + float2) * (@float - m_clamp);
				num2 = Mathf.Max(1f, float5 + float6);
				float num5 = ((!flag) ? 1f : (Mathf.Max(0f, @float - m_clamp - num4) / (@float * num2)));
				mat.SetFloat(ID_ScaleRatio_B, num5);
			}
			if (mat.HasProperty(ID_UnderlayOffsetX))
			{
				float float7 = mat.GetFloat(ID_UnderlayOffsetX);
				float float8 = mat.GetFloat(ID_UnderlayOffsetY);
				float float9 = mat.GetFloat(ID_UnderlayDilate);
				float float10 = mat.GetFloat(ID_UnderlaySoftness);
				float num6 = (num + float2) * (@float - m_clamp);
				num2 = Mathf.Max(1f, Mathf.Max(Mathf.Abs(float7), Mathf.Abs(float8)) + float9 + float10);
				float num7 = ((!flag) ? 1f : (Mathf.Max(0f, @float - m_clamp - num6) / (@float * num2)));
				mat.SetFloat(ID_ScaleRatio_C, num7);
			}
		}

		public static bool IsMaskingEnabled(Material material)
		{
			if ((Object)(object)material == (Object)null || !material.HasProperty(ID_ClipRect))
			{
				return false;
			}
			if (material.shaderKeywords.Contains(Keyword_MASK_SOFT) || material.shaderKeywords.Contains(Keyword_MASK_HARD) || material.shaderKeywords.Contains(Keyword_MASK_TEX))
			{
				return true;
			}
			return false;
		}

		public static float GetPadding(Material material, bool enableExtraPadding, bool isBold)
		{
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0444: Unknown result type (might be due to invalid IL or

Room Architect Tool_Data/Managed/UnityEngine.TextRenderingModule.dll

Decompiled 3 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;
using UnityEngine.Internal;
using UnityEngine.Scripting;

[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: UnityEngineModuleAssembly]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine;

public enum FontStyle
{
	Normal,
	Bold,
	Italic,
	BoldAndItalic
}
[Flags]
internal enum TextGenerationError
{
	None = 0,
	CustomSizeOnNonDynamicFont = 1,
	CustomStyleOnNonDynamicFont = 2,
	NoFont = 4
}
public struct TextGenerationSettings
{
	public Font font;

	public Color color;

	public int fontSize;

	public float lineSpacing;

	public bool richText;

	public float scaleFactor;

	public FontStyle fontStyle;

	public TextAnchor textAnchor;

	public bool alignByGeometry;

	public bool resizeTextForBestFit;

	public int resizeTextMinSize;

	public int resizeTextMaxSize;

	public bool updateBounds;

	public VerticalWrapMode verticalOverflow;

	public HorizontalWrapMode horizontalOverflow;

	public Vector2 generationExtents;

	public Vector2 pivot;

	public bool generateOutOfBounds;

	private bool CompareColors(Color left, Color right)
	{
		return Mathf.Approximately(left.r, right.r) && Mathf.Approximately(left.g, right.g) && Mathf.Approximately(left.b, right.b) && Mathf.Approximately(left.a, right.a);
	}

	private bool CompareVector2(Vector2 left, Vector2 right)
	{
		return Mathf.Approximately(left.x, right.x) && Mathf.Approximately(left.y, right.y);
	}

	public bool Equals(TextGenerationSettings other)
	{
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0145: Unknown result type (might be due to invalid IL or missing references)
		//IL_014c: Unknown result type (might be due to invalid IL or missing references)
		//IL_015d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0164: Unknown result type (might be due to invalid IL or missing references)
		return CompareColors(color, other.color) && fontSize == other.fontSize && Mathf.Approximately(scaleFactor, other.scaleFactor) && resizeTextMinSize == other.resizeTextMinSize && resizeTextMaxSize == other.resizeTextMaxSize && Mathf.Approximately(lineSpacing, other.lineSpacing) && fontStyle == other.fontStyle && richText == other.richText && textAnchor == other.textAnchor && alignByGeometry == other.alignByGeometry && resizeTextForBestFit == other.resizeTextForBestFit && resizeTextMinSize == other.resizeTextMinSize && resizeTextMaxSize == other.resizeTextMaxSize && resizeTextForBestFit == other.resizeTextForBestFit && updateBounds == other.updateBounds && horizontalOverflow == other.horizontalOverflow && verticalOverflow == other.verticalOverflow && CompareVector2(generationExtents, other.generationExtents) && CompareVector2(pivot, other.pivot) && (Object)(object)font == (Object)(object)other.font;
	}
}
[StructLayout(LayoutKind.Sequential)]
[UsedByNativeCode]
[NativeHeader("Modules/TextRendering/TextGenerator.h")]
public sealed class TextGenerator : IDisposable
{
	internal IntPtr m_Ptr;

	private string m_LastString;

	private TextGenerationSettings m_LastSettings;

	private bool m_HasGenerated;

	private TextGenerationError m_LastValid;

	private readonly List<UIVertex> m_Verts;

	private readonly List<UICharInfo> m_Characters;

	private readonly List<UILineInfo> m_Lines;

	private bool m_CachedVerts;

	private bool m_CachedCharacters;

	private bool m_CachedLines;

	public int characterCountVisible
	{
		[CompilerGenerated]
		get
		{
			return characterCount - 1;
		}
	}

	public IList<UIVertex> verts
	{
		get
		{
			if (!m_CachedVerts)
			{
				GetVertices(m_Verts);
				m_CachedVerts = true;
			}
			return m_Verts;
		}
	}

	public IList<UICharInfo> characters
	{
		get
		{
			if (!m_CachedCharacters)
			{
				GetCharacters(m_Characters);
				m_CachedCharacters = true;
			}
			return m_Characters;
		}
	}

	public IList<UILineInfo> lines
	{
		get
		{
			if (!m_CachedLines)
			{
				GetLines(m_Lines);
				m_CachedLines = true;
			}
			return m_Lines;
		}
	}

	public Rect rectExtents
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_rectExtents_Injected(out var ret);
			return ret;
		}
	}

	public extern int vertexCount
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	public extern int characterCount
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	public extern int lineCount
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	[NativeProperty(/*Could not decode attribute arguments.*/)]
	public extern int fontSizeUsedForBestFit
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	public TextGenerator()
		: this(50)
	{
	}

	public TextGenerator(int initialCapacity)
	{
		m_Ptr = Internal_Create();
		m_Verts = new List<UIVertex>((initialCapacity + 1) * 4);
		m_Characters = new List<UICharInfo>(initialCapacity + 1);
		m_Lines = new List<UILineInfo>(20);
	}

	~TextGenerator()
	{
		((IDisposable)this).Dispose();
	}

	void IDisposable.Dispose()
	{
		if (m_Ptr != IntPtr.Zero)
		{
			Internal_Destroy(m_Ptr);
			m_Ptr = IntPtr.Zero;
		}
	}

	private TextGenerationSettings ValidatedSettings(TextGenerationSettings settings)
	{
		if ((Object)(object)settings.font != (Object)null && settings.font.dynamic)
		{
			return settings;
		}
		if (settings.fontSize != 0 || settings.fontStyle != 0)
		{
			if ((Object)(object)settings.font != (Object)null)
			{
				Debug.LogWarningFormat((Object)(object)settings.font, "Font size and style overrides are only supported for dynamic fonts. Font '{0}' is not dynamic.", new object[1] { ((Object)settings.font).name });
			}
			settings.fontSize = 0;
			settings.fontStyle = FontStyle.Normal;
		}
		if (settings.resizeTextForBestFit)
		{
			if ((Object)(object)settings.font != (Object)null)
			{
				Debug.LogWarningFormat((Object)(object)settings.font, "BestFit is only supported for dynamic fonts. Font '{0}' is not dynamic.", new object[1] { ((Object)settings.font).name });
			}
			settings.resizeTextForBestFit = false;
		}
		return settings;
	}

	public void Invalidate()
	{
		m_HasGenerated = false;
	}

	public void GetCharacters(List<UICharInfo> characters)
	{
		GetCharactersInternal(characters);
	}

	public void GetLines(List<UILineInfo> lines)
	{
		GetLinesInternal(lines);
	}

	public void GetVertices(List<UIVertex> vertices)
	{
		GetVerticesInternal(vertices);
	}

	public float GetPreferredWidth(string str, TextGenerationSettings settings)
	{
		//IL_0023: Unknown result type (might be due to invalid IL or missing references)
		//IL_0028: Unknown result type (might be due to invalid IL or missing references)
		settings.horizontalOverflow = HorizontalWrapMode.Overflow;
		settings.verticalOverflow = VerticalWrapMode.Overflow;
		settings.updateBounds = true;
		Populate(str, settings);
		Rect val = rectExtents;
		return ((Rect)(ref val)).width;
	}

	public float GetPreferredHeight(string str, TextGenerationSettings settings)
	{
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		settings.verticalOverflow = VerticalWrapMode.Overflow;
		settings.updateBounds = true;
		Populate(str, settings);
		Rect val = rectExtents;
		return ((Rect)(ref val)).height;
	}

	public bool PopulateWithErrors(string str, TextGenerationSettings settings, GameObject context)
	{
		TextGenerationError textGenerationError = PopulateWithError(str, settings);
		if (textGenerationError == TextGenerationError.None)
		{
			return true;
		}
		if ((textGenerationError & TextGenerationError.CustomSizeOnNonDynamicFont) != 0)
		{
			Debug.LogErrorFormat((Object)(object)context, "Font '{0}' is not dynamic, which is required to override its size", new object[1] { settings.font });
		}
		if ((textGenerationError & TextGenerationError.CustomStyleOnNonDynamicFont) != 0)
		{
			Debug.LogErrorFormat((Object)(object)context, "Font '{0}' is not dynamic, which is required to override its style", new object[1] { settings.font });
		}
		return false;
	}

	public bool Populate(string str, TextGenerationSettings settings)
	{
		TextGenerationError textGenerationError = PopulateWithError(str, settings);
		return textGenerationError == TextGenerationError.None;
	}

	private TextGenerationError PopulateWithError(string str, TextGenerationSettings settings)
	{
		if (m_HasGenerated && str == m_LastString && settings.Equals(m_LastSettings))
		{
			return m_LastValid;
		}
		m_LastValid = PopulateAlways(str, settings);
		return m_LastValid;
	}

	private TextGenerationError PopulateAlways(string str, TextGenerationSettings settings)
	{
		//IL_003e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0099: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
		m_LastString = str;
		m_HasGenerated = true;
		m_CachedVerts = false;
		m_CachedCharacters = false;
		m_CachedLines = false;
		m_LastSettings = settings;
		TextGenerationSettings textGenerationSettings = ValidatedSettings(settings);
		Populate_Internal(str, textGenerationSettings.font, textGenerationSettings.color, textGenerationSettings.fontSize, textGenerationSettings.scaleFactor, textGenerationSettings.lineSpacing, textGenerationSettings.fontStyle, textGenerationSettings.richText, textGenerationSettings.resizeTextForBestFit, textGenerationSettings.resizeTextMinSize, textGenerationSettings.resizeTextMaxSize, textGenerationSettings.verticalOverflow, textGenerationSettings.horizontalOverflow, textGenerationSettings.updateBounds, textGenerationSettings.textAnchor, textGenerationSettings.generationExtents, textGenerationSettings.pivot, textGenerationSettings.generateOutOfBounds, textGenerationSettings.alignByGeometry, out var error);
		m_LastValid = error;
		return error;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsThreadSafe = true)]
	private static extern IntPtr Internal_Create();

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsThreadSafe = true)]
	private static extern void Internal_Destroy(IntPtr ptr);

	internal bool Populate_Internal(string str, Font font, Color color, int fontSize, float scaleFactor, float lineSpacing, FontStyle style, bool richText, bool resizeTextForBestFit, int resizeTextMinSize, int resizeTextMaxSize, int verticalOverFlow, int horizontalOverflow, bool updateBounds, TextAnchor anchor, float extentsX, float extentsY, float pivotX, float pivotY, bool generateOutOfBounds, bool alignByGeometry, out uint error)
	{
		return Populate_Internal_Injected(str, font, ref color, fontSize, scaleFactor, lineSpacing, style, richText, resizeTextForBestFit, resizeTextMinSize, resizeTextMaxSize, verticalOverFlow, horizontalOverflow, updateBounds, anchor, extentsX, extentsY, pivotX, pivotY, generateOutOfBounds, alignByGeometry, out error);
	}

	internal bool Populate_Internal(string str, Font font, Color color, int fontSize, float scaleFactor, float lineSpacing, FontStyle style, bool richText, bool resizeTextForBestFit, int resizeTextMinSize, int resizeTextMaxSize, VerticalWrapMode verticalOverFlow, HorizontalWrapMode horizontalOverflow, bool updateBounds, TextAnchor anchor, Vector2 extents, Vector2 pivot, bool generateOutOfBounds, bool alignByGeometry, out TextGenerationError error)
	{
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)font == (Object)null)
		{
			error = TextGenerationError.NoFont;
			return false;
		}
		uint error2 = 0u;
		bool result = Populate_Internal(str, font, color, fontSize, scaleFactor, lineSpacing, style, richText, resizeTextForBestFit, resizeTextMinSize, resizeTextMaxSize, (int)verticalOverFlow, (int)horizontalOverflow, updateBounds, anchor, extents.x, extents.y, pivot.x, pivot.y, generateOutOfBounds, alignByGeometry, out error2);
		error = (TextGenerationError)error2;
		return result;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern UIVertex[] GetVerticesArray();

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern UICharInfo[] GetCharactersArray();

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern UILineInfo[] GetLinesArray();

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeThrows]
	private extern void GetVerticesInternal(object vertices);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeThrows]
	private extern void GetCharactersInternal(object characters);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeThrows]
	private extern void GetLinesInternal(object lines);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_rectExtents_Injected(out Rect ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern bool Populate_Internal_Injected(string str, Font font, ref Color color, int fontSize, float scaleFactor, float lineSpacing, FontStyle style, bool richText, bool resizeTextForBestFit, int resizeTextMinSize, int resizeTextMaxSize, int verticalOverFlow, int horizontalOverflow, bool updateBounds, TextAnchor anchor, float extentsX, float extentsY, float pivotX, float pivotY, bool generateOutOfBounds, bool alignByGeometry, out uint error);
}
public enum TextAlignment
{
	Left,
	Center,
	Right
}
public enum TextAnchor
{
	UpperLeft,
	UpperCenter,
	UpperRight,
	MiddleLeft,
	MiddleCenter,
	MiddleRight,
	LowerLeft,
	LowerCenter,
	LowerRight
}
public enum HorizontalWrapMode
{
	Wrap,
	Overflow
}
public enum VerticalWrapMode
{
	Truncate,
	Overflow
}
[Obsolete("This component is part of the legacy UI system and will be removed in a future release.", false)]
[NativeClass("TextRenderingPrivate::GUIText")]
[NativeHeader("Runtime/Shaders/Material.h")]
[NativeHeader("Modules/TextRendering/Public/GUIText.h")]
public sealed class GUIText : GUIElement
{
	public extern string text
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern Material material
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("TextRenderingPrivate::GetGUITextMaterialWithFallback", HasExplicitThis = true)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern Font font
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern TextAlignment alignment
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern TextAnchor anchor
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float lineSpacing
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float tabSize
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern int fontSize
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern FontStyle fontStyle
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern bool richText
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public Color color
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_color_Injected(out var ret);
			return ret;
		}
		set
		{
			set_color_Injected(ref value);
		}
	}

	public Vector2 pixelOffset
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_pixelOffset_Injected(out var ret);
			return ret;
		}
		set
		{
			set_pixelOffset_Injected(ref value);
		}
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_color_Injected(out Color ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_color_Injected(ref Color value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_pixelOffset_Injected(out Vector2 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_pixelOffset_Injected(ref Vector2 value);
}
[RequireComponent(typeof(Transform), typeof(MeshRenderer))]
[NativeClass("TextRenderingPrivate::TextMesh")]
[NativeHeader("Modules/TextRendering/Public/TextMesh.h")]
public sealed class TextMesh : Component
{
	public extern string text
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern Font font
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern int fontSize
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern FontStyle fontStyle
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float offsetZ
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern TextAlignment alignment
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern TextAnchor anchor
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float characterSize
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float lineSpacing
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float tabSize
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern bool richText
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public Color color
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_color_Injected(out var ret);
			return ret;
		}
		set
		{
			set_color_Injected(ref value);
		}
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_color_Injected(out Color ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_color_Injected(ref Color value);
}
[UsedByNativeCode]
public struct CharacterInfo
{
	public int index;

	[Obsolete("CharacterInfo.uv is deprecated. Use uvBottomLeft, uvBottomRight, uvTopRight or uvTopLeft instead.")]
	public Rect uv;

	[Obsolete("CharacterInfo.vert is deprecated. Use minX, maxX, minY, maxY instead.")]
	public Rect vert;

	[NativeName("advance")]
	[Obsolete("CharacterInfo.width is deprecated. Use advance instead.")]
	public float width;

	public int size;

	public FontStyle style;

	[Obsolete("CharacterInfo.flipped is deprecated. Use uvBottomLeft, uvBottomRight, uvTopRight or uvTopLeft instead, which will be correct regardless of orientation.")]
	public bool flipped;

	public int advance
	{
		get
		{
			return (int)Math.Round(width, MidpointRounding.AwayFromZero);
		}
		set
		{
			width = value;
		}
	}

	public int glyphWidth
	{
		get
		{
			return (int)((Rect)(ref vert)).width;
		}
		set
		{
			((Rect)(ref vert)).width = value;
		}
	}

	public int glyphHeight
	{
		get
		{
			return (int)(0f - ((Rect)(ref vert)).height);
		}
		set
		{
			float height = ((Rect)(ref vert)).height;
			((Rect)(ref vert)).height = -value;
			ref Rect reference = ref vert;
			((Rect)(ref reference)).y = ((Rect)(ref reference)).y + (height - ((Rect)(ref vert)).height);
		}
	}

	public int bearing
	{
		get
		{
			return (int)((Rect)(ref vert)).x;
		}
		set
		{
			((Rect)(ref vert)).x = value;
		}
	}

	public int minY
	{
		get
		{
			return (int)(((Rect)(ref vert)).y + ((Rect)(ref vert)).height);
		}
		set
		{
			((Rect)(ref vert)).height = (float)value - ((Rect)(ref vert)).y;
		}
	}

	public int maxY
	{
		get
		{
			return (int)((Rect)(ref vert)).y;
		}
		set
		{
			float y = ((Rect)(ref vert)).y;
			((Rect)(ref vert)).y = value;
			ref Rect reference = ref vert;
			((Rect)(ref reference)).height = ((Rect)(ref reference)).height + (y - ((Rect)(ref vert)).y);
		}
	}

	public int minX
	{
		get
		{
			return (int)((Rect)(ref vert)).x;
		}
		set
		{
			float x = ((Rect)(ref vert)).x;
			((Rect)(ref vert)).x = value;
			ref Rect reference = ref vert;
			((Rect)(ref reference)).width = ((Rect)(ref reference)).width + (x - ((Rect)(ref vert)).x);
		}
	}

	public int maxX
	{
		get
		{
			return (int)(((Rect)(ref vert)).x + ((Rect)(ref vert)).width);
		}
		set
		{
			((Rect)(ref vert)).width = (float)value - ((Rect)(ref vert)).x;
		}
	}

	internal Vector2 uvBottomLeftUnFlipped
	{
		get
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			return new Vector2(((Rect)(ref uv)).x, ((Rect)(ref uv)).y);
		}
		set
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			Vector2 val = uvTopRightUnFlipped;
			((Rect)(ref uv)).x = value.x;
			((Rect)(ref uv)).y = value.y;
			((Rect)(ref uv)).width = val.x - ((Rect)(ref uv)).x;
			((Rect)(ref uv)).height = val.y - ((Rect)(ref uv)).y;
		}
	}

	internal Vector2 uvBottomRightUnFlipped
	{
		get
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			return new Vector2(((Rect)(ref uv)).x + ((Rect)(ref uv)).width, ((Rect)(ref uv)).y);
		}
		set
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			Vector2 val = uvTopRightUnFlipped;
			((Rect)(ref uv)).width = value.x - ((Rect)(ref uv)).x;
			((Rect)(ref uv)).y = value.y;
			((Rect)(ref uv)).height = val.y - ((Rect)(ref uv)).y;
		}
	}

	internal Vector2 uvTopRightUnFlipped
	{
		get
		{
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			return new Vector2(((Rect)(ref uv)).x + ((Rect)(ref uv)).width, ((Rect)(ref uv)).y + ((Rect)(ref uv)).height);
		}
		set
		{
			((Rect)(ref uv)).width = value.x - ((Rect)(ref uv)).x;
			((Rect)(ref uv)).height = value.y - ((Rect)(ref uv)).y;
		}
	}

	internal Vector2 uvTopLeftUnFlipped
	{
		get
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			return new Vector2(((Rect)(ref uv)).x, ((Rect)(ref uv)).y + ((Rect)(ref uv)).height);
		}
		set
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			Vector2 val = uvTopRightUnFlipped;
			((Rect)(ref uv)).x = value.x;
			((Rect)(ref uv)).height = value.y - ((Rect)(ref uv)).y;
			((Rect)(ref uv)).width = val.x - ((Rect)(ref uv)).x;
		}
	}

	public Vector2 uvBottomLeft
	{
		get
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			return uvBottomLeftUnFlipped;
		}
		set
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			uvBottomLeftUnFlipped = value;
		}
	}

	public Vector2 uvBottomRight
	{
		get
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			return (!flipped) ? uvBottomRightUnFlipped : uvTopLeftUnFlipped;
		}
		set
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			if (flipped)
			{
				uvTopLeftUnFlipped = value;
			}
			else
			{
				uvBottomRightUnFlipped = value;
			}
		}
	}

	public Vector2 uvTopRight
	{
		get
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			return uvTopRightUnFlipped;
		}
		set
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			uvTopRightUnFlipped = value;
		}
	}

	public Vector2 uvTopLeft
	{
		get
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			return (!flipped) ? uvTopLeftUnFlipped : uvBottomRightUnFlipped;
		}
		set
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			if (flipped)
			{
				uvBottomRightUnFlipped = value;
			}
			else
			{
				uvTopLeftUnFlipped = value;
			}
		}
	}
}
[UsedByNativeCode]
public struct UICharInfo
{
	public Vector2 cursorPos;

	public float charWidth;
}
[UsedByNativeCode]
public struct UILineInfo
{
	public int startCharIdx;

	public int height;

	public float topY;

	public float leading;
}
[UsedByNativeCode]
public struct UIVertex
{
	public Vector3 position;

	public Vector3 normal;

	public Vector4 tangent;

	public Color32 color;

	public Vector2 uv0;

	public Vector2 uv1;

	public Vector2 uv2;

	public Vector2 uv3;

	private static readonly Color32 s_DefaultColor = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue);

	private static readonly Vector4 s_DefaultTangent = new Vector4(1f, 0f, 0f, -1f);

	public static UIVertex simpleVert = new UIVertex
	{
		position = Vector3.zero,
		normal = Vector3.back,
		tangent = s_DefaultTangent,
		color = s_DefaultColor,
		uv0 = Vector2.zero,
		uv1 = Vector2.zero,
		uv2 = Vector2.zero,
		uv3 = Vector2.zero
	};
}
[NativeHeader("Modules/TextRendering/Public/FontImpl.h")]
[NativeHeader("Modules/TextRendering/Public/Font.h")]
[NativeClass("TextRendering::Font")]
[StaticAccessor(/*Could not decode attribute arguments.*/)]
public sealed class Font : Object
{
	public delegate void FontTextureRebuildCallback();

	public extern Material material
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern string[] fontNames
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern bool dynamic
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	public extern int ascent
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	public extern int fontSize
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	public extern CharacterInfo[] characterInfo
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("TextRenderingPrivate::GetFontCharacterInfo", HasExplicitThis = true)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("TextRenderingPrivate::SetFontCharacterInfo", HasExplicitThis = true)]
		set;
	}

	[NativeProperty(/*Could not decode attribute arguments.*/)]
	public extern int lineHeight
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	[Obsolete("Font.textureRebuildCallback has been deprecated. Use Font.textureRebuilt instead.")]
	public FontTextureRebuildCallback textureRebuildCallback
	{
		get
		{
			return this.m_FontTextureRebuildCallback;
		}
		set
		{
			this.m_FontTextureRebuildCallback = value;
		}
	}

	public static event Action<Font> textureRebuilt;

	private event FontTextureRebuildCallback m_FontTextureRebuildCallback;

	public Font()
	{
		Internal_CreateFont(this, null);
	}

	public Font(string name)
	{
		if (Path.GetDirectoryName(name) == string.Empty)
		{
			Internal_CreateFont(this, name);
		}
		else
		{
			Internal_CreateFontFromPath(this, name);
		}
	}

	private Font(string[] names, int size)
	{
		Internal_CreateDynamicFont(this, names, size);
	}

	public static Font CreateDynamicFontFromOSFont(string fontname, int size)
	{
		return new Font(new string[1] { fontname }, size);
	}

	public static Font CreateDynamicFontFromOSFont(string[] fontnames, int size)
	{
		return new Font(fontnames, size);
	}

	[RequiredByNativeCode]
	internal static void InvokeTextureRebuilt_Internal(Font font)
	{
		if (Font.textureRebuilt != null)
		{
			Font.textureRebuilt(font);
		}
		font.m_FontTextureRebuildCallback?.Invoke();
	}

	public static int GetMaxVertsForString(string str)
	{
		return str.Length * 4 + 4;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	internal static extern Font GetDefault();

	public bool HasCharacter(char c)
	{
		return HasCharacter((int)c);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern bool HasCharacter(int c);

	[MethodImpl(MethodImplOptions.InternalCall)]
	public static extern string[] GetOSInstalledFontNames();

	[MethodImpl(MethodImplOptions.InternalCall)]
	public static extern string[] GetPathsToOSFonts();

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void Internal_CreateFont([Writable] Font self, string name);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void Internal_CreateFontFromPath([Writable] Font self, string fontPath);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void Internal_CreateDynamicFont([Writable] Font self, string[] _names, int size);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[FreeFunction("TextRenderingPrivate::GetCharacterInfo", HasExplicitThis = true)]
	public extern bool GetCharacterInfo(char ch, out CharacterInfo info, [DefaultValue("0")] int size, [DefaultValue("FontStyle.Normal")] FontStyle style);

	[ExcludeFromDocs]
	public bool GetCharacterInfo(char ch, out CharacterInfo info, int size)
	{
		return GetCharacterInfo(ch, out info, size, FontStyle.Normal);
	}

	[ExcludeFromDocs]
	public bool GetCharacterInfo(char ch, out CharacterInfo info)
	{
		return GetCharacterInfo(ch, out info, 0, FontStyle.Normal);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern void RequestCharactersInTexture(string characters, [DefaultValue("0")] int size, [DefaultValue("FontStyle.Normal")] FontStyle style);

	[ExcludeFromDocs]
	public void RequestCharactersInTexture(string characters, int size)
	{
		RequestCharactersInTexture(characters, size, FontStyle.Normal);
	}

	[ExcludeFromDocs]
	public void RequestCharactersInTexture(string characters)
	{
		RequestCharactersInTexture(characters, 0, FontStyle.Normal);
	}
}

Room Architect Tool_Data/Managed/UnityEngine.TilemapModule.dll

Decompiled 3 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;
using UnityEngine.Scripting;

[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: UnityEngineModuleAssembly]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine
{
	[AttributeUsage(AttributeTargets.Class)]
	public class CustomGridBrushAttribute : Attribute
	{
		private bool m_HideAssetInstances;

		private bool m_HideDefaultInstance;

		private bool m_DefaultBrush;

		private string m_DefaultName;

		public bool hideAssetInstances => m_HideAssetInstances;

		public bool hideDefaultInstance => m_HideDefaultInstance;

		public bool defaultBrush => m_DefaultBrush;

		public string defaultName => m_DefaultName;

		public CustomGridBrushAttribute()
		{
			m_HideAssetInstances = false;
			m_HideDefaultInstance = false;
			m_DefaultBrush = false;
			m_DefaultName = "";
		}

		public CustomGridBrushAttribute(bool hideAssetInstances, bool hideDefaultInstance, bool defaultBrush, string defaultName)
		{
			m_HideAssetInstances = hideAssetInstances;
			m_HideDefaultInstance = hideDefaultInstance;
			m_DefaultBrush = defaultBrush;
			m_DefaultName = defaultName;
		}
	}
	public abstract class GridBrushBase : ScriptableObject
	{
		public enum Tool
		{
			Select,
			Move,
			Paint,
			Box,
			Pick,
			Erase,
			FloodFill
		}

		public enum RotationDirection
		{
			Clockwise,
			CounterClockwise
		}

		public enum FlipAxis
		{
			X,
			Y
		}

		public virtual void Paint(GridLayout gridLayout, GameObject brushTarget, Vector3Int position)
		{
		}

		public virtual void Erase(GridLayout gridLayout, GameObject brushTarget, Vector3Int position)
		{
		}

		public virtual void BoxFill(GridLayout gridLayout, GameObject brushTarget, BoundsInt position)
		{
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			for (int i = ((BoundsInt)(ref position)).zMin; i < ((BoundsInt)(ref position)).zMax; i++)
			{
				for (int j = ((BoundsInt)(ref position)).yMin; j < ((BoundsInt)(ref position)).yMax; j++)
				{
					for (int k = ((BoundsInt)(ref position)).xMin; k < ((BoundsInt)(ref position)).xMax; k++)
					{
						Paint(gridLayout, brushTarget, new Vector3Int(k, j, i));
					}
				}
			}
		}

		public virtual void BoxErase(GridLayout gridLayout, GameObject brushTarget, BoundsInt position)
		{
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			for (int i = ((BoundsInt)(ref position)).zMin; i < ((BoundsInt)(ref position)).zMax; i++)
			{
				for (int j = ((BoundsInt)(ref position)).yMin; j < ((BoundsInt)(ref position)).yMax; j++)
				{
					for (int k = ((BoundsInt)(ref position)).xMin; k < ((BoundsInt)(ref position)).xMax; k++)
					{
						Erase(gridLayout, brushTarget, new Vector3Int(k, j, i));
					}
				}
			}
		}

		public virtual void Select(GridLayout gridLayout, GameObject brushTarget, BoundsInt position)
		{
		}

		public virtual void FloodFill(GridLayout gridLayout, GameObject brushTarget, Vector3Int position)
		{
		}

		public virtual void Rotate(RotationDirection direction, CellLayout layout)
		{
		}

		public virtual void Flip(FlipAxis flip, CellLayout layout)
		{
		}

		public virtual void Pick(GridLayout gridLayout, GameObject brushTarget, BoundsInt position, Vector3Int pivot)
		{
		}

		public virtual void Move(GridLayout gridLayout, GameObject brushTarget, BoundsInt from, BoundsInt to)
		{
		}

		public virtual void MoveStart(GridLayout gridLayout, GameObject brushTarget, BoundsInt position)
		{
		}

		public virtual void MoveEnd(GridLayout gridLayout, GameObject brushTarget, BoundsInt position)
		{
		}

		public virtual void ChangeZPosition(int change)
		{
		}

		public virtual void ResetZPosition()
		{
		}
	}
}
namespace UnityEngine.Tilemaps
{
	[RequiredByNativeCode]
	public class ITilemap
	{
		internal static ITilemap s_Instance;

		internal Tilemap m_Tilemap;

		public Vector3Int origin => m_Tilemap.origin;

		public Vector3Int size => m_Tilemap.size;

		public Bounds localBounds => m_Tilemap.localBounds;

		public BoundsInt cellBounds => m_Tilemap.cellBounds;

		internal ITilemap()
		{
		}

		internal void SetTilemapInstance(Tilemap tilemap)
		{
			m_Tilemap = tilemap;
		}

		public virtual Sprite GetSprite(Vector3Int position)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			return m_Tilemap.GetSprite(position);
		}

		public virtual Color GetColor(Vector3Int position)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			return m_Tilemap.GetColor(position);
		}

		public virtual Matrix4x4 GetTransformMatrix(Vector3Int position)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			return m_Tilemap.GetTransformMatrix(position);
		}

		public virtual TileFlags GetTileFlags(Vector3Int position)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			return m_Tilemap.GetTileFlags(position);
		}

		public virtual TileBase GetTile(Vector3Int position)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			return m_Tilemap.GetTile(position);
		}

		public virtual T GetTile<T>(Vector3Int position) where T : TileBase
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			return m_Tilemap.GetTile<T>(position);
		}

		public void RefreshTile(Vector3Int position)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			m_Tilemap.RefreshTile(position);
		}

		public T GetComponent<T>()
		{
			return ((Component)m_Tilemap).GetComponent<T>();
		}

		[RequiredByNativeCode]
		private static ITilemap CreateInstance()
		{
			s_Instance = new ITilemap();
			return s_Instance;
		}
	}
	[Serializable]
	[RequiredByNativeCode]
	public class Tile : TileBase
	{
		public enum ColliderType
		{
			None,
			Sprite,
			Grid
		}

		[SerializeField]
		private Sprite m_Sprite;

		[SerializeField]
		private Color m_Color = Color.white;

		[SerializeField]
		private Matrix4x4 m_Transform = Matrix4x4.identity;

		[SerializeField]
		private GameObject m_InstancedGameObject;

		[SerializeField]
		private TileFlags m_Flags = TileFlags.LockColor;

		[SerializeField]
		private ColliderType m_ColliderType = ColliderType.Sprite;

		public Sprite sprite
		{
			get
			{
				return m_Sprite;
			}
			set
			{
				m_Sprite = value;
			}
		}

		public Color color
		{
			get
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				return m_Color;
			}
			set
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				m_Color = value;
			}
		}

		public Matrix4x4 transform
		{
			get
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				return m_Transform;
			}
			set
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				m_Transform = value;
			}
		}

		public GameObject gameObject
		{
			get
			{
				return m_InstancedGameObject;
			}
			set
			{
				m_InstancedGameObject = value;
			}
		}

		public TileFlags flags
		{
			get
			{
				return m_Flags;
			}
			set
			{
				m_Flags = value;
			}
		}

		public ColliderType colliderType
		{
			get
			{
				return m_ColliderType;
			}
			set
			{
				m_ColliderType = value;
			}
		}

		public override void GetTileData(Vector3Int position, ITilemap tilemap, ref TileData tileData)
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			tileData.sprite = m_Sprite;
			tileData.color = m_Color;
			tileData.transform = m_Transform;
			tileData.gameObject = m_InstancedGameObject;
			tileData.flags = m_Flags;
			tileData.colliderType = m_ColliderType;
		}
	}
	[RequiredByNativeCode]
	public abstract class TileBase : ScriptableObject
	{
		[RequiredByNativeCode]
		public virtual void RefreshTile(Vector3Int position, ITilemap tilemap)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			tilemap.RefreshTile(position);
		}

		[RequiredByNativeCode]
		public virtual void GetTileData(Vector3Int position, ITilemap tilemap, ref TileData tileData)
		{
		}

		private TileData GetTileDataNoRef(Vector3Int position, ITilemap tilemap)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			TileData tileData = default(TileData);
			GetTileData(position, tilemap, ref tileData);
			return tileData;
		}

		[RequiredByNativeCode]
		public virtual bool GetTileAnimationData(Vector3Int position, ITilemap tilemap, ref TileAnimationData tileAnimationData)
		{
			return false;
		}

		private TileAnimationData GetTileAnimationDataNoRef(Vector3Int position, ITilemap tilemap)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			TileAnimationData tileAnimationData = default(TileAnimationData);
			GetTileAnimationData(position, tilemap, ref tileAnimationData);
			return tileAnimationData;
		}

		[RequiredByNativeCode]
		public virtual bool StartUp(Vector3Int position, ITilemap tilemap, GameObject go)
		{
			return false;
		}
	}
	[NativeHeader("Modules/Grid/Public/Grid.h")]
	[NativeHeader("Runtime/Graphics/SpriteFrame.h")]
	[NativeHeader("Modules/Tilemap/Public/TilemapTile.h")]
	[NativeHeader("Modules/Tilemap/Public/TilemapMarshalling.h")]
	[NativeType(Header = "Modules/Tilemap/Public/Tilemap.h")]
	[NativeHeader("Modules/Grid/Public/GridMarshalling.h")]
	[RequireComponent(typeof(Transform))]
	public sealed class Tilemap : GridLayout
	{
		public enum Orientation
		{
			XY,
			XZ,
			YX,
			YZ,
			ZX,
			ZY,
			Custom
		}

		public extern Grid layoutGrid
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod(Name = "GetAttachedGrid")]
			get;
		}

		public BoundsInt cellBounds => new BoundsInt(origin, size);

		[NativeProperty("TilemapBoundsScripting")]
		public Bounds localBounds
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_localBounds_Injected(out var ret);
				return ret;
			}
		}

		[NativeProperty("TilemapFrameBoundsScripting")]
		internal Bounds localFrameBounds
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_localFrameBounds_Injected(out var ret);
				return ret;
			}
		}

		public extern float animationFrameRate
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public Color color
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_color_Injected(out var ret);
				return ret;
			}
			set
			{
				set_color_Injected(ref value);
			}
		}

		public Vector3Int origin
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_origin_Injected(out var ret);
				return ret;
			}
			set
			{
				set_origin_Injected(ref value);
			}
		}

		public Vector3Int size
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_size_Injected(out var ret);
				return ret;
			}
			set
			{
				set_size_Injected(ref value);
			}
		}

		[NativeProperty(Name = "TileAnchorScripting")]
		public Vector3 tileAnchor
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_tileAnchor_Injected(out var ret);
				return ret;
			}
			set
			{
				set_tileAnchor_Injected(ref value);
			}
		}

		public extern Orientation orientation
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public Matrix4x4 orientationMatrix
		{
			[NativeMethod(Name = "GetTileOrientationMatrix")]
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_orientationMatrix_Injected(out var ret);
				return ret;
			}
			[NativeMethod(Name = "SetOrientationMatrix")]
			set
			{
				set_orientationMatrix_Injected(ref value);
			}
		}

		public Vector3 GetCellCenterLocal(Vector3Int position)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: 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)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			return ((GridLayout)this).CellToLocalInterpolated(Vector3Int.op_Implicit(position) + tileAnchor);
		}

		public Vector3 GetCellCenterWorld(Vector3Int position)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			return ((GridLayout)this).LocalToWorld(((GridLayout)this).CellToLocalInterpolated(Vector3Int.op_Implicit(position) + tileAnchor));
		}

		internal Object GetTileAsset(Vector3Int position)
		{
			return GetTileAsset_Injected(ref position);
		}

		public TileBase GetTile(Vector3Int position)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			return GetTileAsset(position) as TileBase;
		}

		public T GetTile<T>(Vector3Int position) where T : TileBase
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			return GetTileAsset(position) as T;
		}

		internal Object[] GetTileAssetsBlock(Vector3Int position, Vector3Int blockDimensions)
		{
			return GetTileAssetsBlock_Injected(ref position, ref blockDimensions);
		}

		public TileBase[] GetTilesBlock(BoundsInt bounds)
		{
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			Object[] tileAssetsBlock = GetTileAssetsBlock(((BoundsInt)(ref bounds)).min, ((BoundsInt)(ref bounds)).size);
			TileBase[] array = new TileBase[tileAssetsBlock.Length];
			for (int i = 0; i < tileAssetsBlock.Length; i++)
			{
				array[i] = (TileBase)(object)tileAssetsBlock[i];
			}
			return array;
		}

		internal void SetTileAsset(Vector3Int position, Object tile)
		{
			SetTileAsset_Injected(ref position, tile);
		}

		public void SetTile(Vector3Int position, TileBase tile)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			SetTileAsset(position, (Object)(object)tile);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal extern void SetTileAssets(Vector3Int[] positionArray, Object[] tileArray);

		public void SetTiles(Vector3Int[] positionArray, TileBase[] tileArray)
		{
			SetTileAssets(positionArray, (Object[])(object)tileArray);
		}

		[NativeMethod(Name = "SetTileAssetsBlock")]
		private void INTERNAL_CALL_SetTileAssetsBlock(Vector3Int position, Vector3Int blockDimensions, Object[] tileArray)
		{
			INTERNAL_CALL_SetTileAssetsBlock_Injected(ref position, ref blockDimensions, tileArray);
		}

		public void SetTilesBlock(BoundsInt position, TileBase[] tileArray)
		{
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			INTERNAL_CALL_SetTileAssetsBlock(((BoundsInt)(ref position)).min, ((BoundsInt)(ref position)).size, (Object[])(object)tileArray);
		}

		public bool HasTile(Vector3Int position)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			return GetTileAsset(position) != (Object)null;
		}

		[NativeMethod(Name = "RefreshTileAsset")]
		public void RefreshTile(Vector3Int position)
		{
			RefreshTile_Injected(ref position);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(Name = "RefreshAllTileAssets")]
		public extern void RefreshAllTiles();

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal extern void SwapTileAsset(Object changeTile, Object newTile);

		public void SwapTile(TileBase changeTile, TileBase newTile)
		{
			SwapTileAsset((Object)(object)changeTile, (Object)(object)newTile);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal extern bool ContainsTileAsset(Object tileAsset);

		public bool ContainsTile(TileBase tileAsset)
		{
			return ContainsTileAsset((Object)(object)tileAsset);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern int GetUsedTilesCount();

		public int GetUsedTilesNonAlloc(TileBase[] usedTiles)
		{
			return Internal_GetUsedTilesNonAlloc((Object[])(object)usedTiles);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "TilemapBindings::GetUsedTilesNonAlloc", HasExplicitThis = true)]
		internal extern int Internal_GetUsedTilesNonAlloc(Object[] usedTiles);

		public Sprite GetSprite(Vector3Int position)
		{
			return GetSprite_Injected(ref position);
		}

		public Matrix4x4 GetTransformMatrix(Vector3Int position)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			GetTransformMatrix_Injected(ref position, out var ret);
			return ret;
		}

		public void SetTransformMatrix(Vector3Int position, Matrix4x4 transform)
		{
			SetTransformMatrix_Injected(ref position, ref transform);
		}

		[NativeMethod(Name = "GetTileColor")]
		public Color GetColor(Vector3Int position)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			GetColor_Injected(ref position, out var ret);
			return ret;
		}

		[NativeMethod(Name = "SetTileColor")]
		public void SetColor(Vector3Int position, Color color)
		{
			SetColor_Injected(ref position, ref color);
		}

		public TileFlags GetTileFlags(Vector3Int position)
		{
			return GetTileFlags_Injected(ref position);
		}

		public void SetTileFlags(Vector3Int position, TileFlags flags)
		{
			SetTileFlags_Injected(ref position, flags);
		}

		public void AddTileFlags(Vector3Int position, TileFlags flags)
		{
			AddTileFlags_Injected(ref position, flags);
		}

		public void RemoveTileFlags(Vector3Int position, TileFlags flags)
		{
			RemoveTileFlags_Injected(ref position, flags);
		}

		[NativeMethod(Name = "GetTileInstantiatedObject")]
		public GameObject GetInstantiatedObject(Vector3Int position)
		{
			return GetInstantiatedObject_Injected(ref position);
		}

		[NativeMethod(Name = "SetTileColliderType")]
		public void SetColliderType(Vector3Int position, Tile.ColliderType colliderType)
		{
			SetColliderType_Injected(ref position, colliderType);
		}

		[NativeMethod(Name = "GetTileColliderType")]
		public Tile.ColliderType GetColliderType(Vector3Int position)
		{
			return GetColliderType_Injected(ref position);
		}

		public void FloodFill(Vector3Int position, TileBase tile)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			FloodFillTileAsset(position, (Object)(object)tile);
		}

		[NativeMethod(Name = "FloodFill")]
		private void FloodFillTileAsset(Vector3Int position, Object tile)
		{
			FloodFillTileAsset_Injected(ref position, tile);
		}

		public void BoxFill(Vector3Int position, TileBase tile, int startX, int startY, int endX, int endY)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			BoxFillTileAsset(position, (Object)(object)tile, startX, startY, endX, endY);
		}

		[NativeMethod(Name = "BoxFill")]
		private void BoxFillTileAsset(Vector3Int position, Object tile, int startX, int startY, int endX, int endY)
		{
			BoxFillTileAsset_Injected(ref position, tile, startX, startY, endX, endY);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void ClearAllTiles();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void ResizeBounds();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void CompressBounds();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_localBounds_Injected(out Bounds ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_localFrameBounds_Injected(out Bounds ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_color_Injected(out Color ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void set_color_Injected(ref Color value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_origin_Injected(out Vector3Int ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void set_origin_Injected(ref Vector3Int value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_size_Injected(out Vector3Int ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void set_size_Injected(ref Vector3Int value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_tileAnchor_Injected(out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void set_tileAnchor_Injected(ref Vector3 value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_orientationMatrix_Injected(out Matrix4x4 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void set_orientationMatrix_Injected(ref Matrix4x4 value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern Object GetTileAsset_Injected(ref Vector3Int position);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern Object[] GetTileAssetsBlock_Injected(ref Vector3Int position, ref Vector3Int blockDimensions);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void SetTileAsset_Injected(ref Vector3Int position, Object tile);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void INTERNAL_CALL_SetTileAssetsBlock_Injected(ref Vector3Int position, ref Vector3Int blockDimensions, Object[] tileArray);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void RefreshTile_Injected(ref Vector3Int position);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern Sprite GetSprite_Injected(ref Vector3Int position);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void GetTransformMatrix_Injected(ref Vector3Int position, out Matrix4x4 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void SetTransformMatrix_Injected(ref Vector3Int position, ref Matrix4x4 transform);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void GetColor_Injected(ref Vector3Int position, out Color ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void SetColor_Injected(ref Vector3Int position, ref Color color);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern TileFlags GetTileFlags_Injected(ref Vector3Int position);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void SetTileFlags_Injected(ref Vector3Int position, TileFlags flags);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void AddTileFlags_Injected(ref Vector3Int position, TileFlags flags);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void RemoveTileFlags_Injected(ref Vector3Int position, TileFlags flags);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern GameObject GetInstantiatedObject_Injected(ref Vector3Int position);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void SetColliderType_Injected(ref Vector3Int position, Tile.ColliderType colliderType);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern Tile.ColliderType GetColliderType_Injected(ref Vector3Int position);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void FloodFillTileAsset_Injected(ref Vector3Int position, Object tile);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void BoxFillTileAsset_Injected(ref Vector3Int position, Object tile, int startX, int startY, int endX, int endY);
	}
	[Flags]
	public enum TileFlags
	{
		None = 0,
		LockColor = 1,
		LockTransform = 2,
		InstantiateGameObjectRuntimeOnly = 4,
		LockAll = 3
	}
	[NativeHeader("Modules/Tilemap/TilemapRendererJobs.h")]
	[NativeHeader("Modules/Tilemap/Public/TilemapMarshalling.h")]
	[NativeType(Header = "Modules/Tilemap/Public/TilemapRenderer.h")]
	[RequireComponent(typeof(Tilemap))]
	[NativeHeader("Modules/Grid/Public/GridMarshalling.h")]
	public sealed class TilemapRenderer : Renderer
	{
		public enum SortOrder
		{
			BottomLeft,
			BottomRight,
			TopLeft,
			TopRight
		}

		public enum Mode
		{
			Chunk,
			Individual
		}

		public enum DetectChunkCullingBounds
		{
			Auto,
			Manual
		}

		public Vector3Int chunkSize
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_chunkSize_Injected(out var ret);
				return ret;
			}
			set
			{
				set_chunkSize_Injected(ref value);
			}
		}

		public Vector3 chunkCullingBounds
		{
			[FreeFunction("TilemapRendererBindings::GetChunkCullingBounds", HasExplicitThis = true)]
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_chunkCullingBounds_Injected(out var ret);
				return ret;
			}
			[FreeFunction("TilemapRendererBindings::SetChunkCullingBounds", HasExplicitThis = true)]
			set
			{
				set_chunkCullingBounds_Injected(ref value);
			}
		}

		public extern int maxChunkCount
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern int maxFrameAge
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern SortOrder sortOrder
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty("RenderMode")]
		public extern Mode mode
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern DetectChunkCullingBounds detectChunkCullingBounds
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern SpriteMaskInteraction maskInteraction
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_chunkSize_Injected(out Vector3Int ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void set_chunkSize_Injected(ref Vector3Int value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_chunkCullingBounds_Injected(out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void set_chunkCullingBounds_Injected(ref Vector3 value);
	}
	[RequiredByNativeCode]
	[NativeType(Header = "Modules/Tilemap/TilemapScripting.h")]
	public struct TileData
	{
		private Sprite m_Sprite;

		private Color m_Color;

		private Matrix4x4 m_Transform;

		private GameObject m_GameObject;

		private TileFlags m_Flags;

		private Tile.ColliderType m_ColliderType;

		public Sprite sprite
		{
			get
			{
				return m_Sprite;
			}
			set
			{
				m_Sprite = value;
			}
		}

		public Color color
		{
			get
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				return m_Color;
			}
			set
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				m_Color = value;
			}
		}

		public Matrix4x4 transform
		{
			get
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				return m_Transform;
			}
			set
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				m_Transform = value;
			}
		}

		public GameObject gameObject
		{
			get
			{
				return m_GameObject;
			}
			set
			{
				m_GameObject = value;
			}
		}

		public TileFlags flags
		{
			get
			{
				return m_Flags;
			}
			set
			{
				m_Flags = value;
			}
		}

		public Tile.ColliderType colliderType
		{
			get
			{
				return m_ColliderType;
			}
			set
			{
				m_ColliderType = value;
			}
		}
	}
	[NativeType(Header = "Modules/Tilemap/TilemapScripting.h")]
	[RequiredByNativeCode]
	public struct TileAnimationData
	{
		private Sprite[] m_AnimatedSprites;

		private float m_AnimationSpeed;

		private float m_AnimationStartTime;

		public Sprite[] animatedSprites
		{
			get
			{
				return m_AnimatedSprites;
			}
			set
			{
				m_AnimatedSprites = value;
			}
		}

		public float animationSpeed
		{
			get
			{
				return m_AnimationSpeed;
			}
			set
			{
				m_AnimationSpeed = value;
			}
		}

		public float animationStartTime
		{
			get
			{
				return m_AnimationStartTime;
			}
			set
			{
				m_AnimationStartTime = value;
			}
		}
	}
	[RequireComponent(typeof(Tilemap))]
	[NativeType(Header = "Modules/Tilemap/Public/TilemapCollider2D.h")]
	public sealed class TilemapCollider2D : Collider2D
	{
		public extern uint maximumTileChangeCount
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float extrusionFactor
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}
	}
}

Room Architect Tool_Data/Managed/UnityEngine.TLSModule.dll

Decompiled 3 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;

[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]

Room Architect Tool_Data/Managed/UnityEngine.UI.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using UnityEngine.EventSystems;
using UnityEngine.Events;
using UnityEngine.Rendering;
using UnityEngine.Serialization;
using UnityEngine.Sprites;
using UnityEngine.U2D;
using UnityEngine.UI;
using UnityEngine.UI.Collections;
using UnityEngine.UI.CoroutineTween;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("guisystem")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("guisystem")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2013")]
[assembly: AssemblyTrademark("")]
[assembly: InternalsVisibleTo("UnityEngine.UI.Tests")]
[assembly: ComVisible(false)]
[assembly: Guid("d4f464c7-9b15-460d-b4bc-2cacd1c1df73")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace UnityEngine.UI
{
	[Serializable]
	public class AnimationTriggers
	{
		private const string kDefaultNormalAnimName = "Normal";

		private const string kDefaultHighlightedAnimName = "Highlighted";

		private const string kDefaultPressedAnimName = "Pressed";

		private const string kDefaultSelectedAnimName = "Selected";

		private const string kDefaultDisabledAnimName = "Disabled";

		[FormerlySerializedAs("normalTrigger")]
		[SerializeField]
		private string m_NormalTrigger = "Normal";

		[FormerlySerializedAs("highlightedTrigger")]
		[SerializeField]
		private string m_HighlightedTrigger = "Highlighted";

		[FormerlySerializedAs("pressedTrigger")]
		[SerializeField]
		private string m_PressedTrigger = "Pressed";

		[FormerlySerializedAs("m_HighlightedTrigger")]
		[SerializeField]
		private string m_SelectedTrigger = "Selected";

		[FormerlySerializedAs("disabledTrigger")]
		[SerializeField]
		private string m_DisabledTrigger = "Disabled";

		public string normalTrigger
		{
			get
			{
				return m_NormalTrigger;
			}
			set
			{
				m_NormalTrigger = value;
			}
		}

		public string highlightedTrigger
		{
			get
			{
				return m_HighlightedTrigger;
			}
			set
			{
				m_HighlightedTrigger = value;
			}
		}

		public string pressedTrigger
		{
			get
			{
				return m_PressedTrigger;
			}
			set
			{
				m_PressedTrigger = value;
			}
		}

		public string selectedTrigger
		{
			get
			{
				return m_SelectedTrigger;
			}
			set
			{
				m_SelectedTrigger = value;
			}
		}

		public string disabledTrigger
		{
			get
			{
				return m_DisabledTrigger;
			}
			set
			{
				m_DisabledTrigger = value;
			}
		}
	}
	[AddComponentMenu("UI/Button", 30)]
	public class Button : Selectable, IPointerClickHandler, IEventSystemHandler, ISubmitHandler
	{
		[Serializable]
		public class ButtonClickedEvent : UnityEvent
		{
		}

		[FormerlySerializedAs("onClick")]
		[SerializeField]
		private ButtonClickedEvent m_OnClick = new ButtonClickedEvent();

		public ButtonClickedEvent onClick
		{
			get
			{
				return m_OnClick;
			}
			set
			{
				m_OnClick = value;
			}
		}

		protected Button()
		{
		}

		private void Press()
		{
			if (IsActive() && IsInteractable())
			{
				UISystemProfilerApi.AddMarker("Button.onClick", (Object)(object)this);
				((UnityEvent)m_OnClick).Invoke();
			}
		}

		public virtual void OnPointerClick(PointerEventData eventData)
		{
			if (eventData.button == PointerEventData.InputButton.Left)
			{
				Press();
			}
		}

		public virtual void OnSubmit(BaseEventData eventData)
		{
			Press();
			if (IsActive() && IsInteractable())
			{
				DoStateTransition(SelectionState.Pressed, instant: false);
				((MonoBehaviour)this).StartCoroutine(OnFinishSubmit());
			}
		}

		private IEnumerator OnFinishSubmit()
		{
			float fadeTime = base.colors.fadeDuration;
			float elapsedTime = 0f;
			while (elapsedTime < fadeTime)
			{
				elapsedTime += Time.unscaledDeltaTime;
				yield return null;
			}
			DoStateTransition(base.currentSelectionState, instant: false);
		}
	}
	public enum CanvasUpdate
	{
		Prelayout,
		Layout,
		PostLayout,
		PreRender,
		LatePreRender,
		MaxUpdateValue
	}
	public interface ICanvasElement
	{
		Transform transform { get; }

		void Rebuild(CanvasUpdate executing);

		void LayoutComplete();

		void GraphicUpdateComplete();

		bool IsDestroyed();
	}
	public class CanvasUpdateRegistry
	{
		private static CanvasUpdateRegistry s_Instance;

		private bool m_PerformingLayoutUpdate;

		private bool m_PerformingGraphicUpdate;

		private readonly IndexedSet<ICanvasElement> m_LayoutRebuildQueue = new IndexedSet<ICanvasElement>();

		private readonly IndexedSet<ICanvasElement> m_GraphicRebuildQueue = new IndexedSet<ICanvasElement>();

		private static readonly Comparison<ICanvasElement> s_SortLayoutFunction = SortLayoutList;

		public static CanvasUpdateRegistry instance
		{
			get
			{
				if (s_Instance == null)
				{
					s_Instance = new CanvasUpdateRegistry();
				}
				return s_Instance;
			}
		}

		protected CanvasUpdateRegistry()
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Expected O, but got Unknown
			Canvas.willRenderCanvases += new WillRenderCanvases(PerformUpdate);
		}

		private bool ObjectValidForUpdate(ICanvasElement element)
		{
			bool result = element != null;
			if (element is Object)
			{
				result = (Object)((element is Object) ? element : null) != (Object)null;
			}
			return result;
		}

		private void CleanInvalidItems()
		{
			for (int num = m_LayoutRebuildQueue.Count - 1; num >= 0; num--)
			{
				ICanvasElement canvasElement = m_LayoutRebuildQueue[num];
				if (canvasElement == null)
				{
					m_LayoutRebuildQueue.RemoveAt(num);
				}
				else if (canvasElement.IsDestroyed())
				{
					m_LayoutRebuildQueue.RemoveAt(num);
					canvasElement.LayoutComplete();
				}
			}
			for (int num2 = m_GraphicRebuildQueue.Count - 1; num2 >= 0; num2--)
			{
				ICanvasElement canvasElement2 = m_GraphicRebuildQueue[num2];
				if (canvasElement2 == null)
				{
					m_GraphicRebuildQueue.RemoveAt(num2);
				}
				else if (canvasElement2.IsDestroyed())
				{
					m_GraphicRebuildQueue.RemoveAt(num2);
					canvasElement2.GraphicUpdateComplete();
				}
			}
		}

		private void PerformUpdate()
		{
			UISystemProfilerApi.BeginSample((SampleType)0);
			CleanInvalidItems();
			m_PerformingLayoutUpdate = true;
			m_LayoutRebuildQueue.Sort(s_SortLayoutFunction);
			for (int i = 0; i <= 2; i++)
			{
				for (int j = 0; j < m_LayoutRebuildQueue.Count; j++)
				{
					ICanvasElement canvasElement = instance.m_LayoutRebuildQueue[j];
					try
					{
						if (ObjectValidForUpdate(canvasElement))
						{
							canvasElement.Rebuild((CanvasUpdate)i);
						}
					}
					catch (Exception ex)
					{
						Debug.LogException(ex, (Object)(object)canvasElement.transform);
					}
				}
			}
			for (int k = 0; k < m_LayoutRebuildQueue.Count; k++)
			{
				m_LayoutRebuildQueue[k].LayoutComplete();
			}
			instance.m_LayoutRebuildQueue.Clear();
			m_PerformingLayoutUpdate = false;
			ClipperRegistry.instance.Cull();
			m_PerformingGraphicUpdate = true;
			for (int l = 3; l < 5; l++)
			{
				for (int m = 0; m < instance.m_GraphicRebuildQueue.Count; m++)
				{
					try
					{
						ICanvasElement canvasElement2 = instance.m_GraphicRebuildQueue[m];
						if (ObjectValidForUpdate(canvasElement2))
						{
							canvasElement2.Rebuild((CanvasUpdate)l);
						}
					}
					catch (Exception ex2)
					{
						Debug.LogException(ex2, (Object)(object)instance.m_GraphicRebuildQueue[m].transform);
					}
				}
			}
			for (int n = 0; n < m_GraphicRebuildQueue.Count; n++)
			{
				m_GraphicRebuildQueue[n].GraphicUpdateComplete();
			}
			instance.m_GraphicRebuildQueue.Clear();
			m_PerformingGraphicUpdate = false;
			UISystemProfilerApi.EndSample((SampleType)0);
		}

		private static int ParentCount(Transform child)
		{
			if ((Object)(object)child == (Object)null)
			{
				return 0;
			}
			Transform parent = child.parent;
			int num = 0;
			while ((Object)(object)parent != (Object)null)
			{
				num++;
				parent = parent.parent;
			}
			return num;
		}

		private static int SortLayoutList(ICanvasElement x, ICanvasElement y)
		{
			Transform transform = x.transform;
			Transform transform2 = y.transform;
			return ParentCount(transform) - ParentCount(transform2);
		}

		public static void RegisterCanvasElementForLayoutRebuild(ICanvasElement element)
		{
			instance.InternalRegisterCanvasElementForLayoutRebuild(element);
		}

		public static bool TryRegisterCanvasElementForLayoutRebuild(ICanvasElement element)
		{
			return instance.InternalRegisterCanvasElementForLayoutRebuild(element);
		}

		private bool InternalRegisterCanvasElementForLayoutRebuild(ICanvasElement element)
		{
			if (m_LayoutRebuildQueue.Contains(element))
			{
				return false;
			}
			return m_LayoutRebuildQueue.AddUnique(element);
		}

		public static void RegisterCanvasElementForGraphicRebuild(ICanvasElement element)
		{
			instance.InternalRegisterCanvasElementForGraphicRebuild(element);
		}

		public static bool TryRegisterCanvasElementForGraphicRebuild(ICanvasElement element)
		{
			return instance.InternalRegisterCanvasElementForGraphicRebuild(element);
		}

		private bool InternalRegisterCanvasElementForGraphicRebuild(ICanvasElement element)
		{
			if (m_PerformingGraphicUpdate)
			{
				Debug.LogError((object)$"Trying to add {element} for graphic rebuild while we are already inside a graphic rebuild loop. This is not supported.");
				return false;
			}
			return m_GraphicRebuildQueue.AddUnique(element);
		}

		public static void UnRegisterCanvasElementForRebuild(ICanvasElement element)
		{
			instance.InternalUnRegisterCanvasElementForLayoutRebuild(element);
			instance.InternalUnRegisterCanvasElementForGraphicRebuild(element);
		}

		private void InternalUnRegisterCanvasElementForLayoutRebuild(ICanvasElement element)
		{
			if (m_PerformingLayoutUpdate)
			{
				Debug.LogError((object)$"Trying to remove {element} from rebuild list while we are already inside a rebuild loop. This is not supported.");
				return;
			}
			element.LayoutComplete();
			instance.m_LayoutRebuildQueue.Remove(element);
		}

		private void InternalUnRegisterCanvasElementForGraphicRebuild(ICanvasElement element)
		{
			if (m_PerformingGraphicUpdate)
			{
				Debug.LogError((object)$"Trying to remove {element} from rebuild list while we are already inside a rebuild loop. This is not supported.");
				return;
			}
			element.GraphicUpdateComplete();
			instance.m_GraphicRebuildQueue.Remove(element);
		}

		public static bool IsRebuildingLayout()
		{
			return instance.m_PerformingLayoutUpdate;
		}

		public static bool IsRebuildingGraphics()
		{
			return instance.m_PerformingGraphicUpdate;
		}
	}
	[Serializable]
	public struct ColorBlock : IEquatable<ColorBlock>
	{
		[FormerlySerializedAs("normalColor")]
		[SerializeField]
		private Color m_NormalColor;

		[FormerlySerializedAs("highlightedColor")]
		[SerializeField]
		private Color m_HighlightedColor;

		[FormerlySerializedAs("pressedColor")]
		[SerializeField]
		private Color m_PressedColor;

		[FormerlySerializedAs("m_HighlightedColor")]
		[SerializeField]
		private Color m_SelectedColor;

		[FormerlySerializedAs("disabledColor")]
		[SerializeField]
		private Color m_DisabledColor;

		[Range(1f, 5f)]
		[SerializeField]
		private float m_ColorMultiplier;

		[FormerlySerializedAs("fadeDuration")]
		[SerializeField]
		private float m_FadeDuration;

		public Color normalColor
		{
			get
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				return m_NormalColor;
			}
			set
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				m_NormalColor = value;
			}
		}

		public Color highlightedColor
		{
			get
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				return m_HighlightedColor;
			}
			set
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				m_HighlightedColor = value;
			}
		}

		public Color pressedColor
		{
			get
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				return m_PressedColor;
			}
			set
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				m_PressedColor = value;
			}
		}

		public Color selectedColor
		{
			get
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				return m_SelectedColor;
			}
			set
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				m_SelectedColor = value;
			}
		}

		public Color disabledColor
		{
			get
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				return m_DisabledColor;
			}
			set
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				m_DisabledColor = value;
			}
		}

		public float colorMultiplier
		{
			get
			{
				return m_ColorMultiplier;
			}
			set
			{
				m_ColorMultiplier = value;
			}
		}

		public float fadeDuration
		{
			get
			{
				return m_FadeDuration;
			}
			set
			{
				m_FadeDuration = value;
			}
		}

		public static ColorBlock defaultColorBlock
		{
			get
			{
				//IL_001e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0023: Unknown result type (might be due to invalid IL or missing references)
				//IL_0028: Unknown result type (might be due to invalid IL or missing references)
				//IL_0043: Unknown result type (might be due to invalid IL or missing references)
				//IL_0048: Unknown result type (might be due to invalid IL or missing references)
				//IL_004d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0068: Unknown result type (might be due to invalid IL or missing references)
				//IL_006d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0072: Unknown result type (might be due to invalid IL or missing references)
				//IL_008d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0092: Unknown result type (might be due to invalid IL or missing references)
				//IL_0097: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
				//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
				ColorBlock result = default(ColorBlock);
				result.m_NormalColor = Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue));
				result.m_HighlightedColor = Color32.op_Implicit(new Color32((byte)245, (byte)245, (byte)245, byte.MaxValue));
				result.m_PressedColor = Color32.op_Implicit(new Color32((byte)200, (byte)200, (byte)200, byte.MaxValue));
				result.m_SelectedColor = Color32.op_Implicit(new Color32((byte)245, (byte)245, (byte)245, byte.MaxValue));
				result.m_DisabledColor = Color32.op_Implicit(new Color32((byte)200, (byte)200, (byte)200, (byte)128));
				result.colorMultiplier = 1f;
				result.fadeDuration = 0.1f;
				return result;
			}
		}

		public override bool Equals(object obj)
		{
			if (!(obj is ColorBlock))
			{
				return false;
			}
			return Equals((ColorBlock)obj);
		}

		public bool Equals(ColorBlock other)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			if (normalColor == other.normalColor && highlightedColor == other.highlightedColor && pressedColor == other.pressedColor && selectedColor == other.selectedColor && disabledColor == other.disabledColor && colorMultiplier == other.colorMultiplier)
			{
				return fadeDuration == other.fadeDuration;
			}
			return false;
		}

		public static bool operator ==(ColorBlock point1, ColorBlock point2)
		{
			return point1.Equals(point2);
		}

		public static bool operator !=(ColorBlock point1, ColorBlock point2)
		{
			return !point1.Equals(point2);
		}

		public override int GetHashCode()
		{
			return base.GetHashCode();
		}
	}
	public class ClipperRegistry
	{
		private static ClipperRegistry s_Instance;

		private readonly IndexedSet<IClipper> m_Clippers = new IndexedSet<IClipper>();

		public static ClipperRegistry instance
		{
			get
			{
				if (s_Instance == null)
				{
					s_Instance = new ClipperRegistry();
				}
				return s_Instance;
			}
		}

		protected ClipperRegistry()
		{
		}

		public void Cull()
		{
			for (int i = 0; i < m_Clippers.Count; i++)
			{
				m_Clippers[i].PerformClipping();
			}
		}

		public static void Register(IClipper c)
		{
			if (c != null)
			{
				instance.m_Clippers.AddUnique(c);
			}
		}

		public static void Unregister(IClipper c)
		{
			instance.m_Clippers.Remove(c);
		}
	}
	public static class Clipping
	{
		public static Rect FindCullAndClipWorldRect(List<RectMask2D> rectMaskParents, out bool validRect)
		{
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			if (rectMaskParents.Count == 0)
			{
				validRect = false;
				return default(Rect);
			}
			Rect canvasRect = rectMaskParents[0].canvasRect;
			float xMin = ((Rect)(ref canvasRect)).xMin;
			float xMax = ((Rect)(ref canvasRect)).xMax;
			float yMin = ((Rect)(ref canvasRect)).yMin;
			float yMax = ((Rect)(ref canvasRect)).yMax;
			for (int i = 1; i < rectMaskParents.Count; i++)
			{
				canvasRect = rectMaskParents[i].canvasRect;
				if (xMin < ((Rect)(ref canvasRect)).xMin)
				{
					xMin = ((Rect)(ref canvasRect)).xMin;
				}
				if (yMin < ((Rect)(ref canvasRect)).yMin)
				{
					yMin = ((Rect)(ref canvasRect)).yMin;
				}
				if (xMax > ((Rect)(ref canvasRect)).xMax)
				{
					xMax = ((Rect)(ref canvasRect)).xMax;
				}
				if (yMax > ((Rect)(ref canvasRect)).yMax)
				{
					yMax = ((Rect)(ref canvasRect)).yMax;
				}
			}
			validRect = xMax > xMin && yMax > yMin;
			if (validRect)
			{
				return new Rect(xMin, yMin, xMax - xMin, yMax - yMin);
			}
			return default(Rect);
		}
	}
	public interface IClipper
	{
		void PerformClipping();
	}
	public interface IClippable
	{
		GameObject gameObject { get; }

		RectTransform rectTransform { get; }

		void RecalculateClipping();

		void Cull(Rect clipRect, bool validRect);

		void SetClipRect(Rect value, bool validRect);
	}
	internal class RectangularVertexClipper
	{
		private readonly Vector3[] m_WorldCorners = (Vector3[])(object)new Vector3[4];

		private readonly Vector3[] m_CanvasCorners = (Vector3[])(object)new Vector3[4];

		public Rect GetCanvasRect(RectTransform t, Canvas c)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)c == (Object)null)
			{
				return default(Rect);
			}
			t.GetWorldCorners(m_WorldCorners);
			Transform component = ((Component)c).GetComponent<Transform>();
			for (int i = 0; i < 4; i++)
			{
				m_CanvasCorners[i] = component.InverseTransformPoint(m_WorldCorners[i]);
			}
			return new Rect(m_CanvasCorners[0].x, m_CanvasCorners[0].y, m_CanvasCorners[2].x - m_CanvasCorners[0].x, m_CanvasCorners[2].y - m_CanvasCorners[0].y);
		}
	}
	public static class DefaultControls
	{
		public interface IFactoryControls
		{
			GameObject CreateGameObject(string name, params Type[] components);
		}

		private class DefaultRuntimeFactory : IFactoryControls
		{
			public static IFactoryControls Default = new DefaultRuntimeFactory();

			public GameObject CreateGameObject(string name, params Type[] components)
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0008: Expected O, but got Unknown
				return new GameObject(name, components);
			}
		}

		public struct Resources
		{
			public Sprite standard;

			public Sprite background;

			public Sprite inputField;

			public Sprite knob;

			public Sprite checkmark;

			public Sprite dropdown;

			public Sprite mask;
		}

		private static IFactoryControls m_CurrentFactory = DefaultRuntimeFactory.Default;

		private const float kWidth = 160f;

		private const float kThickHeight = 30f;

		private const float kThinHeight = 20f;

		private static Vector2 s_ThickElementSize = new Vector2(160f, 30f);

		private static Vector2 s_ThinElementSize = new Vector2(160f, 20f);

		private static Vector2 s_ImageElementSize = new Vector2(100f, 100f);

		private static Color s_DefaultSelectableColor = new Color(1f, 1f, 1f, 1f);

		private static Color s_PanelColor = new Color(1f, 1f, 1f, 0.392f);

		private static Color s_TextColor = new Color(10f / 51f, 10f / 51f, 10f / 51f, 1f);

		public static IFactoryControls factory => m_CurrentFactory;

		private static GameObject CreateUIElementRoot(string name, Vector2 size, params Type[] components)
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			GameObject obj = factory.CreateGameObject(name, components);
			obj.GetComponent<RectTransform>().sizeDelta = size;
			return obj;
		}

		private static GameObject CreateUIObject(string name, GameObject parent, params Type[] components)
		{
			GameObject obj = factory.CreateGameObject(name, components);
			SetParentAndAlign(obj, parent);
			return obj;
		}

		private static void SetDefaultTextValues(Text lbl)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			lbl.color = s_TextColor;
			lbl.AssignDefaultFont();
		}

		private static void SetDefaultColorTransitionValues(Selectable slider)
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			ColorBlock colors = slider.colors;
			colors.highlightedColor = new Color(0.882f, 0.882f, 0.882f);
			colors.pressedColor = new Color(0.698f, 0.698f, 0.698f);
			colors.disabledColor = new Color(0.521f, 0.521f, 0.521f);
		}

		private static void SetParentAndAlign(GameObject child, GameObject parent)
		{
			if (!((Object)(object)parent == (Object)null))
			{
				child.transform.SetParent(parent.transform, false);
				SetLayerRecursively(child, parent.layer);
			}
		}

		private static void SetLayerRecursively(GameObject go, int layer)
		{
			go.layer = layer;
			Transform transform = go.transform;
			for (int i = 0; i < transform.childCount; i++)
			{
				SetLayerRecursively(((Component)transform.GetChild(i)).gameObject, layer);
			}
		}

		public static GameObject CreatePanel(Resources resources)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: 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)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			GameObject obj = CreateUIElementRoot("Panel", s_ThickElementSize, typeof(Image));
			RectTransform component = obj.GetComponent<RectTransform>();
			component.anchorMin = Vector2.zero;
			component.anchorMax = Vector2.one;
			component.anchoredPosition = Vector2.zero;
			component.sizeDelta = Vector2.zero;
			Image component2 = obj.GetComponent<Image>();
			component2.sprite = resources.background;
			component2.type = Image.Type.Sliced;
			component2.color = s_PanelColor;
			return obj;
		}

		public static GameObject CreateButton(Resources resources)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = CreateUIElementRoot("Button", s_ThickElementSize, typeof(Image), typeof(Button));
			GameObject obj = CreateUIObject("Text", val, typeof(Text));
			Image component = val.GetComponent<Image>();
			component.sprite = resources.standard;
			component.type = Image.Type.Sliced;
			component.color = s_DefaultSelectableColor;
			SetDefaultColorTransitionValues(val.GetComponent<Button>());
			Text component2 = obj.GetComponent<Text>();
			component2.text = "Button";
			component2.alignment = (TextAnchor)4;
			SetDefaultTextValues(component2);
			RectTransform component3 = obj.GetComponent<RectTransform>();
			component3.anchorMin = Vector2.zero;
			component3.anchorMax = Vector2.one;
			component3.sizeDelta = Vector2.zero;
			return val;
		}

		public static GameObject CreateText(Resources resources)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			GameObject obj = CreateUIElementRoot("Text", s_ThickElementSize, typeof(Text));
			Text component = obj.GetComponent<Text>();
			component.text = "New Text";
			SetDefaultTextValues(component);
			return obj;
		}

		public static GameObject CreateImage(Resources resources)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return CreateUIElementRoot("Image", s_ImageElementSize, typeof(Image));
		}

		public static GameObject CreateRawImage(Resources resources)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return CreateUIElementRoot("RawImage", s_ImageElementSize, typeof(RawImage));
		}

		public static GameObject CreateSlider(Resources resources)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: Unknown result type (might be due to invalid IL or missing references)
			//IL_014e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_019a: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_021b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0236: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = CreateUIElementRoot("Slider", s_ThinElementSize, typeof(Slider));
			GameObject val2 = CreateUIObject("Background", val, typeof(Image));
			GameObject val3 = CreateUIObject("Fill Area", val, typeof(RectTransform));
			GameObject val4 = CreateUIObject("Fill", val3, typeof(Image));
			GameObject val5 = CreateUIObject("Handle Slide Area", val, typeof(RectTransform));
			GameObject val6 = CreateUIObject("Handle", val5, typeof(Image));
			Image component = val2.GetComponent<Image>();
			component.sprite = resources.background;
			component.type = Image.Type.Sliced;
			component.color = s_DefaultSelectableColor;
			RectTransform component2 = val2.GetComponent<RectTransform>();
			component2.anchorMin = new Vector2(0f, 0.25f);
			component2.anchorMax = new Vector2(1f, 0.75f);
			component2.sizeDelta = new Vector2(0f, 0f);
			RectTransform component3 = val3.GetComponent<RectTransform>();
			component3.anchorMin = new Vector2(0f, 0.25f);
			component3.anchorMax = new Vector2(1f, 0.75f);
			component3.anchoredPosition = new Vector2(-5f, 0f);
			component3.sizeDelta = new Vector2(-20f, 0f);
			Image component4 = val4.GetComponent<Image>();
			component4.sprite = resources.standard;
			component4.type = Image.Type.Sliced;
			component4.color = s_DefaultSelectableColor;
			val4.GetComponent<RectTransform>().sizeDelta = new Vector2(10f, 0f);
			RectTransform component5 = val5.GetComponent<RectTransform>();
			component5.sizeDelta = new Vector2(-20f, 0f);
			component5.anchorMin = new Vector2(0f, 0f);
			component5.anchorMax = new Vector2(1f, 1f);
			Image component6 = val6.GetComponent<Image>();
			component6.sprite = resources.knob;
			component6.color = s_DefaultSelectableColor;
			val6.GetComponent<RectTransform>().sizeDelta = new Vector2(20f, 0f);
			Slider component7 = val.GetComponent<Slider>();
			component7.fillRect = val4.GetComponent<RectTransform>();
			component7.handleRect = val6.GetComponent<RectTransform>();
			component7.targetGraphic = component6;
			component7.direction = Slider.Direction.LeftToRight;
			SetDefaultColorTransitionValues(component7);
			return val;
		}

		public static GameObject CreateScrollbar(Resources resources)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = CreateUIElementRoot("Scrollbar", s_ThinElementSize, typeof(Image), typeof(Scrollbar));
			GameObject val2 = CreateUIObject("Sliding Area", val, typeof(RectTransform));
			GameObject obj = CreateUIObject("Handle", val2, typeof(Image));
			Image component = val.GetComponent<Image>();
			component.sprite = resources.background;
			component.type = Image.Type.Sliced;
			component.color = s_DefaultSelectableColor;
			Image component2 = obj.GetComponent<Image>();
			component2.sprite = resources.standard;
			component2.type = Image.Type.Sliced;
			component2.color = s_DefaultSelectableColor;
			RectTransform component3 = val2.GetComponent<RectTransform>();
			component3.sizeDelta = new Vector2(-20f, -20f);
			component3.anchorMin = Vector2.zero;
			component3.anchorMax = Vector2.one;
			RectTransform component4 = obj.GetComponent<RectTransform>();
			component4.sizeDelta = new Vector2(20f, 20f);
			Scrollbar component5 = val.GetComponent<Scrollbar>();
			component5.handleRect = component4;
			component5.targetGraphic = component2;
			SetDefaultColorTransitionValues(component5);
			return val;
		}

		public static GameObject CreateToggle(Resources resources)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0132: Unknown result type (might be due to invalid IL or missing references)
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_0181: Unknown result type (might be due to invalid IL or missing references)
			//IL_0195: Unknown result type (might be due to invalid IL or missing references)
			//IL_01af: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ed: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = CreateUIElementRoot("Toggle", s_ThinElementSize, typeof(Toggle));
			GameObject val2 = CreateUIObject("Background", val, typeof(Image));
			GameObject val3 = CreateUIObject("Checkmark", val2, typeof(Image));
			GameObject obj = CreateUIObject("Label", val, typeof(Text));
			Toggle component = val.GetComponent<Toggle>();
			component.isOn = true;
			Image component2 = val2.GetComponent<Image>();
			component2.sprite = resources.standard;
			component2.type = Image.Type.Sliced;
			component2.color = s_DefaultSelectableColor;
			Image component3 = val3.GetComponent<Image>();
			component3.sprite = resources.checkmark;
			Text component4 = obj.GetComponent<Text>();
			component4.text = "Toggle";
			SetDefaultTextValues(component4);
			component.graphic = component3;
			component.targetGraphic = component2;
			SetDefaultColorTransitionValues(component);
			RectTransform component5 = val2.GetComponent<RectTransform>();
			component5.anchorMin = new Vector2(0f, 1f);
			component5.anchorMax = new Vector2(0f, 1f);
			component5.anchoredPosition = new Vector2(10f, -10f);
			component5.sizeDelta = new Vector2(20f, 20f);
			RectTransform component6 = val3.GetComponent<RectTransform>();
			component6.anchorMin = new Vector2(0.5f, 0.5f);
			component6.anchorMax = new Vector2(0.5f, 0.5f);
			component6.anchoredPosition = Vector2.zero;
			component6.sizeDelta = new Vector2(20f, 20f);
			RectTransform component7 = obj.GetComponent<RectTransform>();
			component7.anchorMin = new Vector2(0f, 0f);
			component7.anchorMax = new Vector2(1f, 1f);
			component7.offsetMin = new Vector2(23f, 1f);
			component7.offsetMax = new Vector2(-5f, -2f);
			return val;
		}

		public static GameObject CreateInputField(Resources resources)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_014f: Unknown result type (might be due to invalid IL or missing references)
			//IL_015a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0165: Unknown result type (might be due to invalid IL or missing references)
			//IL_017a: Unknown result type (might be due to invalid IL or missing references)
			//IL_018e: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = CreateUIElementRoot("InputField", s_ThickElementSize, typeof(Image), typeof(InputField));
			GameObject val2 = CreateUIObject("Placeholder", val, typeof(Text));
			GameObject obj = CreateUIObject("Text", val, typeof(Text));
			Image component = val.GetComponent<Image>();
			component.sprite = resources.inputField;
			component.type = Image.Type.Sliced;
			component.color = s_DefaultSelectableColor;
			InputField component2 = val.GetComponent<InputField>();
			SetDefaultColorTransitionValues(component2);
			Text component3 = obj.GetComponent<Text>();
			component3.text = "";
			component3.supportRichText = false;
			SetDefaultTextValues(component3);
			Text component4 = val2.GetComponent<Text>();
			component4.text = "Enter text...";
			component4.fontStyle = (FontStyle)2;
			Color color = component3.color;
			color.a *= 0.5f;
			component4.color = color;
			RectTransform component5 = obj.GetComponent<RectTransform>();
			component5.anchorMin = Vector2.zero;
			component5.anchorMax = Vector2.one;
			component5.sizeDelta = Vector2.zero;
			component5.offsetMin = new Vector2(10f, 6f);
			component5.offsetMax = new Vector2(-10f, -7f);
			RectTransform component6 = val2.GetComponent<RectTransform>();
			component6.anchorMin = Vector2.zero;
			component6.anchorMax = Vector2.one;
			component6.sizeDelta = Vector2.zero;
			component6.offsetMin = new Vector2(10f, 6f);
			component6.offsetMax = new Vector2(-10f, -7f);
			component2.textComponent = component3;
			component2.placeholder = component4;
			return val;
		}

		public static GameObject CreateDropdown(Resources resources)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_0199: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01af: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0209: Unknown result type (might be due to invalid IL or missing references)
			//IL_020e: Unknown result type (might be due to invalid IL or missing references)
			//IL_030f: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03da: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_0409: Unknown result type (might be due to invalid IL or missing references)
			//IL_041e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0433: Unknown result type (might be due to invalid IL or missing references)
			//IL_0447: Unknown result type (might be due to invalid IL or missing references)
			//IL_0462: Unknown result type (might be due to invalid IL or missing references)
			//IL_0477: Unknown result type (might be due to invalid IL or missing references)
			//IL_048c: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_04fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_050f: Unknown result type (might be due to invalid IL or missing references)
			//IL_052b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0540: Unknown result type (might be due to invalid IL or missing references)
			//IL_0555: Unknown result type (might be due to invalid IL or missing references)
			//IL_056a: Unknown result type (might be due to invalid IL or missing references)
			//IL_057e: Unknown result type (might be due to invalid IL or missing references)
			//IL_059a: Unknown result type (might be due to invalid IL or missing references)
			//IL_05af: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_0606: Unknown result type (might be due to invalid IL or missing references)
			//IL_061b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0630: Unknown result type (might be due to invalid IL or missing references)
			//IL_0644: Unknown result type (might be due to invalid IL or missing references)
			//IL_0654: Unknown result type (might be due to invalid IL or missing references)
			//IL_065f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0674: Unknown result type (might be due to invalid IL or missing references)
			//IL_0688: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = CreateUIElementRoot("Dropdown", s_ThickElementSize, typeof(Image), typeof(Dropdown));
			GameObject val2 = CreateUIObject("Label", val, typeof(Text));
			GameObject val3 = CreateUIObject("Arrow", val, typeof(Image));
			GameObject val4 = CreateUIObject("Template", val, typeof(Image), typeof(ScrollRect));
			GameObject val5 = CreateUIObject("Viewport", val4, typeof(Image), typeof(Mask));
			GameObject val6 = CreateUIObject("Content", val5, typeof(RectTransform));
			GameObject val7 = CreateUIObject("Item", val6, typeof(Toggle));
			GameObject val8 = CreateUIObject("Item Background", val7, typeof(Image));
			GameObject val9 = CreateUIObject("Item Checkmark", val7, typeof(Image));
			GameObject obj = CreateUIObject("Item Label", val7, typeof(Text));
			GameObject obj2 = CreateScrollbar(resources);
			((Object)obj2).name = "Scrollbar";
			SetParentAndAlign(obj2, val4);
			Scrollbar component = obj2.GetComponent<Scrollbar>();
			component.SetDirection(Scrollbar.Direction.BottomToTop, includeRectLayouts: true);
			RectTransform component2 = obj2.GetComponent<RectTransform>();
			component2.anchorMin = Vector2.right;
			component2.anchorMax = Vector2.one;
			component2.pivot = Vector2.one;
			component2.sizeDelta = new Vector2(component2.sizeDelta.x, 0f);
			Text component3 = obj.GetComponent<Text>();
			SetDefaultTextValues(component3);
			component3.alignment = (TextAnchor)3;
			Image component4 = val8.GetComponent<Image>();
			component4.color = Color32.op_Implicit(new Color32((byte)245, (byte)245, (byte)245, byte.MaxValue));
			Image component5 = val9.GetComponent<Image>();
			component5.sprite = resources.checkmark;
			Toggle component6 = val7.GetComponent<Toggle>();
			component6.targetGraphic = component4;
			component6.graphic = component5;
			component6.isOn = true;
			Image component7 = val4.GetComponent<Image>();
			component7.sprite = resources.standard;
			component7.type = Image.Type.Sliced;
			ScrollRect component8 = val4.GetComponent<ScrollRect>();
			component8.content = val6.GetComponent<RectTransform>();
			component8.viewport = val5.GetComponent<RectTransform>();
			component8.horizontal = false;
			component8.movementType = ScrollRect.MovementType.Clamped;
			component8.verticalScrollbar = component;
			component8.verticalScrollbarVisibility = ScrollRect.ScrollbarVisibility.AutoHideAndExpandViewport;
			component8.verticalScrollbarSpacing = -3f;
			val5.GetComponent<Mask>().showMaskGraphic = false;
			Image component9 = val5.GetComponent<Image>();
			component9.sprite = resources.mask;
			component9.type = Image.Type.Sliced;
			Text component10 = val2.GetComponent<Text>();
			SetDefaultTextValues(component10);
			component10.alignment = (TextAnchor)3;
			val3.GetComponent<Image>().sprite = resources.dropdown;
			Image component11 = val.GetComponent<Image>();
			component11.sprite = resources.standard;
			component11.color = s_DefaultSelectableColor;
			component11.type = Image.Type.Sliced;
			Dropdown component12 = val.GetComponent<Dropdown>();
			component12.targetGraphic = component11;
			SetDefaultColorTransitionValues(component12);
			component12.template = val4.GetComponent<RectTransform>();
			component12.captionText = component10;
			component12.itemText = component3;
			component3.text = "Option A";
			component12.options.Add(new Dropdown.OptionData
			{
				text = "Option A"
			});
			component12.options.Add(new Dropdown.OptionData
			{
				text = "Option B"
			});
			component12.options.Add(new Dropdown.OptionData
			{
				text = "Option C"
			});
			component12.RefreshShownValue();
			RectTransform component13 = val2.GetComponent<RectTransform>();
			component13.anchorMin = Vector2.zero;
			component13.anchorMax = Vector2.one;
			component13.offsetMin = new Vector2(10f, 6f);
			component13.offsetMax = new Vector2(-25f, -7f);
			RectTransform component14 = val3.GetComponent<RectTransform>();
			component14.anchorMin = new Vector2(1f, 0.5f);
			component14.anchorMax = new Vector2(1f, 0.5f);
			component14.sizeDelta = new Vector2(20f, 20f);
			component14.anchoredPosition = new Vector2(-15f, 0f);
			RectTransform component15 = val4.GetComponent<RectTransform>();
			component15.anchorMin = new Vector2(0f, 0f);
			component15.anchorMax = new Vector2(1f, 0f);
			component15.pivot = new Vector2(0.5f, 1f);
			component15.anchoredPosition = new Vector2(0f, 2f);
			component15.sizeDelta = new Vector2(0f, 150f);
			RectTransform component16 = val5.GetComponent<RectTransform>();
			component16.anchorMin = new Vector2(0f, 0f);
			component16.anchorMax = new Vector2(1f, 1f);
			component16.sizeDelta = new Vector2(-18f, 0f);
			component16.pivot = new Vector2(0f, 1f);
			RectTransform component17 = val6.GetComponent<RectTransform>();
			component17.anchorMin = new Vector2(0f, 1f);
			component17.anchorMax = new Vector2(1f, 1f);
			component17.pivot = new Vector2(0.5f, 1f);
			component17.anchoredPosition = new Vector2(0f, 0f);
			component17.sizeDelta = new Vector2(0f, 28f);
			RectTransform component18 = val7.GetComponent<RectTransform>();
			component18.anchorMin = new Vector2(0f, 0.5f);
			component18.anchorMax = new Vector2(1f, 0.5f);
			component18.sizeDelta = new Vector2(0f, 20f);
			RectTransform component19 = val8.GetComponent<RectTransform>();
			component19.anchorMin = Vector2.zero;
			component19.anchorMax = Vector2.one;
			component19.sizeDelta = Vector2.zero;
			RectTransform component20 = val9.GetComponent<RectTransform>();
			component20.anchorMin = new Vector2(0f, 0.5f);
			component20.anchorMax = new Vector2(0f, 0.5f);
			component20.sizeDelta = new Vector2(20f, 20f);
			component20.anchoredPosition = new Vector2(10f, 0f);
			RectTransform component21 = obj.GetComponent<RectTransform>();
			component21.anchorMin = Vector2.zero;
			component21.anchorMax = Vector2.one;
			component21.offsetMin = new Vector2(20f, 1f);
			component21.offsetMax = new Vector2(-10f, -2f);
			val4.SetActive(false);
			return val;
		}

		public static GameObject CreateScrollView(Resources resources)
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Unknown result type (might be due to invalid IL or missing references)
			//IL_0142: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_0162: Unknown result type (might be due to invalid IL or missing references)
			//IL_016e: Unknown result type (might be due to invalid IL or missing references)
			//IL_017a: Unknown result type (might be due to invalid IL or missing references)
			//IL_018d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0199: Unknown result type (might be due to invalid IL or missing references)
			//IL_01af: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0230: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = CreateUIElementRoot("Scroll View", new Vector2(200f, 200f), typeof(Image), typeof(ScrollRect));
			GameObject val2 = CreateUIObject("Viewport", val, typeof(Image), typeof(Mask));
			GameObject obj = CreateUIObject("Content", val2, typeof(RectTransform));
			GameObject val3 = CreateScrollbar(resources);
			((Object)val3).name = "Scrollbar Horizontal";
			SetParentAndAlign(val3, val);
			RectTransform component = val3.GetComponent<RectTransform>();
			component.anchorMin = Vector2.zero;
			component.anchorMax = Vector2.right;
			component.pivot = Vector2.zero;
			component.sizeDelta = new Vector2(0f, component.sizeDelta.y);
			GameObject val4 = CreateScrollbar(resources);
			((Object)val4).name = "Scrollbar Vertical";
			SetParentAndAlign(val4, val);
			val4.GetComponent<Scrollbar>().SetDirection(Scrollbar.Direction.BottomToTop, includeRectLayouts: true);
			RectTransform component2 = val4.GetComponent<RectTransform>();
			component2.anchorMin = Vector2.right;
			component2.anchorMax = Vector2.one;
			component2.pivot = Vector2.one;
			component2.sizeDelta = new Vector2(component2.sizeDelta.x, 0f);
			RectTransform component3 = val2.GetComponent<RectTransform>();
			component3.anchorMin = Vector2.zero;
			component3.anchorMax = Vector2.one;
			component3.sizeDelta = Vector2.zero;
			component3.pivot = Vector2.up;
			RectTransform component4 = obj.GetComponent<RectTransform>();
			component4.anchorMin = Vector2.up;
			component4.anchorMax = Vector2.one;
			component4.sizeDelta = new Vector2(0f, 300f);
			component4.pivot = Vector2.up;
			ScrollRect component5 = val.GetComponent<ScrollRect>();
			component5.content = component4;
			component5.viewport = component3;
			component5.horizontalScrollbar = val3.GetComponent<Scrollbar>();
			component5.verticalScrollbar = val4.GetComponent<Scrollbar>();
			component5.horizontalScrollbarVisibility = ScrollRect.ScrollbarVisibility.AutoHideAndExpandViewport;
			component5.verticalScrollbarVisibility = ScrollRect.ScrollbarVisibility.AutoHideAndExpandViewport;
			component5.horizontalScrollbarSpacing = -3f;
			component5.verticalScrollbarSpacing = -3f;
			Image component6 = val.GetComponent<Image>();
			component6.sprite = resources.background;
			component6.type = Image.Type.Sliced;
			component6.color = s_PanelColor;
			val2.GetComponent<Mask>().showMaskGraphic = false;
			Image component7 = val2.GetComponent<Image>();
			component7.sprite = resources.mask;
			component7.type = Image.Type.Sliced;
			return val;
		}
	}
	[AddComponentMenu("UI/Dropdown", 35)]
	[RequireComponent(typeof(RectTransform))]
	public class Dropdown : Selectable, IPointerClickHandler, IEventSystemHandler, ISubmitHandler, ICancelHandler
	{
		protected internal class DropdownItem : MonoBehaviour, IPointerEnterHandler, IEventSystemHandler, ICancelHandler
		{
			[SerializeField]
			private Text m_Text;

			[SerializeField]
			private Image m_Image;

			[SerializeField]
			private RectTransform m_RectTransform;

			[SerializeField]
			private Toggle m_Toggle;

			public Text text
			{
				get
				{
					return m_Text;
				}
				set
				{
					m_Text = value;
				}
			}

			public Image image
			{
				get
				{
					return m_Image;
				}
				set
				{
					m_Image = value;
				}
			}

			public RectTransform rectTransform
			{
				get
				{
					return m_RectTransform;
				}
				set
				{
					m_RectTransform = value;
				}
			}

			public Toggle toggle
			{
				get
				{
					return m_Toggle;
				}
				set
				{
					m_Toggle = value;
				}
			}

			public virtual void OnPointerEnter(PointerEventData eventData)
			{
				EventSystem.current.SetSelectedGameObject(((Component)this).gameObject);
			}

			public virtual void OnCancel(BaseEventData eventData)
			{
				Dropdown componentInParent = ((Component)this).GetComponentInParent<Dropdown>();
				if (Object.op_Implicit((Object)(object)componentInParent))
				{
					componentInParent.Hide();
				}
			}
		}

		[Serializable]
		public class OptionData
		{
			[SerializeField]
			private string m_Text;

			[SerializeField]
			private Sprite m_Image;

			public string text
			{
				get
				{
					return m_Text;
				}
				set
				{
					m_Text = value;
				}
			}

			public Sprite image
			{
				get
				{
					return m_Image;
				}
				set
				{
					m_Image = value;
				}
			}

			public OptionData()
			{
			}

			public OptionData(string text)
			{
				this.text = text;
			}

			public OptionData(Sprite image)
			{
				this.image = image;
			}

			public OptionData(string text, Sprite image)
			{
				this.text = text;
				this.image = image;
			}
		}

		[Serializable]
		public class OptionDataList
		{
			[SerializeField]
			private List<OptionData> m_Options;

			public List<OptionData> options
			{
				get
				{
					return m_Options;
				}
				set
				{
					m_Options = value;
				}
			}

			public OptionDataList()
			{
				options = new List<OptionData>();
			}
		}

		[Serializable]
		public class DropdownEvent : UnityEvent<int>
		{
		}

		[SerializeField]
		private RectTransform m_Template;

		[SerializeField]
		private Text m_CaptionText;

		[SerializeField]
		private Image m_CaptionImage;

		[Space]
		[SerializeField]
		private Text m_ItemText;

		[SerializeField]
		private Image m_ItemImage;

		[Space]
		[SerializeField]
		private int m_Value;

		[Space]
		[SerializeField]
		private OptionDataList m_Options = new OptionDataList();

		[Space]
		[SerializeField]
		private DropdownEvent m_OnValueChanged = new DropdownEvent();

		[SerializeField]
		private float m_AlphaFadeSpeed = 0.15f;

		private GameObject m_Dropdown;

		private GameObject m_Blocker;

		private List<DropdownItem> m_Items = new List<DropdownItem>();

		private TweenRunner<FloatTween> m_AlphaTweenRunner;

		private bool validTemplate;

		private static OptionData s_NoOptionData = new OptionData();

		public RectTransform template
		{
			get
			{
				return m_Template;
			}
			set
			{
				m_Template = value;
				RefreshShownValue();
			}
		}

		public Text captionText
		{
			get
			{
				return m_CaptionText;
			}
			set
			{
				m_CaptionText = value;
				RefreshShownValue();
			}
		}

		public Image captionImage
		{
			get
			{
				return m_CaptionImage;
			}
			set
			{
				m_CaptionImage = value;
				RefreshShownValue();
			}
		}

		public Text itemText
		{
			get
			{
				return m_ItemText;
			}
			set
			{
				m_ItemText = value;
				RefreshShownValue();
			}
		}

		public Image itemImage
		{
			get
			{
				return m_ItemImage;
			}
			set
			{
				m_ItemImage = value;
				RefreshShownValue();
			}
		}

		public List<OptionData> options
		{
			get
			{
				return m_Options.options;
			}
			set
			{
				m_Options.options = value;
				RefreshShownValue();
			}
		}

		public DropdownEvent onValueChanged
		{
			get
			{
				return m_OnValueChanged;
			}
			set
			{
				m_OnValueChanged = value;
			}
		}

		public float alphaFadeSpeed
		{
			get
			{
				return m_AlphaFadeSpeed;
			}
			set
			{
				m_AlphaFadeSpeed = value;
			}
		}

		public int value
		{
			get
			{
				return m_Value;
			}
			set
			{
				Set(value);
			}
		}

		public void SetValueWithoutNotify(int input)
		{
			Set(input, sendCallback: false);
		}

		private void Set(int value, bool sendCallback = true)
		{
			if (!Application.isPlaying || (value != m_Value && options.Count != 0))
			{
				m_Value = Mathf.Clamp(value, 0, options.Count - 1);
				RefreshShownValue();
				if (sendCallback)
				{
					UISystemProfilerApi.AddMarker("Dropdown.value", (Object)(object)this);
					((UnityEvent<int>)m_OnValueChanged).Invoke(m_Value);
				}
			}
		}

		protected Dropdown()
		{
		}

		protected override void Awake()
		{
			m_AlphaTweenRunner = new TweenRunner<FloatTween>();
			m_AlphaTweenRunner.Init((MonoBehaviour)(object)this);
			if (Object.op_Implicit((Object)(object)m_CaptionImage))
			{
				((Behaviour)m_CaptionImage).enabled = (Object)(object)m_CaptionImage.sprite != (Object)null;
			}
			if (Object.op_Implicit((Object)(object)m_Template))
			{
				((Component)m_Template).gameObject.SetActive(false);
			}
		}

		protected override void Start()
		{
			base.Start();
			RefreshShownValue();
		}

		protected override void OnDisable()
		{
			ImmediateDestroyDropdownList();
			if ((Object)(object)m_Blocker != (Object)null)
			{
				DestroyBlocker(m_Blocker);
			}
			m_Blocker = null;
			base.OnDisable();
		}

		public void RefreshShownValue()
		{
			OptionData optionData = s_NoOptionData;
			if (options.Count > 0)
			{
				optionData = options[Mathf.Clamp(m_Value, 0, options.Count - 1)];
			}
			if (Object.op_Implicit((Object)(object)m_CaptionText))
			{
				if (optionData != null && optionData.text != null)
				{
					m_CaptionText.text = optionData.text;
				}
				else
				{
					m_CaptionText.text = "";
				}
			}
			if (Object.op_Implicit((Object)(object)m_CaptionImage))
			{
				if (optionData != null)
				{
					m_CaptionImage.sprite = optionData.image;
				}
				else
				{
					m_CaptionImage.sprite = null;
				}
				((Behaviour)m_CaptionImage).enabled = (Object)(object)m_CaptionImage.sprite != (Object)null;
			}
		}

		public void AddOptions(List<OptionData> options)
		{
			this.options.AddRange(options);
			RefreshShownValue();
		}

		public void AddOptions(List<string> options)
		{
			for (int i = 0; i < options.Count; i++)
			{
				this.options.Add(new OptionData(options[i]));
			}
			RefreshShownValue();
		}

		public void AddOptions(List<Sprite> options)
		{
			for (int i = 0; i < options.Count; i++)
			{
				this.options.Add(new OptionData(options[i]));
			}
			RefreshShownValue();
		}

		public void ClearOptions()
		{
			options.Clear();
			m_Value = 0;
			RefreshShownValue();
		}

		private void SetupTemplate()
		{
			//IL_0164: Unknown result type (might be due to invalid IL or missing references)
			//IL_016e: Expected O, but got Unknown
			validTemplate = false;
			if (!Object.op_Implicit((Object)(object)m_Template))
			{
				Debug.LogError((object)"The dropdown template is not assigned. The template needs to be assigned and must have a child GameObject with a Toggle component serving as the item.", (Object)(object)this);
				return;
			}
			GameObject gameObject = ((Component)m_Template).gameObject;
			gameObject.SetActive(true);
			Toggle componentInChildren = ((Component)m_Template).GetComponentInChildren<Toggle>();
			validTemplate = true;
			if (!Object.op_Implicit((Object)(object)componentInChildren) || (Object)(object)((Component)componentInChildren).transform == (Object)(object)template)
			{
				validTemplate = false;
				Debug.LogError((object)"The dropdown template is not valid. The template must have a child GameObject with a Toggle component serving as the item.", (Object)(object)template);
			}
			else if (!(((Component)componentInChildren).transform.parent is RectTransform))
			{
				validTemplate = false;
				Debug.LogError((object)"The dropdown template is not valid. The child GameObject with a Toggle component (the item) must have a RectTransform on its parent.", (Object)(object)template);
			}
			else if ((Object)(object)itemText != (Object)null && !((Component)itemText).transform.IsChildOf(((Component)componentInChildren).transform))
			{
				validTemplate = false;
				Debug.LogError((object)"The dropdown template is not valid. The Item Text must be on the item GameObject or children of it.", (Object)(object)template);
			}
			else if ((Object)(object)itemImage != (Object)null && !((Component)itemImage).transform.IsChildOf(((Component)componentInChildren).transform))
			{
				validTemplate = false;
				Debug.LogError((object)"The dropdown template is not valid. The Item Image must be on the item GameObject or children of it.", (Object)(object)template);
			}
			if (!validTemplate)
			{
				gameObject.SetActive(false);
				return;
			}
			DropdownItem dropdownItem = ((Component)componentInChildren).gameObject.AddComponent<DropdownItem>();
			dropdownItem.text = m_ItemText;
			dropdownItem.image = m_ItemImage;
			dropdownItem.toggle = componentInChildren;
			dropdownItem.rectTransform = (RectTransform)((Component)componentInChildren).transform;
			Canvas val = null;
			Transform parent = ((Transform)m_Template).parent;
			while ((Object)(object)parent != (Object)null)
			{
				val = ((Component)parent).GetComponent<Canvas>();
				if ((Object)(object)val != (Object)null)
				{
					break;
				}
				parent = parent.parent;
			}
			Canvas orAddComponent = GetOrAddComponent<Canvas>(gameObject);
			orAddComponent.overrideSorting = true;
			orAddComponent.sortingOrder = 30000;
			if ((Object)(object)val != (Object)null)
			{
				Component[] components = (Component[])(object)((Component)val).GetComponents<BaseRaycaster>();
				Component[] array = components;
				for (int i = 0; i < array.Length; i++)
				{
					Type type = ((object)array[i]).GetType();
					if ((Object)(object)gameObject.GetComponent(type) == (Object)null)
					{
						gameObject.AddComponent(type);
					}
				}
			}
			else
			{
				GetOrAddComponent<GraphicRaycaster>(gameObject);
			}
			GetOrAddComponent<CanvasGroup>(gameObject);
			gameObject.SetActive(false);
			validTemplate = true;
		}

		private static T GetOrAddComponent<T>(GameObject go) where T : Component
		{
			T val = go.GetComponent<T>();
			if (!Object.op_Implicit((Object)(object)val))
			{
				val = go.AddComponent<T>();
			}
			return val;
		}

		public virtual void OnPointerClick(PointerEventData eventData)
		{
			Show();
		}

		public virtual void OnSubmit(BaseEventData eventData)
		{
			Show();
		}

		public virtual void OnCancel(BaseEventData eventData)
		{
			Hide();
		}

		public void Show()
		{
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: Unknown result type (might be due to invalid IL or missing references)
			//IL_0165: Unknown result type (might be due to invalid IL or missing references)
			//IL_0169: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: Unknown result type (might be due to invalid IL or missing references)
			//IL_0185: Unknown result type (might be due to invalid IL or missing references)
			//IL_018a: Unknown result type (might be due to invalid IL or missing references)
			//IL_018f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0193: Unknown result type (might be due to invalid IL or missing references)
			//IL_019a: Unknown result type (might be due to invalid IL or missing references)
			//IL_019f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_01af: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0341: Unknown result type (might be due to invalid IL or missing references)
			//IL_0346: Unknown result type (might be due to invalid IL or missing references)
			//IL_034a: Unknown result type (might be due to invalid IL or missing references)
			//IL_035e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0366: Unknown result type (might be due to invalid IL or missing references)
			//IL_0375: Unknown result type (might be due to invalid IL or missing references)
			//IL_037d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0382: Unknown result type (might be due to invalid IL or missing references)
			//IL_038d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0392: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_040a: Unknown result type (might be due to invalid IL or missing references)
			//IL_040f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0414: Unknown result type (might be due to invalid IL or missing references)
			//IL_0421: Unknown result type (might be due to invalid IL or missing references)
			//IL_0426: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0500: Unknown result type (might be due to invalid IL or missing references)
			//IL_050f: Unknown result type (might be due to invalid IL or missing references)
			//IL_051d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0527: Unknown result type (might be due to invalid IL or missing references)
			//IL_052e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0548: Unknown result type (might be due to invalid IL or missing references)
			//IL_0551: Unknown result type (might be due to invalid IL or missing references)
			//IL_055d: Unknown result type (might be due to invalid IL or missing references)
			//IL_056b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0575: Unknown result type (might be due to invalid IL or missing references)
			//IL_057c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0460: Unknown result type (might be due to invalid IL or missing references)
			//IL_0465: Unknown result type (might be due to invalid IL or missing references)
			//IL_043e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0443: Unknown result type (might be due to invalid IL or missing references)
			//IL_047d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0482: Unknown result type (might be due to invalid IL or missing references)
			if (!IsActive() || !IsInteractable() || (Object)(object)m_Dropdown != (Object)null)
			{
				return;
			}
			List<Canvas> list = ListPool<Canvas>.Get();
			((Component)this).gameObject.GetComponentsInParent<Canvas>(false, list);
			if (list.Count == 0)
			{
				return;
			}
			Canvas val = list[list.Count - 1];
			for (int i = 0; i < list.Count; i++)
			{
				if (list[i].isRootCanvas)
				{
					val = list[i];
					break;
				}
			}
			ListPool<Canvas>.Release(list);
			if (!validTemplate)
			{
				SetupTemplate();
				if (!validTemplate)
				{
					return;
				}
			}
			((Component)m_Template).gameObject.SetActive(true);
			((Component)m_Template).GetComponent<Canvas>().sortingLayerID = val.sortingLayerID;
			m_Dropdown = CreateDropdownList(((Component)m_Template).gameObject);
			((Object)m_Dropdown).name = "Dropdown List";
			m_Dropdown.SetActive(true);
			Transform transform = m_Dropdown.transform;
			RectTransform val2 = (RectTransform)(object)((transform is RectTransform) ? transform : null);
			((Transform)val2).SetParent(((Component)m_Template).transform.parent, false);
			DropdownItem componentInChildren = m_Dropdown.GetComponentInChildren<DropdownItem>();
			Transform transform2 = ((Component)((Transform)componentInChildren.rectTransform).parent).gameObject.transform;
			RectTransform val3 = (RectTransform)(object)((transform2 is RectTransform) ? transform2 : null);
			((Component)componentInChildren.rectTransform).gameObject.SetActive(true);
			Rect rect = val3.rect;
			Rect rect2 = componentInChildren.rectTransform.rect;
			Vector2 val4 = ((Rect)(ref rect2)).min - ((Rect)(ref rect)).min + Vector2.op_Implicit(((Transform)componentInChildren.rectTransform).localPosition);
			Vector2 val5 = ((Rect)(ref rect2)).max - ((Rect)(ref rect)).max + Vector2.op_Implicit(((Transform)componentInChildren.rectTransform).localPosition);
			Vector2 size = ((Rect)(ref rect2)).size;
			m_Items.Clear();
			Toggle toggle = null;
			for (int j = 0; j < options.Count; j++)
			{
				OptionData data = options[j];
				DropdownItem item = AddItem(data, value == j, componentInChildren, m_Items);
				if (!((Object)(object)item == (Object)null))
				{
					item.toggle.isOn = value == j;
					((UnityEvent<bool>)item.toggle.onValueChanged).AddListener((UnityAction<bool>)delegate
					{
						OnSelectItem(item.toggle);
					});
					if (item.toggle.isOn)
					{
						item.toggle.Select();
					}
					if ((Object)(object)toggle != (Object)null)
					{
						Navigation navigation = toggle.navigation;
						Navigation navigation2 = item.toggle.navigation;
						navigation.mode = Navigation.Mode.Explicit;
						navigation2.mode = Navigation.Mode.Explicit;
						navigation.selectOnDown = item.toggle;
						navigation.selectOnRight = item.toggle;
						navigation2.selectOnLeft = toggle;
						navigation2.selectOnUp = toggle;
						toggle.navigation = navigation;
						item.toggle.navigation = navigation2;
					}
					toggle = item.toggle;
				}
			}
			Vector2 sizeDelta = val3.sizeDelta;
			sizeDelta.y = size.y * (float)m_Items.Count + val4.y - val5.y;
			val3.sizeDelta = sizeDelta;
			Rect rect3 = val2.rect;
			float height = ((Rect)(ref rect3)).height;
			rect3 = val3.rect;
			float num = height - ((Rect)(ref rect3)).height;
			if (num > 0f)
			{
				val2.sizeDelta = new Vector2(val2.sizeDelta.x, val2.sizeDelta.y - num);
			}
			Vector3[] array = (Vector3[])(object)new Vector3[4];
			val2.GetWorldCorners(array);
			Transform transform3 = ((Component)val).transform;
			RectTransform val6 = (RectTransform)(object)((transform3 is RectTransform) ? transform3 : null);
			Rect rect4 = val6.rect;
			for (int k = 0; k < 2; k++)
			{
				bool flag = false;
				for (int l = 0; l < 4; l++)
				{
					Vector3 val7 = ((Transform)val6).InverseTransformPoint(array[l]);
					float num2 = ((Vector3)(ref val7))[k];
					Vector2 val8 = ((Rect)(ref rect4)).min;
					if (num2 < ((Vector2)(ref val8))[k])
					{
						float num3 = ((Vector3)(ref val7))[k];
						val8 = ((Rect)(ref rect4)).min;
						if (!Mathf.Approximately(num3, ((Vector2)(ref val8))[k]))
						{
							goto IL_0494;
						}
					}
					float num4 = ((Vector3)(ref val7))[k];
					val8 = ((Rect)(ref rect4)).max;
					if (!(num4 > ((Vector2)(ref val8))[k]))
					{
						continue;
					}
					float num5 = ((Vector3)(ref val7))[k];
					val8 = ((Rect)(ref rect4)).max;
					if (Mathf.Approximately(num5, ((Vector2)(ref val8))[k]))
					{
						continue;
					}
					goto IL_0494;
					IL_0494:
					flag = true;
					break;
				}
				if (flag)
				{
					RectTransformUtility.FlipLayoutOnAxis(val2, k, false, false);
				}
			}
			for (int m = 0; m < m_Items.Count; m++)
			{
				RectTransform rectTransform = m_Items[m].rectTransform;
				rectTransform.anchorMin = new Vector2(rectTransform.anchorMin.x, 0f);
				rectTransform.anchorMax = new Vector2(rectTransform.anchorMax.x, 0f);
				rectTransform.anchoredPosition = new Vector2(rectTransform.anchoredPosition.x, val4.y + size.y * (float)(m_Items.Count - 1 - m) + size.y * rectTransform.pivot.y);
				rectTransform.sizeDelta = new Vector2(rectTransform.sizeDelta.x, size.y);
			}
			AlphaFadeList(m_AlphaFadeSpeed, 0f, 1f);
			((Component)m_Template).gameObject.SetActive(false);
			((Component)componentInChildren).gameObject.SetActive(false);
			m_Blocker = CreateBlocker(val);
		}

		protected virtual GameObject CreateBlocker(Canvas rootCanvas)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Expected O, but got Unknown
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Expected O, but got Unknown
			GameObject val = new GameObject("Blocker");
			RectTransform obj = val.AddComponent<RectTransform>();
			((Transform)obj).SetParent(((Component)rootCanvas).transform, false);
			obj.anchorMin = Vector2.op_Implicit(Vector3.zero);
			obj.anchorMax = Vector2.op_Implicit(Vector3.one);
			obj.sizeDelta = Vector2.zero;
			Canvas obj2 = val.AddComponent<Canvas>();
			obj2.overrideSorting = true;
			Canvas component = m_Dropdown.GetComponent<Canvas>();
			obj2.sortingLayerID = component.sortingLayerID;
			obj2.sortingOrder = component.sortingOrder - 1;
			Canvas val2 = null;
			Transform parent = ((Transform)m_Template).parent;
			while ((Object)(object)parent != (Object)null)
			{
				val2 = ((Component)parent).GetComponent<Canvas>();
				if ((Object)(object)val2 != (Object)null)
				{
					break;
				}
				parent = parent.parent;
			}
			if ((Object)(object)val2 != (Object)null)
			{
				Component[] components = (Component[])(object)((Component)val2).GetComponents<BaseRaycaster>();
				Component[] array = components;
				for (int i = 0; i < array.Length; i++)
				{
					Type type = ((object)array[i]).GetType();
					if ((Object)(object)val.GetComponent(type) == (Object)null)
					{
						val.AddComponent(type);
					}
				}
			}
			else
			{
				GetOrAddComponent<GraphicRaycaster>(val);
			}
			val.AddComponent<Image>().color = Color.clear;
			((UnityEvent)val.AddComponent<Button>().onClick).AddListener(new UnityAction(Hide));
			return val;
		}

		protected virtual void DestroyBlocker(GameObject blocker)
		{
			Object.Destroy((Object)(object)blocker);
		}

		protected virtual GameObject CreateDropdownList(GameObject template)
		{
			return Object.Instantiate<GameObject>(template);
		}

		protected virtual void DestroyDropdownList(GameObject dropdownList)
		{
			Object.Destroy((Object)(object)dropdownList);
		}

		protected virtual DropdownItem CreateItem(DropdownItem itemTemplate)
		{
			return Object.Instantiate<DropdownItem>(itemTemplate);
		}

		protected virtual void DestroyItem(DropdownItem item)
		{
		}

		private DropdownItem AddItem(OptionData data, bool selected, DropdownItem itemTemplate, List<DropdownItem> items)
		{
			DropdownItem dropdownItem = CreateItem(itemTemplate);
			((Transform)dropdownItem.rectTransform).SetParent(((Transform)itemTemplate.rectTransform).parent, false);
			((Component)dropdownItem).gameObject.SetActive(true);
			((Object)((Component)dropdownItem).gameObject).name = "Item " + items.Count + ((data.text != null) ? (": " + data.text) : "");
			if ((Object)(object)dropdownItem.toggle != (Object)null)
			{
				dropdownItem.toggle.isOn = false;
			}
			if (Object.op_Implicit((Object)(object)dropdownItem.text))
			{
				dropdownItem.text.text = data.text;
			}
			if (Object.op_Implicit((Object)(object)dropdownItem.image))
			{
				dropdownItem.image.sprite = data.image;
				((Behaviour)dropdownItem.image).enabled = (Object)(object)dropdownItem.image.sprite != (Object)null;
			}
			items.Add(dropdownItem);
			return dropdownItem;
		}

		private void AlphaFadeList(float duration, float alpha)
		{
			CanvasGroup component = m_Dropdown.GetComponent<CanvasGroup>();
			AlphaFadeList(duration, component.alpha, alpha);
		}

		private void AlphaFadeList(float duration, float start, float end)
		{
			if (!end.Equals(start))
			{
				FloatTween floatTween = default(FloatTween);
				floatTween.duration = duration;
				floatTween.startValue = start;
				floatTween.targetValue = end;
				FloatTween info = floatTween;
				info.AddOnChangedCallback(SetAlpha);
				info.ignoreTimeScale = true;
				m_AlphaTweenRunner.StartTween(info);
			}
		}

		private void SetAlpha(float alpha)
		{
			if (Object.op_Implicit((Object)(object)m_Dropdown))
			{
				m_Dropdown.GetComponent<CanvasGroup>().alpha = alpha;
			}
		}

		public void Hide()
		{
			if ((Object)(object)m_Dropdown != (Object)null)
			{
				AlphaFadeList(m_AlphaFadeSpeed, 0f);
				if (IsActive())
				{
					((MonoBehaviour)this).StartCoroutine(DelayedDestroyDropdownList(m_AlphaFadeSpeed));
				}
			}
			if ((Object)(object)m_Blocker != (Object)null)
			{
				DestroyBlocker(m_Blocker);
			}
			m_Blocker = null;
			Select();
		}

		private IEnumerator DelayedDestroyDropdownList(float delay)
		{
			yield return (object)new WaitForSecondsRealtime(delay);
			ImmediateDestroyDropdownList();
		}

		private void ImmediateDestroyDropdownList()
		{
			for (int i = 0; i < m_Items.Count; i++)
			{
				if ((Object)(object)m_Items[i] != (Object)null)
				{
					DestroyItem(m_Items[i]);
				}
			}
			m_Items.Clear();
			if ((Object)(object)m_Dropdown != (Object)null)
			{
				DestroyDropdownList(m_Dropdown);
			}
			m_Dropdown = null;
		}

		private void OnSelectItem(Toggle toggle)
		{
			if (!toggle.isOn)
			{
				toggle.isOn = true;
			}
			int num = -1;
			Transform transform = ((Component)toggle).transform;
			Transform parent = transform.parent;
			for (int i = 0; i < parent.childCount; i++)
			{
				if ((Object)(object)parent.GetChild(i) == (Object)(object)transform)
				{
					num = i - 1;
					break;
				}
			}
			if (num >= 0)
			{
				value = num;
				Hide();
			}
		}
	}
	[Serializable]
	public class FontData : ISerializationCallbackReceiver
	{
		[SerializeField]
		[FormerlySerializedAs("font")]
		private Font m_Font;

		[SerializeField]
		[FormerlySerializedAs("fontSize")]
		private int m_FontSize;

		[SerializeField]
		[FormerlySerializedAs("fontStyle")]
		private FontStyle m_FontStyle;

		[SerializeField]
		private bool m_BestFit;

		[SerializeField]
		private int m_MinSize;

		[SerializeField]
		private int m_MaxSize;

		[SerializeField]
		[FormerlySerializedAs("alignment")]
		private TextAnchor m_Alignment;

		[SerializeField]
		private bool m_AlignByGeometry;

		[SerializeField]
		[FormerlySerializedAs("richText")]
		private bool m_RichText;

		[SerializeField]
		private HorizontalWrapMode m_HorizontalOverflow;

		[SerializeField]
		private VerticalWrapMode m_VerticalOverflow;

		[SerializeField]
		private float m_LineSpacing;

		public static FontData defaultFontData => new FontData
		{
			m_FontSize = 14,
			m_LineSpacing = 1f,
			m_FontStyle = (FontStyle)0,
			m_BestFit = false,
			m_MinSize = 10,
			m_MaxSize = 40,
			m_Alignment = (TextAnchor)0,
			m_HorizontalOverflow = (HorizontalWrapMode)0,
			m_VerticalOverflow = (VerticalWrapMode)0,
			m_RichText = true,
			m_AlignByGeometry = false
		};

		public Font font
		{
			get
			{
				return m_Font;
			}
			set
			{
				m_Font = value;
			}
		}

		public int fontSize
		{
			get
			{
				return m_FontSize;
			}
			set
			{
				m_FontSize = value;
			}
		}

		public FontStyle fontStyle
		{
			get
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				return m_FontStyle;
			}
			set
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				m_FontStyle = value;
			}
		}

		public bool bestFit
		{
			get
			{
				return m_BestFit;
			}
			set
			{
				m_BestFit = value;
			}
		}

		public int minSize
		{
			get
			{
				return m_MinSize;
			}
			set
			{
				m_MinSize = value;
			}
		}

		public int maxSize
		{
			get
			{
				return m_MaxSize;
			}
			set
			{
				m_MaxSize = value;
			}
		}

		public TextAnchor alignment
		{
			get
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				return m_Alignment;
			}
			set
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				m_Alignment = value;
			}
		}

		public bool alignByGeometry
		{
			get
			{
				return m_AlignByGeometry;
			}
			set
			{
				m_AlignByGeometry = value;
			}
		}

		public bool richText
		{
			get
			{
				return m_RichText;
			}
			set
			{
				m_RichText = value;
			}
		}

		public HorizontalWrapMode horizontalOverflow
		{
			get
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				return m_HorizontalOverflow;
			}
			set
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				m_HorizontalOverflow = value;
			}
		}

		public VerticalWrapMode verticalOverflow
		{
			get
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				return m_VerticalOverflow;
			}
			set
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				m_VerticalOverflow = value;
			}
		}

		public float lineSpacing
		{
			get
			{
				return m_LineSpacing;
			}
			set
			{
				m_LineSpacing = value;
			}
		}

		void ISerializationCallbackReceiver.OnBeforeSerialize()
		{
		}

		void ISerializationCallbackReceiver.OnAfterDeserialize()
		{
			m_FontSize = Mathf.Clamp(m_FontSize, 0, 300);
			m_MinSize = Mathf.Clamp(m_MinSize, 0, m_FontSize);
			m_MaxSize = Mathf.Clamp(m_MaxSize, m_FontSize, 300);
		}
	}
	public static class FontUpdateTracker
	{
		private static Dictionary<Font, HashSet<Text>> m_Tracked = new Dictionary<Font, HashSet<Text>>();

		public static void TrackText(Text t)
		{
			if ((Object)(object)t.font == (Object)null)
			{
				return;
			}
			m_Tracked.TryGetValue(t.font, out var value);
			if (value == null)
			{
				if (m_Tracked.Count == 0)
				{
					Font.textureRebuilt += RebuildForFont;
				}
				value = new HashSet<Text>();
				m_Tracked.Add(t.font, value);
			}
			value.Add(t);
		}

		private static void RebuildForFont(Font f)
		{
			m_Tracked.TryGetValue(f, out var value);
			if (value == null)
			{
				return;
			}
			foreach (Text item in value)
			{
				item.FontTextureChanged();
			}
		}

		public static void UntrackText(Text t)
		{
			if ((Object)(object)t.font == (Object)null)
			{
				return;
			}
			m_Tracked.TryGetValue(t.font, out var value);
			if (value == null)
			{
				return;
			}
			value.Remove(t);
			if (value.Count == 0)
			{
				m_Tracked.Remove(t.font);
				if (m_Tracked.Count == 0)
				{
					Font.textureRebuilt -= RebuildForFont;
				}
			}
		}
	}
	[DisallowMultipleComponent]
	[RequireComponent(typeof(CanvasRenderer))]
	[RequireComponent(typeof(RectTransform))]
	[ExecuteAlways]
	public abstract class Graphic : UIBehaviour, ICanvasElement
	{
		protected static Material s_DefaultUI = null;

		protected static Texture2D s_WhiteTexture = null;

		[FormerlySerializedAs("m_Mat")]
		[SerializeField]
		protected Material m_Material;

		[SerializeField]
		private Color m_Color = Color.white;

		[NonSerialized]
		protected bool m_SkipLayoutUpdate;

		[NonSerialized]
		protected bool m_SkipMaterialUpdate;

		[SerializeField]
		private bool m_RaycastTarget = true;

		[NonSerialized]
		private RectTransform m_RectTransform;

		[NonSerialized]
		private CanvasRenderer m_CanvasRenderer;

		[NonSerialized]
		private Canvas m_Canvas;

		[NonSerialized]
		private bool m_VertsDirty;

		[NonSerialized]
		private bool m_MaterialDirty;

		[NonSerialized]
		protected UnityAction m_OnDirtyLayoutCallback;

		[NonSerialized]
		protected UnityAction m_OnDirtyVertsCallback;

		[NonSerialized]
		protected UnityAction m_OnDirtyMaterialCallback;

		[NonSerialized]
		protected static Mesh s_Mesh;

		[NonSerialized]
		private static readonly VertexHelper s_VertexHelper = new VertexHelper();

		[NonSerialized]
		protected Mesh m_CachedMesh;

		[NonSerialized]
		protected Vector2[] m_CachedUvs;

		[NonSerialized]
		private readonly TweenRunner<ColorTween> m_ColorTweenRunner;

		public static Material defaultGraphicMaterial
		{
			get
			{
				if ((Object)(object)s_DefaultUI == (Object)null)
				{
					s_DefaultUI = Canvas.GetDefaultCanvasMaterial();
				}
				return s_DefaultUI;
			}
		}

		public virtual Color color
		{
			get
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				return m_Color;
			}
			set
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				if (SetPropertyUtility.SetColor(ref m_Color, value))
				{
					SetVerticesDirty();
				}
			}
		}

		public virtual bool raycastTarget
		{
			get
			{
				return m_RaycastTarget;
			}
			set
			{
				m_RaycastTarget = value;
			}
		}

		protected bool useLegacyMeshGeneration { get; set; }

		public int depth => canvasRenderer.absoluteDepth;

		public RectTransform rectTransform
		{
			get
			{
				if (m_RectTransform == null)
				{
					m_RectTransform = ((Component)this).GetComponent<RectTransform>();
				}
				return m_RectTransform;
			}
		}

		public Canvas canvas
		{
			get
			{
				if ((Object)(object)m_Canvas == (Object)null)
				{
					CacheCanvas();
				}
				return m_Canvas;
			}
		}

		public CanvasRenderer canvasRenderer
		{
			get
			{
				if (m_CanvasRenderer == null)
				{
					m_CanvasRenderer = ((Component)this).GetComponent<CanvasRenderer>();
				}
				return m_CanvasRenderer;
			}
		}

		public virtual Material defaultMaterial => defaultGraphicMaterial;

		public virtual Material material
		{
			get
			{
				if (!((Object)(object)m_Material != (Object)null))
				{
					return defaultMaterial;
				}
				return m_Material;
			}
			set
			{
				if (!((Object)(object)m_Material == (Object)(object)value))
				{
					m_Material = value;
					SetMaterialDirty();
				}
			}
		}

		public virtual Material materialForRendering
		{
			get
			{
				List<Component> list = ListPool<Component>.Get();
				((Component)this).GetComponents(typeof(IMaterialModifier), list);
				Material modifiedMaterial = material;
				for (int i = 0; i < list.Count; i++)
				{
					modifiedMaterial = (list[i] as IMaterialModifier).GetModifiedMaterial(modifiedMaterial);
				}
				ListPool<Component>.Release(list);
				return modifiedMaterial;
			}
		}

		public virtual Texture mainTexture => (Texture)(object)s_WhiteTexture;

		protected static Mesh workerMesh
		{
			get
			{
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Expected O, but got Unknown
				if ((Object)(object)s_Mesh == (Object)null)
				{
					s_Mesh = new Mesh();
					((Object)s_Mesh).name = "Shared UI Mesh";
					((Object)s_Mesh).hideFlags = (HideFlags)61;
				}
				return s_Mesh;
			}
		}

		protected Graphic()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			if (m_ColorTweenRunner == null)
			{
				m_ColorTweenRunner = new TweenRunner<ColorTween>();
			}
			m_ColorTweenRunner.Init((MonoBehaviour)(object)this);
			useLegacyMeshGeneration = true;
		}

		public virtual void SetAllDirty()
		{
			if (m_SkipLayoutUpdate)
			{
				m_SkipLayoutUpdate = false;
			}
			else
			{
				SetLayoutDirty();
			}
			if (m_SkipMaterialUpdate)
			{
				m_SkipMaterialUpdate = false;
			}
			else
			{
				SetMaterialDirty();
			}
			SetVerticesDirty();
		}

		public virtual void SetLayoutDirty()
		{
			if (IsActive())
			{
				LayoutRebuilder.MarkLayoutForRebuild(rectTransform);
				if (m_OnDirtyLayoutCallback != null)
				{
					m_OnDirtyLayoutCallback.Invoke();
				}
			}
		}

		public virtual void SetVerticesDirty()
		{
			if (IsActive())
			{
				m_VertsDirty = true;
				CanvasUpdateRegistry.RegisterCanvasElementForGraphicRebuild(this);
				if (m_OnDirtyVertsCallback != null)
				{
					m_OnDirtyVertsCallback.Invoke();
				}
			}
		}

		public virtual void SetMaterialDirty()
		{
			if (IsActive())
			{
				m_MaterialDirty = true;
				CanvasUpdateRegistry.RegisterCanvasElementForGraphicRebuild(this);
				if (m_OnDirtyMaterialCallback != null)
				{
					m_OnDirtyMaterialCallback.Invoke();
				}
			}
		}

		protected override void OnRectTransformDimensionsChange()
		{
			if (((Component)this).gameObject.activeInHierarchy)
			{
				if (CanvasUpdateRegistry.IsRebuildingLayout())
				{
					SetVerticesDirty();
					return;
				}
				SetVerticesDirty();
				SetLayoutDirty();
			}
		}

		protected override void OnBeforeTransformParentChanged()
		{
			GraphicRegistry.UnregisterGraphicForCanvas(canvas, this);
			LayoutRebuilder.MarkLayoutForRebuild(rectTransform);
		}

		protected override void OnTransformParentChanged()
		{
			base.OnTransformParentChanged();
			m_Canvas = null;
			if (IsActive())
			{
				CacheCanvas();
				GraphicRegistry.RegisterGraphicForCanvas(canvas, this);
				SetAllDirty();
			}
		}

		private void CacheCanvas()
		{
			List<Canvas> list = ListPool<Canvas>.Get();
			((Component)this).gameObject.GetComponentsInParent<Canvas>(false, list);
			if (list.Count > 0)
			{
				for (int i = 0; i < list.Count; i++)
				{
					if (((Behaviour)list[i]).isActiveAndEnabled)
					{
						m_Canvas = list[i];
						break;
					}
				}
			}
			else
			{
				m_Canvas = null;
			}
			ListPool<Canvas>.Release(list);
		}

		protected override void OnEnable()
		{
			base.OnEnable();
			CacheCanvas();
			GraphicRegistry.RegisterGraphicForCanvas(canvas, this);
			if ((Object)(object)s_WhiteTexture == (Object)null)
			{
				s_WhiteTexture = Texture2D.whiteTexture;
			}
			SetAllDirty();
		}

		protected override void OnDisable()
		{
			GraphicRegistry.UnregisterGraphicForCanvas(canvas, this);
			CanvasUpdateRegistry.UnRegisterCanvasElementForRebuild(this);
			if ((Object)(object)canvasRenderer != (Object)null)
			{
				canvasRenderer.Clear();
			}
			LayoutRebuilder.MarkLayoutForRebuild(rectTransform);
			base.OnDisable();
		}

		protected override void OnDestroy()
		{
			if (Object.op_Implicit((Object)(object)m_CachedMesh))
			{
				Object.Destroy((Object)(object)m_CachedMesh);
			}
			m_CachedMesh = null;
			base.OnDestroy();
		}

		protected override void OnCanvasHierarchyChanged()
		{
			Canvas val = m_Canvas;
			m_Canvas = null;
			if (!IsActive())
			{
				return;
			}
			CacheCanvas();
			if ((Object)(object)val != (Object)(object)m_Canvas)
			{
				GraphicRegistry.UnregisterGraphicForCanvas(val, this);
				if (IsActive())
				{
					GraphicRegistry.RegisterGraphicForCanvas(canvas, this);
				}
			}
		}

		public virtual void OnCullingChanged()
		{
			if (!canvasRenderer.cull && (m_VertsDirty || m_MaterialDirty))
			{
				CanvasUpdateRegistry.RegisterCanvasElementForGraphicRebuild(this);
			}
		}

		public virtual void Rebuild(CanvasUpdate update)
		{
			if (!((Object)(object)canvasRenderer == (Object)null) && !canvasRenderer.cull && update == CanvasUpdate.PreRender)
			{
				if (m_VertsDirty)
				{
					UpdateGeometry();
					m_VertsDirty = false;
				}
				if (m_MaterialDirty)
				{
					UpdateMaterial();
					m_MaterialDirty = false;
				}
			}
		}

		public virtual void LayoutComplete()
		{
		}

		public virtual void GraphicUpdateComplete()
		{
		}

		protected virtual void UpdateMaterial()
		{
			if (IsActive())
			{
				canvasRenderer.materialCount = 1;
				canvasRenderer.SetMaterial(materialForRendering, 0);
				canvasRenderer.SetTexture(mainTexture);
			}
		}

		protected virtual void UpdateGeometry()
		{
			if (useLegacyMeshGeneration)
			{
				DoLegacyMeshGeneration();
			}
			else
			{
				DoMeshGeneration();
			}
		}

		private void DoMeshGeneration()
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)rectTransform != (Object)null)
			{
				Rect rect = rectTransform.rect;
				if (((Rect)(ref rect)).width >= 0f)
				{
					rect = rectTransform.rect;
					if (((Rect)(ref rect)).height >= 0f)
					{
						OnPopulateMesh(s_VertexHelper);
						goto IL_0059;
					}
				}
			}
			s_VertexHelper.Clear();
			goto IL_0059;
			IL_0059:
			List<Component> list = ListPool<Component>.Get();
			((Component)this).GetComponents(typeof(IMeshModifier), list);
			for (int i = 0; i < list.Count; i++)
			{
				((IMeshModifier)list[i]).ModifyMesh(s_VertexHelper);
			}
			ListPool<Component>.Release(list);
			s_VertexHelper.FillMesh(workerMesh);
			canvasRenderer.SetMesh(workerMesh);
		}

		private void DoLegacyMeshGeneration()
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)rectTransform != (Object)null)
			{
				Rect rect = rectTransform.rect;
				if (((Rect)(ref rect)).width >= 0f)
				{
					rect = rectTransform.rect;
					if (((Rect)(ref rect)).height >= 0f)
					{
						OnPopulateMesh(workerMesh);
						goto IL_0059;
					}
				}
			}
			workerMesh.Clear();
			goto IL_0059;
			IL_0059:
			List<Component> list = ListPool<Component>.Get();
			((Component)this).GetComponents(typeof(IMeshModifier), list);
			for (int i = 0; i < list.Count; i++)
			{
				((IMeshModifier)list[i]).ModifyMesh(workerMesh);
			}
			ListPool<Component>.Release(list);
			canvasRenderer.SetMesh(workerMesh);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		[Obsolete("Use OnPopulateMesh instead.", true)]
		protected virtual void OnFillVBO(List<UIVertex> vbo)
		{
		}

		[Obsolete("Use OnPopulateMesh(VertexHelper vh) instead.", false)]
		protected virtual void OnPopulateMesh(Mesh m)
		{
			OnPopulateMesh(s_VertexHelper);
			s_VertexHelper.FillMesh(m);
		}

		protected virtual void OnPopulateMesh(VertexHelper vh)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: 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_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			Rect pixelAdjustedRect = GetPixelAdjustedRect();
			Vector4 val = default(Vector4);
			((Vector4)(ref val))..ctor(((Rect)(ref pixelAdjustedRect)).x, ((Rect)(ref pixelAdjustedRect)).y, ((Rect)(ref pixelAdjustedRect)).x + ((Rect)(ref pixelAdjustedRect)).width, ((Rect)(ref pixelAdjustedRect)).y + ((Rect)(ref pixelAdjustedRect)).height);
			Color32 val2 = Color32.op_Implicit(color);
			vh.Clear();
			vh.AddVert(new Vector3(val.x, val.y), val2, new Vector2(0f, 0f));
			vh.AddVert(new Vector3(val.x, val.w), val2, new Vector2(0f, 1f));
			vh.AddVert(new Vector3(val.z, val.w), val2, new Vector2(1f, 1f));
			vh.AddVert(new Vector3(val.z, val.y), val2, new Vector2(1f, 0f));
			vh.AddTriangle(0, 1, 2);
			vh.AddTriangle(2, 3, 0);
		}

		protected override void OnDidApplyAnimationProperties()
		{
			SetAllDirty();
		}

		public virtual void SetNativeSize()
		{
		}

		public virtual bool Raycast(Vector2 sp, Camera eventCamera)
		{
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			if (!((Behaviour)this).isActiveAndEnabled)
			{
				return false;
			}
			Transform val = ((Component)this).transform;
			List<Component> list = ListPool<Component>.Get();
			bool flag = false;
			bool flag2 = true;
			while ((Object)(object)val != (Object)null)
			{
				((Component)val).GetComponents<Component>(list);
				for (int i = 0; i < list.Count; i++)
				{
					Component obj = list[i];
					Canvas val2 = (Canvas)(object)((obj is Canvas) ? obj : null);
					if ((Object)(object)val2 != (Object)null && val2.overrideSorting)
					{
						flag2 = false;
					}
					Component obj2 = list[i];
					ICanvasRaycastFilter val3 = (ICanvasRaycastFilter)(object)((obj2 is ICanvasRaycastFilter) ? obj2 : null);
					if (val3 == null)
					{
						continue;
					}
					bool flag3 = true;
					Component obj3 = list[i];
					CanvasGroup val4 = (CanvasGroup)(object)((obj3 is CanvasGroup) ? obj3 : null);
					if ((Object)(object)val4 != (Object)null)
					{
						if (!flag && val4.ignoreParentGroups)
						{
							flag = true;
							flag3 = val3.IsRaycastLocationValid(sp, eventCamera);
						}
						else if (!flag)
						{
							flag3 = val3.IsRaycastLocationValid(sp, eventCamera);
						}
					}
					else
					{
						flag3 = val3.IsRaycastLocationValid(sp, eventCamera);
					}
					if (!flag3)
					{
						ListPool<Component>.Release(list);
						return 

Room Architect Tool_Data/Managed/UnityEngine.UIElementsModule.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using System.Text;
using System.Text.RegularExpressions;
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
using UnityEngine;
using UnityEngine.Assertions;
using UnityEngine.Bindings;
using UnityEngine.Experimental.Rendering;
using UnityEngine.Profiling;
using UnityEngine.Scripting;
using UnityEngine.UIElements.StyleSheets;
using UnityEngine.UIElements.StyleSheets.Syntax;
using UnityEngine.UIElements.UIR;
using UnityEngine.UIElements.UIR.Implementation;
using UnityEngine.Yoga;

[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: UnityEngineModuleAssembly]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine.UIElements
{
	public abstract class BaseField<TValueType> : BindableElement, INotifyValueChanged<TValueType>
	{
		public new class UxmlTraits : BindableElement.UxmlTraits
		{
			private UxmlStringAttributeDescription m_Label = new UxmlStringAttributeDescription
			{
				name = "label"
			};

			public UxmlTraits()
			{
				base.focusIndex.defaultValue = 0;
				base.focusable.defaultValue = true;
			}

			public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc)
			{
				base.Init(ve, bag, cc);
				((BaseField<TValueType>)ve).label = m_Label.GetValueFromBag(bag, cc);
			}
		}

		public static readonly string ussClassName = "unity-base-field";

		public static readonly string labelUssClassName = ussClassName + "__label";

		public static readonly string inputUssClassName = ussClassName + "__input";

		public static readonly string noLabelVariantUssClassName = ussClassName + "--no-label";

		public static readonly string labelDraggerVariantUssClassName = labelUssClassName + "--with-dragger";

		private VisualElement m_VisualInput;

		[SerializeField]
		private TValueType m_Value;

		internal VisualElement visualInput
		{
			get
			{
				return m_VisualInput;
			}
			set
			{
				if (m_VisualInput != null)
				{
					if (m_VisualInput.parent == this)
					{
						m_VisualInput.RemoveFromHierarchy();
					}
					m_VisualInput = null;
				}
				if (value != null)
				{
					m_VisualInput = value;
				}
				else
				{
					m_VisualInput = new VisualElement
					{
						pickingMode = PickingMode.Ignore
					};
				}
				m_VisualInput.focusable = true;
				m_VisualInput.AddToClassList(inputUssClassName);
				Add(m_VisualInput);
			}
		}

		protected TValueType rawValue
		{
			get
			{
				return m_Value;
			}
			set
			{
				m_Value = value;
			}
		}

		public virtual TValueType value
		{
			get
			{
				return m_Value;
			}
			set
			{
				if (EqualityComparer<TValueType>.Default.Equals(m_Value, value))
				{
					return;
				}
				if (base.panel != null)
				{
					using (ChangeEvent<TValueType> changeEvent = ChangeEvent<TValueType>.GetPooled(m_Value, value))
					{
						changeEvent.target = this;
						SetValueWithoutNotify(value);
						SendEvent(changeEvent);
						return;
					}
				}
				SetValueWithoutNotify(value);
			}
		}

		public Label labelElement { get; private set; }

		public string label
		{
			get
			{
				return labelElement.text;
			}
			set
			{
				if (labelElement.text != value)
				{
					labelElement.text = value;
					if (string.IsNullOrEmpty(labelElement.text))
					{
						AddToClassList(noLabelVariantUssClassName);
						labelElement.RemoveFromHierarchy();
					}
					else if (!Contains(labelElement))
					{
						Insert(0, labelElement);
						RemoveFromClassList(noLabelVariantUssClassName);
					}
				}
			}
		}

		internal BaseField(string label)
		{
			base.isCompositeRoot = true;
			base.focusable = true;
			base.tabIndex = 0;
			base.excludeFromFocusRing = true;
			base.delegatesFocus = true;
			AddToClassList(ussClassName);
			labelElement = new Label
			{
				focusable = true,
				tabIndex = -1
			};
			labelElement.AddToClassList(labelUssClassName);
			if (label != null)
			{
				this.label = label;
			}
			else
			{
				AddToClassList(noLabelVariantUssClassName);
			}
			m_VisualInput = null;
		}

		protected BaseField(string label, VisualElement visualInput)
			: this(label)
		{
			this.visualInput = visualInput;
		}

		public virtual void SetValueWithoutNotify(TValueType newValue)
		{
			m_Value = newValue;
			if (!string.IsNullOrEmpty(base.viewDataKey))
			{
				SaveViewData();
			}
			MarkDirtyRepaint();
		}

		internal override void OnViewDataReady()
		{
			base.OnViewDataReady();
			if (m_VisualInput == null)
			{
				return;
			}
			string fullHierarchicalViewDataKey = GetFullHierarchicalViewDataKey();
			TValueType val = m_Value;
			OverwriteFromViewData(this, fullHierarchicalViewDataKey);
			if (!EqualityComparer<TValueType>.Default.Equals(val, m_Value))
			{
				using (ChangeEvent<TValueType> changeEvent = ChangeEvent<TValueType>.GetPooled(val, m_Value))
				{
					changeEvent.target = this;
					SendEvent(changeEvent);
				}
			}
		}
	}
	public class BaseFieldTraits<TValueType, TValueUxmlAttributeType> : BaseField<TValueType>.UxmlTraits where TValueUxmlAttributeType : TypedUxmlAttributeDescription<TValueType>, new()
	{
		private TValueUxmlAttributeType m_Value = new TValueUxmlAttributeType
		{
			name = "value"
		};

		public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc)
		{
			base.Init(ve, bag, cc);
			((INotifyValueChanged<TValueType>)ve).SetValueWithoutNotify(m_Value.GetValueFromBag(bag, cc));
		}
	}
	public enum SliderDirection
	{
		Horizontal,
		Vertical
	}
	public abstract class BaseSlider<TValueType> : BaseField<TValueType> where TValueType : IComparable<TValueType>
	{
		private TValueType m_LowValue;

		private TValueType m_HighValue;

		private float m_PageSize;

		private Rect m_DragElementStartPos;

		private SliderDirection m_Direction;

		internal const float kDefaultPageSize = 0f;

		public new static readonly string ussClassName = "unity-base-slider";

		public new static readonly string labelUssClassName = ussClassName + "__label";

		public new static readonly string inputUssClassName = ussClassName + "__input";

		public static readonly string horizontalVariantUssClassName = ussClassName + "--horizontal";

		public static readonly string verticalVariantUssClassName = ussClassName + "--vertical";

		public static readonly string trackerUssClassName = ussClassName + "__tracker";

		public static readonly string draggerUssClassName = ussClassName + "__dragger";

		internal VisualElement dragElement { get; private set; }

		public TValueType lowValue
		{
			get
			{
				return m_LowValue;
			}
			set
			{
				if (!EqualityComparer<TValueType>.Default.Equals(m_LowValue, value))
				{
					m_LowValue = value;
					ClampValue();
					UpdateDragElementPosition();
				}
			}
		}

		public TValueType highValue
		{
			get
			{
				return m_HighValue;
			}
			set
			{
				if (!EqualityComparer<TValueType>.Default.Equals(m_HighValue, value))
				{
					m_HighValue = value;
					ClampValue();
					UpdateDragElementPosition();
				}
			}
		}

		public TValueType range => SliderRange();

		public virtual float pageSize
		{
			get
			{
				return m_PageSize;
			}
			set
			{
				m_PageSize = value;
			}
		}

		internal ClampedDragger<TValueType> clampedDragger { get; private set; }

		public override TValueType value
		{
			get
			{
				return base.value;
			}
			set
			{
				TValueType val = lowValue;
				TValueType val2 = highValue;
				if (val.CompareTo(val2) > 0)
				{
					TValueType val3 = val;
					val = val2;
					val2 = val3;
				}
				TValueType val4 = Clamp(value, val, val2);
				base.value = val4;
				UpdateDragElementPosition();
			}
		}

		public SliderDirection direction
		{
			get
			{
				return m_Direction;
			}
			set
			{
				m_Direction = value;
				if (m_Direction == SliderDirection.Horizontal)
				{
					RemoveFromClassList(verticalVariantUssClassName);
					AddToClassList(horizontalVariantUssClassName);
				}
				else
				{
					RemoveFromClassList(horizontalVariantUssClassName);
					AddToClassList(verticalVariantUssClassName);
				}
			}
		}

		internal BaseSlider(string label, TValueType start, TValueType end, SliderDirection direction = SliderDirection.Horizontal, float pageSize = 0f)
			: base(label, (VisualElement)null)
		{
			AddToClassList(ussClassName);
			base.labelElement.AddToClassList(labelUssClassName);
			base.visualInput.AddToClassList(inputUssClassName);
			this.direction = direction;
			this.pageSize = pageSize;
			lowValue = start;
			highValue = end;
			base.pickingMode = PickingMode.Ignore;
			base.visualInput.pickingMode = PickingMode.Position;
			VisualElement visualElement = new VisualElement
			{
				name = "unity-tracker"
			};
			visualElement.AddToClassList(trackerUssClassName);
			base.visualInput.Add(visualElement);
			dragElement = new VisualElement
			{
				name = "unity-dragger"
			};
			dragElement.RegisterCallback<GeometryChangedEvent>(UpdateDragElementPosition);
			dragElement.AddToClassList(draggerUssClassName);
			base.visualInput.Add(dragElement);
			clampedDragger = new ClampedDragger<TValueType>(this, SetSliderValueFromClick, SetSliderValueFromDrag);
			base.visualInput.AddManipulator(clampedDragger);
		}

		private TValueType Clamp(TValueType value, TValueType lowBound, TValueType highBound)
		{
			TValueType result = value;
			if (lowBound.CompareTo(value) > 0)
			{
				result = lowBound;
			}
			else if (highBound.CompareTo(value) < 0)
			{
				result = highBound;
			}
			return result;
		}

		private void ClampValue()
		{
			value = base.rawValue;
		}

		internal abstract TValueType SliderLerpUnclamped(TValueType a, TValueType b, float interpolant);

		internal abstract float SliderNormalizeValue(TValueType currentValue, TValueType lowerValue, TValueType higherValue);

		internal abstract TValueType SliderRange();

		private void SetSliderValueFromDrag()
		{
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			if (clampedDragger.dragDirection == ClampedDragger<TValueType>.DragDirection.Free)
			{
				Vector2 delta = clampedDragger.delta;
				if (direction == SliderDirection.Horizontal)
				{
					ComputeValueAndDirectionFromDrag(base.visualInput.resolvedStyle.width, dragElement.resolvedStyle.width, ((Rect)(ref m_DragElementStartPos)).x + delta.x);
				}
				else
				{
					ComputeValueAndDirectionFromDrag(base.visualInput.resolvedStyle.height, dragElement.resolvedStyle.height, ((Rect)(ref m_DragElementStartPos)).y + delta.y);
				}
			}
		}

		private void ComputeValueAndDirectionFromDrag(float sliderLength, float dragElementLength, float dragElementPos)
		{
			float num = sliderLength - dragElementLength;
			if (!(Mathf.Abs(num) < Mathf.Epsilon))
			{
				float interpolant = Mathf.Max(0f, Mathf.Min(dragElementPos, num)) / num;
				value = SliderLerpUnclamped(lowValue, highValue, interpolant);
			}
		}

		private void SetSliderValueFromClick()
		{
			//IL_02b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0264: Unknown result type (might be due to invalid IL or missing references)
			//IL_0269: Unknown result type (might be due to invalid IL or missing references)
			//IL_0217: Unknown result type (might be due to invalid IL or missing references)
			//IL_021c: 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)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_014e: Unknown result type (might be due to invalid IL or missing references)
			if (clampedDragger.dragDirection == ClampedDragger<TValueType>.DragDirection.Free)
			{
				return;
			}
			if (clampedDragger.dragDirection == ClampedDragger<TValueType>.DragDirection.None)
			{
				if (Mathf.Approximately(pageSize, 0f))
				{
					float num = ((direction != 0) ? dragElement.style.left.value.value : (clampedDragger.startMousePosition.x - dragElement.resolvedStyle.width / 2f));
					float num2 = ((direction != 0) ? (clampedDragger.startMousePosition.y - dragElement.resolvedStyle.height / 2f) : dragElement.style.top.value.value);
					dragElement.style.left = num;
					dragElement.style.top = num2;
					m_DragElementStartPos = new Rect(num, num2, dragElement.resolvedStyle.width, dragElement.resolvedStyle.height);
					clampedDragger.dragDirection = ClampedDragger<TValueType>.DragDirection.Free;
					if (direction == SliderDirection.Horizontal)
					{
						ComputeValueAndDirectionFromDrag(base.visualInput.resolvedStyle.width, dragElement.resolvedStyle.width, ((Rect)(ref m_DragElementStartPos)).x);
					}
					else
					{
						ComputeValueAndDirectionFromDrag(base.visualInput.resolvedStyle.height, dragElement.resolvedStyle.height, ((Rect)(ref m_DragElementStartPos)).y);
					}
					return;
				}
				m_DragElementStartPos = new Rect(dragElement.resolvedStyle.left, dragElement.resolvedStyle.top, dragElement.resolvedStyle.width, dragElement.resolvedStyle.height);
			}
			if (direction == SliderDirection.Horizontal)
			{
				ComputeValueAndDirectionFromClick(base.visualInput.resolvedStyle.width, dragElement.resolvedStyle.width, dragElement.resolvedStyle.left, clampedDragger.lastMousePosition.x);
			}
			else
			{
				ComputeValueAndDirectionFromClick(base.visualInput.resolvedStyle.height, dragElement.resolvedStyle.height, dragElement.resolvedStyle.top, clampedDragger.lastMousePosition.y);
			}
		}

		internal virtual void ComputeValueAndDirectionFromClick(float sliderLength, float dragElementLength, float dragElementPos, float dragElementLastPos)
		{
			float num = sliderLength - dragElementLength;
			if (!(Mathf.Abs(num) < Mathf.Epsilon))
			{
				if (dragElementLastPos < dragElementPos && clampedDragger.dragDirection != ClampedDragger<TValueType>.DragDirection.LowToHigh)
				{
					clampedDragger.dragDirection = ClampedDragger<TValueType>.DragDirection.HighToLow;
					float interpolant = Mathf.Max(0f, Mathf.Min(dragElementPos - pageSize, num)) / num;
					value = SliderLerpUnclamped(lowValue, highValue, interpolant);
				}
				else if (dragElementLastPos > dragElementPos + dragElementLength && clampedDragger.dragDirection != ClampedDragger<TValueType>.DragDirection.HighToLow)
				{
					clampedDragger.dragDirection = ClampedDragger<TValueType>.DragDirection.LowToHigh;
					float interpolant2 = Mathf.Max(0f, Mathf.Min(dragElementPos + pageSize, num)) / num;
					value = SliderLerpUnclamped(lowValue, highValue, interpolant2);
				}
			}
		}

		public void AdjustDragElement(float factor)
		{
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			bool flag = factor < 1f;
			dragElement.visible = flag;
			if (flag)
			{
				IStyle style = dragElement.style;
				dragElement.visible = true;
				if (direction == SliderDirection.Horizontal)
				{
					float num = ((!(base.resolvedStyle.minWidth == StyleKeyword.Auto)) ? base.resolvedStyle.minWidth.value : 0f);
					Rect val = base.visualInput.layout;
					style.width = Mathf.Round(Mathf.Max(((Rect)(ref val)).width * factor, num));
				}
				else
				{
					float num2 = ((!(base.resolvedStyle.minHeight == StyleKeyword.Auto)) ? base.resolvedStyle.minHeight.value : 0f);
					Rect val2 = base.visualInput.layout;
					style.height = Mathf.Round(Mathf.Max(((Rect)(ref val2)).height * factor, num2));
				}
			}
		}

		private void UpdateDragElementPosition(GeometryChangedEvent evt)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: 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)
			Rect oldRect = evt.oldRect;
			Vector2 size = ((Rect)(ref oldRect)).size;
			Rect newRect = evt.newRect;
			if (!(size == ((Rect)(ref newRect)).size))
			{
				UpdateDragElementPosition();
			}
		}

		internal override void OnViewDataReady()
		{
			base.OnViewDataReady();
			UpdateDragElementPosition();
		}

		private void UpdateDragElementPosition()
		{
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			if (base.panel != null)
			{
				float num = SliderNormalizeValue(value, lowValue, highValue);
				float width = dragElement.resolvedStyle.width;
				float height = dragElement.resolvedStyle.height;
				if (direction == SliderDirection.Horizontal)
				{
					float num2 = 0f - dragElement.resolvedStyle.marginLeft - dragElement.resolvedStyle.marginRight;
					Rect val = base.visualInput.layout;
					float num3 = ((Rect)(ref val)).width - width + num2;
					dragElement.style.left = num * num3;
				}
				else
				{
					Rect val2 = base.visualInput.layout;
					float num4 = ((Rect)(ref val2)).height - height;
					dragElement.style.top = num * num4;
				}
			}
		}

		protected override void ExecuteDefaultAction(EventBase evt)
		{
			base.ExecuteDefaultAction(evt);
			if (evt != null && evt.eventTypeId == EventBase<GeometryChangedEvent>.TypeId())
			{
				UpdateDragElementPosition((GeometryChangedEvent)evt);
			}
		}
	}
	public class BindableElement : VisualElement, IBindable
	{
		public new class UxmlFactory : UxmlFactory<BindableElement, UxmlTraits>
		{
		}

		public new class UxmlTraits : VisualElement.UxmlTraits
		{
			private UxmlStringAttributeDescription m_PropertyPath;

			public UxmlTraits()
			{
				m_PropertyPath = new UxmlStringAttributeDescription
				{
					name = "binding-path"
				};
			}

			public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc)
			{
				base.Init(ve, bag, cc);
				string valueFromBag = m_PropertyPath.GetValueFromBag(bag, cc);
				if (!string.IsNullOrEmpty(valueFromBag) && ve is IBindable bindable)
				{
					bindable.bindingPath = valueFromBag;
				}
			}
		}

		public IBinding binding { get; set; }

		public string bindingPath { get; set; }
	}
	public class Box : VisualElement
	{
		public new class UxmlFactory : UxmlFactory<Box>
		{
		}

		public static readonly string ussClassName = "unity-box";

		public Box()
		{
			AddToClassList(ussClassName);
		}
	}
	public class Button : TextElement
	{
		public new class UxmlFactory : UxmlFactory<Button, UxmlTraits>
		{
		}

		public new class UxmlTraits : TextElement.UxmlTraits
		{
		}

		public new static readonly string ussClassName = "unity-button";

		public Clickable clickable { get; set; }

		public Button()
			: this(null)
		{
		}

		public Button(Action clickEvent)
		{
			AddToClassList(ussClassName);
			clickable = new Clickable(clickEvent);
			this.AddManipulator(clickable);
		}

		protected internal override Vector2 DoMeasure(float desiredWidth, MeasureMode widthMode, float desiredHeight, MeasureMode heightMode)
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: 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)
			string text = this.text;
			if (string.IsNullOrEmpty(text))
			{
				text = " ";
			}
			return MeasureTextSize(text, desiredWidth, widthMode, desiredHeight, heightMode);
		}
	}
	internal class ClampedDragger<T> : Clickable where T : IComparable<T>
	{
		[Flags]
		public enum DragDirection
		{
			None = 0,
			LowToHigh = 1,
			HighToLow = 2,
			Free = 4
		}

		public DragDirection dragDirection { get; set; }

		private BaseSlider<T> slider { get; set; }

		public Vector2 startMousePosition { get; private set; }

		public Vector2 delta
		{
			[CompilerGenerated]
			get
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0011: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				return base.lastMousePosition - startMousePosition;
			}
		}

		public event Action dragging;

		public ClampedDragger(BaseSlider<T> slider, Action clickHandler, Action dragHandler)
			: base(clickHandler, 250L, 30L)
		{
			dragDirection = DragDirection.None;
			this.slider = slider;
			dragging += dragHandler;
		}

		protected override void RegisterCallbacksOnTarget()
		{
			base.target.RegisterCallback<MouseDownEvent>(OnMouseDown);
			base.target.RegisterCallback<MouseMoveEvent>(OnMouseMove);
			base.target.RegisterCallback<MouseUpEvent>(base.OnMouseUp);
		}

		protected override void UnregisterCallbacksFromTarget()
		{
			base.target.UnregisterCallback<MouseDownEvent>(OnMouseDown);
			base.target.UnregisterCallback<MouseMoveEvent>(OnMouseMove);
			base.target.UnregisterCallback<MouseUpEvent>(base.OnMouseUp);
		}

		private new void OnMouseDown(MouseDownEvent evt)
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			if (CanStartManipulation(evt))
			{
				startMousePosition = evt.localMousePosition;
				dragDirection = DragDirection.None;
				base.OnMouseDown(evt);
			}
		}

		private new void OnMouseMove(MouseMoveEvent evt)
		{
			if (base.active)
			{
				base.OnMouseMove(evt);
				if (dragDirection == DragDirection.None)
				{
					dragDirection = DragDirection.Free;
				}
				if (dragDirection == DragDirection.Free && this.dragging != null)
				{
					this.dragging();
				}
			}
		}
	}
	public class Clickable : MouseManipulator
	{
		private readonly long m_Delay;

		private readonly long m_Interval;

		private IVisualElementScheduledItem m_Repeater;

		protected bool active { get; set; }

		public Vector2 lastMousePosition { get; private set; }

		public event Action<EventBase> clickedWithEventInfo;

		public event Action clicked;

		public Clickable(Action handler, long delay, long interval)
			: this(handler)
		{
			m_Delay = delay;
			m_Interval = interval;
			active = false;
		}

		public Clickable(Action<EventBase> handler)
		{
			this.clickedWithEventInfo = handler;
			base.activators.Add(new ManipulatorActivationFilter
			{
				button = MouseButton.LeftMouse
			});
		}

		public Clickable(Action handler)
		{
			this.clicked = handler;
			base.activators.Add(new ManipulatorActivationFilter
			{
				button = MouseButton.LeftMouse
			});
			active = false;
		}

		private void OnTimer(TimerState timerState)
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			if (this.clicked != null && IsRepeatable())
			{
				if (base.target.ContainsPoint(lastMousePosition))
				{
					this.clicked();
					base.target.pseudoStates |= PseudoStates.Active;
				}
				else
				{
					base.target.pseudoStates &= ~PseudoStates.Active;
				}
			}
		}

		private bool IsRepeatable()
		{
			return m_Delay > 0 || m_Interval > 0;
		}

		protected override void RegisterCallbacksOnTarget()
		{
			base.target.RegisterCallback<MouseDownEvent>(OnMouseDown);
			base.target.RegisterCallback<MouseMoveEvent>(OnMouseMove);
			base.target.RegisterCallback<MouseUpEvent>(OnMouseUp);
		}

		protected override void UnregisterCallbacksFromTarget()
		{
			base.target.UnregisterCallback<MouseDownEvent>(OnMouseDown);
			base.target.UnregisterCallback<MouseMoveEvent>(OnMouseMove);
			base.target.UnregisterCallback<MouseUpEvent>(OnMouseUp);
		}

		protected void OnMouseDown(MouseDownEvent evt)
		{
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			if (evt == null || !CanStartManipulation(evt))
			{
				return;
			}
			active = true;
			base.target.CaptureMouse();
			lastMousePosition = evt.localMousePosition;
			if (IsRepeatable())
			{
				if (base.target.ContainsPoint(evt.localMousePosition))
				{
					if (this.clicked != null)
					{
						this.clicked();
					}
					else if (this.clickedWithEventInfo != null)
					{
						this.clickedWithEventInfo(evt);
					}
				}
				if (m_Repeater == null)
				{
					m_Repeater = base.target.schedule.Execute(OnTimer).Every(m_Interval).StartingIn(m_Delay);
				}
				else
				{
					m_Repeater.ExecuteLater(m_Delay);
				}
			}
			base.target.pseudoStates |= PseudoStates.Active;
			evt.StopImmediatePropagation();
		}

		protected void OnMouseMove(MouseMoveEvent evt)
		{
			//IL_0015: 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)
			if (evt != null && active)
			{
				lastMousePosition = evt.localMousePosition;
				if (base.target.ContainsPoint(evt.localMousePosition))
				{
					base.target.pseudoStates |= PseudoStates.Active;
				}
				else
				{
					base.target.pseudoStates &= ~PseudoStates.Active;
				}
				evt.StopPropagation();
			}
		}

		protected void OnMouseUp(MouseUpEvent evt)
		{
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			if (evt == null || !active || !CanStopManipulation(evt))
			{
				return;
			}
			active = false;
			base.target.ReleaseMouse();
			if (IsRepeatable())
			{
				if (m_Repeater != null)
				{
					m_Repeater.Pause();
				}
			}
			else if (base.target.ContainsPoint(evt.localMousePosition))
			{
				if (this.clicked != null)
				{
					this.clicked();
				}
				else if (this.clickedWithEventInfo != null)
				{
					this.clickedWithEventInfo(evt);
				}
			}
			base.target.pseudoStates &= ~PseudoStates.Active;
			evt.StopPropagation();
		}
	}
	public abstract class ContextualMenuManager
	{
		public abstract void DisplayMenuIfEventMatches(EventBase evt, IEventHandler eventHandler);

		public void DisplayMenu(EventBase triggerEvent, IEventHandler target)
		{
			DropdownMenu menu = new DropdownMenu();
			using ContextualMenuPopulateEvent e = ContextualMenuPopulateEvent.GetPooled(triggerEvent, menu, target, this);
			target?.SendEvent(e);
		}

		protected internal abstract void DoDisplayMenu(DropdownMenu menu, EventBase triggerEvent);
	}
	public class ContextualMenuManipulator : MouseManipulator
	{
		private Action<ContextualMenuPopulateEvent> m_MenuBuilder;

		public ContextualMenuManipulator(Action<ContextualMenuPopulateEvent> menuBuilder)
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Invalid comparison between Unknown and I4
			m_MenuBuilder = menuBuilder;
			base.activators.Add(new ManipulatorActivationFilter
			{
				button = MouseButton.RightMouse
			});
			if ((int)Application.platform == 0 || (int)Application.platform == 1)
			{
				base.activators.Add(new ManipulatorActivationFilter
				{
					button = MouseButton.LeftMouse,
					modifiers = (EventModifiers)2
				});
			}
		}

		protected override void RegisterCallbacksOnTarget()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Invalid comparison between Unknown and I4
			if ((int)Application.platform == 0 || (int)Application.platform == 1)
			{
				base.target.RegisterCallback<MouseDownEvent>(OnMouseUpDownEvent);
			}
			else
			{
				base.target.RegisterCallback<MouseUpEvent>(OnMouseUpDownEvent);
			}
			base.target.RegisterCallback<KeyUpEvent>(OnKeyUpEvent);
			base.target.RegisterCallback<ContextualMenuPopulateEvent>(OnContextualMenuEvent);
		}

		protected override void UnregisterCallbacksFromTarget()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Invalid comparison between Unknown and I4
			if ((int)Application.platform == 0 || (int)Application.platform == 1)
			{
				base.target.UnregisterCallback<MouseDownEvent>(OnMouseUpDownEvent);
			}
			else
			{
				base.target.UnregisterCallback<MouseUpEvent>(OnMouseUpDownEvent);
			}
			base.target.UnregisterCallback<KeyUpEvent>(OnKeyUpEvent);
			base.target.UnregisterCallback<ContextualMenuPopulateEvent>(OnContextualMenuEvent);
		}

		private void OnMouseUpDownEvent(IMouseEvent evt)
		{
			if (CanStartManipulation(evt) && base.target.elementPanel != null && base.target.elementPanel.contextualMenuManager != null)
			{
				EventBase eventBase = evt as EventBase;
				base.target.elementPanel.contextualMenuManager.DisplayMenu(eventBase, base.target);
				eventBase.StopPropagation();
				eventBase.PreventDefault();
			}
		}

		private void OnKeyUpEvent(KeyUpEvent evt)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Invalid comparison between Unknown and I4
			if ((int)evt.keyCode == 319 && base.target.elementPanel != null && base.target.elementPanel.contextualMenuManager != null)
			{
				base.target.elementPanel.contextualMenuManager.DisplayMenu(evt, base.target);
				evt.StopPropagation();
				evt.PreventDefault();
			}
		}

		private void OnContextualMenuEvent(ContextualMenuPopulateEvent evt)
		{
			if (m_MenuBuilder != null)
			{
				m_MenuBuilder(evt);
			}
		}
	}
	public struct Cursor : IEquatable<Cursor>
	{
		public Texture2D texture { get; set; }

		public Vector2 hotspot { get; set; }

		internal int defaultCursorId { get; set; }

		public override bool Equals(object obj)
		{
			return obj is Cursor && Equals((Cursor)obj);
		}

		public bool Equals(Cursor other)
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			int result;
			if (EqualityComparer<Texture2D>.Default.Equals(texture, other.texture))
			{
				Vector2 val = hotspot;
				if (((Vector2)(ref val)).Equals(other.hotspot))
				{
					result = ((defaultCursorId == other.defaultCursorId) ? 1 : 0);
					goto IL_0049;
				}
			}
			result = 0;
			goto IL_0049;
			IL_0049:
			return (byte)result != 0;
		}

		public override int GetHashCode()
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			int num = 1500536833;
			num = num * -1521134295 + EqualityComparer<Texture2D>.Default.GetHashCode(texture);
			num = num * -1521134295 + EqualityComparer<Vector2>.Default.GetHashCode(hotspot);
			return num * -1521134295 + defaultCursorId.GetHashCode();
		}

		public static bool operator ==(Cursor style1, Cursor style2)
		{
			return style1.Equals(style2);
		}

		public static bool operator !=(Cursor style1, Cursor style2)
		{
			return !(style1 == style2);
		}

		public override string ToString()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			return $"texture={texture}, hotspot={hotspot}";
		}
	}
	internal interface ICursorManager
	{
		void SetCursor(Cursor cursor);

		void ResetCursor();
	}
	internal class CursorManager : ICursorManager
	{
		public void SetCursor(Cursor cursor)
		{
		}

		public void ResetCursor()
		{
		}
	}
	internal class DisposeHelper
	{
		[Conditional("UNITY_UIELEMENTS_DEBUG_DISPOSE")]
		public static void NotifyMissingDispose(IDisposable disposable)
		{
			if (disposable != null)
			{
				Debug.LogError((object)$"An IDisposable instance of type '{disposable.GetType().FullName}' has not been disposed.");
			}
		}

		public static void NotifyDisposedUsed(IDisposable disposable)
		{
			Debug.LogError((object)$"An instance of type '{disposable.GetType().FullName}' is being used although it has been disposed.");
		}
	}
	public class DropdownMenuEventInfo
	{
		public EventModifiers modifiers { get; }

		public Vector2 mousePosition { get; }

		public Vector2 localMousePosition { get; }

		private char character { get; }

		private KeyCode keyCode { get; }

		public DropdownMenuEventInfo(EventBase e)
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			if (e is IMouseEvent mouseEvent)
			{
				mousePosition = mouseEvent.mousePosition;
				localMousePosition = mouseEvent.localMousePosition;
				modifiers = mouseEvent.modifiers;
				character = '\0';
				keyCode = (KeyCode)0;
			}
			else if (e is IKeyboardEvent keyboardEvent)
			{
				character = keyboardEvent.character;
				keyCode = keyboardEvent.keyCode;
				modifiers = keyboardEvent.modifiers;
				mousePosition = Vector2.zero;
				localMousePosition = Vector2.zero;
			}
		}
	}
	public abstract class DropdownMenuItem
	{
	}
	public class DropdownMenuSeparator : DropdownMenuItem
	{
		public string subMenuPath { get; }

		public DropdownMenuSeparator(string subMenuPath)
		{
			this.subMenuPath = subMenuPath;
		}
	}
	public class DropdownMenuAction : DropdownMenuItem
	{
		[Flags]
		public enum Status
		{
			None = 0,
			Normal = 1,
			Disabled = 2,
			Checked = 4,
			Hidden = 8
		}

		private readonly Action<DropdownMenuAction> actionCallback;

		private readonly Func<DropdownMenuAction, Status> actionStatusCallback;

		public string name { get; }

		public Status status { get; private set; }

		public DropdownMenuEventInfo eventInfo { get; private set; }

		public object userData { get; private set; }

		public DropdownMenuAction(string actionName, Action<DropdownMenuAction> actionCallback, Func<DropdownMenuAction, Status> actionStatusCallback, object userData = null)
		{
			name = actionName;
			this.actionCallback = actionCallback;
			this.actionStatusCallback = actionStatusCallback;
			this.userData = userData;
		}

		public static Status AlwaysEnabled(DropdownMenuAction a)
		{
			return Status.Normal;
		}

		public static Status AlwaysDisabled(DropdownMenuAction a)
		{
			return Status.Disabled;
		}

		public void UpdateActionStatus(DropdownMenuEventInfo eventInfo)
		{
			this.eventInfo = eventInfo;
			Status? status = ((actionStatusCallback != null) ? new Status?(actionStatusCallback(this)) : null);
			this.status = ((!status.HasValue) ? Status.Hidden : status.Value);
		}

		public void Execute()
		{
			if (actionCallback != null)
			{
				actionCallback(this);
			}
		}
	}
	public class DropdownMenu
	{
		private List<DropdownMenuItem> menuItems = new List<DropdownMenuItem>();

		private DropdownMenuEventInfo m_DropdownMenuEventInfo;

		public List<DropdownMenuItem> MenuItems()
		{
			return menuItems;
		}

		public void AppendAction(string actionName, Action<DropdownMenuAction> action, Func<DropdownMenuAction, DropdownMenuAction.Status> actionStatusCallback, object userData = null)
		{
			DropdownMenuAction item = new DropdownMenuAction(actionName, action, actionStatusCallback, userData);
			menuItems.Add(item);
		}

		public void AppendAction(string actionName, Action<DropdownMenuAction> action, DropdownMenuAction.Status status = DropdownMenuAction.Status.Normal)
		{
			if (status == DropdownMenuAction.Status.Normal)
			{
				AppendAction(actionName, action, DropdownMenuAction.AlwaysEnabled);
				return;
			}
			if (status == DropdownMenuAction.Status.Disabled)
			{
				AppendAction(actionName, action, DropdownMenuAction.AlwaysDisabled);
				return;
			}
			AppendAction(actionName, action, (DropdownMenuAction e) => status);
		}

		public void InsertAction(int atIndex, string actionName, Action<DropdownMenuAction> action, Func<DropdownMenuAction, DropdownMenuAction.Status> actionStatusCallback, object userData = null)
		{
			DropdownMenuAction item = new DropdownMenuAction(actionName, action, actionStatusCallback, userData);
			menuItems.Insert(atIndex, item);
		}

		public void InsertAction(int atIndex, string actionName, Action<DropdownMenuAction> action, DropdownMenuAction.Status status = DropdownMenuAction.Status.Normal)
		{
			if (status == DropdownMenuAction.Status.Normal)
			{
				InsertAction(atIndex, actionName, action, DropdownMenuAction.AlwaysEnabled);
				return;
			}
			if (status == DropdownMenuAction.Status.Disabled)
			{
				InsertAction(atIndex, actionName, action, DropdownMenuAction.AlwaysDisabled);
				return;
			}
			InsertAction(atIndex, actionName, action, (DropdownMenuAction e) => status);
		}

		public void AppendSeparator(string subMenuPath = null)
		{
			if (menuItems.Count > 0 && !(menuItems[menuItems.Count - 1] is DropdownMenuSeparator))
			{
				DropdownMenuSeparator item = new DropdownMenuSeparator(subMenuPath ?? string.Empty);
				menuItems.Add(item);
			}
		}

		public void InsertSeparator(string subMenuPath, int atIndex)
		{
			if (atIndex > 0 && atIndex <= menuItems.Count && !(menuItems[atIndex - 1] is DropdownMenuSeparator))
			{
				DropdownMenuSeparator item = new DropdownMenuSeparator(subMenuPath ?? string.Empty);
				menuItems.Insert(atIndex, item);
			}
		}

		public void RemoveItemAt(int index)
		{
			menuItems.RemoveAt(index);
		}

		public void PrepareForDisplay(EventBase e)
		{
			m_DropdownMenuEventInfo = ((e == null) ? null : new DropdownMenuEventInfo(e));
			if (menuItems.Count == 0)
			{
				return;
			}
			foreach (DropdownMenuItem menuItem in menuItems)
			{
				if (menuItem is DropdownMenuAction dropdownMenuAction)
				{
					dropdownMenuAction.UpdateActionStatus(m_DropdownMenuEventInfo);
				}
			}
			if (menuItems[menuItems.Count - 1] is DropdownMenuSeparator)
			{
				menuItems.RemoveAt(menuItems.Count - 1);
			}
		}
	}
	internal enum DispatchMode
	{
		Default = 1,
		Queued = 1,
		Immediate = 2
	}
	public struct EventDispatcherGate : IDisposable, IEquatable<EventDispatcherGate>
	{
		private EventDispatcher m_Dispatcher;

		public EventDispatcherGate(EventDispatcher d)
		{
			if (d == null)
			{
				throw new ArgumentNullException("d");
			}
			m_Dispatcher = d;
			m_Dispatcher.CloseGate();
		}

		public void Dispose()
		{
			m_Dispatcher.OpenGate();
		}

		public bool Equals(EventDispatcherGate other)
		{
			return object.Equals(m_Dispatcher, other.m_Dispatcher);
		}

		public override bool Equals(object obj)
		{
			if (object.ReferenceEquals(null, obj))
			{
				return false;
			}
			return obj is EventDispatcherGate && Equals((EventDispatcherGate)obj);
		}

		public override int GetHashCode()
		{
			return (m_Dispatcher != null) ? m_Dispatcher.GetHashCode() : 0;
		}

		public static bool operator ==(EventDispatcherGate left, EventDispatcherGate right)
		{
			return left.Equals(right);
		}

		public static bool operator !=(EventDispatcherGate left, EventDispatcherGate right)
		{
			return !left.Equals(right);
		}
	}
	public sealed class EventDispatcher
	{
		private struct EventRecord
		{
			public EventBase m_Event;

			public IPanel m_Panel;
		}

		private struct DispatchContext
		{
			public uint m_GateCount;

			public Queue<EventRecord> m_Queue;
		}

		private List<IEventDispatchingStrategy> m_DispatchingStrategies;

		private static readonly ObjectPool<Queue<EventRecord>> k_EventQueuePool = new ObjectPool<Queue<EventRecord>>();

		private Queue<EventRecord> m_Queue;

		private uint m_GateCount;

		private Stack<DispatchContext> m_DispatchContexts = new Stack<DispatchContext>();

		private static EventDispatcher s_EventDispatcher;

		private bool m_Immediate = false;

		internal static EventDispatcher instance
		{
			get
			{
				if (s_EventDispatcher == null)
				{
					s_EventDispatcher = new EventDispatcher();
				}
				return s_EventDispatcher;
			}
		}

		private bool dispatchImmediately => m_Immediate || m_GateCount == 0;

		private EventDispatcher()
		{
			m_DispatchingStrategies = new List<IEventDispatchingStrategy>();
			m_DispatchingStrategies.Add(new MouseCaptureDispatchingStrategy());
			m_DispatchingStrategies.Add(new KeyboardEventDispatchingStrategy());
			m_DispatchingStrategies.Add(new MouseEventDispatchingStrategy());
			m_DispatchingStrategies.Add(new CommandEventDispatchingStrategy());
			m_DispatchingStrategies.Add(new IMGUIEventDispatchingStrategy());
			m_DispatchingStrategies.Add(new DefaultDispatchingStrategy());
			m_Queue = k_EventQueuePool.Get();
		}

		internal static void ClearDispatcher()
		{
			s_EventDispatcher = null;
		}

		internal void Dispatch(EventBase evt, IPanel panel, DispatchMode dispatchMode)
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Invalid comparison between Unknown and I4
			evt.MarkReceivedByDispatcher();
			if (evt.eventTypeId == EventBase<IMGUIEvent>.TypeId())
			{
				Event imguiEvent = evt.imguiEvent;
				if ((int)imguiEvent.type == 7)
				{
					return;
				}
			}
			if (dispatchImmediately || dispatchMode == DispatchMode.Immediate)
			{
				ProcessEvent(evt, panel);
				return;
			}
			evt.Acquire();
			m_Queue.Enqueue(new EventRecord
			{
				m_Event = evt,
				m_Panel = panel
			});
		}

		internal void PushDispatcherContext()
		{
			m_DispatchContexts.Push(new DispatchContext
			{
				m_GateCount = m_GateCount,
				m_Queue = m_Queue
			});
			m_GateCount = 0u;
			m_Queue = k_EventQueuePool.Get();
		}

		internal void PopDispatcherContext()
		{
			Debug.Assert(m_GateCount == 0, "All gates should have been opened before popping dispatch context.");
			Debug.Assert(m_Queue.Count == 0, "Queue should be empty when popping dispatch context.");
			k_EventQueuePool.Release(m_Queue);
			m_GateCount = m_DispatchContexts.Peek().m_GateCount;
			m_Queue = m_DispatchContexts.Peek().m_Queue;
			m_DispatchContexts.Pop();
		}

		internal void CloseGate()
		{
			m_GateCount++;
		}

		internal void OpenGate()
		{
			Debug.Assert(m_GateCount != 0);
			if (m_GateCount != 0)
			{
				m_GateCount--;
			}
			if (m_GateCount == 0)
			{
				ProcessEventQueue();
			}
		}

		private void ProcessEventQueue()
		{
			//IL_004b: Expected O, but got Unknown
			Queue<EventRecord> queue = m_Queue;
			m_Queue = k_EventQueuePool.Get();
			ExitGUIException val = null;
			try
			{
				while (queue.Count > 0)
				{
					EventRecord eventRecord = queue.Dequeue();
					EventBase @event = eventRecord.m_Event;
					IPanel panel = eventRecord.m_Panel;
					try
					{
						ProcessEvent(@event, panel);
					}
					catch (ExitGUIException val2)
					{
						ExitGUIException val3 = val2;
						Debug.Assert(val == null);
						val = val3;
					}
					finally
					{
						@event.Dispose();
					}
				}
			}
			finally
			{
				k_EventQueuePool.Release(queue);
			}
			if (val != null)
			{
				throw val;
			}
		}

		private void ProcessEvent(EventBase evt, IPanel panel)
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Invalid comparison between Unknown and I4
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Invalid comparison between Unknown and I4
			//IL_01a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ab: Invalid comparison between Unknown and I4
			Event imguiEvent = evt.imguiEvent;
			bool flag = imguiEvent != null && (int)imguiEvent.type == 12;
			using (new EventDispatcherGate(this))
			{
				evt.PreDispatch();
				IMouseEvent mouseEvent = evt as IMouseEvent;
				IMouseEventInternal mouseEventInternal = evt as IMouseEventInternal;
				if (mouseEvent != null && mouseEventInternal != null && mouseEventInternal.triggeredByOS)
				{
					MousePositionTracker.SaveMousePosition(mouseEvent.mousePosition, panel);
				}
				foreach (IEventDispatchingStrategy dispatchingStrategy in m_DispatchingStrategies)
				{
					if (dispatchingStrategy.CanDispatchEvent(evt))
					{
						dispatchingStrategy.DispatchEvent(evt, panel);
						Debug.Assert(flag || evt.isPropagationStopped || imguiEvent == null || (int)imguiEvent.type != 12, "Unexpected condition: !evt.isPropagationStopped && evt.imguiEvent.type == EventType.Used.");
						if (evt.stopDispatch || evt.isPropagationStopped)
						{
							break;
						}
					}
				}
				EventDispatchUtilities.ExecuteDefaultAction(evt, panel);
				if (evt.path != null)
				{
					foreach (PropagationPaths.PropagationPathElement item in evt.path.targetAndBubblePath)
					{
						if (item.m_IsTarget)
						{
							evt.target = item.m_VisualElement;
							EventDispatchUtilities.ExecuteDefaultAction(evt, panel);
						}
					}
					evt.target = evt.leafTarget;
				}
				evt.PostDispatch();
				Debug.Assert(flag || evt.isPropagationStopped || imguiEvent == null || (int)imguiEvent.type != 12, "Event is used but not stopped.");
			}
		}
	}
	public abstract class Focusable : CallbackEventHandler
	{
		private bool m_DelegatesFocus;

		private bool m_ExcludeFromFocusRing;

		public abstract FocusController focusController { get; }

		public bool focusable { get; set; }

		public int tabIndex { get; set; }

		public bool delegatesFocus
		{
			get
			{
				return m_DelegatesFocus;
			}
			set
			{
				if (!((VisualElement)this).isCompositeRoot)
				{
					throw new InvalidOperationException("delegatesFocus should only be set on composite roots.");
				}
				m_DelegatesFocus = value;
			}
		}

		internal bool excludeFromFocusRing
		{
			get
			{
				return m_ExcludeFromFocusRing;
			}
			set
			{
				if (!((VisualElement)this).isCompositeRoot)
				{
					throw new InvalidOperationException("excludeFromFocusRing should only be set on composite roots.");
				}
				m_ExcludeFromFocusRing = value;
			}
		}

		public virtual bool canGrabFocus
		{
			[CompilerGenerated]
			get
			{
				return focusable;
			}
		}

		protected Focusable()
		{
			focusable = true;
			tabIndex = 0;
		}

		public virtual void Focus()
		{
			if (focusController != null)
			{
				if (focusable)
				{
					Focusable focusDelegate = GetFocusDelegate();
					focusController.SwitchFocus(focusDelegate);
				}
				else
				{
					focusController.SwitchFocus(null);
				}
			}
		}

		public virtual void Blur()
		{
			if (focusController != null && focusController.IsFocused(this))
			{
				focusController.SwitchFocus(null);
			}
		}

		private Focusable GetFocusDelegate()
		{
			Focusable focusable = this;
			while (focusable != null && focusable.delegatesFocus)
			{
				focusable = GetFirstFocusableChild(focusable as VisualElement);
			}
			return focusable;
		}

		private static Focusable GetFirstFocusableChild(VisualElement ve)
		{
			foreach (VisualElement item in ve.hierarchy.Children())
			{
				if (item.focusable)
				{
					return item;
				}
				bool flag = item.hierarchy.parent != null && item == item.hierarchy.parent.contentContainer;
				if (!item.isCompositeRoot && !flag)
				{
					Focusable firstFocusableChild = GetFirstFocusableChild(item);
					if (firstFocusableChild != null)
					{
						return firstFocusableChild;
					}
				}
			}
			return null;
		}

		protected override void ExecuteDefaultAction(EventBase evt)
		{
			base.ExecuteDefaultAction(evt);
			if (evt != null && evt.target == evt.leafTarget)
			{
				if (evt.eventTypeId == EventBase<MouseDownEvent>.TypeId())
				{
					Focus();
				}
				focusController?.SwitchFocusOnEvent(evt);
			}
		}
	}
	public class FocusChangeDirection
	{
		private readonly int m_Value;

		public static FocusChangeDirection unspecified { get; } = new FocusChangeDirection(-1);


		public static FocusChangeDirection none { get; } = new FocusChangeDirection(0);


		protected static FocusChangeDirection lastValue { get; } = none;


		protected FocusChangeDirection(int value)
		{
			m_Value = value;
		}

		public static implicit operator int(FocusChangeDirection fcd)
		{
			int? num = fcd?.m_Value;
			return num.HasValue ? num.Value : 0;
		}
	}
	public interface IFocusRing
	{
		FocusChangeDirection GetFocusChangeDirection(Focusable currentFocusable, EventBase e);

		Focusable GetNextFocusable(Focusable currentFocusable, FocusChangeDirection direction);
	}
	public class FocusController
	{
		private struct FocusedElement
		{
			public VisualElement m_SubTreeRoot;

			public Focusable m_FocusedElement;
		}

		private List<FocusedElement> m_FocusedElements = new List<FocusedElement>();

		private IFocusRing focusRing { get; }

		public Focusable focusedElement
		{
			[CompilerGenerated]
			get
			{
				return GetRetargetedFocusedElement(null);
			}
		}

		internal int imguiKeyboardControl { get; set; }

		public FocusController(IFocusRing focusRing)
		{
			this.focusRing = focusRing;
			imguiKeyboardControl = 0;
		}

		internal bool IsFocused(Focusable f)
		{
			foreach (FocusedElement focusedElement in m_FocusedElements)
			{
				if (focusedElement.m_FocusedElement == f)
				{
					return true;
				}
			}
			return false;
		}

		internal Focusable GetRetargetedFocusedElement(VisualElement retargetAgainst)
		{
			VisualElement visualElement = retargetAgainst?.hierarchy.parent;
			if (visualElement == null)
			{
				if (m_FocusedElements.Count > 0)
				{
					return m_FocusedElements[m_FocusedElements.Count - 1].m_FocusedElement;
				}
			}
			else
			{
				while (!visualElement.isCompositeRoot && visualElement.hierarchy.parent != null)
				{
					visualElement = visualElement.hierarchy.parent;
				}
				foreach (FocusedElement focusedElement in m_FocusedElements)
				{
					if (focusedElement.m_SubTreeRoot == visualElement)
					{
						return focusedElement.m_FocusedElement;
					}
				}
			}
			return null;
		}

		internal Focusable GetLeafFocusedElement()
		{
			if (m_FocusedElements.Count > 0)
			{
				return m_FocusedElements[0].m_FocusedElement;
			}
			return null;
		}

		internal void DoFocusChange(Focusable f)
		{
			m_FocusedElements.Clear();
			for (VisualElement visualElement = f as VisualElement; visualElement != null; visualElement = visualElement.hierarchy.parent)
			{
				if (visualElement.hierarchy.parent == null || visualElement.isCompositeRoot)
				{
					m_FocusedElements.Add(new FocusedElement
					{
						m_SubTreeRoot = visualElement,
						m_FocusedElement = f
					});
					f = visualElement;
				}
			}
		}

		private void AboutToReleaseFocus(Focusable focusable, Focusable willGiveFocusTo, FocusChangeDirection direction)
		{
			using FocusOutEvent e = FocusEventBase<FocusOutEvent>.GetPooled(focusable, willGiveFocusTo, direction, this);
			focusable.SendEvent(e);
		}

		private void ReleaseFocus(Focusable focusable, Focusable willGiveFocusTo, FocusChangeDirection direction)
		{
			using BlurEvent e = FocusEventBase<BlurEvent>.GetPooled(focusable, willGiveFocusTo, direction, this);
			focusable.SendEvent(e);
		}

		private void AboutToGrabFocus(Focusable focusable, Focusable willTakeFocusFrom, FocusChangeDirection direction)
		{
			using FocusInEvent e = FocusEventBase<FocusInEvent>.GetPooled(focusable, willTakeFocusFrom, direction, this);
			focusable.SendEvent(e);
		}

		private void GrabFocus(Focusable focusable, Focusable willTakeFocusFrom, FocusChangeDirection direction)
		{
			using FocusEvent e = FocusEventBase<FocusEvent>.GetPooled(focusable, willTakeFocusFrom, direction, this);
			focusable.SendEvent(e);
		}

		internal void SwitchFocus(Focusable newFocusedElement)
		{
			SwitchFocus(newFocusedElement, FocusChangeDirection.unspecified);
		}

		private void SwitchFocus(Focusable newFocusedElement, FocusChangeDirection direction)
		{
			if (GetLeafFocusedElement() == newFocusedElement)
			{
				return;
			}
			Focusable leafFocusedElement = GetLeafFocusedElement();
			if (newFocusedElement == null || !newFocusedElement.canGrabFocus)
			{
				if (leafFocusedElement != null)
				{
					AboutToReleaseFocus(leafFocusedElement, null, direction);
					ReleaseFocus(leafFocusedElement, null, direction);
				}
			}
			else if (newFocusedElement != leafFocusedElement)
			{
				VisualElement willGiveFocusTo = (newFocusedElement as VisualElement)?.RetargetElement(leafFocusedElement as VisualElement);
				VisualElement willTakeFocusFrom = (leafFocusedElement as VisualElement)?.RetargetElement(newFocusedElement as VisualElement);
				if (leafFocusedElement != null)
				{
					AboutToReleaseFocus(leafFocusedElement, willGiveFocusTo, direction);
				}
				AboutToGrabFocus(newFocusedElement, willTakeFocusFrom, direction);
				if (leafFocusedElement != null)
				{
					ReleaseFocus(leafFocusedElement, willGiveFocusTo, direction);
				}
				GrabFocus(newFocusedElement, willTakeFocusFrom, direction);
			}
		}

		internal Focusable SwitchFocusOnEvent(EventBase e)
		{
			FocusChangeDirection focusChangeDirection = focusRing.GetFocusChangeDirection(GetLeafFocusedElement(), e);
			if (focusChangeDirection != FocusChangeDirection.none)
			{
				Focusable nextFocusable = focusRing.GetNextFocusable(GetLeafFocusedElement(), focusChangeDirection);
				SwitchFocus(nextFocusable, focusChangeDirection);
				return nextFocusable;
			}
			return GetLeafFocusedElement();
		}

		internal void SyncIMGUIFocus(int imguiKeyboardControlID, Focusable imguiContainerHavingKeyboardControl, bool forceSwitch)
		{
			imguiKeyboardControl = imguiKeyboardControlID;
			if (forceSwitch || imguiKeyboardControl != 0)
			{
				SwitchFocus(imguiContainerHavingKeyboardControl, FocusChangeDirection.unspecified);
			}
			else
			{
				SwitchFocus(null, FocusChangeDirection.unspecified);
			}
		}
	}
	public class Foldout : BindableElement, INotifyValueChanged<bool>
	{
		public new class UxmlFactory : UxmlFactory<Foldout, UxmlTraits>
		{
		}

		public new class UxmlTraits : BindableElement.UxmlTraits
		{
			private UxmlStringAttributeDescription m_Text = new UxmlStringAttributeDescription
			{
				name = "text"
			};

			private UxmlBoolAttributeDescription m_Value = new UxmlBoolAttributeDescription
			{
				name = "value"
			};

			public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc)
			{
				base.Init(ve, bag, cc);
				if (ve is Foldout foldout)
				{
					foldout.text = m_Text.GetValueFromBag(bag, cc);
					foldout.SetValueWithoutNotify(m_Value.GetValueFromBag(bag, cc));
				}
			}
		}

		internal static readonly string ussFoldoutDepthClassName = "unity-foldout--depth-";

		internal static readonly int ussFoldoutMaxDepth = 4;

		private Toggle m_Toggle;

		private VisualElement m_Container;

		[SerializeField]
		private bool m_Value;

		public static readonly string ussClassName = "unity-foldout";

		public static readonly string toggleUssClassName = ussClassName + "__toggle";

		public static readonly string contentUssClassName = ussClassName + "__content";

		public override VisualElement contentContainer => m_Container;

		public string text
		{
			get
			{
				return m_Toggle.text;
			}
			set
			{
				m_Toggle.text = value;
			}
		}

		public bool value
		{
			get
			{
				return m_Value;
			}
			set
			{
				if (m_Value == value)
				{
					return;
				}
				using ChangeEvent<bool> changeEvent = ChangeEvent<bool>.GetPooled(m_Value, value);
				changeEvent.target = this;
				SetValueWithoutNotify(value);
				SendEvent(changeEvent);
				SaveViewData();
			}
		}

		public Foldout()
		{
			m_Value = true;
			AddToClassList(ussClassName);
			m_Toggle = new Toggle
			{
				value = true
			};
			m_Toggle.RegisterValueChangedCallback(delegate(ChangeEvent<bool> evt)
			{
				value = m_Toggle.value;
				evt.StopPropagation();
			});
			m_Toggle.AddToClassList(toggleUssClassName);
			base.hierarchy.Add(m_Toggle);
			m_Container = new VisualElement
			{
				name = "unity-content"
			};
			m_Container.AddToClassList(contentUssClassName);
			base.hierarchy.Add(m_Container);
			RegisterCallback<AttachToPanelEvent>(OnAttachToPanel);
		}

		public void SetValueWithoutNotify(bool newValue)
		{
			m_Value = newValue;
			m_Toggle.value = m_Value;
			contentContainer.style.display = ((!newValue) ? DisplayStyle.None : DisplayStyle.Flex);
		}

		internal override void OnViewDataReady()
		{
			base.OnViewDataReady();
			string fullHierarchicalViewDataKey = GetFullHierarchicalViewDataKey();
			OverwriteFromViewData(this, fullHierarchicalViewDataKey);
			SetValueWithoutNotify(m_Value);
		}

		private void OnAttachToPanel(AttachToPanelEvent evt)
		{
			int num = 0;
			for (int i = 0; i <= ussFoldoutMaxDepth; i++)
			{
				RemoveFromClassList(ussFoldoutDepthClassName + i);
			}
			RemoveFromClassList(ussFoldoutDepthClassName + "max");
			if (base.parent != null)
			{
				for (VisualElement visualElement = base.parent; visualElement != null; visualElement = visualElement.parent)
				{
					if ((object)visualElement.GetType() == typeof(Foldout))
					{
						num++;
					}
				}
			}
			if (num > ussFoldoutMaxDepth)
			{
				AddToClassList(ussFoldoutDepthClassName + "max");
			}
			else
			{
				AddToClassList(ussFoldoutDepthClassName + num);
			}
		}
	}
}
namespace UnityEngine.UIElements.StyleSheets
{
	internal abstract class HierarchyTraversal
	{
		public virtual void Traverse(VisualElement element)
		{
			TraverseRecursive(element, 0);
		}

		public abstract void TraverseRecursive(VisualElement element, int depth);

		protected void Recurse(VisualElement element, int depth)
		{
			int num = 0;
			while (num < element.hierarchy.childCount)
			{
				VisualElement visualElement = element.hierarchy[num];
				TraverseRecursive(visualElement, depth + 1);
				if (visualElement.hierarchy.parent == element)
				{
					num++;
				}
			}
		}
	}
}
namespace UnityEngine.UIElements
{
	internal interface IDataWatchHandle : IDisposable
	{
		Object watched { get; }

		bool disposed { get; }
	}
	internal interface IDataWatchService
	{
		IDataWatchHandle AddWatch(Object watched, Action<Object> onDataChanged);

		void RemoveWatch(IDataWatchHandle handle);

		void ForceDirtyNextPoll(Object obj);
	}
	public class Image : VisualElement
	{
		public new class UxmlFactory : UxmlFactory<Image, UxmlTraits>
		{
		}

		public new class UxmlTraits : VisualElement.UxmlTraits
		{
			public override IEnumerable<UxmlChildElementDescription> uxmlChildElementsDescription
			{
				get
				{
					yield break;
				}
			}
		}

		private ScaleMode m_ScaleMode;

		private Texture m_Image;

		private Rect m_UV;

		private Color m_TintColor;

		private bool m_ImageIsInline;

		private bool m_ScaleModeIsInline;

		private bool m_TintColorIsInline;

		public static readonly string ussClassName = "unity-image";

		private static CustomStyleProperty<Texture2D> s_ImageProperty = new CustomStyleProperty<Texture2D>("--unity-image");

		private static CustomStyleProperty<string> s_ScaleModeProperty = new CustomStyleProperty<string>("--unity-image-size");

		private static CustomStyleProperty<Color> s_TintColorProperty = new CustomStyleProperty<Color>("--unity-image-tint-color");

		public Texture image
		{
			get
			{
				return m_Image;
			}
			set
			{
				//IL_0059: Unknown result type (might be due to invalid IL or missing references)
				//IL_005e: Unknown result type (might be due to invalid IL or missing references)
				m_ImageIsInline = (Object)(object)value != (Object)null;
				if ((Object)(object)m_Image != (Object)(object)value)
				{
					m_Image = value;
					IncrementVersion(VersionChangeType.Layout | VersionChangeType.Repaint);
					if ((Object)(object)m_Image == (Object)null)
					{
						m_UV = new Rect(0f, 0f, 1f, 1f);
					}
				}
			}
		}

		public Rect sourceRect
		{
			get
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				return GetSourceRect();
			}
			set
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				CalculateUV(value);
			}
		}

		public Rect uv
		{
			get
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				return m_UV;
			}
			set
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				m_UV = value;
			}
		}

		public ScaleMode scaleMode
		{
			get
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				return m_ScaleMode;
			}
			set
			{
				//IL_0009: Unknown result type (might be due to invalid IL or missing references)
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				m_ScaleModeIsInline = true;
				if (m_ScaleMode != value)
				{
					m_ScaleMode = value;
					IncrementVersion(VersionChangeType.Layout);
				}
			}
		}

		public Color tintColor
		{
			get
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				return m_TintColor;
			}
			set
			{
				//IL_0009: Unknown result type (might be due to invalid IL or missing references)
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_001b: Unknown result type (might be due to invalid IL or missing references)
				//IL_001c: Unknown result type (might be due to invalid IL or missing references)
				m_TintColorIsInline = true;
				if (m_TintColor != value)
				{
					m_TintColor = value;
					IncrementVersion(VersionChangeType.Repaint);
				}
			}
		}

		public Image()
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			AddToClassList(ussClassName);
			m_ScaleMode = (ScaleMode)1;
			m_TintColor = Color.white;
			m_UV = new Rect(0f, 0f, 1f, 1f);
			base.requireMeasureFunction = true;
			RegisterCallback<CustomStyleResolvedEvent>(OnCustomStyleResolved);
		}

		protected internal override Vector2 DoMeasure(float desiredWidth, MeasureMode widthMode, float desiredHeight, MeasureMode heightMode)
		{
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			float num = float.NaN;
			float num2 = float.NaN;
			Texture val = image;
			if ((Object)(object)val == (Object)null)
			{
				return new Vector2(num, num2);
			}
			Rect val2 = sourceRect;
			bool flag = val2 != Rect.zero;
			num = ((!flag) ? ((float)val.width) : ((Rect)(ref val2)).width);
			num2 = ((!flag) ? ((float)val.height) : ((Rect)(ref val2)).height);
			if (widthMode == MeasureMode.AtMost)
			{
				num = Mathf.Min(num, desiredWidth);
			}
			if (heightMode == MeasureMode.AtMost)
			{
				num2 = Mathf.Min(num2, desiredHeight);
			}
			return new Vector2(num, num2);
		}

		internal override void DoRepaint(IStylePainter painter)
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			Texture val = image;
			if (!((Object)(object)val == (Object)null))
			{
				TextureStylePainterParameters textureStylePainterParameters = default(TextureStylePainterParameters);
				textureStylePainterParameters.rect = base.contentRect;
				textureStylePainterParameters.uv = uv;
				textureStylePainterParameters.texture = val;
				textureStylePainterParameters.color = tintColor;
				textureStylePainterParameters.scaleMode = scaleMode;
				TextureStylePainterParameters painterParams = textureStylePainterParameters;
				IStylePainterInternal stylePainterInternal = (IStylePainterInternal)painter;
				stylePainterInternal.DrawTexture(painterParams);
			}
		}

		private void OnCustomStyleResolved(CustomStyleResolvedEvent e)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			Texture2D value = null;
			Color value2 = Color.white;
			ICustomStyle customStyle = e.customStyle;
			if (!m_ImageIsInline && customStyle.TryGetValue(s_ImageProperty, out value))
			{
				m_Image = (Texture)(object)value;
			}
			if (!m_ScaleModeIsInline && customStyle.TryGetValue(s_ScaleModeProperty, out var value3) && StyleSheetCache.TryParseEnum<ScaleMode>(value3, out var intValue))
			{
				m_ScaleMode = (ScaleMode)intValue;
			}
			if (!m_TintColorIsInline && customStyle.TryGetValue(s_TintColorProperty, out value2))
			{
				m_TintColor = value2;
			}
		}

		private void CalculateUV(Rect srcRect)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			m_UV = new Rect(0f, 0f, 1f, 1f);
			Texture val = image;
			if ((Object)(object)val != (Object)null)
			{
				int width = val.width;
				int height = val.height;
				((Rect)(ref m_UV)).x = ((Rect)(ref srcRect)).x / (float)width;
				((Rect)(ref m_UV)).width = ((Rect)(ref srcRect)).width / (float)width;
				((Rect)(ref m_UV)).height = ((Rect)(ref srcRect)).height / (float)height;
				((Rect)(ref m_UV)).y = 1f - ((Rect)(ref m_UV)).height - ((Rect)(ref srcRect)).y / (float)height;
			}
		}

		private Rect GetSourceRect()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			Rect zero = Rect.zero;
			Texture val = image;
			if ((Object)(object)val != (Object)null)
			{
				int width = val.width;
				int height = val.height;
				Rect val2 = uv;
				((Rect)(ref zero)).x = ((Rect)(ref val2)).x * (float)width;
				Rect val3 = uv;
				((Rect)(ref zero)).width = ((Rect)(ref val3)).width * (float)width;
				Rect val4 = uv;
				float num = 1f - ((Rect)(ref val4)).y;
				Rect val5 = uv;
				((Rect)(ref zero)).y = (num - ((Rect)(ref val5)).height) * (float)height;
				Rect val6 = uv;
				((Rect)(ref zero)).height = ((Rect)(ref val6)).height * (float)height;
			}
			return zero;
		}
	}
	public class IMGUIContainer : VisualElement, IDisposable
	{
		public new class UxmlFactory : UxmlFactory<IMGUIContainer, UxmlTraits>
		{
		}

		public new class UxmlTraits : VisualElement.UxmlTraits
		{
			public override IEnumerable<UxmlChildElementDescription> uxmlChildElementsDescription
			{
				get
				{
					yield break;
				}
			}

			public UxmlTraits()
			{
				base.focusIndex.defaultValue = 0;
				base.focusable.defaultValue = true;
			}
		}

		private struct GUIGlobals
		{
			public Matrix4x4 matrix;

			public Color color;

			public Color contentColor;

			public Color backgroundColor;

			public bool enabled;

			public bool changed;

			public int displayIndex;
		}

		private Action m_OnGUIHandler;

		private ObjectGUIState m_ObjectGUIState;

		internal bool useOwnerObjectGUIState;

		private LayoutCache m_Cache = null;

		private Rect m_CachedClippingRect;

		private bool lostFocus = false;

		private bool receivedFocus = false;

		private FocusChangeDirection focusChangeDirection = FocusChangeDirection.unspecified;

		private bool hasFocusableControls = false;

		private int newKeyboardFocusControlID = 0;

		public static readonly string ussClassName = "unity-imgui-container";

		private readonly Action m_DrawImmediateAction;

		private GUIGlobals m_GUIGlobals;

		public Action onGUIHandler
		{
			get
			{
				return m_OnGUIHandler;
			}
			set
			{
				if (m_OnGUIHandler != value)
				{
					m_OnGUIHandler = value;
					IncrementVersion(VersionChangeType.Layout);
					IncrementVersion(VersionChangeType.Repaint);
				}
			}
		}

		internal ObjectGUIState guiState
		{
			get
			{
				//IL_001c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0026: Expected O, but got Unknown
				Debug.Assert(!useOwnerObjectGUIState);
				if (m_ObjectGUIState == null)
				{
					m_ObjectGUIState = new ObjectGUIState();
				}
				return m_ObjectGUIState;
			}
		}

		internal Rect lastWorldClip { get; set; }

		private LayoutCache cache
		{
			get
			{
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Expected O, but got Unknown
				if (m_Cache == null)
				{
					m_Cache = new LayoutCache();
				}
				return m_Cache;
			}
		}

		private float layoutMeasuredWidth => Mathf.Ceil(((GUILayoutEntry)cache.topLevel).maxWidth);

		private float layoutMeasuredHeight => Mathf.Ceil(((GUILayoutEntry)cache.topLevel).maxHeight);

		public ContextType contextType { get; set; }

		internal bool focusOnlyIfHasFocusableControls { get; set; } = true;


		public override bool canGrabFocus
		{
			[CompilerGenerated]
			get
			{
				return (!focusOnlyIfHasFocusableControls) ? base.canGrabFocus : (hasFocusableControls && base.canGrabFocus);
			}
		}

		public IMGUIContainer()
			: this(null)
		{
		}

		public IMGUIContainer(Action onGUIHandler)
		{
			AddToClassList(ussClassName);
			this.onGUIHandler = onGUIHandler;
			contextType = ContextType.Editor;
			base.focusable = true;
			base.requireMeasureFunction = true;
			m_DrawImmediateAction = HandleIMGUIEvent;
		}

		internal override void DoRepaint(IStylePainter painter)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			lastWorldClip = base.elementPanel.repaintData.currentWorldClip;
			IStylePainterInternal stylePainterInternal = (IStylePainterInternal)painter;
			stylePainterInternal.DrawImmediate(m_DrawImmediateAction);
		}

		private void SaveGlobals()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			m_GUIGlobals.matrix = GUI.matrix;
			m_GUIGlobals.color = GUI.color;
			m_GUIGlobals.contentColor = GUI.contentColor;
			m_GUIGlobals.backgroundColor = GUI.backgroundColor;
			m_GUIGlobals.enabled = GUI.enabled;
			m_GUIGlobals.changed = GUI.changed;
			if (Event.current != null)
			{
				m_GUIGlobals.displayIndex = Event.current.displayIndex;
			}
		}

		private void RestoreGlobals()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			GUI.matrix = m_GUIGlobals.matrix;
			GUI.color = m_GUIGlobals.color;
			GUI.contentColor = m_GUIGlobals.contentColor;
			GUI.backgroundColor = m_GUIGlobals.backgroundColor;
			GUI.enabled = m_GUIGlobals.enabled;
			GUI.changed = m_GUIGlobals.changed;
			if (Event.current != null)
			{
				Event.current.displayIndex = m_GUIGlobals.displayIndex;
			}
		}

		private void DoOnGUI(Event evt, Matrix4x4 parentTransform, Rect clippingRect, bool isComputingLayout, Rect layoutSize)
		{
			//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b5: Invalid comparison between Unknown and I4
			//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ef: Invalid comparison between Unknown and I4
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Invalid comparison between Unknown and I4
			//IL_03d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e8: Invalid comparison between Unknown and I4
			//IL_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_017c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0310: Unknown result type (might be due to invalid IL or missing references)
			//IL_0183: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_0421: Unknown result type (might be due to invalid IL or missing references)
			//IL_0428: Invalid comparison between Unknown and I4
			//IL_042e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0435: Invalid comparison between Unknown and I4
			//IL_0346: Unknown result type (might be due to invalid IL or missing references)
			//IL_0483: Unknown result type (might be due to invalid IL or missing references)
			//IL_048a: Invalid comparison between Unknown and I4
			Debug.Assert(!isComputingLayout || parentTransform == Matrix4x4.identity);
			if (onGUIHandler == null || base.panel == null)
			{
				return;
			}
			int num = GUIClip.Internal_GetCount();
			SaveGlobals();
			float num2 = layoutMeasuredWidth;
			float num3 = layoutMeasuredHeight;
			UIElementsUtility.BeginContainerGUI(cache, evt, this);
			GUI.color = UIElementsUtility.editorPlayModeTintColor;
			if ((int)Event.current.type != 8)
			{
				if (lostFocus)
				{
					if (focusController != null && GUIUtility.OwnsId(GUIUtility.keyboardControl))
					{
						GUIUtility.keyboardControl = 0;
						focusController.imguiKeyboardControl = 0;
					}
					lostFocus = false;
				}
				if (receivedFocus)
				{
					if (hasFocusableControls)
					{
						if (focusChangeDirection != FocusChangeDirection.unspecified && focusChangeDirection != FocusChangeDirection.none)
						{
							if (focusChangeDirection == VisualElementFocusChangeDirection.left)
							{
								GUIUtility.SetKeyboardControlToLastControlId();
							}
							else if (focusChangeDirection == VisualElementFocusChangeDirection.right)
							{
								GUIUtility.SetKeyboardControlToFirstControlId();
							}
						}
						else if (GUIUtility.keyboardControl == 0)
						{
							GUIUtility.SetKeyboardControlToFirstControlId();
						}
					}
					receivedFocus = false;
					focusChangeDirection = FocusChangeDirection.unspecified;
					if (focusController != null)
					{
						focusController.imguiKeyboardControl = GUIUtility.keyboardControl;
					}
				}
			}
			EventType type = Event.current.type;
			bool flag = false;
			try
			{
				ParentClipScope val = default(ParentClipScope);
				((ParentClipScope)(ref val))..ctor(parentTransform, clippingRect);
				try
				{
					onGUIHandler();
				}
				finally
				{
					((IDisposable)(ParentClipScope)(ref val)).Dispose();
				}
			}
			catch (Exception ex)
			{
				if ((int)type != 8)
				{
					throw;
				}
				flag = GUIUtility.IsExitGUIException(ex);
				if (!flag)
				{
					Debug.LogException(ex);
				}
			}
			finally
			{
				if ((int)Event.current.type != 8)
				{
					int keyboardControl = GUIUtility.keyboardControl;
					int num4 = GUIUtility.CheckForTabEvent(Event.current);
					if (focusController != null)
					{
						if (num4 < 0)
						{
							Focusable leafFocusedElement = focusController.GetLeafFocusedElement();
							Focusable focusable = null;
							using (KeyDownEvent e = KeyboardEventBase<KeyDownEvent>.GetPooled('\t', (KeyCode)9, (EventModifiers)(num4 != -1)))
							{
								focusable = focusController.SwitchFocusOnEvent(e);
							}
							if (leafFocusedElement == this)
							{
								if (focusable == this)
								{
									switch (num4)
									{
									case -2:
										GUIUtility.SetKeyboardControlToLastControlId();
										break;
									case -1:
										GUIUtility.SetKeyboardControlToFirstControlId();
										break;
									}
									newKeyboardFocusControlID = GUIUtility.keyboardControl;
									focusController.imguiKeyboardControl = GUIUtility.keyboardControl;
								}
								else
								{
									GUIUtility.keyboardControl = 0;
									focusController.imguiKeyboardControl = 0;
								}
							}
						}
						else if (num4 > 0)
						{
							focusController.imguiKeyboardControl = GUIUtility.keyboardControl;
							newKeyboardFocusControlID = GUIUtility.keyboardControl;
						}
						else if (num4 == 0)
						{
							if ((int)type == 0 && !focusOnlyIfHasFocusableControls)
							{
								focusController.SyncIMGUIFocus(GUIUtility.keyboardControl, this, forceSwitch: true);
							}
							else if (keyboardControl != GUIUtility.keyboardControl || (int)type == 0)
							{
								focusController.SyncIMGUIFocus(GUIUtility.keyboardControl, this, forceSwitch: false);
							}
							else if (GUIUtility.keyboardControl != focusController.imguiKeyboardControl)
							{
								newKeyboardFocusControlID = GUIUtility.keyboardControl;
								if (focusController.GetLeafFocusedElement() == this)
								{
									focusController.imguiKeyboardControl = GUIUtility.keyboardControl;
								}
								else
								{
									focusController.SyncIMGUIFocus(GUIUtility.keyboardControl, this, forceSwitch: false);
								}
							}
						}
					}
					hasFocusableControls = GUIUtility.HasFocusableControls();
				}
			}
			UIElementsUtility.EndContainerGUI(evt, layoutSize);
			RestoreGlobals();
			if ((int)evt.type == 8 && (!Mathf.Approximately(num2, layoutMeasuredWidth) || !Mathf.Approximately(num3, layoutMeasuredHeight)))
			{
				IncrementVersion(VersionChangeType.Layout);
			}
			if (!flag && (int)evt.type != 11 && (int)evt.type != 12)
			{
				int num5 = GUIClip.Internal_GetCount();
				if (num5 > num)
				{
					Debug.LogError((object)"GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced.");
				}
				else if (num5 < num)
				{
					Debug.LogError((object)"GUI Error: You are popping more GUIClips than you are pushing. Make sure they are balanced.");
				}
			}
			while (GUIClip.Internal_GetCount() > num)
			{
				GUIClip.Internal_Pop();
			}
			if ((int)evt.type == 12)
			{
				IncrementVersion(VersionChangeType.Repaint);
			}
		}

		public void MarkDirtyLayout()
		{
			IncrementVersion(VersionChangeType.Layout);
		}

		public override void HandleEvent(EventBase evt)
		{
			base.HandleEvent(evt);
			if (evt != null && evt.propagationPhase != PropagationPhase.DefaultAction && evt.imguiEvent != null && !evt.isPropagationStopped && HandleIMGUIEvent(evt.imguiEvent))
			{
				evt.StopPropagation();
				evt.PreventDefault();
			}
		}

		private void HandleIMGUIEvent()
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: 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)
			Matrix4x4 currentOffset = base.elementPanel.repaintData.currentOffset;
			HandleIMGUIEvent(base.elementPanel.repaintData.repaintEvent, currentOffset * base.worldTransform, VisualElement.ComputeAAAlignedBound(base.worldClip, currentOffset));
		}

		internal bool HandleIMGUIEvent(Event e)
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			GetCurrentTransformAndClip(this, e, out var val, out m_CachedClippingRect);
			return HandleIMGUIEvent(e, val, m_CachedClippingRect);
		}

		private bool HandleIMGUIEvent(Event e, Matrix4x4 worldTransform, Rect clippingRect)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Expected O, but got Unknown
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Invalid comparison between Unknown and I4
			if (e != null && onGUIHandler != null && base.elementPanel != null)
			{
				EventInterests iMGUIEventInterests = base.elementPanel.IMGUIEventInterests;
				if (((EventInterests)(ref iMGUIEventInterests)).WantsEvent(e.type))
				{
					EventType type = e.type;
					e.type = (EventType)8;
					DoOnGUI(e, worldTransform, clippingRect, isComputingLayout: false, base.layout);
					e.type = type;
					DoOnGUI(e, worldTransform, clippingRect, isComputingLayout: false, base.layout);
					if (newKeyboardFocusControlID > 0)
					{
						newKeyboardFocusControlID = 0;
						Event val = new Event();
						val.type = (EventType)14;
						val.commandName = "NewKeyboardFocus";
						Event e2 = val;
						HandleIMGUIEvent(e2);
					}
					if ((int)e.type == 12)
					{
						return true;
					}
					if ((int)e.type == 1 && this.HasMouseCapture())
					{
						GUIUtility.hotControl = 0;
					}
					if (base.elementPanel == null)
					{
						GUIUtility.ExitGUI();
					}
					return false;
				}
			}
			return false;
		}

		protected override void ExecuteDefaultAction(EventBase evt)
		{
			if (evt == null)
			{
				return;
			}
			if (evt.eventTypeId == EventBase<BlurEvent>.TypeId())
			{
				lostFocus = true;
				IncrementVersion(VersionChangeType.Repaint);
			}
			else if (evt.eventTypeId == EventBase<FocusEvent>.TypeId())
			{
				FocusEvent focusEvent = evt as FocusEvent;
				receivedFocus = true;
				focusChangeDirection = focusEvent.direction;
			}
			else if (evt.eventTypeId == EventBase<DetachFromPanelEvent>.TypeId())
			{
				if (base.elementPanel != null)
				{
					base.elementPanel.IMGUIContainersCount--;
				}
			}
			else if (evt.eventTypeId == EventBase<AttachToPanelEvent>.TypeId() && base.elementPanel != null)
			{
				base.elementPanel.IMGUIContainersCount++;
			}
		}

		protected internal override Vector2 DoMeasure(float desiredWidth, MeasureMode widthMode, float desiredHeight, MeasureMode heightMode)
		{
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Expected O, but got Unknown
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			float num = float.NaN;
			float num2 = float.NaN;
			if (widthMode != MeasureMode.Exactly || heightMode != MeasureMode.Exactly)
			{
				Event val = new Event();
				val.type = (EventType)8;
				Event evt = val;
				Rect layoutSize = base.layout;
				if (widthMode == MeasureMode.Exactly)
				{
					((Rect)(ref layoutSize)).width = desiredWidth;
				}
				if (heightMode == MeasureMode.Exactly)
				{
					((Rect)(ref layoutSize)).height = desiredHeight;
				}
				DoOnGUI(evt, Matrix4x4.identity, m_CachedClippingRect, isComputingLayout: true, layoutSize);
				num = layoutMeasuredWidth;
				num2 = layoutMeasuredHeight;
			}
			switch (widthMode)
			{
			case MeasureMode.Exactly:
				num = desiredWidth;
				break;
			case MeasureMode.AtMost:
				num = Mathf.Min(num, desiredWidth);
				break;
			}
			switch (heightMode)
			{
			case MeasureMode.Exactly:
				num2 = desiredHeight;
				break;
			case MeasureMode.AtMost:
				num2 = Mathf.Min(num2, desiredHeight);
				break;
			}
			return new Vector2(num, num2);
		}

		private static void GetCurrentTransformAndClip(IMGUIContainer container, Event evt, out Matrix4x4 transform, out Rect clipRect)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Invalid comparison between Unknown and I4
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			clipRect = container.lastWorldClip;
			if (((Rect)(ref clipRect)).width == 0f || ((Rect)(ref clipRect)).height == 0f)
			{
				clipRect = container.worldBound;
			}
			transform = container.worldTransform;
			if ((int)evt.type == 7 && container.elementPanel != null)
			{
				transform = container.elementPanel.repaintData.currentOffset * container.worldTransform;
			}
		}

		public void Dispose()
		{
			Dispose(disposeManaged: true);
			GC.SuppressFinalize(this);
		}

		protected virtual void Dispose(bool disposeManaged)
		{
			if (disposeManaged && m_ObjectGUIState != null)
			{
				m_ObjectGUIState.Dispose();
			}
		}
	}
	public abstract class ImmediateModeElement : VisualElement
	{
		public ImmediateModeElement()
		{
		}

		internal override void DoRepaint(IStylePainter painter)
		{
			IStylePainterInternal stylePainterInternal = (IStylePainterInternal)painter;
			stylePainterInternal.DrawImmediate(ImmediateRepaint);
		}

		protected abstract void ImmediateRepaint();
	}
	[StructLayout(LayoutKind.Sequential)]
	[NativeHeader("Modules/UIElements/ImmediateStylePainter.h")]
	internal class ImmediateStylePainter
	{
		internal static void DrawRect(Rect screenRect, Color color, Vector4 borderWidths, Vector4 borderRadiuses)
		{
			DrawRect_Injected(ref screenRect, ref color, ref borderWidths, ref borderRadiuses);
		}

		internal static void DrawTexture(Rect screenRect, Texture texture, Rect sourceRect, Color color, Vector4 borderWidths, Vector4 borderRadiuses, int leftBorder, int topBorder, int rightBorder, int bottomBorder, bool usePremultiplyAlpha)
		{
			DrawTexture_Injected(ref screenRect, texture, ref sourceRect, ref color, ref borderWidths, ref borderRadiuses, leftBorder, topBorder, rightBorder, bottomBorder, usePremultiplyAlpha);
		}

		internal static void DrawText(Rect screenRect, string text, Font font, int fontSize, FontStyle fontStyle, Color fontColor, TextAnchor anchor, bool wordWrap, float wordWrapWidth, bool richText, TextClipping textClipping)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing re

Room Architect Tool_Data/Managed/UnityEngine.UIModule.dll

Decompiled 3 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;
using UnityEngine.Scripting;

[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: UnityEngineModuleAssembly]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine;

public interface ICanvasRaycastFilter
{
	bool IsRaycastLocationValid(Vector2 sp, Camera eventCamera);
}
[NativeHeader("Modules/UI/CanvasGroup.h")]
[NativeClass("UI::CanvasGroup")]
public sealed class CanvasGroup : Behaviour, ICanvasRaycastFilter
{
	[NativeProperty(/*Could not decode attribute arguments.*/)]
	public extern float alpha
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[NativeProperty(/*Could not decode attribute arguments.*/)]
	public extern bool interactable
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[NativeProperty(/*Could not decode attribute arguments.*/)]
	public extern bool blocksRaycasts
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[NativeProperty(/*Could not decode attribute arguments.*/)]
	public extern bool ignoreParentGroups
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public bool IsRaycastLocationValid(Vector2 sp, Camera eventCamera)
	{
		return blocksRaycasts;
	}
}
[NativeClass("UI::CanvasRenderer")]
[NativeHeader("Modules/UI/CanvasRenderer.h")]
public sealed class CanvasRenderer : Component
{
	public extern bool hasPopInstruction
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern int materialCount
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern int popMaterialCount
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern int absoluteDepth
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	public extern bool hasMoved
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	public extern bool cullTransparentMesh
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[NativeProperty(/*Could not decode attribute arguments.*/)]
	public extern bool hasRectClipping
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	[NativeProperty(/*Could not decode attribute arguments.*/)]
	public extern int relativeDepth
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	[NativeProperty(/*Could not decode attribute arguments.*/)]
	public extern bool cull
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[Obsolete("isMask is no longer supported.See EnableClipping for vertex clipping configuration", false)]
	public bool isMask { get; set; }

	public void SetColor(Color color)
	{
		SetColor_Injected(ref color);
	}

	public Color GetColor()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		GetColor_Injected(out var ret);
		return ret;
	}

	public void EnableRectClipping(Rect rect)
	{
		EnableRectClipping_Injected(ref rect);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern void DisableRectClipping();

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern void SetMaterial(Material material, int index);

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern Material GetMaterial(int index);

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern void SetPopMaterial(Material material, int index);

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern Material GetPopMaterial(int index);

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern void SetTexture(Texture texture);

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern void SetAlphaTexture(Texture texture);

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern void SetMesh(Mesh mesh);

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern void Clear();

	public float GetAlpha()
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		return GetColor().a;
	}

	public void SetAlpha(float alpha)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		Color color = GetColor();
		color.a = alpha;
		SetColor(color);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern float GetInheritedAlpha();

	public void SetMaterial(Material material, Texture texture)
	{
		materialCount = Math.Max(1, materialCount);
		SetMaterial(material, 0);
		SetTexture(texture);
	}

	public Material GetMaterial()
	{
		return GetMaterial(0);
	}

	public static void SplitUIVertexStreams(List<UIVertex> verts, List<Vector3> positions, List<Color32> colors, List<Vector2> uv0S, List<Vector2> uv1S, List<Vector3> normals, List<Vector4> tangents, List<int> indices)
	{
		SplitUIVertexStreams(verts, positions, colors, uv0S, uv1S, new List<Vector2>(), new List<Vector2>(), normals, tangents, indices);
	}

	public static void SplitUIVertexStreams(List<UIVertex> verts, List<Vector3> positions, List<Color32> colors, List<Vector2> uv0S, List<Vector2> uv1S, List<Vector2> uv2S, List<Vector2> uv3S, List<Vector3> normals, List<Vector4> tangents, List<int> indices)
	{
		SplitUIVertexStreamsInternal(verts, positions, colors, uv0S, uv1S, uv2S, uv3S, normals, tangents);
		SplitIndicesStreamsInternal(verts, indices);
	}

	public static void CreateUIVertexStream(List<UIVertex> verts, List<Vector3> positions, List<Color32> colors, List<Vector2> uv0S, List<Vector2> uv1S, List<Vector3> normals, List<Vector4> tangents, List<int> indices)
	{
		CreateUIVertexStream(verts, positions, colors, uv0S, uv1S, new List<Vector2>(), new List<Vector2>(), normals, tangents, indices);
	}

	public static void CreateUIVertexStream(List<UIVertex> verts, List<Vector3> positions, List<Color32> colors, List<Vector2> uv0S, List<Vector2> uv1S, List<Vector2> uv2S, List<Vector2> uv3S, List<Vector3> normals, List<Vector4> tangents, List<int> indices)
	{
		CreateUIVertexStreamInternal(verts, positions, colors, uv0S, uv1S, uv2S, uv3S, normals, tangents, indices);
	}

	public static void AddUIVertexStream(List<UIVertex> verts, List<Vector3> positions, List<Color32> colors, List<Vector2> uv0S, List<Vector2> uv1S, List<Vector3> normals, List<Vector4> tangents)
	{
		AddUIVertexStream(verts, positions, colors, uv0S, uv1S, new List<Vector2>(), new List<Vector2>(), normals, tangents);
	}

	public static void AddUIVertexStream(List<UIVertex> verts, List<Vector3> positions, List<Color32> colors, List<Vector2> uv0S, List<Vector2> uv1S, List<Vector2> uv2S, List<Vector2> uv3S, List<Vector3> normals, List<Vector4> tangents)
	{
		SplitUIVertexStreamsInternal(verts, positions, colors, uv0S, uv1S, uv2S, uv3S, normals, tangents);
	}

	[Obsolete("UI System now uses meshes.Generate a mesh and use 'SetMesh' instead", false)]
	public void SetVertices(List<UIVertex> vertices)
	{
		SetVertices(vertices.ToArray(), vertices.Count);
	}

	[Obsolete("UI System now uses meshes.Generate a mesh and use 'SetMesh' instead", false)]
	public void SetVertices(UIVertex[] vertices, int size)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Expected O, but got Unknown
		//IL_0061: Unknown result type (might be due to invalid IL or missing references)
		//IL_0077: Unknown result type (might be due to invalid IL or missing references)
		//IL_008d: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0100: Unknown result type (might be due to invalid IL or missing references)
		Mesh val = new Mesh();
		List<Vector3> list = new List<Vector3>();
		List<Color32> list2 = new List<Color32>();
		List<Vector2> list3 = new List<Vector2>();
		List<Vector2> list4 = new List<Vector2>();
		List<Vector2> list5 = new List<Vector2>();
		List<Vector2> list6 = new List<Vector2>();
		List<Vector3> list7 = new List<Vector3>();
		List<Vector4> list8 = new List<Vector4>();
		List<int> list9 = new List<int>();
		for (int i = 0; i < size; i += 4)
		{
			for (int j = 0; j < 4; j++)
			{
				list.Add(vertices[i + j].position);
				list2.Add(vertices[i + j].color);
				list3.Add(vertices[i + j].uv0);
				list4.Add(vertices[i + j].uv1);
				list5.Add(vertices[i + j].uv2);
				list6.Add(vertices[i + j].uv3);
				list7.Add(vertices[i + j].normal);
				list8.Add(vertices[i + j].tangent);
			}
			list9.Add(i);
			list9.Add(i + 1);
			list9.Add(i + 2);
			list9.Add(i + 2);
			list9.Add(i + 3);
			list9.Add(i);
		}
		val.SetVertices(list);
		val.SetColors(list2);
		val.SetNormals(list7);
		val.SetTangents(list8);
		val.SetUVs(0, list3);
		val.SetUVs(1, list4);
		val.SetUVs(2, list5);
		val.SetUVs(3, list6);
		val.SetIndices(list9.ToArray(), (MeshTopology)0, 0);
		SetMesh(val);
		Object.DestroyImmediate((Object)(object)val);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	private static extern void SplitIndicesStreamsInternal(object verts, object indices);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	private static extern void SplitUIVertexStreamsInternal(object verts, object positions, object colors, object uv0S, object uv1S, object uv2S, object uv3S, object normals, object tangents);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	private static extern void CreateUIVertexStreamInternal(object verts, object positions, object colors, object uv0S, object uv1S, object uv2S, object uv3S, object normals, object tangents, object indices);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void SetColor_Injected(ref Color color);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void GetColor_Injected(out Color ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void EnableRectClipping_Injected(ref Rect rect);
}
[NativeHeader("Runtime/Camera/Camera.h")]
[NativeHeader("Modules/UI/RectTransformUtil.h")]
[NativeHeader("Runtime/Transform/RectTransform.h")]
[StaticAccessor(/*Could not decode attribute arguments.*/)]
[NativeHeader("Modules/UI/Canvas.h")]
public sealed class RectTransformUtility
{
	private static readonly Vector3[] s_Corners = (Vector3[])(object)new Vector3[4];

	private RectTransformUtility()
	{
	}

	public static Vector2 PixelAdjustPoint(Vector2 point, Transform elementTransform, Canvas canvas)
	{
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		PixelAdjustPoint_Injected(ref point, elementTransform, canvas, out var ret);
		return ret;
	}

	public static Rect PixelAdjustRect(RectTransform rectTransform, Canvas canvas)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		PixelAdjustRect_Injected(rectTransform, canvas, out var ret);
		return ret;
	}

	private static bool PointInRectangle(Vector2 screenPoint, RectTransform rect, Camera cam)
	{
		return PointInRectangle_Injected(ref screenPoint, rect, cam);
	}

	public static bool RectangleContainsScreenPoint(RectTransform rect, Vector2 screenPoint)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		return RectangleContainsScreenPoint(rect, screenPoint, null);
	}

	public static bool RectangleContainsScreenPoint(RectTransform rect, Vector2 screenPoint, Camera cam)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		return PointInRectangle(screenPoint, rect, cam);
	}

	public static bool ScreenPointToWorldPointInRectangle(RectTransform rect, Vector2 screenPoint, Camera cam, out Vector3 worldPoint)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: 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)
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0021: 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_002c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0038: Unknown result type (might be due to invalid IL or missing references)
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		//IL_0055: Unknown result type (might be due to invalid IL or missing references)
		worldPoint = Vector2.op_Implicit(Vector2.zero);
		Ray val = ScreenPointToRay(cam, screenPoint);
		Plane val2 = default(Plane);
		((Plane)(ref val2))..ctor(((Transform)rect).rotation * Vector3.back, ((Transform)rect).position);
		float num = default(float);
		if (!((Plane)(ref val2)).Raycast(val, ref num))
		{
			return false;
		}
		worldPoint = ((Ray)(ref val)).GetPoint(num);
		return true;
	}

	public static bool ScreenPointToLocalPointInRectangle(RectTransform rect, Vector2 screenPoint, Camera cam, out Vector2 localPoint)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		//IL_001f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_0029: Unknown result type (might be due to invalid IL or missing references)
		localPoint = Vector2.zero;
		if (ScreenPointToWorldPointInRectangle(rect, screenPoint, cam, out var worldPoint))
		{
			localPoint = Vector2.op_Implicit(((Transform)rect).InverseTransformPoint(worldPoint));
			return true;
		}
		return false;
	}

	public static Ray ScreenPointToRay(Camera cam, Vector2 screenPos)
	{
		//IL_001f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		//IL_0039: Unknown result type (might be due to invalid IL or missing references)
		//IL_003a: 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)
		//IL_0044: Unknown result type (might be due to invalid IL or missing references)
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_004a: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)cam != (Object)null)
		{
			return cam.ScreenPointToRay(Vector2.op_Implicit(screenPos));
		}
		Vector3 val = Vector2.op_Implicit(screenPos);
		val.z -= 100f;
		return new Ray(val, Vector3.forward);
	}

	public static Vector2 WorldToScreenPoint(Camera cam, Vector3 worldPoint)
	{
		//IL_0027: Unknown result type (might be due to invalid IL or missing references)
		//IL_0028: 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_0032: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		//IL_0038: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)cam == (Object)null)
		{
			return new Vector2(worldPoint.x, worldPoint.y);
		}
		return Vector2.op_Implicit(cam.WorldToScreenPoint(worldPoint));
	}

	public static Bounds CalculateRelativeRectTransformBounds(Transform root, Transform child)
	{
		//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00de: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
		//IL_0040: Unknown result type (might be due to invalid IL or missing references)
		//IL_0045: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0079: Unknown result type (might be due to invalid IL or missing references)
		//IL_007e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0083: Unknown result type (might be due to invalid IL or missing references)
		//IL_0085: Unknown result type (might be due to invalid IL or missing references)
		//IL_0087: Unknown result type (might be due to invalid IL or missing references)
		//IL_0088: Unknown result type (might be due to invalid IL or missing references)
		//IL_008d: Unknown result type (might be due to invalid IL or missing references)
		//IL_008e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0090: Unknown result type (might be due to invalid IL or missing references)
		//IL_0091: Unknown result type (might be due to invalid IL or missing references)
		//IL_0096: Unknown result type (might be due to invalid IL or missing references)
		RectTransform[] componentsInChildren = ((Component)child).GetComponentsInChildren<RectTransform>(false);
		if (componentsInChildren.Length > 0)
		{
			Vector3 val = default(Vector3);
			((Vector3)(ref val))..ctor(float.MaxValue, float.MaxValue, float.MaxValue);
			Vector3 val2 = default(Vector3);
			((Vector3)(ref val2))..ctor(float.MinValue, float.MinValue, float.MinValue);
			Matrix4x4 worldToLocalMatrix = root.worldToLocalMatrix;
			int i = 0;
			for (int num = componentsInChildren.Length; i < num; i++)
			{
				componentsInChildren[i].GetWorldCorners(s_Corners);
				for (int j = 0; j < 4; j++)
				{
					Vector3 val3 = ((Matrix4x4)(ref worldToLocalMatrix)).MultiplyPoint3x4(s_Corners[j]);
					val = Vector3.Min(val3, val);
					val2 = Vector3.Max(val3, val2);
				}
			}
			Bounds result = default(Bounds);
			((Bounds)(ref result))..ctor(val, Vector3.zero);
			((Bounds)(ref result)).Encapsulate(val2);
			return result;
		}
		return new Bounds(Vector3.zero, Vector3.zero);
	}

	public static Bounds CalculateRelativeRectTransformBounds(Transform trans)
	{
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		return CalculateRelativeRectTransformBounds(trans, trans);
	}

	public static void FlipLayoutOnAxis(RectTransform rect, int axis, bool keepPositioning, bool recursive)
	{
		//IL_0056: Unknown result type (might be due to invalid IL or missing references)
		//IL_005b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0073: Unknown result type (might be due to invalid IL or missing references)
		//IL_0085: Unknown result type (might be due to invalid IL or missing references)
		//IL_008a: Unknown result type (might be due to invalid IL or missing references)
		//IL_009d: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)rect == (Object)null)
		{
			return;
		}
		if (recursive)
		{
			for (int i = 0; i < ((Transform)rect).childCount; i++)
			{
				Transform child = ((Transform)rect).GetChild(i);
				RectTransform val = (RectTransform)(object)((child is RectTransform) ? child : null);
				if ((Object)(object)val != (Object)null)
				{
					FlipLayoutOnAxis(val, axis, keepPositioning: false, recursive: true);
				}
			}
		}
		Vector2 pivot = rect.pivot;
		((Vector2)(ref pivot))[axis] = 1f - ((Vector2)(ref pivot))[axis];
		rect.pivot = pivot;
		if (!keepPositioning)
		{
			Vector2 anchoredPosition = rect.anchoredPosition;
			((Vector2)(ref anchoredPosition))[axis] = 0f - ((Vector2)(ref anchoredPosition))[axis];
			rect.anchoredPosition = anchoredPosition;
			Vector2 anchorMin = rect.anchorMin;
			Vector2 anchorMax = rect.anchorMax;
			float num = ((Vector2)(ref anchorMin))[axis];
			((Vector2)(ref anchorMin))[axis] = 1f - ((Vector2)(ref anchorMax))[axis];
			((Vector2)(ref anchorMax))[axis] = 1f - num;
			rect.anchorMin = anchorMin;
			rect.anchorMax = anchorMax;
		}
	}

	public static void FlipLayoutAxes(RectTransform rect, bool keepPositioning, bool recursive)
	{
		//IL_0056: Unknown result type (might be due to invalid IL or missing references)
		//IL_005b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0067: Unknown result type (might be due to invalid IL or missing references)
		//IL_006c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0083: Unknown result type (might be due to invalid IL or missing references)
		//IL_0088: Unknown result type (might be due to invalid IL or missing references)
		//IL_0094: Unknown result type (might be due to invalid IL or missing references)
		//IL_0099: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)rect == (Object)null)
		{
			return;
		}
		if (recursive)
		{
			for (int i = 0; i < ((Transform)rect).childCount; i++)
			{
				Transform child = ((Transform)rect).GetChild(i);
				RectTransform val = (RectTransform)(object)((child is RectTransform) ? child : null);
				if ((Object)(object)val != (Object)null)
				{
					FlipLayoutAxes(val, keepPositioning: false, recursive: true);
				}
			}
		}
		rect.pivot = GetTransposed(rect.pivot);
		rect.sizeDelta = GetTransposed(rect.sizeDelta);
		if (!keepPositioning)
		{
			rect.anchoredPosition = GetTransposed(rect.anchoredPosition);
			rect.anchorMin = GetTransposed(rect.anchorMin);
			rect.anchorMax = GetTransposed(rect.anchorMax);
		}
	}

	private static Vector2 GetTransposed(Vector2 input)
	{
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		return new Vector2(input.y, input.x);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void PixelAdjustPoint_Injected(ref Vector2 point, Transform elementTransform, Canvas canvas, out Vector2 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void PixelAdjustRect_Injected(RectTransform rectTransform, Canvas canvas, out Rect ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern bool PointInRectangle_Injected(ref Vector2 screenPoint, RectTransform rect, Camera cam);
}
public enum RenderMode
{
	ScreenSpaceOverlay,
	ScreenSpaceCamera,
	WorldSpace
}
[Flags]
public enum AdditionalCanvasShaderChannels
{
	None = 0,
	TexCoord1 = 1,
	TexCoord2 = 2,
	TexCoord3 = 4,
	Normal = 8,
	Tangent = 0x10
}
[NativeHeader("Modules/UI/Canvas.h")]
[NativeClass("UI::Canvas")]
[RequireComponent(typeof(RectTransform))]
[NativeHeader("Modules/UI/UIStructs.h")]
public sealed class Canvas : Behaviour
{
	public delegate void WillRenderCanvases();

	public extern RenderMode renderMode
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern bool isRootCanvas
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	public Rect pixelRect
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_pixelRect_Injected(out var ret);
			return ret;
		}
	}

	public extern float scaleFactor
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float referencePixelsPerUnit
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern bool overridePixelPerfect
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern bool pixelPerfect
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float planeDistance
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern int renderOrder
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	public extern bool overrideSorting
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern int sortingOrder
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern int targetDisplay
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern int sortingLayerID
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern int cachedSortingLayerValue
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	public extern AdditionalCanvasShaderChannels additionalShaderChannels
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern string sortingLayerName
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern Canvas rootCanvas
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	[NativeProperty(/*Could not decode attribute arguments.*/)]
	public extern Camera worldCamera
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[NativeProperty(/*Could not decode attribute arguments.*/)]
	public extern float normalizedSortingGridSize
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	[Obsolete("Setting normalizedSize via a int is not supported. Please use normalizedSortingGridSize", false)]
	[NativeProperty(/*Could not decode attribute arguments.*/)]
	public extern int sortingGridNormalizedSize
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public static event WillRenderCanvases willRenderCanvases;

	[MethodImpl(MethodImplOptions.InternalCall)]
	[Obsolete("Shared default material now used for text and general UI elements, call Canvas.GetDefaultCanvasMaterial()", false)]
	[FreeFunction("UI::GetDefaultUIMaterial")]
	public static extern Material GetDefaultCanvasTextMaterial();

	[MethodImpl(MethodImplOptions.InternalCall)]
	[FreeFunction("UI::GetDefaultUIMaterial")]
	public static extern Material GetDefaultCanvasMaterial();

	[MethodImpl(MethodImplOptions.InternalCall)]
	[FreeFunction("UI::GetETC1SupportedCanvasMaterial")]
	public static extern Material GetETC1SupportedCanvasMaterial();

	public static void ForceUpdateCanvases()
	{
		SendWillRenderCanvases();
	}

	[RequiredByNativeCode]
	private static void SendWillRenderCanvases()
	{
		if (Canvas.willRenderCanvases != null)
		{
			Canvas.willRenderCanvases();
		}
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_pixelRect_Injected(out Rect ret);
}
[StaticAccessor(/*Could not decode attribute arguments.*/)]
[NativeHeader("Modules/UI/Canvas.h")]
public static class UISystemProfilerApi
{
	public enum SampleType
	{
		Layout,
		Render
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	public static extern void BeginSample(SampleType type);

	[MethodImpl(MethodImplOptions.InternalCall)]
	public static extern void EndSample(SampleType type);

	[MethodImpl(MethodImplOptions.InternalCall)]
	public static extern void AddMarker(string name, Object obj);
}

Room Architect Tool_Data/Managed/UnityEngine.UmbraModule.dll

Decompiled 3 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;

[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]

Room Architect Tool_Data/Managed/UnityEngine.UNETModule.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Net;
using System.Net.Sockets;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;
using UnityEngine.Networking.Types;

[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine.Networking.Match
{
	[Obsolete("The matchmaker and relay feature will be removed in the future, minimal support will continue until this can be safely done.")]
	public class MatchInfo
	{
		public string address { get; private set; }

		public int port { get; private set; }

		public int domain { get; private set; }

		public NetworkID networkId { get; private set; }

		public NetworkAccessToken accessToken { get; private set; }

		public NodeID nodeId { get; private set; }

		public bool usingRelay { get; private set; }

		public MatchInfo()
		{
		}

		internal MatchInfo(CreateMatchResponse matchResponse)
		{
			address = matchResponse.address;
			port = matchResponse.port;
			domain = matchResponse.domain;
			networkId = (NetworkID)matchResponse.networkId;
			accessToken = new NetworkAccessToken(matchResponse.accessTokenString);
			nodeId = matchResponse.nodeId;
			usingRelay = matchResponse.usingRelay;
		}

		internal MatchInfo(JoinMatchResponse matchResponse)
		{
			address = matchResponse.address;
			port = matchResponse.port;
			domain = matchResponse.domain;
			networkId = (NetworkID)matchResponse.networkId;
			accessToken = new NetworkAccessToken(matchResponse.accessTokenString);
			nodeId = matchResponse.nodeId;
			usingRelay = matchResponse.usingRelay;
		}

		public override string ToString()
		{
			return UnityString.Format("{0} @ {1}:{2} [{3},{4}]", new object[5] { networkId, address, port, nodeId, usingRelay });
		}
	}
	[Obsolete("The matchmaker and relay feature will be removed in the future, minimal support will continue until this can be safely done.")]
	public class MatchInfoSnapshot
	{
		public class MatchInfoDirectConnectSnapshot
		{
			public NodeID nodeId { get; private set; }

			public string publicAddress { get; private set; }

			public string privateAddress { get; private set; }

			public HostPriority hostPriority { get; private set; }

			public MatchInfoDirectConnectSnapshot()
			{
			}

			internal MatchInfoDirectConnectSnapshot(MatchDirectConnectInfo matchDirectConnectInfo)
			{
				nodeId = matchDirectConnectInfo.nodeId;
				publicAddress = matchDirectConnectInfo.publicAddress;
				privateAddress = matchDirectConnectInfo.privateAddress;
				hostPriority = matchDirectConnectInfo.hostPriority;
			}
		}

		public NetworkID networkId { get; private set; }

		public NodeID hostNodeId { get; private set; }

		public string name { get; private set; }

		public int averageEloScore { get; private set; }

		public int maxSize { get; private set; }

		public int currentSize { get; private set; }

		public bool isPrivate { get; private set; }

		public Dictionary<string, long> matchAttributes { get; private set; }

		public List<MatchInfoDirectConnectSnapshot> directConnectInfos { get; private set; }

		public MatchInfoSnapshot()
		{
		}

		internal MatchInfoSnapshot(MatchDesc matchDesc)
		{
			networkId = (NetworkID)matchDesc.networkId;
			hostNodeId = matchDesc.hostNodeId;
			name = matchDesc.name;
			averageEloScore = matchDesc.averageEloScore;
			maxSize = matchDesc.maxSize;
			currentSize = matchDesc.currentSize;
			isPrivate = matchDesc.isPrivate;
			matchAttributes = matchDesc.matchAttributes;
			directConnectInfos = new List<MatchInfoDirectConnectSnapshot>();
			foreach (MatchDirectConnectInfo directConnectInfo in matchDesc.directConnectInfos)
			{
				directConnectInfos.Add(new MatchInfoDirectConnectSnapshot(directConnectInfo));
			}
		}
	}
	[Obsolete("The matchmaker and relay feature will be removed in the future, minimal support will continue until this can be safely done.")]
	public class NetworkMatch : MonoBehaviour
	{
		public delegate void BasicResponseDelegate(bool success, string extendedInfo);

		public delegate void DataResponseDelegate<T>(bool success, string extendedInfo, T responseData);

		private delegate void InternalResponseDelegate<T, U>(T response, U userCallback);

		private Uri m_BaseUri = new Uri("https://mm.unet.unity3d.com");

		public Uri baseUri
		{
			get
			{
				return m_BaseUri;
			}
			set
			{
				m_BaseUri = value;
			}
		}

		[Obsolete("This function is not used any longer to interface with the matchmaker. Please set up your project by logging in through the editor connect dialog.", true)]
		[EditorBrowsable(EditorBrowsableState.Never)]
		public void SetProgramAppID(AppID programAppID)
		{
		}

		public Coroutine CreateMatch(string matchName, uint matchSize, bool matchAdvertise, string matchPassword, string publicClientAddress, string privateClientAddress, int eloScoreForMatch, int requestDomain, DataResponseDelegate<MatchInfo> callback)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Invalid comparison between Unknown and I4
			if ((int)Application.platform == 17)
			{
				Debug.LogError((object)"Matchmaking is not supported on WebGL player.");
				return null;
			}
			return CreateMatch(new CreateMatchRequest
			{
				name = matchName,
				size = matchSize,
				advertise = matchAdvertise,
				password = matchPassword,
				publicAddress = publicClientAddress,
				privateAddress = privateClientAddress,
				eloScore = eloScoreForMatch,
				domain = requestDomain
			}, callback);
		}

		internal Coroutine CreateMatch(CreateMatchRequest req, DataResponseDelegate<MatchInfo> callback)
		{
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Expected O, but got Unknown
			if (callback == null)
			{
				Debug.Log((object)"callback supplied is null, aborting CreateMatch Request.");
				return null;
			}
			Uri uri = new Uri(baseUri, "/json/reply/CreateMatchRequest");
			Debug.Log((object)("MatchMakingClient Create :" + uri));
			WWWForm val = new WWWForm();
			val.AddField("version", Request.currentVersion);
			val.AddField("projectId", Application.cloudProjectId);
			val.AddField("sourceId", Utility.GetSourceID().ToString());
			val.AddField("accessTokenString", 0);
			val.AddField("domain", req.domain);
			val.AddField("name", req.name);
			val.AddField("size", req.size.ToString());
			val.AddField("advertise", req.advertise.ToString());
			val.AddField("password", req.password);
			val.AddField("publicAddress", req.publicAddress);
			val.AddField("privateAddress", req.privateAddress);
			val.AddField("eloScore", req.eloScore.ToString());
			val.headers["Accept"] = "application/json";
			UnityWebRequest client = UnityWebRequest.Post(uri.ToString(), val);
			return ((MonoBehaviour)this).StartCoroutine(ProcessMatchResponse<CreateMatchResponse, DataResponseDelegate<MatchInfo>>(client, OnMatchCreate, callback));
		}

		internal virtual void OnMatchCreate(CreateMatchResponse response, DataResponseDelegate<MatchInfo> userCallback)
		{
			if (response.success)
			{
				Utility.SetAccessTokenForNetwork((NetworkID)response.networkId, new NetworkAccessToken(response.accessTokenString));
			}
			userCallback(response.success, response.extendedInfo, new MatchInfo(response));
		}

		public Coroutine JoinMatch(NetworkID netId, string matchPassword, string publicClientAddress, string privateClientAddress, int eloScoreForClient, int requestDomain, DataResponseDelegate<MatchInfo> callback)
		{
			return JoinMatch(new JoinMatchRequest
			{
				networkId = netId,
				password = matchPassword,
				publicAddress = publicClientAddress,
				privateAddress = privateClientAddress,
				eloScore = eloScoreForClient,
				domain = requestDomain
			}, callback);
		}

		internal Coroutine JoinMatch(JoinMatchRequest req, DataResponseDelegate<MatchInfo> callback)
		{
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Expected O, but got Unknown
			if (callback == null)
			{
				Debug.Log((object)"callback supplied is null, aborting JoinMatch Request.");
				return null;
			}
			Uri uri = new Uri(baseUri, "/json/reply/JoinMatchRequest");
			Debug.Log((object)("MatchMakingClient Join :" + uri));
			WWWForm val = new WWWForm();
			val.AddField("version", Request.currentVersion);
			val.AddField("projectId", Application.cloudProjectId);
			val.AddField("sourceId", Utility.GetSourceID().ToString());
			val.AddField("accessTokenString", 0);
			val.AddField("domain", req.domain);
			val.AddField("networkId", req.networkId.ToString());
			val.AddField("password", req.password);
			val.AddField("publicAddress", req.publicAddress);
			val.AddField("privateAddress", req.privateAddress);
			val.AddField("eloScore", req.eloScore.ToString());
			val.headers["Accept"] = "application/json";
			UnityWebRequest client = UnityWebRequest.Post(uri.ToString(), val);
			return ((MonoBehaviour)this).StartCoroutine(ProcessMatchResponse<JoinMatchResponse, DataResponseDelegate<MatchInfo>>(client, OnMatchJoined, callback));
		}

		internal void OnMatchJoined(JoinMatchResponse response, DataResponseDelegate<MatchInfo> userCallback)
		{
			if (response.success)
			{
				Utility.SetAccessTokenForNetwork((NetworkID)response.networkId, new NetworkAccessToken(response.accessTokenString));
			}
			userCallback(response.success, response.extendedInfo, new MatchInfo(response));
		}

		public Coroutine DestroyMatch(NetworkID netId, int requestDomain, BasicResponseDelegate callback)
		{
			return DestroyMatch(new DestroyMatchRequest
			{
				networkId = netId,
				domain = requestDomain
			}, callback);
		}

		internal Coroutine DestroyMatch(DestroyMatchRequest req, BasicResponseDelegate callback)
		{
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Expected O, but got Unknown
			if (callback == null)
			{
				Debug.Log((object)"callback supplied is null, aborting DestroyMatch Request.");
				return null;
			}
			Uri uri = new Uri(baseUri, "/json/reply/DestroyMatchRequest");
			Debug.Log((object)("MatchMakingClient Destroy :" + uri.ToString()));
			WWWForm val = new WWWForm();
			val.AddField("version", Request.currentVersion);
			val.AddField("projectId", Application.cloudProjectId);
			val.AddField("sourceId", Utility.GetSourceID().ToString());
			val.AddField("accessTokenString", Utility.GetAccessTokenForNetwork(req.networkId).GetByteString());
			val.AddField("domain", req.domain);
			val.AddField("networkId", req.networkId.ToString());
			val.headers["Accept"] = "application/json";
			UnityWebRequest client = UnityWebRequest.Post(uri.ToString(), val);
			return ((MonoBehaviour)this).StartCoroutine(ProcessMatchResponse<BasicResponse, BasicResponseDelegate>(client, OnMatchDestroyed, callback));
		}

		internal void OnMatchDestroyed(BasicResponse response, BasicResponseDelegate userCallback)
		{
			userCallback(response.success, response.extendedInfo);
		}

		public Coroutine DropConnection(NetworkID netId, NodeID dropNodeId, int requestDomain, BasicResponseDelegate callback)
		{
			return DropConnection(new DropConnectionRequest
			{
				networkId = netId,
				nodeId = dropNodeId,
				domain = requestDomain
			}, callback);
		}

		internal Coroutine DropConnection(DropConnectionRequest req, BasicResponseDelegate callback)
		{
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Expected O, but got Unknown
			if (callback == null)
			{
				Debug.Log((object)"callback supplied is null, aborting DropConnection Request.");
				return null;
			}
			Uri uri = new Uri(baseUri, "/json/reply/DropConnectionRequest");
			Debug.Log((object)("MatchMakingClient DropConnection :" + uri));
			WWWForm val = new WWWForm();
			val.AddField("version", Request.currentVersion);
			val.AddField("projectId", Application.cloudProjectId);
			val.AddField("sourceId", Utility.GetSourceID().ToString());
			val.AddField("accessTokenString", Utility.GetAccessTokenForNetwork(req.networkId).GetByteString());
			val.AddField("domain", req.domain);
			val.AddField("networkId", req.networkId.ToString());
			val.AddField("nodeId", req.nodeId.ToString());
			val.headers["Accept"] = "application/json";
			UnityWebRequest client = UnityWebRequest.Post(uri.ToString(), val);
			return ((MonoBehaviour)this).StartCoroutine(ProcessMatchResponse<DropConnectionResponse, BasicResponseDelegate>(client, OnDropConnection, callback));
		}

		internal void OnDropConnection(DropConnectionResponse response, BasicResponseDelegate userCallback)
		{
			userCallback(response.success, response.extendedInfo);
		}

		public Coroutine ListMatches(int startPageNumber, int resultPageSize, string matchNameFilter, bool filterOutPrivateMatchesFromResults, int eloScoreTarget, int requestDomain, DataResponseDelegate<List<MatchInfoSnapshot>> callback)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Invalid comparison between Unknown and I4
			if ((int)Application.platform == 17)
			{
				Debug.LogError((object)"Matchmaking is not supported on WebGL player.");
				return null;
			}
			return ListMatches(new ListMatchRequest
			{
				pageNum = startPageNumber,
				pageSize = resultPageSize,
				nameFilter = matchNameFilter,
				filterOutPrivateMatches = filterOutPrivateMatchesFromResults,
				eloScore = eloScoreTarget,
				domain = requestDomain
			}, callback);
		}

		internal Coroutine ListMatches(ListMatchRequest req, DataResponseDelegate<List<MatchInfoSnapshot>> callback)
		{
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Expected O, but got Unknown
			if (callback == null)
			{
				Debug.Log((object)"callback supplied is null, aborting ListMatch Request.");
				return null;
			}
			Uri uri = new Uri(baseUri, "/json/reply/ListMatchRequest");
			Debug.Log((object)("MatchMakingClient ListMatches :" + uri));
			WWWForm val = new WWWForm();
			val.AddField("version", Request.currentVersion);
			val.AddField("projectId", Application.cloudProjectId);
			val.AddField("sourceId", Utility.GetSourceID().ToString());
			val.AddField("accessTokenString", 0);
			val.AddField("domain", req.domain);
			val.AddField("pageSize", req.pageSize);
			val.AddField("pageNum", req.pageNum);
			val.AddField("nameFilter", req.nameFilter);
			val.AddField("filterOutPrivateMatches", req.filterOutPrivateMatches.ToString());
			val.AddField("eloScore", req.eloScore.ToString());
			val.headers["Accept"] = "application/json";
			UnityWebRequest client = UnityWebRequest.Post(uri.ToString(), val);
			return ((MonoBehaviour)this).StartCoroutine(ProcessMatchResponse<ListMatchResponse, DataResponseDelegate<List<MatchInfoSnapshot>>>(client, OnMatchList, callback));
		}

		internal void OnMatchList(ListMatchResponse response, DataResponseDelegate<List<MatchInfoSnapshot>> userCallback)
		{
			List<MatchInfoSnapshot> list = new List<MatchInfoSnapshot>();
			foreach (MatchDesc match in response.matches)
			{
				list.Add(new MatchInfoSnapshot(match));
			}
			userCallback(response.success, response.extendedInfo, list);
		}

		public Coroutine SetMatchAttributes(NetworkID networkId, bool isListed, int requestDomain, BasicResponseDelegate callback)
		{
			return SetMatchAttributes(new SetMatchAttributesRequest
			{
				networkId = networkId,
				isListed = isListed,
				domain = requestDomain
			}, callback);
		}

		internal Coroutine SetMatchAttributes(SetMatchAttributesRequest req, BasicResponseDelegate callback)
		{
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Expected O, but got Unknown
			if (callback == null)
			{
				Debug.Log((object)"callback supplied is null, aborting SetMatchAttributes Request.");
				return null;
			}
			Uri uri = new Uri(baseUri, "/json/reply/SetMatchAttributesRequest");
			Debug.Log((object)("MatchMakingClient SetMatchAttributes :" + uri));
			WWWForm val = new WWWForm();
			val.AddField("version", Request.currentVersion);
			val.AddField("projectId", Application.cloudProjectId);
			val.AddField("sourceId", Utility.GetSourceID().ToString());
			val.AddField("accessTokenString", Utility.GetAccessTokenForNetwork(req.networkId).GetByteString());
			val.AddField("domain", req.domain);
			val.AddField("networkId", req.networkId.ToString());
			val.AddField("isListed", req.isListed.ToString());
			val.headers["Accept"] = "application/json";
			UnityWebRequest client = UnityWebRequest.Post(uri.ToString(), val);
			return ((MonoBehaviour)this).StartCoroutine(ProcessMatchResponse<BasicResponse, BasicResponseDelegate>(client, OnSetMatchAttributes, callback));
		}

		internal void OnSetMatchAttributes(BasicResponse response, BasicResponseDelegate userCallback)
		{
			userCallback(response.success, response.extendedInfo);
		}

		private IEnumerator ProcessMatchResponse<JSONRESPONSE, USERRESPONSEDELEGATETYPE>(UnityWebRequest client, InternalResponseDelegate<JSONRESPONSE, USERRESPONSEDELEGATETYPE> internalCallback, USERRESPONSEDELEGATETYPE userCallback) where JSONRESPONSE : Response, new()
		{
			yield return client.SendWebRequest();
			JSONRESPONSE jsonInterface = new JSONRESPONSE();
			if (!client.isNetworkError && !client.isHttpError)
			{
				try
				{
					JsonUtility.FromJsonOverwrite(client.downloadHandler.text, (object)jsonInterface);
				}
				catch (ArgumentException ex)
				{
					jsonInterface.SetFailure(UnityString.Format("ArgumentException:[{0}] ", new object[1] { ex.ToString() }));
				}
			}
			else
			{
				jsonInterface.SetFailure(UnityString.Format("Request error:[{0}] Raw response:[{1}]", new object[2]
				{
					client.error,
					client.downloadHandler.text
				}));
			}
			client.Dispose();
			internalCallback(jsonInterface, userCallback);
		}
	}
}
namespace UnityEngine.Networking
{
	[NativeHeader("Modules/UNET/UNetTypes.h")]
	[NativeHeader("Modules/UNET/UNETManager.h")]
	[NativeHeader("Modules/UNET/UNETConfiguration.h")]
	[NativeConditional("ENABLE_NETWORK && ENABLE_UNET", true)]
	[Obsolete("The UNET transport will be removed in the future as soon a replacement is ready.")]
	public sealed class NetworkTransport
	{
		private static int s_nextSceneId = 1;

		public static bool IsStarted => IsStartedInternal();

		private NetworkTransport()
		{
		}

		public static bool DoesEndPointUsePlatformProtocols(EndPoint endPoint)
		{
			if (endPoint.GetType().FullName == "UnityEngine.PS4.SceEndPoint")
			{
				SocketAddress socketAddress = endPoint.Serialize();
				if (socketAddress[8] != 0 || socketAddress[9] != 0)
				{
					return true;
				}
			}
			return false;
		}

		public static int ConnectEndPoint(int hostId, EndPoint endPoint, int exceptionConnectionId, out byte error)
		{
			error = 0;
			byte[] array = new byte[4] { 95, 36, 19, 246 };
			if (endPoint == null)
			{
				throw new NullReferenceException("Null EndPoint provided");
			}
			if (endPoint.GetType().FullName != "UnityEngine.XboxOne.XboxOneEndPoint" && endPoint.GetType().FullName != "UnityEngine.PS4.SceEndPoint" && endPoint.GetType().FullName != "UnityEngine.PSVita.SceEndPoint")
			{
				throw new ArgumentException("Endpoint of type XboxOneEndPoint or SceEndPoint  required");
			}
			if (endPoint.GetType().FullName == "UnityEngine.XboxOne.XboxOneEndPoint")
			{
				if (endPoint.AddressFamily != AddressFamily.InterNetworkV6)
				{
					throw new ArgumentException("XboxOneEndPoint has an invalid family");
				}
				SocketAddress socketAddress = endPoint.Serialize();
				if (socketAddress.Size != 14)
				{
					throw new ArgumentException("XboxOneEndPoint has an invalid size");
				}
				if (socketAddress[0] != 0 || socketAddress[1] != 0)
				{
					throw new ArgumentException("XboxOneEndPoint has an invalid family signature");
				}
				if (socketAddress[2] != array[0] || socketAddress[3] != array[1] || socketAddress[4] != array[2] || socketAddress[5] != array[3])
				{
					throw new ArgumentException("XboxOneEndPoint has an invalid signature");
				}
				byte[] array2 = new byte[8];
				for (int i = 0; i < array2.Length; i++)
				{
					array2[i] = socketAddress[6 + i];
				}
				IntPtr intPtr = new IntPtr(BitConverter.ToInt64(array2, 0));
				if (intPtr == IntPtr.Zero)
				{
					throw new ArgumentException("XboxOneEndPoint has an invalid SOCKET_STORAGE pointer");
				}
				byte[] array3 = new byte[2];
				Marshal.Copy(intPtr, array3, 0, array3.Length);
				AddressFamily addressFamily = (AddressFamily)((array3[1] << 8) + array3[0]);
				if (addressFamily != AddressFamily.InterNetworkV6)
				{
					throw new ArgumentException("XboxOneEndPoint has corrupt or invalid SOCKET_STORAGE pointer");
				}
				return Internal_ConnectEndPoint(hostId, array2, 128, exceptionConnectionId, out error);
			}
			SocketAddress socketAddress2 = endPoint.Serialize();
			if (socketAddress2.Size != 16)
			{
				throw new ArgumentException("EndPoint has an invalid size");
			}
			if (socketAddress2[0] != socketAddress2.Size)
			{
				throw new ArgumentException("EndPoint has an invalid size value");
			}
			if (socketAddress2[1] != 2)
			{
				throw new ArgumentException("EndPoint has an invalid family value");
			}
			byte[] array4 = new byte[16];
			for (int j = 0; j < array4.Length; j++)
			{
				array4[j] = socketAddress2[j];
			}
			return Internal_ConnectEndPoint(hostId, array4, 16, exceptionConnectionId, out error);
		}

		public static void Init()
		{
			InitializeClass();
		}

		public static void Init(GlobalConfig config)
		{
			if (config.NetworkEventAvailable != null)
			{
				SetNetworkEventAvailableCallback(config.NetworkEventAvailable);
			}
			if (config.ConnectionReadyForSend != null)
			{
				SetConnectionReadyForSendCallback(config.ConnectionReadyForSend);
			}
			InitializeClassWithConfig(new GlobalConfigInternal(config));
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::InitializeClass")]
		private static extern void InitializeClass();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::InitializeClassWithConfig")]
		private static extern void InitializeClassWithConfig(GlobalConfigInternal config);

		public static void Shutdown()
		{
			Cleanup();
		}

		[Obsolete("This function has been deprecated. Use AssetDatabase utilities instead.")]
		public static string GetAssetId(GameObject go)
		{
			return "";
		}

		public static void AddSceneId(int id)
		{
			if (id > s_nextSceneId)
			{
				s_nextSceneId = id + 1;
			}
		}

		public static int GetNextSceneId()
		{
			return s_nextSceneId++;
		}

		public static int AddHostWithSimulator(HostTopology topology, int minTimeout, int maxTimeout, int port, string ip)
		{
			if (topology == null)
			{
				throw new NullReferenceException("topology is not defined");
			}
			CheckTopology(topology);
			return AddHostInternal(new HostTopologyInternal(topology), ip, port, minTimeout, maxTimeout);
		}

		public static int AddHostWithSimulator(HostTopology topology, int minTimeout, int maxTimeout, int port)
		{
			return AddHostWithSimulator(topology, minTimeout, maxTimeout, port, null);
		}

		public static int AddHostWithSimulator(HostTopology topology, int minTimeout, int maxTimeout)
		{
			return AddHostWithSimulator(topology, minTimeout, maxTimeout, 0, null);
		}

		public static int AddHost(HostTopology topology, int port, string ip)
		{
			return AddHostWithSimulator(topology, 0, 0, port, ip);
		}

		public static int AddHost(HostTopology topology, int port)
		{
			return AddHost(topology, port, null);
		}

		public static int AddHost(HostTopology topology)
		{
			return AddHost(topology, 0, null);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->AddHost")]
		private static extern int AddHostInternal(HostTopologyInternal topologyInt, string ip, int port, int minTimeout, int maxTimeout);

		public static int AddWebsocketHost(HostTopology topology, int port, string ip)
		{
			if (port != 0 && IsPortOpen(ip, port))
			{
				throw new InvalidOperationException("Cannot open web socket on port " + port + " It has been already occupied.");
			}
			if (topology == null)
			{
				throw new NullReferenceException("topology is not defined");
			}
			CheckTopology(topology);
			return AddWsHostInternal(new HostTopologyInternal(topology), ip, port);
		}

		public static int AddWebsocketHost(HostTopology topology, int port)
		{
			return AddWebsocketHost(topology, port, null);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->AddWsHost")]
		private static extern int AddWsHostInternal(HostTopologyInternal topologyInt, string ip, int port);

		private static bool IsPortOpen(string ip, int port)
		{
			TimeSpan timeout = TimeSpan.FromMilliseconds(500.0);
			string host = ((ip != null) ? ip : "127.0.0.1");
			try
			{
				using TcpClient tcpClient = new TcpClient();
				IAsyncResult asyncResult = tcpClient.BeginConnect(host, port, null, null);
				if (!asyncResult.AsyncWaitHandle.WaitOne(timeout))
				{
					return false;
				}
				tcpClient.EndConnect(asyncResult);
			}
			catch
			{
				return false;
			}
			return true;
		}

		public static void ConnectAsNetworkHost(int hostId, string address, int port, NetworkID network, SourceID source, NodeID node, out byte error)
		{
			ConnectAsNetworkHostInternal(hostId, address, port, (ulong)network, (ulong)source, (ushort)node, out error);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->ConnectAsNetworkHost")]
		private static extern void ConnectAsNetworkHostInternal(int hostId, string address, int port, ulong network, ulong source, ushort node, out byte error);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->DisconnectNetworkHost")]
		public static extern void DisconnectNetworkHost(int hostId, out byte error);

		public static NetworkEventType ReceiveRelayEventFromHost(int hostId, out byte error)
		{
			return (NetworkEventType)ReceiveRelayEventFromHostInternal(hostId, out error);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->PopRelayHostData")]
		private static extern int ReceiveRelayEventFromHostInternal(int hostId, out byte error);

		public static int ConnectToNetworkPeer(int hostId, string address, int port, int exceptionConnectionId, int relaySlotId, NetworkID network, SourceID source, NodeID node, int bytesPerSec, float bucketSizeFactor, out byte error)
		{
			return ConnectToNetworkPeerInternal(hostId, address, port, exceptionConnectionId, relaySlotId, (ulong)network, (ulong)source, (ushort)node, bytesPerSec, bucketSizeFactor, out error);
		}

		public static int ConnectToNetworkPeer(int hostId, string address, int port, int exceptionConnectionId, int relaySlotId, NetworkID network, SourceID source, NodeID node, out byte error)
		{
			return ConnectToNetworkPeer(hostId, address, port, exceptionConnectionId, relaySlotId, network, source, node, 0, 0f, out error);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->ConnectToNetworkPeer")]
		private static extern int ConnectToNetworkPeerInternal(int hostId, string address, int port, int exceptionConnectionId, int relaySlotId, ulong network, ulong source, ushort node, int bytesPerSec, float bucketSizeFactor, out byte error);

		[Obsolete("GetCurrentIncomingMessageAmount has been deprecated.")]
		public static int GetCurrentIncomingMessageAmount()
		{
			return 0;
		}

		[Obsolete("GetCurrentOutgoingMessageAmount has been deprecated.")]
		public static int GetCurrentOutgoingMessageAmount()
		{
			return 0;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetIncomingMessageQueueSize")]
		public static extern int GetIncomingMessageQueueSize(int hostId, out byte error);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetOutgoingMessageQueueSize")]
		public static extern int GetOutgoingMessageQueueSize(int hostId, out byte error);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetCurrentRTT")]
		public static extern int GetCurrentRTT(int hostId, int connectionId, out byte error);

		[Obsolete("GetCurrentRtt() has been deprecated.")]
		public static int GetCurrentRtt(int hostId, int connectionId, out byte error)
		{
			return GetCurrentRTT(hostId, connectionId, out error);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetIncomingPacketLossCount")]
		public static extern int GetIncomingPacketLossCount(int hostId, int connectionId, out byte error);

		[Obsolete("GetNetworkLostPacketNum() has been deprecated.")]
		public static int GetNetworkLostPacketNum(int hostId, int connectionId, out byte error)
		{
			return GetIncomingPacketLossCount(hostId, connectionId, out error);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetIncomingPacketCount")]
		public static extern int GetIncomingPacketCount(int hostId, int connectionId, out byte error);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetOutgoingPacketNetworkLossPercent")]
		public static extern int GetOutgoingPacketNetworkLossPercent(int hostId, int connectionId, out byte error);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetOutgoingPacketOverflowLossPercent")]
		public static extern int GetOutgoingPacketOverflowLossPercent(int hostId, int connectionId, out byte error);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetMaxAllowedBandwidth")]
		public static extern int GetMaxAllowedBandwidth(int hostId, int connectionId, out byte error);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetAckBufferCount")]
		public static extern int GetAckBufferCount(int hostId, int connectionId, out byte error);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetIncomingPacketDropCountForAllHosts")]
		public static extern int GetIncomingPacketDropCountForAllHosts();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetIncomingPacketCountForAllHosts")]
		public static extern int GetIncomingPacketCountForAllHosts();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetOutgoingPacketCount")]
		public static extern int GetOutgoingPacketCount();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetOutgoingPacketCount")]
		public static extern int GetOutgoingPacketCountForHost(int hostId, out byte error);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetOutgoingPacketCount")]
		public static extern int GetOutgoingPacketCountForConnection(int hostId, int connectionId, out byte error);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetOutgoingMessageCount")]
		public static extern int GetOutgoingMessageCount();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetOutgoingMessageCount")]
		public static extern int GetOutgoingMessageCountForHost(int hostId, out byte error);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetOutgoingMessageCount")]
		public static extern int GetOutgoingMessageCountForConnection(int hostId, int connectionId, out byte error);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetOutgoingUserBytesCount")]
		public static extern int GetOutgoingUserBytesCount();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetOutgoingUserBytesCount")]
		public static extern int GetOutgoingUserBytesCountForHost(int hostId, out byte error);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetOutgoingUserBytesCount")]
		public static extern int GetOutgoingUserBytesCountForConnection(int hostId, int connectionId, out byte error);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetOutgoingSystemBytesCount")]
		public static extern int GetOutgoingSystemBytesCount();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetOutgoingSystemBytesCount")]
		public static extern int GetOutgoingSystemBytesCountForHost(int hostId, out byte error);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetOutgoingSystemBytesCount")]
		public static extern int GetOutgoingSystemBytesCountForConnection(int hostId, int connectionId, out byte error);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetOutgoingFullBytesCount")]
		public static extern int GetOutgoingFullBytesCount();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetOutgoingFullBytesCount")]
		public static extern int GetOutgoingFullBytesCountForHost(int hostId, out byte error);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetOutgoingFullBytesCount")]
		public static extern int GetOutgoingFullBytesCountForConnection(int hostId, int connectionId, out byte error);

		[Obsolete("GetPacketSentRate has been deprecated.")]
		public static int GetPacketSentRate(int hostId, int connectionId, out byte error)
		{
			error = 0;
			return 0;
		}

		[Obsolete("GetPacketReceivedRate has been deprecated.")]
		public static int GetPacketReceivedRate(int hostId, int connectionId, out byte error)
		{
			error = 0;
			return 0;
		}

		[Obsolete("GetRemotePacketReceivedRate has been deprecated.")]
		public static int GetRemotePacketReceivedRate(int hostId, int connectionId, out byte error)
		{
			error = 0;
			return 0;
		}

		[Obsolete("GetNetIOTimeuS has been deprecated.")]
		public static int GetNetIOTimeuS()
		{
			return 0;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetConnectionInfo")]
		public static extern string GetConnectionInfo(int hostId, int connectionId, out int port, out ulong network, out ushort dstNode, out byte error);

		public static void GetConnectionInfo(int hostId, int connectionId, out string address, out int port, out NetworkID network, out NodeID dstNode, out byte error)
		{
			address = GetConnectionInfo(hostId, connectionId, out port, out var network2, out var dstNode2, out error);
			network = (NetworkID)network2;
			dstNode = (NodeID)dstNode2;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetNetworkTimestamp")]
		public static extern int GetNetworkTimestamp();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetRemoteDelayTimeMS")]
		public static extern int GetRemoteDelayTimeMS(int hostId, int connectionId, int remoteTime, out byte error);

		public static bool StartSendMulticast(int hostId, int channelId, byte[] buffer, int size, out byte error)
		{
			return StartSendMulticastInternal(hostId, channelId, buffer, size, out error);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->StartSendMulticast")]
		private static extern bool StartSendMulticastInternal(int hostId, int channelId, [Out] byte[] buffer, int size, out byte error);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->SendMulticast")]
		public static extern bool SendMulticast(int hostId, int connectionId, out byte error);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->FinishSendMulticast")]
		public static extern bool FinishSendMulticast(int hostId, out byte error);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetMaxPacketSize")]
		private static extern int GetMaxPacketSize();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->RemoveHost")]
		public static extern bool RemoveHost(int hostId);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::IsStarted")]
		private static extern bool IsStartedInternal();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->Connect")]
		public static extern int Connect(int hostId, string address, int port, int exeptionConnectionId, out byte error);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->ConnectWithSimulator")]
		private static extern int ConnectWithSimulatorInternal(int hostId, string address, int port, int exeptionConnectionId, out byte error, ConnectionSimulatorConfigInternal conf);

		public static int ConnectWithSimulator(int hostId, string address, int port, int exeptionConnectionId, out byte error, ConnectionSimulatorConfig conf)
		{
			return ConnectWithSimulatorInternal(hostId, address, port, exeptionConnectionId, out error, new ConnectionSimulatorConfigInternal(conf));
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->Disconnect")]
		public static extern bool Disconnect(int hostId, int connectionId, out byte error);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->ConnectSockAddr")]
		private static extern int Internal_ConnectEndPoint(int hostId, [Out] byte[] sockAddrStorage, int sockAddrStorageLen, int exceptionConnectionId, out byte error);

		public static bool Send(int hostId, int connectionId, int channelId, byte[] buffer, int size, out byte error)
		{
			if (buffer == null)
			{
				throw new NullReferenceException("send buffer is not initialized");
			}
			return SendWrapper(hostId, connectionId, channelId, buffer, size, out error);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->Send")]
		private static extern bool SendWrapper(int hostId, int connectionId, int channelId, [Out] byte[] buffer, int size, out byte error);

		public static bool QueueMessageForSending(int hostId, int connectionId, int channelId, byte[] buffer, int size, out byte error)
		{
			if (buffer == null)
			{
				throw new NullReferenceException("send buffer is not initialized");
			}
			return QueueMessageForSendingWrapper(hostId, connectionId, channelId, buffer, size, out error);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->QueueMessageForSending")]
		private static extern bool QueueMessageForSendingWrapper(int hostId, int connectionId, int channelId, [Out] byte[] buffer, int size, out byte error);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->SendQueuedMessages")]
		public static extern bool SendQueuedMessages(int hostId, int connectionId, out byte error);

		public static NetworkEventType Receive(out int hostId, out int connectionId, out int channelId, byte[] buffer, int bufferSize, out int receivedSize, out byte error)
		{
			return (NetworkEventType)PopData(out hostId, out connectionId, out channelId, buffer, bufferSize, out receivedSize, out error);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->PopData")]
		private static extern int PopData(out int hostId, out int connectionId, out int channelId, [Out] byte[] buffer, int bufferSize, out int receivedSize, out byte error);

		public static NetworkEventType ReceiveFromHost(int hostId, out int connectionId, out int channelId, byte[] buffer, int bufferSize, out int receivedSize, out byte error)
		{
			return (NetworkEventType)PopDataFromHost(hostId, out connectionId, out channelId, buffer, bufferSize, out receivedSize, out error);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->PopDataFromHost")]
		private static extern int PopDataFromHost(int hostId, out int connectionId, out int channelId, [Out] byte[] buffer, int bufferSize, out int receivedSize, out byte error);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->SetPacketStat")]
		public static extern void SetPacketStat(int direction, int packetStatId, int numMsgs, int numBytes);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		[FreeFunction("UNETManager::SetNetworkEventAvailableCallback")]
		private static extern void SetNetworkEventAvailableCallback(Action<int> callback);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Cleanup")]
		private static extern void Cleanup();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::SetConnectionReadyForSendCallback")]
		[NativeThrows]
		private static extern void SetConnectionReadyForSendCallback(Action<int, int> callback);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->NotifyWhenConnectionReadyForSend")]
		public static extern bool NotifyWhenConnectionReadyForSend(int hostId, int connectionId, int notificationLevel, out byte error);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetHostPort")]
		public static extern int GetHostPort(int hostId);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->StartBroadcastDiscoveryWithData")]
		private static extern bool StartBroadcastDiscoveryWithData(int hostId, int broadcastPort, int key, int version, int subversion, [Out] byte[] buffer, int size, int timeout, out byte error);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->StartBroadcastDiscoveryWithoutData")]
		private static extern bool StartBroadcastDiscoveryWithoutData(int hostId, int broadcastPort, int key, int version, int subversion, int timeout, out byte error);

		public static bool StartBroadcastDiscovery(int hostId, int broadcastPort, int key, int version, int subversion, byte[] buffer, int size, int timeout, out byte error)
		{
			if (buffer != null)
			{
				if (buffer.Length < size)
				{
					throw new ArgumentOutOfRangeException("Size: " + size + " > buffer.Length " + buffer.Length);
				}
				if (size == 0)
				{
					throw new ArgumentOutOfRangeException("Size is zero while buffer exists, please pass null and 0 as buffer and size parameters");
				}
			}
			if (buffer == null)
			{
				return StartBroadcastDiscoveryWithoutData(hostId, broadcastPort, key, version, subversion, timeout, out error);
			}
			return StartBroadcastDiscoveryWithData(hostId, broadcastPort, key, version, subversion, buffer, size, timeout, out error);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->StopBroadcastDiscovery")]
		public static extern void StopBroadcastDiscovery();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->IsBroadcastDiscoveryRunning")]
		public static extern bool IsBroadcastDiscoveryRunning();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->SetBroadcastCredentials")]
		public static extern void SetBroadcastCredentials(int hostId, int key, int version, int subversion, out byte error);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetBroadcastConnectionInfoInternal")]
		public static extern string GetBroadcastConnectionInfo(int hostId, out int port, out byte error);

		public static void GetBroadcastConnectionInfo(int hostId, out string address, out int port, out byte error)
		{
			address = GetBroadcastConnectionInfo(hostId, out port, out error);
		}

		public static void GetBroadcastConnectionMessage(int hostId, byte[] buffer, int bufferSize, out int receivedSize, out byte error)
		{
			GetBroadcastConnectionMessageInternal(hostId, buffer, bufferSize, out receivedSize, out error);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::SetMulticastLock")]
		public static extern void SetMulticastLock(bool enabled);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UNETManager::Get()->GetBroadcastConnectionMessage")]
		private static extern void GetBroadcastConnectionMessageInternal(int hostId, [Out] byte[] buffer, int bufferSize, out int receivedSize, out byte error);

		private static void CheckTopology(HostTopology topology)
		{
			int maxPacketSize = GetMaxPacketSize();
			if (topology.DefaultConfig.PacketSize > maxPacketSize)
			{
				throw new ArgumentOutOfRangeException("Default config: packet size should be less than packet size defined in global config: " + maxPacketSize);
			}
			for (int i = 0; i < topology.SpecialConnectionConfigs.Count; i++)
			{
				if (topology.SpecialConnectionConfigs[i].PacketSize > maxPacketSize)
				{
					throw new ArgumentOutOfRangeException("Special config " + i + ": packet size should be less than packet size defined in global config: " + maxPacketSize);
				}
			}
		}
	}
	public enum NetworkEventType
	{
		DataEvent,
		ConnectEvent,
		DisconnectEvent,
		Nothing,
		BroadcastEvent
	}
	public enum QosType
	{
		Unreliable,
		UnreliableFragmented,
		UnreliableSequenced,
		Reliable,
		ReliableFragmented,
		ReliableSequenced,
		StateUpdate,
		ReliableStateUpdate,
		AllCostDelivery,
		UnreliableFragmentedSequenced,
		ReliableFragmentedSequenced
	}
	public enum NetworkError
	{
		Ok,
		WrongHost,
		WrongConnection,
		WrongChannel,
		NoResources,
		BadMessage,
		Timeout,
		MessageToLong,
		WrongOperation,
		VersionMismatch,
		CRCMismatch,
		DNSFailure,
		UsageError
	}
	public enum ReactorModel
	{
		SelectReactor,
		FixRateReactor
	}
	public enum ConnectionAcksType
	{
		Acks32 = 1,
		Acks64,
		Acks96,
		Acks128
	}
	[Serializable]
	[Obsolete("The UNET transport will be removed in the future as soon a replacement is ready.")]
	public class ChannelQOS
	{
		[SerializeField]
		internal QosType m_Type;

		[SerializeField]
		internal bool m_BelongsSharedOrderChannel;

		public QosType QOS => m_Type;

		public bool BelongsToSharedOrderChannel => m_BelongsSharedOrderChannel;

		public ChannelQOS(QosType value)
		{
			m_Type = value;
			m_BelongsSharedOrderChannel = false;
		}

		public ChannelQOS()
		{
			m_Type = QosType.Unreliable;
			m_BelongsSharedOrderChannel = false;
		}

		public ChannelQOS(ChannelQOS channel)
		{
			if (channel == null)
			{
				throw new NullReferenceException("channel is not defined");
			}
			m_Type = channel.m_Type;
			m_BelongsSharedOrderChannel = channel.m_BelongsSharedOrderChannel;
		}
	}
	[Serializable]
	[Obsolete("The UNET transport will be removed in the future as soon a replacement is ready.")]
	public class ConnectionConfig
	{
		private const int g_MinPacketSize = 128;

		[SerializeField]
		private ushort m_PacketSize;

		[SerializeField]
		private ushort m_FragmentSize;

		[SerializeField]
		private uint m_ResendTimeout;

		[SerializeField]
		private uint m_DisconnectTimeout;

		[SerializeField]
		private uint m_ConnectTimeout;

		[SerializeField]
		private uint m_MinUpdateTimeout;

		[SerializeField]
		private uint m_PingTimeout;

		[SerializeField]
		private uint m_ReducedPingTimeout;

		[SerializeField]
		private uint m_AllCostTimeout;

		[SerializeField]
		private byte m_NetworkDropThreshold;

		[SerializeField]
		private byte m_OverflowDropThreshold;

		[SerializeField]
		private byte m_MaxConnectionAttempt;

		[SerializeField]
		private uint m_AckDelay;

		[SerializeField]
		private uint m_SendDelay;

		[SerializeField]
		private ushort m_MaxCombinedReliableMessageSize;

		[SerializeField]
		private ushort m_MaxCombinedReliableMessageCount;

		[SerializeField]
		private ushort m_MaxSentMessageQueueSize;

		[SerializeField]
		private ConnectionAcksType m_AcksType;

		[SerializeField]
		private bool m_UsePlatformSpecificProtocols;

		[SerializeField]
		private uint m_InitialBandwidth;

		[SerializeField]
		private float m_BandwidthPeakFactor;

		[SerializeField]
		private ushort m_WebSocketReceiveBufferMaxSize;

		[SerializeField]
		private uint m_UdpSocketReceiveBufferMaxSize;

		[SerializeField]
		private string m_SSLCertFilePath;

		[SerializeField]
		private string m_SSLPrivateKeyFilePath;

		[SerializeField]
		private string m_SSLCAFilePath;

		[SerializeField]
		internal List<ChannelQOS> m_Channels = new List<ChannelQOS>();

		[SerializeField]
		internal List<List<byte>> m_SharedOrderChannels = new List<List<byte>>();

		public ushort PacketSize
		{
			get
			{
				return m_PacketSize;
			}
			set
			{
				m_PacketSize = value;
			}
		}

		public ushort FragmentSize
		{
			get
			{
				return m_FragmentSize;
			}
			set
			{
				m_FragmentSize = value;
			}
		}

		public uint ResendTimeout
		{
			get
			{
				return m_ResendTimeout;
			}
			set
			{
				m_ResendTimeout = value;
			}
		}

		public uint DisconnectTimeout
		{
			get
			{
				return m_DisconnectTimeout;
			}
			set
			{
				m_DisconnectTimeout = value;
			}
		}

		public uint ConnectTimeout
		{
			get
			{
				return m_ConnectTimeout;
			}
			set
			{
				m_ConnectTimeout = value;
			}
		}

		public uint MinUpdateTimeout
		{
			get
			{
				return m_MinUpdateTimeout;
			}
			set
			{
				if (value == 0)
				{
					throw new ArgumentOutOfRangeException("Minimal update timeout should be > 0");
				}
				m_MinUpdateTimeout = value;
			}
		}

		public uint PingTimeout
		{
			get
			{
				return m_PingTimeout;
			}
			set
			{
				m_PingTimeout = value;
			}
		}

		public uint ReducedPingTimeout
		{
			get
			{
				return m_ReducedPingTimeout;
			}
			set
			{
				m_ReducedPingTimeout = value;
			}
		}

		public uint AllCostTimeout
		{
			get
			{
				return m_AllCostTimeout;
			}
			set
			{
				m_AllCostTimeout = value;
			}
		}

		public byte NetworkDropThreshold
		{
			get
			{
				return m_NetworkDropThreshold;
			}
			set
			{
				m_NetworkDropThreshold = value;
			}
		}

		public byte OverflowDropThreshold
		{
			get
			{
				return m_OverflowDropThreshold;
			}
			set
			{
				m_OverflowDropThreshold = value;
			}
		}

		public byte MaxConnectionAttempt
		{
			get
			{
				return m_MaxConnectionAttempt;
			}
			set
			{
				m_MaxConnectionAttempt = value;
			}
		}

		public uint AckDelay
		{
			get
			{
				return m_AckDelay;
			}
			set
			{
				m_AckDelay = value;
			}
		}

		public uint SendDelay
		{
			get
			{
				return m_SendDelay;
			}
			set
			{
				m_SendDelay = value;
			}
		}

		public ushort MaxCombinedReliableMessageSize
		{
			get
			{
				return m_MaxCombinedReliableMessageSize;
			}
			set
			{
				m_MaxCombinedReliableMessageSize = value;
			}
		}

		public ushort MaxCombinedReliableMessageCount
		{
			get
			{
				return m_MaxCombinedReliableMessageCount;
			}
			set
			{
				m_MaxCombinedReliableMessageCount = value;
			}
		}

		public ushort MaxSentMessageQueueSize
		{
			get
			{
				return m_MaxSentMessageQueueSize;
			}
			set
			{
				m_MaxSentMessageQueueSize = value;
			}
		}

		public ConnectionAcksType AcksType
		{
			get
			{
				return m_AcksType;
			}
			set
			{
				m_AcksType = value;
			}
		}

		[Obsolete("IsAcksLong is deprecated. Use AcksType = ConnectionAcksType.Acks64", false)]
		public bool IsAcksLong
		{
			get
			{
				return m_AcksType != ConnectionAcksType.Acks32;
			}
			set
			{
				if (value && m_AcksType == ConnectionAcksType.Acks32)
				{
					m_AcksType = ConnectionAcksType.Acks64;
				}
				else if (!value)
				{
					m_AcksType = ConnectionAcksType.Acks32;
				}
			}
		}

		public bool UsePlatformSpecificProtocols
		{
			get
			{
				return m_UsePlatformSpecificProtocols;
			}
			set
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000e: Invalid comparison between Unknown and I4
				if (value && (int)Application.platform != 25)
				{
					throw new ArgumentOutOfRangeException("Platform specific protocols are not supported on this platform");
				}
				m_UsePlatformSpecificProtocols = value;
			}
		}

		public uint InitialBandwidth
		{
			get
			{
				return m_InitialBandwidth;
			}
			set
			{
				m_InitialBandwidth = value;
			}
		}

		public float BandwidthPeakFactor
		{
			get
			{
				return m_BandwidthPeakFactor;
			}
			set
			{
				m_BandwidthPeakFactor = value;
			}
		}

		public ushort WebSocketReceiveBufferMaxSize
		{
			get
			{
				return m_WebSocketReceiveBufferMaxSize;
			}
			set
			{
				m_WebSocketReceiveBufferMaxSize = value;
			}
		}

		public uint UdpSocketReceiveBufferMaxSize
		{
			get
			{
				return m_UdpSocketReceiveBufferMaxSize;
			}
			set
			{
				m_UdpSocketReceiveBufferMaxSize = value;
			}
		}

		public string SSLCertFilePath
		{
			get
			{
				return m_SSLCertFilePath;
			}
			set
			{
				m_SSLCertFilePath = value;
			}
		}

		public string SSLPrivateKeyFilePath
		{
			get
			{
				return m_SSLPrivateKeyFilePath;
			}
			set
			{
				m_SSLPrivateKeyFilePath = value;
			}
		}

		public string SSLCAFilePath
		{
			get
			{
				return m_SSLCAFilePath;
			}
			set
			{
				m_SSLCAFilePath = value;
			}
		}

		public int ChannelCount => m_Channels.Count;

		public int SharedOrderChannelCount => m_SharedOrderChannels.Count;

		public List<ChannelQOS> Channels => m_Channels;

		public ConnectionConfig()
		{
			m_PacketSize = 1440;
			m_FragmentSize = 500;
			m_ResendTimeout = 1200u;
			m_DisconnectTimeout = 2000u;
			m_ConnectTimeout = 2000u;
			m_MinUpdateTimeout = 10u;
			m_PingTimeout = 500u;
			m_ReducedPingTimeout = 100u;
			m_AllCostTimeout = 20u;
			m_NetworkDropThreshold = 5;
			m_OverflowDropThreshold = 5;
			m_MaxConnectionAttempt = 10;
			m_AckDelay = 33u;
			m_SendDelay = 10u;
			m_MaxCombinedReliableMessageSize = 100;
			m_MaxCombinedReliableMessageCount = 10;
			m_MaxSentMessageQueueSize = 512;
			m_AcksType = ConnectionAcksType.Acks32;
			m_UsePlatformSpecificProtocols = false;
			m_InitialBandwidth = 0u;
			m_BandwidthPeakFactor = 2f;
			m_WebSocketReceiveBufferMaxSize = 0;
			m_UdpSocketReceiveBufferMaxSize = 0u;
			m_SSLCertFilePath = null;
			m_SSLPrivateKeyFilePath = null;
			m_SSLCAFilePath = null;
		}

		public ConnectionConfig(ConnectionConfig config)
		{
			if (config == null)
			{
				throw new NullReferenceException("config is not defined");
			}
			m_PacketSize = config.m_PacketSize;
			m_FragmentSize = config.m_FragmentSize;
			m_ResendTimeout = config.m_ResendTimeout;
			m_DisconnectTimeout = config.m_DisconnectTimeout;
			m_ConnectTimeout = config.m_ConnectTimeout;
			m_MinUpdateTimeout = config.m_MinUpdateTimeout;
			m_PingTimeout = config.m_PingTimeout;
			m_ReducedPingTimeout = config.m_ReducedPingTimeout;
			m_AllCostTimeout = config.m_AllCostTimeout;
			m_NetworkDropThreshold = config.m_NetworkDropThreshold;
			m_OverflowDropThreshold = config.m_OverflowDropThreshold;
			m_MaxConnectionAttempt = config.m_MaxConnectionAttempt;
			m_AckDelay = config.m_AckDelay;
			m_SendDelay = config.m_SendDelay;
			m_MaxCombinedReliableMessageSize = config.MaxCombinedReliableMessageSize;
			m_MaxCombinedReliableMessageCount = config.m_MaxCombinedReliableMessageCount;
			m_MaxSentMessageQueueSize = config.m_MaxSentMessageQueueSize;
			m_AcksType = config.m_AcksType;
			m_UsePlatformSpecificProtocols = config.m_UsePlatformSpecificProtocols;
			m_InitialBandwidth = config.m_InitialBandwidth;
			if (m_InitialBandwidth == 0)
			{
				m_InitialBandwidth = (uint)(m_PacketSize * 1000) / m_MinUpdateTimeout;
			}
			m_BandwidthPeakFactor = config.m_BandwidthPeakFactor;
			m_WebSocketReceiveBufferMaxSize = config.m_WebSocketReceiveBufferMaxSize;
			m_UdpSocketReceiveBufferMaxSize = config.m_UdpSocketReceiveBufferMaxSize;
			m_SSLCertFilePath = config.m_SSLCertFilePath;
			m_SSLPrivateKeyFilePath = config.m_SSLPrivateKeyFilePath;
			m_SSLCAFilePath = config.m_SSLCAFilePath;
			foreach (ChannelQOS channel in config.m_Channels)
			{
				m_Channels.Add(new ChannelQOS(channel));
			}
			foreach (List<byte> sharedOrderChannel in config.m_SharedOrderChannels)
			{
				m_SharedOrderChannels.Add(sharedOrderChannel);
			}
		}

		public static void Validate(ConnectionConfig config)
		{
			if (config.m_PacketSize < 128)
			{
				throw new ArgumentOutOfRangeException("PacketSize should be > " + 128);
			}
			if (config.m_FragmentSize >= config.m_PacketSize - 128)
			{
				throw new ArgumentOutOfRangeException("FragmentSize should be < PacketSize - " + 128);
			}
			if (config.m_Channels.Count > 255)
			{
				throw new ArgumentOutOfRangeException("Channels number should be less than 256");
			}
		}

		public byte AddChannel(QosType value)
		{
			if (m_Channels.Count > 255)
			{
				throw new ArgumentOutOfRangeException("Channels Count should be less than 256");
			}
			if (!Enum.IsDefined(typeof(QosType), value))
			{
				throw new ArgumentOutOfRangeException("requested qos type doesn't exist: " + (int)value);
			}
			ChannelQOS item = new ChannelQOS(value);
			m_Channels.Add(item);
			return (byte)(m_Channels.Count - 1);
		}

		public void MakeChannelsSharedOrder(List<byte> channelIndices)
		{
			if (channelIndices == null)
			{
				throw new NullReferenceException("channelIndices must not be null");
			}
			if (channelIndices.Count == 0)
			{
				throw new ArgumentOutOfRangeException("Received empty list of shared order channel indexes");
			}
			for (byte b = 0; b < channelIndices.Count; b++)
			{
				byte b2 = channelIndices[b];
				if (b2 >= m_Channels.Count)
				{
					throw new ArgumentOutOfRangeException("Shared order channel list contains wrong channel index " + b2);
				}
				ChannelQOS channelQOS = m_Channels[b2];
				if (channelQOS.BelongsToSharedOrderChannel)
				{
					throw new ArgumentException("Channel with index " + b2 + " has been already included to other shared order channel");
				}
				if (channelQOS.QOS != QosType.Reliable && channelQOS.QOS != 0)
				{
					throw new ArgumentException("Only Reliable and Unreliable QoS are allowed for shared order channel, wrong channel is with index " + b2);
				}
			}
			for (byte b3 = 0; b3 < channelIndices.Count; b3++)
			{
				byte index = channelIndices[b3];
				m_Channels[index].m_BelongsSharedOrderChannel = true;
			}
			List<byte> item = new List<byte>(channelIndices);
			m_SharedOrderChannels.Add(item);
		}

		public QosType GetChannel(byte idx)
		{
			if (idx >= m_Channels.Count)
			{
				throw new ArgumentOutOfRangeException("requested index greater than maximum channels count");
			}
			return m_Channels[idx].QOS;
		}

		public IList<byte> GetSharedOrderChannels(byte idx)
		{
			if (idx >= m_SharedOrderChannels.Count)
			{
				throw new ArgumentOutOfRangeException("requested index greater than maximum shared order channels count");
			}
			return m_SharedOrderChannels[idx].AsReadOnly();
		}
	}
	[Serializable]
	[Obsolete("The UNET transport will be removed in the future as soon a replacement is ready.")]
	public class HostTopology
	{
		[SerializeField]
		private ConnectionConfig m_DefConfig = null;

		[SerializeField]
		private int m_MaxDefConnections = 0;

		[SerializeField]
		private List<ConnectionConfig> m_SpecialConnections = new List<ConnectionConfig>();

		[SerializeField]
		private ushort m_ReceivedMessagePoolSize = 1024;

		[SerializeField]
		private ushort m_SentMessagePoolSize = 1024;

		[SerializeField]
		private float m_MessagePoolSizeGrowthFactor = 0.75f;

		public ConnectionConfig DefaultConfig => m_DefConfig;

		public int MaxDefaultConnections => m_MaxDefConnections;

		public int SpecialConnectionConfigsCount => m_SpecialConnections.Count;

		public List<ConnectionConfig> SpecialConnectionConfigs => m_SpecialConnections;

		public ushort ReceivedMessagePoolSize
		{
			get
			{
				return m_ReceivedMessagePoolSize;
			}
			set
			{
				m_ReceivedMessagePoolSize = value;
			}
		}

		public ushort SentMessagePoolSize
		{
			get
			{
				return m_SentMessagePoolSize;
			}
			set
			{
				m_SentMessagePoolSize = value;
			}
		}

		public float MessagePoolSizeGrowthFactor
		{
			get
			{
				return m_MessagePoolSizeGrowthFactor;
			}
			set
			{
				if ((double)value <= 0.5 || (double)value > 1.0)
				{
					throw new ArgumentException("pool growth factor should be varied between 0.5 and 1.0");
				}
				m_MessagePoolSizeGrowthFactor = value;
			}
		}

		public HostTopology(ConnectionConfig defaultConfig, int maxDefaultConnections)
		{
			if (defaultConfig == null)
			{
				throw new NullReferenceException("config is not defined");
			}
			if (maxDefaultConnections <= 0)
			{
				throw new ArgumentOutOfRangeException("maxConnections", "Number of connections should be > 0");
			}
			if (maxDefaultConnections >= 65535)
			{
				throw new ArgumentOutOfRangeException("maxConnections", "Number of connections should be < 65535");
			}
			ConnectionConfig.Validate(defaultConfig);
			m_DefConfig = new ConnectionConfig(defaultConfig);
			m_MaxDefConnections = maxDefaultConnections;
		}

		private HostTopology()
		{
		}

		public ConnectionConfig GetSpecialConnectionConfig(int i)
		{
			if (i > m_SpecialConnections.Count || i == 0)
			{
				throw new ArgumentException("special configuration index is out of valid range");
			}
			return m_SpecialConnections[i - 1];
		}

		public int AddSpecialConnectionConfig(ConnectionConfig config)
		{
			if (m_MaxDefConnections + m_SpecialConnections.Count + 1 >= 65535)
			{
				throw new ArgumentOutOfRangeException("maxConnections", "Number of connections should be < 65535");
			}
			m_SpecialConnections.Add(new ConnectionConfig(config));
			return m_SpecialConnections.Count;
		}
	}
	[Serializable]
	[Obsolete("The UNET transport will be removed in the future as soon a replacement is ready.")]
	public class GlobalConfig
	{
		private const uint g_MaxTimerTimeout = 12000u;

		private const uint g_MaxNetSimulatorTimeout = 12000u;

		private const ushort g_MaxHosts = 128;

		[SerializeField]
		private uint m_ThreadAwakeTimeout;

		[SerializeField]
		private ReactorModel m_ReactorModel;

		[SerializeField]
		private ushort m_ReactorMaximumReceivedMessages;

		[SerializeField]
		private ushort m_ReactorMaximumSentMessages;

		[SerializeField]
		private ushort m_MaxPacketSize;

		[SerializeField]
		private ushort m_MaxHosts;

		[SerializeField]
		private byte m_ThreadPoolSize;

		[SerializeField]
		private uint m_MinTimerTimeout;

		[SerializeField]
		private uint m_MaxTimerTimeout;

		[SerializeField]
		private uint m_MinNetSimulatorTimeout;

		[SerializeField]
		private uint m_MaxNetSimulatorTimeout;

		[SerializeField]
		private Action<int, int> m_ConnectionReadyForSend;

		[SerializeField]
		private Action<int> m_NetworkEventAvailable;

		public uint ThreadAwakeTimeout
		{
			get
			{
				return m_ThreadAwakeTimeout;
			}
			set
			{
				if (value == 0)
				{
					throw new ArgumentOutOfRangeException("Minimal thread awake timeout should be > 0");
				}
				m_ThreadAwakeTimeout = value;
			}
		}

		public ReactorModel ReactorModel
		{
			get
			{
				return m_ReactorModel;
			}
			set
			{
				m_ReactorModel = value;
			}
		}

		public ushort ReactorMaximumReceivedMessages
		{
			get
			{
				return m_ReactorMaximumReceivedMessages;
			}
			set
			{
				m_ReactorMaximumReceivedMessages = value;
			}
		}

		public ushort ReactorMaximumSentMessages
		{
			get
			{
				return m_ReactorMaximumSentMessages;
			}
			set
			{
				m_ReactorMaximumSentMessages = value;
			}
		}

		public ushort MaxPacketSize
		{
			get
			{
				return m_MaxPacketSize;
			}
			set
			{
				m_MaxPacketSize = value;
			}
		}

		public ushort MaxHosts
		{
			get
			{
				return m_MaxHosts;
			}
			set
			{
				if (value == 0)
				{
					throw new ArgumentOutOfRangeException("MaxHosts", "Maximum hosts number should be > 0");
				}
				if (value > 128)
				{
					throw new ArgumentOutOfRangeException("MaxHosts", "Maximum hosts number should be <= " + (ushort)128);
				}
				m_MaxHosts = value;
			}
		}

		public byte ThreadPoolSize
		{
			get
			{
				return m_ThreadPoolSize;
			}
			set
			{
				m_ThreadPoolSize = value;
			}
		}

		public uint MinTimerTimeout
		{
			get
			{
				return m_MinTimerTimeout;
			}
			set
			{
				if (value > MaxTimerTimeout)
				{
					throw new ArgumentOutOfRangeException("MinTimerTimeout should be < MaxTimerTimeout");
				}
				if (value == 0)
				{
					throw new ArgumentOutOfRangeException("MinTimerTimeout should be > 0");
				}
				m_MinTimerTimeout = value;
			}
		}

		public uint MaxTimerTimeout
		{
			get
			{
				return m_MaxTimerTimeout;
			}
			set
			{
				if (value == 0)
				{
					throw new ArgumentOutOfRangeException("MaxTimerTimeout should be > 0");
				}
				if (value > 12000)
				{
					throw new ArgumentOutOfRangeException("MaxTimerTimeout should be <=" + 12000u);
				}
				m_MaxTimerTimeout = value;
			}
		}

		public uint MinNetSimulatorTimeout
		{
			get
			{
				return m_MinNetSimulatorTimeout;
			}
			set
			{
				if (value > MaxNetSimulatorTimeout)
				{
					throw new ArgumentOutOfRangeException("MinNetSimulatorTimeout should be < MaxTimerTimeout");
				}
				if (value == 0)
				{
					throw new ArgumentOutOfRangeException("MinNetSimulatorTimeout should be > 0");
				}
				m_MinNetSimulatorTimeout = value;
			}
		}

		public uint MaxNetSimulatorTimeout
		{
			get
			{
				return m_MaxNetSimulatorTimeout;
			}
			set
			{
				if (value == 0)
				{
					throw new ArgumentOutOfRangeException("MaxNetSimulatorTimeout should be > 0");
				}
				if (value > 12000)
				{
					throw new ArgumentOutOfRangeException("MaxNetSimulatorTimeout should be <=" + 12000u);
				}
				m_MaxNetSimulatorTimeout = value;
			}
		}

		public Action<int> NetworkEventAvailable
		{
			get
			{
				return m_NetworkEventAvailable;
			}
			set
			{
				m_NetworkEventAvailable = value;
			}
		}

		public Action<int, int> ConnectionReadyForSend
		{
			get
			{
				return m_ConnectionReadyForSend;
			}
			set
			{
				m_ConnectionReadyForSend = value;
			}
		}

		public GlobalConfig()
		{
			m_ThreadAwakeTimeout = 1u;
			m_ReactorModel = ReactorModel.SelectReactor;
			m_ReactorMaximumReceivedMessages = 1024;
			m_ReactorMaximumSentMessages = 1024;
			m_MaxPacketSize = 2000;
			m_MaxHosts = 16;
			m_ThreadPoolSize = 1;
			m_MinTimerTimeout = 1u;
			m_MaxTimerTimeout = 12000u;
			m_MinNetSimulatorTimeout = 1u;
			m_MaxNetSimulatorTimeout = 12000u;
			m_ConnectionReadyForSend = null;
			m_NetworkEventAvailable = null;
		}
	}
	[Obsolete("The UNET transport will be removed in the future as soon a replacement is ready.")]
	public class ConnectionSimulatorConfig : IDisposable
	{
		internal int m_OutMinDelay;

		internal int m_OutAvgDelay;

		internal int m_InMinDelay;

		internal int m_InAvgDelay;

		internal float m_PacketLossPercentage;

		public ConnectionSimulatorConfig(int outMinDelay, int outAvgDelay, int inMinDelay, int inAvgDelay, float packetLossPercentage)
		{
			m_OutMinDelay = outMinDelay;
			m_OutAvgDelay = outAvgDelay;
			m_InMinDelay = inMinDelay;
			m_InAvgDelay = inAvgDelay;
			m_PacketLossPercentage = packetLossPercentage;
		}

		[ThreadAndSerializationSafe]
		public void Dispose()
		{
		}

		~ConnectionSimulatorConfig()
		{
			Dispose();
		}
	}
}
namespace UnityEngine.Networking.Match
{
	internal abstract class Request
	{
		public static readonly int currentVersion = 3;

		public int version { get; set; }

		public SourceID sourceId { get; set; }

		public string projectId { get; set; }

		public AppID appId { get; set; }

		public string accessTokenString { get; set; }

		public int domain { get; set; }

		public virtual bool IsValid()
		{
			return sourceId != SourceID.Invalid;
		}

		public override string ToString()
		{
			return UnityString.Format("[{0}]-SourceID:0x{1},projectId:{2},accessTokenString.IsEmpty:{3},domain:{4}", new object[5]
			{
				base.ToString(),
				sourceId.ToString("X"),
				projectId,
				string.IsNullOrEmpty(accessTokenString),
				domain
			});
		}
	}
	internal interface IResponse
	{
		void SetSuccess();

		void SetFailure(string info);
	}
	[Serializable]
	internal abstract class Response : IResponse
	{
		public bool success;

		public string extendedInfo;

		public void SetSuccess()
		{
			success = true;
			extendedInfo = "";
		}

		public void SetFailure(string info)
		{
			success = false;
			extendedInfo += info;
		}

		public override string ToString()
		{
			return UnityString.Format("[{0}]-success:{1}-extendedInfo:{2}", new object[3]
			{
				base.ToString(),
				success,
				extendedInfo
			});
		}
	}
	internal class BasicResponse : Response
	{
	}
	internal class CreateMatchRequest : Request
	{
		public string name { get; set; }

		public uint size { get; set; }

		public string publicAddress { get; set; }

		public string privateAddress { get; set; }

		public int eloScore { get; set; }

		public bool advertise { get; set; }

		public string password { get; set; }

		public Dictionary<string, long> matchAttributes { get; set; }

		public override string ToString()
		{
			return UnityString.Format("[{0}]-name:{1},size:{2},publicAddress:{3},privateAddress:{4},eloScore:{5},advertise:{6},HasPassword:{7},matchAttributes.Count:{8}", new object[9]
			{
				base.ToString(),
				name,
				size,
				publicAddress,
				privateAddress,
				eloScore,
				advertise,
				(!string.IsNullOrEmpty(password)) ? "YES" : "NO",
				(matchAttributes != null) ? matchAttributes.Count : 0
			});
		}

		public override bool IsValid()
		{
			return base.IsValid() && size >= 2 && (matchAttributes == null || matchAttributes.Count <= 10);
		}
	}
	internal class CreateMatchResponse : BasicResponse
	{
		public string address;

		public int port;

		public int domain = 0;

		public ulong networkId;

		public string accessTokenString;

		public NodeID nodeId;

		public bool usingRelay;

		public override string ToString()
		{
			return UnityString.Format("[{0}]-address:{1},port:{2},networkId:0x{3},accessTokenString.IsEmpty:{4},nodeId:0x{5},usingRelay:{6}", new object[7]
			{
				base.ToString(),
				address,
				port,
				networkId.ToString("X"),
				string.IsNullOrEmpty(accessTokenString),
				nodeId.ToString("X"),
				usingRelay
			});
		}
	}
	internal class JoinMatchRequest : Request
	{
		public NetworkID networkId { get; set; }

		public string publicAddress { get; set; }

		public string privateAddress { get; set; }

		public int eloScore { get; set; }

		public string password { get; set; }

		public override string ToString()
		{
			return UnityString.Format("[{0}]-networkId:0x{1},publicAddress:{2},privateAddress:{3},eloScore:{4},HasPassword:{5}", new object[6]
			{
				base.ToString(),
				networkId.ToString("X"),
				publicAddress,
				privateAddress,
				eloScore,
				(!string.IsNullOrEmpty(password)) ? "YES" : "NO"
			});
		}

		public override bool IsValid()
		{
			return base.IsValid() && networkId != NetworkID.Invalid;
		}
	}
	[Serializable]
	internal class JoinMatchResponse : BasicResponse
	{
		public string address;

		public int port;

		public int domain = 0;

		public ulong networkId;

		public string accessTokenString;

		public NodeID nodeId;

		public bool usingRelay;

		public override string ToString()
		{
			return UnityString.Format("[{0}]-address:{1},port:{2},networkId:0x{3},accessTokenString.IsEmpty:{4},nodeId:0x{5},usingRelay:{6}", new object[7]
			{
				base.ToString(),
				address,
				port,
				networkId.ToString("X"),
				string.IsNullOrEmpty(accessTokenString),
				nodeId.ToString("X"),
				usingRelay
			});
		}
	}
	internal class DestroyMatchRequest : Request
	{
		public NetworkID networkId { get; set; }

		public override string ToString()
		{
			return UnityString.Format("[{0}]-networkId:0x{1}", new object[2]
			{
				base.ToString(),
				networkId.ToString("X")
			});
		}

		public override bool IsValid()
		{
			return base.IsValid() && networkId != NetworkID.Invalid;
		}
	}
	internal class DropConnectionRequest : Request
	{
		public NetworkID networkId { get; set; }

		public NodeID nodeId { get; set; }

		public override string ToString()
		{
			return UnityString.Format("[{0}]-networkId:0x{1},nodeId:0x{2}", new object[3]
			{
				base.ToString(),
				networkId.ToString("X"),
				nodeId.ToString("X")
			});
		}

		public override bool IsValid()
		{
			return base.IsValid() && networkId != NetworkID.Invalid && nodeId != NodeID.Invalid;
		}
	}
	[Serializable]
	internal class DropConnectionResponse : Response
	{
		public ulong networkId;

		public NodeID nodeId;

		public override string ToString()
		{
			return UnityString.Format("[{0}]-networkId:{1}", new object[2]
			{
				base.ToString(),
				networkId.ToString("X")
			});
		}
	}
	internal class ListMatchRequest : Request
	{
		[Obsolete("This bool is deprecated in favor of filterOutPrivateMatches")]
		public bool includePasswordMatches;

		public int pageSize { get; set; }

		public int pageNum { get; set; }

		public string nameFilter { get; set; }

		public bool filterOutPrivateMatches { get; set; }

		public int eloScore { get; set; }

		public Dictionary<string, long> matchAttributeFilterLessThan { get; set; }

		public Dictionary<string, long> matchAttributeFilterEqualTo { get; set; }

		public Dictionary<string, long> matchAttributeFilterGreaterThan { get; set; }

		public override string ToString()
		{
			return UnityString.Format("[{0}]-pageSize:{1},pageNum:{2},nameFilter:{3}, filterOutPrivateMatches:{4}, eloScore:{5}, matchAttributeFilterLessThan.Count:{6}, matchAttributeFilterEqualTo.Count:{7}, matchAttributeFilterGreaterThan.Count:{8}", new object[9]
			{
				base.ToString(),
				pageSize,
				pageNum,
				nameFilter,
				filterOutPrivateMatches,
				eloScore,
				(matchAttributeFilterLessThan != null) ? matchAttributeFilterLessThan.Count : 0,
				(matchAttributeFilterEqualTo != null) ? matchAttributeFilterEqualTo.Count : 0,
				(matchAttributeFilterGreaterThan != null) ? matchAttributeFilterGreaterThan.Count : 0
			});
		}

		public override bool IsValid()
		{
			int num = ((matchAttributeFilterLessThan != null) ? matchAttributeFilterLessThan.Count : 0);
			num += ((matchAttributeFilterEqualTo != null) ? matchAttributeFilterEqualTo.Count : 0);
			num += ((matchAttributeFilterGreaterThan != null) ? matchAttributeFilterGreaterThan.Count : 0);
			return base.IsValid() && pageSize >= 1 && pageSize <= 1000 && num <= 10;
		}
	}
	[Serializable]
	internal class MatchDirectConnectInfo
	{
		public NodeID nodeId;

		public string publicAddress;

		public string privateAddress;

		public HostPriority hostPriority;

		public override string ToString()
		{
			return UnityString.Format("[{0}]-nodeId:{1},publicAddress:{2},privateAddress:{3},hostPriority:{4}", new object[5]
			{
				base.ToString(),
				nodeId,
				publicAddress,
				privateAddress,
				hostPriority
			});
		}
	}
	[Serializable]
	internal class MatchDesc
	{
		public ulong networkId;

		public string name;

		public int averageEloScore;

		public int maxSize;

		public int currentSize;

		public bool isPrivate;

		public Dictionary<string, long> matchAttributes;

		public NodeID hostNodeId;

		public List<MatchDirectConnectInfo> directConnectInfos;

		public override string ToString()
		{
			return UnityString.Format("[{0}]-networkId:0x{1},name:{2},averageEloScore:{3},maxSize:{4},currentSize:{5},isPrivate:{6},matchAttributes.Count:{7},hostNodeId:{8},directConnectInfos.Count:{9}", new object[10]
			{
				base.ToString(),
				networkId.ToString("X"),
				name,
				averageEloScore,
				maxSize,
				currentSize,
				isPrivate,
				(matchAttributes != null) ? matchAttributes.Count : 0,
				hostNodeId,
				directConnectInfos.Count
			});
		}
	}
	[Serializable]
	internal class ListMatchResponse : BasicResponse
	{
		public List<MatchDesc> matches;

		public ListMatchResponse()
		{
			matches = new List<MatchDesc>();
		}

		public ListMatchResponse(List<MatchDesc> otherMatches)
		{
			matches = otherMatches;
		}

		public override string ToString()
		{
			return UnityString.Format("[{0}]-matches.Count:{1}", new object[2]
			{
				base.ToString(),
				(matches != null) ? matches.Count : 0
			});
		}
	}
	internal class CreateOrJoinMatchRequest : CreateMatchRequest
	{
	}
	internal class SetMatchAttributesRequest : Request
	{
		public NetworkID networkId { get; set; }

		public bool isListed { get; set; }

		public override string ToString()
		{
			return UnityString.Format("[{0}]-networkId:{1},isListed:{2}", new object[3]
			{
				base.ToString(),
				networkId.ToString("X"),
				isListed
			});
		}

		public override bool IsValid()
		{
			return base.IsValid() && networkId != NetworkID.Invalid;
		}
	}
}
namespace UnityEngine.Networking.Types
{
	[DefaultValue(NetworkAccessLevel.Invalid)]
	public enum NetworkAccessLevel : ulong
	{
		Invalid = 0uL,
		User = 1uL,
		Owner = 2uL,
		Admin = 4uL
	}
	[DefaultValue(AppID.Invalid)]
	public enum AppID : ulong
	{
		Invalid = ulong.MaxValue
	}
	[DefaultValue(SourceID.Invalid)]
	public enum SourceID : ulong
	{
		Invalid = ulong.MaxValue
	}
	[DefaultValue(NetworkID.Invalid)]
	public enum NetworkID : ulong
	{
		Invalid = ulong.MaxValue
	}
	[DefaultValue(NodeID.Invalid)]
	public enum NodeID : ushort
	{
		Invalid
	}
	[DefaultValue(HostPriority.Invalid)]
	public enum HostPriority
	{
		Invalid = int.MaxValue
	}
	public class NetworkAccessToken
	{
		private const int NETWORK_ACCESS_TOKEN_SIZE = 64;

		public byte[] array;

		public NetworkAccessToken()
		{
			array = new byte[64];
		}

		public NetworkAccessToken(byte[] array)
		{
			this.array = array;
		}

		public NetworkAccessToken(string strArray)
		{
			try
			{
				array = Convert.FromBase64String(strArray);
			}
			catch (Exception)
			{
				array = new byte[64];
			}
		}

		public string GetByteString()
		{
			return Convert.ToBase64String(array);
		}

		public bool IsValid()
		{
			if (this.array == null || this.array.Length != 64)
			{
				return false;
			}
			bool result = false;
			byte[] array = this.array;
			for (int i = 0; i < array.Length; i++)
			{
				if (array[i] != 0)
				{
					result = true;
					break;
				}
			}
			return result;
		}
	}
}
namespace UnityEngine.Networking
{
	public class Utility
	{
		private static Dictionary<NetworkID, NetworkAccessToken> s_dictTokens = new Dictionary<NetworkID, NetworkAccessToken>();

		[Obsolete("This property is unused and should not be referenced in code.", true)]
		public static bool useRandomSourceID
		{
			get
			{
				return false;
			}
			set
			{
			}
		}

		private Utility()
		{
		}

		public static SourceID GetSourceID()
		{
			return (SourceID)SystemInfo.deviceUniqueIdentifier.GetHashCode();
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		[Obsolete("This function is unused and should not be referenced in code. Please sign in and setup your project in the editor instead.", true)]
		public static void SetAppID(AppID newAppID)
		{
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		[Obsolete("This function is unused and should not be referenced in code. Please sign in and setup your project in the editor instead.", true)]
		public static AppID GetAppID()
		{
			return AppID.Invalid;
		}

		public static void SetAccessTokenForNetwork(NetworkID netId, NetworkAccessToken accessToken)
		{
			if (s_dictTokens.ContainsKey(netId))
			{
				s_dictTokens.Remove(netId);
			}
			s_dictTokens.Add(netId, accessToken);
		}

		public static NetworkAccessToken GetAccessTokenForNetwork(NetworkID netId)
		{
			if (!s_dictTokens.TryGetValue(netId, out var value))
			{
				return new NetworkAccessToken();
			}
			return value;
		}
	}
	[StructLayout(LayoutKind.Sequential)]
	[NativeHeader("Modules/UNET/UNETManager.h")]
	[NativeHeader("Modules/UNET/UNetTypes.h")]
	[NativeConditional("ENABLE_NETWORK && ENABLE_UNET", true)]
	[NativeHeader("Modules/UNET/UNETConfiguration.h")]
	internal class ConnectionConfigInternal : IDisposable
	{
		public IntPtr m_Ptr;

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern ushort FragmentSize
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern uint ResendTimeout
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern uint DisconnectTimeout
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern uint ConnectTimeout
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern uint MinUpdateTimeout
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern uint PingTimeout
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern uint ReducedPingTimeout
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern uint AllCostTimeout
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern byte NetworkDropThreshold
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern byte OverflowDropThreshold
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern byte MaxConnectionAttempt
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern uint AckDelay
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern uint SendDelay
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern ushort MaxCombinedReliableMessageSize
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern ushort MaxCombinedReliableMessageCount
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern ushort MaxSentMessageQueueSize
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern byte AcksType
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern bool UsePlatformSpecificProtocols
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern uint InitialBandwidth
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern float BandwidthPeakFactor
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern ushort WebSocketReceiveBufferMaxSize
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern uint UdpSocketReceiveBufferMaxSize
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public ConnectionConfigInternal(ConnectionConfig config)
		{
			if (config == null)
			{
				throw new NullReferenceException("config is not defined");
			}
			m_Ptr = InternalCreate();
			if (!SetPacketSize(config.PacketSize))
			{
				throw new ArgumentOutOfRangeException("PacketSize is too small");
			}
			FragmentSize = config.FragmentSize;
			ResendTimeout = config.ResendTimeout;
			DisconnectTimeout = config.DisconnectTimeout;
			ConnectTimeout = config.ConnectTimeout;
			MinUpdateTimeout = config.MinUpdateTimeout;
			PingTimeout = config.PingTimeout;
			ReducedPingTimeout = config.ReducedPingTimeout;
			AllCostTimeout = config.AllCostTimeout;
			NetworkDropThreshold = config.NetworkDropThreshold;
			OverflowDropThreshold = config.OverflowDropThreshold;
			MaxConnectionAttempt = config.MaxConnectionAttempt;
			AckDelay = config.AckDelay;
			SendDelay = config.SendDelay;
			MaxCombinedReliableMessageSize = config.MaxCombinedReliableMessageSize;
			MaxCombinedReliableMessageCount = config.MaxCombinedReliableMessageCount;
			MaxSentMessageQueueSize = config.MaxSentMessageQueueSize;
			AcksType = (byte)config.AcksType;
			UsePlatformSpecificProtocols = config.UsePlatformSpecificProtocols;
			InitialBandwidth = config.InitialBandwidth;
			BandwidthPeakFactor = config.BandwidthPeakFactor;
			WebSocketReceiveBufferMaxSize = config.WebSocketReceiveBufferMaxSize;
			UdpSocketReceiveBufferMaxSize = config.UdpSocketReceiveBufferMaxSize;
			if (config.SSLCertFilePath != null)
			{
				int num = SetSSLCertFilePath(config.SSLCertFilePath);
				if (num != 0)
				{
					throw new ArgumentOutOfRangeException("SSLCertFilePath cannot be > than " + num);
				}
			}
			if (config.SSLPrivateKeyFilePath != null)
			{
				int num2 = SetSSLPrivateKeyFilePath(config.SSLPrivateKeyFilePath);
				if (num2 != 0)
				{
					throw new ArgumentOutOfRangeException("SSLPrivateKeyFilePath cannot be > than " + num2);
				}
			}
			if (config.SSLCAFilePath != null)
			{
				int num3 = SetSSLCAFilePath(config.SSLCAFilePath);
				if (num3 != 0)
				{
					throw new ArgumentOutOfRangeException("SSLCAFilePath cannot be > than " + num3);
				}
			}
			for (byte b = 0; b < config.ChannelCount; b++)
			{
				AddChannel((byte)config.GetChannel(b));
			}
			for (byte b2 = 0; b2 < config.SharedOrderChannelCount; b2++)
			{
				IList<byte> sharedOrderChannels = config.GetSharedOrderChannels(b2);
				byte[] array = new byte[sharedOrderChannels.Count];
				sharedOrderChannels.CopyTo(array, 0);
				MakeChannelsSharedOrder(array);
			}
		}

		protected virtual void Dispose(bool disposing)
		{
			if (m_Ptr != IntPtr.Zero)
			{
				InternalDestroy(m_Ptr);
				m_Ptr = IntPtr.Zero;
			}
		}

		~ConnectionConfigInternal()
		{
			Dispose(disposing: false);
		}

		public void Dispose()
		{
			if (m_Ptr != IntPtr.Zero)
			{
				InternalDestroy(m_Ptr);
				m_Ptr = IntPtr.Zero;
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern IntPtr InternalCreate();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsThreadSafe = true)]
		private static extern void InternalDestroy(IntPtr ptr);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern byte AddChannel(int value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool SetPacketSize(ushort value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("SetSSLCertFilePath")]
		public extern int SetSSLCertFilePath(string value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("SetSSLPrivateKeyFilePath")]
		public extern int SetSSLPrivateKeyFilePath(string value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("SetSSLCAFilePath")]
		public extern int SetSSLCAFilePath(string value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("MakeChannelsSharedOrder")]
		private extern bool MakeChannelsSharedOrder(byte[] values);
	}
	[NativeConditional("ENABLE_NETWORK && ENABLE_UNET", true)]
	[NativeHeader("Modules/UNET/UNETConfiguration.h")]
	internal class HostTopologyInternal : IDisposable
	{
		public IntPtr m_Ptr;

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern ushort ReceivedMessagePoolSize
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern ushort SentMessagePoolSize
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern float MessagePoolSizeGrowthFactor
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public HostTopologyInternal(HostTopology topology)
		{
			ConnectionConfigInternal config = new ConnectionConfigInternal(topology.DefaultConfig);
			m_Ptr = InternalCreate(config, topology.MaxDefaultConnections);
			for (int i = 1; i <= topology.SpecialConnectionConfigsCount; i++)
			{
				ConnectionConfig specialConnectionConfig = topology.GetSpecialConnectionConfig(i);
				ConnectionConfigInternal config2 = new ConnectionConfigInternal(specialConnectionConfig);
				AddSpecialConnectionConfig(config2);
			}
			ReceivedMessagePoolSize = topology.ReceivedMessagePoolSize;
			SentMessagePoolSize = topology.SentMessagePoolSize;
			MessagePoolSizeGrowthFactor = topology.MessagePoolSizeGrowthFactor;
		}

		protected virtual void Dispose(bool disposing)
		{
			if (m_Ptr != IntPtr.Zero)
			{
				InternalDestroy(m_Ptr);
				m_Ptr = IntPtr.Zero;
			}
		}

		~HostTopologyInternal()
		{
			Dispose(disposing: false);
		}

		public void Dispose()
		{
			if (m_Ptr != IntPtr.Zero)
			{
				InternalDestroy(m_Ptr);
				m_Ptr = IntPtr.Zero;
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern IntPtr InternalCreate(ConnectionConfigInternal config, int maxDefaultConnections);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsThreadSafe = true)]
		private static extern void InternalDestroy(IntPtr ptr);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern ushort AddSpecialConnectionConfig(ConnectionConfigInternal config);
	}
	[NativeHeader("Modules/UNET/UNETConfiguration.h")]
	[NativeConditional("ENABLE_NETWORK && ENABLE_UNET", true)]
	internal class ConnectionSimulatorConfigInternal : IDisposable
	{
		public IntPtr m_Ptr;

		public ConnectionSimulatorConfigInternal(ConnectionSimulatorConfig config)
		{
			m_Ptr = InternalCreate(config.m_OutMinDelay, config.m_OutAvgDelay, config.m_InMinDelay, config.m_InAvgDelay, config.m_PacketLossPercentage);
		}

		protected virtual void Dispose(bool disposing)
		{
			if (m_Ptr != IntPtr.Zero)
			{
				InternalDestroy(m_Ptr);
				m_Ptr = IntPtr.Zero;
			}
			GC.SuppressFinalize(this);
		}

		~ConnectionSimulatorConfigInternal()
		{
			Dispose(disposing: false);
		}

		public void Dispose()
		{
			if (m_Ptr != IntPtr.Zero)
			{
				InternalDestroy(m_Ptr);
				m_Ptr = IntPtr.Zero;
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern IntPtr InternalCreate(int outMinDelay, int outAvgDelay, int inMinDelay, int inAvgDelay, float packetLossPercentage);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsThreadSafe = true)]
		private static extern void InternalDestroy(IntPtr ptr);
	}
	[NativeHeader("Modules/UNET/UNETConfiguration.h")]
	[NativeConditional("ENABLE_NETWORK && ENABLE_UNET", true)]
	internal class GlobalConfigInternal : IDisposable
	{
		public IntPtr m_Ptr;

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern uint ThreadAwakeTimeout
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern byte ReactorModel
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern ushort ReactorMaximumReceivedMessages
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern ushort ReactorMaximumSentMessages
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern ushort MaxPacketSize
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern ushort MaxHosts
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern byte ThreadPoolSize
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern uint MinTimerTimeout
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern uint MaxTimerTimeout
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern uint MinNetSimulatorTimeout
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		private extern uint MaxNetSimulatorTimeout
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public GlobalConfigInternal(GlobalConfig config)
		{
			if (config == null)
			{
				throw new NullReferenceException("config is not defined");
			}
			m_Ptr = InternalCreate();
			ThreadAwakeTimeout = config.ThreadAwakeTimeout;
			ReactorModel = (byte)config.ReactorModel;
			ReactorMaximumReceivedMessages = config.ReactorMaximumReceivedMessages;
			ReactorMaximumSentMessages = config.ReactorMaximumSentMessages;
			MaxPacketSize = config.MaxPacketSize;
			MaxHosts = config.MaxHosts;
			if (config.ThreadPoolSize == 0 || config.ThreadPoolSize > 254)
			{
				throw new ArgumentOutOfRangeException("Worker thread pool size should be >= 1 && < 254 (for server only)");
			}
			byte threadPoolSize = config.ThreadPoolSize;
			if (config.ThreadPoolSize > 1)
			{
				Debug.LogWarning((object)"Worker thread pool size can be > 1 only for server platforms: Win, OSX or Linux");
				threadPoolSize = 1;
			}
			ThreadPoolSize = threadPoolSize;
			MinTimerTimeout = config.MinTimerTimeout;
			MaxTimerTimeout = config.MaxTimerTimeout;
			MinNetSimulatorTimeout = config.MinNetSimulatorTimeout;
			MaxNetSimulatorTimeout = config.MaxNetSimulatorTimeout;
		}

		protected virtual void Dispose(bool disposing)
		{
			if (m_Ptr != IntPtr.Zero)
			{
				InternalDestroy(m_Ptr);
				m_Ptr = IntPtr.Zero;
			}
		}

		~GlobalConfigInternal()
		{
			Dispose(disposing: false);
		}

		public void Dispose()
		{
			if (m_Ptr != IntPtr.Zero)
			{
				InternalDestroy(m_Ptr);

Room Architect Tool_Data/Managed/UnityEngine.UnityAnalyticsModule.dll

Decompiled 3 months ago
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;
using UnityEngine.Internal;
using UnityEngine.Scripting;

[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: UnityEngineModuleAssembly]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine.Analytics
{
	[RequiredByNativeCode]
	[NativeHeader("Modules/UnityAnalytics/CoreStats/AnalyticsCoreStats.h")]
	[NativeHeader("Modules/UnityAnalytics/ContinuousEvent/Manager.h")]
	internal class ContinuousEvent
	{
		public static void RegisterCollector<T>(string metricName, Func<T> del) where T : struct, IComparable<T>, IEquatable<T>
		{
			RegisterCollector_Internal(typeof(T).ToString(), metricName, del);
		}

		public static void SetEventHistogramThresholds<T>(string eventName, int count, T[] data) where T : struct, IComparable<T>, IEquatable<T>
		{
			SetEventHistogramThresholds_Internal(typeof(T).ToString(), eventName, count, data);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		private static extern void RegisterCollector_Internal(string type, string metricName, object collector);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		private static extern void SetEventHistogramThresholds_Internal(string type, string eventName, int count, object data);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern void EnableEvent(string eventName, bool enabled);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern void ConfigureEvent(string eventName, string metricName, float interval, float period, bool enabled = true, bool custom = false);
	}
	[RequiredByNativeCode]
	public enum AnalyticsSessionState
	{
		kSessionStopped,
		kSessionStarted,
		kSessionPaused,
		kSessionResumed
	}
	[RequiredByNativeCode]
	[NativeHeader("UnityAnalyticsScriptingClasses.h")]
	[NativeHeader("Modules/UnityAnalytics/CoreStats/AnalyticsCoreStats.h")]
	public static class AnalyticsSessionInfo
	{
		public delegate void SessionStateChanged(AnalyticsSessionState sessionState, long sessionId, long sessionElapsedTime, bool sessionChanged);

		public static extern AnalyticsSessionState sessionState
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetPlayerSessionState")]
			get;
		}

		public static extern long sessionId
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetPlayerSessionId")]
			get;
		}

		public static extern long sessionCount
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetPlayerSessionCount")]
			get;
		}

		public static extern long sessionElapsedTime
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetPlayerSessionElapsedTime")]
			get;
		}

		public static extern bool sessionFirstRun
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetPlayerSessionFirstRun", false, true)]
			get;
		}

		public static extern string userId
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetUserId")]
			get;
		}

		public static event SessionStateChanged sessionStateChanged;

		[RequiredByNativeCode]
		internal static void CallSessionStateChanged(AnalyticsSessionState sessionState, long sessionId, long sessionElapsedTime, bool sessionChanged)
		{
			AnalyticsSessionInfo.sessionStateChanged?.Invoke(sessionState, sessionId, sessionElapsedTime, sessionChanged);
		}
	}
	[StructLayout(LayoutKind.Sequential)]
	[NativeHeader("Modules/UnityAnalytics/Public/Events/UserCustomEvent.h")]
	[NativeHeader("Modules/UnityAnalytics/Public/UnityAnalytics.h")]
	public static class Analytics
	{
		[Serializable]
		private struct UserInfo
		{
			public string custom_userid;

			public string sex;
		}

		[Serializable]
		private struct UserInfoBirthYear
		{
			public int birth_year;
		}

		public static bool initializeOnStartup
		{
			get
			{
				if (!IsInitialized())
				{
					return false;
				}
				return initializeOnStartupInternal;
			}
			set
			{
				if (IsInitialized())
				{
					initializeOnStartupInternal = value;
				}
			}
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		private static extern bool initializeOnStartupInternal
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetInitializeOnStartup")]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("SetInitializeOnStartup")]
			set;
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		private static extern bool enabledInternal
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetEnabled")]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("SetEnabled")]
			set;
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		private static extern bool playerOptedOutInternal
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetPlayerOptedOut")]
			get;
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		private static extern bool limitUserTrackingInternal
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetLimitUserTracking")]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("SetLimitUserTracking")]
			set;
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		private static extern bool deviceStatsEnabledInternal
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetDeviceStatsEnabled")]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("SetDeviceStatsEnabled")]
			set;
		}

		public static bool playerOptedOut
		{
			get
			{
				if (!IsInitialized())
				{
					return false;
				}
				return playerOptedOutInternal;
			}
		}

		public static bool limitUserTracking
		{
			get
			{
				if (!IsInitialized())
				{
					return false;
				}
				return limitUserTrackingInternal;
			}
			set
			{
				if (IsInitialized())
				{
					limitUserTrackingInternal = value;
				}
			}
		}

		public static bool deviceStatsEnabled
		{
			get
			{
				if (!IsInitialized())
				{
					return false;
				}
				return deviceStatsEnabledInternal;
			}
			set
			{
				if (IsInitialized())
				{
					deviceStatsEnabledInternal = value;
				}
			}
		}

		public static bool enabled
		{
			get
			{
				if (!IsInitialized())
				{
					return false;
				}
				return enabledInternal;
			}
			set
			{
				if (IsInitialized())
				{
					enabledInternal = value;
				}
			}
		}

		public static AnalyticsResult ResumeInitialization()
		{
			if (!IsInitialized())
			{
				return AnalyticsResult.NotInitialized;
			}
			return ResumeInitializationInternal();
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("ResumeInitialization")]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		private static extern AnalyticsResult ResumeInitializationInternal();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[ThreadSafe]
		private static extern bool IsInitialized();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		[NativeMethod("FlushEvents")]
		private static extern bool FlushArchivedEvents();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		private static extern AnalyticsResult Transaction(string productId, double amount, string currency, string receiptPurchaseData, string signature, bool usingIAPService);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		private static extern AnalyticsResult SendCustomEventName(string customEventName);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		private static extern AnalyticsResult SendCustomEvent(CustomEventData eventData);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		internal static extern AnalyticsResult RegisterEventWithLimit(string eventName, int maxEventPerHour, int maxItems, string vendorKey, int ver, string prefix, string assemblyInfo, bool notifyServer);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		internal static extern AnalyticsResult RegisterEventsWithLimit(string[] eventName, int maxEventPerHour, int maxItems, string vendorKey, int ver, string prefix, string assemblyInfo, bool notifyServer);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[ThreadSafe]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		internal static extern AnalyticsResult SendEventWithLimit(string eventName, object parameters, int ver, string prefix);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[ThreadSafe]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		internal static extern bool QueueEvent(string eventName, object parameters, int ver, string prefix);

		public static AnalyticsResult FlushEvents()
		{
			if (!IsInitialized())
			{
				return AnalyticsResult.NotInitialized;
			}
			return (!FlushArchivedEvents()) ? AnalyticsResult.NotInitialized : AnalyticsResult.Ok;
		}

		public static AnalyticsResult SetUserId(string userId)
		{
			if (string.IsNullOrEmpty(userId))
			{
				throw new ArgumentException("Cannot set userId to an empty or null string");
			}
			UserInfo userInfo = default(UserInfo);
			userInfo.custom_userid = userId;
			return SendUserInfoEvent(userInfo);
		}

		public static AnalyticsResult SetUserGender(Gender gender)
		{
			UserInfo userInfo = default(UserInfo);
			userInfo.sex = gender switch
			{
				Gender.Male => "M", 
				Gender.Female => "F", 
				_ => "U", 
			};
			return SendUserInfoEvent(userInfo);
		}

		public static AnalyticsResult SetUserBirthYear(int birthYear)
		{
			UserInfoBirthYear userInfoBirthYear = default(UserInfoBirthYear);
			userInfoBirthYear.birth_year = birthYear;
			return SendUserInfoEvent(userInfoBirthYear);
		}

		private static AnalyticsResult SendUserInfoEvent(object param)
		{
			if (!IsInitialized())
			{
				return AnalyticsResult.NotInitialized;
			}
			QueueEvent("userInfo", param, 1, string.Empty);
			return AnalyticsResult.Ok;
		}

		public static AnalyticsResult Transaction(string productId, decimal amount, string currency)
		{
			return Transaction(productId, amount, currency, null, null, usingIAPService: false);
		}

		public static AnalyticsResult Transaction(string productId, decimal amount, string currency, string receiptPurchaseData, string signature)
		{
			return Transaction(productId, amount, currency, receiptPurchaseData, signature, usingIAPService: false);
		}

		public static AnalyticsResult Transaction(string productId, decimal amount, string currency, string receiptPurchaseData, string signature, bool usingIAPService)
		{
			if (string.IsNullOrEmpty(productId))
			{
				throw new ArgumentException("Cannot set productId to an empty or null string");
			}
			if (string.IsNullOrEmpty(currency))
			{
				throw new ArgumentException("Cannot set currency to an empty or null string");
			}
			if (!IsInitialized())
			{
				return AnalyticsResult.NotInitialized;
			}
			if (receiptPurchaseData == null)
			{
				receiptPurchaseData = string.Empty;
			}
			if (signature == null)
			{
				signature = string.Empty;
			}
			return Transaction(productId, Convert.ToDouble(amount), currency, receiptPurchaseData, signature, usingIAPService);
		}

		public static AnalyticsResult CustomEvent(string customEventName)
		{
			if (string.IsNullOrEmpty(customEventName))
			{
				throw new ArgumentException("Cannot set custom event name to an empty or null string");
			}
			if (!IsInitialized())
			{
				return AnalyticsResult.NotInitialized;
			}
			return SendCustomEventName(customEventName);
		}

		public static AnalyticsResult CustomEvent(string customEventName, Vector3 position)
		{
			if (string.IsNullOrEmpty(customEventName))
			{
				throw new ArgumentException("Cannot set custom event name to an empty or null string");
			}
			if (!IsInitialized())
			{
				return AnalyticsResult.NotInitialized;
			}
			CustomEventData customEventData = new CustomEventData(customEventName);
			customEventData.AddDouble("x", (double)Convert.ToDecimal(position.x));
			customEventData.AddDouble("y", (double)Convert.ToDecimal(position.y));
			customEventData.AddDouble("z", (double)Convert.ToDecimal(position.z));
			AnalyticsResult result = SendCustomEvent(customEventData);
			customEventData.Dispose();
			return result;
		}

		public static AnalyticsResult CustomEvent(string customEventName, IDictionary<string, object> eventData)
		{
			if (string.IsNullOrEmpty(customEventName))
			{
				throw new ArgumentException("Cannot set custom event name to an empty or null string");
			}
			if (!IsInitialized())
			{
				return AnalyticsResult.NotInitialized;
			}
			if (eventData == null)
			{
				return SendCustomEventName(customEventName);
			}
			CustomEventData customEventData = new CustomEventData(customEventName);
			AnalyticsResult result = AnalyticsResult.InvalidData;
			try
			{
				customEventData.AddDictionary(eventData);
				result = SendCustomEvent(customEventData);
			}
			finally
			{
				customEventData.Dispose();
			}
			return result;
		}

		[MethodImpl(MethodImplOptions.NoInlining)]
		public static AnalyticsResult RegisterEvent(string eventName, int maxEventPerHour, int maxItems, string vendorKey = "", string prefix = "")
		{
			string empty = string.Empty;
			empty = Assembly.GetCallingAssembly().FullName;
			return RegisterEvent(eventName, maxEventPerHour, maxItems, vendorKey, 1, prefix, empty);
		}

		[MethodImpl(MethodImplOptions.NoInlining)]
		public static AnalyticsResult RegisterEvent(string eventName, int maxEventPerHour, int maxItems, string vendorKey, int ver, string prefix = "")
		{
			string empty = string.Empty;
			empty = Assembly.GetCallingAssembly().FullName;
			return RegisterEvent(eventName, maxEventPerHour, maxItems, vendorKey, ver, prefix, empty);
		}

		private static AnalyticsResult RegisterEvent(string eventName, int maxEventPerHour, int maxItems, string vendorKey, int ver, string prefix, string assemblyInfo)
		{
			if (string.IsNullOrEmpty(eventName))
			{
				throw new ArgumentException("Cannot set event name to an empty or null string");
			}
			if (!IsInitialized())
			{
				return AnalyticsResult.NotInitialized;
			}
			return RegisterEventWithLimit(eventName, maxEventPerHour, maxItems, vendorKey, ver, prefix, assemblyInfo, notifyServer: true);
		}

		public static AnalyticsResult SendEvent(string eventName, object parameters, int ver = 1, string prefix = "")
		{
			if (string.IsNullOrEmpty(eventName))
			{
				throw new ArgumentException("Cannot set event name to an empty or null string");
			}
			if (parameters == null)
			{
				throw new ArgumentException("Cannot set parameters to null");
			}
			if (!IsInitialized())
			{
				return AnalyticsResult.NotInitialized;
			}
			return SendEventWithLimit(eventName, parameters, ver, prefix);
		}
	}
	public enum Gender
	{
		Male,
		Female,
		Unknown
	}
	public enum AnalyticsResult
	{
		Ok,
		NotInitialized,
		AnalyticsDisabled,
		TooManyItems,
		SizeLimitReached,
		TooManyRequests,
		InvalidData,
		UnsupportedPlatform
	}
	[StructLayout(LayoutKind.Sequential)]
	[NativeHeader("Modules/UnityAnalytics/Public/Events/UserCustomEvent.h")]
	internal class CustomEventData : IDisposable
	{
		[NonSerialized]
		internal IntPtr m_Ptr;

		private CustomEventData()
		{
		}

		public CustomEventData(string name)
		{
			m_Ptr = Internal_Create(this, name);
		}

		~CustomEventData()
		{
			Destroy();
		}

		private void Destroy()
		{
			if (m_Ptr != IntPtr.Zero)
			{
				Internal_Destroy(m_Ptr);
				m_Ptr = IntPtr.Zero;
			}
		}

		public void Dispose()
		{
			Destroy();
			GC.SuppressFinalize(this);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern IntPtr Internal_Create(CustomEventData ced, string name);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[ThreadSafe]
		internal static extern void Internal_Destroy(IntPtr ptr);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool AddString(string key, string value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool AddInt32(string key, int value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool AddUInt32(string key, uint value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool AddInt64(string key, long value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool AddUInt64(string key, ulong value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool AddBool(string key, bool value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool AddDouble(string key, double value);

		public bool AddDictionary(IDictionary<string, object> eventData)
		{
			foreach (KeyValuePair<string, object> eventDatum in eventData)
			{
				string key = eventDatum.Key;
				object value = eventDatum.Value;
				if (value == null)
				{
					AddString(key, "null");
					continue;
				}
				Type type = value.GetType();
				if ((object)type == typeof(string))
				{
					AddString(key, (string)value);
					continue;
				}
				if ((object)type == typeof(char))
				{
					AddString(key, char.ToString((char)value));
					continue;
				}
				if ((object)type == typeof(sbyte))
				{
					AddInt32(key, (sbyte)value);
					continue;
				}
				if ((object)type == typeof(byte))
				{
					AddInt32(key, (byte)value);
					continue;
				}
				if ((object)type == typeof(short))
				{
					AddInt32(key, (short)value);
					continue;
				}
				if ((object)type == typeof(ushort))
				{
					AddUInt32(key, (ushort)value);
					continue;
				}
				if ((object)type == typeof(int))
				{
					AddInt32(key, (int)value);
					continue;
				}
				if ((object)type == typeof(uint))
				{
					AddUInt32(eventDatum.Key, (uint)value);
					continue;
				}
				if ((object)type == typeof(long))
				{
					AddInt64(key, (long)value);
					continue;
				}
				if ((object)type == typeof(ulong))
				{
					AddUInt64(key, (ulong)value);
					continue;
				}
				if ((object)type == typeof(bool))
				{
					AddBool(key, (bool)value);
					continue;
				}
				if ((object)type == typeof(float))
				{
					AddDouble(key, (double)Convert.ToDecimal((float)value));
					continue;
				}
				if ((object)type == typeof(double))
				{
					AddDouble(key, (double)value);
					continue;
				}
				if ((object)type == typeof(decimal))
				{
					AddDouble(key, (double)Convert.ToDecimal((decimal)value));
					continue;
				}
				if (type.IsValueType)
				{
					AddString(key, value.ToString());
					continue;
				}
				throw new ArgumentException($"Invalid type: {type} passed");
			}
			return true;
		}
	}
}
namespace UnityEngine
{
	[NativeHeader("Modules/UnityAnalytics/RemoteSettings/RemoteSettings.h")]
	[NativeHeader("UnityAnalyticsScriptingClasses.h")]
	public static class RemoteSettings
	{
		public delegate void UpdatedEventHandler();

		public static event UpdatedEventHandler Updated;

		public static event Action BeforeFetchFromServer;

		public static event Action<bool, bool, int> Completed;

		[RequiredByNativeCode]
		internal static void RemoteSettingsUpdated(bool wasLastUpdatedFromServer)
		{
			RemoteSettings.Updated?.Invoke();
		}

		[RequiredByNativeCode]
		internal static void RemoteSettingsBeforeFetchFromServer()
		{
			RemoteSettings.BeforeFetchFromServer?.Invoke();
		}

		[RequiredByNativeCode]
		internal static void RemoteSettingsUpdateCompleted(bool wasLastUpdatedFromServer, bool settingsChanged, int response)
		{
			RemoteSettings.Completed?.Invoke(wasLastUpdatedFromServer, settingsChanged, response);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		[Obsolete("Calling CallOnUpdate() is not necessary any more and should be removed. Use RemoteSettingsUpdated instead", true)]
		public static void CallOnUpdate()
		{
			throw new NotSupportedException("Calling CallOnUpdate() is not necessary any more and should be removed.");
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public static extern void ForceUpdate();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public static extern bool WasLastUpdatedFromServer();

		[ExcludeFromDocs]
		public static int GetInt(string key)
		{
			return GetInt(key, 0);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public static extern int GetInt(string key, [DefaultValue("0")] int defaultValue);

		[ExcludeFromDocs]
		public static long GetLong(string key)
		{
			return GetLong(key, 0L);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public static extern long GetLong(string key, [DefaultValue("0")] long defaultValue);

		[ExcludeFromDocs]
		public static float GetFloat(string key)
		{
			return GetFloat(key, 0f);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public static extern float GetFloat(string key, [DefaultValue("0.0F")] float defaultValue);

		[ExcludeFromDocs]
		public static string GetString(string key)
		{
			return GetString(key, "");
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public static extern string GetString(string key, [DefaultValue("\"\"")] string defaultValue);

		[ExcludeFromDocs]
		public static bool GetBool(string key)
		{
			return GetBool(key, defaultValue: false);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public static extern bool GetBool(string key, [DefaultValue("false")] bool defaultValue);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public static extern bool HasKey(string key);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public static extern int GetCount();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public static extern string[] GetKeys();

		public static T GetObject<T>(string key = "")
		{
			return (T)GetObject(typeof(T), key);
		}

		public static object GetObject(Type type, string key = "")
		{
			if ((object)type == null)
			{
				throw new ArgumentNullException("type");
			}
			if (type.IsAbstract || type.IsSubclassOf(typeof(Object)))
			{
				throw new ArgumentException("Cannot deserialize to new instances of type '" + type.Name + ".'");
			}
			return GetAsScriptingObject(type, null, key);
		}

		public static object GetObject(string key, object defaultValue)
		{
			if (defaultValue == null)
			{
				throw new ArgumentNullException("defaultValue");
			}
			Type type = defaultValue.GetType();
			if (type.IsAbstract || type.IsSubclassOf(typeof(Object)))
			{
				throw new ArgumentException("Cannot deserialize to new instances of type '" + type.Name + ".'");
			}
			return GetAsScriptingObject(type, defaultValue, key);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern object GetAsScriptingObject(Type t, object defaultValue, string key);

		public static IDictionary<string, object> GetDictionary(string key = "")
		{
			UseSafeLock();
			IDictionary<string, object> dictionary = RemoteConfigSettingsHelper.GetDictionary(GetSafeTopMap(), key);
			ReleaseSafeLock();
			return dictionary;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern void UseSafeLock();

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern void ReleaseSafeLock();

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern IntPtr GetSafeTopMap();
	}
	[StructLayout(LayoutKind.Sequential)]
	[ExcludeFromDocs]
	[NativeHeader("UnityAnalyticsScriptingClasses.h")]
	[NativeHeader("Modules/UnityAnalytics/RemoteSettings/RemoteSettings.h")]
	public class RemoteConfigSettings : IDisposable
	{
		[NonSerialized]
		internal IntPtr m_Ptr;

		public event Action<bool> Updated;

		private RemoteConfigSettings()
		{
		}

		public RemoteConfigSettings(string configKey)
		{
			m_Ptr = Internal_Create(this, configKey);
			this.Updated = null;
		}

		~RemoteConfigSettings()
		{
			Destroy();
		}

		private void Destroy()
		{
			if (m_Ptr != IntPtr.Zero)
			{
				Internal_Destroy(m_Ptr);
				m_Ptr = IntPtr.Zero;
			}
		}

		public void Dispose()
		{
			Destroy();
			GC.SuppressFinalize(this);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern IntPtr Internal_Create(RemoteConfigSettings rcs, string configKey);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[ThreadSafe]
		internal static extern void Internal_Destroy(IntPtr ptr);

		[RequiredByNativeCode]
		internal static void RemoteConfigSettingsUpdated(RemoteConfigSettings rcs, bool wasLastUpdatedFromServer)
		{
			rcs.Updated?.Invoke(wasLastUpdatedFromServer);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public static extern bool QueueConfig(string name, object param, int ver = 1, string prefix = "");

		[MethodImpl(MethodImplOptions.InternalCall)]
		public static extern bool SendDeviceInfoInConfigRequest();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public static extern void AddSessionTag(string tag);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void ForceUpdate();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool WasLastUpdatedFromServer();

		[ExcludeFromDocs]
		public int GetInt(string key)
		{
			return GetInt(key, 0);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern int GetInt(string key, [DefaultValue("0")] int defaultValue);

		[ExcludeFromDocs]
		public long GetLong(string key)
		{
			return GetLong(key, 0L);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern long GetLong(string key, [DefaultValue("0")] long defaultValue);

		[ExcludeFromDocs]
		public float GetFloat(string key)
		{
			return GetFloat(key, 0f);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern float GetFloat(string key, [DefaultValue("0.0F")] float defaultValue);

		[ExcludeFromDocs]
		public string GetString(string key)
		{
			return GetString(key, "");
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern string GetString(string key, [DefaultValue("\"\"")] string defaultValue);

		[ExcludeFromDocs]
		public bool GetBool(string key)
		{
			return GetBool(key, defaultValue: false);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool GetBool(string key, [DefaultValue("false")] bool defaultValue);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool HasKey(string key);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern int GetCount();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern string[] GetKeys();

		public T GetObject<T>(string key = "")
		{
			return (T)GetObject(typeof(T), key);
		}

		public object GetObject(Type type, string key = "")
		{
			if ((object)type == null)
			{
				throw new ArgumentNullException("type");
			}
			if (type.IsAbstract || type.IsSubclassOf(typeof(Object)))
			{
				throw new ArgumentException("Cannot deserialize to new instances of type '" + type.Name + ".'");
			}
			return GetAsScriptingObject(type, null, key);
		}

		public object GetObject(string key, object defaultValue)
		{
			if (defaultValue == null)
			{
				throw new ArgumentNullException("defaultValue");
			}
			Type type = defaultValue.GetType();
			if (type.IsAbstract || type.IsSubclassOf(typeof(Object)))
			{
				throw new ArgumentException("Cannot deserialize to new instances of type '" + type.Name + ".'");
			}
			return GetAsScriptingObject(type, defaultValue, key);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal extern object GetAsScriptingObject(Type t, object defaultValue, string key);

		public IDictionary<string, object> GetDictionary(string key = "")
		{
			UseSafeLock();
			IDictionary<string, object> dictionary = RemoteConfigSettingsHelper.GetDictionary(GetSafeTopMap(), key);
			ReleaseSafeLock();
			return dictionary;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal extern void UseSafeLock();

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal extern void ReleaseSafeLock();

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal extern IntPtr GetSafeTopMap();
	}
	internal static class RemoteConfigSettingsHelper
	{
		[RequiredByNativeCode]
		internal enum Tag
		{
			kUnknown,
			kIntVal,
			kInt64Val,
			kUInt64Val,
			kDoubleVal,
			kBoolVal,
			kStringVal,
			kArrayVal,
			kMixedArrayVal,
			kMapVal,
			kMaxTags
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern IntPtr GetSafeMap(IntPtr m, string key);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern string[] GetSafeMapKeys(IntPtr m);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern Tag[] GetSafeMapTypes(IntPtr m);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern long GetSafeNumber(IntPtr m, string key, long defaultValue);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern float GetSafeFloat(IntPtr m, string key, float defaultValue);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool GetSafeBool(IntPtr m, string key, bool defaultValue);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern string GetSafeStringValue(IntPtr m, string key, string defaultValue);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern IntPtr GetSafeArray(IntPtr m, string key);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern long GetSafeArraySize(IntPtr a);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern IntPtr GetSafeArrayArray(IntPtr a, long i);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern IntPtr GetSafeArrayMap(IntPtr a, long i);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern Tag GetSafeArrayType(IntPtr a, long i);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern long GetSafeNumberArray(IntPtr a, long i);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern float GetSafeArrayFloat(IntPtr a, long i);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool GetSafeArrayBool(IntPtr a, long i);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern string GetSafeArrayStringValue(IntPtr a, long i);

		public static IDictionary<string, object> GetDictionary(IntPtr m, string key)
		{
			if (m == IntPtr.Zero)
			{
				return null;
			}
			if (!string.IsNullOrEmpty(key))
			{
				m = GetSafeMap(m, key);
				if (m == IntPtr.Zero)
				{
					return null;
				}
			}
			return GetDictionary(m);
		}

		internal static IDictionary<string, object> GetDictionary(IntPtr m)
		{
			if (m == IntPtr.Zero)
			{
				return null;
			}
			IDictionary<string, object> dictionary = new Dictionary<string, object>();
			Tag[] safeMapTypes = GetSafeMapTypes(m);
			string[] safeMapKeys = GetSafeMapKeys(m);
			for (int i = 0; i < safeMapKeys.Length; i++)
			{
				SetDictKeyType(m, dictionary, safeMapKeys[i], safeMapTypes[i]);
			}
			return dictionary;
		}

		internal static object GetArrayArrayEntries(IntPtr a, long i)
		{
			return GetArrayEntries(GetSafeArrayArray(a, i));
		}

		internal static IDictionary<string, object> GetArrayMapEntries(IntPtr a, long i)
		{
			return GetDictionary(GetSafeArrayMap(a, i));
		}

		internal static T[] GetArrayEntriesType<T>(IntPtr a, long size, Func<IntPtr, long, T> f)
		{
			T[] array = new T[size];
			for (long num = 0L; num < size; num++)
			{
				array[num] = f(a, num);
			}
			return array;
		}

		internal static object GetArrayEntries(IntPtr a)
		{
			long safeArraySize = GetSafeArraySize(a);
			if (safeArraySize == 0)
			{
				return null;
			}
			switch (GetSafeArrayType(a, 0L))
			{
			case Tag.kIntVal:
			case Tag.kInt64Val:
				return GetArrayEntriesType(a, safeArraySize, GetSafeNumberArray);
			case Tag.kDoubleVal:
				return GetArrayEntriesType(a, safeArraySize, GetSafeArrayFloat);
			case Tag.kBoolVal:
				return GetArrayEntriesType(a, safeArraySize, GetSafeArrayBool);
			case Tag.kStringVal:
				return GetArrayEntriesType(a, safeArraySize, GetSafeArrayStringValue);
			case Tag.kArrayVal:
				return GetArrayEntriesType(a, safeArraySize, GetArrayArrayEntries);
			case Tag.kMapVal:
				return GetArrayEntriesType(a, safeArraySize, GetArrayMapEntries);
			default:
				return null;
			}
		}

		internal static object GetMixedArrayEntries(IntPtr a)
		{
			long safeArraySize = GetSafeArraySize(a);
			if (safeArraySize == 0)
			{
				return null;
			}
			object[] array = new object[safeArraySize];
			for (long num = 0L; num < safeArraySize; num++)
			{
				switch (GetSafeArrayType(a, num))
				{
				case Tag.kIntVal:
				case Tag.kInt64Val:
					array[num] = GetSafeNumberArray(a, num);
					break;
				case Tag.kDoubleVal:
					array[num] = GetSafeArrayFloat(a, num);
					break;
				case Tag.kBoolVal:
					array[num] = GetSafeArrayBool(a, num);
					break;
				case Tag.kStringVal:
					array[num] = GetSafeArrayStringValue(a, num);
					break;
				case Tag.kArrayVal:
					array[num] = GetArrayArrayEntries(a, num);
					break;
				case Tag.kMapVal:
					array[num] = GetArrayMapEntries(a, num);
					break;
				}
			}
			return array;
		}

		internal static void SetDictKeyType(IntPtr m, IDictionary<string, object> dict, string key, Tag tag)
		{
			switch (tag)
			{
			case Tag.kIntVal:
			case Tag.kInt64Val:
				dict[key] = GetSafeNumber(m, key, 0L);
				break;
			case Tag.kDoubleVal:
				dict[key] = GetSafeFloat(m, key, 0f);
				break;
			case Tag.kBoolVal:
				dict[key] = GetSafeBool(m, key, defaultValue: false);
				break;
			case Tag.kStringVal:
				dict[key] = GetSafeStringValue(m, key, "");
				break;
			case Tag.kArrayVal:
				dict[key] = GetArrayEntries(GetSafeArray(m, key));
				break;
			case Tag.kMixedArrayVal:
				dict[key] = GetMixedArrayEntries(GetSafeArray(m, key));
				break;
			case Tag.kMapVal:
				dict[key] = GetDictionary(GetSafeMap(m, key));
				break;
			case Tag.kUInt64Val:
				break;
			}
		}
	}
}

Room Architect Tool_Data/Managed/UnityEngine.UnityConnectModule.dll

Decompiled 3 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;

[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: UnityEngineModuleAssembly]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine.Connect
{
	[NativeHeader("Modules/UnityConnect/UnityConnectSettings.h")]
	internal class UnityConnectSettings : Object
	{
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern bool enabled
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern bool testMode
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern string eventUrl
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern string eventOldUrl
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern string configUrl
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern int testInitMode
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}
	}
}
namespace UnityEngine.Advertisements
{
	[NativeHeader("Modules/UnityConnect/UnityAds/UnityAdsSettings.h")]
	internal static class UnityAdsSettings
	{
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern bool enabled
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[ThreadSafe]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[ThreadSafe]
			set;
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern bool initializeOnStartup
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern bool testMode
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[Obsolete("warning No longer supported and will always return true")]
		public static bool IsPlatformEnabled(RuntimePlatform platform)
		{
			return true;
		}

		[Obsolete("warning No longer supported and will do nothing")]
		public static void SetPlatformEnabled(RuntimePlatform platform, bool value)
		{
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern string GetGameId(RuntimePlatform platform);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern void SetGameId(RuntimePlatform platform, string gameId);
	}
}

Room Architect Tool_Data/Managed/UnityEngine.UnityTestProtocolModule.dll

Decompiled 3 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;

[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]

Room Architect Tool_Data/Managed/UnityEngine.UnityWebRequestAssetBundleModule.dll

Decompiled 3 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;

[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine.Networking;

public static class UnityWebRequestAssetBundle
{
	public static UnityWebRequest GetAssetBundle(string uri)
	{
		return GetAssetBundle(uri, 0u);
	}

	public static UnityWebRequest GetAssetBundle(Uri uri)
	{
		return GetAssetBundle(uri, 0u);
	}

	public static UnityWebRequest GetAssetBundle(string uri, uint crc)
	{
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0015: Expected O, but got Unknown
		return new UnityWebRequest(uri, "GET", (DownloadHandler)(object)new DownloadHandlerAssetBundle(uri, crc), (UploadHandler)null);
	}

	public static UnityWebRequest GetAssetBundle(Uri uri, uint crc)
	{
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Expected O, but got Unknown
		return new UnityWebRequest(uri, "GET", (DownloadHandler)(object)new DownloadHandlerAssetBundle(uri.AbsoluteUri, crc), (UploadHandler)null);
	}

	public static UnityWebRequest GetAssetBundle(string uri, uint version, uint crc)
	{
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: Expected O, but got Unknown
		return new UnityWebRequest(uri, "GET", (DownloadHandler)(object)new DownloadHandlerAssetBundle(uri, version, crc), (UploadHandler)null);
	}

	public static UnityWebRequest GetAssetBundle(Uri uri, uint version, uint crc)
	{
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Expected O, but got Unknown
		return new UnityWebRequest(uri, "GET", (DownloadHandler)(object)new DownloadHandlerAssetBundle(uri.AbsoluteUri, version, crc), (UploadHandler)null);
	}

	public static UnityWebRequest GetAssetBundle(string uri, Hash128 hash, uint crc = 0u)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: Expected O, but got Unknown
		return new UnityWebRequest(uri, "GET", (DownloadHandler)(object)new DownloadHandlerAssetBundle(uri, hash, crc), (UploadHandler)null);
	}

	public static UnityWebRequest GetAssetBundle(Uri uri, Hash128 hash, uint crc = 0u)
	{
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Expected O, but got Unknown
		return new UnityWebRequest(uri, "GET", (DownloadHandler)(object)new DownloadHandlerAssetBundle(uri.AbsoluteUri, hash, crc), (UploadHandler)null);
	}

	public static UnityWebRequest GetAssetBundle(string uri, CachedAssetBundle cachedAssetBundle, uint crc = 0u)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: Expected O, but got Unknown
		return new UnityWebRequest(uri, "GET", (DownloadHandler)(object)new DownloadHandlerAssetBundle(uri, cachedAssetBundle, crc), (UploadHandler)null);
	}

	public static UnityWebRequest GetAssetBundle(Uri uri, CachedAssetBundle cachedAssetBundle, uint crc = 0u)
	{
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Expected O, but got Unknown
		return new UnityWebRequest(uri, "GET", (DownloadHandler)(object)new DownloadHandlerAssetBundle(uri.AbsoluteUri, cachedAssetBundle, crc), (UploadHandler)null);
	}
}
[StructLayout(LayoutKind.Sequential)]
[NativeHeader("Modules/UnityWebRequestAssetBundle/Public/DownloadHandlerAssetBundle.h")]
public sealed class DownloadHandlerAssetBundle : DownloadHandler
{
	public extern AssetBundle assetBundle
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	public DownloadHandlerAssetBundle(string url, uint crc)
	{
		InternalCreateAssetBundle(url, crc);
	}

	public DownloadHandlerAssetBundle(string url, uint version, uint crc)
	{
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		InternalCreateAssetBundleCached(url, "", new Hash128(0u, 0u, 0u, version), crc);
	}

	public DownloadHandlerAssetBundle(string url, Hash128 hash, uint crc)
	{
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		InternalCreateAssetBundleCached(url, "", hash, crc);
	}

	public DownloadHandlerAssetBundle(string url, string name, Hash128 hash, uint crc)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		InternalCreateAssetBundleCached(url, name, hash, crc);
	}

	public DownloadHandlerAssetBundle(string url, CachedAssetBundle cachedBundle, uint crc)
	{
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		InternalCreateAssetBundleCached(url, ((CachedAssetBundle)(ref cachedBundle)).name, ((CachedAssetBundle)(ref cachedBundle)).hash, crc);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern IntPtr Create(DownloadHandlerAssetBundle obj, string url, uint crc);

	private static IntPtr CreateCached(DownloadHandlerAssetBundle obj, string url, string name, Hash128 hash, uint crc)
	{
		return CreateCached_Injected(obj, url, name, ref hash, crc);
	}

	private void InternalCreateAssetBundle(string url, uint crc)
	{
		base.m_Ptr = Create(this, url, crc);
	}

	private void InternalCreateAssetBundleCached(string url, string name, Hash128 hash, uint crc)
	{
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		base.m_Ptr = CreateCached(this, url, name, hash, crc);
	}

	protected override byte[] GetData()
	{
		throw new NotSupportedException("Raw data access is not supported for asset bundles");
	}

	protected override string GetText()
	{
		throw new NotSupportedException("String access is not supported for asset bundles");
	}

	public static AssetBundle GetContent(UnityWebRequest www)
	{
		return DownloadHandler.GetCheckedDownloader<DownloadHandlerAssetBundle>(www).assetBundle;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern IntPtr CreateCached_Injected(DownloadHandlerAssetBundle obj, string url, string name, ref Hash128 hash, uint crc);
}

Room Architect Tool_Data/Managed/UnityEngine.UnityWebRequestAudioModule.dll

Decompiled 3 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;

[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine.Networking;

public static class UnityWebRequestMultimedia
{
	public static UnityWebRequest GetAudioClip(string uri, AudioType audioType)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0015: Expected O, but got Unknown
		return new UnityWebRequest(uri, "GET", (DownloadHandler)(object)new DownloadHandlerAudioClip(uri, audioType), (UploadHandler)null);
	}

	public static UnityWebRequest GetAudioClip(Uri uri, AudioType audioType)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0015: Expected O, but got Unknown
		return new UnityWebRequest(uri, "GET", (DownloadHandler)(object)new DownloadHandlerAudioClip(uri, audioType), (UploadHandler)null);
	}

	[Obsolete("MovieTexture is deprecated. Use VideoPlayer instead.", false)]
	public static UnityWebRequest GetMovieTexture(string uri)
	{
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Expected O, but got Unknown
		return new UnityWebRequest(uri, "GET", (DownloadHandler)(object)new DownloadHandlerMovieTexture(), (UploadHandler)null);
	}

	[Obsolete("MovieTexture is deprecated. Use VideoPlayer instead.", false)]
	public static UnityWebRequest GetMovieTexture(Uri uri)
	{
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Expected O, but got Unknown
		return new UnityWebRequest(uri, "GET", (DownloadHandler)(object)new DownloadHandlerMovieTexture(), (UploadHandler)null);
	}
}
[StructLayout(LayoutKind.Sequential)]
[NativeHeader("Modules/UnityWebRequestAudio/Public/DownloadHandlerAudioClip.h")]
public sealed class DownloadHandlerAudioClip : DownloadHandler
{
	[NativeThrows]
	public extern AudioClip audioClip
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	public extern bool streamAudio
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern bool compressed
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public DownloadHandlerAudioClip(string url, AudioType audioType)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		InternalCreateAudioClip(url, audioType);
	}

	public DownloadHandlerAudioClip(Uri uri, AudioType audioType)
	{
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		InternalCreateAudioClip(uri.AbsoluteUri, audioType);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern IntPtr Create(DownloadHandlerAudioClip obj, string url, AudioType audioType);

	private void InternalCreateAudioClip(string url, AudioType audioType)
	{
		//IL_0004: Unknown result type (might be due to invalid IL or missing references)
		base.m_Ptr = Create(this, url, audioType);
	}

	protected override byte[] GetData()
	{
		return DownloadHandler.InternalGetByteArray((DownloadHandler)(object)this);
	}

	protected override string GetText()
	{
		throw new NotSupportedException("String access is not supported for audio clips");
	}

	public static AudioClip GetContent(UnityWebRequest www)
	{
		return DownloadHandler.GetCheckedDownloader<DownloadHandlerAudioClip>(www).audioClip;
	}
}
[StructLayout(LayoutKind.Sequential)]
[NativeHeader("Runtime/Video/MovieTexture.h")]
[NativeHeader("Modules/UnityWebRequestAudio/Public/DownloadHandlerMovieTexture.h")]
[Obsolete("MovieTexture is deprecated. Use VideoPlayer instead.", false)]
public sealed class DownloadHandlerMovieTexture : DownloadHandler
{
	public extern MovieTexture movieTexture
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	public DownloadHandlerMovieTexture()
	{
		InternalCreateDHMovieTexture();
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern IntPtr Create(DownloadHandlerMovieTexture obj);

	private void InternalCreateDHMovieTexture()
	{
		base.m_Ptr = Create(this);
	}

	protected override byte[] GetData()
	{
		return DownloadHandler.InternalGetByteArray((DownloadHandler)(object)this);
	}

	protected override string GetText()
	{
		throw new NotSupportedException("String access is not supported for movies");
	}

	public static MovieTexture GetContent(UnityWebRequest uwr)
	{
		return DownloadHandler.GetCheckedDownloader<DownloadHandlerMovieTexture>(uwr).movieTexture;
	}
}

Room Architect Tool_Data/Managed/UnityEngine.UnityWebRequestModule.dll

Decompiled 3 months ago
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using System.Text;
using System.Text.RegularExpressions;
using UnityEngine;
using UnityEngine.Bindings;
using UnityEngine.Internal;
using UnityEngine.Scripting;
using UnityEngineInternal;

[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine.Networking
{
	public interface IMultipartFormSection
	{
		string sectionName { get; }

		byte[] sectionData { get; }

		string fileName { get; }

		string contentType { get; }
	}
	public class MultipartFormDataSection : IMultipartFormSection
	{
		private string name;

		private byte[] data;

		private string content;

		public string sectionName => name;

		public byte[] sectionData => data;

		public string fileName => null;

		public string contentType => content;

		public MultipartFormDataSection(string name, byte[] data, string contentType)
		{
			if (data == null || data.Length < 1)
			{
				throw new ArgumentException("Cannot create a multipart form data section without body data");
			}
			this.name = name;
			this.data = data;
			content = contentType;
		}

		public MultipartFormDataSection(string name, byte[] data)
			: this(name, data, null)
		{
		}

		public MultipartFormDataSection(byte[] data)
			: this(null, data)
		{
		}

		public MultipartFormDataSection(string name, string data, Encoding encoding, string contentType)
		{
			if (data == null || data.Length < 1)
			{
				throw new ArgumentException("Cannot create a multipart form data section without body data");
			}
			byte[] bytes = encoding.GetBytes(data);
			this.name = name;
			this.data = bytes;
			if (contentType != null && !contentType.Contains("encoding="))
			{
				contentType = contentType.Trim() + "; encoding=" + encoding.WebName;
			}
			content = contentType;
		}

		public MultipartFormDataSection(string name, string data, string contentType)
			: this(name, data, Encoding.UTF8, contentType)
		{
		}

		public MultipartFormDataSection(string name, string data)
			: this(name, data, "text/plain")
		{
		}

		public MultipartFormDataSection(string data)
			: this(null, data)
		{
		}
	}
	public class MultipartFormFileSection : IMultipartFormSection
	{
		private string name;

		private byte[] data;

		private string file;

		private string content;

		public string sectionName => name;

		public byte[] sectionData => data;

		public string fileName => file;

		public string contentType => content;

		public MultipartFormFileSection(string name, byte[] data, string fileName, string contentType)
		{
			if (data == null || data.Length < 1)
			{
				throw new ArgumentException("Cannot create a multipart form file section without body data");
			}
			if (string.IsNullOrEmpty(fileName))
			{
				fileName = "file.dat";
			}
			if (string.IsNullOrEmpty(contentType))
			{
				contentType = "application/octet-stream";
			}
			Init(name, data, fileName, contentType);
		}

		public MultipartFormFileSection(byte[] data)
			: this(null, data, null, null)
		{
		}

		public MultipartFormFileSection(string fileName, byte[] data)
			: this(null, data, fileName, null)
		{
		}

		public MultipartFormFileSection(string name, string data, Encoding dataEncoding, string fileName)
		{
			if (data == null || data.Length < 1)
			{
				throw new ArgumentException("Cannot create a multipart form file section without body data");
			}
			if (dataEncoding == null)
			{
				dataEncoding = Encoding.UTF8;
			}
			byte[] bytes = dataEncoding.GetBytes(data);
			if (string.IsNullOrEmpty(fileName))
			{
				fileName = "file.txt";
			}
			if (string.IsNullOrEmpty(content))
			{
				content = "text/plain; charset=" + dataEncoding.WebName;
			}
			Init(name, bytes, fileName, content);
		}

		public MultipartFormFileSection(string data, Encoding dataEncoding, string fileName)
			: this(null, data, dataEncoding, fileName)
		{
		}

		public MultipartFormFileSection(string data, string fileName)
			: this(data, null, fileName)
		{
		}

		private void Init(string name, byte[] data, string fileName, string contentType)
		{
			this.name = name;
			this.data = data;
			file = fileName;
			content = contentType;
		}
	}
	[StructLayout(LayoutKind.Sequential)]
	[UsedByNativeCode]
	[NativeHeader("Modules/UnityWebRequest/Public/UnityWebRequestAsyncOperation.h")]
	[NativeHeader("UnityWebRequestScriptingClasses.h")]
	public class UnityWebRequestAsyncOperation : AsyncOperation
	{
		public UnityWebRequest webRequest { get; internal set; }
	}
	[StructLayout(LayoutKind.Sequential)]
	[NativeHeader("Modules/UnityWebRequest/Public/UnityWebRequest.h")]
	public class UnityWebRequest : IDisposable
	{
		internal enum UnityWebRequestMethod
		{
			Get,
			Post,
			Put,
			Head,
			Custom
		}

		internal enum UnityWebRequestError
		{
			OK,
			Unknown,
			SDKError,
			UnsupportedProtocol,
			MalformattedUrl,
			CannotResolveProxy,
			CannotResolveHost,
			CannotConnectToHost,
			AccessDenied,
			GenericHttpError,
			WriteError,
			ReadError,
			OutOfMemory,
			Timeout,
			HTTPPostError,
			SSLCannotConnect,
			Aborted,
			TooManyRedirects,
			ReceivedNoData,
			SSLNotSupported,
			FailedToSendData,
			FailedToReceiveData,
			SSLCertificateError,
			SSLCipherNotAvailable,
			SSLCACertError,
			UnrecognizedContentEncoding,
			LoginFailed,
			SSLShutdownFailed,
			NoInternetConnection
		}

		[NonSerialized]
		internal IntPtr m_Ptr;

		[NonSerialized]
		internal DownloadHandler m_DownloadHandler;

		[NonSerialized]
		internal UploadHandler m_UploadHandler;

		[NonSerialized]
		internal CertificateHandler m_CertificateHandler;

		[NonSerialized]
		internal Uri m_Uri;

		public const string kHttpVerbGET = "GET";

		public const string kHttpVerbHEAD = "HEAD";

		public const string kHttpVerbPOST = "POST";

		public const string kHttpVerbPUT = "PUT";

		public const string kHttpVerbCREATE = "CREATE";

		public const string kHttpVerbDELETE = "DELETE";

		public bool disposeCertificateHandlerOnDispose { get; set; }

		public bool disposeDownloadHandlerOnDispose { get; set; }

		public bool disposeUploadHandlerOnDispose { get; set; }

		public string method
		{
			get
			{
				return GetMethod() switch
				{
					UnityWebRequestMethod.Get => "GET", 
					UnityWebRequestMethod.Post => "POST", 
					UnityWebRequestMethod.Put => "PUT", 
					UnityWebRequestMethod.Head => "HEAD", 
					_ => GetCustomMethod(), 
				};
			}
			set
			{
				if (string.IsNullOrEmpty(value))
				{
					throw new ArgumentException("Cannot set a UnityWebRequest's method to an empty or null string");
				}
				switch (value.ToUpper())
				{
				case "GET":
					InternalSetMethod(UnityWebRequestMethod.Get);
					break;
				case "POST":
					InternalSetMethod(UnityWebRequestMethod.Post);
					break;
				case "PUT":
					InternalSetMethod(UnityWebRequestMethod.Put);
					break;
				case "HEAD":
					InternalSetMethod(UnityWebRequestMethod.Head);
					break;
				default:
					InternalSetCustomMethod(value.ToUpper());
					break;
				}
			}
		}

		public string error
		{
			get
			{
				if (!isNetworkError && !isHttpError)
				{
					return null;
				}
				if (isHttpError)
				{
					string hTTPStatusString = GetHTTPStatusString(responseCode);
					return $"HTTP/1.1 {responseCode} {hTTPStatusString}";
				}
				return GetWebErrorString(GetError());
			}
		}

		private extern bool use100Continue
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public bool useHttpContinue
		{
			get
			{
				return use100Continue;
			}
			set
			{
				if (!isModifiable)
				{
					throw new InvalidOperationException("UnityWebRequest has already been sent and its 100-Continue setting cannot be altered");
				}
				use100Continue = value;
			}
		}

		public string url
		{
			get
			{
				return GetUrl();
			}
			set
			{
				string localUrl = "http://localhost/";
				InternalSetUrl(WebRequestUtils.MakeInitialUrl(value, localUrl));
			}
		}

		public Uri uri
		{
			get
			{
				return new Uri(GetUrl());
			}
			set
			{
				if (!value.IsAbsoluteUri)
				{
					throw new ArgumentException("URI must be absolute");
				}
				InternalSetUrl(WebRequestUtils.MakeUriString(value, value.OriginalString, prependProtocol: false));
				m_Uri = value;
			}
		}

		public extern long responseCode
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public float uploadProgress
		{
			get
			{
				if (!IsExecuting() && !isDone)
				{
					return -1f;
				}
				return GetUploadProgress();
			}
		}

		public extern bool isModifiable
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("IsModifiable")]
			get;
		}

		public extern bool isDone
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("IsDone")]
			get;
		}

		public extern bool isNetworkError
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("IsNetworkError")]
			get;
		}

		public extern bool isHttpError
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("IsHttpError")]
			get;
		}

		public float downloadProgress
		{
			get
			{
				if (!IsExecuting() && !isDone)
				{
					return -1f;
				}
				return GetDownloadProgress();
			}
		}

		public extern ulong uploadedBytes
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern ulong downloadedBytes
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public int redirectLimit
		{
			get
			{
				return GetRedirectLimit();
			}
			set
			{
				SetRedirectLimitFromScripting(value);
			}
		}

		public bool chunkedTransfer
		{
			get
			{
				return GetChunked();
			}
			set
			{
				if (!isModifiable)
				{
					throw new InvalidOperationException("UnityWebRequest has already been sent and its chunked transfer encoding setting cannot be altered");
				}
				UnityWebRequestError unityWebRequestError = SetChunked(value);
				if (unityWebRequestError != 0)
				{
					throw new InvalidOperationException(GetWebErrorString(unityWebRequestError));
				}
			}
		}

		public UploadHandler uploadHandler
		{
			get
			{
				return m_UploadHandler;
			}
			set
			{
				if (!isModifiable)
				{
					throw new InvalidOperationException("UnityWebRequest has already been sent; cannot modify the upload handler");
				}
				UnityWebRequestError unityWebRequestError = SetUploadHandler(value);
				if (unityWebRequestError != 0)
				{
					throw new InvalidOperationException(GetWebErrorString(unityWebRequestError));
				}
				m_UploadHandler = value;
			}
		}

		public DownloadHandler downloadHandler
		{
			get
			{
				return m_DownloadHandler;
			}
			set
			{
				if (!isModifiable)
				{
					throw new InvalidOperationException("UnityWebRequest has already been sent; cannot modify the download handler");
				}
				UnityWebRequestError unityWebRequestError = SetDownloadHandler(value);
				if (unityWebRequestError != 0)
				{
					throw new InvalidOperationException(GetWebErrorString(unityWebRequestError));
				}
				m_DownloadHandler = value;
			}
		}

		public CertificateHandler certificateHandler
		{
			get
			{
				return m_CertificateHandler;
			}
			set
			{
				if (!isModifiable)
				{
					throw new InvalidOperationException("UnityWebRequest has already been sent; cannot modify the certificate handler");
				}
				UnityWebRequestError unityWebRequestError = SetCertificateHandler(value);
				if (unityWebRequestError != 0)
				{
					throw new InvalidOperationException(GetWebErrorString(unityWebRequestError));
				}
				m_CertificateHandler = value;
			}
		}

		public int timeout
		{
			get
			{
				return GetTimeoutMsec() / 1000;
			}
			set
			{
				if (!isModifiable)
				{
					throw new InvalidOperationException("UnityWebRequest has already been sent; cannot modify the timeout");
				}
				value = Math.Max(value, 0);
				UnityWebRequestError unityWebRequestError = SetTimeoutMsec(value * 1000);
				if (unityWebRequestError != 0)
				{
					throw new InvalidOperationException(GetWebErrorString(unityWebRequestError));
				}
			}
		}

		public UnityWebRequest()
		{
			m_Ptr = Create();
			InternalSetDefaults();
		}

		public UnityWebRequest(string url)
		{
			m_Ptr = Create();
			InternalSetDefaults();
			this.url = url;
		}

		public UnityWebRequest(Uri uri)
		{
			m_Ptr = Create();
			InternalSetDefaults();
			this.uri = uri;
		}

		public UnityWebRequest(string url, string method)
		{
			m_Ptr = Create();
			InternalSetDefaults();
			this.url = url;
			this.method = method;
		}

		public UnityWebRequest(Uri uri, string method)
		{
			m_Ptr = Create();
			InternalSetDefaults();
			this.uri = uri;
			this.method = method;
		}

		public UnityWebRequest(string url, string method, DownloadHandler downloadHandler, UploadHandler uploadHandler)
		{
			m_Ptr = Create();
			InternalSetDefaults();
			this.url = url;
			this.method = method;
			this.downloadHandler = downloadHandler;
			this.uploadHandler = uploadHandler;
		}

		public UnityWebRequest(Uri uri, string method, DownloadHandler downloadHandler, UploadHandler uploadHandler)
		{
			m_Ptr = Create();
			InternalSetDefaults();
			this.uri = uri;
			this.method = method;
			this.downloadHandler = downloadHandler;
			this.uploadHandler = uploadHandler;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsThreadSafe = true)]
		[NativeConditional("ENABLE_UNITYWEBREQUEST")]
		private static extern string GetWebErrorString(UnityWebRequestError err);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[VisibleToOtherModules]
		internal static extern string GetHTTPStatusString(long responseCode);

		public static void ClearCookieCache()
		{
			ClearCookieCache(null, null);
		}

		public static void ClearCookieCache(Uri uri)
		{
			if (uri == null)
			{
				ClearCookieCache(null, null);
				return;
			}
			string host = uri.Host;
			string text = uri.AbsolutePath;
			if (text == "/")
			{
				text = null;
			}
			ClearCookieCache(host, text);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void ClearCookieCache(string domain, string path);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern IntPtr Create();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsThreadSafe = true)]
		private extern void Release();

		internal void InternalDestroy()
		{
			if (m_Ptr != IntPtr.Zero)
			{
				Abort();
				Release();
				m_Ptr = IntPtr.Zero;
			}
		}

		private void InternalSetDefaults()
		{
			disposeDownloadHandlerOnDispose = true;
			disposeUploadHandlerOnDispose = true;
			disposeCertificateHandlerOnDispose = true;
		}

		~UnityWebRequest()
		{
			DisposeHandlers();
			InternalDestroy();
		}

		public void Dispose()
		{
			DisposeHandlers();
			InternalDestroy();
			GC.SuppressFinalize(this);
		}

		private void DisposeHandlers()
		{
			if (disposeDownloadHandlerOnDispose)
			{
				downloadHandler?.Dispose();
			}
			if (disposeUploadHandlerOnDispose)
			{
				uploadHandler?.Dispose();
			}
			if (disposeCertificateHandlerOnDispose)
			{
				certificateHandler?.Dispose();
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		internal extern UnityWebRequestAsyncOperation BeginWebRequest();

		[Obsolete("Use SendWebRequest.  It returns a UnityWebRequestAsyncOperation which contains a reference to the WebRequest object.", false)]
		public AsyncOperation Send()
		{
			return (AsyncOperation)(object)SendWebRequest();
		}

		public UnityWebRequestAsyncOperation SendWebRequest()
		{
			UnityWebRequestAsyncOperation unityWebRequestAsyncOperation = BeginWebRequest();
			if (unityWebRequestAsyncOperation != null)
			{
				unityWebRequestAsyncOperation.webRequest = this;
			}
			return unityWebRequestAsyncOperation;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsThreadSafe = true)]
		public extern void Abort();

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern UnityWebRequestError SetMethod(UnityWebRequestMethod methodType);

		internal void InternalSetMethod(UnityWebRequestMethod methodType)
		{
			if (!isModifiable)
			{
				throw new InvalidOperationException("UnityWebRequest has already been sent and its request method can no longer be altered");
			}
			UnityWebRequestError unityWebRequestError = SetMethod(methodType);
			if (unityWebRequestError != 0)
			{
				throw new InvalidOperationException(GetWebErrorString(unityWebRequestError));
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern UnityWebRequestError SetCustomMethod(string customMethodName);

		internal void InternalSetCustomMethod(string customMethodName)
		{
			if (!isModifiable)
			{
				throw new InvalidOperationException("UnityWebRequest has already been sent and its request method can no longer be altered");
			}
			UnityWebRequestError unityWebRequestError = SetCustomMethod(customMethodName);
			if (unityWebRequestError != 0)
			{
				throw new InvalidOperationException(GetWebErrorString(unityWebRequestError));
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal extern UnityWebRequestMethod GetMethod();

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal extern string GetCustomMethod();

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern UnityWebRequestError GetError();

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern string GetUrl();

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern UnityWebRequestError SetUrl(string url);

		private void InternalSetUrl(string url)
		{
			if (!isModifiable)
			{
				throw new InvalidOperationException("UnityWebRequest has already been sent and its URL cannot be altered");
			}
			UnityWebRequestError unityWebRequestError = SetUrl(url);
			if (unityWebRequestError != 0)
			{
				throw new InvalidOperationException(GetWebErrorString(unityWebRequestError));
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern float GetUploadProgress();

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern bool IsExecuting();

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern float GetDownloadProgress();

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern int GetRedirectLimit();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private extern void SetRedirectLimitFromScripting(int limit);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern bool GetChunked();

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern UnityWebRequestError SetChunked(bool chunked);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern string GetRequestHeader(string name);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("SetRequestHeader")]
		internal extern UnityWebRequestError InternalSetRequestHeader(string name, string value);

		public void SetRequestHeader(string name, string value)
		{
			if (string.IsNullOrEmpty(name))
			{
				throw new ArgumentException("Cannot set a Request Header with a null or empty name");
			}
			if (value == null)
			{
				throw new ArgumentException("Cannot set a Request header with a null");
			}
			if (!isModifiable)
			{
				throw new InvalidOperationException("UnityWebRequest has already been sent and its request headers cannot be altered");
			}
			UnityWebRequestError unityWebRequestError = InternalSetRequestHeader(name, value);
			if (unityWebRequestError != 0)
			{
				throw new InvalidOperationException(GetWebErrorString(unityWebRequestError));
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern string GetResponseHeader(string name);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal extern string[] GetResponseHeaderKeys();

		public Dictionary<string, string> GetResponseHeaders()
		{
			string[] responseHeaderKeys = GetResponseHeaderKeys();
			if (responseHeaderKeys == null || responseHeaderKeys.Length == 0)
			{
				return null;
			}
			Dictionary<string, string> dictionary = new Dictionary<string, string>(responseHeaderKeys.Length, StringComparer.OrdinalIgnoreCase);
			for (int i = 0; i < responseHeaderKeys.Length; i++)
			{
				string responseHeader = GetResponseHeader(responseHeaderKeys[i]);
				dictionary.Add(responseHeaderKeys[i], responseHeader);
			}
			return dictionary;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern UnityWebRequestError SetUploadHandler(UploadHandler uh);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern UnityWebRequestError SetDownloadHandler(DownloadHandler dh);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern UnityWebRequestError SetCertificateHandler(CertificateHandler ch);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern int GetTimeoutMsec();

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern UnityWebRequestError SetTimeoutMsec(int timeout);

		public static UnityWebRequest Get(string uri)
		{
			return new UnityWebRequest(uri, "GET", new DownloadHandlerBuffer(), null);
		}

		public static UnityWebRequest Get(Uri uri)
		{
			return new UnityWebRequest(uri, "GET", new DownloadHandlerBuffer(), null);
		}

		public static UnityWebRequest Delete(string uri)
		{
			return new UnityWebRequest(uri, "DELETE");
		}

		public static UnityWebRequest Delete(Uri uri)
		{
			return new UnityWebRequest(uri, "DELETE");
		}

		public static UnityWebRequest Head(string uri)
		{
			return new UnityWebRequest(uri, "HEAD");
		}

		public static UnityWebRequest Head(Uri uri)
		{
			return new UnityWebRequest(uri, "HEAD");
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		[Obsolete("UnityWebRequest.GetTexture is obsolete. Use UnityWebRequestTexture.GetTexture instead (UnityUpgradable) -> [UnityEngine] UnityWebRequestTexture.GetTexture(*)", true)]
		public static UnityWebRequest GetTexture(string uri)
		{
			throw new NotSupportedException("UnityWebRequest.GetTexture is obsolete. Use UnityWebRequestTexture.GetTexture instead.");
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		[Obsolete("UnityWebRequest.GetTexture is obsolete. Use UnityWebRequestTexture.GetTexture instead (UnityUpgradable) -> [UnityEngine] UnityWebRequestTexture.GetTexture(*)", true)]
		public static UnityWebRequest GetTexture(string uri, bool nonReadable)
		{
			throw new NotSupportedException("UnityWebRequest.GetTexture is obsolete. Use UnityWebRequestTexture.GetTexture instead.");
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		[Obsolete("UnityWebRequest.GetAudioClip is obsolete. Use UnityWebRequestMultimedia.GetAudioClip instead (UnityUpgradable) -> [UnityEngine] UnityWebRequestMultimedia.GetAudioClip(*)", true)]
		public static UnityWebRequest GetAudioClip(string uri, AudioType audioType)
		{
			return null;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		[Obsolete("UnityWebRequest.GetAssetBundle is obsolete. Use UnityWebRequestAssetBundle.GetAssetBundle instead (UnityUpgradable) -> [UnityEngine] UnityWebRequestAssetBundle.GetAssetBundle(*)", true)]
		public static UnityWebRequest GetAssetBundle(string uri)
		{
			return null;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		[Obsolete("UnityWebRequest.GetAssetBundle is obsolete. Use UnityWebRequestAssetBundle.GetAssetBundle instead (UnityUpgradable) -> [UnityEngine] UnityWebRequestAssetBundle.GetAssetBundle(*)", true)]
		public static UnityWebRequest GetAssetBundle(string uri, uint crc)
		{
			return null;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		[Obsolete("UnityWebRequest.GetAssetBundle is obsolete. Use UnityWebRequestAssetBundle.GetAssetBundle instead (UnityUpgradable) -> [UnityEngine] UnityWebRequestAssetBundle.GetAssetBundle(*)", true)]
		public static UnityWebRequest GetAssetBundle(string uri, uint version, uint crc)
		{
			return null;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		[Obsolete("UnityWebRequest.GetAssetBundle is obsolete. Use UnityWebRequestAssetBundle.GetAssetBundle instead (UnityUpgradable) -> [UnityEngine] UnityWebRequestAssetBundle.GetAssetBundle(*)", true)]
		public static UnityWebRequest GetAssetBundle(string uri, Hash128 hash, uint crc)
		{
			return null;
		}

		[Obsolete("UnityWebRequest.GetAssetBundle is obsolete. Use UnityWebRequestAssetBundle.GetAssetBundle instead (UnityUpgradable) -> [UnityEngine] UnityWebRequestAssetBundle.GetAssetBundle(*)", true)]
		[EditorBrowsable(EditorBrowsableState.Never)]
		public static UnityWebRequest GetAssetBundle(string uri, CachedAssetBundle cachedAssetBundle, uint crc)
		{
			return null;
		}

		public static UnityWebRequest Put(string uri, byte[] bodyData)
		{
			return new UnityWebRequest(uri, "PUT", new DownloadHandlerBuffer(), new UploadHandlerRaw(bodyData));
		}

		public static UnityWebRequest Put(Uri uri, byte[] bodyData)
		{
			return new UnityWebRequest(uri, "PUT", new DownloadHandlerBuffer(), new UploadHandlerRaw(bodyData));
		}

		public static UnityWebRequest Put(string uri, string bodyData)
		{
			return new UnityWebRequest(uri, "PUT", new DownloadHandlerBuffer(), new UploadHandlerRaw(Encoding.UTF8.GetBytes(bodyData)));
		}

		public static UnityWebRequest Put(Uri uri, string bodyData)
		{
			return new UnityWebRequest(uri, "PUT", new DownloadHandlerBuffer(), new UploadHandlerRaw(Encoding.UTF8.GetBytes(bodyData)));
		}

		public static UnityWebRequest Post(string uri, string postData)
		{
			UnityWebRequest unityWebRequest = new UnityWebRequest(uri, "POST");
			SetupPost(unityWebRequest, postData);
			return unityWebRequest;
		}

		public static UnityWebRequest Post(Uri uri, string postData)
		{
			UnityWebRequest unityWebRequest = new UnityWebRequest(uri, "POST");
			SetupPost(unityWebRequest, postData);
			return unityWebRequest;
		}

		private static void SetupPost(UnityWebRequest request, string postData)
		{
			byte[] data = null;
			if (!string.IsNullOrEmpty(postData))
			{
				string s = WWWTranscoder.DataEncode(postData, Encoding.UTF8);
				data = Encoding.UTF8.GetBytes(s);
			}
			request.uploadHandler = new UploadHandlerRaw(data);
			request.uploadHandler.contentType = "application/x-www-form-urlencoded";
			request.downloadHandler = new DownloadHandlerBuffer();
		}

		public static UnityWebRequest Post(string uri, WWWForm formData)
		{
			UnityWebRequest unityWebRequest = new UnityWebRequest(uri, "POST");
			SetupPost(unityWebRequest, formData);
			return unityWebRequest;
		}

		public static UnityWebRequest Post(Uri uri, WWWForm formData)
		{
			UnityWebRequest unityWebRequest = new UnityWebRequest(uri, "POST");
			SetupPost(unityWebRequest, formData);
			return unityWebRequest;
		}

		private static void SetupPost(UnityWebRequest request, WWWForm formData)
		{
			byte[] array = null;
			if (formData != null)
			{
				array = formData.data;
				if (array.Length == 0)
				{
					array = null;
				}
			}
			request.uploadHandler = new UploadHandlerRaw(array);
			request.downloadHandler = new DownloadHandlerBuffer();
			if (formData == null)
			{
				return;
			}
			Dictionary<string, string> headers = formData.headers;
			foreach (KeyValuePair<string, string> item in headers)
			{
				request.SetRequestHeader(item.Key, item.Value);
			}
		}

		public static UnityWebRequest Post(string uri, List<IMultipartFormSection> multipartFormSections)
		{
			byte[] boundary = GenerateBoundary();
			return Post(uri, multipartFormSections, boundary);
		}

		public static UnityWebRequest Post(Uri uri, List<IMultipartFormSection> multipartFormSections)
		{
			byte[] boundary = GenerateBoundary();
			return Post(uri, multipartFormSections, boundary);
		}

		public static UnityWebRequest Post(string uri, List<IMultipartFormSection> multipartFormSections, byte[] boundary)
		{
			UnityWebRequest unityWebRequest = new UnityWebRequest(uri, "POST");
			SetupPost(unityWebRequest, multipartFormSections, boundary);
			return unityWebRequest;
		}

		public static UnityWebRequest Post(Uri uri, List<IMultipartFormSection> multipartFormSections, byte[] boundary)
		{
			UnityWebRequest unityWebRequest = new UnityWebRequest(uri, "POST");
			SetupPost(unityWebRequest, multipartFormSections, boundary);
			return unityWebRequest;
		}

		private static void SetupPost(UnityWebRequest request, List<IMultipartFormSection> multipartFormSections, byte[] boundary)
		{
			byte[] data = null;
			if (multipartFormSections != null && multipartFormSections.Count != 0)
			{
				data = SerializeFormSections(multipartFormSections, boundary);
			}
			UploadHandler uploadHandler = new UploadHandlerRaw(data);
			uploadHandler.contentType = "multipart/form-data; boundary=" + Encoding.UTF8.GetString(boundary, 0, boundary.Length);
			request.uploadHandler = uploadHandler;
			request.downloadHandler = new DownloadHandlerBuffer();
		}

		public static UnityWebRequest Post(string uri, Dictionary<string, string> formFields)
		{
			UnityWebRequest unityWebRequest = new UnityWebRequest(uri, "POST");
			SetupPost(unityWebRequest, formFields);
			return unityWebRequest;
		}

		public static UnityWebRequest Post(Uri uri, Dictionary<string, string> formFields)
		{
			UnityWebRequest unityWebRequest = new UnityWebRequest(uri, "POST");
			SetupPost(unityWebRequest, formFields);
			return unityWebRequest;
		}

		private static void SetupPost(UnityWebRequest request, Dictionary<string, string> formFields)
		{
			byte[] data = null;
			if (formFields != null && formFields.Count != 0)
			{
				data = SerializeSimpleForm(formFields);
			}
			UploadHandler uploadHandler = new UploadHandlerRaw(data);
			uploadHandler.contentType = "application/x-www-form-urlencoded";
			request.uploadHandler = uploadHandler;
			request.downloadHandler = new DownloadHandlerBuffer();
		}

		public static string EscapeURL(string s)
		{
			return EscapeURL(s, Encoding.UTF8);
		}

		public static string EscapeURL(string s, Encoding e)
		{
			if (s == null)
			{
				return null;
			}
			if (s == "")
			{
				return "";
			}
			if (e == null)
			{
				return null;
			}
			byte[] bytes = e.GetBytes(s);
			byte[] bytes2 = WWWTranscoder.URLEncode(bytes);
			return e.GetString(bytes2);
		}

		public static string UnEscapeURL(string s)
		{
			return UnEscapeURL(s, Encoding.UTF8);
		}

		public static string UnEscapeURL(string s, Encoding e)
		{
			if (s == null)
			{
				return null;
			}
			if (s.IndexOf('%') == -1 && s.IndexOf('+') == -1)
			{
				return s;
			}
			byte[] bytes = e.GetBytes(s);
			byte[] bytes2 = WWWTranscoder.URLDecode(bytes);
			return e.GetString(bytes2);
		}

		public static byte[] SerializeFormSections(List<IMultipartFormSection> multipartFormSections, byte[] boundary)
		{
			if (multipartFormSections == null || multipartFormSections.Count == 0)
			{
				return null;
			}
			byte[] bytes = Encoding.UTF8.GetBytes("\r\n");
			byte[] bytes2 = WWWForm.DefaultEncoding.GetBytes("--");
			int num = 0;
			foreach (IMultipartFormSection multipartFormSection in multipartFormSections)
			{
				num += 64 + multipartFormSection.sectionData.Length;
			}
			List<byte> list = new List<byte>(num);
			foreach (IMultipartFormSection multipartFormSection2 in multipartFormSections)
			{
				string text = "form-data";
				string sectionName = multipartFormSection2.sectionName;
				string fileName = multipartFormSection2.fileName;
				string text2 = "Content-Disposition: " + text;
				if (!string.IsNullOrEmpty(sectionName))
				{
					text2 = text2 + "; name=\"" + sectionName + "\"";
				}
				if (!string.IsNullOrEmpty(fileName))
				{
					text2 = text2 + "; filename=\"" + fileName + "\"";
				}
				text2 += "\r\n";
				string contentType = multipartFormSection2.contentType;
				if (!string.IsNullOrEmpty(contentType))
				{
					text2 = text2 + "Content-Type: " + contentType + "\r\n";
				}
				list.AddRange(bytes);
				list.AddRange(bytes2);
				list.AddRange(boundary);
				list.AddRange(bytes);
				list.AddRange(Encoding.UTF8.GetBytes(text2));
				list.AddRange(bytes);
				list.AddRange(multipartFormSection2.sectionData);
			}
			list.AddRange(bytes);
			list.AddRange(bytes2);
			list.AddRange(boundary);
			list.AddRange(bytes2);
			list.AddRange(bytes);
			return list.ToArray();
		}

		public static byte[] GenerateBoundary()
		{
			byte[] array = new byte[40];
			for (int i = 0; i < 40; i++)
			{
				int num = Random.Range(48, 110);
				if (num > 57)
				{
					num += 7;
				}
				if (num > 90)
				{
					num += 6;
				}
				array[i] = (byte)num;
			}
			return array;
		}

		public static byte[] SerializeSimpleForm(Dictionary<string, string> formFields)
		{
			string text = "";
			foreach (KeyValuePair<string, string> formField in formFields)
			{
				if (text.Length > 0)
				{
					text += "&";
				}
				text = text + WWWTranscoder.DataEncode(formField.Key) + "=" + WWWTranscoder.DataEncode(formField.Value);
			}
			return Encoding.UTF8.GetBytes(text);
		}
	}
}
namespace UnityEngine
{
	public class WWWForm
	{
		private List<byte[]> formData;

		private List<string> fieldNames;

		private List<string> fileNames;

		private List<string> types;

		private byte[] boundary;

		private bool containsFiles = false;

		internal static Encoding DefaultEncoding => Encoding.ASCII;

		public Dictionary<string, string> headers
		{
			get
			{
				Dictionary<string, string> dictionary = new Dictionary<string, string>();
				if (containsFiles)
				{
					dictionary["Content-Type"] = "multipart/form-data; boundary=\"" + Encoding.UTF8.GetString(boundary, 0, boundary.Length) + "\"";
				}
				else
				{
					dictionary["Content-Type"] = "application/x-www-form-urlencoded";
				}
				return dictionary;
			}
		}

		public byte[] data
		{
			get
			{
				if (containsFiles)
				{
					byte[] bytes = DefaultEncoding.GetBytes("--");
					byte[] bytes2 = DefaultEncoding.GetBytes("\r\n");
					byte[] bytes3 = DefaultEncoding.GetBytes("Content-Type: ");
					byte[] bytes4 = DefaultEncoding.GetBytes("Content-disposition: form-data; name=\"");
					byte[] bytes5 = DefaultEncoding.GetBytes("\"");
					byte[] bytes6 = DefaultEncoding.GetBytes("; filename=\"");
					using MemoryStream memoryStream = new MemoryStream(1024);
					for (int i = 0; i < formData.Count; i++)
					{
						memoryStream.Write(bytes2, 0, bytes2.Length);
						memoryStream.Write(bytes, 0, bytes.Length);
						memoryStream.Write(boundary, 0, boundary.Length);
						memoryStream.Write(bytes2, 0, bytes2.Length);
						memoryStream.Write(bytes3, 0, bytes3.Length);
						byte[] bytes7 = Encoding.UTF8.GetBytes(types[i]);
						memoryStream.Write(bytes7, 0, bytes7.Length);
						memoryStream.Write(bytes2, 0, bytes2.Length);
						memoryStream.Write(bytes4, 0, bytes4.Length);
						string headerName = Encoding.UTF8.HeaderName;
						string text = fieldNames[i];
						if (!WWWTranscoder.SevenBitClean(text, Encoding.UTF8) || text.IndexOf("=?") > -1)
						{
							text = "=?" + headerName + "?Q?" + WWWTranscoder.QPEncode(text, Encoding.UTF8) + "?=";
						}
						byte[] bytes8 = Encoding.UTF8.GetBytes(text);
						memoryStream.Write(bytes8, 0, bytes8.Length);
						memoryStream.Write(bytes5, 0, bytes5.Length);
						if (fileNames[i] != null)
						{
							string text2 = fileNames[i];
							if (!WWWTranscoder.SevenBitClean(text2, Encoding.UTF8) || text2.IndexOf("=?") > -1)
							{
								text2 = "=?" + headerName + "?Q?" + WWWTranscoder.QPEncode(text2, Encoding.UTF8) + "?=";
							}
							byte[] bytes9 = Encoding.UTF8.GetBytes(text2);
							memoryStream.Write(bytes6, 0, bytes6.Length);
							memoryStream.Write(bytes9, 0, bytes9.Length);
							memoryStream.Write(bytes5, 0, bytes5.Length);
						}
						memoryStream.Write(bytes2, 0, bytes2.Length);
						memoryStream.Write(bytes2, 0, bytes2.Length);
						byte[] array = formData[i];
						memoryStream.Write(array, 0, array.Length);
					}
					memoryStream.Write(bytes2, 0, bytes2.Length);
					memoryStream.Write(bytes, 0, bytes.Length);
					memoryStream.Write(boundary, 0, boundary.Length);
					memoryStream.Write(bytes, 0, bytes.Length);
					memoryStream.Write(bytes2, 0, bytes2.Length);
					return memoryStream.ToArray();
				}
				byte[] bytes10 = DefaultEncoding.GetBytes("&");
				byte[] bytes11 = DefaultEncoding.GetBytes("=");
				using MemoryStream memoryStream2 = new MemoryStream(1024);
				for (int j = 0; j < formData.Count; j++)
				{
					byte[] array2 = WWWTranscoder.DataEncode(Encoding.UTF8.GetBytes(fieldNames[j]));
					byte[] toEncode = formData[j];
					byte[] array3 = WWWTranscoder.DataEncode(toEncode);
					if (j > 0)
					{
						memoryStream2.Write(bytes10, 0, bytes10.Length);
					}
					memoryStream2.Write(array2, 0, array2.Length);
					memoryStream2.Write(bytes11, 0, bytes11.Length);
					memoryStream2.Write(array3, 0, array3.Length);
				}
				return memoryStream2.ToArray();
			}
		}

		public WWWForm()
		{
			formData = new List<byte[]>();
			fieldNames = new List<string>();
			fileNames = new List<string>();
			types = new List<string>();
			boundary = new byte[40];
			for (int i = 0; i < 40; i++)
			{
				int num = Random.Range(48, 110);
				if (num > 57)
				{
					num += 7;
				}
				if (num > 90)
				{
					num += 6;
				}
				boundary[i] = (byte)num;
			}
		}

		public void AddField(string fieldName, string value)
		{
			AddField(fieldName, value, Encoding.UTF8);
		}

		public void AddField(string fieldName, string value, Encoding e)
		{
			fieldNames.Add(fieldName);
			fileNames.Add(null);
			formData.Add(e.GetBytes(value));
			types.Add("text/plain; charset=\"" + e.WebName + "\"");
		}

		public void AddField(string fieldName, int i)
		{
			AddField(fieldName, i.ToString());
		}

		[ExcludeFromDocs]
		public void AddBinaryData(string fieldName, byte[] contents)
		{
			AddBinaryData(fieldName, contents, null, null);
		}

		[ExcludeFromDocs]
		public void AddBinaryData(string fieldName, byte[] contents, string fileName)
		{
			AddBinaryData(fieldName, contents, fileName, null);
		}

		public void AddBinaryData(string fieldName, byte[] contents, [DefaultValue("null")] string fileName, [DefaultValue("null")] string mimeType)
		{
			containsFiles = true;
			bool flag = contents.Length > 8 && contents[0] == 137 && contents[1] == 80 && contents[2] == 78 && contents[3] == 71 && contents[4] == 13 && contents[5] == 10 && contents[6] == 26 && contents[7] == 10;
			if (fileName == null)
			{
				fileName = fieldName + ((!flag) ? ".dat" : ".png");
			}
			if (mimeType == null)
			{
				mimeType = ((!flag) ? "application/octet-stream" : "image/png");
			}
			fieldNames.Add(fieldName);
			fileNames.Add(fileName);
			formData.Add(contents);
			types.Add(mimeType);
		}
	}
	[VisibleToOtherModules(new string[] { "UnityEngine.UnityWebRequestWWWModule" })]
	internal class WWWTranscoder
	{
		private static byte[] ucHexChars = WWWForm.DefaultEncoding.GetBytes("0123456789ABCDEF");

		private static byte[] lcHexChars = WWWForm.DefaultEncoding.GetBytes("0123456789abcdef");

		private static byte urlEscapeChar = 37;

		private static byte[] urlSpace = new byte[1] { 43 };

		private static byte[] dataSpace = WWWForm.DefaultEncoding.GetBytes("%20");

		private static byte[] urlForbidden = WWWForm.DefaultEncoding.GetBytes("@&;:<>=?\"'/\\!#%+$,{}|^[]`");

		private static byte qpEscapeChar = 61;

		private static byte[] qpSpace = new byte[1] { 95 };

		private static byte[] qpForbidden = WWWForm.DefaultEncoding.GetBytes("&;=?\"'%+_");

		private static byte Hex2Byte(byte[] b, int offset)
		{
			byte b2 = 0;
			for (int i = offset; i < offset + 2; i++)
			{
				b2 *= 16;
				int num = b[i];
				if (num >= 48 && num <= 57)
				{
					num -= 48;
				}
				else if (num >= 65 && num <= 75)
				{
					num -= 55;
				}
				else if (num >= 97 && num <= 102)
				{
					num -= 87;
				}
				if (num > 15)
				{
					return 63;
				}
				b2 += (byte)num;
			}
			return b2;
		}

		private static byte[] Byte2Hex(byte b, byte[] hexChars)
		{
			return new byte[2]
			{
				hexChars[b >> 4],
				hexChars[b & 0xF]
			};
		}

		public static string URLEncode(string toEncode)
		{
			return URLEncode(toEncode, Encoding.UTF8);
		}

		public static string URLEncode(string toEncode, Encoding e)
		{
			byte[] array = Encode(e.GetBytes(toEncode), urlEscapeChar, urlSpace, urlForbidden, uppercase: false);
			return WWWForm.DefaultEncoding.GetString(array, 0, array.Length);
		}

		public static byte[] URLEncode(byte[] toEncode)
		{
			return Encode(toEncode, urlEscapeChar, urlSpace, urlForbidden, uppercase: false);
		}

		public static string DataEncode(string toEncode)
		{
			return DataEncode(toEncode, Encoding.UTF8);
		}

		public static string DataEncode(string toEncode, Encoding e)
		{
			byte[] array = Encode(e.GetBytes(toEncode), urlEscapeChar, dataSpace, urlForbidden, uppercase: false);
			return WWWForm.DefaultEncoding.GetString(array, 0, array.Length);
		}

		public static byte[] DataEncode(byte[] toEncode)
		{
			return Encode(toEncode, urlEscapeChar, dataSpace, urlForbidden, uppercase: false);
		}

		public static string QPEncode(string toEncode)
		{
			return QPEncode(toEncode, Encoding.UTF8);
		}

		public static string QPEncode(string toEncode, Encoding e)
		{
			byte[] array = Encode(e.GetBytes(toEncode), qpEscapeChar, qpSpace, qpForbidden, uppercase: true);
			return WWWForm.DefaultEncoding.GetString(array, 0, array.Length);
		}

		public static byte[] QPEncode(byte[] toEncode)
		{
			return Encode(toEncode, qpEscapeChar, qpSpace, qpForbidden, uppercase: true);
		}

		public static byte[] Encode(byte[] input, byte escapeChar, byte[] space, byte[] forbidden, bool uppercase)
		{
			using MemoryStream memoryStream = new MemoryStream(input.Length * 2);
			for (int i = 0; i < input.Length; i++)
			{
				if (input[i] == 32)
				{
					memoryStream.Write(space, 0, space.Length);
				}
				else if (input[i] < 32 || input[i] > 126 || ByteArrayContains(forbidden, input[i]))
				{
					memoryStream.WriteByte(escapeChar);
					memoryStream.Write(Byte2Hex(input[i], (!uppercase) ? lcHexChars : ucHexChars), 0, 2);
				}
				else
				{
					memoryStream.WriteByte(input[i]);
				}
			}
			return memoryStream.ToArray();
		}

		private static bool ByteArrayContains(byte[] array, byte b)
		{
			int num = array.Length;
			for (int i = 0; i < num; i++)
			{
				if (array[i] == b)
				{
					return true;
				}
			}
			return false;
		}

		public static string URLDecode(string toEncode)
		{
			return URLDecode(toEncode, Encoding.UTF8);
		}

		public static string URLDecode(string toEncode, Encoding e)
		{
			byte[] array = Decode(WWWForm.DefaultEncoding.GetBytes(toEncode), urlEscapeChar, urlSpace);
			return e.GetString(array, 0, array.Length);
		}

		public static byte[] URLDecode(byte[] toEncode)
		{
			return Decode(toEncode, urlEscapeChar, urlSpace);
		}

		public static string DataDecode(string toDecode)
		{
			return DataDecode(toDecode, Encoding.UTF8);
		}

		public static string DataDecode(string toDecode, Encoding e)
		{
			byte[] array = Decode(WWWForm.DefaultEncoding.GetBytes(toDecode), urlEscapeChar, dataSpace);
			return e.GetString(array, 0, array.Length);
		}

		public static byte[] DataDecode(byte[] toDecode)
		{
			return Decode(toDecode, urlEscapeChar, dataSpace);
		}

		public static string QPDecode(string toEncode)
		{
			return QPDecode(toEncode, Encoding.UTF8);
		}

		public static string QPDecode(string toEncode, Encoding e)
		{
			byte[] array = Decode(WWWForm.DefaultEncoding.GetBytes(toEncode), qpEscapeChar, qpSpace);
			return e.GetString(array, 0, array.Length);
		}

		public static byte[] QPDecode(byte[] toEncode)
		{
			return Decode(toEncode, qpEscapeChar, qpSpace);
		}

		private static bool ByteSubArrayEquals(byte[] array, int index, byte[] comperand)
		{
			if (array.Length - index < comperand.Length)
			{
				return false;
			}
			for (int i = 0; i < comperand.Length; i++)
			{
				if (array[index + i] != comperand[i])
				{
					return false;
				}
			}
			return true;
		}

		public static byte[] Decode(byte[] input, byte escapeChar, byte[] space)
		{
			using MemoryStream memoryStream = new MemoryStream(input.Length);
			for (int i = 0; i < input.Length; i++)
			{
				if (ByteSubArrayEquals(input, i, space))
				{
					i += space.Length - 1;
					memoryStream.WriteByte(32);
				}
				else if (input[i] == escapeChar && i + 2 < input.Length)
				{
					i++;
					memoryStream.WriteByte(Hex2Byte(input, i++));
				}
				else
				{
					memoryStream.WriteByte(input[i]);
				}
			}
			return memoryStream.ToArray();
		}

		public static bool SevenBitClean(string s)
		{
			return SevenBitClean(s, Encoding.UTF8);
		}

		public static bool SevenBitClean(string s, Encoding e)
		{
			return SevenBitClean(e.GetBytes(s));
		}

		public static bool SevenBitClean(byte[] input)
		{
			for (int i = 0; i < input.Length; i++)
			{
				if (input[i] < 32 || input[i] > 126)
				{
					return false;
				}
			}
			return true;
		}
	}
}
namespace UnityEngineInternal
{
	internal static class WebRequestUtils
	{
		private static Regex domainRegex = new Regex("^\\s*\\w+(?:\\.\\w+)+(\\/.*)?$");

		[RequiredByNativeCode]
		internal static string RedirectTo(string baseUri, string redirectUri)
		{
			Uri uri = ((redirectUri[0] != '/') ? new Uri(redirectUri, UriKind.RelativeOrAbsolute) : new Uri(redirectUri, UriKind.Relative));
			if (uri.IsAbsoluteUri)
			{
				return uri.AbsoluteUri;
			}
			Uri baseUri2 = new Uri(baseUri, UriKind.Absolute);
			Uri uri2 = new Uri(baseUri2, uri);
			return uri2.AbsoluteUri;
		}

		internal static string MakeInitialUrl(string targetUrl, string localUrl)
		{
			if (string.IsNullOrEmpty(targetUrl))
			{
				return "";
			}
			bool prependProtocol = false;
			Uri uri = new Uri(localUrl);
			Uri uri2 = null;
			if (targetUrl[0] == '/')
			{
				uri2 = new Uri(uri, targetUrl);
				prependProtocol = true;
			}
			if (uri2 == null && domainRegex.IsMatch(targetUrl))
			{
				targetUrl = uri.Scheme + "://" + targetUrl;
				prependProtocol = true;
			}
			FormatException ex = null;
			try
			{
				if (uri2 == null && targetUrl[0] != '.')
				{
					uri2 = new Uri(targetUrl);
				}
			}
			catch (FormatException ex2)
			{
				ex = ex2;
			}
			if (uri2 == null)
			{
				try
				{
					uri2 = new Uri(uri, targetUrl);
					prependProtocol = true;
				}
				catch (FormatException)
				{
					throw ex;
				}
			}
			return MakeUriString(uri2, targetUrl, prependProtocol);
		}

		internal static string MakeUriString(Uri targetUri, string targetUrl, bool prependProtocol)
		{
			if (targetUri.IsFile)
			{
				if (!targetUri.IsLoopback)
				{
					return targetUri.OriginalString;
				}
				string text = targetUri.AbsolutePath;
				if (text.Contains("%"))
				{
					text = URLDecode(text);
				}
				if (text.Length > 0 && text[0] != '/')
				{
					text = '/' + text;
				}
				return "file://" + text;
			}
			string scheme = targetUri.Scheme;
			if (!prependProtocol && targetUrl.Length >= scheme.Length + 2 && targetUrl[scheme.Length + 1] != '/')
			{
				StringBuilder stringBuilder = new StringBuilder(scheme, targetUrl.Length);
				stringBuilder.Append(':');
				if (scheme == "jar")
				{
					string text2 = targetUri.AbsolutePath;
					if (text2.Contains("%"))
					{
						text2 = URLDecode(text2);
					}
					if (text2.StartsWith("file:/") && text2.Length > 6 && text2[6] != '/')
					{
						stringBuilder.Append("file://");
						stringBuilder.Append(text2.Substring(5));
					}
					else
					{
						stringBuilder.Append(text2);
					}
					return stringBuilder.ToString();
				}
				stringBuilder.Append(targetUri.PathAndQuery);
				stringBuilder.Append(targetUri.Fragment);
				return stringBuilder.ToString();
			}
			if (targetUrl.Contains("%"))
			{
				return targetUri.OriginalString;
			}
			return targetUri.AbsoluteUri;
		}

		private static string URLDecode(string encoded)
		{
			byte[] bytes = Encoding.UTF8.GetBytes(encoded);
			byte[] bytes2 = WWWTranscoder.URLDecode(bytes);
			return Encoding.UTF8.GetString(bytes2);
		}
	}
}
namespace UnityEngine.Networking
{
	[StructLayout(LayoutKind.Sequential)]
	[NativeHeader("Modules/UnityWebRequest/Public/CertificateHandler/CertificateHandlerScript.h")]
	public class CertificateHandler : IDisposable
	{
		[NonSerialized]
		internal IntPtr m_Ptr;

		protected CertificateHandler()
		{
			m_Ptr = Create(this);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern IntPtr Create(CertificateHandler obj);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsThreadSafe = true)]
		private extern void Release();

		~CertificateHandler()
		{
			Dispose();
		}

		protected virtual bool ValidateCertificate(byte[] certificateData)
		{
			return false;
		}

		[RequiredByNativeCode]
		internal bool ValidateCertificateNative(byte[] certificateData)
		{
			return ValidateCertificate(certificateData);
		}

		public void Dispose()
		{
			if (m_Ptr != IntPtr.Zero)
			{
				Release();
				m_Ptr = IntPtr.Zero;
			}
		}
	}
	[StructLayout(LayoutKind.Sequential)]
	[NativeHeader("Modules/UnityWebRequest/Public/DownloadHandler/DownloadHandler.h")]
	public class DownloadHandler : IDisposable
	{
		[NonSerialized]
		[VisibleToOtherModules]
		internal IntPtr m_Ptr;

		public bool isDone => IsDone();

		public byte[] data => GetData();

		public string text => GetText();

		[VisibleToOtherModules]
		internal DownloadHandler()
		{
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsThreadSafe = true)]
		private extern void Release();

		~DownloadHandler()
		{
			Dispose();
		}

		public void Dispose()
		{
			if (m_Ptr != IntPtr.Zero)
			{
				Release();
				m_Ptr = IntPtr.Zero;
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern bool IsDone();

		protected virtual byte[] GetData()
		{
			return null;
		}

		protected virtual string GetText()
		{
			byte[] array = GetData();
			if (array != null && array.Length > 0)
			{
				return GetTextEncoder().GetString(array, 0, array.Length);
			}
			return "";
		}

		private Encoding GetTextEncoder()
		{
			string contentType = GetContentType();
			if (!string.IsNullOrEmpty(contentType))
			{
				int num = contentType.IndexOf("charset", StringComparison.OrdinalIgnoreCase);
				if (num > -1)
				{
					int num2 = contentType.IndexOf('=', num);
					if (num2 > -1)
					{
						string text = contentType.Substring(num2 + 1).Trim().Trim('\'', '"')
							.Trim();
						int num3 = text.IndexOf(';');
						if (num3 > -1)
						{
							text = text.Substring(0, num3);
						}
						try
						{
							return Encoding.GetEncoding(text);
						}
						catch (ArgumentException ex)
						{
							Debug.LogWarning((object)$"Unsupported encoding '{text}': {ex.Message}");
						}
					}
				}
			}
			return Encoding.UTF8;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern string GetContentType();

		[UsedByNativeCode]
		protected virtual bool ReceiveData(byte[] data, int dataLength)
		{
			return true;
		}

		[UsedByNativeCode]
		protected virtual void ReceiveContentLengthHeader(ulong contentLength)
		{
			ReceiveContentLength((int)contentLength);
		}

		[Obsolete("Use ReceiveContentLengthHeader")]
		protected virtual void ReceiveContentLength(int contentLength)
		{
		}

		[UsedByNativeCode]
		protected virtual void CompleteContent()
		{
		}

		[UsedByNativeCode]
		protected virtual float GetProgress()
		{
			return 0f;
		}

		protected static T GetCheckedDownloader<T>(UnityWebRequest www) where T : DownloadHandler
		{
			if (www == null)
			{
				throw new NullReferenceException("Cannot get content from a null UnityWebRequest object");
			}
			if (!www.isDone)
			{
				throw new InvalidOperationException("Cannot get content from an unfinished UnityWebRequest object");
			}
			if (www.isNetworkError)
			{
				throw new InvalidOperationException(www.error);
			}
			return (T)www.downloadHandler;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[VisibleToOtherModules]
		[NativeThrows]
		internal static extern byte[] InternalGetByteArray(DownloadHandler dh);
	}
	[StructLayout(LayoutKind.Sequential)]
	[NativeHeader("Modules/UnityWebRequest/Public/DownloadHandler/DownloadHandlerBuffer.h")]
	public sealed class DownloadHandlerBuffer : DownloadHandler
	{
		public DownloadHandlerBuffer()
		{
			InternalCreateBuffer();
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern IntPtr Create(DownloadHandlerBuffer obj);

		private void InternalCreateBuffer()
		{
			m_Ptr = Create(this);
		}

		protected override byte[] GetData()
		{
			return InternalGetData();
		}

		private byte[] InternalGetData()
		{
			return DownloadHandler.InternalGetByteArray(this);
		}

		public static string GetContent(UnityWebRequest www)
		{
			return DownloadHandler.GetCheckedDownloader<DownloadHandlerBuffer>(www).text;
		}
	}
	[StructLayout(LayoutKind.Sequential)]
	[NativeHeader("Modules/UnityWebRequest/Public/DownloadHandler/DownloadHandlerScript.h")]
	public class DownloadHandlerScript : DownloadHandler
	{
		public DownloadHandlerScript()
		{
			InternalCreateScript();
		}

		public DownloadHandlerScript(byte[] preallocatedBuffer)
		{
			if (preallocatedBuffer == null || preallocatedBuffer.Length < 1)
			{
				throw new ArgumentException("Cannot create a preallocated-buffer DownloadHandlerScript backed by a null or zero-length array");
			}
			InternalCreateScript(preallocatedBuffer);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern IntPtr Create(DownloadHandlerScript obj);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern IntPtr CreatePreallocated(DownloadHandlerScript obj, byte[] preallocatedBuffer);

		private void InternalCreateScript()
		{
			m_Ptr = Create(this);
		}

		private void InternalCreateScript(byte[] preallocatedBuffer)
		{
			m_Ptr = CreatePreallocated(this, preallocatedBuffer);
		}
	}
	[StructLayout(LayoutKind.Sequential)]
	[NativeHeader("Modules/UnityWebRequest/Public/DownloadHandler/DownloadHandlerVFS.h")]
	public sealed class DownloadHandlerFile : DownloadHandler
	{
		public extern bool removeFileOnAbort
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public DownloadHandlerFile(string path)
		{
			InternalCreateVFS(path, append: false);
		}

		public DownloadHandlerFile(string path, bool append)
		{
			InternalCreateVFS(path, append);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern IntPtr Create(DownloadHandlerFile obj, string path, bool append);

		private void InternalCreateVFS(string path, bool append)
		{
			string directoryName = Path.GetDirectoryName(path);
			if (!Directory.Exists(directoryName))
			{
				Directory.CreateDirectory(directoryName);
			}
			m_Ptr = Create(this, path, append);
		}

		protected override byte[] GetData()
		{
			throw new NotSupportedException("Raw data access is not supported");
		}

		protected override string GetText()
		{
			throw new NotSupportedException("String access is not supported");
		}
	}
	[StructLayout(LayoutKind.Sequential)]
	[NativeHeader("Modules/UnityWebRequest/Public/UploadHandler/UploadHandler.h")]
	public class UploadHandler : IDisposable
	{
		[NonSerialized]
		internal IntPtr m_Ptr;

		public byte[] data => GetData();

		public string contentType
		{
			get
			{
				return GetContentType();
			}
			set
			{
				SetContentType(value);
			}
		}

		public float progress => GetProgress();

		internal UploadHandler()
		{
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsThreadSafe = true)]
		private extern void Release();

		~UploadHandler()
		{
			Dispose();
		}

		public void Dispose()
		{
			if (m_Ptr != IntPtr.Zero)
			{
				Release();
				m_Ptr = IntPtr.Zero;
			}
		}

		internal virtual byte[] GetData()
		{
			return null;
		}

		internal virtual string GetContentType()
		{
			return "text/plain";
		}

		internal virtual void SetContentType(string newContentType)
		{
		}

		internal virtual float GetProgress()
		{
			return 0.5f;
		}
	}
	[StructLayout(LayoutKind.Sequential)]
	[NativeHeader("Modules/UnityWebRequest/Public/UploadHandler/UploadHandlerRaw.h")]
	public sealed class UploadHandlerRaw : UploadHandler
	{
		public UploadHandlerRaw(byte[] data)
		{
			if (data != null && data.Length == 0)
			{
				throw new ArgumentException("Cannot create a data handler without payload data");
			}
			m_Ptr = Create(this, data);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern IntPtr Create(UploadHandlerRaw self, byte[] data);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("GetContentType")]
		private extern string InternalGetContentType();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("SetContentType")]
		private extern void InternalSetContentType(string newContentType);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern byte[] InternalGetData();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("GetProgress")]
		private extern float InternalGetProgress();

		internal override string GetContentType()
		{
			return InternalGetContentType();
		}

		internal override void SetContentType(string newContentType)
		{
			InternalSetContentType(newContentType);
		}

		internal override byte[] GetData()
		{
			return InternalGetData();
		}

		internal override float GetProgress()
		{
			return InternalGetProgress();
		}
	}
	[StructLayout(LayoutKind.Sequential)]
	[NativeHeader("Modules/UnityWebRequest/Public/UploadHandler/UploadHandlerFile.h")]
	public sealed class UploadHandlerFile : UploadHandler
	{
		public UploadHandlerFile(string filePath)
		{
			m_Ptr = Create(this, filePath);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern IntPtr Create(UploadHandlerFile self, string filePath);
	}
}

Room Architect Tool_Data/Managed/UnityEngine.UnityWebRequestTextureModule.dll

Decompiled 3 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;

[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine.Networking;

public static class UnityWebRequestTexture
{
	public static UnityWebRequest GetTexture(string uri)
	{
		return GetTexture(uri, nonReadable: false);
	}

	public static UnityWebRequest GetTexture(Uri uri)
	{
		return GetTexture(uri, nonReadable: false);
	}

	public static UnityWebRequest GetTexture(string uri, bool nonReadable)
	{
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Expected O, but got Unknown
		return new UnityWebRequest(uri, "GET", (DownloadHandler)(object)new DownloadHandlerTexture(!nonReadable), (UploadHandler)null);
	}

	public static UnityWebRequest GetTexture(Uri uri, bool nonReadable)
	{
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Expected O, but got Unknown
		return new UnityWebRequest(uri, "GET", (DownloadHandler)(object)new DownloadHandlerTexture(!nonReadable), (UploadHandler)null);
	}
}
[StructLayout(LayoutKind.Sequential)]
[NativeHeader("Modules/UnityWebRequestTexture/Public/DownloadHandlerTexture.h")]
public sealed class DownloadHandlerTexture : DownloadHandler
{
	private Texture2D mTexture;

	private bool mHasTexture;

	private bool mNonReadable;

	public Texture2D texture => InternalGetTexture();

	public DownloadHandlerTexture()
	{
		InternalCreateTexture(readable: true);
	}

	public DownloadHandlerTexture(bool readable)
	{
		InternalCreateTexture(readable);
		mNonReadable = !readable;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern IntPtr Create(DownloadHandlerTexture obj, bool readable);

	private void InternalCreateTexture(bool readable)
	{
		base.m_Ptr = Create(this, readable);
	}

	protected override byte[] GetData()
	{
		return DownloadHandler.InternalGetByteArray((DownloadHandler)(object)this);
	}

	private Texture2D InternalGetTexture()
	{
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		//IL_002c: Expected O, but got Unknown
		if (mHasTexture)
		{
			if ((Object)(object)mTexture == (Object)null)
			{
				mTexture = new Texture2D(2, 2);
				ImageConversion.LoadImage(mTexture, ((DownloadHandler)this).GetData(), mNonReadable);
			}
		}
		else if ((Object)(object)mTexture == (Object)null)
		{
			mTexture = InternalGetTextureNative();
			mHasTexture = true;
		}
		return mTexture;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeThrows]
	private extern Texture2D InternalGetTextureNative();

	public static Texture2D GetContent(UnityWebRequest www)
	{
		return DownloadHandler.GetCheckedDownloader<DownloadHandlerTexture>(www).texture;
	}
}

Room Architect Tool_Data/Managed/UnityEngine.UnityWebRequestWWWModule.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using System.Text;
using UnityEngine;
using UnityEngine.Bindings;
using UnityEngine.Networking;

[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: UnityEngineModuleAssembly]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine.Networking
{
	[NativeHeader("Modules/UnityWebRequestAudio/Public/DownloadHandlerAudioClip.h")]
	[NativeHeader("Modules/UnityWebRequestAudio/Public/DownloadHandlerMovieTexture.h")]
	internal static class WebRequestWWW
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UnityWebRequestCreateAudioClip")]
		internal static extern AudioClip InternalCreateAudioClipUsingDH(DownloadHandler dh, string url, bool stream, bool compressed, AudioType audioType);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UnityWebRequestCreateMovieTexture")]
		[Obsolete("MovieTexture is deprecated. Use VideoPlayer instead.", false)]
		internal static extern MovieTexture InternalCreateMovieTextureUsingDH(DownloadHandler dh);
	}
}
namespace UnityEngine
{
	[Obsolete("Use UnityWebRequest, a fully featured replacement which is more efficient and has additional features")]
	public class WWW : CustomYieldInstruction, IDisposable
	{
		private UnityWebRequest _uwr;

		private AssetBundle _assetBundle;

		private Dictionary<string, string> _responseHeaders;

		public AssetBundle assetBundle
		{
			get
			{
				if ((Object)(object)_assetBundle == (Object)null)
				{
					if (!WaitUntilDoneIfPossible())
					{
						return null;
					}
					if (_uwr.isNetworkError)
					{
						return null;
					}
					DownloadHandler downloadHandler = _uwr.downloadHandler;
					DownloadHandlerAssetBundle val = (DownloadHandlerAssetBundle)(object)((downloadHandler is DownloadHandlerAssetBundle) ? downloadHandler : null);
					if (val != null)
					{
						_assetBundle = val.assetBundle;
					}
					else
					{
						byte[] array = bytes;
						if (array == null)
						{
							return null;
						}
						_assetBundle = AssetBundle.LoadFromMemory(array);
					}
				}
				return _assetBundle;
			}
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		[Obsolete("Obsolete msg (UnityUpgradable) -> * UnityEngine.WWW.GetAudioClip()", true)]
		public Object audioClip => null;

		public byte[] bytes
		{
			get
			{
				if (!WaitUntilDoneIfPossible())
				{
					return new byte[0];
				}
				if (_uwr.isNetworkError)
				{
					return new byte[0];
				}
				DownloadHandler downloadHandler = _uwr.downloadHandler;
				if (downloadHandler == null)
				{
					return new byte[0];
				}
				return downloadHandler.data;
			}
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		[Obsolete("Obsolete msg (UnityUpgradable) -> * UnityEngine.WWW.GetMovieTexture()", true)]
		public Object movie => null;

		[Obsolete("WWW.size is obsolete. Please use WWW.bytesDownloaded instead")]
		public int size => bytesDownloaded;

		public int bytesDownloaded => (int)_uwr.downloadedBytes;

		public string error
		{
			get
			{
				if (!_uwr.isDone)
				{
					return null;
				}
				if (_uwr.isNetworkError)
				{
					return _uwr.error;
				}
				if (_uwr.responseCode >= 400)
				{
					string hTTPStatusString = UnityWebRequest.GetHTTPStatusString(_uwr.responseCode);
					return $"{_uwr.responseCode} {hTTPStatusString}";
				}
				return null;
			}
		}

		public bool isDone => _uwr.isDone;

		public float progress
		{
			get
			{
				float num = _uwr.downloadProgress;
				if (num < 0f)
				{
					num = 0f;
				}
				return num;
			}
		}

		public Dictionary<string, string> responseHeaders
		{
			get
			{
				if (!isDone)
				{
					return new Dictionary<string, string>();
				}
				if (_responseHeaders == null)
				{
					_responseHeaders = _uwr.GetResponseHeaders();
					if (_responseHeaders != null)
					{
						string hTTPStatusString = UnityWebRequest.GetHTTPStatusString(_uwr.responseCode);
						_responseHeaders["STATUS"] = $"HTTP/1.1 {_uwr.responseCode} {hTTPStatusString}";
					}
					else
					{
						_responseHeaders = new Dictionary<string, string>();
					}
				}
				return _responseHeaders;
			}
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		[Obsolete("Please use WWW.text instead. (UnityUpgradable) -> text", true)]
		public string data => text;

		public string text
		{
			get
			{
				if (!WaitUntilDoneIfPossible())
				{
					return "";
				}
				if (_uwr.isNetworkError)
				{
					return "";
				}
				DownloadHandler downloadHandler = _uwr.downloadHandler;
				if (downloadHandler == null)
				{
					return "";
				}
				return downloadHandler.text;
			}
		}

		public Texture2D texture => CreateTextureFromDownloadedData(markNonReadable: false);

		public Texture2D textureNonReadable => CreateTextureFromDownloadedData(markNonReadable: true);

		public ThreadPriority threadPriority { get; set; }

		public float uploadProgress
		{
			get
			{
				float num = _uwr.uploadProgress;
				if (num < 0f)
				{
					num = 0f;
				}
				return num;
			}
		}

		public string url => _uwr.url;

		public override bool keepWaiting => _uwr != null && !_uwr.isDone;

		public WWW(string url)
		{
			_uwr = UnityWebRequest.Get(url);
			_uwr.SendWebRequest();
		}

		public WWW(string url, WWWForm form)
		{
			_uwr = UnityWebRequest.Post(url, form);
			_uwr.chunkedTransfer = false;
			_uwr.SendWebRequest();
		}

		public WWW(string url, byte[] postData)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Expected O, but got Unknown
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Expected O, but got Unknown
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Expected O, but got Unknown
			_uwr = new UnityWebRequest(url, "POST");
			_uwr.chunkedTransfer = false;
			UploadHandler val = (UploadHandler)new UploadHandlerRaw(postData);
			val.contentType = "application/x-www-form-urlencoded";
			_uwr.uploadHandler = val;
			_uwr.downloadHandler = (DownloadHandler)new DownloadHandlerBuffer();
			_uwr.SendWebRequest();
		}

		[Obsolete("This overload is deprecated. Use UnityEngine.WWW.WWW(string, byte[], System.Collections.Generic.Dictionary<string, string>) instead.")]
		public WWW(string url, byte[] postData, Hashtable headers)
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Expected O, but got Unknown
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Expected O, but got Unknown
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Expected O, but got Unknown
			string text = ((postData != null) ? "POST" : "GET");
			_uwr = new UnityWebRequest(url, text);
			_uwr.chunkedTransfer = false;
			UploadHandler val = (UploadHandler)new UploadHandlerRaw(postData);
			val.contentType = "application/x-www-form-urlencoded";
			_uwr.uploadHandler = val;
			_uwr.downloadHandler = (DownloadHandler)new DownloadHandlerBuffer();
			foreach (object key in headers.Keys)
			{
				_uwr.SetRequestHeader((string)key, (string)headers[key]);
			}
			_uwr.SendWebRequest();
		}

		public WWW(string url, byte[] postData, Dictionary<string, string> headers)
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Expected O, but got Unknown
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Expected O, but got Unknown
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Expected O, but got Unknown
			string text = ((postData != null) ? "POST" : "GET");
			_uwr = new UnityWebRequest(url, text);
			_uwr.chunkedTransfer = false;
			UploadHandler val = (UploadHandler)new UploadHandlerRaw(postData);
			val.contentType = "application/x-www-form-urlencoded";
			_uwr.uploadHandler = val;
			_uwr.downloadHandler = (DownloadHandler)new DownloadHandlerBuffer();
			foreach (KeyValuePair<string, string> header in headers)
			{
				_uwr.SetRequestHeader(header.Key, header.Value);
			}
			_uwr.SendWebRequest();
		}

		internal WWW(string url, string name, Hash128 hash, uint crc)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			_uwr = UnityWebRequestAssetBundle.GetAssetBundle(url, new CachedAssetBundle(name, hash), crc);
			_uwr.SendWebRequest();
		}

		public static string EscapeURL(string s)
		{
			return EscapeURL(s, Encoding.UTF8);
		}

		public static string EscapeURL(string s, Encoding e)
		{
			return UnityWebRequest.EscapeURL(s, e);
		}

		public static string UnEscapeURL(string s)
		{
			return UnEscapeURL(s, Encoding.UTF8);
		}

		public static string UnEscapeURL(string s, Encoding e)
		{
			return UnityWebRequest.UnEscapeURL(s, e);
		}

		public static WWW LoadFromCacheOrDownload(string url, int version)
		{
			return LoadFromCacheOrDownload(url, version, 0u);
		}

		public static WWW LoadFromCacheOrDownload(string url, int version, uint crc)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			Hash128 hash = default(Hash128);
			((Hash128)(ref hash))..ctor(0u, 0u, 0u, (uint)version);
			return LoadFromCacheOrDownload(url, hash, crc);
		}

		public static WWW LoadFromCacheOrDownload(string url, Hash128 hash)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			return LoadFromCacheOrDownload(url, hash, 0u);
		}

		public static WWW LoadFromCacheOrDownload(string url, Hash128 hash, uint crc)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			return new WWW(url, "", hash, crc);
		}

		public static WWW LoadFromCacheOrDownload(string url, CachedAssetBundle cachedBundle, uint crc = 0u)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			return new WWW(url, ((CachedAssetBundle)(ref cachedBundle)).name, ((CachedAssetBundle)(ref cachedBundle)).hash, crc);
		}

		private Texture2D CreateTextureFromDownloadedData(bool markNonReadable)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Expected O, but got Unknown
			if (!WaitUntilDoneIfPossible())
			{
				return new Texture2D(2, 2);
			}
			if (_uwr.isNetworkError)
			{
				return null;
			}
			DownloadHandler downloadHandler = _uwr.downloadHandler;
			if (downloadHandler == null)
			{
				return null;
			}
			Texture2D val = new Texture2D(2, 2);
			ImageConversion.LoadImage(val, downloadHandler.data, markNonReadable);
			return val;
		}

		public void LoadImageIntoTexture(Texture2D texture)
		{
			if (!WaitUntilDoneIfPossible())
			{
				return;
			}
			if (_uwr.isNetworkError)
			{
				Debug.LogError((object)"Cannot load image: download failed");
				return;
			}
			DownloadHandler downloadHandler = _uwr.downloadHandler;
			if (downloadHandler == null)
			{
				Debug.LogError((object)"Cannot load image: internal error");
			}
			else
			{
				ImageConversion.LoadImage(texture, downloadHandler.data, false);
			}
		}

		public void Dispose()
		{
			if (_uwr != null)
			{
				_uwr.Dispose();
				_uwr = null;
			}
		}

		internal Object GetAudioClipInternal(bool threeD, bool stream, bool compressed, AudioType audioType)
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			return (Object)(object)WebRequestWWW.InternalCreateAudioClipUsingDH(_uwr.downloadHandler, _uwr.url, stream, compressed, audioType);
		}

		[Obsolete("MovieTexture is deprecated. Use VideoPlayer instead.", false)]
		internal object GetMovieTextureInternal()
		{
			return WebRequestWWW.InternalCreateMovieTextureUsingDH(_uwr.downloadHandler);
		}

		public AudioClip GetAudioClip()
		{
			return GetAudioClip(threeD: true, stream: false, (AudioType)0);
		}

		public AudioClip GetAudioClip(bool threeD)
		{
			return GetAudioClip(threeD, stream: false, (AudioType)0);
		}

		public AudioClip GetAudioClip(bool threeD, bool stream)
		{
			return GetAudioClip(threeD, stream, (AudioType)0);
		}

		public AudioClip GetAudioClip(bool threeD, bool stream, AudioType audioType)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			return (AudioClip)GetAudioClipInternal(threeD, stream, compressed: false, audioType);
		}

		public AudioClip GetAudioClipCompressed()
		{
			return GetAudioClipCompressed(threeD: false, (AudioType)0);
		}

		public AudioClip GetAudioClipCompressed(bool threeD)
		{
			return GetAudioClipCompressed(threeD, (AudioType)0);
		}

		public AudioClip GetAudioClipCompressed(bool threeD, AudioType audioType)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			return (AudioClip)GetAudioClipInternal(threeD, stream: false, compressed: true, audioType);
		}

		[Obsolete("MovieTexture is deprecated. Use VideoPlayer instead.", false)]
		public MovieTexture GetMovieTexture()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Expected O, but got Unknown
			return (MovieTexture)GetMovieTextureInternal();
		}

		private bool WaitUntilDoneIfPossible()
		{
			if (_uwr.isDone)
			{
				return true;
			}
			if (url.StartsWith("file://", StringComparison.OrdinalIgnoreCase))
			{
				while (!_uwr.isDone)
				{
				}
				return true;
			}
			Debug.LogError((object)"You are trying to load data from a www stream which has not completed the download yet.\nYou need to yield the download or wait until isDone returns true.");
			return false;
		}
	}
	public static class WWWAudioExtensions
	{
		[Obsolete("WWWAudioExtensions.GetAudioClip extension method has been replaced by WWW.GetAudioClip instance method. (UnityUpgradable) -> WWW.GetAudioClip()", true)]
		public static AudioClip GetAudioClip(this WWW www)
		{
			return www.GetAudioClip();
		}

		[Obsolete("WWWAudioExtensions.GetAudioClip extension method has been replaced by WWW.GetAudioClip instance method. (UnityUpgradable) -> WWW.GetAudioClip([mscorlib] System.Boolean)", true)]
		public static AudioClip GetAudioClip(this WWW www, bool threeD)
		{
			return www.GetAudioClip(threeD);
		}

		[Obsolete("WWWAudioExtensions.GetAudioClip extension method has been replaced by WWW.GetAudioClip instance method. (UnityUpgradable) -> WWW.GetAudioClip([mscorlib] System.Boolean, [mscorlib] System.Boolean)", true)]
		public static AudioClip GetAudioClip(this WWW www, bool threeD, bool stream)
		{
			return www.GetAudioClip(threeD, stream);
		}

		[Obsolete("WWWAudioExtensions.GetAudioClip extension method has been replaced by WWW.GetAudioClip instance method. (UnityUpgradable) -> WWW.GetAudioClip([mscorlib] System.Boolean, [mscorlib] System.Boolean, UnityEngine.AudioType)", true)]
		public static AudioClip GetAudioClip(this WWW www, bool threeD, bool stream, AudioType audioType)
		{
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			return www.GetAudioClip(threeD, stream, audioType);
		}

		[Obsolete("WWWAudioExtensions.GetAudioClipCompressed extension method has been replaced by WWW.GetAudioClipCompressed instance method. (UnityUpgradable) -> WWW.GetAudioClipCompressed()", true)]
		public static AudioClip GetAudioClipCompressed(this WWW www)
		{
			return www.GetAudioClipCompressed();
		}

		[Obsolete("WWWAudioExtensions.GetAudioClipCompressed extension method has been replaced by WWW.GetAudioClipCompressed instance method. (UnityUpgradable) -> WWW.GetAudioClipCompressed([mscorlib] System.Boolean)", true)]
		public static AudioClip GetAudioClipCompressed(this WWW www, bool threeD)
		{
			return www.GetAudioClipCompressed(threeD);
		}

		[Obsolete("WWWAudioExtensions.GetAudioClipCompressed extension method has been replaced by WWW.GetAudioClipCompressed instance method. (UnityUpgradable) -> WWW.GetAudioClipCompressed([mscorlib] System.Boolean, UnityEngine.AudioType)", true)]
		public static AudioClip GetAudioClipCompressed(this WWW www, bool threeD, AudioType audioType)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			return www.GetAudioClipCompressed(threeD, audioType);
		}

		[Obsolete("WWWAudioExtensions.GetMovieTexture extension method has been replaced by WWW.GetMovieTexture instance method. (UnityUpgradable) -> WWW.GetMovieTexture()", true)]
		public static MovieTexture GetMovieTexture(this WWW www)
		{
			return www.GetMovieTexture();
		}
	}
}

Room Architect Tool_Data/Managed/UnityEngine.VehiclesModule.dll

Decompiled 3 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;

[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine;

[NativeHeader("Modules/Vehicles/WheelCollider.h")]
public struct WheelHit
{
	[NativeName("point")]
	private Vector3 m_Point;

	[NativeName("normal")]
	private Vector3 m_Normal;

	[NativeName("forwardDir")]
	private Vector3 m_ForwardDir;

	[NativeName("sidewaysDir")]
	private Vector3 m_SidewaysDir;

	[NativeName("force")]
	private float m_Force;

	[NativeName("forwardSlip")]
	private float m_ForwardSlip;

	[NativeName("sidewaysSlip")]
	private float m_SidewaysSlip;

	[NativeName("collider")]
	private Collider m_Collider;

	public Collider collider
	{
		get
		{
			return m_Collider;
		}
		set
		{
			m_Collider = value;
		}
	}

	public Vector3 point
	{
		get
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			return m_Point;
		}
		set
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			m_Point = value;
		}
	}

	public Vector3 normal
	{
		get
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			return m_Normal;
		}
		set
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			m_Normal = value;
		}
	}

	public Vector3 forwardDir
	{
		get
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			return m_ForwardDir;
		}
		set
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			m_ForwardDir = value;
		}
	}

	public Vector3 sidewaysDir
	{
		get
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			return m_SidewaysDir;
		}
		set
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			m_SidewaysDir = value;
		}
	}

	public float force
	{
		get
		{
			return m_Force;
		}
		set
		{
			m_Force = value;
		}
	}

	public float forwardSlip
	{
		get
		{
			return m_ForwardSlip;
		}
		set
		{
			m_ForwardSlip = value;
		}
	}

	public float sidewaysSlip
	{
		get
		{
			return m_SidewaysSlip;
		}
		set
		{
			m_SidewaysSlip = value;
		}
	}
}
[NativeHeader("Modules/Vehicles/WheelCollider.h")]
[NativeHeader("PhysicsScriptingClasses.h")]
public class WheelCollider : Collider
{
	public Vector3 center
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_center_Injected(out var ret);
			return ret;
		}
		set
		{
			set_center_Injected(ref value);
		}
	}

	public extern float radius
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float suspensionDistance
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public JointSpring suspensionSpring
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_suspensionSpring_Injected(out var ret);
			return ret;
		}
		set
		{
			set_suspensionSpring_Injected(ref value);
		}
	}

	public extern float forceAppPointDistance
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float mass
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float wheelDampingRate
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public WheelFrictionCurve forwardFriction
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_forwardFriction_Injected(out var ret);
			return ret;
		}
		set
		{
			set_forwardFriction_Injected(ref value);
		}
	}

	public WheelFrictionCurve sidewaysFriction
	{
		get
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			get_sidewaysFriction_Injected(out var ret);
			return ret;
		}
		set
		{
			set_sidewaysFriction_Injected(ref value);
		}
	}

	public extern float motorTorque
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float brakeTorque
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float steerAngle
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern bool isGrounded
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("IsGrounded")]
		get;
	}

	public extern float rpm
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	public extern float sprungMass
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern void ConfigureVehicleSubsteps(float speedThreshold, int stepsBelowThreshold, int stepsAboveThreshold);

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern void GetWorldPose(out Vector3 pos, out Quaternion quat);

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern bool GetGroundHit(out WheelHit hit);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_center_Injected(out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_center_Injected(ref Vector3 value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_suspensionSpring_Injected(out JointSpring ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_suspensionSpring_Injected(ref JointSpring value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_forwardFriction_Injected(out WheelFrictionCurve ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_forwardFriction_Injected(ref WheelFrictionCurve value);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void get_sidewaysFriction_Injected(out WheelFrictionCurve ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[SpecialName]
	private extern void set_sidewaysFriction_Injected(ref WheelFrictionCurve value);
}

Room Architect Tool_Data/Managed/UnityEngine.VFXModule.dll

Decompiled 3 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;
using UnityEngine.Rendering;
using UnityEngine.Scripting;

[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.VisualEffectGraph.Editor")]
[assembly: InternalsVisibleTo("Unity.VisualEffectGraph.Editor-testable")]
[assembly: InternalsVisibleTo("Unity.VisualEffectGraph.EditorTests")]
[assembly: InternalsVisibleTo("Unity.VisualEffectGraph.EditorTests-testable")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine.Experimental.VFX;

[Flags]
internal enum VFXCullingFlags
{
	CullNone = 0,
	CullSimulation = 1,
	CullBoundsUpdate = 2,
	CullDefault = 3
}
internal enum VFXExpressionOperation
{
	None,
	Value,
	Combine2f,
	Combine3f,
	Combine4f,
	ExtractComponent,
	DeltaTime,
	TotalTime,
	SystemSeed,
	LocalToWorld,
	WorldToLocal,
	FrameIndex,
	Sin,
	Cos,
	Tan,
	ASin,
	ACos,
	ATan,
	Abs,
	Sign,
	Saturate,
	Ceil,
	Round,
	Frac,
	Floor,
	Log2,
	Mul,
	Divide,
	Add,
	Subtract,
	Min,
	Max,
	Pow,
	ATan2,
	TRSToMatrix,
	InverseMatrix,
	InverseTRSMatrix,
	TransposeMatrix,
	ExtractPositionFromMatrix,
	ExtractAnglesFromMatrix,
	ExtractScaleFromMatrix,
	TransformMatrix,
	TransformPos,
	TransformVec,
	TransformDir,
	Vector3sToMatrix,
	Vector4sToMatrix,
	MatrixToVector3s,
	MatrixToVector4s,
	SampleCurve,
	SampleGradient,
	SampleMeshFloat,
	SampleMeshFloat2,
	SampleMeshFloat3,
	SampleMeshFloat4,
	SampleMeshColor,
	BakeCurve,
	BakeGradient,
	BitwiseLeftShift,
	BitwiseRightShift,
	BitwiseOr,
	BitwiseAnd,
	BitwiseXor,
	BitwiseComplement,
	CastUintToFloat,
	CastIntToFloat,
	CastFloatToUint,
	CastIntToUint,
	CastFloatToInt,
	CastUintToInt,
	RGBtoHSV,
	HSVtoRGB,
	Condition,
	Branch,
	GenerateRandom,
	GenerateFixedRandom,
	ExtractMatrixFromMainCamera,
	ExtractFOVFromMainCamera,
	ExtractNearPlaneFromMainCamera,
	ExtractFarPlaneFromMainCamera,
	ExtractAspectRatioFromMainCamera,
	ExtractPixelDimensionsFromMainCamera,
	GetBufferFromMainCamera,
	LogicalAnd,
	LogicalOr,
	LogicalNot,
	ValueNoise1D,
	ValueNoise2D,
	ValueNoise3D,
	ValueCurlNoise2D,
	ValueCurlNoise3D,
	PerlinNoise1D,
	PerlinNoise2D,
	PerlinNoise3D,
	PerlinCurlNoise2D,
	PerlinCurlNoise3D,
	CellularNoise1D,
	CellularNoise2D,
	CellularNoise3D,
	CellularCurlNoise2D,
	CellularCurlNoise3D,
	VoroNoise2D,
	MeshVertexCount,
	MeshChannelOffset,
	MeshVertexStride
}
internal enum VFXValueType
{
	None,
	Float,
	Float2,
	Float3,
	Float4,
	Int32,
	Uint32,
	Texture2D,
	Texture2DArray,
	Texture3D,
	TextureCube,
	TextureCubeArray,
	Matrix4x4,
	Curve,
	ColorGradient,
	Mesh,
	Spline,
	Boolean
}
internal enum VFXTaskType
{
	None = 0,
	Spawner = 268435456,
	Initialize = 536870912,
	Update = 805306368,
	Output = 1073741824,
	CameraSort = 805306369,
	StripSort = 805306370,
	StripUpdatePerParticle = 805306371,
	StripUpdatePerStrip = 805306372,
	ParticlePointOutput = 1073741824,
	ParticleLineOutput = 1073741825,
	ParticleQuadOutput = 1073741826,
	ParticleHexahedronOutput = 1073741827,
	ParticleMeshOutput = 1073741828,
	ParticleTriangleOutput = 1073741829,
	ParticleOctagonOutput = 1073741830,
	ConstantRateSpawner = 268435456,
	BurstSpawner = 268435457,
	PeriodicBurstSpawner = 268435458,
	VariableRateSpawner = 268435459,
	CustomCallbackSpawner = 268435460,
	SetAttributeSpawner = 268435461
}
internal enum VFXSystemType
{
	Spawner,
	Particle,
	Mesh
}
internal enum VFXSystemFlag
{
	SystemDefault = 0,
	SystemHasKill = 1,
	SystemHasIndirectBuffer = 2,
	SystemReceivedEventGPU = 4,
	SystemHasStrips = 8
}
internal enum VFXUpdateMode
{
	FixedDeltaTime,
	DeltaTime
}
[Flags]
public enum VFXCameraBufferTypes
{
	None = 0,
	Depth = 1,
	Color = 2,
	Normal = 4
}
[StructLayout(LayoutKind.Sequential)]
[NativeType(Header = "Modules/VFX/Public/VFXEventAttribute.h")]
[RequiredByNativeCode]
public sealed class VFXEventAttribute : IDisposable
{
	private IntPtr m_Ptr;

	private bool m_Owner;

	private VisualEffectAsset m_VfxAsset;

	internal VisualEffectAsset vfxAsset => m_VfxAsset;

	private VFXEventAttribute(IntPtr ptr, bool owner, VisualEffectAsset vfxAsset)
	{
		m_Ptr = ptr;
		m_Owner = owner;
		m_VfxAsset = vfxAsset;
	}

	private VFXEventAttribute()
		: this(IntPtr.Zero, owner: false, null)
	{
	}

	public VFXEventAttribute(VFXEventAttribute original)
	{
		if (original == null)
		{
			throw new ArgumentNullException("VFXEventAttribute expect a non null attribute");
		}
		m_Ptr = Internal_Create();
		m_VfxAsset = original.m_VfxAsset;
		Internal_InitFromEventAttribute(original);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	internal static extern IntPtr Internal_Create();

	internal static VFXEventAttribute Internal_InstanciateVFXEventAttribute(VisualEffectAsset vfxAsset)
	{
		VFXEventAttribute vFXEventAttribute = new VFXEventAttribute(Internal_Create(), owner: true, vfxAsset);
		vFXEventAttribute.Internal_InitFromAsset(vfxAsset);
		return vFXEventAttribute;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	internal extern void Internal_InitFromAsset(VisualEffectAsset vfxAsset);

	[MethodImpl(MethodImplOptions.InternalCall)]
	internal extern void Internal_InitFromEventAttribute(VFXEventAttribute vfxEventAttribute);

	private void Release()
	{
		if (m_Owner && m_Ptr != IntPtr.Zero)
		{
			Internal_Destroy(m_Ptr);
		}
		m_Ptr = IntPtr.Zero;
		m_VfxAsset = null;
	}

	~VFXEventAttribute()
	{
		Release();
	}

	public void Dispose()
	{
		Release();
		GC.SuppressFinalize(this);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsThreadSafe = true)]
	internal static extern void Internal_Destroy(IntPtr ptr);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("HasValueFromScript<bool>")]
	public extern bool HasBool(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("HasValueFromScript<int>")]
	public extern bool HasInt(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("HasValueFromScript<UInt32>")]
	public extern bool HasUint(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("HasValueFromScript<float>")]
	public extern bool HasFloat(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("HasValueFromScript<Vector2f>")]
	public extern bool HasVector2(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("HasValueFromScript<Vector3f>")]
	public extern bool HasVector3(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("HasValueFromScript<Vector4f>")]
	public extern bool HasVector4(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("HasValueFromScript<Matrix4x4f>")]
	public extern bool HasMatrix4x4(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("SetValueFromScript<bool>")]
	public extern void SetBool(int nameID, bool b);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("SetValueFromScript<int>")]
	public extern void SetInt(int nameID, int i);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("SetValueFromScript<UInt32>")]
	public extern void SetUint(int nameID, uint i);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("SetValueFromScript<float>")]
	public extern void SetFloat(int nameID, float f);

	[NativeName("SetValueFromScript<Vector2f>")]
	public void SetVector2(int nameID, Vector2 v)
	{
		SetVector2_Injected(nameID, ref v);
	}

	[NativeName("SetValueFromScript<Vector3f>")]
	public void SetVector3(int nameID, Vector3 v)
	{
		SetVector3_Injected(nameID, ref v);
	}

	[NativeName("SetValueFromScript<Vector4f>")]
	public void SetVector4(int nameID, Vector4 v)
	{
		SetVector4_Injected(nameID, ref v);
	}

	[NativeName("SetValueFromScript<Matrix4x4f>")]
	public void SetMatrix4x4(int nameID, Matrix4x4 v)
	{
		SetMatrix4x4_Injected(nameID, ref v);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("GetValueFromScript<bool>")]
	public extern bool GetBool(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("GetValueFromScript<int>")]
	public extern int GetInt(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("GetValueFromScript<UInt32>")]
	public extern uint GetUint(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("GetValueFromScript<float>")]
	public extern float GetFloat(int nameID);

	[NativeName("GetValueFromScript<Vector2f>")]
	public Vector2 GetVector2(int nameID)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		GetVector2_Injected(nameID, out var ret);
		return ret;
	}

	[NativeName("GetValueFromScript<Vector3f>")]
	public Vector3 GetVector3(int nameID)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		GetVector3_Injected(nameID, out var ret);
		return ret;
	}

	[NativeName("GetValueFromScript<Vector4f>")]
	public Vector4 GetVector4(int nameID)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		GetVector4_Injected(nameID, out var ret);
		return ret;
	}

	[NativeName("GetValueFromScript<Matrix4x4f>")]
	public Matrix4x4 GetMatrix4x4(int nameID)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		GetMatrix4x4_Injected(nameID, out var ret);
		return ret;
	}

	public bool HasBool(string name)
	{
		return HasBool(Shader.PropertyToID(name));
	}

	public bool HasInt(string name)
	{
		return HasInt(Shader.PropertyToID(name));
	}

	public bool HasUint(string name)
	{
		return HasUint(Shader.PropertyToID(name));
	}

	public bool HasFloat(string name)
	{
		return HasFloat(Shader.PropertyToID(name));
	}

	public bool HasVector2(string name)
	{
		return HasVector2(Shader.PropertyToID(name));
	}

	public bool HasVector3(string name)
	{
		return HasVector3(Shader.PropertyToID(name));
	}

	public bool HasVector4(string name)
	{
		return HasVector4(Shader.PropertyToID(name));
	}

	public bool HasMatrix4x4(string name)
	{
		return HasMatrix4x4(Shader.PropertyToID(name));
	}

	public void SetBool(string name, bool b)
	{
		SetBool(Shader.PropertyToID(name), b);
	}

	public void SetInt(string name, int i)
	{
		SetInt(Shader.PropertyToID(name), i);
	}

	public void SetUint(string name, uint i)
	{
		SetUint(Shader.PropertyToID(name), i);
	}

	public void SetFloat(string name, float f)
	{
		SetFloat(Shader.PropertyToID(name), f);
	}

	public void SetVector2(string name, Vector2 v)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		SetVector2(Shader.PropertyToID(name), v);
	}

	public void SetVector3(string name, Vector3 v)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		SetVector3(Shader.PropertyToID(name), v);
	}

	public void SetVector4(string name, Vector4 v)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		SetVector4(Shader.PropertyToID(name), v);
	}

	public void SetMatrix4x4(string name, Matrix4x4 v)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		SetMatrix4x4(Shader.PropertyToID(name), v);
	}

	public bool GetBool(string name)
	{
		return GetBool(Shader.PropertyToID(name));
	}

	public int GetInt(string name)
	{
		return GetInt(Shader.PropertyToID(name));
	}

	public uint GetUint(string name)
	{
		return GetUint(Shader.PropertyToID(name));
	}

	public float GetFloat(string name)
	{
		return GetFloat(Shader.PropertyToID(name));
	}

	public Vector2 GetVector2(string name)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		return GetVector2(Shader.PropertyToID(name));
	}

	public Vector3 GetVector3(string name)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		return GetVector3(Shader.PropertyToID(name));
	}

	public Vector4 GetVector4(string name)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		return GetVector4(Shader.PropertyToID(name));
	}

	public Matrix4x4 GetMatrix4x4(string name)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		return GetMatrix4x4(Shader.PropertyToID(name));
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern void CopyValuesFrom([NotNull] VFXEventAttribute eventAttibute);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void SetVector2_Injected(int nameID, ref Vector2 v);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void SetVector3_Injected(int nameID, ref Vector3 v);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void SetVector4_Injected(int nameID, ref Vector4 v);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void SetMatrix4x4_Injected(int nameID, ref Matrix4x4 v);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void GetVector2_Injected(int nameID, out Vector2 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void GetVector3_Injected(int nameID, out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void GetVector4_Injected(int nameID, out Vector4 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void GetMatrix4x4_Injected(int nameID, out Matrix4x4 ret);
}
[NativeType(Header = "Modules/VFX/Public/VFXExpressionMeshFunctions.h")]
[StaticAccessor(/*Could not decode attribute arguments.*/)]
[RequiredByNativeCode]
internal class VFXExpressionMesh
{
	[MethodImpl(MethodImplOptions.InternalCall)]
	internal static extern int GetVertexStride(Mesh mesh);

	[MethodImpl(MethodImplOptions.InternalCall)]
	internal static extern int GetChannelOffset(Mesh mesh, int channelIndex);

	[MethodImpl(MethodImplOptions.InternalCall)]
	internal static extern float GetFloat(Mesh mesh, int vertexIndex, int channelOffset, int vertexStride);

	internal static Vector2 GetFloat2(Mesh mesh, int vertexIndex, int channelOffset, int vertexStride)
	{
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		GetFloat2_Injected(mesh, vertexIndex, channelOffset, vertexStride, out var ret);
		return ret;
	}

	internal static Vector3 GetFloat3(Mesh mesh, int vertexIndex, int channelOffset, int vertexStride)
	{
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		GetFloat3_Injected(mesh, vertexIndex, channelOffset, vertexStride, out var ret);
		return ret;
	}

	internal static Vector4 GetFloat4(Mesh mesh, int vertexIndex, int channelOffset, int vertexStride)
	{
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		GetFloat4_Injected(mesh, vertexIndex, channelOffset, vertexStride, out var ret);
		return ret;
	}

	internal static Vector4 GetColor(Mesh mesh, int vertexIndex, int channelOffset, int vertexStride)
	{
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		GetColor_Injected(mesh, vertexIndex, channelOffset, vertexStride, out var ret);
		return ret;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void GetFloat2_Injected(Mesh mesh, int vertexIndex, int channelOffset, int vertexStride, out Vector2 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void GetFloat3_Injected(Mesh mesh, int vertexIndex, int channelOffset, int vertexStride, out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void GetFloat4_Injected(Mesh mesh, int vertexIndex, int channelOffset, int vertexStride, out Vector4 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void GetColor_Injected(Mesh mesh, int vertexIndex, int channelOffset, int vertexStride, out Vector4 ret);
}
[StaticAccessor(/*Could not decode attribute arguments.*/)]
[RequiredByNativeCode]
[NativeType(Header = "Modules/VFX/Public/VFXExpressionNoiseFunctions.h")]
internal class VFXExpressionNoise
{
	[NativeName("Value::Generate")]
	internal static Vector2 GenerateValueNoise1D(float coordinate, float frequency, int octaveCount, float persistence, float lacunarity)
	{
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		GenerateValueNoise1D_Injected(coordinate, frequency, octaveCount, persistence, lacunarity, out var ret);
		return ret;
	}

	[NativeName("Value::Generate")]
	internal static Vector3 GenerateValueNoise2D(Vector2 coordinate, float frequency, int octaveCount, float persistence, float lacunarity)
	{
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		GenerateValueNoise2D_Injected(ref coordinate, frequency, octaveCount, persistence, lacunarity, out var ret);
		return ret;
	}

	[NativeName("Value::Generate")]
	internal static Vector4 GenerateValueNoise3D(Vector3 coordinate, float frequency, int octaveCount, float persistence, float lacunarity)
	{
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		GenerateValueNoise3D_Injected(ref coordinate, frequency, octaveCount, persistence, lacunarity, out var ret);
		return ret;
	}

	[NativeName("Value::GenerateCurl")]
	internal static Vector2 GenerateValueCurlNoise2D(Vector2 coordinate, float frequency, int octaveCount, float persistence, float lacunarity)
	{
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		GenerateValueCurlNoise2D_Injected(ref coordinate, frequency, octaveCount, persistence, lacunarity, out var ret);
		return ret;
	}

	[NativeName("Value::GenerateCurl")]
	internal static Vector3 GenerateValueCurlNoise3D(Vector3 coordinate, float frequency, int octaveCount, float persistence, float lacunarity)
	{
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		GenerateValueCurlNoise3D_Injected(ref coordinate, frequency, octaveCount, persistence, lacunarity, out var ret);
		return ret;
	}

	[NativeName("Perlin::Generate")]
	internal static Vector2 GeneratePerlinNoise1D(float coordinate, float frequency, int octaveCount, float persistence, float lacunarity)
	{
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		GeneratePerlinNoise1D_Injected(coordinate, frequency, octaveCount, persistence, lacunarity, out var ret);
		return ret;
	}

	[NativeName("Perlin::Generate")]
	internal static Vector3 GeneratePerlinNoise2D(Vector2 coordinate, float frequency, int octaveCount, float persistence, float lacunarity)
	{
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		GeneratePerlinNoise2D_Injected(ref coordinate, frequency, octaveCount, persistence, lacunarity, out var ret);
		return ret;
	}

	[NativeName("Perlin::Generate")]
	internal static Vector4 GeneratePerlinNoise3D(Vector3 coordinate, float frequency, int octaveCount, float persistence, float lacunarity)
	{
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		GeneratePerlinNoise3D_Injected(ref coordinate, frequency, octaveCount, persistence, lacunarity, out var ret);
		return ret;
	}

	[NativeName("Perlin::GenerateCurl")]
	internal static Vector2 GeneratePerlinCurlNoise2D(Vector2 coordinate, float frequency, int octaveCount, float persistence, float lacunarity)
	{
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		GeneratePerlinCurlNoise2D_Injected(ref coordinate, frequency, octaveCount, persistence, lacunarity, out var ret);
		return ret;
	}

	[NativeName("Perlin::GenerateCurl")]
	internal static Vector3 GeneratePerlinCurlNoise3D(Vector3 coordinate, float frequency, int octaveCount, float persistence, float lacunarity)
	{
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		GeneratePerlinCurlNoise3D_Injected(ref coordinate, frequency, octaveCount, persistence, lacunarity, out var ret);
		return ret;
	}

	[NativeName("Cellular::Generate")]
	internal static Vector2 GenerateCellularNoise1D(float coordinate, float frequency, int octaveCount, float persistence, float lacunarity)
	{
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		GenerateCellularNoise1D_Injected(coordinate, frequency, octaveCount, persistence, lacunarity, out var ret);
		return ret;
	}

	[NativeName("Cellular::Generate")]
	internal static Vector3 GenerateCellularNoise2D(Vector2 coordinate, float frequency, int octaveCount, float persistence, float lacunarity)
	{
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		GenerateCellularNoise2D_Injected(ref coordinate, frequency, octaveCount, persistence, lacunarity, out var ret);
		return ret;
	}

	[NativeName("Cellular::Generate")]
	internal static Vector4 GenerateCellularNoise3D(Vector3 coordinate, float frequency, int octaveCount, float persistence, float lacunarity)
	{
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		GenerateCellularNoise3D_Injected(ref coordinate, frequency, octaveCount, persistence, lacunarity, out var ret);
		return ret;
	}

	[NativeName("Cellular::GenerateCurl")]
	internal static Vector2 GenerateCellularCurlNoise2D(Vector2 coordinate, float frequency, int octaveCount, float persistence, float lacunarity)
	{
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		GenerateCellularCurlNoise2D_Injected(ref coordinate, frequency, octaveCount, persistence, lacunarity, out var ret);
		return ret;
	}

	[NativeName("Cellular::GenerateCurl")]
	internal static Vector3 GenerateCellularCurlNoise3D(Vector3 coordinate, float frequency, int octaveCount, float persistence, float lacunarity)
	{
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		GenerateCellularCurlNoise3D_Injected(ref coordinate, frequency, octaveCount, persistence, lacunarity, out var ret);
		return ret;
	}

	[NativeName("Voro::Generate")]
	internal static float GenerateVoroNoise2D(Vector2 coordinate, float frequency, float warp, float smoothness)
	{
		return GenerateVoroNoise2D_Injected(ref coordinate, frequency, warp, smoothness);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void GenerateValueNoise1D_Injected(float coordinate, float frequency, int octaveCount, float persistence, float lacunarity, out Vector2 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void GenerateValueNoise2D_Injected(ref Vector2 coordinate, float frequency, int octaveCount, float persistence, float lacunarity, out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void GenerateValueNoise3D_Injected(ref Vector3 coordinate, float frequency, int octaveCount, float persistence, float lacunarity, out Vector4 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void GenerateValueCurlNoise2D_Injected(ref Vector2 coordinate, float frequency, int octaveCount, float persistence, float lacunarity, out Vector2 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void GenerateValueCurlNoise3D_Injected(ref Vector3 coordinate, float frequency, int octaveCount, float persistence, float lacunarity, out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void GeneratePerlinNoise1D_Injected(float coordinate, float frequency, int octaveCount, float persistence, float lacunarity, out Vector2 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void GeneratePerlinNoise2D_Injected(ref Vector2 coordinate, float frequency, int octaveCount, float persistence, float lacunarity, out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void GeneratePerlinNoise3D_Injected(ref Vector3 coordinate, float frequency, int octaveCount, float persistence, float lacunarity, out Vector4 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void GeneratePerlinCurlNoise2D_Injected(ref Vector2 coordinate, float frequency, int octaveCount, float persistence, float lacunarity, out Vector2 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void GeneratePerlinCurlNoise3D_Injected(ref Vector3 coordinate, float frequency, int octaveCount, float persistence, float lacunarity, out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void GenerateCellularNoise1D_Injected(float coordinate, float frequency, int octaveCount, float persistence, float lacunarity, out Vector2 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void GenerateCellularNoise2D_Injected(ref Vector2 coordinate, float frequency, int octaveCount, float persistence, float lacunarity, out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void GenerateCellularNoise3D_Injected(ref Vector3 coordinate, float frequency, int octaveCount, float persistence, float lacunarity, out Vector4 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void GenerateCellularCurlNoise2D_Injected(ref Vector2 coordinate, float frequency, int octaveCount, float persistence, float lacunarity, out Vector2 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern void GenerateCellularCurlNoise3D_Injected(ref Vector3 coordinate, float frequency, int octaveCount, float persistence, float lacunarity, out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private static extern float GenerateVoroNoise2D_Injected(ref Vector2 coordinate, float frequency, float warp, float smoothness);
}
[StructLayout(LayoutKind.Sequential)]
[RequiredByNativeCode]
[NativeType(Header = "Modules/VFX/Public/VFXExpressionValues.h")]
public class VFXExpressionValues
{
	internal IntPtr m_Ptr;

	private VFXExpressionValues()
	{
	}

	[RequiredByNativeCode]
	internal static VFXExpressionValues CreateExpressionValuesWrapper(IntPtr ptr)
	{
		VFXExpressionValues vFXExpressionValues = new VFXExpressionValues();
		vFXExpressionValues.m_Ptr = ptr;
		return vFXExpressionValues;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("GetValueFromScript<bool>")]
	[NativeThrows]
	public extern bool GetBool(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("GetValueFromScript<int>")]
	[NativeThrows]
	public extern int GetInt(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("GetValueFromScript<UInt32>")]
	[NativeThrows]
	public extern uint GetUInt(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("GetValueFromScript<float>")]
	[NativeThrows]
	public extern float GetFloat(int nameID);

	[NativeName("GetValueFromScript<Vector2f>")]
	[NativeThrows]
	public Vector2 GetVector2(int nameID)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		GetVector2_Injected(nameID, out var ret);
		return ret;
	}

	[NativeThrows]
	[NativeName("GetValueFromScript<Vector3f>")]
	public Vector3 GetVector3(int nameID)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		GetVector3_Injected(nameID, out var ret);
		return ret;
	}

	[NativeName("GetValueFromScript<Vector4f>")]
	[NativeThrows]
	public Vector4 GetVector4(int nameID)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		GetVector4_Injected(nameID, out var ret);
		return ret;
	}

	[NativeThrows]
	[NativeName("GetValueFromScript<Matrix4x4f>")]
	public Matrix4x4 GetMatrix4x4(int nameID)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		GetMatrix4x4_Injected(nameID, out var ret);
		return ret;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeThrows]
	[NativeName("GetValueFromScript<Texture*>")]
	public extern Texture GetTexture(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeThrows]
	[NativeName("GetValueFromScript<Mesh*>")]
	public extern Mesh GetMesh(int nameID);

	public AnimationCurve GetAnimationCurve(int nameID)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Expected O, but got Unknown
		AnimationCurve val = new AnimationCurve();
		Internal_GetAnimationCurveFromScript(nameID, val);
		return val;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeThrows]
	internal extern void Internal_GetAnimationCurveFromScript(int nameID, AnimationCurve curve);

	public Gradient GetGradient(int nameID)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Expected O, but got Unknown
		Gradient val = new Gradient();
		Internal_GetGradientFromScript(nameID, val);
		return val;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeThrows]
	internal extern void Internal_GetGradientFromScript(int nameID, Gradient gradient);

	public bool GetBool(string name)
	{
		return GetBool(Shader.PropertyToID(name));
	}

	public int GetInt(string name)
	{
		return GetInt(Shader.PropertyToID(name));
	}

	public uint GetUInt(string name)
	{
		return GetUInt(Shader.PropertyToID(name));
	}

	public float GetFloat(string name)
	{
		return GetFloat(Shader.PropertyToID(name));
	}

	public Vector2 GetVector2(string name)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		return GetVector2(Shader.PropertyToID(name));
	}

	public Vector3 GetVector3(string name)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		return GetVector3(Shader.PropertyToID(name));
	}

	public Vector4 GetVector4(string name)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		return GetVector4(Shader.PropertyToID(name));
	}

	public Matrix4x4 GetMatrix4x4(string name)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		return GetMatrix4x4(Shader.PropertyToID(name));
	}

	public Texture GetTexture(string name)
	{
		return GetTexture(Shader.PropertyToID(name));
	}

	public AnimationCurve GetAnimationCurve(string name)
	{
		return GetAnimationCurve(Shader.PropertyToID(name));
	}

	public Gradient GetGradient(string name)
	{
		return GetGradient(Shader.PropertyToID(name));
	}

	public Mesh GetMesh(string name)
	{
		return GetMesh(Shader.PropertyToID(name));
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void GetVector2_Injected(int nameID, out Vector2 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void GetVector3_Injected(int nameID, out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void GetVector4_Injected(int nameID, out Vector4 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void GetMatrix4x4_Injected(int nameID, out Matrix4x4 ret);
}
[StaticAccessor(/*Could not decode attribute arguments.*/)]
[RequiredByNativeCode]
[NativeHeader("Modules/VFX/Public/VFXManager.h")]
public static class VFXManager
{
	public static extern float fixedTimeStep
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public static extern float maxDeltaTime
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	internal static extern string renderPipeSettingsPath
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	public static extern VisualEffect[] GetComponents();

	[MethodImpl(MethodImplOptions.InternalCall)]
	public static extern void ProcessCamera(Camera cam);

	[MethodImpl(MethodImplOptions.InternalCall)]
	public static extern VFXCameraBufferTypes IsCameraBufferNeeded(Camera cam);

	[MethodImpl(MethodImplOptions.InternalCall)]
	public static extern void SetCameraBuffer(Camera cam, VFXCameraBufferTypes type, Texture buffer, int x, int y, int width, int height);
}
[Serializable]
[RequiredByNativeCode]
public abstract class VFXSpawnerCallbacks : ScriptableObject
{
	public abstract void OnPlay(VFXSpawnerState state, VFXExpressionValues vfxValues, VisualEffect vfxComponent);

	public abstract void OnUpdate(VFXSpawnerState state, VFXExpressionValues vfxValues, VisualEffect vfxComponent);

	public abstract void OnStop(VFXSpawnerState state, VFXExpressionValues vfxValues, VisualEffect vfxComponent);
}
[StructLayout(LayoutKind.Sequential)]
[NativeType(Header = "Modules/VFX/Public/VFXSpawnerState.h")]
[RequiredByNativeCode]
public sealed class VFXSpawnerState : IDisposable
{
	private IntPtr m_Ptr;

	private bool m_Owner;

	public extern bool playing
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float spawnCount
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float deltaTime
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float totalTime
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern VFXEventAttribute vfxEventAttribute
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	internal VFXSpawnerState(IntPtr ptr, bool owner)
	{
		m_Ptr = ptr;
		m_Owner = owner;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	internal static extern IntPtr Internal_Create();

	[RequiredByNativeCode]
	internal static VFXSpawnerState CreateSpawnerStateWrapper()
	{
		return new VFXSpawnerState(IntPtr.Zero, owner: false);
	}

	[RequiredByNativeCode]
	internal void SetWrapValue(IntPtr ptr)
	{
		if (m_Owner)
		{
			throw new Exception("VFXSpawnerState : SetWrapValue is reserved to CreateWrapper object");
		}
		m_Ptr = ptr;
	}

	private void Release()
	{
		if (m_Ptr != IntPtr.Zero && m_Owner)
		{
			Internal_Destroy(m_Ptr);
		}
		m_Ptr = IntPtr.Zero;
	}

	~VFXSpawnerState()
	{
		Release();
	}

	public void Dispose()
	{
		Release();
		GC.SuppressFinalize(this);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeMethod(IsThreadSafe = true)]
	private static extern void Internal_Destroy(IntPtr ptr);
}
[NativeHeader("Modules/VFX/Public/VisualEffectAsset.h")]
[NativeHeader("Modules/VFX/Public/ScriptBindings/VisualEffectAssetBindings.h")]
[NativeHeader("VFXScriptingClasses.h")]
[UsedByNativeCode]
public abstract class VisualEffectObject : Object
{
}
[NativeHeader("Modules/VFX/Public/ScriptBindings/VisualEffectAssetBindings.h")]
[UsedByNativeCode]
[NativeHeader("VFXScriptingClasses.h")]
[NativeHeader("Modules/VFX/Public/VisualEffectAsset.h")]
public class VisualEffectAsset : VisualEffectObject
{
	public const string PlayEventName = "OnPlay";

	public const string StopEventName = "OnStop";
}
[NativeHeader("Modules/VFX/Public/VisualEffect.h")]
[RequireComponent(typeof(Transform))]
public class VisualEffect : Behaviour
{
	public extern bool pause
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float playRate
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern uint startSeed
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern bool resetSeedOnPlay
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern bool culled
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	public extern VisualEffectAsset visualEffectAsset
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern int aliveParticleCount
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
	}

	public VFXEventAttribute CreateVFXEventAttribute()
	{
		if ((Object)(object)visualEffectAsset == (Object)null)
		{
			return null;
		}
		return VFXEventAttribute.Internal_InstanciateVFXEventAttribute(visualEffectAsset);
	}

	private void CheckValidVFXEventAttribute(VFXEventAttribute eventAttribute)
	{
		if (eventAttribute != null && (Object)(object)eventAttribute.vfxAsset != (Object)(object)visualEffectAsset)
		{
			throw new InvalidOperationException("Invalid VFXEventAttribute provided to VisualEffect, has been created with another VisualEffectAsset");
		}
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	internal extern void SendPlay(VFXEventAttribute eventAttribute);

	public void Play(VFXEventAttribute eventAttribute)
	{
		CheckValidVFXEventAttribute(eventAttribute);
		SendPlay(eventAttribute);
	}

	public void Play()
	{
		SendPlay(null);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	internal extern void SendStop(VFXEventAttribute eventAttribute);

	public void Stop(VFXEventAttribute eventAttribute)
	{
		CheckValidVFXEventAttribute(eventAttribute);
		SendStop(eventAttribute);
	}

	public void Stop()
	{
		SendStop(null);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void Internal_SendEvent(int eventNameID, VFXEventAttribute eventAttribute);

	public void SendEvent(int eventNameID, VFXEventAttribute eventAttribute)
	{
		CheckValidVFXEventAttribute(eventAttribute);
		Internal_SendEvent(eventNameID, eventAttribute);
	}

	public void SendEvent(string eventName)
	{
		SendEvent(Shader.PropertyToID(eventName), null);
	}

	public void SendEvent(string eventName, VFXEventAttribute eventAttribute)
	{
		SendEvent(Shader.PropertyToID(eventName), eventAttribute);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern void Reinit();

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern void AdvanceOneFrame();

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("ResetOverrideFromScript")]
	public extern void ResetOverride(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("GetTextureDimensionFromScript")]
	public extern TextureDimension GetTextureDimension(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("HasValueFromScript<bool>")]
	public extern bool HasBool(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("HasValueFromScript<int>")]
	public extern bool HasInt(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("HasValueFromScript<UInt32>")]
	public extern bool HasUInt(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("HasValueFromScript<float>")]
	public extern bool HasFloat(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("HasValueFromScript<Vector2f>")]
	public extern bool HasVector2(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("HasValueFromScript<Vector3f>")]
	public extern bool HasVector3(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("HasValueFromScript<Vector4f>")]
	public extern bool HasVector4(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("HasValueFromScript<Matrix4x4f>")]
	public extern bool HasMatrix4x4(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("HasValueFromScript<Texture*>")]
	public extern bool HasTexture(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("HasValueFromScript<AnimationCurve*>")]
	public extern bool HasAnimationCurve(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("HasValueFromScript<Gradient*>")]
	public extern bool HasGradient(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("HasValueFromScript<Mesh*>")]
	public extern bool HasMesh(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("SetValueFromScript<bool>")]
	public extern void SetBool(int nameID, bool b);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("SetValueFromScript<int>")]
	public extern void SetInt(int nameID, int i);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("SetValueFromScript<UInt32>")]
	public extern void SetUInt(int nameID, uint i);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("SetValueFromScript<float>")]
	public extern void SetFloat(int nameID, float f);

	[NativeName("SetValueFromScript<Vector2f>")]
	public void SetVector2(int nameID, Vector2 v)
	{
		SetVector2_Injected(nameID, ref v);
	}

	[NativeName("SetValueFromScript<Vector3f>")]
	public void SetVector3(int nameID, Vector3 v)
	{
		SetVector3_Injected(nameID, ref v);
	}

	[NativeName("SetValueFromScript<Vector4f>")]
	public void SetVector4(int nameID, Vector4 v)
	{
		SetVector4_Injected(nameID, ref v);
	}

	[NativeName("SetValueFromScript<Matrix4x4f>")]
	public void SetMatrix4x4(int nameID, Matrix4x4 v)
	{
		SetMatrix4x4_Injected(nameID, ref v);
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("SetValueFromScript<Texture*>")]
	public extern void SetTexture(int nameID, Texture t);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("SetValueFromScript<AnimationCurve*>")]
	public extern void SetAnimationCurve(int nameID, AnimationCurve c);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("SetValueFromScript<Gradient*>")]
	public extern void SetGradient(int nameID, Gradient g);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("SetValueFromScript<Mesh*>")]
	public extern void SetMesh(int nameID, Mesh m);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("GetValueFromScript<bool>")]
	public extern bool GetBool(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("GetValueFromScript<int>")]
	public extern int GetInt(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("GetValueFromScript<UInt32>")]
	public extern uint GetUInt(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("GetValueFromScript<float>")]
	public extern float GetFloat(int nameID);

	[NativeName("GetValueFromScript<Vector2f>")]
	public Vector2 GetVector2(int nameID)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		GetVector2_Injected(nameID, out var ret);
		return ret;
	}

	[NativeName("GetValueFromScript<Vector3f>")]
	public Vector3 GetVector3(int nameID)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		GetVector3_Injected(nameID, out var ret);
		return ret;
	}

	[NativeName("GetValueFromScript<Vector4f>")]
	public Vector4 GetVector4(int nameID)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		GetVector4_Injected(nameID, out var ret);
		return ret;
	}

	[NativeName("GetValueFromScript<Matrix4x4f>")]
	public Matrix4x4 GetMatrix4x4(int nameID)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		GetMatrix4x4_Injected(nameID, out var ret);
		return ret;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("GetValueFromScript<Texture*>")]
	public extern Texture GetTexture(int nameID);

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("GetValueFromScript<Mesh*>")]
	public extern Mesh GetMesh(int nameID);

	public Gradient GetGradient(int nameID)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Expected O, but got Unknown
		Gradient val = new Gradient();
		Internal_GetGradient(nameID, val);
		return val;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("Internal_GetGradientFromScript")]
	private extern void Internal_GetGradient(int nameID, Gradient gradient);

	public AnimationCurve GetAnimationCurve(int nameID)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Expected O, but got Unknown
		AnimationCurve val = new AnimationCurve();
		Internal_GetAnimationCurve(nameID, val);
		return val;
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	[NativeName("Internal_GetAnimationCurveFromScript")]
	private extern void Internal_GetAnimationCurve(int nameID, AnimationCurve curve);

	public void ResetOverride(string name)
	{
		ResetOverride(Shader.PropertyToID(name));
	}

	public bool HasInt(string name)
	{
		return HasInt(Shader.PropertyToID(name));
	}

	public bool HasUInt(string name)
	{
		return HasUInt(Shader.PropertyToID(name));
	}

	public bool HasFloat(string name)
	{
		return HasFloat(Shader.PropertyToID(name));
	}

	public bool HasVector2(string name)
	{
		return HasVector2(Shader.PropertyToID(name));
	}

	public bool HasVector3(string name)
	{
		return HasVector3(Shader.PropertyToID(name));
	}

	public bool HasVector4(string name)
	{
		return HasVector4(Shader.PropertyToID(name));
	}

	public bool HasMatrix4x4(string name)
	{
		return HasMatrix4x4(Shader.PropertyToID(name));
	}

	public bool HasTexture(string name)
	{
		return HasTexture(Shader.PropertyToID(name));
	}

	public TextureDimension GetTextureDimension(string name)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		return GetTextureDimension(Shader.PropertyToID(name));
	}

	public bool HasAnimationCurve(string name)
	{
		return HasAnimationCurve(Shader.PropertyToID(name));
	}

	public bool HasGradient(string name)
	{
		return HasGradient(Shader.PropertyToID(name));
	}

	public bool HasMesh(string name)
	{
		return HasMesh(Shader.PropertyToID(name));
	}

	public bool HasBool(string name)
	{
		return HasBool(Shader.PropertyToID(name));
	}

	public void SetInt(string name, int i)
	{
		SetInt(Shader.PropertyToID(name), i);
	}

	public void SetUInt(string name, uint i)
	{
		SetUInt(Shader.PropertyToID(name), i);
	}

	public void SetFloat(string name, float f)
	{
		SetFloat(Shader.PropertyToID(name), f);
	}

	public void SetVector2(string name, Vector2 v)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		SetVector2(Shader.PropertyToID(name), v);
	}

	public void SetVector3(string name, Vector3 v)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		SetVector3(Shader.PropertyToID(name), v);
	}

	public void SetVector4(string name, Vector4 v)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		SetVector4(Shader.PropertyToID(name), v);
	}

	public void SetMatrix4x4(string name, Matrix4x4 v)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		SetMatrix4x4(Shader.PropertyToID(name), v);
	}

	public void SetTexture(string name, Texture t)
	{
		SetTexture(Shader.PropertyToID(name), t);
	}

	public void SetAnimationCurve(string name, AnimationCurve c)
	{
		SetAnimationCurve(Shader.PropertyToID(name), c);
	}

	public void SetGradient(string name, Gradient g)
	{
		SetGradient(Shader.PropertyToID(name), g);
	}

	public void SetMesh(string name, Mesh m)
	{
		SetMesh(Shader.PropertyToID(name), m);
	}

	public void SetBool(string name, bool b)
	{
		SetBool(Shader.PropertyToID(name), b);
	}

	public int GetInt(string name)
	{
		return GetInt(Shader.PropertyToID(name));
	}

	public uint GetUInt(string name)
	{
		return GetUInt(Shader.PropertyToID(name));
	}

	public float GetFloat(string name)
	{
		return GetFloat(Shader.PropertyToID(name));
	}

	public Vector2 GetVector2(string name)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		return GetVector2(Shader.PropertyToID(name));
	}

	public Vector3 GetVector3(string name)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		return GetVector3(Shader.PropertyToID(name));
	}

	public Vector4 GetVector4(string name)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		return GetVector4(Shader.PropertyToID(name));
	}

	public Matrix4x4 GetMatrix4x4(string name)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		return GetMatrix4x4(Shader.PropertyToID(name));
	}

	public Texture GetTexture(string name)
	{
		return GetTexture(Shader.PropertyToID(name));
	}

	public Mesh GetMesh(string name)
	{
		return GetMesh(Shader.PropertyToID(name));
	}

	public bool GetBool(string name)
	{
		return GetBool(Shader.PropertyToID(name));
	}

	public AnimationCurve GetAnimationCurve(string name)
	{
		return GetAnimationCurve(Shader.PropertyToID(name));
	}

	public Gradient GetGradient(string name)
	{
		return GetGradient(Shader.PropertyToID(name));
	}

	[MethodImpl(MethodImplOptions.InternalCall)]
	public extern void Simulate(float stepDeltaTime, uint stepCount = 1u);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void SetVector2_Injected(int nameID, ref Vector2 v);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void SetVector3_Injected(int nameID, ref Vector3 v);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void SetVector4_Injected(int nameID, ref Vector4 v);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void SetMatrix4x4_Injected(int nameID, ref Matrix4x4 v);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void GetVector2_Injected(int nameID, out Vector2 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void GetVector3_Injected(int nameID, out Vector3 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void GetVector4_Injected(int nameID, out Vector4 ret);

	[MethodImpl(MethodImplOptions.InternalCall)]
	private extern void GetMatrix4x4_Injected(int nameID, out Matrix4x4 ret);
}
[NativeType(Header = "Modules/VFX/Public/VFXRenderer.h")]
internal sealed class VFXRenderer : Renderer
{
}

Room Architect Tool_Data/Managed/UnityEngine.VideoModule.dll

Decompiled 3 months ago
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;
using UnityEngine.Experimental.Audio;
using UnityEngine.Playables;
using UnityEngine.Scripting;
using UnityEngine.Video;

[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("VideoTesting")]
[assembly: InternalsVisibleTo("Unity.Audio.DSPGraph")]
[assembly: InternalsVisibleTo("VideoTesting")]
[assembly: InternalsVisibleTo("Unity.Audio.DSPGraph.Tests")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngineInternal.Video
{
	[UsedByNativeCode]
	internal enum VideoError
	{
		NoErr,
		OutOfMemoryErr,
		CantReadFile,
		CantWriteFile,
		BadParams,
		NoData,
		BadPermissions,
		DeviceNotAvailable,
		ResourceNotAvailable,
		NetworkErr
	}
	[UsedByNativeCode]
	internal enum VideoPixelFormat
	{
		RGB,
		RGBA,
		YUV,
		YUVA
	}
	[NativeHeader("Modules/Video/Public/Base/MediaComponent.h")]
	[UsedByNativeCode]
	internal class VideoPlayback
	{
		public delegate void Callback();

		internal IntPtr m_Ptr;

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void StartPlayback();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void PausePlayback();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void StopPlayback();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern VideoError GetStatus();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool IsReady();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool IsPlaying();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void Step();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool CanStep();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern uint GetWidth();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern uint GetHeight();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern float GetFrameRate();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern float GetDuration();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern ulong GetFrameCount();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern uint GetPixelAspectRatioNumerator();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern uint GetPixelAspectRatioDenominator();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern VideoPixelFormat GetPixelFormat();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool CanNotSkipOnDrop();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void SetSkipOnDrop(bool skipOnDrop);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool GetTexture(Texture texture, out long outputFrameNum);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void SeekToFrame(long frameIndex, Callback seekCompletedCallback);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void SeekToTime(double secs, Callback seekCompletedCallback);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern float GetPlaybackSpeed();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void SetPlaybackSpeed(float value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool GetLoop();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void SetLoop(bool value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void SetAdjustToLinearSpace(bool enable);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeHeader("Modules/Audio/Public/AudioSource.h")]
		public extern ushort GetAudioTrackCount();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern ushort GetAudioChannelCount(ushort trackIdx);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern uint GetAudioSampleRate(ushort trackIdx);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void SetAudioTarget(ushort trackIdx, bool enabled, bool softwareOutput, AudioSource audioSource);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern uint GetAudioSampleProviderId(ushort trackIndex);

		public AudioSampleProvider GetAudioSampleProvider(ushort trackIndex)
		{
			if (trackIndex >= GetAudioTrackCount())
			{
				throw new ArgumentOutOfRangeException("trackIndex", trackIndex, "VideoPlayback has " + GetAudioTrackCount() + " tracks.");
			}
			AudioSampleProvider val = AudioSampleProvider.Lookup(GetAudioSampleProviderId(trackIndex), (Object)null, trackIndex);
			if (val == null)
			{
				throw new InvalidOperationException("VideoPlayback.GetAudioSampleProvider got null provider.");
			}
			if (val.owner != (Object)null)
			{
				throw new InvalidOperationException("Internal error: VideoPlayback.GetAudioSampleProvider got unexpected non-null provider owner.");
			}
			if (val.trackIndex != trackIndex)
			{
				throw new InvalidOperationException("Internal error: VideoPlayback.GetAudioSampleProvider got provider for track " + val.trackIndex + " instead of " + trackIndex);
			}
			return val;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool PlatformSupportsH265();
	}
}
namespace UnityEngine.Video
{
	[RequiredByNativeCode]
	[NativeHeader("Modules/Video/Public/VideoClip.h")]
	public sealed class VideoClip : Object
	{
		public extern string originalPath
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern ulong frameCount
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern double frameRate
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		[NativeName("Duration")]
		public extern double length
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern uint width
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern uint height
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern uint pixelAspectRatioNumerator
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern uint pixelAspectRatioDenominator
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern bool sRGB
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("IssRGB")]
			get;
		}

		public extern ushort audioTrackCount
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		private VideoClip()
		{
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern ushort GetAudioChannelCount(ushort audioTrackIdx);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern uint GetAudioSampleRate(ushort audioTrackIdx);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern string GetAudioLanguage(ushort audioTrackIdx);
	}
}
namespace UnityEngine.Experimental.Video
{
	[NativeHeader("Modules/Video/Public/ScriptBindings/VideoClipPlayable.bindings.h")]
	[NativeHeader("Modules/Video/Public/Director/VideoClipPlayable.h")]
	[NativeHeader("Modules/Video/Public/VideoClip.h")]
	[NativeHeader("Runtime/Director/Core/HPlayable.h")]
	[RequiredByNativeCode]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	public struct VideoClipPlayable : IPlayable, IEquatable<VideoClipPlayable>
	{
		private PlayableHandle m_Handle;

		internal VideoClipPlayable(PlayableHandle handle)
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			if (((PlayableHandle)(ref handle)).IsValid() && !((PlayableHandle)(ref handle)).IsPlayableOfType<VideoClipPlayable>())
			{
				throw new InvalidCastException("Can't set handle: the playable is not an VideoClipPlayable.");
			}
			m_Handle = handle;
		}

		public static VideoClipPlayable Create(PlayableGraph graph, VideoClip clip, bool looping)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			PlayableHandle handle = CreateHandle(graph, clip, looping);
			VideoClipPlayable videoClipPlayable = new VideoClipPlayable(handle);
			if ((Object)(object)clip != (Object)null)
			{
				PlayableExtensions.SetDuration<VideoClipPlayable>(videoClipPlayable, clip.length);
			}
			return videoClipPlayable;
		}

		private static PlayableHandle CreateHandle(PlayableGraph graph, VideoClip clip, bool looping)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			PlayableHandle handle = PlayableHandle.Null;
			if (!InternalCreateVideoClipPlayable(ref graph, clip, looping, ref handle))
			{
				return PlayableHandle.Null;
			}
			return handle;
		}

		public PlayableHandle GetHandle()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			return m_Handle;
		}

		public static implicit operator Playable(VideoClipPlayable playable)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			return new Playable(playable.GetHandle());
		}

		public static explicit operator VideoClipPlayable(Playable playable)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			return new VideoClipPlayable(((Playable)(ref playable)).GetHandle());
		}

		public bool Equals(VideoClipPlayable other)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			return GetHandle() == other.GetHandle();
		}

		public VideoClip GetClip()
		{
			return GetClipInternal(ref m_Handle);
		}

		public void SetClip(VideoClip value)
		{
			SetClipInternal(ref m_Handle, value);
		}

		public bool GetLooped()
		{
			return GetLoopedInternal(ref m_Handle);
		}

		public void SetLooped(bool value)
		{
			SetLoopedInternal(ref m_Handle, value);
		}

		public bool IsPlaying()
		{
			return GetIsPlayingInternal(ref m_Handle);
		}

		public double GetStartDelay()
		{
			return GetStartDelayInternal(ref m_Handle);
		}

		internal void SetStartDelay(double value)
		{
			ValidateStartDelayInternal(value);
			SetStartDelayInternal(ref m_Handle, value);
		}

		public double GetPauseDelay()
		{
			return GetPauseDelayInternal(ref m_Handle);
		}

		internal void GetPauseDelay(double value)
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Invalid comparison between Unknown and I4
			double pauseDelayInternal = GetPauseDelayInternal(ref m_Handle);
			if ((int)((PlayableHandle)(ref m_Handle)).GetPlayState() == 1 && (value < 0.05 || (pauseDelayInternal != 0.0 && pauseDelayInternal < 0.05)))
			{
				throw new ArgumentException("VideoClipPlayable.pauseDelay: Setting new delay when existing delay is too small or 0.0 (" + pauseDelayInternal + "), Video system will not be able to change in time");
			}
			SetPauseDelayInternal(ref m_Handle, value);
		}

		public void Seek(double startTime, double startDelay)
		{
			Seek(startTime, startDelay, 0.0);
		}

		public void Seek(double startTime, double startDelay, [DefaultValue("0")] double duration)
		{
			ValidateStartDelayInternal(startDelay);
			SetStartDelayInternal(ref m_Handle, startDelay);
			if (duration > 0.0)
			{
				((PlayableHandle)(ref m_Handle)).SetDuration(duration + startTime);
				SetPauseDelayInternal(ref m_Handle, startDelay + duration);
			}
			else
			{
				((PlayableHandle)(ref m_Handle)).SetDuration(double.MaxValue);
				SetPauseDelayInternal(ref m_Handle, 0.0);
			}
			((PlayableHandle)(ref m_Handle)).SetTime(startTime);
			((PlayableHandle)(ref m_Handle)).Play();
		}

		private void ValidateStartDelayInternal(double startDelay)
		{
			double startDelayInternal = GetStartDelayInternal(ref m_Handle);
			if (IsPlaying() && (startDelay < 0.05 || (startDelayInternal >= 1E-05 && startDelayInternal < 0.05)))
			{
				Debug.LogWarning((object)("VideoClipPlayable.StartDelay: Setting new delay when existing delay is too small or 0.0 (" + startDelayInternal + "), Video system will not be able to change in time"));
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern VideoClip GetClipInternal(ref PlayableHandle hdl);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern void SetClipInternal(ref PlayableHandle hdl, VideoClip clip);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern bool GetLoopedInternal(ref PlayableHandle hdl);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern void SetLoopedInternal(ref PlayableHandle hdl, bool looped);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern bool GetIsPlayingInternal(ref PlayableHandle hdl);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern double GetStartDelayInternal(ref PlayableHandle hdl);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern void SetStartDelayInternal(ref PlayableHandle hdl, double delay);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern double GetPauseDelayInternal(ref PlayableHandle hdl);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern void SetPauseDelayInternal(ref PlayableHandle hdl, double delay);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern bool InternalCreateVideoClipPlayable(ref PlayableGraph graph, VideoClip clip, bool looping, ref PlayableHandle handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		private static extern bool ValidateType(ref PlayableHandle hdl);
	}
}
namespace UnityEngineInternal.Video
{
	[UsedByNativeCode]
	[NativeHeader("Modules/Video/Public/Base/VideoMediaPlayback.h")]
	internal class VideoPlaybackMgr : IDisposable
	{
		public delegate void Callback();

		public delegate void MessageCallback(string message);

		internal IntPtr m_Ptr;

		public extern ulong videoPlaybackCount
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public VideoPlaybackMgr()
		{
			m_Ptr = Internal_Create();
		}

		public void Dispose()
		{
			if (m_Ptr != IntPtr.Zero)
			{
				Internal_Destroy(m_Ptr);
				m_Ptr = IntPtr.Zero;
			}
			GC.SuppressFinalize(this);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern IntPtr Internal_Create();

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void Internal_Destroy(IntPtr ptr);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern VideoPlayback CreateVideoPlayback(string fileName, MessageCallback errorCallback, Callback readyCallback, Callback reachedEndCallback);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void ReleaseVideoPlayback(VideoPlayback playback);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void Update();

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern void ProcessOSMainLoopMessagesForTesting();
	}
}
namespace UnityEngine.Video
{
	[RequiredByNativeCode]
	public enum VideoRenderMode
	{
		CameraFarPlane,
		CameraNearPlane,
		RenderTexture,
		MaterialOverride,
		APIOnly
	}
	[RequiredByNativeCode]
	public enum Video3DLayout
	{
		No3D,
		SideBySide3D,
		OverUnder3D
	}
	[RequiredByNativeCode]
	public enum VideoAspectRatio
	{
		NoScaling,
		FitVertically,
		FitHorizontally,
		FitInside,
		FitOutside,
		Stretch
	}
	[RequiredByNativeCode]
	public enum VideoTimeSource
	{
		AudioDSPTimeSource,
		GameTimeSource
	}
	[RequiredByNativeCode]
	public enum VideoTimeReference
	{
		Freerun,
		InternalTime,
		ExternalTime
	}
	[RequiredByNativeCode]
	public enum VideoSource
	{
		VideoClip,
		Url
	}
	[RequiredByNativeCode]
	public enum VideoAudioOutputMode
	{
		None,
		AudioSource,
		Direct,
		APIOnly
	}
	[NativeHeader("Modules/Video/Public/VideoPlayer.h")]
	[RequiredByNativeCode]
	[RequireComponent(typeof(Transform))]
	public sealed class VideoPlayer : Behaviour
	{
		public delegate void EventHandler(VideoPlayer source);

		public delegate void ErrorEventHandler(VideoPlayer source, string message);

		public delegate void FrameReadyEventHandler(VideoPlayer source, long frameIdx);

		public delegate void TimeEventHandler(VideoPlayer source, double seconds);

		public extern VideoSource source
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeName("VideoUrl")]
		public extern string url
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeName("VideoClip")]
		public extern VideoClip clip
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern VideoRenderMode renderMode
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeHeader("Runtime/Camera/Camera.h")]
		public extern Camera targetCamera
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeHeader("Runtime/Graphics/RenderTexture.h")]
		public extern RenderTexture targetTexture
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeHeader("Runtime/Graphics/Renderer.h")]
		public extern Renderer targetMaterialRenderer
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern string targetMaterialProperty
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern VideoAspectRatio aspectRatio
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float targetCameraAlpha
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern Video3DLayout targetCamera3DLayout
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeHeader("Runtime/Graphics/Texture.h")]
		public extern Texture texture
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern bool isPrepared
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("IsPrepared")]
			get;
		}

		public extern bool waitForFirstFrame
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool playOnAwake
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool isPlaying
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("IsPlaying")]
			get;
		}

		public extern bool isPaused
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("IsPaused")]
			get;
		}

		public extern bool canSetTime
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("CanSetTime")]
			get;
		}

		[NativeName("SecPosition")]
		public extern double time
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeName("FramePosition")]
		public extern long frame
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern double clockTime
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern bool canStep
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("CanStep")]
			get;
		}

		public extern bool canSetPlaybackSpeed
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("CanSetPlaybackSpeed")]
			get;
		}

		public extern float playbackSpeed
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeName("Loop")]
		public extern bool isLooping
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool canSetTimeSource
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("CanSetTimeSource")]
			get;
		}

		public extern VideoTimeSource timeSource
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern VideoTimeReference timeReference
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern double externalReferenceTime
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool canSetSkipOnDrop
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("CanSetSkipOnDrop")]
			get;
		}

		public extern bool skipOnDrop
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern ulong frameCount
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern float frameRate
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		[NativeName("Duration")]
		public extern double length
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern uint width
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern uint height
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern uint pixelAspectRatioNumerator
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern uint pixelAspectRatioDenominator
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern ushort audioTrackCount
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public static extern ushort controlledAudioTrackMaxCount
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public ushort controlledAudioTrackCount
		{
			get
			{
				return GetControlledAudioTrackCount();
			}
			set
			{
				int num = controlledAudioTrackMaxCount;
				if (value > num)
				{
					throw new ArgumentException($"Cannot control more than {num} tracks.", "value");
				}
				SetControlledAudioTrackCount(value);
			}
		}

		public extern VideoAudioOutputMode audioOutputMode
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool canSetDirectAudioVolume
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("CanSetDirectAudioVolume")]
			get;
		}

		public extern bool sendFrameReadyEvents
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("AreFrameReadyEventsEnabled")]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("EnableFrameReadyEvents")]
			set;
		}

		public event EventHandler prepareCompleted;

		public event EventHandler loopPointReached;

		public event EventHandler started;

		public event EventHandler frameDropped;

		public event ErrorEventHandler errorReceived;

		public event EventHandler seekCompleted;

		public event TimeEventHandler clockResyncOccurred;

		public event FrameReadyEventHandler frameReady;

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void Prepare();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void Play();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void Pause();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void Stop();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void StepForward();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern string GetAudioLanguageCode(ushort trackIndex);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern ushort GetAudioChannelCount(ushort trackIndex);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern uint GetAudioSampleRate(ushort trackIndex);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern ushort GetControlledAudioTrackCount();

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void SetControlledAudioTrackCount(ushort value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void EnableAudioTrack(ushort trackIndex, bool enabled);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool IsAudioTrackEnabled(ushort trackIndex);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern float GetDirectAudioVolume(ushort trackIndex);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void SetDirectAudioVolume(ushort trackIndex, float volume);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool GetDirectAudioMute(ushort trackIndex);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void SetDirectAudioMute(ushort trackIndex, bool mute);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeHeader("Modules/Audio/Public/AudioSource.h")]
		public extern AudioSource GetTargetAudioSource(ushort trackIndex);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void SetTargetAudioSource(ushort trackIndex, AudioSource source);

		[RequiredByNativeCode]
		private static void InvokePrepareCompletedCallback_Internal(VideoPlayer source)
		{
			if (source.prepareCompleted != null)
			{
				source.prepareCompleted(source);
			}
		}

		[RequiredByNativeCode]
		private static void InvokeFrameReadyCallback_Internal(VideoPlayer source, long frameIdx)
		{
			if (source.frameReady != null)
			{
				source.frameReady(source, frameIdx);
			}
		}

		[RequiredByNativeCode]
		private static void InvokeLoopPointReachedCallback_Internal(VideoPlayer source)
		{
			if (source.loopPointReached != null)
			{
				source.loopPointReached(source);
			}
		}

		[RequiredByNativeCode]
		private static void InvokeStartedCallback_Internal(VideoPlayer source)
		{
			if (source.started != null)
			{
				source.started(source);
			}
		}

		[RequiredByNativeCode]
		private static void InvokeFrameDroppedCallback_Internal(VideoPlayer source)
		{
			if (source.frameDropped != null)
			{
				source.frameDropped(source);
			}
		}

		[RequiredByNativeCode]
		private static void InvokeErrorReceivedCallback_Internal(VideoPlayer source, string errorStr)
		{
			if (source.errorReceived != null)
			{
				source.errorReceived(source, errorStr);
			}
		}

		[RequiredByNativeCode]
		private static void InvokeSeekCompletedCallback_Internal(VideoPlayer source)
		{
			if (source.seekCompleted != null)
			{
				source.seekCompleted(source);
			}
		}

		[RequiredByNativeCode]
		private static void InvokeClockResyncOccurredCallback_Internal(VideoPlayer source, double seconds)
		{
			if (source.clockResyncOccurred != null)
			{
				source.clockResyncOccurred(source, seconds);
			}
		}
	}
}
namespace UnityEngine.Experimental.Video
{
	[NativeHeader("Modules/Video/Public/VideoPlayer.h")]
	[NativeHeader("Modules/Video/Public/ScriptBindings/VideoPlayerExtensions.bindings.h")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeHeader("VideoScriptingClasses.h")]
	public static class VideoPlayerExtensions
	{
		public static AudioSampleProvider GetAudioSampleProvider(this VideoPlayer vp, ushort trackIndex)
		{
			ushort controlledAudioTrackCount = vp.controlledAudioTrackCount;
			if (trackIndex >= controlledAudioTrackCount)
			{
				throw new ArgumentOutOfRangeException("trackIndex", trackIndex, "VideoPlayer is currently configured with " + controlledAudioTrackCount + " tracks.");
			}
			VideoAudioOutputMode audioOutputMode = vp.audioOutputMode;
			if (audioOutputMode != VideoAudioOutputMode.APIOnly)
			{
				throw new InvalidOperationException("VideoPlayer.GetAudioSampleProvider requires audioOutputMode to be APIOnly. Current: " + audioOutputMode);
			}
			AudioSampleProvider val = AudioSampleProvider.Lookup(vp.InternalGetAudioSampleProviderId(trackIndex), (Object)(object)vp, trackIndex);
			if (val == null)
			{
				throw new InvalidOperationException("VideoPlayer.GetAudioSampleProvider got null provider.");
			}
			if (val.owner != (Object)(object)vp)
			{
				throw new InvalidOperationException("Internal error: VideoPlayer.GetAudioSampleProvider got provider used by another object.");
			}
			if (val.trackIndex != trackIndex)
			{
				throw new InvalidOperationException("Internal error: VideoPlayer.GetAudioSampleProvider got provider for track " + val.trackIndex + " instead of " + trackIndex);
			}
			return val;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern uint InternalGetAudioSampleProviderId(this VideoPlayer vp, ushort trackIndex);
	}
}

Room Architect Tool_Data/Managed/UnityEngine.VRModule.dll

Decompiled 3 months ago
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;
using UnityEngine.Internal;
using UnityEngine.Rendering;
using UnityEngine.Scripting;
using UnityEngine.XR;

[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: UnityEngineModuleAssembly]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine.VR
{
	[Obsolete("VRDeviceType is deprecated. Use XRSettings.supportedDevices instead.", true)]
	public enum VRDeviceType
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		[Obsolete("Enum member VRDeviceType.Morpheus has been deprecated. Use VRDeviceType.PlayStationVR instead (UnityUpgradable) -> PlayStationVR", true)]
		Morpheus = -1,
		None,
		Stereo,
		Split,
		Oculus,
		PlayStationVR,
		Unknown
	}
	[Obsolete("TrackingSpaceType has been moved.  Use UnityEngine.XR.TrackingSpaceType instead (UnityUpgradable) -> UnityEngine.XR.TrackingSpaceType", true)]
	[EditorBrowsable(EditorBrowsableState.Never)]
	public enum TrackingSpaceType
	{
		Stationary,
		RoomScale
	}
	[Obsolete("UserPresenceState has been moved.  Use UnityEngine.XR.UserPresenceState instead (UnityUpgradable) -> UnityEngine.XR.UserPresenceState", true)]
	[EditorBrowsable(EditorBrowsableState.Never)]
	public enum UserPresenceState
	{
		Unsupported = -1,
		NotPresent,
		Present,
		Unknown
	}
	[EditorBrowsable(EditorBrowsableState.Never)]
	[Obsolete("VRSettings has been moved and renamed.  Use UnityEngine.XR.XRSettings instead (UnityUpgradable)", true)]
	public static class VRSettings
	{
		public static bool enabled
		{
			get
			{
				throw new NotSupportedException("VRSettings has been moved and renamed.  Use UnityEngine.XR.XRSettings instead.");
			}
			set
			{
				throw new NotSupportedException("VRSettings has been moved and renamed.  Use UnityEngine.XR.XRSettings instead.");
			}
		}

		public static bool isDeviceActive
		{
			get
			{
				throw new NotSupportedException("VRSettings has been moved and renamed.  Use UnityEngine.XR.XRSettings instead.");
			}
		}

		public static bool showDeviceView
		{
			get
			{
				throw new NotSupportedException("VRSettings has been moved and renamed.  Use UnityEngine.XR.XRSettings instead.");
			}
			set
			{
				throw new NotSupportedException("VRSettings has been moved and renamed.  Use UnityEngine.XR.XRSettings instead.");
			}
		}

		public static float renderScale
		{
			get
			{
				throw new NotSupportedException("VRSettings.renderScale has been moved and renamed.  Use UnityEngine.XR.XRSettings.eyeTextureResolutionScale instead.");
			}
			set
			{
				throw new NotSupportedException("VRSettings.renderScale has been moved and renamed.  Use UnityEngine.XR.XRSettings.eyeTextureResolutionScale instead.");
			}
		}

		public static int eyeTextureWidth
		{
			get
			{
				throw new NotSupportedException("VRSettings has been moved and renamed.  Use UnityEngine.XR.XRSettings instead.");
			}
		}

		public static int eyeTextureHeight
		{
			get
			{
				throw new NotSupportedException("VRSettings has been moved and renamed.  Use UnityEngine.XR.XRSettings instead.");
			}
		}

		public static float renderViewportScale
		{
			get
			{
				throw new NotSupportedException("VRSettings has been moved and renamed.  Use UnityEngine.XR.XRSettings instead.");
			}
			set
			{
				throw new NotSupportedException("VRSettings has been moved and renamed.  Use UnityEngine.XR.XRSettings instead.");
			}
		}

		public static float occlusionMaskScale
		{
			get
			{
				throw new NotSupportedException("VRSettings has been moved and renamed.  Use UnityEngine.XR.XRSettings instead.");
			}
			set
			{
				throw new NotSupportedException("VRSettings has been moved and renamed.  Use UnityEngine.XR.XRSettings instead.");
			}
		}

		[Obsolete("loadedDevice is deprecated.  Use loadedDeviceName and LoadDeviceByName instead.", true)]
		public static VRDeviceType loadedDevice
		{
			get
			{
				throw new NotSupportedException("VRSettings has been moved and renamed.  Use UnityEngine.XR.XRSettings instead.");
			}
			set
			{
				throw new NotSupportedException("VRSettings has been moved and renamed.  Use UnityEngine.XR.XRSettings instead.");
			}
		}

		public static string loadedDeviceName
		{
			get
			{
				throw new NotSupportedException("VRSettings has been moved and renamed.  Use UnityEngine.XR.XRSettings instead.");
			}
		}

		public static string[] supportedDevices
		{
			get
			{
				throw new NotSupportedException("VRSettings has been moved and renamed.  Use UnityEngine.XR.XRSettings instead.");
			}
		}

		public static void LoadDeviceByName(string deviceName)
		{
			throw new NotSupportedException("VRSettings has been moved and renamed.  Use UnityEngine.XR.XRSettings instead.");
		}

		public static void LoadDeviceByName(string[] prioritizedDeviceNameList)
		{
			throw new NotSupportedException("VRSettings has been moved and renamed.  Use UnityEngine.XR.XRSettings instead.");
		}
	}
	[Obsolete("VRDevice has been moved and renamed.  Use UnityEngine.XR.XRDevice instead (UnityUpgradable) -> UnityEngine.XR.XRDevice", true)]
	[EditorBrowsable(EditorBrowsableState.Never)]
	public static class VRDevice
	{
		public static bool isPresent
		{
			get
			{
				throw new NotSupportedException("VRDevice has been moved and renamed.  Use UnityEngine.XR.XRDevice instead.");
			}
		}

		public static UnityEngine.XR.UserPresenceState userPresence
		{
			get
			{
				throw new NotSupportedException("VRDevice has been moved and renamed.  Use UnityEngine.XR.XRDevice instead.");
			}
		}

		[Obsolete("family is deprecated.  Use XRSettings.loadedDeviceName instead.", true)]
		public static string family
		{
			get
			{
				throw new NotSupportedException("VRDevice has been moved and renamed.  Use UnityEngine.XR.XRDevice instead.");
			}
		}

		public static string model
		{
			get
			{
				throw new NotSupportedException("VRDevice has been moved and renamed.  Use UnityEngine.XR.XRDevice instead.");
			}
		}

		public static float refreshRate
		{
			get
			{
				throw new NotSupportedException("VRDevice has been moved and renamed.  Use UnityEngine.XR.XRDevice instead.");
			}
		}

		public static UnityEngine.XR.TrackingSpaceType GetTrackingSpaceType()
		{
			throw new NotSupportedException("VRDevice has been moved and renamed.  Use UnityEngine.XR.XRDevice instead.");
		}

		public static bool SetTrackingSpaceType(UnityEngine.XR.TrackingSpaceType trackingSpaceType)
		{
			throw new NotSupportedException("VRDevice has been moved and renamed.  Use UnityEngine.XR.XRDevice instead.");
		}

		public static IntPtr GetNativePtr()
		{
			throw new NotSupportedException("VRDevice has been moved and renamed.  Use UnityEngine.XR.XRDevice instead.");
		}

		[Obsolete("DisableAutoVRCameraTracking has been moved and renamed.  Use UnityEngine.XR.XRDevice.DisableAutoXRCameraTracking instead (UnityUpgradable) -> UnityEngine.XR.XRDevice.DisableAutoXRCameraTracking(*)", true)]
		[EditorBrowsable(EditorBrowsableState.Never)]
		public static void DisableAutoVRCameraTracking(Camera camera, bool disabled)
		{
			throw new NotSupportedException("VRDevice has been moved and renamed.  Use UnityEngine.XR.XRDevice instead.");
		}
	}
	[Obsolete("VRStats has been moved and renamed.  Use UnityEngine.XR.XRStats instead (UnityUpgradable) -> UnityEngine.XR.XRStats", true)]
	[EditorBrowsable(EditorBrowsableState.Never)]
	public static class VRStats
	{
		[Obsolete("gpuTimeLastFrame is deprecated. Use XRStats.TryGetGPUTimeLastFrame instead.", true)]
		public static float gpuTimeLastFrame
		{
			get
			{
				throw new NotSupportedException("VRStats has been moved and renamed.  Use UnityEngine.XR.XRStats instead.");
			}
		}

		public static bool TryGetGPUTimeLastFrame(out float gpuTimeLastFrame)
		{
			gpuTimeLastFrame = 0f;
			throw new NotSupportedException("VRStats has been moved and renamed.  Use UnityEngine.XR.XRStats instead.");
		}

		public static bool TryGetDroppedFrameCount(out int droppedFrameCount)
		{
			droppedFrameCount = 0;
			throw new NotSupportedException("VRStats has been moved and renamed.  Use UnityEngine.XR.XRStats instead.");
		}

		public static bool TryGetFramePresentCount(out int framePresentCount)
		{
			framePresentCount = 0;
			throw new NotSupportedException("VRStats has been moved and renamed.  Use UnityEngine.XR.XRStats instead.");
		}
	}
	[EditorBrowsable(EditorBrowsableState.Never)]
	[Obsolete("InputTracking has been moved.  Use UnityEngine.XR.InputTracking instead (UnityUpgradable) -> UnityEngine.XR.InputTracking", true)]
	public static class InputTracking
	{
		public static bool disablePositionalTracking
		{
			get
			{
				throw new NotSupportedException("InputTracking has been moved.  Use UnityEngine.XR.InputTracking instead.");
			}
			set
			{
				throw new NotSupportedException("InputTracking has been moved.  Use UnityEngine.XR.InputTracking instead.");
			}
		}

		public static Vector3 GetLocalPosition(VRNode node)
		{
			throw new NotSupportedException("InputTracking has been moved.  Use UnityEngine.XR.InputTracking instead.");
		}

		public static void Recenter()
		{
			throw new NotSupportedException("InputTracking has been moved.  Use UnityEngine.XR.InputTracking instead.");
		}

		public static string GetNodeName(ulong uniqueID)
		{
			throw new NotSupportedException("InputTracking has been moved.  Use UnityEngine.XR.InputTracking instead.");
		}

		public static void GetNodeStates(List<VRNodeState> nodeStates)
		{
			throw new NotSupportedException("InputTracking has been moved.  Use UnityEngine.XR.InputTracking instead.");
		}
	}
	[Obsolete("VRNode has been moved and renamed.  Use UnityEngine.XR.XRNode instead (UnityUpgradable) -> UnityEngine.XR.XRNode", true)]
	public enum VRNode
	{
		LeftEye,
		RightEye,
		CenterEye,
		Head,
		LeftHand,
		RightHand,
		GameController,
		TrackingReference,
		HardwareTracker
	}
	[Obsolete("VRNodeState has been moved and renamed.  Use UnityEngine.XR.XRNodeState instead (UnityUpgradable) -> UnityEngine.XR.XRNodeState", true)]
	[EditorBrowsable(EditorBrowsableState.Never)]
	public struct VRNodeState
	{
		public ulong uniqueID
		{
			get
			{
				throw new NotSupportedException("VRNodeState has been moved and renamed.  Use UnityEngine.XR.XRNodeState instead.");
			}
			set
			{
				throw new NotSupportedException("VRNodeState has been moved and renamed.  Use UnityEngine.XR.XRNodeState instead.");
			}
		}

		public VRNode nodeType
		{
			get
			{
				throw new NotSupportedException("VRNodeState has been moved and renamed.  Use UnityEngine.XR.XRNodeState instead.");
			}
			set
			{
				throw new NotSupportedException("VRNodeState has been moved and renamed.  Use UnityEngine.XR.XRNodeState instead.");
			}
		}

		public bool tracked
		{
			get
			{
				throw new NotSupportedException("VRNodeState has been moved and renamed.  Use UnityEngine.XR.XRNodeState instead.");
			}
			set
			{
				throw new NotSupportedException("VRNodeState has been moved and renamed.  Use UnityEngine.XR.XRNodeState instead.");
			}
		}

		public Vector3 position
		{
			set
			{
				throw new NotSupportedException("VRNodeState has been moved and renamed.  Use UnityEngine.XR.XRNodeState instead.");
			}
		}

		public Quaternion rotation
		{
			set
			{
				throw new NotSupportedException("VRNodeState has been moved and renamed.  Use UnityEngine.XR.XRNodeState instead.");
			}
		}

		public Vector3 velocity
		{
			set
			{
				throw new NotSupportedException("VRNodeState has been moved and renamed.  Use UnityEngine.XR.XRNodeState instead.");
			}
		}

		public Vector3 angularVelocity
		{
			set
			{
				throw new NotSupportedException("VRNodeState has been moved and renamed.  Use UnityEngine.XR.XRNodeState instead.");
			}
		}

		public Vector3 acceleration
		{
			set
			{
				throw new NotSupportedException("VRNodeState has been moved and renamed.  Use UnityEngine.XR.XRNodeState instead.");
			}
		}

		public Vector3 angularAcceleration
		{
			set
			{
				throw new NotSupportedException("VRNodeState has been moved and renamed.  Use UnityEngine.XR.XRNodeState instead.");
			}
		}

		public bool TryGetPosition(out Vector3 position)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			position = default(Vector3);
			throw new NotSupportedException("VRNodeState has been moved and renamed.  Use UnityEngine.XR.XRNodeState instead.");
		}

		public bool TryGetRotation(out Quaternion rotation)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			rotation = default(Quaternion);
			throw new NotSupportedException("VRNodeState has been moved and renamed.  Use UnityEngine.XR.XRNodeState instead.");
		}

		public bool TryGetVelocity(out Vector3 velocity)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			velocity = default(Vector3);
			throw new NotSupportedException("VRNodeState has been moved and renamed.  Use UnityEngine.XR.XRNodeState instead.");
		}

		public bool TryGetAngularVelocity(out Vector3 angularVelocity)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			angularVelocity = default(Vector3);
			throw new NotSupportedException("VRNodeState has been moved and renamed.  Use UnityEngine.XR.XRNodeState instead.");
		}

		public bool TryGetAcceleration(out Vector3 acceleration)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			acceleration = default(Vector3);
			throw new NotSupportedException("VRNodeState has been moved and renamed.  Use UnityEngine.XR.XRNodeState instead.");
		}

		public bool TryGetAngularAcceleration(out Vector3 angularAcceleration)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			angularAcceleration = default(Vector3);
			throw new NotSupportedException("VRNodeState has been moved and renamed.  Use UnityEngine.XR.XRNodeState instead.");
		}
	}
}
namespace UnityEngine.XR
{
	public enum GameViewRenderMode
	{
		None,
		LeftEye,
		RightEye,
		BothEyes,
		OcclusionMesh
	}
	public enum TrackingOriginMode
	{
		Device,
		Floor,
		Unknown
	}
	[NativeHeader("Modules/VR/VRModule.h")]
	[NativeHeader("Runtime/GfxDevice/GfxDeviceTypes.h")]
	[NativeConditional("ENABLE_VR")]
	[NativeHeader("Modules/VR/ScriptBindings/XR.bindings.h")]
	[NativeHeader("Runtime/Interfaces/IVRDevice.h")]
	public static class XRSettings
	{
		public enum StereoRenderingMode
		{
			MultiPass,
			SinglePass,
			SinglePassInstanced,
			SinglePassMultiview
		}

		public static extern bool enabled
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[StaticAccessor(/*Could not decode attribute arguments.*/)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern GameViewRenderMode gameViewRenderMode
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		[NativeName("Active")]
		public static extern bool isDeviceActive
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern bool showDeviceView
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[Obsolete("renderScale is deprecated, use XRSettings.eyeTextureResolutionScale instead (UnityUpgradable) -> eyeTextureResolutionScale", false)]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern float renderScale
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		[NativeName("RenderScale")]
		public static extern float eyeTextureResolutionScale
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern int eyeTextureWidth
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern int eyeTextureHeight
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		[NativeName("DefaultEyeTextureDesc")]
		[NativeConditional("ENABLE_VR", "RenderTextureDesc()")]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static RenderTextureDescriptor eyeTextureDesc
		{
			get
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				get_eyeTextureDesc_Injected(out var ret);
				return ret;
			}
		}

		[NativeName("DeviceEyeTextureDimension")]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern TextureDimension deviceEyeTextureDimension
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public static float renderViewportScale
		{
			get
			{
				return renderViewportScaleInternal;
			}
			set
			{
				if (value < 0f || value > 1f)
				{
					throw new ArgumentOutOfRangeException("value", "Render viewport scale should be between 0 and 1.");
				}
				renderViewportScaleInternal = value;
			}
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		[NativeName("RenderViewportScale")]
		internal static extern float renderViewportScaleInternal
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern float occlusionMaskScale
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern bool useOcclusionMesh
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		[NativeName("DeviceName")]
		public static extern string loadedDeviceName
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public static extern string[] supportedDevices
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern StereoRenderingMode stereoRenderingMode
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public static void LoadDeviceByName(string deviceName)
		{
			LoadDeviceByName(new string[1] { deviceName });
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public static extern void LoadDeviceByName(string[] prioritizedDeviceNameList);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private static extern void get_eyeTextureDesc_Injected(out RenderTextureDescriptor ret);
	}
	public enum UserPresenceState
	{
		Unsupported = -1,
		NotPresent,
		Present,
		Unknown
	}
	public enum TrackingSpaceType
	{
		Stationary,
		RoomScale
	}
	[NativeConditional("ENABLE_VR")]
	public static class XRDevice
	{
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		[NativeName("DeviceConnected")]
		public static extern bool isPresent
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public static extern UserPresenceState userPresence
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		[NativeName("DeviceName")]
		[Obsolete("family is deprecated.  Use XRSettings.loadedDeviceName instead.", false)]
		public static extern string family
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		[NativeName("DeviceModel")]
		public static extern string model
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		[NativeName("DeviceRefreshRate")]
		public static extern float refreshRate
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public static extern float fovZoomFactor
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[StaticAccessor(/*Could not decode attribute arguments.*/)]
			[NativeName("SetProjectionZoomFactor")]
			set;
		}

		public static extern TrackingOriginMode trackingOriginMode
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public static event Action<string> deviceLoaded;

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern IntPtr GetNativePtr();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern TrackingSpaceType GetTrackingSpaceType();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern bool SetTrackingSpaceType(TrackingSpaceType trackingSpaceType);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		[NativeName("DisableAutoVRCameraTracking")]
		public static extern void DisableAutoXRCameraTracking([NotNull] Camera camera, bool disabled);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("UpdateEyeTextureMSAASetting")]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern void UpdateEyeTextureMSAASetting();

		[RequiredByNativeCode]
		private static void InvokeDeviceLoaded(string loadedDeviceName)
		{
			if (XRDevice.deviceLoaded != null)
			{
				XRDevice.deviceLoaded(loadedDeviceName);
			}
		}

		static XRDevice()
		{
			XRDevice.deviceLoaded = null;
		}
	}
	[NativeConditional("ENABLE_VR")]
	public static class XRStats
	{
		[Obsolete("gpuTimeLastFrame is deprecated. Use XRStats.TryGetGPUTimeLastFrame instead.", false)]
		public static float gpuTimeLastFrame
		{
			get
			{
				if (TryGetGPUTimeLastFrame(out var result))
				{
					return result;
				}
				return 0f;
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern bool TryGetGPUTimeLastFrame(out float gpuTimeLastFrame);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern bool TryGetDroppedFrameCount(out int droppedFrameCount);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		public static extern bool TryGetFramePresentCount(out int framePresentCount);
	}
}
namespace UnityEngine.Experimental.XR
{
	[NativeConditional("ENABLE_VR")]
	public static class Boundary
	{
		public enum Type
		{
			PlayArea,
			TrackedArea
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		[NativeName("BoundaryVisible")]
		public static extern bool visible
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		[NativeName("BoundaryConfigured")]
		public static extern bool configured
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public static bool TryGetDimensions(out Vector3 dimensionsOut)
		{
			return TryGetDimensions(out dimensionsOut, Type.PlayArea);
		}

		public static bool TryGetDimensions(out Vector3 dimensionsOut, [DefaultValue("Type.PlayArea")] Type boundaryType)
		{
			return TryGetDimensionsInternal(out dimensionsOut, boundaryType);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("TryGetBoundaryDimensions")]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		private static extern bool TryGetDimensionsInternal(out Vector3 dimensionsOut, Type boundaryType);

		public static bool TryGetGeometry(List<Vector3> geometry)
		{
			return TryGetGeometry(geometry, Type.PlayArea);
		}

		public static bool TryGetGeometry(List<Vector3> geometry, [DefaultValue("Type.PlayArea")] Type boundaryType)
		{
			if (geometry == null)
			{
				throw new ArgumentNullException("geometry");
			}
			geometry.Clear();
			return TryGetGeometryScriptingInternal(geometry, boundaryType);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool TryGetGeometryScriptingInternal(List<Vector3> geometry, Type boundaryType);
	}
}
namespace UnityEngine.XR.WSA
{
	[NativeHeader("Modules/VR/HoloLens/HolographicEmulation/HolographicEmulationManager.h")]
	internal enum PlaymodeInputType
	{
		LeftHand,
		RightHand,
		LeftController,
		RightController
	}
	[NativeHeader("Modules/VR/HoloLens/HolographicEmulation/HolographicEmulationManager.h")]
	internal enum Handedness
	{
		Unknown,
		Left,
		Right
	}
	[NativeHeader("Modules/VR/HoloLens/HolographicEmulation/HolographicEmulationManager.h")]
	internal enum SimulatedGesture
	{
		FingerPressed,
		FingerReleased
	}
	[NativeHeader("Modules/VR/HoloLens/HolographicEmulation/HolographicEmulationManager.h")]
	internal enum SimulatedControllerPress
	{
		PressButton,
		ReleaseButton,
		Grip,
		TouchPadPress,
		Select,
		TouchPadTouch,
		ThumbStick
	}
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeHeader("Modules/VR/HoloLens/HolographicEmulation/HolographicEmulationManager.h")]
	[NativeConditional("ENABLE_HOLOLENS_MODULE")]
	internal class HolographicAutomation
	{
		private static SimulatedBody s_Body = new SimulatedBody();

		private static SimulatedHead s_Head = new SimulatedHead();

		private static SimulatedHand s_LeftHand = new SimulatedHand(Handedness.Left);

		private static SimulatedHand s_RightHand = new SimulatedHand(Handedness.Right);

		private static SimulatedSpatialController s_LeftController = new SimulatedSpatialController(Handedness.Left);

		private static SimulatedSpatialController s_RightController = new SimulatedSpatialController(Handedness.Right);

		public static SimulatedBody simulatedBody => s_Body;

		public static SimulatedHead simulatedHead => s_Head;

		public static SimulatedHand simulatedLeftHand => s_LeftHand;

		public static SimulatedHand simulatedRightHand => s_RightHand;

		public static SimulatedSpatialController simulatedLeftController => s_LeftController;

		public static SimulatedSpatialController simulatedRightController => s_RightController;

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern void Initialize();

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern void Shutdown();

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern void LoadRoom(string id);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern void SetEmulationMode(EmulationMode mode);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern void SetPlaymodeInputType(PlaymodeInputType inputType);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("ResetEmulationState")]
		internal static extern void Reset();

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern void PerformGesture(Handedness hand, SimulatedGesture gesture);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern void PerformButtonPress(Handedness hand, SimulatedControllerPress buttonPress);

		[NativeConditional("ENABLE_HOLOLENS_MODULE", StubReturnStatement = "Vector3f::zero")]
		internal static Vector3 GetBodyPosition()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			GetBodyPosition_Injected(out var ret);
			return ret;
		}

		internal static void SetBodyPosition(Vector3 position)
		{
			SetBodyPosition_Injected(ref position);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern float GetBodyRotation();

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern void SetBodyRotation(float degrees);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern float GetBodyHeight();

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern void SetBodyHeight(float degrees);

		[NativeConditional("ENABLE_HOLOLENS_MODULE", StubReturnStatement = "Vector3f::zero")]
		internal static Vector3 GetHeadRotation()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			GetHeadRotation_Injected(out var ret);
			return ret;
		}

		internal static void SetHeadRotation(Vector3 degrees)
		{
			SetHeadRotation_Injected(ref degrees);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern float GetHeadDiameter();

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern void SetHeadDiameter(float degrees);

		[NativeConditional("ENABLE_HOLOLENS_MODULE", StubReturnStatement = "Vector3f::zero")]
		internal static Vector3 GetHandPosition(Handedness hand)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			GetHandPosition_Injected(hand, out var ret);
			return ret;
		}

		internal static void SetHandPosition(Handedness hand, Vector3 position)
		{
			SetHandPosition_Injected(hand, ref position);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool GetHandActivated(Handedness hand);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern void SetHandActivated(Handedness hand, bool activated);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool GetHandVisible(Handedness hand);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern void EnsureHandVisible(Handedness hand);

		[NativeConditional("ENABLE_HOLOLENS_MODULE", StubReturnStatement = "Vector3f::zero")]
		internal static Vector3 GetControllerPosition(Handedness hand)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			GetControllerPosition_Injected(hand, out var ret);
			return ret;
		}

		internal static bool TrySetControllerPosition(Handedness hand, Vector3 position)
		{
			return TrySetControllerPosition_Injected(hand, ref position);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool GetControllerActivated(Handedness hand);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool TrySetControllerActivated(Handedness hand, bool activated);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool GetControllerVisible(Handedness hand);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool TryEnsureControllerVisible(Handedness hand);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void GetBodyPosition_Injected(out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void SetBodyPosition_Injected(ref Vector3 position);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void GetHeadRotation_Injected(out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void SetHeadRotation_Injected(ref Vector3 degrees);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void GetHandPosition_Injected(Handedness hand, out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void SetHandPosition_Injected(Handedness hand, ref Vector3 position);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void GetControllerPosition_Injected(Handedness hand, out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool TrySetControllerPosition_Injected(Handedness hand, ref Vector3 position);
	}
	internal class SimulatedSpatialController
	{
		public Handedness m_ControllerHandednss;

		public Vector3 position
		{
			get
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0012: Unknown result type (might be due to invalid IL or missing references)
				return HolographicAutomation.GetControllerPosition(m_ControllerHandednss);
			}
			set
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				HolographicAutomation.TrySetControllerPosition(m_ControllerHandednss, value);
			}
		}

		public bool activated
		{
			get
			{
				return HolographicAutomation.GetControllerActivated(m_ControllerHandednss);
			}
			set
			{
				HolographicAutomation.TrySetControllerActivated(m_ControllerHandednss, value);
			}
		}

		public bool visible => HolographicAutomation.GetControllerVisible(m_ControllerHandednss);

		internal SimulatedSpatialController(Handedness controller)
		{
			m_ControllerHandednss = controller;
		}

		public void EnsureVisible()
		{
			HolographicAutomation.TryEnsureControllerVisible(m_ControllerHandednss);
		}

		public void PerformControllerPress(SimulatedControllerPress button)
		{
			HolographicAutomation.PerformButtonPress(m_ControllerHandednss, button);
		}
	}
	internal class SimulatedBody
	{
		public Vector3 position
		{
			get
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				return HolographicAutomation.GetBodyPosition();
			}
			set
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				HolographicAutomation.SetBodyPosition(value);
			}
		}

		public float rotation
		{
			get
			{
				return HolographicAutomation.GetBodyRotation();
			}
			set
			{
				HolographicAutomation.SetBodyRotation(value);
			}
		}

		public float height
		{
			get
			{
				return HolographicAutomation.GetBodyHeight();
			}
			set
			{
				HolographicAutomation.SetBodyHeight(value);
			}
		}
	}
	internal class SimulatedHead
	{
		public float diameter
		{
			get
			{
				return HolographicAutomation.GetHeadDiameter();
			}
			set
			{
				HolographicAutomation.SetHeadDiameter(value);
			}
		}

		public Vector3 eulerAngles
		{
			get
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				return HolographicAutomation.GetHeadRotation();
			}
			set
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				HolographicAutomation.SetHeadRotation(value);
			}
		}
	}
	internal class SimulatedHand
	{
		public Handedness m_Hand;

		public Vector3 position
		{
			get
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0012: Unknown result type (might be due to invalid IL or missing references)
				return HolographicAutomation.GetHandPosition(m_Hand);
			}
			set
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				HolographicAutomation.SetHandPosition(m_Hand, value);
			}
		}

		public bool activated
		{
			get
			{
				return HolographicAutomation.GetHandActivated(m_Hand);
			}
			set
			{
				HolographicAutomation.SetHandActivated(m_Hand, value);
			}
		}

		public bool visible => HolographicAutomation.GetHandVisible(m_Hand);

		internal SimulatedHand(Handedness hand)
		{
			m_Hand = hand;
		}

		public void EnsureVisible()
		{
			HolographicAutomation.EnsureHandVisible(m_Hand);
		}

		public void PerformGesture(SimulatedGesture gesture)
		{
			HolographicAutomation.PerformGesture(m_Hand, gesture);
		}
	}
	internal static class HolographicEmulationHelpers
	{
		public const float k_DefaultBodyHeight = 1.776f;

		public const float k_DefaultHeadDiameter = 0.2319999f;

		public const float k_ForwardOffset = 0.0985f;

		public static Vector3 CalcExpectedCameraPosition(SimulatedHead head, SimulatedBody body)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			Vector3 position = body.position;
			position.y += body.height - 1.776f;
			position.y -= head.diameter / 2f;
			position.y += 0.11599995f;
			Vector3 eulerAngles = head.eulerAngles;
			eulerAngles.y += body.rotation;
			Quaternion val = Quaternion.Euler(eulerAngles);
			return position + val * (0.0985f * Vector3.forward);
		}
	}
	[NativeHeader("Modules/VR/HoloLens/PerceptionRemoting.h")]
	public enum HolographicStreamerConnectionState
	{
		Disconnected,
		Connecting,
		Connected
	}
	[NativeHeader("Modules/VR/HoloLens/PerceptionRemoting.h")]
	public enum HolographicStreamerConnectionFailureReason
	{
		None,
		Unknown,
		Unreachable,
		HandshakeFailed,
		ProtocolVersionMismatch,
		ConnectionLost
	}
	[NativeHeader("Modules/VR/HoloLens/PerceptionRemoting.h")]
	internal enum EmulationMode
	{
		None,
		RemoteDevice,
		Simulated
	}
	[NativeHeader("Modules/VR/HoloLens/PerceptionRemoting.h")]
	internal enum RemoteDeviceVersion
	{
		V1,
		V2
	}
	[NativeHeader("Modules/VR/HoloLens/HolographicEmulation/HolographicEmulationManager.h")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	internal class HolographicEmulationHelper
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("GetEmulationMode")]
		[NativeConditional("ENABLE_HOLOLENS_MODULE", StubReturnStatement = "HolographicEmulation::EmulationMode_None")]
		internal static extern EmulationMode GetEmulationMode();
	}
	[NativeConditional("ENABLE_HOLOLENS_MODULE")]
	[NativeHeader("Modules/VR/HoloLens/PerceptionRemoting.h")]
	internal class PerceptionRemoting
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern void SetRemoteDeviceVersion(RemoteDeviceVersion remoteDeviceVersion);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern void Connect(string clientName);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern void Disconnect();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeConditional("ENABLE_HOLOLENS_MODULE", StubReturnStatement = "HolographicEmulation::None")]
		internal static extern HolographicStreamerConnectionFailureReason CheckForDisconnect();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeConditional("ENABLE_HOLOLENS_MODULE", StubReturnStatement = "HolographicEmulation::Disconnected")]
		internal static extern HolographicStreamerConnectionState GetConnectionState();

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern void SetEnableAudio(bool enable);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern void SetEnableVideo(bool enable);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern void SetVideoEncodingParameters(int maxBitRate);
	}
	[NativeHeader("Modules/VR/HoloLens/HolographicSettings.h")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	public class HolographicSettings
	{
		public enum HolographicReprojectionMode
		{
			PositionAndOrientation,
			OrientationOnly,
			Disabled
		}

		public static bool IsDisplayOpaque => true;

		[NativeConditional("ENABLE_HOLOLENS_MODULE")]
		public static extern bool IsContentProtectionEnabled
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public static HolographicReprojectionMode ReprojectionMode
		{
			get
			{
				return HolographicReprojectionMode.Disabled;
			}
			set
			{
			}
		}

		[Obsolete("Support for toggling latent frame presentation has been removed, and IsLatentFramePresentation will always return true", false)]
		public static bool IsLatentFramePresentation => true;

		public static void SetFocusPointForFrame(Vector3 position)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			InternalSetFocusPointForFrameP(position);
		}

		public static void SetFocusPointForFrame(Vector3 position, Vector3 normal)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			InternalSetFocusPointForFramePN(position, normal);
		}

		public static void SetFocusPointForFrame(Vector3 position, Vector3 normal, Vector3 velocity)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			InternalSetFocusPointForFramePNV(position, normal, velocity);
		}

		[NativeConditional("ENABLE_HOLOLENS_MODULE")]
		[NativeName("SetFocusPointForFrame")]
		private static void InternalSetFocusPointForFrameP(Vector3 position)
		{
			InternalSetFocusPointForFrameP_Injected(ref position);
		}

		[NativeConditional("ENABLE_HOLOLENS_MODULE")]
		[NativeName("SetFocusPointForFrame")]
		private static void InternalSetFocusPointForFramePN(Vector3 position, Vector3 normal)
		{
			InternalSetFocusPointForFramePN_Injected(ref position, ref normal);
		}

		[NativeConditional("ENABLE_HOLOLENS_MODULE")]
		[NativeName("SetFocusPointForFrame")]
		private static void InternalSetFocusPointForFramePNV(Vector3 position, Vector3 normal, Vector3 velocity)
		{
			InternalSetFocusPointForFramePNV_Injected(ref position, ref normal, ref velocity);
		}

		[Obsolete("Support for toggling latent frame presentation has been removed", true)]
		public static void ActivateLatentFramePresentation(bool activated)
		{
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalSetFocusPointForFrameP_Injected(ref Vector3 position);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalSetFocusPointForFramePN_Injected(ref Vector3 position, ref Vector3 normal);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void InternalSetFocusPointForFramePNV_Injected(ref Vector3 position, ref Vector3 normal, ref Vector3 velocity);
	}
	public class HolographicRemoting
	{
		public static HolographicStreamerConnectionState ConnectionState => HolographicStreamerConnectionState.Disconnected;

		public static void Connect(string clientName, int maxBitRate = 9999)
		{
		}

		public static void Disconnect()
		{
		}
	}
}
namespace UnityEngine.Internal.VR
{
	public static class VRTestMock
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		public static extern void Reset();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		public static extern void AddTrackedDevice(XRNode nodeType);

		public static void UpdateTrackedDevice(XRNode nodeType, Vector3 position, Quaternion rotation)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			INTERNAL_CALL_UpdateTrackedDevice(nodeType, ref position, ref rotation);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		private static extern void INTERNAL_CALL_UpdateTrackedDevice(XRNode nodeType, ref Vector3 position, ref Quaternion rotation);

		public static void UpdateLeftEye(Vector3 position, Quaternion rotation)
		{
			INTERNAL_CALL_UpdateLeftEye(ref position, ref rotation);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		private static extern void INTERNAL_CALL_UpdateLeftEye(ref Vector3 position, ref Quaternion rotation);

		public static void UpdateRightEye(Vector3 position, Quaternion rotation)
		{
			INTERNAL_CALL_UpdateRightEye(ref position, ref rotation);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		private static extern void INTERNAL_CALL_UpdateRightEye(ref Vector3 position, ref Quaternion rotation);

		public static void UpdateCenterEye(Vector3 position, Quaternion rotation)
		{
			INTERNAL_CALL_UpdateCenterEye(ref position, ref rotation);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		private static extern void INTERNAL_CALL_UpdateCenterEye(ref Vector3 position, ref Quaternion rotation);

		public static void UpdateHead(Vector3 position, Quaternion rotation)
		{
			INTERNAL_CALL_UpdateHead(ref position, ref rotation);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		private static extern void INTERNAL_CALL_UpdateHead(ref Vector3 position, ref Quaternion rotation);

		public static void UpdateLeftHand(Vector3 position, Quaternion rotation)
		{
			INTERNAL_CALL_UpdateLeftHand(ref position, ref rotation);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		private static extern void INTERNAL_CALL_UpdateLeftHand(ref Vector3 position, ref Quaternion rotation);

		public static void UpdateRightHand(Vector3 position, Quaternion rotation)
		{
			INTERNAL_CALL_UpdateRightHand(ref position, ref rotation);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		private static extern void INTERNAL_CALL_UpdateRightHand(ref Vector3 position, ref Quaternion rotation);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		public static extern void AddController(string controllerName);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		public static extern void UpdateControllerAxis(string controllerName, int axis, float value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[GeneratedByOldBindingsGenerator]
		public static extern void UpdateControllerButton(string controllerName, int button, bool pressed);
	}
}

Room Architect Tool_Data/Managed/UnityEngine.WindModule.dll

Decompiled 3 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;

[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine;

public enum WindZoneMode
{
	Directional,
	Spherical
}
[NativeHeader("Modules/Wind/Public/Wind.h")]
public class WindZone : Component
{
	public extern WindZoneMode mode
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float radius
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float windMain
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float windTurbulence
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float windPulseMagnitude
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}

	public extern float windPulseFrequency
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall)]
		set;
	}
}

Room Architect Tool_Data/Managed/UnityEngine.XR.LegacyInputHelpers.dll

Decompiled 3 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using UnityEngine.Experimental.XR.Interaction;
using UnityEngine.SpatialTracking;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("UnityEditor.XR.LegacyInputHelpers")]
[assembly: AssemblyVersion("0.0.0.0")]
namespace UnityEngine.XR.LegacyInputHelpers;

public class ArmModel : BasePoseProvider
{
	private Pose m_FinalPose;

	[SerializeField]
	private XRNode m_PoseSource = (XRNode)4;

	[SerializeField]
	private XRNode m_HeadPoseSource = (XRNode)2;

	[SerializeField]
	private Vector3 m_ElbowRestPosition = DEFAULT_ELBOW_REST_POSITION;

	[SerializeField]
	private Vector3 m_WristRestPosition = DEFAULT_WRIST_REST_POSITION;

	[SerializeField]
	private Vector3 m_ControllerRestPosition = DEFAULT_CONTROLLER_REST_POSITION;

	[SerializeField]
	private Vector3 m_ArmExtensionOffset = DEFAULT_ARM_EXTENSION_OFFSET;

	[Range(0f, 1f)]
	[SerializeField]
	private float m_ElbowBendRatio = 0.6f;

	[SerializeField]
	private bool m_IsLockedToNeck = true;

	protected Vector3 m_NeckPosition;

	protected Vector3 m_ElbowPosition;

	protected Quaternion m_ElbowRotation;

	protected Vector3 m_WristPosition;

	protected Quaternion m_WristRotation;

	protected Vector3 m_ControllerPosition;

	protected Quaternion m_ControllerRotation;

	protected Vector3 m_HandedMultiplier;

	protected Vector3 m_TorsoDirection;

	protected Quaternion m_TorsoRotation;

	protected static readonly Vector3 DEFAULT_ELBOW_REST_POSITION = new Vector3(0.195f, -0.5f, 0.005f);

	protected static readonly Vector3 DEFAULT_WRIST_REST_POSITION = new Vector3(0f, 0f, 0.25f);

	protected static readonly Vector3 DEFAULT_CONTROLLER_REST_POSITION = new Vector3(0f, 0f, 0.05f);

	protected static readonly Vector3 DEFAULT_ARM_EXTENSION_OFFSET = new Vector3(-0.13f, 0.14f, 0.08f);

	protected const float DEFAULT_ELBOW_BEND_RATIO = 0.6f;

	protected const float EXTENSION_WEIGHT = 0.4f;

	protected static readonly Vector3 SHOULDER_POSITION = new Vector3(0.17f, -0.2f, -0.03f);

	protected static readonly Vector3 NECK_OFFSET = new Vector3(0f, 0.075f, 0.08f);

	protected const float MIN_EXTENSION_ANGLE = 7f;

	protected const float MAX_EXTENSION_ANGLE = 60f;

	private List<XRNodeState> xrNodeStateListOrientation = new List<XRNodeState>();

	private List<XRNodeState> xrNodeStateListPosition = new List<XRNodeState>();

	private List<XRNodeState> xrNodeStateListAngularAcceleration = new List<XRNodeState>();

	private List<XRNodeState> xrNodeStateListAngularVelocity = new List<XRNodeState>();

	public Pose finalPose
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return m_FinalPose;
		}
		set
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			m_FinalPose = value;
		}
	}

	public XRNode poseSource
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return m_PoseSource;
		}
		set
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			m_PoseSource = value;
		}
	}

	public XRNode headGameObject
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return m_HeadPoseSource;
		}
		set
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			m_HeadPoseSource = value;
		}
	}

	public Vector3 elbowRestPosition
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return m_ElbowRestPosition;
		}
		set
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			m_ElbowRestPosition = value;
		}
	}

	public Vector3 wristRestPosition
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return m_WristRestPosition;
		}
		set
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			m_WristRestPosition = value;
		}
	}

	public Vector3 controllerRestPosition
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return m_ControllerRestPosition;
		}
		set
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			m_ControllerRestPosition = value;
		}
	}

	public Vector3 armExtensionOffset
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return m_ArmExtensionOffset;
		}
		set
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			m_ArmExtensionOffset = value;
		}
	}

	public float elbowBendRatio
	{
		get
		{
			return m_ElbowBendRatio;
		}
		set
		{
			m_ElbowBendRatio = value;
		}
	}

	public bool isLockedToNeck
	{
		get
		{
			return m_IsLockedToNeck;
		}
		set
		{
			m_IsLockedToNeck = value;
		}
	}

	public Vector3 neckPosition => m_NeckPosition;

	public Vector3 shoulderPosition => m_NeckPosition + m_TorsoRotation * Vector3.Scale(SHOULDER_POSITION, m_HandedMultiplier);

	public Quaternion shoulderRotation => m_TorsoRotation;

	public Vector3 elbowPosition => m_ElbowPosition;

	public Quaternion elbowRotation => m_ElbowRotation;

	public Vector3 wristPosition => m_WristPosition;

	public Quaternion wristRotation => m_WristRotation;

	public Vector3 controllerPosition => m_ControllerPosition;

	public Quaternion controllerRotation => m_ControllerRotation;

	public override PoseDataFlags GetPoseFromProvider(out Pose output)
	{
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		if (OnControllerInputUpdated())
		{
			output = finalPose;
			return (PoseDataFlags)3;
		}
		output = Pose.identity;
		return (PoseDataFlags)0;
	}

	protected virtual void OnEnable()
	{
		UpdateTorsoDirection(forceImmediate: true);
		OnControllerInputUpdated();
	}

	protected virtual void OnDisable()
	{
	}

	public virtual bool OnControllerInputUpdated()
	{
		UpdateHandedness();
		if (UpdateTorsoDirection(forceImmediate: false) && UpdateNeckPosition() && ApplyArmModel())
		{
			return true;
		}
		return false;
	}

	protected virtual void UpdateHandedness()
	{
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0021: Invalid comparison between Unknown and I4
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Invalid comparison between Unknown and I4
		//IL_003e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0044: Invalid comparison between Unknown and I4
		((Vector3)(ref m_HandedMultiplier)).Set(0f, 1f, 1f);
		if ((int)m_PoseSource == 5 || (int)m_PoseSource == 7)
		{
			m_HandedMultiplier.x = 1f;
		}
		else if ((int)m_PoseSource == 4)
		{
			m_HandedMultiplier.x = -1f;
		}
	}

	protected virtual bool UpdateTorsoDirection(bool forceImmediate)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0039: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0030: Unknown result type (might be due to invalid IL or missing references)
		//IL_007e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0084: Unknown result type (might be due to invalid IL or missing references)
		//IL_0089: Unknown result type (might be due to invalid IL or missing references)
		//IL_008e: Unknown result type (might be due to invalid IL or missing references)
		//IL_006c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0071: Unknown result type (might be due to invalid IL or missing references)
		//IL_0073: Unknown result type (might be due to invalid IL or missing references)
		//IL_0078: Unknown result type (might be due to invalid IL or missing references)
		Vector3 forward = default(Vector3);
		if (TryGetForwardVector(m_HeadPoseSource, out forward))
		{
			forward.y = 0f;
			((Vector3)(ref forward)).Normalize();
			Vector3 angularAccel;
			if (forceImmediate)
			{
				m_TorsoDirection = forward;
			}
			else if (TryGetAngularAcceleration(poseSource, out angularAccel))
			{
				float num = Mathf.Clamp((((Vector3)(ref angularAccel)).magnitude - 0.2f) / 45f, 0f, 0.1f);
				m_TorsoDirection = Vector3.Slerp(m_TorsoDirection, forward, num);
			}
			m_TorsoRotation = Quaternion.FromToRotation(Vector3.forward, m_TorsoDirection);
			return true;
		}
		return false;
	}

	protected virtual bool UpdateNeckPosition()
	{
		//IL_0030: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		if (m_IsLockedToNeck && TryGetPosition(m_HeadPoseSource, out m_NeckPosition))
		{
			return ApplyInverseNeckModel(m_NeckPosition, out m_NeckPosition);
		}
		m_NeckPosition = Vector3.zero;
		return true;
	}

	protected virtual bool ApplyArmModel()
	{
		//IL_0024: 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_002b: Unknown result type (might be due to invalid IL or missing references)
		//IL_002e: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0030: Unknown result type (might be due to invalid IL or missing references)
		//IL_0044: Unknown result type (might be due to invalid IL or missing references)
		//IL_0049: Unknown result type (might be due to invalid IL or missing references)
		//IL_0055: Unknown result type (might be due to invalid IL or missing references)
		//IL_005a: Unknown result type (might be due to invalid IL or missing references)
		SetUntransformedJointPositions();
		if (GetControllerRotation(out var rotation, out var xyRotation, out var xAngle))
		{
			float extensionRatio = CalculateExtensionRatio(xAngle);
			ApplyExtensionOffset(extensionRatio);
			Quaternion lerpRotation = CalculateLerpRotation(xyRotation, extensionRatio);
			CalculateFinalJointRotations(rotation, xyRotation, lerpRotation);
			ApplyRotationToJoints();
			m_FinalPose.position = m_ControllerPosition;
			m_FinalPose.rotation = m_ControllerRotation;
			return true;
		}
		return false;
	}

	protected virtual void SetUntransformedJointPositions()
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_001f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_0029: Unknown result type (might be due to invalid IL or missing references)
		//IL_0030: 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)
		//IL_003b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0040: Unknown result type (might be due to invalid IL or missing references)
		m_ElbowPosition = Vector3.Scale(m_ElbowRestPosition, m_HandedMultiplier);
		m_WristPosition = Vector3.Scale(m_WristRestPosition, m_HandedMultiplier);
		m_ControllerPosition = Vector3.Scale(m_ControllerRestPosition, m_HandedMultiplier);
	}

	protected virtual float CalculateExtensionRatio(float xAngle)
	{
		return Mathf.Clamp((xAngle - 7f) / 53f, 0f, 1f);
	}

	protected virtual void ApplyExtensionOffset(float extensionRatio)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		Vector3 val = Vector3.Scale(m_ArmExtensionOffset, m_HandedMultiplier);
		m_ElbowPosition += val * extensionRatio;
	}

	protected virtual Quaternion CalculateLerpRotation(Quaternion xyRotation, float extensionRatio)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0044: Unknown result type (might be due to invalid IL or missing references)
		//IL_0049: Unknown result type (might be due to invalid IL or missing references)
		//IL_004b: Unknown result type (might be due to invalid IL or missing references)
		float num = Quaternion.Angle(xyRotation, Quaternion.identity);
		float num2 = 1f - Mathf.Pow(num / 180f, 6f);
		float num3 = 1f - m_ElbowBendRatio + m_ElbowBendRatio * extensionRatio * 0.4f;
		num3 *= num2;
		return Quaternion.Lerp(Quaternion.identity, xyRotation, num3);
	}

	protected virtual void CalculateFinalJointRotations(Quaternion controllerOrientation, Quaternion xyRotation, Quaternion lerpRotation)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: 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)
		//IL_001f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0031: 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)
		//IL_0037: Unknown result type (might be due to invalid IL or missing references)
		//IL_003c: Unknown result type (might be due to invalid IL or missing references)
		m_ElbowRotation = m_TorsoRotation * Quaternion.Inverse(lerpRotation) * xyRotation;
		m_WristRotation = m_ElbowRotation * lerpRotation;
		m_ControllerRotation = m_TorsoRotation * controllerOrientation;
	}

	protected virtual void ApplyRotationToJoints()
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: 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)
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0030: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: Unknown result type (might be due to invalid IL or missing references)
		//IL_003a: 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)
		//IL_0046: Unknown result type (might be due to invalid IL or missing references)
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0052: Unknown result type (might be due to invalid IL or missing references)
		//IL_0057: Unknown result type (might be due to invalid IL or missing references)
		//IL_005c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0061: Unknown result type (might be due to invalid IL or missing references)
		m_ElbowPosition = m_NeckPosition + m_TorsoRotation * m_ElbowPosition;
		m_WristPosition = m_ElbowPosition + m_ElbowRotation * m_WristPosition;
		m_ControllerPosition = m_WristPosition + m_WristRotation * m_ControllerPosition;
	}

	protected virtual bool ApplyInverseNeckModel(Vector3 headPosition, out Vector3 calculatedPosition)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		//IL_0055: 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)
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_001e: 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_0032: Unknown result type (might be due to invalid IL or missing references)
		//IL_0037: Unknown result type (might be due to invalid IL or missing references)
		//IL_003c: Unknown result type (might be due to invalid IL or missing references)
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_003e: 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)
		//IL_0044: Unknown result type (might be due to invalid IL or missing references)
		//IL_0047: Unknown result type (might be due to invalid IL or missing references)
		//IL_0048: Unknown result type (might be due to invalid IL or missing references)
		Quaternion rotation = default(Quaternion);
		if (TryGetRotation(m_HeadPoseSource, out rotation))
		{
			Vector3 val = rotation * NECK_OFFSET - NECK_OFFSET.y * Vector3.up;
			headPosition -= val;
			calculatedPosition = headPosition;
			return true;
		}
		calculatedPosition = Vector3.zero;
		return false;
	}

	protected bool TryGetForwardVector(XRNode node, out Vector3 forward)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_0038: Unknown result type (might be due to invalid IL or missing references)
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_002b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0030: Unknown result type (might be due to invalid IL or missing references)
		Pose val = default(Pose);
		if (TryGetRotation(node, out val.rotation) && TryGetPosition(node, out val.position))
		{
			forward = ((Pose)(ref val)).forward;
			return true;
		}
		forward = Vector3.zero;
		return false;
	}

	protected bool TryGetRotation(XRNode node, out Quaternion rotation)
	{
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		//IL_0027: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0047: Unknown result type (might be due to invalid IL or missing references)
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		InputTracking.GetNodeStates(xrNodeStateListOrientation);
		int count = xrNodeStateListOrientation.Count;
		for (int i = 0; i < count; i++)
		{
			XRNodeState val = xrNodeStateListOrientation[i];
			if (((XRNodeState)(ref val)).nodeType == node && ((XRNodeState)(ref val)).TryGetRotation(ref rotation))
			{
				return true;
			}
		}
		rotation = Quaternion.identity;
		return false;
	}

	protected bool TryGetPosition(XRNode node, out Vector3 position)
	{
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		//IL_0027: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0047: Unknown result type (might be due to invalid IL or missing references)
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		InputTracking.GetNodeStates(xrNodeStateListPosition);
		int count = xrNodeStateListPosition.Count;
		for (int i = 0; i < count; i++)
		{
			XRNodeState val = xrNodeStateListPosition[i];
			if (((XRNodeState)(ref val)).nodeType == node && ((XRNodeState)(ref val)).TryGetPosition(ref position))
			{
				return true;
			}
		}
		position = Vector3.zero;
		return false;
	}

	protected bool TryGetAngularAcceleration(XRNode node, out Vector3 angularAccel)
	{
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		//IL_0027: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0047: Unknown result type (might be due to invalid IL or missing references)
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		InputTracking.GetNodeStates(xrNodeStateListAngularAcceleration);
		int count = xrNodeStateListAngularAcceleration.Count;
		for (int i = 0; i < count; i++)
		{
			XRNodeState val = xrNodeStateListAngularAcceleration[i];
			if (((XRNodeState)(ref val)).nodeType == node && ((XRNodeState)(ref val)).TryGetAngularAcceleration(ref angularAccel))
			{
				return true;
			}
		}
		angularAccel = Vector3.zero;
		return false;
	}

	protected bool TryGetAngularVelocity(XRNode node, out Vector3 angVel)
	{
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		//IL_0027: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0047: Unknown result type (might be due to invalid IL or missing references)
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		InputTracking.GetNodeStates(xrNodeStateListAngularVelocity);
		int count = xrNodeStateListAngularVelocity.Count;
		for (int i = 0; i < count; i++)
		{
			XRNodeState val = xrNodeStateListAngularVelocity[i];
			if (((XRNodeState)(ref val)).nodeType == node && ((XRNodeState)(ref val)).TryGetAngularVelocity(ref angVel))
			{
				return true;
			}
		}
		angVel = Vector3.zero;
		return false;
	}

	protected bool GetControllerRotation(out Quaternion rotation, out Quaternion xyRotation, out float xAngle)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0063: Unknown result type (might be due to invalid IL or missing references)
		//IL_0068: Unknown result type (might be due to invalid IL or missing references)
		//IL_006e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0073: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0021: 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_002c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0031: 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)
		//IL_003b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		//IL_0055: Unknown result type (might be due to invalid IL or missing references)
		//IL_0056: Unknown result type (might be due to invalid IL or missing references)
		//IL_005b: Unknown result type (might be due to invalid IL or missing references)
		if (TryGetRotation(poseSource, out rotation))
		{
			rotation = Quaternion.Inverse(m_TorsoRotation) * rotation;
			Vector3 val = rotation * Vector3.forward;
			xAngle = 90f - Vector3.Angle(val, Vector3.up);
			xyRotation = Quaternion.FromToRotation(Vector3.forward, val);
			return true;
		}
		rotation = Quaternion.identity;
		xyRotation = Quaternion.identity;
		xAngle = 0f;
		return false;
	}
}
public class SwingArmModel : ArmModel
{
	[Tooltip("Portion of controller rotation applied to the shoulder joint.")]
	[SerializeField]
	[Range(0f, 1f)]
	private float m_ShoulderRotationRatio = 0.5f;

	[Tooltip("Portion of controller rotation applied to the elbow joint.")]
	[Range(0f, 1f)]
	[SerializeField]
	private float m_ElbowRotationRatio = 0.3f;

	[Tooltip("Portion of controller rotation applied to the wrist joint.")]
	[Range(0f, 1f)]
	[SerializeField]
	private float m_WristRotationRatio = 0.2f;

	[SerializeField]
	private Vector2 m_JointShiftAngle = new Vector2(160f, 180f);

	[Tooltip("Exponent applied to the joint shift ratio to control the curve of the shift.")]
	[Range(1f, 20f)]
	[SerializeField]
	private float m_JointShiftExponent = 6f;

	[Tooltip("Portion of controller rotation applied to the shoulder joint when the controller is backwards.")]
	[Range(0f, 1f)]
	[SerializeField]
	private float m_ShiftedShoulderRotationRatio = 0.1f;

	[Tooltip("Portion of controller rotation applied to the elbow joint when the controller is backwards.")]
	[Range(0f, 1f)]
	[SerializeField]
	private float m_ShiftedElbowRotationRatio = 0.4f;

	[Tooltip("Portion of controller rotation applied to the wrist joint when the controller is backwards.")]
	[Range(0f, 1f)]
	[SerializeField]
	private float m_ShiftedWristRotationRatio = 0.5f;

	public float shoulderRotationRatio
	{
		get
		{
			return m_ShoulderRotationRatio;
		}
		set
		{
			m_ShoulderRotationRatio = value;
		}
	}

	public float elbowRotationRatio
	{
		get
		{
			return m_ElbowRotationRatio;
		}
		set
		{
			m_ElbowRotationRatio = value;
		}
	}

	public float wristRotationRatio
	{
		get
		{
			return m_WristRotationRatio;
		}
		set
		{
			m_WristRotationRatio = value;
		}
	}

	public float minJointShiftAngle
	{
		get
		{
			return m_JointShiftAngle.x;
		}
		set
		{
			m_JointShiftAngle.x = value;
		}
	}

	public float maxJointShiftAngle
	{
		get
		{
			return m_JointShiftAngle.y;
		}
		set
		{
			m_JointShiftAngle.y = value;
		}
	}

	public float jointShiftExponent
	{
		get
		{
			return m_JointShiftExponent;
		}
		set
		{
			m_JointShiftExponent = value;
		}
	}

	public float shiftedShoulderRotationRatio
	{
		get
		{
			return m_ShiftedShoulderRotationRatio;
		}
		set
		{
			m_ShiftedShoulderRotationRatio = value;
		}
	}

	public float shiftedElbowRotationRatio
	{
		get
		{
			return m_ShiftedElbowRotationRatio;
		}
		set
		{
			m_ShiftedElbowRotationRatio = value;
		}
	}

	public float shiftedWristRotationRatio
	{
		get
		{
			return m_ShiftedWristRotationRatio;
		}
		set
		{
			m_ShiftedWristRotationRatio = value;
		}
	}

	protected override void CalculateFinalJointRotations(Quaternion controllerOrientation, Quaternion xyRotation, Quaternion lerpRotation)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_006d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0072: Unknown result type (might be due to invalid IL or missing references)
		//IL_0074: Unknown result type (might be due to invalid IL or missing references)
		//IL_0079: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0080: Unknown result type (might be due to invalid IL or missing references)
		//IL_0082: Unknown result type (might be due to invalid IL or missing references)
		//IL_0087: Unknown result type (might be due to invalid IL or missing references)
		//IL_0089: Unknown result type (might be due to invalid IL or missing references)
		//IL_008e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0091: Unknown result type (might be due to invalid IL or missing references)
		//IL_0096: Unknown result type (might be due to invalid IL or missing references)
		//IL_0099: Unknown result type (might be due to invalid IL or missing references)
		//IL_009e: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00de: Unknown result type (might be due to invalid IL or missing references)
		float num = Quaternion.Angle(xyRotation, Quaternion.identity);
		float num2 = maxJointShiftAngle - minJointShiftAngle;
		float num3 = Mathf.Pow(Mathf.Clamp01((num - minJointShiftAngle) / num2), m_JointShiftExponent);
		float num4 = Mathf.Lerp(m_ShoulderRotationRatio, m_ShiftedShoulderRotationRatio, num3);
		float num5 = Mathf.Lerp(m_ElbowRotationRatio, m_ShiftedElbowRotationRatio, num3);
		float num6 = Mathf.Lerp(m_WristRotationRatio, m_ShiftedWristRotationRatio, num3);
		Quaternion val = Quaternion.Lerp(Quaternion.identity, xyRotation, num4);
		Quaternion val2 = Quaternion.Lerp(Quaternion.identity, xyRotation, num5);
		Quaternion val3 = Quaternion.Lerp(Quaternion.identity, xyRotation, num6);
		Quaternion val4 = m_TorsoRotation * val;
		m_ElbowRotation = val4 * val2;
		m_WristRotation = base.elbowRotation * val3;
		m_ControllerRotation = m_TorsoRotation * controllerOrientation;
		m_TorsoRotation = val4;
	}
}
[Serializable]
public class ArmModelTransition
{
	[SerializeField]
	private string m_KeyName;

	[SerializeField]
	private ArmModel m_ArmModel;

	public string transitionKeyName
	{
		get
		{
			return m_KeyName;
		}
		set
		{
			m_KeyName = value;
		}
	}

	public ArmModel armModel
	{
		get
		{
			return m_ArmModel;
		}
		set
		{
			m_ArmModel = value;
		}
	}
}
public class TransitionArmModel : ArmModel
{
	internal struct ArmModelBlendData
	{
		public ArmModel armModel;

		public float currentBlendAmount;
	}

	[SerializeField]
	private ArmModel m_CurrentArmModelComponent;

	[SerializeField]
	public List<ArmModelTransition> m_ArmModelTransitions = new List<ArmModelTransition>();

	private const int MAX_ACTIVE_TRANSITIONS = 10;

	private const float DROP_TRANSITION_THRESHOLD = 0.035f;

	private const float LERP_CLAMP_THRESHOLD = 0.95f;

	private const float MIN_ANGULAR_VELOCITY = 0.2f;

	private const float ANGULAR_VELOCITY_DIVISOR = 45f;

	internal List<ArmModelBlendData> armModelBlendData = new List<ArmModelBlendData>(10);

	private ArmModelBlendData currentBlendingArmModel;

	public ArmModel currentArmModelComponent
	{
		get
		{
			return m_CurrentArmModelComponent;
		}
		set
		{
			m_CurrentArmModelComponent = value;
		}
	}

	public bool Queue(string key)
	{
		foreach (ArmModelTransition armModelTransition in m_ArmModelTransitions)
		{
			if (armModelTransition.transitionKeyName == key)
			{
				Queue(armModelTransition.armModel);
				return true;
			}
		}
		return false;
	}

	public void Queue(ArmModel newArmModel)
	{
		if (!((Object)(object)newArmModel == (Object)null))
		{
			if ((Object)(object)m_CurrentArmModelComponent == (Object)null)
			{
				m_CurrentArmModelComponent = newArmModel;
			}
			RemoveJustStartingTransitions();
			if (armModelBlendData.Count == 10)
			{
				RemoveOldestTransition();
			}
			ArmModelBlendData item = default(ArmModelBlendData);
			item.armModel = newArmModel;
			item.currentBlendAmount = 0f;
			armModelBlendData.Add(item);
		}
	}

	private void RemoveJustStartingTransitions()
	{
		for (int i = 0; i < armModelBlendData.Count; i++)
		{
			if (armModelBlendData[i].currentBlendAmount < 0.035f)
			{
				armModelBlendData.RemoveAt(i);
			}
		}
	}

	private void RemoveOldestTransition()
	{
		armModelBlendData.RemoveAt(0);
	}

	public override PoseDataFlags GetPoseFromProvider(out Pose output)
	{
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		if (UpdateBlends())
		{
			output = base.finalPose;
			return (PoseDataFlags)3;
		}
		output = Pose.identity;
		return (PoseDataFlags)0;
	}

	private bool UpdateBlends()
	{
		//IL_0027: Unknown result type (might be due to invalid IL or missing references)
		//IL_002c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0038: Unknown result type (might be due to invalid IL or missing references)
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0049: Unknown result type (might be due to invalid IL or missing references)
		//IL_004e: Unknown result type (might be due to invalid IL or missing references)
		//IL_005a: 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_006b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0070: Unknown result type (might be due to invalid IL or missing references)
		//IL_007c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0081: Unknown result type (might be due to invalid IL or missing references)
		//IL_008d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0092: Unknown result type (might be due to invalid IL or missing references)
		//IL_0099: Unknown result type (might be due to invalid IL or missing references)
		//IL_0295: Unknown result type (might be due to invalid IL or missing references)
		//IL_029b: Unknown result type (might be due to invalid IL or missing references)
		//IL_02a0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0136: Unknown result type (might be due to invalid IL or missing references)
		//IL_0141: Unknown result type (might be due to invalid IL or missing references)
		//IL_014c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0151: Unknown result type (might be due to invalid IL or missing references)
		//IL_0158: Unknown result type (might be due to invalid IL or missing references)
		//IL_0163: Unknown result type (might be due to invalid IL or missing references)
		//IL_016e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0173: Unknown result type (might be due to invalid IL or missing references)
		//IL_017a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0185: Unknown result type (might be due to invalid IL or missing references)
		//IL_0190: Unknown result type (might be due to invalid IL or missing references)
		//IL_0195: Unknown result type (might be due to invalid IL or missing references)
		//IL_019c: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b7: Unknown result type (might be due to invalid IL or missing references)
		//IL_01be: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c9: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d4: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d9: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e0: Unknown result type (might be due to invalid IL or missing references)
		//IL_01eb: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
		//IL_01fb: Unknown result type (might be due to invalid IL or missing references)
		//IL_0202: Unknown result type (might be due to invalid IL or missing references)
		//IL_020d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0218: Unknown result type (might be due to invalid IL or missing references)
		//IL_021d: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)currentArmModelComponent == (Object)null)
		{
			return false;
		}
		if (m_CurrentArmModelComponent.OnControllerInputUpdated())
		{
			m_NeckPosition = m_CurrentArmModelComponent.neckPosition;
			m_ElbowPosition = m_CurrentArmModelComponent.elbowPosition;
			m_WristPosition = m_CurrentArmModelComponent.wristPosition;
			m_ControllerPosition = m_CurrentArmModelComponent.controllerPosition;
			m_ElbowRotation = m_CurrentArmModelComponent.elbowRotation;
			m_WristRotation = m_CurrentArmModelComponent.wristRotation;
			m_ControllerRotation = m_CurrentArmModelComponent.controllerRotation;
			if (TryGetAngularVelocity(base.poseSource, out var angVel) && armModelBlendData.Count > 0)
			{
				float num = Mathf.Clamp((((Vector3)(ref angVel)).magnitude - 0.2f) / 45f, 0f, 0.1f);
				for (int i = 0; i < armModelBlendData.Count; i++)
				{
					ArmModelBlendData value = armModelBlendData[i];
					value.currentBlendAmount = Mathf.Lerp(value.currentBlendAmount, 1f, num);
					if (value.currentBlendAmount > 0.95f)
					{
						value.currentBlendAmount = 1f;
					}
					else
					{
						value.armModel.OnControllerInputUpdated();
						m_NeckPosition = Vector3.Slerp(base.neckPosition, value.armModel.neckPosition, value.currentBlendAmount);
						m_ElbowPosition = Vector3.Slerp(base.elbowPosition, value.armModel.elbowPosition, value.currentBlendAmount);
						m_WristPosition = Vector3.Slerp(base.wristPosition, value.armModel.wristPosition, value.currentBlendAmount);
						m_ControllerPosition = Vector3.Slerp(base.controllerPosition, value.armModel.controllerPosition, value.currentBlendAmount);
						m_ElbowRotation = Quaternion.Slerp(base.elbowRotation, value.armModel.elbowRotation, value.currentBlendAmount);
						m_WristRotation = Quaternion.Slerp(base.wristRotation, value.armModel.wristRotation, value.currentBlendAmount);
						m_ControllerRotation = Quaternion.Slerp(base.controllerRotation, value.armModel.controllerRotation, value.currentBlendAmount);
					}
					armModelBlendData[i] = value;
					if (value.currentBlendAmount >= 1f)
					{
						m_CurrentArmModelComponent = value.armModel;
						armModelBlendData.RemoveRange(0, i + 1);
					}
				}
			}
			else if (armModelBlendData.Count > 0)
			{
				Debug.LogErrorFormat((Object)(object)((Component)this).gameObject, "Unable to get angular acceleration for node", Array.Empty<object>());
				return false;
			}
			base.finalPose = new Pose(base.controllerPosition, base.controllerRotation);
			return true;
		}
		return false;
	}
}

Room Architect Tool_Data/Managed/UnityEngine.XRModule.dll

Decompiled 3 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;
using UnityEngine.Scripting;
using UnityEngine.XR;

[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: UnityEngineModuleAssembly]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine.Experimental.XR
{
	[NativeHeader("Modules/XR/XRManagedBindings.h")]
	[UsedByNativeCode]
	public struct TrackableId : IEquatable<TrackableId>
	{
		private static TrackableId s_InvalidId = default(TrackableId);

		private ulong m_SubId1;

		private ulong m_SubId2;

		public static TrackableId InvalidId => s_InvalidId;

		public override string ToString()
		{
			return string.Format("{0}-{1}", m_SubId1.ToString("X16"), m_SubId2.ToString("X16"));
		}

		public override int GetHashCode()
		{
			return m_SubId1.GetHashCode() ^ m_SubId2.GetHashCode();
		}

		public override bool Equals(object obj)
		{
			return obj is TrackableId && Equals((TrackableId)obj);
		}

		public bool Equals(TrackableId other)
		{
			return m_SubId1 == other.m_SubId1 && m_SubId2 == other.m_SubId2;
		}

		public static bool operator ==(TrackableId id1, TrackableId id2)
		{
			return id1.m_SubId1 == id2.m_SubId1 && id1.m_SubId2 == id2.m_SubId2;
		}

		public static bool operator !=(TrackableId id1, TrackableId id2)
		{
			return id1.m_SubId1 != id2.m_SubId1 || id1.m_SubId2 != id2.m_SubId2;
		}
	}
}
namespace UnityEngine
{
	public interface ISubsystemDescriptor
	{
		string id { get; }

		ISubsystem Create();
	}
	internal interface ISubsystemDescriptorImpl : ISubsystemDescriptor
	{
		IntPtr ptr { get; set; }
	}
	[StructLayout(LayoutKind.Sequential)]
	[UsedByNativeCode("XRSubsystemDescriptorBase")]
	public abstract class IntegratedSubsystemDescriptor : ISubsystemDescriptorImpl, ISubsystemDescriptor
	{
		internal IntPtr m_Ptr;

		IntPtr ISubsystemDescriptorImpl.ptr
		{
			get
			{
				return m_Ptr;
			}
			set
			{
				m_Ptr = value;
			}
		}

		public string id => Internal_SubsystemDescriptors.GetId(m_Ptr);

		ISubsystem ISubsystemDescriptor.Create()
		{
			return CreateImpl();
		}

		internal abstract ISubsystem CreateImpl();
	}
	public abstract class SubsystemDescriptor : ISubsystemDescriptor
	{
		public string id { get; set; }

		public Type subsystemImplementationType { get; set; }

		ISubsystem ISubsystemDescriptor.Create()
		{
			return CreateImpl();
		}

		internal abstract ISubsystem CreateImpl();
	}
	[StructLayout(LayoutKind.Sequential)]
	[UsedByNativeCode("XRSubsystemDescriptor")]
	[NativeType(Header = "Modules/XR/XRSubsystemDescriptor.h")]
	public class IntegratedSubsystemDescriptor<TSubsystem> : IntegratedSubsystemDescriptor where TSubsystem : IntegratedSubsystem
	{
		internal override ISubsystem CreateImpl()
		{
			return Create();
		}

		public TSubsystem Create()
		{
			IntPtr ptr = Internal_SubsystemDescriptors.Create(m_Ptr);
			TSubsystem val = (TSubsystem)Internal_SubsystemInstances.Internal_GetInstanceByPtr(ptr);
			if (val != null)
			{
				val.m_subsystemDescriptor = this;
			}
			return val;
		}
	}
	public class SubsystemDescriptor<TSubsystem> : SubsystemDescriptor where TSubsystem : Subsystem
	{
		internal override ISubsystem CreateImpl()
		{
			return Create();
		}

		public TSubsystem Create()
		{
			TSubsystem val = Activator.CreateInstance(base.subsystemImplementationType) as TSubsystem;
			val.m_subsystemDescriptor = this;
			Internal_SubsystemInstances.Internal_AddStandaloneSubsystem(val);
			return val;
		}
	}
	internal static class Internal_SubsystemInstances
	{
		internal static List<ISubsystem> s_IntegratedSubsystemInstances = new List<ISubsystem>();

		internal static List<ISubsystem> s_StandaloneSubsystemInstances = new List<ISubsystem>();

		[RequiredByNativeCode]
		internal static void Internal_InitializeManagedInstance(IntPtr ptr, IntegratedSubsystem inst)
		{
			inst.m_Ptr = ptr;
			inst.SetHandle(inst);
			s_IntegratedSubsystemInstances.Add(inst);
		}

		[RequiredByNativeCode]
		internal static void Internal_ClearManagedInstances()
		{
			foreach (ISubsystem s_IntegratedSubsystemInstance in s_IntegratedSubsystemInstances)
			{
				((IntegratedSubsystem)s_IntegratedSubsystemInstance).m_Ptr = IntPtr.Zero;
			}
			s_IntegratedSubsystemInstances.Clear();
			s_StandaloneSubsystemInstances.Clear();
		}

		[RequiredByNativeCode]
		internal static void Internal_RemoveInstanceByPtr(IntPtr ptr)
		{
			for (int num = s_IntegratedSubsystemInstances.Count - 1; num >= 0; num--)
			{
				if (((IntegratedSubsystem)s_IntegratedSubsystemInstances[num]).m_Ptr == ptr)
				{
					((IntegratedSubsystem)s_IntegratedSubsystemInstances[num]).m_Ptr = IntPtr.Zero;
					s_IntegratedSubsystemInstances.RemoveAt(num);
				}
			}
		}

		internal static IntegratedSubsystem Internal_GetInstanceByPtr(IntPtr ptr)
		{
			foreach (IntegratedSubsystem s_IntegratedSubsystemInstance in s_IntegratedSubsystemInstances)
			{
				if (s_IntegratedSubsystemInstance.m_Ptr == ptr)
				{
					return s_IntegratedSubsystemInstance;
				}
			}
			return null;
		}

		internal static void Internal_AddStandaloneSubsystem(Subsystem inst)
		{
			s_StandaloneSubsystemInstances.Add(inst);
		}
	}
	[NativeHeader("Modules/XR/XRPrefix.h")]
	internal static class Internal_SubsystemDescriptors
	{
		internal static List<ISubsystemDescriptorImpl> s_IntegratedSubsystemDescriptors = new List<ISubsystemDescriptorImpl>();

		internal static List<ISubsystemDescriptor> s_StandaloneSubsystemDescriptors = new List<ISubsystemDescriptor>();

		[RequiredByNativeCode]
		internal static bool Internal_AddDescriptor(SubsystemDescriptor descriptor)
		{
			foreach (ISubsystemDescriptor s_StandaloneSubsystemDescriptor in s_StandaloneSubsystemDescriptors)
			{
				if (s_StandaloneSubsystemDescriptor == descriptor)
				{
					return false;
				}
			}
			s_StandaloneSubsystemDescriptors.Add(descriptor);
			SubsystemManager.ReportSingleSubsystemAnalytics(descriptor.id);
			return true;
		}

		[RequiredByNativeCode]
		internal static void Internal_InitializeManagedDescriptor(IntPtr ptr, ISubsystemDescriptorImpl desc)
		{
			desc.ptr = ptr;
			s_IntegratedSubsystemDescriptors.Add(desc);
		}

		[RequiredByNativeCode]
		internal static void Internal_ClearManagedDescriptors()
		{
			foreach (ISubsystemDescriptorImpl s_IntegratedSubsystemDescriptor in s_IntegratedSubsystemDescriptors)
			{
				s_IntegratedSubsystemDescriptor.ptr = IntPtr.Zero;
			}
			s_IntegratedSubsystemDescriptors.Clear();
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeConditional("ENABLE_XR")]
		public static extern IntPtr Create(IntPtr descriptorPtr);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeConditional("ENABLE_XR")]
		public static extern string GetId(IntPtr descriptorPtr);
	}
	[NativeHeader("Modules/XR/XRPrefix.h")]
	[NativeType(Header = "Modules/XR/XRSubsystemManager.h")]
	public static class SubsystemManager
	{
		public static event Action reloadSubsytemsStarted;

		public static event Action reloadSubsytemsCompleted;

		static SubsystemManager()
		{
			StaticConstructScriptingClassMap();
		}

		public static void GetAllSubsystemDescriptors(List<ISubsystemDescriptor> descriptors)
		{
			descriptors.Clear();
			foreach (ISubsystemDescriptorImpl s_IntegratedSubsystemDescriptor in Internal_SubsystemDescriptors.s_IntegratedSubsystemDescriptors)
			{
				descriptors.Add(s_IntegratedSubsystemDescriptor);
			}
			foreach (ISubsystemDescriptor s_StandaloneSubsystemDescriptor in Internal_SubsystemDescriptors.s_StandaloneSubsystemDescriptors)
			{
				descriptors.Add(s_StandaloneSubsystemDescriptor);
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeConditional("ENABLE_XR")]
		internal static extern void ReportSingleSubsystemAnalytics(string id);

		public static void GetSubsystemDescriptors<T>(List<T> descriptors) where T : ISubsystemDescriptor
		{
			descriptors.Clear();
			foreach (ISubsystemDescriptorImpl s_IntegratedSubsystemDescriptor in Internal_SubsystemDescriptors.s_IntegratedSubsystemDescriptors)
			{
				if (s_IntegratedSubsystemDescriptor is T)
				{
					descriptors.Add((T)s_IntegratedSubsystemDescriptor);
				}
			}
			foreach (ISubsystemDescriptor s_StandaloneSubsystemDescriptor in Internal_SubsystemDescriptors.s_StandaloneSubsystemDescriptors)
			{
				if (s_StandaloneSubsystemDescriptor is T)
				{
					descriptors.Add((T)s_StandaloneSubsystemDescriptor);
				}
			}
		}

		public static void GetInstances<T>(List<T> instances) where T : ISubsystem
		{
			instances.Clear();
			foreach (ISubsystem s_IntegratedSubsystemInstance in Internal_SubsystemInstances.s_IntegratedSubsystemInstances)
			{
				if (s_IntegratedSubsystemInstance is T)
				{
					instances.Add((T)s_IntegratedSubsystemInstance);
				}
			}
			foreach (ISubsystem s_StandaloneSubsystemInstance in Internal_SubsystemInstances.s_StandaloneSubsystemInstances)
			{
				if (s_StandaloneSubsystemInstance is T)
				{
					instances.Add((T)s_StandaloneSubsystemInstance);
				}
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeConditional("ENABLE_XR")]
		internal static extern void DestroyInstance_Internal(IntPtr instancePtr);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeConditional("ENABLE_XR")]
		internal static extern void StaticConstructScriptingClassMap();

		[RequiredByNativeCode]
		private static void Internal_ReloadSubsystemsStarted()
		{
			if (SubsystemManager.reloadSubsytemsStarted != null)
			{
				SubsystemManager.reloadSubsytemsStarted();
			}
		}

		[RequiredByNativeCode]
		private static void Internal_ReloadSubsystemsCompleted()
		{
			if (SubsystemManager.reloadSubsytemsCompleted != null)
			{
				SubsystemManager.reloadSubsytemsCompleted();
			}
		}
	}
	public interface ISubsystem
	{
		bool running { get; }

		void Start();

		void Stop();

		void Destroy();
	}
	[StructLayout(LayoutKind.Sequential)]
	[UsedByNativeCode]
	[NativeType(Header = "Modules/XR/XRSubsystem.h")]
	public class IntegratedSubsystem : ISubsystem
	{
		internal IntPtr m_Ptr;

		internal ISubsystemDescriptor m_subsystemDescriptor;

		public bool running => Internal_IsRunning();

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal extern void SetHandle(IntegratedSubsystem inst);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void Start();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void Stop();

		public void Destroy()
		{
			IntPtr ptr = m_Ptr;
			Internal_SubsystemInstances.Internal_RemoveInstanceByPtr(m_Ptr);
			SubsystemManager.DestroyInstance_Internal(ptr);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeConditional("ENABLE_XR")]
		internal extern bool Internal_IsRunning();
	}
	[UsedByNativeCode("XRSubsystem_TXRSubsystemDescriptor")]
	public class IntegratedSubsystem<TSubsystemDescriptor> : IntegratedSubsystem where TSubsystemDescriptor : ISubsystemDescriptor
	{
		public TSubsystemDescriptor SubsystemDescriptor => (TSubsystemDescriptor)m_subsystemDescriptor;
	}
	public abstract class Subsystem : ISubsystem
	{
		internal ISubsystemDescriptor m_subsystemDescriptor;

		public abstract bool running { get; }

		public abstract void Start();

		public abstract void Stop();

		public abstract void Destroy();
	}
	public abstract class Subsystem<TSubsystemDescriptor> : Subsystem where TSubsystemDescriptor : ISubsystemDescriptor
	{
		public TSubsystemDescriptor SubsystemDescriptor => (TSubsystemDescriptor)m_subsystemDescriptor;
	}
}
namespace UnityEngine.XR
{
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeConditional("ENABLE_VR")]
	[RequiredByNativeCode]
	[NativeHeader("Modules/XR/Subsystems/Input/Public/XRInputTrackingFacade.h")]
	public static class InputTracking
	{
		private enum TrackingStateEventType
		{
			NodeAdded,
			NodeRemoved,
			TrackingAcquired,
			TrackingLost
		}

		[NativeConditional("ENABLE_VR")]
		public static extern bool disablePositionalTracking
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("GetPositionalTrackingDisabled")]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("SetPositionalTrackingDisabled")]
			set;
		}

		public static event Action<XRNodeState> trackingAcquired;

		public static event Action<XRNodeState> trackingLost;

		public static event Action<XRNodeState> nodeAdded;

		public static event Action<XRNodeState> nodeRemoved;

		[RequiredByNativeCode]
		private static void InvokeTrackingEvent(TrackingStateEventType eventType, XRNode nodeType, long uniqueID, bool tracked)
		{
			Action<XRNodeState> action = null;
			XRNodeState obj = default(XRNodeState);
			obj.uniqueID = (ulong)uniqueID;
			obj.nodeType = nodeType;
			obj.tracked = tracked;
			((Action<XRNodeState>)(eventType switch
			{
				TrackingStateEventType.TrackingAcquired => InputTracking.trackingAcquired, 
				TrackingStateEventType.TrackingLost => InputTracking.trackingLost, 
				TrackingStateEventType.NodeAdded => InputTracking.nodeAdded, 
				TrackingStateEventType.NodeRemoved => InputTracking.nodeRemoved, 
				_ => throw new ArgumentException("TrackingEventHandler - Invalid EventType: " + eventType), 
			}))?.Invoke(obj);
		}

		[Obsolete("This API has been marked as obsolete in code, and is no longer in use. Please use InputTracking.GetNodeStates and look for the XRNodeState with the corresponding XRNode type instead.")]
		[NativeConditional("ENABLE_VR", "Vector3f::zero")]
		public static Vector3 GetLocalPosition(XRNode node)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			GetLocalPosition_Injected(node, out var ret);
			return ret;
		}

		[Obsolete("This API has been marked as obsolete in code, and is no longer in use. Please use InputTracking.GetNodeStates and look for the XRNodeState with the corresponding XRNode type instead.")]
		[NativeConditional("ENABLE_VR", "Quaternionf::identity()")]
		public static Quaternion GetLocalRotation(XRNode node)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			GetLocalRotation_Injected(node, out var ret);
			return ret;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeConditional("ENABLE_VR")]
		public static extern void Recenter();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeConditional("ENABLE_VR")]
		public static extern string GetNodeName(ulong uniqueId);

		public static void GetNodeStates(List<XRNodeState> nodeStates)
		{
			if (nodeStates == null)
			{
				throw new ArgumentNullException("nodeStates");
			}
			nodeStates.Clear();
			GetNodeStates_Internal(nodeStates);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeConditional("ENABLE_VR")]
		private static extern void GetNodeStates_Internal([NotNull] List<XRNodeState> nodeStates);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeHeader("Modules/XR/Subsystems/Input/Public/XRInputTracking.h")]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		internal static extern ulong GetDeviceIdAtXRNode(XRNode node);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		[NativeHeader("Modules/XR/Subsystems/Input/Public/XRInputTracking.h")]
		internal static extern void GetDeviceIdsAtXRNode_Internal(XRNode node, [NotNull] List<ulong> deviceIds);

		static InputTracking()
		{
			InputTracking.trackingAcquired = null;
			InputTracking.trackingLost = null;
			InputTracking.nodeAdded = null;
			InputTracking.nodeRemoved = null;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void GetLocalPosition_Injected(XRNode node, out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void GetLocalRotation_Injected(XRNode node, out Quaternion ret);
	}
	public enum XRNode
	{
		LeftEye,
		RightEye,
		CenterEye,
		Head,
		LeftHand,
		RightHand,
		GameController,
		TrackingReference,
		HardwareTracker
	}
	[Flags]
	internal enum AvailableTrackingData
	{
		None = 0,
		PositionAvailable = 1,
		RotationAvailable = 2,
		VelocityAvailable = 4,
		AngularVelocityAvailable = 8,
		AccelerationAvailable = 0x10,
		AngularAccelerationAvailable = 0x20
	}
	[UsedByNativeCode]
	public struct XRNodeState
	{
		private XRNode m_Type;

		private AvailableTrackingData m_AvailableFields;

		private Vector3 m_Position;

		private Quaternion m_Rotation;

		private Vector3 m_Velocity;

		private Vector3 m_AngularVelocity;

		private Vector3 m_Acceleration;

		private Vector3 m_AngularAcceleration;

		private int m_Tracked;

		private ulong m_UniqueID;

		public ulong uniqueID
		{
			get
			{
				return m_UniqueID;
			}
			set
			{
				m_UniqueID = value;
			}
		}

		public XRNode nodeType
		{
			get
			{
				return m_Type;
			}
			set
			{
				m_Type = value;
			}
		}

		public bool tracked
		{
			get
			{
				return m_Tracked == 1;
			}
			set
			{
				m_Tracked = (value ? 1 : 0);
			}
		}

		public Vector3 position
		{
			set
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				m_Position = value;
				m_AvailableFields |= AvailableTrackingData.PositionAvailable;
			}
		}

		public Quaternion rotation
		{
			set
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				m_Rotation = value;
				m_AvailableFields |= AvailableTrackingData.RotationAvailable;
			}
		}

		public Vector3 velocity
		{
			set
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				m_Velocity = value;
				m_AvailableFields |= AvailableTrackingData.VelocityAvailable;
			}
		}

		public Vector3 angularVelocity
		{
			set
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				m_AngularVelocity = value;
				m_AvailableFields |= AvailableTrackingData.AngularVelocityAvailable;
			}
		}

		public Vector3 acceleration
		{
			set
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				m_Acceleration = value;
				m_AvailableFields |= AvailableTrackingData.AccelerationAvailable;
			}
		}

		public Vector3 angularAcceleration
		{
			set
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				m_AngularAcceleration = value;
				m_AvailableFields |= AvailableTrackingData.AngularAccelerationAvailable;
			}
		}

		public bool TryGetPosition(out Vector3 position)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			return TryGet(m_Position, AvailableTrackingData.PositionAvailable, out position);
		}

		public bool TryGetRotation(out Quaternion rotation)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			return TryGet(m_Rotation, AvailableTrackingData.RotationAvailable, out rotation);
		}

		public bool TryGetVelocity(out Vector3 velocity)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			return TryGet(m_Velocity, AvailableTrackingData.VelocityAvailable, out velocity);
		}

		public bool TryGetAngularVelocity(out Vector3 angularVelocity)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			return TryGet(m_AngularVelocity, AvailableTrackingData.AngularVelocityAvailable, out angularVelocity);
		}

		public bool TryGetAcceleration(out Vector3 acceleration)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			return TryGet(m_Acceleration, AvailableTrackingData.AccelerationAvailable, out acceleration);
		}

		public bool TryGetAngularAcceleration(out Vector3 angularAcceleration)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			return TryGet(m_AngularAcceleration, AvailableTrackingData.AngularAccelerationAvailable, out angularAcceleration);
		}

		private bool TryGet(Vector3 inValue, AvailableTrackingData availabilityFlag, out Vector3 outValue)
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			if ((m_AvailableFields & availabilityFlag) > AvailableTrackingData.None)
			{
				outValue = inValue;
				return true;
			}
			outValue = Vector3.zero;
			return false;
		}

		private bool TryGet(Quaternion inValue, AvailableTrackingData availabilityFlag, out Quaternion outValue)
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			if ((m_AvailableFields & availabilityFlag) > AvailableTrackingData.None)
			{
				outValue = inValue;
				return true;
			}
			outValue = Quaternion.identity;
			return false;
		}
	}
	[NativeConditional("ENABLE_VR")]
	public struct HapticCapabilities : IEquatable<HapticCapabilities>
	{
		private uint m_NumChannels;

		private bool m_SupportsImpulse;

		private bool m_SupportsBuffer;

		private uint m_BufferFrequencyHz;

		private uint m_BufferMaxSize;

		private uint m_BufferOptimalSize;

		public uint numChannels
		{
			get
			{
				return m_NumChannels;
			}
			internal set
			{
				m_NumChannels = value;
			}
		}

		public bool supportsImpulse
		{
			get
			{
				return m_SupportsImpulse;
			}
			internal set
			{
				m_SupportsImpulse = value;
			}
		}

		public bool supportsBuffer
		{
			get
			{
				return m_SupportsBuffer;
			}
			internal set
			{
				m_SupportsBuffer = value;
			}
		}

		public uint bufferFrequencyHz
		{
			get
			{
				return m_BufferFrequencyHz;
			}
			internal set
			{
				m_BufferFrequencyHz = value;
			}
		}

		public uint bufferMaxSize
		{
			get
			{
				return m_BufferMaxSize;
			}
			internal set
			{
				m_BufferMaxSize = value;
			}
		}

		public uint bufferOptimalSize
		{
			get
			{
				return m_BufferOptimalSize;
			}
			internal set
			{
				m_BufferOptimalSize = value;
			}
		}

		public override bool Equals(object obj)
		{
			if (!(obj is HapticCapabilities))
			{
				return false;
			}
			return Equals((HapticCapabilities)obj);
		}

		public bool Equals(HapticCapabilities other)
		{
			return numChannels == other.numChannels && supportsImpulse == other.supportsImpulse && supportsBuffer == other.supportsBuffer && bufferFrequencyHz == other.bufferFrequencyHz && bufferMaxSize == other.bufferMaxSize && bufferOptimalSize == other.bufferOptimalSize;
		}

		public override int GetHashCode()
		{
			return numChannels.GetHashCode() ^ (supportsImpulse.GetHashCode() << 1) ^ (supportsBuffer.GetHashCode() >> 1) ^ (bufferFrequencyHz.GetHashCode() << 2) ^ (bufferMaxSize.GetHashCode() >> 2) ^ (bufferOptimalSize.GetHashCode() << 3);
		}

		public static bool operator ==(HapticCapabilities a, HapticCapabilities b)
		{
			return a.Equals(b);
		}

		public static bool operator !=(HapticCapabilities a, HapticCapabilities b)
		{
			return !(a == b);
		}
	}
	internal enum InputFeatureType : uint
	{
		Custom = 0u,
		Binary = 1u,
		DiscreteStates = 2u,
		Axis1D = 3u,
		Axis2D = 4u,
		Axis3D = 5u,
		Rotation = 6u,
		Hand = 7u,
		Bone = 8u,
		Eyes = 9u,
		kUnityXRInputFeatureTypeInvalid = uint.MaxValue
	}
	public enum InputDeviceRole : uint
	{
		Unknown,
		Generic,
		LeftHanded,
		RightHanded,
		GameController,
		TrackingReference,
		HardwareTracker,
		LegacyController
	}
	[Flags]
	public enum InputTrackingState : uint
	{
		None = 0u,
		Position = 1u,
		Rotation = 2u,
		Velocity = 4u,
		AngularVelocity = 8u,
		Acceleration = 0x10u,
		AngularAcceleration = 0x20u,
		All = 0x3Fu
	}
	[RequiredByNativeCode]
	[NativeConditional("ENABLE_VR")]
	[NativeHeader("Modules/XR/Subsystems/Input/Public/XRInputDevices.h")]
	public struct InputFeatureUsage : IEquatable<InputFeatureUsage>
	{
		internal string m_Name;

		[NativeName("m_FeatureType")]
		internal InputFeatureType m_InternalType;

		public string name
		{
			get
			{
				return m_Name;
			}
			internal set
			{
				m_Name = value;
			}
		}

		internal InputFeatureType internalType
		{
			get
			{
				return m_InternalType;
			}
			set
			{
				m_InternalType = value;
			}
		}

		public Type type => m_InternalType switch
		{
			InputFeatureType.Custom => throw new InvalidCastException("No valid managed type for Custom native types."), 
			InputFeatureType.Binary => typeof(bool), 
			InputFeatureType.DiscreteStates => typeof(uint), 
			InputFeatureType.Axis1D => typeof(float), 
			InputFeatureType.Axis2D => typeof(Vector2), 
			InputFeatureType.Axis3D => typeof(Vector3), 
			InputFeatureType.Rotation => typeof(Quaternion), 
			InputFeatureType.Hand => typeof(Hand), 
			InputFeatureType.Bone => typeof(Bone), 
			InputFeatureType.Eyes => typeof(Eyes), 
			_ => throw new InvalidCastException("No valid managed type for unknown native type."), 
		};

		internal InputFeatureUsage(string name, InputFeatureType type)
		{
			m_Name = name;
			m_InternalType = type;
		}

		public override bool Equals(object obj)
		{
			if (!(obj is InputFeatureUsage))
			{
				return false;
			}
			return Equals((InputFeatureUsage)obj);
		}

		public bool Equals(InputFeatureUsage other)
		{
			return name == other.name && internalType == other.internalType;
		}

		public override int GetHashCode()
		{
			return name.GetHashCode() ^ (internalType.GetHashCode() << 1);
		}

		public static bool operator ==(InputFeatureUsage a, InputFeatureUsage b)
		{
			return a.Equals(b);
		}

		public static bool operator !=(InputFeatureUsage a, InputFeatureUsage b)
		{
			return !(a == b);
		}

		public InputFeatureUsage<T> As<T>()
		{
			if ((object)type != typeof(T))
			{
				throw new ArgumentException("InputFeatureUsage type does not match out variable type.");
			}
			return new InputFeatureUsage<T>(name);
		}
	}
	public struct InputFeatureUsage<T> : IEquatable<InputFeatureUsage<T>>
	{
		public string name { get; set; }

		public InputFeatureUsage(string usageName)
		{
			name = usageName;
		}

		public override bool Equals(object obj)
		{
			if (!(obj is InputFeatureUsage<T>))
			{
				return false;
			}
			return Equals((InputFeatureUsage<T>)obj);
		}

		public bool Equals(InputFeatureUsage<T> other)
		{
			return name == other.name;
		}

		public override int GetHashCode()
		{
			return name.GetHashCode();
		}

		public static bool operator ==(InputFeatureUsage<T> a, InputFeatureUsage<T> b)
		{
			return a.Equals(b);
		}

		public static bool operator !=(InputFeatureUsage<T> a, InputFeatureUsage<T> b)
		{
			return !(a == b);
		}
	}
	public static class CommonUsages
	{
		public static InputFeatureUsage<bool> isTracked = new InputFeatureUsage<bool>("IsTracked");

		public static InputFeatureUsage<bool> primaryButton = new InputFeatureUsage<bool>("PrimaryButton");

		public static InputFeatureUsage<bool> primaryTouch = new InputFeatureUsage<bool>("PrimaryTouch");

		public static InputFeatureUsage<bool> secondaryButton = new InputFeatureUsage<bool>("SecondaryButton");

		public static InputFeatureUsage<bool> secondaryTouch = new InputFeatureUsage<bool>("SecondaryTouch");

		public static InputFeatureUsage<bool> gripButton = new InputFeatureUsage<bool>("GripButton");

		public static InputFeatureUsage<bool> triggerButton = new InputFeatureUsage<bool>("TriggerButton");

		public static InputFeatureUsage<bool> menuButton = new InputFeatureUsage<bool>("MenuButton");

		public static InputFeatureUsage<bool> primary2DAxisClick = new InputFeatureUsage<bool>("Primary2DAxisClick");

		public static InputFeatureUsage<bool> primary2DAxisTouch = new InputFeatureUsage<bool>("Primary2DAxisTouch");

		public static InputFeatureUsage<bool> thumbrest = new InputFeatureUsage<bool>("Thumbrest");

		public static InputFeatureUsage<InputTrackingState> trackingState = new InputFeatureUsage<InputTrackingState>("TrackingState");

		public static InputFeatureUsage<float> indexTouch = new InputFeatureUsage<float>("IndexTouch");

		public static InputFeatureUsage<float> thumbTouch = new InputFeatureUsage<float>("ThumbTouch");

		public static InputFeatureUsage<float> batteryLevel = new InputFeatureUsage<float>("BatteryLevel");

		public static InputFeatureUsage<float> trigger = new InputFeatureUsage<float>("Trigger");

		public static InputFeatureUsage<float> grip = new InputFeatureUsage<float>("Grip");

		public static InputFeatureUsage<float> indexFinger = new InputFeatureUsage<float>("IndexFinger");

		public static InputFeatureUsage<float> middleFinger = new InputFeatureUsage<float>("MiddleFinger");

		public static InputFeatureUsage<float> ringFinger = new InputFeatureUsage<float>("RingFinger");

		public static InputFeatureUsage<float> pinkyFinger = new InputFeatureUsage<float>("PinkyFinger");

		public static InputFeatureUsage<Vector2> primary2DAxis = new InputFeatureUsage<Vector2>("Primary2DAxis");

		public static InputFeatureUsage<Vector2> dPad = new InputFeatureUsage<Vector2>("DPad");

		public static InputFeatureUsage<Vector2> secondary2DAxis = new InputFeatureUsage<Vector2>("Secondary2DAxis");

		public static InputFeatureUsage<Vector3> devicePosition = new InputFeatureUsage<Vector3>("DevicePosition");

		public static InputFeatureUsage<Vector3> leftEyePosition = new InputFeatureUsage<Vector3>("LeftEyePosition");

		public static InputFeatureUsage<Vector3> rightEyePosition = new InputFeatureUsage<Vector3>("RightEyePosition");

		public static InputFeatureUsage<Vector3> centerEyePosition = new InputFeatureUsage<Vector3>("CenterEyePosition");

		public static InputFeatureUsage<Vector3> colorCameraPosition = new InputFeatureUsage<Vector3>("CameraPosition");

		public static InputFeatureUsage<Vector3> deviceVelocity = new InputFeatureUsage<Vector3>("DeviceVelocity");

		public static InputFeatureUsage<Vector3> deviceAngularVelocity = new InputFeatureUsage<Vector3>("DeviceAngularVelocity");

		public static InputFeatureUsage<Vector3> leftEyeVelocity = new InputFeatureUsage<Vector3>("LeftEyeVelocity");

		public static InputFeatureUsage<Vector3> leftEyeAngularVelocity = new InputFeatureUsage<Vector3>("LeftEyeAngularVelocity");

		public static InputFeatureUsage<Vector3> rightEyeVelocity = new InputFeatureUsage<Vector3>("RightEyeVelocity");

		public static InputFeatureUsage<Vector3> rightEyeAngularVelocity = new InputFeatureUsage<Vector3>("RightEyeAngularVelocity");

		public static InputFeatureUsage<Vector3> centerEyeVelocity = new InputFeatureUsage<Vector3>("CenterEyeVelocity");

		public static InputFeatureUsage<Vector3> centerEyeAngularVelocity = new InputFeatureUsage<Vector3>("CenterEyeAngularVelocity");

		public static InputFeatureUsage<Vector3> colorCameraVelocity = new InputFeatureUsage<Vector3>("CameraVelocity");

		public static InputFeatureUsage<Vector3> colorCameraAngularVelocity = new InputFeatureUsage<Vector3>("CameraAngularVelocity");

		public static InputFeatureUsage<Vector3> deviceAcceleration = new InputFeatureUsage<Vector3>("DeviceAcceleration");

		public static InputFeatureUsage<Vector3> deviceAngularAcceleration = new InputFeatureUsage<Vector3>("DeviceAngularAcceleration");

		public static InputFeatureUsage<Vector3> leftEyeAcceleration = new InputFeatureUsage<Vector3>("LeftEyeAcceleration");

		public static InputFeatureUsage<Vector3> leftEyeAngularAcceleration = new InputFeatureUsage<Vector3>("LeftEyeAngularAcceleration");

		public static InputFeatureUsage<Vector3> rightEyeAcceleration = new InputFeatureUsage<Vector3>("RightEyeAcceleration");

		public static InputFeatureUsage<Vector3> rightEyeAngularAcceleration = new InputFeatureUsage<Vector3>("RightEyeAngularAcceleration");

		public static InputFeatureUsage<Vector3> centerEyeAcceleration = new InputFeatureUsage<Vector3>("CenterEyeAcceleration");

		public static InputFeatureUsage<Vector3> centerEyeAngularAcceleration = new InputFeatureUsage<Vector3>("CenterEyeAngularAcceleration");

		public static InputFeatureUsage<Vector3> colorCameraAcceleration = new InputFeatureUsage<Vector3>("CameraAcceleration");

		public static InputFeatureUsage<Vector3> colorCameraAngularAcceleration = new InputFeatureUsage<Vector3>("CameraAngularAcceleration");

		public static InputFeatureUsage<Quaternion> deviceRotation = new InputFeatureUsage<Quaternion>("DeviceRotation");

		public static InputFeatureUsage<Quaternion> leftEyeRotation = new InputFeatureUsage<Quaternion>("LeftEyeRotation");

		public static InputFeatureUsage<Quaternion> rightEyeRotation = new InputFeatureUsage<Quaternion>("RightEyeRotation");

		public static InputFeatureUsage<Quaternion> centerEyeRotation = new InputFeatureUsage<Quaternion>("CenterEyeRotation");

		public static InputFeatureUsage<Quaternion> colorCameraRotation = new InputFeatureUsage<Quaternion>("CameraRotation");

		public static InputFeatureUsage<Hand> handData = new InputFeatureUsage<Hand>("HandData");

		public static InputFeatureUsage<Eyes> eyesData = new InputFeatureUsage<Eyes>("EyesData");
	}
	[UsedByNativeCode]
	[NativeConditional("ENABLE_VR")]
	public struct InputDevice : IEquatable<InputDevice>
	{
		private ulong m_DeviceId;

		public bool isValid => InputDevices.IsDeviceValid(m_DeviceId);

		public string name => InputDevices.GetDeviceName(m_DeviceId);

		public InputDeviceRole role => InputDevices.GetDeviceRole(m_DeviceId);

		internal InputDevice(ulong deviceId)
		{
			m_DeviceId = deviceId;
		}

		public bool SendHapticImpulse(uint channel, float amplitude, float duration = 1f)
		{
			if (amplitude < 0f)
			{
				throw new ArgumentException("Amplitude of SendHapticImpulse cannot be negative.");
			}
			if (duration < 0f)
			{
				throw new ArgumentException("Duration of SendHapticImpulse cannot be negative.");
			}
			return InputDevices.SendHapticImpulse(m_DeviceId, channel, amplitude, duration);
		}

		public bool SendHapticBuffer(uint channel, byte[] buffer)
		{
			return InputDevices.SendHapticBuffer(m_DeviceId, channel, buffer);
		}

		public bool TryGetHapticCapabilities(out HapticCapabilities capabilities)
		{
			return InputDevices.TryGetHapticCapabilities(m_DeviceId, out capabilities);
		}

		public void StopHaptics()
		{
			InputDevices.StopHaptics(m_DeviceId);
		}

		public bool TryGetFeatureUsages(List<InputFeatureUsage> featureUsages)
		{
			return InputDevices.TryGetFeatureUsages(m_DeviceId, featureUsages);
		}

		public bool TryGetFeatureValue(InputFeatureUsage<bool> usage, out bool value)
		{
			return InputDevices.TryGetFeatureValue_bool(m_DeviceId, usage.name, out value);
		}

		public bool TryGetFeatureValue(InputFeatureUsage<uint> usage, out uint value)
		{
			return InputDevices.TryGetFeatureValue_UInt32(m_DeviceId, usage.name, out value);
		}

		public bool TryGetFeatureValue(InputFeatureUsage<float> usage, out float value)
		{
			return InputDevices.TryGetFeatureValue_float(m_DeviceId, usage.name, out value);
		}

		public bool TryGetFeatureValue(InputFeatureUsage<Vector2> usage, out Vector2 value)
		{
			return InputDevices.TryGetFeatureValue_Vector2f(m_DeviceId, usage.name, out value);
		}

		public bool TryGetFeatureValue(InputFeatureUsage<Vector3> usage, out Vector3 value)
		{
			return InputDevices.TryGetFeatureValue_Vector3f(m_DeviceId, usage.name, out value);
		}

		public bool TryGetFeatureValue(InputFeatureUsage<Quaternion> usage, out Quaternion value)
		{
			return InputDevices.TryGetFeatureValue_Quaternionf(m_DeviceId, usage.name, out value);
		}

		public bool TryGetFeatureValue(InputFeatureUsage<Hand> usage, out Hand value)
		{
			return InputDevices.TryGetFeatureValue_XRHand(m_DeviceId, usage.name, out value);
		}

		public bool TryGetFeatureValue(InputFeatureUsage<Bone> usage, out Bone value)
		{
			return InputDevices.TryGetFeatureValue_XRBone(m_DeviceId, usage.name, out value);
		}

		public bool TryGetFeatureValue(InputFeatureUsage<Eyes> usage, out Eyes value)
		{
			return InputDevices.TryGetFeatureValue_XREyes(m_DeviceId, usage.name, out value);
		}

		public bool TryGetFeatureValue(InputFeatureUsage<byte[]> usage, byte[] value)
		{
			return InputDevices.TryGetFeatureValue_Custom(m_DeviceId, usage.name, value);
		}

		public bool TryGetFeatureValue(InputFeatureUsage<InputTrackingState> usage, out InputTrackingState value)
		{
			uint value2 = 0u;
			if (InputDevices.TryGetFeatureValue_UInt32(m_DeviceId, usage.name, out value2))
			{
				value = (InputTrackingState)value2;
				return true;
			}
			value = InputTrackingState.None;
			return false;
		}

		public bool TryGetFeatureValue(InputFeatureUsage<bool> usage, DateTime time, out bool value)
		{
			return InputDevices.TryGetFeatureValueAtTime_bool(m_DeviceId, usage.name, TimeConverter.LocalDateTimeToUnixTimeMilliseconds(time), out value);
		}

		public bool TryGetFeatureValue(InputFeatureUsage<uint> usage, DateTime time, out uint value)
		{
			return InputDevices.TryGetFeatureValueAtTime_UInt32(m_DeviceId, usage.name, TimeConverter.LocalDateTimeToUnixTimeMilliseconds(time), out value);
		}

		public bool TryGetFeatureValue(InputFeatureUsage<float> usage, DateTime time, out float value)
		{
			return InputDevices.TryGetFeatureValueAtTime_float(m_DeviceId, usage.name, TimeConverter.LocalDateTimeToUnixTimeMilliseconds(time), out value);
		}

		public bool TryGetFeatureValue(InputFeatureUsage<Vector2> usage, DateTime time, out Vector2 value)
		{
			return InputDevices.TryGetFeatureValueAtTime_Vector2f(m_DeviceId, usage.name, TimeConverter.LocalDateTimeToUnixTimeMilliseconds(time), out value);
		}

		public bool TryGetFeatureValue(InputFeatureUsage<Vector3> usage, DateTime time, out Vector3 value)
		{
			return InputDevices.TryGetFeatureValueAtTime_Vector3f(m_DeviceId, usage.name, TimeConverter.LocalDateTimeToUnixTimeMilliseconds(time), out value);
		}

		public bool TryGetFeatureValue(InputFeatureUsage<Quaternion> usage, DateTime time, out Quaternion value)
		{
			return InputDevices.TryGetFeatureValueAtTime_Quaternionf(m_DeviceId, usage.name, TimeConverter.LocalDateTimeToUnixTimeMilliseconds(time), out value);
		}

		public bool TryGetFeatureValue(InputFeatureUsage<InputTrackingState> usage, DateTime time, out InputTrackingState value)
		{
			uint value2 = 0u;
			if (InputDevices.TryGetFeatureValueAtTime_UInt32(m_DeviceId, usage.name, TimeConverter.LocalDateTimeToUnixTimeMilliseconds(time), out value2))
			{
				value = (InputTrackingState)value2;
				return true;
			}
			value = InputTrackingState.None;
			return false;
		}

		public override bool Equals(object obj)
		{
			if (!(obj is InputDevice))
			{
				return false;
			}
			return Equals((InputDevice)obj);
		}

		public bool Equals(InputDevice other)
		{
			return m_DeviceId == other.m_DeviceId;
		}

		public override int GetHashCode()
		{
			return m_DeviceId.GetHashCode();
		}

		public static bool operator ==(InputDevice a, InputDevice b)
		{
			return a.Equals(b);
		}

		public static bool operator !=(InputDevice a, InputDevice b)
		{
			return !(a == b);
		}
	}
	internal static class TimeConverter
	{
		private static readonly DateTime s_Epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);

		public static DateTime now => DateTime.Now;

		public static long LocalDateTimeToUnixTimeMilliseconds(DateTime date)
		{
			return Convert.ToInt64((date.ToUniversalTime() - s_Epoch).TotalMilliseconds);
		}

		public static DateTime UnixTimeMillisecondsToLocalDateTime(long unixTimeInMilliseconds)
		{
			DateTime dateTime = s_Epoch;
			return dateTime.AddMilliseconds(unixTimeInMilliseconds).ToLocalTime();
		}
	}
	public enum HandFinger
	{
		Thumb,
		Index,
		Middle,
		Ring,
		Pinky
	}
	[NativeHeader("Modules/XR/Subsystems/Input/Public/XRInputDevices.h")]
	[NativeHeader("XRScriptingClasses.h")]
	[NativeHeader("Modules/XR/XRPrefix.h")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[RequiredByNativeCode]
	[NativeConditional("ENABLE_VR")]
	public struct Hand : IEquatable<Hand>
	{
		private ulong m_DeviceId;

		private uint m_FeatureIndex;

		internal ulong deviceId => m_DeviceId;

		internal uint featureIndex => m_FeatureIndex;

		public bool TryGetRootBone(out Bone boneOut)
		{
			return Hand_TryGetRootBone(this, out boneOut);
		}

		private static bool Hand_TryGetRootBone(Hand hand, out Bone boneOut)
		{
			return Hand_TryGetRootBone_Injected(ref hand, out boneOut);
		}

		public bool TryGetFingerBones(HandFinger finger, List<Bone> bonesOut)
		{
			if (bonesOut == null)
			{
				throw new ArgumentNullException("bonesOut");
			}
			return Hand_TryGetFingerBonesAsList(this, finger, bonesOut);
		}

		private static bool Hand_TryGetFingerBonesAsList(Hand hand, HandFinger finger, [NotNull] List<Bone> bonesOut)
		{
			return Hand_TryGetFingerBonesAsList_Injected(ref hand, finger, bonesOut);
		}

		public override bool Equals(object obj)
		{
			if (!(obj is Hand))
			{
				return false;
			}
			return Equals((Hand)obj);
		}

		public bool Equals(Hand other)
		{
			return deviceId == other.deviceId && featureIndex == other.featureIndex;
		}

		public override int GetHashCode()
		{
			return deviceId.GetHashCode() ^ (featureIndex.GetHashCode() << 1);
		}

		public static bool operator ==(Hand a, Hand b)
		{
			return a.Equals(b);
		}

		public static bool operator !=(Hand a, Hand b)
		{
			return !(a == b);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool Hand_TryGetRootBone_Injected(ref Hand hand, out Bone boneOut);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool Hand_TryGetFingerBonesAsList_Injected(ref Hand hand, HandFinger finger, List<Bone> bonesOut);
	}
	internal enum EyeSide
	{
		Left,
		Right
	}
	[NativeConditional("ENABLE_VR")]
	[NativeHeader("Modules/XR/XRPrefix.h")]
	[NativeHeader("XRScriptingClasses.h")]
	[NativeHeader("Modules/XR/Subsystems/Input/Public/XRInputDevices.h")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[RequiredByNativeCode]
	public struct Eyes : IEquatable<Eyes>
	{
		private ulong m_DeviceId;

		private uint m_FeatureIndex;

		internal ulong deviceId => m_DeviceId;

		internal uint featureIndex => m_FeatureIndex;

		public bool TryGetLeftEyePosition(out Vector3 position)
		{
			return Eyes_TryGetEyePosition(this, EyeSide.Left, out position);
		}

		public bool TryGetRightEyePosition(out Vector3 position)
		{
			return Eyes_TryGetEyePosition(this, EyeSide.Right, out position);
		}

		public bool TryGetLeftEyeRotation(out Quaternion rotation)
		{
			return Eyes_TryGetEyeRotation(this, EyeSide.Left, out rotation);
		}

		public bool TryGetRightEyeRotation(out Quaternion rotation)
		{
			return Eyes_TryGetEyeRotation(this, EyeSide.Right, out rotation);
		}

		private static bool Eyes_TryGetEyePosition(Eyes eyes, EyeSide chirality, out Vector3 position)
		{
			return Eyes_TryGetEyePosition_Injected(ref eyes, chirality, out position);
		}

		private static bool Eyes_TryGetEyeRotation(Eyes eyes, EyeSide chirality, out Quaternion rotation)
		{
			return Eyes_TryGetEyeRotation_Injected(ref eyes, chirality, out rotation);
		}

		public bool TryGetFixationPoint(out Vector3 fixationPoint)
		{
			return Eyes_TryGetFixationPoint(this, out fixationPoint);
		}

		private static bool Eyes_TryGetFixationPoint(Eyes eyes, out Vector3 fixationPoint)
		{
			return Eyes_TryGetFixationPoint_Injected(ref eyes, out fixationPoint);
		}

		public bool TryGetLeftEyeOpenAmount(out float openAmount)
		{
			return Eyes_TryGetEyeOpenAmount(this, EyeSide.Left, out openAmount);
		}

		public bool TryGetRightEyeOpenAmount(out float openAmount)
		{
			return Eyes_TryGetEyeOpenAmount(this, EyeSide.Right, out openAmount);
		}

		private static bool Eyes_TryGetEyeOpenAmount(Eyes eyes, EyeSide chirality, out float openAmount)
		{
			return Eyes_TryGetEyeOpenAmount_Injected(ref eyes, chirality, out openAmount);
		}

		public override bool Equals(object obj)
		{
			if (!(obj is Eyes))
			{
				return false;
			}
			return Equals((Eyes)obj);
		}

		public bool Equals(Eyes other)
		{
			return deviceId == other.deviceId && featureIndex == other.featureIndex;
		}

		public override int GetHashCode()
		{
			return deviceId.GetHashCode() ^ (featureIndex.GetHashCode() << 1);
		}

		public static bool operator ==(Eyes a, Eyes b)
		{
			return a.Equals(b);
		}

		public static bool operator !=(Eyes a, Eyes b)
		{
			return !(a == b);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool Eyes_TryGetEyePosition_Injected(ref Eyes eyes, EyeSide chirality, out Vector3 position);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool Eyes_TryGetEyeRotation_Injected(ref Eyes eyes, EyeSide chirality, out Quaternion rotation);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool Eyes_TryGetFixationPoint_Injected(ref Eyes eyes, out Vector3 fixationPoint);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool Eyes_TryGetEyeOpenAmount_Injected(ref Eyes eyes, EyeSide chirality, out float openAmount);
	}
	[NativeHeader("Modules/XR/Subsystems/Input/Public/XRInputDevices.h")]
	[NativeHeader("Modules/XR/XRPrefix.h")]
	[RequiredByNativeCode]
	[NativeConditional("ENABLE_VR")]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeHeader("XRScriptingClasses.h")]
	public struct Bone : IEquatable<Bone>
	{
		private ulong m_DeviceId;

		private uint m_FeatureIndex;

		internal ulong deviceId => m_DeviceId;

		internal uint featureIndex => m_FeatureIndex;

		public bool TryGetPosition(out Vector3 position)
		{
			return Bone_TryGetPosition(this, out position);
		}

		private static bool Bone_TryGetPosition(Bone bone, out Vector3 position)
		{
			return Bone_TryGetPosition_Injected(ref bone, out position);
		}

		public bool TryGetRotation(out Quaternion rotation)
		{
			return Bone_TryGetRotation(this, out rotation);
		}

		private static bool Bone_TryGetRotation(Bone bone, out Quaternion rotation)
		{
			return Bone_TryGetRotation_Injected(ref bone, out rotation);
		}

		public bool TryGetParentBone(out Bone parentBone)
		{
			return Bone_TryGetParentBone(this, out parentBone);
		}

		private static bool Bone_TryGetParentBone(Bone bone, out Bone parentBone)
		{
			return Bone_TryGetParentBone_Injected(ref bone, out parentBone);
		}

		public bool TryGetChildBones(List<Bone> childBones)
		{
			return Bone_TryGetChildBones(this, childBones);
		}

		private static bool Bone_TryGetChildBones(Bone bone, [NotNull] List<Bone> childBones)
		{
			return Bone_TryGetChildBones_Injected(ref bone, childBones);
		}

		public override bool Equals(object obj)
		{
			if (!(obj is Bone))
			{
				return false;
			}
			return Equals((Bone)obj);
		}

		public bool Equals(Bone other)
		{
			return deviceId == other.deviceId && featureIndex == other.featureIndex;
		}

		public override int GetHashCode()
		{
			return deviceId.GetHashCode() ^ (featureIndex.GetHashCode() << 1);
		}

		public static bool operator ==(Bone a, Bone b)
		{
			return a.Equals(b);
		}

		public static bool operator !=(Bone a, Bone b)
		{
			return !(a == b);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool Bone_TryGetPosition_Injected(ref Bone bone, out Vector3 position);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool Bone_TryGetRotation_Injected(ref Bone bone, out Quaternion rotation);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool Bone_TryGetParentBone_Injected(ref Bone bone, out Bone parentBone);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool Bone_TryGetChildBones_Injected(ref Bone bone, List<Bone> childBones);
	}
	[StructLayout(LayoutKind.Sequential)]
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeConditional("ENABLE_VR")]
	[NativeHeader("Modules/XR/Subsystems/Input/Public/XRInputDevices.h")]
	[UsedByNativeCode]
	public class InputDevices
	{
		public static event Action<InputDevice> deviceConnected;

		public static event Action<InputDevice> deviceDisconnected;

		public static InputDevice GetDeviceAtXRNode(XRNode node)
		{
			ulong deviceIdAtXRNode = InputTracking.GetDeviceIdAtXRNode(node);
			return new InputDevice(deviceIdAtXRNode);
		}

		public static void GetDevicesAtXRNode(XRNode node, List<InputDevice> inputDevices)
		{
			if (inputDevices == null)
			{
				throw new ArgumentNullException("inputDevices");
			}
			List<ulong> list = new List<ulong>();
			InputTracking.GetDeviceIdsAtXRNode_Internal(node, list);
			inputDevices.Clear();
			foreach (ulong item2 in list)
			{
				InputDevice item = new InputDevice(item2);
				if (item.isValid)
				{
					inputDevices.Add(item);
				}
			}
		}

		public static void GetDevices(List<InputDevice> inputDevices)
		{
			if (inputDevices == null)
			{
				throw new ArgumentNullException("inputDevices");
			}
			inputDevices.Clear();
			GetDevices_Internal(inputDevices);
		}

		public static void GetDevicesWithRole(InputDeviceRole role, List<InputDevice> inputDevices)
		{
			if (inputDevices == null)
			{
				throw new ArgumentNullException("inputDevices");
			}
			List<InputDevice> list = new List<InputDevice>();
			GetDevices_Internal(list);
			inputDevices.Clear();
			foreach (InputDevice item in list)
			{
				if (item.role == role)
				{
					inputDevices.Add(item);
				}
			}
		}

		private static void InvokeConnectionEvent(ulong m_DeviceId, bool connected)
		{
			if (connected && InputDevices.deviceConnected != null)
			{
				InputDevices.deviceConnected(new InputDevice(m_DeviceId));
			}
			else if (InputDevices.deviceDisconnected != null)
			{
				InputDevices.deviceDisconnected(new InputDevice(m_DeviceId));
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void GetDevices_Internal([NotNull] List<InputDevice> inputDevices);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool SendHapticImpulse(ulong deviceId, uint channel, float amplitude, float duration);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool SendHapticBuffer(ulong deviceId, uint channel, [NotNull] byte[] buffer);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool TryGetHapticCapabilities(ulong deviceId, out HapticCapabilities capabilities);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern void StopHaptics(ulong deviceId);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool TryGetFeatureUsages(ulong deviceId, [NotNull] List<InputFeatureUsage> featureUsages);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool TryGetFeatureValue_bool(ulong deviceId, string usage, out bool value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool TryGetFeatureValue_UInt32(ulong deviceId, string usage, out uint value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool TryGetFeatureValue_float(ulong deviceId, string usage, out float value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool TryGetFeatureValue_Vector2f(ulong deviceId, string usage, out Vector2 value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool TryGetFeatureValue_Vector3f(ulong deviceId, string usage, out Vector3 value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool TryGetFeatureValue_Quaternionf(ulong deviceId, string usage, out Quaternion value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool TryGetFeatureValue_Custom(ulong deviceId, string usage, [Out] byte[] value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool TryGetFeatureValueAtTime_bool(ulong deviceId, string usage, long time, out bool value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool TryGetFeatureValueAtTime_UInt32(ulong deviceId, string usage, long time, out uint value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool TryGetFeatureValueAtTime_float(ulong deviceId, string usage, long time, out float value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool TryGetFeatureValueAtTime_Vector2f(ulong deviceId, string usage, long time, out Vector2 value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool TryGetFeatureValueAtTime_Vector3f(ulong deviceId, string usage, long time, out Vector3 value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool TryGetFeatureValueAtTime_Quaternionf(ulong deviceId, string usage, long time, out Quaternion value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool TryGetFeatureValue_XRHand(ulong deviceId, string usage, out Hand value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool TryGetFeatureValue_XRBone(ulong deviceId, string usage, out Bone value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool TryGetFeatureValue_XREyes(ulong deviceId, string usage, out Eyes value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern bool IsDeviceValid(ulong deviceId);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern string GetDeviceName(ulong deviceId);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal static extern InputDeviceRole GetDeviceRole(ulong deviceId);
	}
}
namespace UnityEngine.XR.Provider
{
	public static class XRStats
	{
		public static bool TryGetStat(IntegratedSubsystem xrSubsystem, string tag, out float value)
		{
			return TryGetStat_Internal(xrSubsystem.m_Ptr, tag, out value);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeHeader("Modules/XR/Stats/XRStats.h")]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		[NativeMethod("TryGetStatByName_Internal")]
		[NativeConditional("ENABLE_XR")]
		private static extern bool TryGetStat_Internal(IntPtr ptr, string tag, out float value);
	}
}
namespace UnityEngine.Experimental.XR
{
	public struct FrameReceivedEventArgs
	{
		internal XRCameraSubsystem m_CameraSubsystem;

		public XRCameraSubsystem CameraSubsystem => m_CameraSubsystem;
	}
	[NativeHeader("Modules/XR/XRPrefix.h")]
	[NativeType(Header = "Modules/XR/Subsystems/Camera/XRCameraSubsystem.h")]
	[UsedByNativeCode]
	[NativeConditional("ENABLE_XR")]
	public class XRCameraSubsystem : IntegratedSubsystem<XRCameraSubsystemDescriptor>
	{
		public extern int LastUpdatedFrame
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern bool LightEstimationRequested
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern Material Material
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern Camera Camera
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public event Action<FrameReceivedEventArgs> FrameReceived;

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool TryGetAverageBrightness(ref float averageBrightness);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool TryGetAverageColorTemperature(ref float averageColorTemperature);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool TryGetProjectionMatrix(ref Matrix4x4 projectionMatrix);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool TryGetDisplayMatrix(ref Matrix4x4 displayMatrix);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool TryGetTimestamp(ref long timestampNs);

		public bool TryGetShaderName(ref string shaderName)
		{
			return Internal_TryGetShaderName(ref shaderName);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern bool Internal_TryGetShaderName(ref string shaderName);

		public void GetTextures(List<Texture2D> texturesOut)
		{
			if (texturesOut == null)
			{
				throw new ArgumentNullException("texturesOut");
			}
			GetTexturesAsList(texturesOut);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void GetTexturesAsList(List<Texture2D> textures);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern Texture2D[] GetTexturesAsFixedArray();

		[RequiredByNativeCode]
		private void InvokeFrameReceivedEvent()
		{
			if (this.FrameReceived != null)
			{
				this.FrameReceived(new FrameReceivedEventArgs
				{
					m_CameraSubsystem = this
				});
			}
		}
	}
	[NativeHeader("Modules/XR/XRPrefix.h")]
	[NativeType(Header = "Modules/XR/Subsystems/Camera/XRCameraSubsystemDescriptor.h")]
	[UsedByNativeCode]
	[NativeConditional("ENABLE_XR")]
	public class XRCameraSubsystemDescriptor : IntegratedSubsystemDescriptor<XRCameraSubsystem>
	{
		public extern bool ProvidesAverageBrightness
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern bool ProvidesAverageColorTemperature
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern bool ProvidesProjectionMatrix
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern bool ProvidesDisplayMatrix
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern bool ProvidesTimestamp
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}
	}
	public struct PointCloudUpdatedEventArgs
	{
		internal XRDepthSubsystem m_DepthSubsystem;

		public XRDepthSubsystem DepthSubsystem => m_DepthSubsystem;
	}
	[NativeHeader("Modules/XR/XRPrefix.h")]
	[NativeHeader("Modules/XR/Subsystems/Depth/XRDepthSubsystem.h")]
	[NativeConditional("ENABLE_XR")]
	[UsedByNativeCode]
	public class XRDepthSubsystem : IntegratedSubsystem<XRDepthSubsystemDescriptor>
	{
		public extern int LastUpdatedFrame
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public event Action<PointCloudUpdatedEventArgs> PointCloudUpdated;

		public void GetPoints(List<Vector3> pointsOut)
		{
			if (pointsOut == null)
			{
				throw new ArgumentNullException("pointsOut");
			}
			Internal_GetPointCloudPointsAsList(pointsOut);
		}

		public void GetConfidence(List<float> confidenceOut)
		{
			if (confidenceOut == null)
			{
				throw new ArgumentNullException("confidenceOut");
			}
			Internal_GetPointCloudConfidenceAsList(confidenceOut);
		}

		[RequiredByNativeCode]
		private void InvokePointCloudUpdatedEvent()
		{
			if (this.PointCloudUpdated != null)
			{
				this.PointCloudUpdated(new PointCloudUpdatedEventArgs
				{
					m_DepthSubsystem = this
				});
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void Internal_GetPointCloudPointsAsList(List<Vector3> pointsOut);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void Internal_GetPointCloudConfidenceAsList(List<float> confidenceOut);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern Vector3[] Internal_GetPointCloudPointsAsFixedArray();

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern float[] Internal_GetPointCloudConfidenceAsFixedArray();
	}
	[NativeHeader("Modules/XR/XRPrefix.h")]
	[NativeType(Header = "Modules/XR/Subsystems/Depth/XRDepthSubsystemDescriptor.h")]
	[UsedByNativeCode]
	[NativeConditional("ENABLE_XR")]
	public class XRDepthSubsystemDescriptor : IntegratedSubsystemDescriptor<XRDepthSubsystem>
	{
		public extern bool SupportsFeaturePoints
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}
	}
	[NativeType(Header = "Modules/XR/Subsystems/Display/XRDisplaySubsystem.h")]
	[UsedByNativeCode]
	[NativeHeader("Modules/XR/XRPrefix.h")]
	[NativeConditional("ENABLE_XR")]
	public class XRDisplaySubsystem : IntegratedSubsystem<XRDisplaySubsystemDescriptor>
	{
		public enum ReprojectionMode
		{
			Unspecified,
			PositionAndOrientation,
			OrientationOnly,
			None
		}

		public extern bool singlePassRenderingDisabled
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool displayOpaque
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern bool contentProtectionEnabled
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern ReprojectionMode reprojectionMode
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public static event Action<bool> displayFocusChanged;

		[RequiredByNativeCode]
		private static void InvokeDisplayFocusChanged(bool focus)
		{
			if (XRDisplaySubsystem.displayFocusChanged != null)
			{
				XRDisplaySubsystem.displayFocusChanged(focus);
			}
		}

		public void SetFocusPlane(Vector3 point, Vector3 normal, Vector3 velocity)
		{
			SetFocusPlane_Injected(ref point, ref normal, ref velocity);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void SetFocusPlane_Injected(ref Vector3 point, ref Vector3 normal, ref Vector3 velocity);
	}
	[NativeType(Header = "Modules/XR/Subsystems/Display/XRDisplaySubsystemDescriptor.h")]
	[UsedByNativeCode]
	public class XRDisplaySubsystemDescriptor : IntegratedSubsystemDescriptor<XRDisplaySubsystem>
	{
		[NativeConditional("ENABLE_XR")]
		public extern bool disablesLegacyVr
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}
	}
	[NativeType(Header = "Modules/XR/Subsystems/Example/XRExampleSubsystem.h")]
	[UsedByNativeCode]
	public class XRExampleSubsystem : IntegratedSubsystem<XRExampleSubsystemDescriptor>
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeConditional("ENABLE_XR")]
		public extern void PrintExample();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeConditional("ENABLE_XR")]
		public extern bool GetBool();
	}
	[NativeType(Header = "Modules/XR/Subsystems/Example/XRExampleSubsystemDescriptor.h")]
	[UsedByNativeCode]
	public class XRExampleSubsystemDescriptor : IntegratedSubsystemDescriptor<XRExampleSubsystem>
	{
		public extern bool supportsEditorMode
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern bool disableBackbufferMSAA
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern bool stereoscopicBackbuffer
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern bool usePBufferEGL
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}
	}
	[NativeHeader("Modules/XR/XRPrefix.h")]
	[NativeHeader("Modules/XR/Subsystems/Experience/XRExperienceSubsystem.h")]
	[UsedByNativeCode]
	[NativeConditional("ENABLE_XR")]
	public class XRExperienceSubsystem : IntegratedSubsystem<XRExperienceSubsystemDescriptor>
	{
		public enum ExperienceType
		{
			Local,
			Bounded,
			UnBounded
		}

		public enum TrackingOrigin
		{
			Device,
			Floor
		}

		public extern ExperienceType experienceType
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern TrackingOrigin trackingOrigin
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public event Action ExperienceTypeChanged;

		public event Action BoundaryChanged;

		[RequiredByNativeCode]
		private void InvokeExperienceTypeChanged()
		{
			if (this.ExperienceTypeChanged != null)
			{
				this.ExperienceTypeChanged();
			}
		}

		[RequiredByNativeCode]
		private void InvokeBoundaryChanged()
		{
			if (this.BoundaryChanged != null)
			{
				this.BoundaryChanged();
			}
		}

		public void GetAllBoundaryPoints(List<Vector3> boundaryPointsOut)
		{
			if (boundaryPointsOut == null)
			{
				throw new ArgumentNullException("boundaryPointsOut");
			}
			Internal_GetAllBoundaryPointsAsList(boundaryPointsOut);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void Internal_GetAllBoundaryPointsAsList(List<Vector3> boundaryPointsOut);
	}
	[NativeType(Header = "Modules/XR/Subsystems/ReferencePoints/XRExperienceSubsystemDescriptor.h")]
	[UsedByNativeCode]
	[NativeHeader("Modules/XR/XRPrefix.h")]
	public class XRExperienceSubsystemDescriptor : IntegratedSubsystemDescriptor<XRExperienceSubsystem>
	{
	}
	[Flags]
	[UsedByNativeCode]
	public enum GestureEventTypes : uint
	{
		None = 0u,
		Hold = 1u,
		Manipulation = 2u,
		Navigation = 4u,
		Recognition = 8u,
		Tapped = 0x10u,
		All = uint.MaxValue
	}
	[UsedByNativeCode]
	public enum GestureEventState : uint
	{
		Discrete,
		Started,
		Updated,
		Completed,
		Canceled
	}
	[Flags]
	public enum GestureTrackingCoordinates : uint
	{
		None = 0u,
		X = 1u,
		Y = 2u,
		Z = 4u
	}
	[Flags]
	public enum GestureHoldValidFields : uint
	{
		None = 0u,
		Time = 1u,
		DeviceId = 2u,
		PointerPose = 4u
	}
	[UsedByNativeCode]
	[NativeType(Header = "Modules/XR/Subsystems/Gestures/ProviderInterface/IUnityXRGesture.h")]
	[NativeConditional("ENABLE_XR")]
	internal struct NativeGestureHoldEvent
	{
		internal GestureEventState eventState { get; set; }

		internal long time { get; set; }

		internal uint internalDeviceId { get; set; }

		internal Pose pointerPose { get; set; }

		internal GestureHoldValidFields validFields { get; set; }
	}
	public struct GestureHoldEvent
	{
		public GestureEventState eventState => nativeEvent.eventState;

		public DateTime time => TimeConverter.UnixTimeMillisecondsToLocalDateTime(nativeEvent.time);

		public Pose pointerPose => nativeEvent.pointerPose;

		public GestureHoldValidFields validFields => nativeEvent.validFields;

		internal NativeGestureHoldEvent nativeEvent { get; set; }

		internal XRGestureSubsystem gestureSubsystem { get; set; }

		public InputDevice inputDevice => gestureSubsystem.GetInputDeviceForInternalDeviceId(nativeEvent.internalDeviceId);
	}
	[Flags]
	public enum GestureManipulationValidFields : uint
	{
		None = 0u,
		Time = 1u,
		DeviceId = 2u,
		Translation = 4u,
		PointerPose = 8u
	}
	[UsedByNativeCode]
	[NativeType(Header = "Modules/XR/Subsystems/Gestures/ProviderInterface/IUnityXRGesture.h")]
	[NativeConditional("ENABLE_XR")]
	internal struct NativeGestureManipulationEvent
	{
		internal GestureEventState eventState { get; set; }

		internal long time { get; set; }

		internal uint internalDeviceId { get; set; }

		internal Vector3 translation { get; set; }

		internal Pose pointerPose { get; set; }

		internal GestureManipulationValidFields validFields { get; set; }
	}
	public struct GestureManipulationEvent
	{
		public GestureEventState eventState => nativeEvent.eventState;

		public DateTime time => TimeConverter.UnixTimeMillisecondsToLocalDateTime(nativeEvent.time);

		public Vector3 translation => nativeEvent.translation;

		public Pose pointerPose => nativeEvent.pointerPose;

		public GestureManipulationValidFields validFields => nativeEvent.validFields;

		internal NativeGestureManipulationEvent nativeEvent { get; set; }

		internal XRGestureSubsystem gestureSubsystem { get; set; }

		public InputDevice inputDevice => gestureSubsystem.GetInputDeviceForInternalDeviceId(nativeEvent.internalDeviceId);
	}
	[Flags]
	public enum GestureNavigationValidFields : uint
	{
		None = 0u,
		Time = 1u,
		DeviceId = 2u,
		GestureTrackingCoordinates = 4u,
		NormalizedOffset = 8u,
		PointerPose = 0x10u
	}
	[UsedByNativeCode]
	[NativeConditional("ENABLE_XR")]
	[NativeType(Header = "Modules/XR/Subsystems/Gestures/ProviderInterface/IUnityXRGesture.h")]
	internal struct NativeGestureNavigationEvent
	{
		internal GestureEventState eventState { get; set; }

		internal long time { get; set; }

		internal uint internalDeviceId { get; set; }

		internal GestureTrackingCoordinates gestureTrackingCoordinates { get; set; }

		internal Vector3 normalizedOffset { get; set; }

		internal Pose pointerPose { get; set; }

		internal GestureNavigationValidFields validFields { get; set; }
	}
	public struct GestureNavigationEvent
	{
		public GestureEventState eventState => nativeEvent.eventState;

		public DateTime time => TimeConverter.UnixTimeMillisecondsToLocalDateTime(nativeEvent.time);

		public GestureTrackingCoordinates gestureTrackingCoordinates => nativeEvent.gestureTrackingCoordinates;

		public Vector3 normalizedOffset => nativeEvent.normalizedOffset;

		public Pose pointerPose => nativeEvent.pointerPose;

		public GestureNavigationValidFields validFields => nativeEvent.validFields;

		internal NativeGestureNavigationEvent nativeEvent { get; set; }

		internal XRGestureSubsystem gestureSubsystem { get; set; }

		public InputDevice inputDevice => gestureSubsystem.GetInputDeviceForInternalDeviceId(nativeEvent.internalDeviceId);
	}
	[Flags]
	public enum GestureRecognitionValidFields : uint
	{
		None = 0u,
		Time = 1u,
		DeviceId = 2u,
		PointerPose = 4u
	}
	[NativeConditional("ENABLE_XR")]
	[NativeType(Header = "Modules/XR/Subsystems/Gestures/ProviderInterface/IUnityXRGesture.h")]
	[UsedByNativeCode]
	internal struct NativeGestureRecognitionEvent
	{
		internal GestureEventState eventState { get; set; }

		internal long time { get; set; }

		internal uint internalDeviceId { get; set; }

		internal Pose pointerPose { get; set; }

		internal GestureRecognitionValidFields validFields { get; set; }
	}
	public struct GestureRecognitionEvent
	{
		public GestureEventState eventState => nativeEvent.eventState;

		public DateTime time => TimeConverter.UnixTimeMillisecondsToLocalDateTime(nativeEvent.time);

		public Pose pointerPose => nativeEvent.pointerPose;

		public GestureRecognitionValidFields validFields => nativeEvent.validFields;

		internal NativeGestureRecognitionEvent nativeEvent { get; set; }

		internal XRGestureSubsystem gestureSubsystem { get; set; }

		public InputDevice inputDevice => gestureSubsystem.GetInputDeviceForInternalDeviceId(nativeEvent.internalDeviceId);
	}
	[Flags]
	public enum GestureTappedValidFields : uint
	{
		None = 0u,
		Time = 1u,
		DeviceId = 2u,
		TappedCount = 4u,
		PointerPose = 8u
	}
	[NativeConditional("ENABLE_XR")]
	[UsedByNativeCode]
	[NativeType(Header = "Modules/XR/Subsystems/Gestures/ProviderInterface/IUnityXRGesture.h")]
	internal struct NativeGestureTappedEvent
	{
		internal GestureEventState eventState { get; set; }

		internal long time { get; set; }

		internal uint internalDeviceId { get; set; }

		internal uint tappedCount { get; set; }

		internal Pose pointerPose { get; set; }

		internal GestureTappedValidFields validFields { get; set; }
	}
	public struct GestureTappedEvent
	{
		public GestureEventState eventState => nativeEvent.eventState;

		public DateTime time => TimeConverter.UnixTimeMillisecondsToLocalDateTime(nativeEvent.time);

		public uint tappedCount => nativeEvent.tappedCount;

		public Pose pointerPose => nativeEvent.pointerPose;

		public GestureTappedValidFields validFields => nativeEvent.validFields;

		internal NativeGestureTappedEvent nativeEvent { get; set; }

		internal XRGestureSubsystem gestureSubsystem { get; set; }

		public InputDevice inputDevice => gestureSubsystem.GetInputDeviceForInternalDeviceId(nativeEvent.internalDeviceId);
	}
	[NativeConditional("ENABLE_XR")]
	[NativeType(Header = "Modules/XR/Subsystems/Gestures/XRGestureSubsystem.h")]
	[NativeHeader("Modules/XR/XRPrefix.h")]
	[UsedByNativeCode]
	public class XRGestureSubsystem : IntegratedSubsystem<XRGestureSubsystemDescriptor>
	{
		private Action<GestureHoldEvent> m_HoldChanged;

		private Action<GestureManipulationEvent> m_ManipulationChanged;

		private Action<GestureNavigationEvent> m_NavigationChanged;

		private Action<GestureRecognitionEvent> m_RecognitionChanged;

		private Action<GestureTappedEvent> m_TappedChanged;

		public event Action<GestureHoldEvent> HoldChanged
		{
			add
			{
				m_HoldChanged = (Action<GestureHoldEvent>)Delegate.Combine(m_HoldChanged, value);
			}
			remove
			{
				m_HoldChanged = (Action<GestureHoldEvent>)Delegate.Remove(m_HoldChanged, value);
			}
		}

		public event Action<GestureManipulationEvent> ManipulationChanged
		{
			add
			{
				m_ManipulationChanged = (Action<GestureManipulationEvent>)Delegate.Combine(m_ManipulationChanged, value);
			}
			remove
			{
				m_ManipulationChanged = (Action<GestureManipulationEvent>)Delegate.Remove(m_ManipulationChanged, value);
			}
		}

		public event Action<GestureNavigationEvent> NavigationChanged
		{
			add
			{
				m_NavigationChanged = (Action<GestureNavigationEvent>)Delegate.Combine(m_NavigationChanged, value);
			}
			remove
			{
				m_NavigationChanged = (Action<GestureNavigationEvent>)Delegate.Remove(m_NavigationChanged, value);
			}
		}

		public event Action<GestureRecognitionEvent> RecognitionChanged
		{
			add
			{
				m_RecognitionChanged = (Action<GestureRecognitionEvent>)Delegate.Combine(m_RecognitionChanged, value);
			}
			remove
			{
				m_RecognitionChanged = (Action<GestureRecognitionEvent>)Delegate.Remove(m_RecognitionChanged, value);
			}
		}

		public event Action<GestureTappedEvent> TappedChanged
		{
			add
			{
				m_TappedChanged = (Action<GestureTappedEvent>)Delegate.Combine(m_TappedChanged, value);
			}
			remove
			{
				m_TappedChanged = (Action<GestureTappedEvent>)Delegate.Remove(m_TappedChanged, value);
			}
		}

		[RequiredByNativeCode]
		private void InvokeHoldChanged(NativeGestureHoldEvent gestureEvent)
		{
			if (m_HoldChanged != null)
			{
				m_HoldChanged(new GestureHoldEvent
				{
					nativeEvent = gestureEvent,
					gestureSubsystem = this
				});
			}
		}

		[RequiredByNativeCode]
		private void InvokeManipulationChanged(NativeGestureManipulationEvent gestureEvent)
		{
			if (m_ManipulationChanged != null)
			{
				m_ManipulationChanged(new GestureManipulationEvent
				{
					nativeEvent = gestureEvent,
					gestureSubsystem = this
				});
			}
		}

		[RequiredByNativeCode]
		private void InvokeNavigationChanged(NativeGestureNavigationEvent gestureEvent)
		{
			if (m_NavigationChanged != null)
			{
				m_NavigationChanged(new GestureNavigationEvent
				{
					nativeEvent = gestureEvent,
					gestureSubsystem = this
				});
			}
		}

		[RequiredByNativeCode]
		private void InvokeRecognitionChanged(NativeGestureRecognitionEvent gestureEvent)
		{
			if (m_RecognitionChanged != null)
			{
				m_RecognitionChanged(new GestureRecognitionEvent
				{
					nativeEvent = gestureEvent,
					gestureSubsystem = this
				});
			}
		}

		[RequiredByNativeCode]
		private void InvokeTappedChanged(NativeGestureTappedEvent gestureEvent)
		{
			if (m_TappedChanged != null)
			{
				m_TappedChanged(new GestureTappedEvent
				{
					nativeEvent = gestureEvent,
					gestureSubsystem = this
				});
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern GestureEventTypes GetAvailableGestures();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool SetEnabledGestures(GestureEventTypes enabledGestures);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool CancelAllGestures();

		internal InputDevice GetInputDeviceForInternalDeviceId(uint internalDeviceId)
		{
			return new InputDevice(GetInputDeviceIdForInternalDeviceId(internalDeviceId));
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal extern ulong GetInputDeviceIdForInternalDeviceId(uint internalDeviceId);
	}
	[NativeType(Header = "Modules/XR/Subsystems/Gestures/XRGesturesSubsystemDescriptor.h")]
	[UsedByNativeCode]
	public class XRGestureSubsystemDescriptor : IntegratedSubsystemDescriptor<XRGestureSubsystem>
	{
	}
}
namespace UnityEngine.XR
{
	[NativeType(Header = "Modules/XR/Subsystems/Input/XRInputSubsystem")]
	[UsedByNativeCode]
	public class XRInputSubsystem : IntegratedSubsystem<XRInputSubsystemDescriptor>
	{
	}
	[UsedByNativeCode]
	[NativeHeader("Modules/XR/XRPrefix.h")]
	[NativeType(Header = "Modules/XR/Subsystems/Input/XRInputSubsystemDescriptor.h")]
	[NativeConditional("ENABLE_XR")]
	public class XRInputSubsystemDescriptor : IntegratedSubsystemDescriptor<XRInputSubsystem>
	{
		[NativeConditional("ENABLE_XR")]
		public extern bool disablesLegacyInput
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}
	}
}
namespace UnityEngine.Experimental.XR
{
	[RequiredByNativeCode]
	[NativeHeader("Modules/XR/Subsystems/Meshing/XRMeshBindings.h")]
	public enum MeshGenerationStatus
	{
		Success,
		InvalidMeshId,
		GenerationAlreadyInProgress,
		Canceled,
		UnknownError
	}
	internal static class HashCodeHelper
	{
		private const int k_HashCodeMultiplier = 486187739;

		public static int Combine(int hash1, int hash2)
		{
			return hash1 * 486187739 + hash2;
		}
	}
	[NativeHeader("Modules/XR/Subsystems/Meshing/XRMeshBindings.h")]
	[RequiredByNativeCode]
	public struct MeshGenerationResult : IEquatable<MeshGenerationResult>
	{
		public TrackableId MeshId { get; }

		public Mesh Mesh { get; }

		public MeshCollider MeshCollider { get; }

		public MeshGenerationStatus Status { get; }

		public MeshVertexAttributes Attributes { get; }

		public override bool Equals(object obj)
		{
			if (!(obj is MeshGenerationResult))
			{
				return false;
			}
			return Equals((MeshGenerationResult)obj);
		}

		public bool Equals(MeshGenerationResult other)
		{
			return MeshId.Equals(other.MeshId) && ((object)Mesh).Equals((object?)other.Mesh) && ((object)MeshCollider).Equals((object?)other.MeshCollider) && Status.Equals(other.Status) && Attributes.Equals(other.Attributes);
		}

		public static bool operator ==(MeshGenerationResult lhs, MeshGenerationResult rhs)
		{
			return lhs.Equals(rhs);
		}

		public static bool operator !=(MeshGenerationResult lhs, MeshGenerationResult rhs)
		{
			return !lhs.Equals(rhs);
		}

		public override int GetHashCode()
		{
			return HashCodeHelper.Combine(HashCodeHelper.Combine(HashCodeHelper.Combine(HashCodeHelper.Combine(MeshId.GetHashCode(), ((object)Mesh).GetHashCode()), ((object)MeshCollider).GetHashCode()), Status.GetHashCode()), Attributes.GetHashCode());
		}
	}
	[NativeHeader("Modules/XR/Subsystems/Meshing/XRMeshBindings.h")]
	[UsedByNativeCode]
	[Flags]
	public enum MeshVertexAttributes
	{
		None = 0,
		Normals = 1,
		Tangents = 2,
		UVs = 4,
		Colors = 8
	}
	[NativeHeader("Modules/XR/Subsystems/Meshing/XRMeshBindings.h")]
	[UsedByNativeCode]
	public enum MeshChangeState
	{
		Added,
		Updated,
		Removed,
		Unchanged
	}
	[NativeHeader("Modules/XR/Subsystems/Meshing/XRMeshBindings.h")]
	[UsedByNativeCode]
	public struct MeshInfo : IEquatable<MeshInfo>
	{
		public TrackableId MeshId { get; set; }

		public MeshChangeState ChangeState { get; set; }

		public int PriorityHint { get; set; }

		public override bool Equals(object obj)
		{
			if (!(obj is MeshInfo))
			{
				return false;
			}
			return Equals((MeshInfo)obj);
		}

		public bool Equals(MeshInfo other)
		{
			return MeshId.Equals(other.MeshId) && ChangeState.Equals(other.ChangeState) && PriorityHint.Equals(other.PriorityHint);
		}

		public static bool operator ==(MeshInfo lhs, MeshInfo rhs)
		{
			return lhs.Equals(rhs);
		}

		public static bool operator !=(MeshInfo lhs, MeshInfo rhs)
		{
			return !lhs.Equals(rhs);
		}

		public override int GetHashCode()
		{
			return HashCodeHelper.Combine(HashCodeHelper.Combine(MeshId.GetHashCode(), ChangeState.GetHashCode()), PriorityHint);
		}
	}
	[NativeConditional("ENABLE_XR")]
	[NativeHeader("Modules/XR/XRPrefix.h")]
	[UsedByNativeCode]
	[NativeHeader("Modules/XR/Subsystems/Meshing/XRMeshingSubsystem.h")]
	public class XRMeshSubsystem : IntegratedSubsystem<XRMeshSubsystemDescriptor>
	{
		public extern float meshDensity
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public bool TryGetMeshInfos(List<MeshInfo> meshInfosOut)
		{
			if (meshInfosOut == null)
			{
				throw new ArgumentNullException("meshInfosOut");
			}
			return GetMeshInfosAsList(meshInfosOut);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern bool GetMeshInfosAsList(List<MeshInfo> meshInfos);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern MeshInfo[] GetMeshInfosAsFixedArray();

		public void GenerateMeshAsync(TrackableId meshId, Mesh mesh, MeshCollider meshCollider, MeshVertexAttributes attributes, Action<MeshGenerationResult> onMeshGenerationComplete)
		{
			GenerateMeshAsync_Injected(ref meshId, mesh, meshCollider, attributes, onMeshGenerationComplete);
		}

		[RequiredByNativeCode]
		private void InvokeMeshReadyDelegate(MeshGenerationResult result, Action<MeshGenerationResult> onMeshGenerationComplete)
		{
			onMeshGenerationComplete?.Invoke(result);
		}

		public bool SetBoundingVolume(Vector3 origin, Vector3 extents)
		{
			return SetBoundingVolume_Injected(ref origin, ref extents);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void GenerateMeshAsync_Injected(ref TrackableId meshId, Mesh mesh, MeshCollider meshCollider, MeshVertexAttributes attributes, Action<MeshGenerationResult> onMeshGenerationComplete);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern bool SetBoundingVolume_Injected(ref Vector3 origin, ref Vector3 extents);
	}
	[UsedByNativeCode]
	[NativeType(Header = "Modules/XR/Subsystems/Planes/XRMeshSubsystemDescriptor.h")]
	[NativeHeader("Modules/XR/XRPrefix.h")]
	public class XRMeshSubsystemDescriptor : IntegratedSubsystemDescriptor<XRMeshSubsystem>
	{
	}
	[Flags]
	[UsedByNativeCode]
	public enum PlaneAlignment
	{
		Horizontal = 1,
		Vertical = 2,
		NonAxis = 4
	}
	[NativeHeader("Modules/XR/Subsystems/Planes/XRBoundedPlane.h")]
	[UsedByNativeCode]
	[NativeHeader("XRScriptingClasses.h")]
	[NativeConditional("ENABLE_XR")]
	[NativeHeader("Modules/XR/XRPrefix.h")]
	public struct BoundedPlane
	{
		private uint m_InstanceId;

		public TrackableId Id { get; set; }

		public TrackableId SubsumedById { get; set; }

		public Pose Pose { get; set; }

		public Vector3 Center { get; set; }

		public Vector2 Size { get; set; }

		public PlaneAlignment Alignment { get; set; }

		public float Width => Size.x;

		public float Height => Size.y;

		public Vector3 Normal
		{
			get
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000a: Unknown result type (might be due to invalid IL or missing references)
				//IL_000f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0015: Unknown result type (might be due to invalid IL or missing references)
				Pose pose = Pose;
				return ((Pose)(ref pose)).up;
			}
		}

		public Plane Plane => new Plane(Normal, Center);

		public void GetCorners(out Vector3 p0, out Vector3 p1, out Vector3 p2, out Vector3 p3)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: 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)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			Pose pose = Pose;
			Vector3 val = ((Pose)(ref pose)).right * (Width * 0.5f);
			Pose pose2 = Pose;
			Vector3 val2 = ((Pose)(ref pose2)).forward * (Height * 0.5f);
			p0 = Center - val - val2;
			p1 = Center - val + val2;
			p2 = Center + val + val2;
			p3 = Center + val - val2;
		}

		public bool TryGetBoundary(List<Vector3> boundaryOut)
		{
			if (boundaryOut == null)
			{
				throw new ArgumentNullException("boundaryOut");
			}
			return Internal_GetBoundaryAsList(m_InstanceId, Id, boundaryOut);
		}

		private static Vector3[] Internal_GetBoundaryAsFixedArray(uint instanceId, TrackableId id)
		{
			return Internal_GetBoundaryAsFixedArray_Injected(instanceId, ref id);
		}

		private static bool Internal_GetBoundaryAsList(uint instanceId, TrackableId id, List<Vector3> boundaryOut)
		{
			return Internal_GetBoundaryAsList_Injected(instanceId, ref id, boundaryOut);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern Vector3[] Internal_GetBoundaryAsFixedArray_Injected(uint instanceId, ref TrackableId id);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool Internal_GetBoundaryAsList_Injected(uint instanceId, ref TrackableId id, List<Vector3> boundaryOut);
	}
	public struct PlaneAddedEventArgs
	{
		public XRPlaneSubsystem PlaneSubsystem { get; internal set; }

		public BoundedPlane Plane { get; internal set; }
	}
	public struct PlaneUpdatedEventArgs
	{
		public XRPlaneSubsystem PlaneSubsystem { get; internal set; }

		public BoundedPlane Plane { get; internal set; }
	}
	public struct PlaneRemovedEventArgs
	{
		public XRPlaneSubsystem PlaneSubsystem { get; internal set; }

		public BoundedPlane Plane { get; internal set; }
	}
	[NativeHeader("Modules/XR/XRPrefix.h")]
	[NativeHeader("Modules/XR/Subsystems/Planes/XRPlaneSubsystem.h")]
	[NativeConditional("ENABLE_XR")]
	[UsedByNativeCode]
	public class XRPlaneSubsystem : IntegratedSubsystem<XRPlaneSubsystemDescriptor>
	{
		public extern int LastUpdatedFrame
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public event Action<PlaneAddedEventArgs> PlaneAdded;

		public event Action<PlaneUpdatedEventArgs> PlaneUpdated;

		public event Action<PlaneRemovedEventArgs> PlaneRemoved;

		public bool TryGetPlane(TrackableId planeId, out BoundedPlane plane)
		{
			return TryGetPlane_Injected(ref planeId, out plane);
		}

		public void GetAllPlanes(List<BoundedPlane> planesOut)
		{
			if (planesOut == null)
			{
				throw new ArgumentNullException("planesOut");
			}
			GetAllPlanesAsList(planesOut);
		}

		public bool TryGetPlaneBoundary(TrackableId planeId, List<Vector3> boundaryOut)
		{
			if (boundaryOut == null)
			{
				throw new ArgumentNullException("boundaryOut");
			}
			return Internal_GetBoundaryAsList(planeId, boundaryOut);
		}

		[RequiredByNativeCode]
		private void InvokePlaneAddedEvent(BoundedPlane plane)
		{
			if (this.PlaneAdded != null)
			{
				this.PlaneAdded(new PlaneAddedEventArgs
				{
					PlaneSubsystem = this,
					Plane = plane
				});
			}
		}

		[RequiredByNativeCode]
		private void InvokePlaneUpdatedEvent(BoundedPlane plane)
		{
			if (this.PlaneUpdated != null)
			{
				this.PlaneUpdated(new PlaneUpdatedEventArgs
				{
					PlaneSubsystem = this,
					Plane = plane
				});
			}
		}

		[RequiredByNativeCode]
		private void InvokePlaneRemovedEvent(BoundedPlane removedPlane)
		{
			if (this.PlaneRemoved != null)
			{
				this.PlaneRemoved(new PlaneRemovedEventArgs
				{
					PlaneSubsystem = this,
					Plane = removedPlane
				});
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern BoundedPlane[] GetAllPlanesAsFixedArray();

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void GetAllPlanesAsList(List<BoundedPlane> planes);

		private bool Internal_GetBoundaryAsList(TrackableId planeId, List<Vector3> boundaryOut)
		{
			return Internal_GetBoundaryAsList_Injected(ref planeId, boundaryOut);
		}

		private Vector3[] Internal_GetBoundaryAsFixedArray(TrackableId planeId)
		{
			return Internal_GetBoundaryAsFixedArray_Injected(ref planeId);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern bool TryGetPlane_Injected(ref TrackableId planeId, out BoundedPlane plane);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern bool Internal_GetBoundaryAsList_Injected(ref TrackableId planeId, List<Vector3> boundaryOut);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern Vector3[] Internal_GetBoundaryAsFixedArray_Injected(ref TrackableId planeId);
	}
	[UsedByNativeCode]
	[NativeHeader("Modules/XR/XRPrefix.h")]
	[NativeType(Header = "Modules/XR/Subsystems/Planes/XRPlaneSubsystemDescriptor.h")]
	public class XRPlaneSubsystemDescriptor : IntegratedSubsystemDescriptor<XRPlaneSubsystem>
	{
	}
	[UsedByNativeCode]
	[Flags]
	public enum TrackableType
	{
		None = 0,
		PlaneWithinPolygon = 1,
		PlaneWithinBounds = 2,
		PlaneWithinInfinity = 4,
		PlaneEstimated = 8,
		Planes = 0xF,
		FeaturePoint = 0x10,
		All = 0x1F
	}
	[NativeHeader("Modules/XR/Subsystems/Raycast/XRRaycastSubsystem.h")]
	[UsedByNativeCode]
	public struct XRRaycastHit
	{
		public TrackableId TrackableId { get; set; }

		public Pose Pose { get; set; }

		public float Distance { get; set; }

		public TrackableType HitType { get; set; }
	}
	[NativeHeader("Modules/XR/Subsystems/Raycast/XRRaycastSubsystem.h")]
	[UsedByNativeCode]
	[NativeConditional("ENABLE_XR")]
	[NativeHeader("Modules/XR/XRPrefix.h")]
	public class XRRaycastSubsystem : IntegratedSubsystem<XRRaycastSubsystemDescriptor>
	{
		public bool Raycast(Vector3 screenPoint, List<XRRaycastHit> hitResults, TrackableType trackableTypeMask = TrackableType.All)
		{
			if (hitResults == null)
			{
				throw new ArgumentNullException("hitResults");
			}
			float screenX = Mathf.Clamp01(screenPoint.x / (float)Screen.width);
			float screenY = Mathf.Clamp01(screenPoint.y / (float)Screen.height);
			return Internal_ScreenRaycastAsList(screenX, screenY, trackableTypeMask, hitResults);
		}

		public static void Raycast(Ray ray, XRDepthSubsystem depthSubsystem, XRPlaneSubsystem planeSubsystem, List<XRRaycastHit> hitResults, TrackableType trackableTypeMask = TrackableType.All, float pointCloudRaycastAngleInDegrees = 5f)
		{
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			if (hitResults == null)
			{
				throw new ArgumentNullException("hitResults");
			}
			IntPtr depthSubsystem2 = depthSubsystem?.m_Ptr ?? IntPtr.Zero;
			IntPtr planeSubsystem2 = planeSubsystem?.m_Ptr ?? IntPtr.Zero;
			Internal_RaycastAsList(ray, pointCloudRaycastAngleInDegrees, depthSubsystem2, planeSubsystem2, trackableTypeMask, hitResults);
		}

		private static void Internal_RaycastAsList(Ray ray, float pointCloudRaycastAngleInDegrees, IntPtr depthSubsystem, IntPtr planeSubsystem, TrackableType trackableTypeMask, List<XRRaycastHit> hitResultsOut)
		{
			Internal_RaycastAsList_Injected(ref ray, pointCloudRaycastAngleInDegrees, depthSubsystem, planeSubsystem, trackableTypeMask, hitResultsOut);
		}

		private static XRRaycastHit[] Internal_RaycastAsFixedArray(Ray ray, float pointCloudRaycastAngleInDegrees, IntPtr depthSubsystem, IntPtr planeSubsystem, TrackableType trackableTypeMask)
		{
			return Internal_RaycastAsFixedArray_Injected(ref ray, pointCloudRaycastAngleInDegrees, depthSubsystem, planeSubsystem, trackableTypeMask);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern bool Internal_ScreenRaycastAsList(float screenX, float screenY, TrackableType hitMask, List<XRRaycastHit> hitResultsOut);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern XRRaycastHit[] Internal_ScreenRaycastAsFixedArray(float screenX, float screenY, TrackableType hitMask);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void Internal_RaycastAsList_Injected(ref Ray ray, float pointCloudRaycastAngleInDegrees, IntPtr depthSubsystem, IntPtr planeSubsystem, TrackableType trackableTypeMask, List<XRRaycastHit> hitResultsOut);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern XRRaycastHit[] Internal_RaycastAsFixedArray_Injected(ref Ray ray, float pointCloudRaycastAngleInDegrees, IntPtr depthSubsystem, IntPtr planeSubsys